:root {
    --color-primary: #1f3a5f;
    --color-secondary: #2f5d8a;
    --color-background: #f9fafb;
    --color-card: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-success: #2e7d5a;
    --color-warning: #c79a2b;
    --color-danger: #b94a48;
    --color-sidebar-text: #e8eef6;
    --shadow-sm: 0 8px 24px rgba(31, 58, 95, 0.08);
    --shadow-xs: 0 4px 12px rgba(31, 58, 95, 0.05);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Inter", "Roboto", sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    overflow-x: hidden;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-layout {
    display: grid;
    grid-template-columns: 272px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--color-primary) 0%, #17304e 100%);
    color: var(--color-sidebar-text);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 30;
}

.sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding: 20px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(9, 20, 35, 0.22);
    overflow: hidden;
    min-height: 98px;
}
.sidebar-top::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -18px;
    width: 182px;
    height: 182px;
    background: url("../../img/logo-tuiuti.png") center / contain no-repeat;
    opacity: 0.18;
    transform: translateY(-50%);
    filter: drop-shadow(0 12px 24px rgba(7, 18, 34, 0.24));
    pointer-events: none;
}
.sidebar-top > * {
    position: relative;
    z-index: 1;
}
.sidebar-top .brand {
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
}
.sidebar-top .brand-copy {
    max-width: 146px;
}
.sidebar-top .brand-title {
    font-size: 16px;
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(9, 20, 35, 0.28);
}
.sidebar-top .brand-subtitle {
    font-size: 11px;
    line-height: 1.3;
    margin-top: 5px;
    text-shadow: 0 1px 2px rgba(9, 20, 35, 0.24);
}

.sidebar-backdrop {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-copy {
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    padding: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transform: scale(1.35);
    transform-origin: center;
}
.sidebar-top .brand-mark {
    width: 68px;
    height: 68px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 24px rgba(9, 20, 35, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.sidebar-top .brand-logo {
    transform: scale(1.72);
}

.brand-title {
    font-size: 18px;
    font-weight: 600;
}

.brand-subtitle {
    font-size: 12px;
    color: rgba(232, 238, 246, 0.72);
    margin-top: 4px;
}

.sidebar-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(232, 238, 246, 0.58);
    margin: 12px 0 10px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(232, 238, 246, 0.86);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.main-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.topbar-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.topbar-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.topbar-subtitle {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-top: 6px;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-meta {
    text-align: right;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    color: var(--color-text-muted);
    font-size: 12px;
}

.content {
    padding: 28px;
}

body.pdv-fullscreen {
    overflow-x: hidden;
}

body.pdv-fullscreen .app-layout {
    grid-template-columns: minmax(0, 1fr);
}

body.pdv-fullscreen .sidebar,
body.pdv-fullscreen .sidebar-backdrop,
body.pdv-fullscreen .mobile-menu-toggle {
    display: none !important;
}

body.pdv-fullscreen .main-panel,
body.pdv-fullscreen .content {
    width: 100%;
    max-width: none;
    min-width: 0;
}

body.pdv-fullscreen .content {
    padding: 14px;
}

.page-header,
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.page-header h2,
.section-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.page-header p,
.section-header p {
    margin: 6px 0 0;
    color: var(--color-text-muted);
}

.grid,
.metrics-grid {
    display: grid;
    gap: 18px;
}

.metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 22px;
}

.dashboard-split {
    grid-template-columns: 1.3fr 1fr;
}

.reports-split {
    grid-template-columns: 1fr 1fr;
}

.metric-card,
.card,
.table-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.metric-card {
    padding: 22px;
}

.metric-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.metric-value {
    font-size: 30px;
    font-weight: 600;
    color: var(--color-primary);
}

.metric-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.card,
.table-card {
    padding: 22px;
}

.table-card {
    overflow-x: auto;
}

.card + .card,
.table-card + .table-card {
    margin-top: 18px;
}

.filters-form,
.form-grid {
    display: grid;
    gap: 16px;
}

.filters-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.form-grid.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid.three-columns {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 500;
}

.password-field {
    position: relative;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    color: var(--color-text);
    background: #fff;
}

.password-field .form-control {
    padding-right: 98px;
}

.form-textarea {
    min-height: 110px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.12);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--color-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 6px;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--color-primary);
}

.password-toggle:focus-visible {
    outline: none;
    color: var(--color-primary);
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.14);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mobile-menu-toggle,
.sidebar-close {
    display: none;
}

.btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 15px;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
}
.mobile-menu-toggle,
.sidebar-close {
    display: none;
}

.btn-primary {
    background: var(--color-secondary);
    color: #fff;
}

.btn-primary:hover {
    background: #274f76;
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: #e8edf2;
}

.btn-success {
    background: var(--color-success);
    color: #fff;
}

.btn-success:hover {
    background: #266949;
}

.btn-warning {
    background: #f7f1dd;
    color: #8a6b16;
    border-color: #eadfb7;
}

.btn-warning:hover {
    background: #efe6c8;
}

.btn-danger {
    background: #f7e8e8;
    color: var(--color-danger);
    border-color: #ebd0cf;
}

.btn-danger:hover {
    background: #efd7d6;
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    font-weight: 600;
    background: #fbfcfd;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.status-badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: rgba(46, 125, 90, 0.12);
    color: var(--color-success);
}

.status-warning {
    background: rgba(199, 154, 43, 0.16);
    color: #9b7314;
}

.status-danger {
    background: rgba(185, 74, 72, 0.13);
    color: var(--color-danger);
}

.status-info {
    background: rgba(47, 93, 138, 0.12);
    color: var(--color-secondary);
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-success {
    background: rgba(46, 125, 90, 0.08);
    border-color: rgba(46, 125, 90, 0.18);
    color: var(--color-success);
}

.alert-warning {
    background: rgba(199, 154, 43, 0.1);
    border-color: rgba(199, 154, 43, 0.18);
    color: #916d19;
}

.alert-danger {
    background: rgba(185, 74, 72, 0.08);
    border-color: rgba(185, 74, 72, 0.18);
    color: var(--color-danger);
}

.alert-info {
    background: rgba(47, 93, 138, 0.1);
    border-color: rgba(47, 93, 138, 0.18);
    color: var(--color-secondary);
}

.pdv-shell {
    --pdv-blue: #0a4d78;
    --pdv-blue-dark: #063f63;
    --pdv-blue-soft: #5f8db7;
    display: grid;
    gap: 10px;
    min-height: calc(100vh - 170px);
    padding: 22px;
    color: var(--pdv-blue-dark);
    background: linear-gradient(135deg, #4f7faa 0%, #6d99c1 100%);
    border: 1px solid rgba(6, 63, 99, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.pdv-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 66px;
    gap: 10px;
    align-items: stretch;
}

.pdv-open-title,
.pdv-operator-badge,
.pdv-logo-panel,
.pdv-box,
.pdv-products-panel,
.pdv-total-strip,
.pdv-shortcut-card {
    background: #ffffff;
    border: 1px solid rgba(6, 63, 99, 0.18);
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(6, 32, 52, 0.12);
}

.pdv-open-title {
    min-height: 64px;
    display: grid;
    place-items: center;
    color: var(--pdv-blue-dark);
    font-size: 38px;
    font-weight: 600;
    line-height: 1;
}

.pdv-operator-badge {
    min-height: 64px;
    display: grid;
    place-items: center;
    padding: 8px;
    color: var(--pdv-blue);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    overflow-wrap: anywhere;
}

.btn-pdv-fullscreen {
    min-height: 64px;
    border-radius: 7px;
    padding-inline: 16px;
    color: var(--pdv-blue-dark);
    background: #ffffff;
    border-color: rgba(6, 63, 99, 0.18);
    box-shadow: 0 6px 16px rgba(6, 32, 52, 0.12);
}

.btn-pdv-fullscreen:hover {
    background: #f4f8fb;
}

body.pdv-fullscreen .pdv-shell {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 114px);
    border-radius: 10px;
}

body.pdv-fullscreen .pdv-console {
    grid-template-columns: 244px 260px minmax(0, 1fr);
}

body.pdv-fullscreen .pdv-products-area,
body.pdv-fullscreen .pdv-products-panel,
body.pdv-fullscreen .pdv-table-frame {
    min-width: 0;
}

.pdv-console {
    display: grid;
    grid-template-columns: 244px 244px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.pdv-left-rail,
.pdv-entry-column,
.pdv-products-area {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.pdv-left-rail {
    grid-template-rows: minmax(250px, 1fr) 78px auto;
}

.pdv-logo-panel {
    min-height: 250px;
    display: grid;
    place-items: center;
    padding: 24px;
}

.pdv-logo-panel img {
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    transform: scale(1.22);
}

.pdv-box,
.pdv-products-panel,
.pdv-total-strip {
    overflow: hidden;
}

.pdv-box-title,
.pdv-list-title {
    min-height: 28px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    color: #ffffff;
    background: var(--pdv-blue-dark);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.pdv-list-title {
    justify-content: center;
    letter-spacing: 0.03em;
}

.pdv-code-display {
    min-height: 49px;
    display: grid;
    place-items: center;
    padding: 8px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 26px;
    font-weight: 600;
    color: var(--pdv-blue-dark);
}

.pdv-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.pdv-shortcut-card {
    min-height: 102px;
    padding: 8px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.45;
}

.pdv-shortcut-card strong {
    color: var(--pdv-blue-dark);
}

.pdv-entry-column {
    align-content: start;
}

.pdv-company-box .form-select,
.pdv-discount-box .form-control,
.pdv-note-box .form-textarea {
    border: 0;
    border-radius: 0;
}

.pdv-company-box .form-select {
    min-height: 48px;
}

.pdv-scan-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 8px;
    padding: 8px;
}

.pdv-scan-row > .form-control {
    min-height: 50px;
    border: 0;
    border-radius: 4px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(6, 63, 99, 0.1);
}

.pdv-quantity-mini {
    display: grid;
    gap: 4px;
}

.pdv-quantity-mini label {
    color: var(--pdv-blue-dark);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.pdv-quantity-mini .form-control {
    min-height: 31px;
    padding: 6px;
    text-align: center;
    font-weight: 600;
}

.pdv-money-value {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 12px;
    color: var(--pdv-blue-dark);
    font-size: 28px;
    font-weight: 600;
}

.pdv-mini-grid {
    display: grid;
    gap: 10px;
}

.pdv-mini-value {
    padding: 0 10px 8px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

.pdv-note-box .compact-textarea {
    min-height: 62px;
    resize: vertical;
}

.pdv-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pdv-command-grid .btn {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px;
}

.pdv-command-grid .btn-success {
    grid-column: 1 / -1;
}

.pdv-products-area {
    grid-template-rows: minmax(330px, 1fr) auto;
}

.pdv-products-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    min-height: 360px;
}

.pdv-products-panel .alert {
    margin: 8px 8px 0;
}

.pdv-table-frame {
    overflow: auto;
    background: #ffffff;
}

.pdv-table {
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12px;
}

.pdv-table th,
.pdv-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e9eef3;
    vertical-align: middle;
}

.pdv-table th {
    color: #ffffff;
    background: var(--pdv-blue-dark);
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
}

.pdv-table tbody tr:nth-child(even) td {
    background: #f8fbfd;
}

.pdv-table .empty-state {
    height: 240px;
    background: #ffffff;
    color: var(--color-text-muted);
    text-align: center;
    vertical-align: middle;
}

.pdv-numeric {
    text-align: right !important;
}

.pdv-product-name,
.pdv-product-unit {
    display: block;
}

.pdv-product-name {
    max-width: 280px;
    color: #111827;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdv-product-unit {
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 10px;
}

.pdv-product-code {
    font-family: "Consolas", "Courier New", monospace;
    color: var(--pdv-blue-dark);
    white-space: nowrap;
}

.pdv-line-total {
    color: var(--pdv-blue-dark);
    font-weight: 600;
}

.pdv-row-action {
    min-height: 28px;
    padding: 5px 8px !important;
    font-size: 11px;
}

.pdv-finance-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pdv-subtotal-strip,
.pdv-final-strip {
    grid-column: 1 / -1;
}

.pdv-subtotal-value,
.pdv-final-value,
.pdv-received-value {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 56px;
    padding: 8px 14px;
    color: var(--pdv-blue-dark);
    font-weight: 600;
    line-height: 1;
}

.pdv-subtotal-value {
    font-size: 43px;
}

.pdv-final-value {
    color: var(--color-success);
    font-size: 47px;
}

.pdv-received-value {
    font-size: 28px;
}

.compact-textarea {
    min-height: 48px;
}

.pdv-table .btn,
.pdv-payment-table .btn {
    padding: 8px 12px;
}

.pdv-modal-actions {
    justify-content: flex-end;
}

.pdv-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 24px;
    background: rgba(17, 24, 39, 0.54);
}

.pdv-modal-backdrop[hidden] {
    display: none;
}

.pdv-modal {
    width: min(100%, 980px);
    max-height: min(92vh, 780px);
    overflow: auto;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.pdv-modal-small {
    width: min(100%, 620px);
}

.pdv-payment-metrics {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 18px 0;
}

.pdv-payment-action {
    justify-content: end;
}

.pdv-payment-table {
    margin-top: 18px;
}

@media print {
    .sidebar,
    .topbar,
    .sidebar-backdrop,
    .page-header .actions {
        display: none !important;
    }

    .app-layout,
    .main-panel {
        display: block;
    }

    .content {
        padding: 0;
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.detail-item {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    background: #fcfcfd;
}

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, rgba(47, 93, 138, 0.18), transparent 32%), linear-gradient(180deg, #eef3f8 0%, #f9fafb 100%);
    padding: 24px;
}

.login-card {
    width: min(100%, 420px);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.99) 0%, #ffffff 62%, #f7fafc 100%);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 32px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../img/logo-tuiuti.png") center 72% / 390px no-repeat;
    opacity: 0.14;
    filter: drop-shadow(0 18px 34px rgba(31, 58, 95, 0.14));
    pointer-events: none;
    z-index: 0;
}
.login-card > * {
    position: relative;
    z-index: 1;
}
.login-brand {
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(31, 58, 95, 0.08), rgba(31, 58, 95, 0.03));
    border: 1px solid rgba(31, 58, 95, 0.09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
    position: relative;
    overflow: hidden;
}
.login-brand::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -10px;
    width: 170px;
    height: 170px;
    background: url("../../img/logo-tuiuti.png") center / contain no-repeat;
    opacity: 0.12;
    transform: translateY(-50%);
    pointer-events: none;
}
.login-brand > * {
    position: relative;
    z-index: 1;
}
.login-brand .brand-mark {
    width: 92px;
    height: 92px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 32px rgba(31, 58, 95, 0.14);
    border: 1px solid rgba(31, 58, 95, 0.08);
}
.login-brand .brand-logo {
    transform: scale(1.62);
}
.login-brand .brand-title {
    color: var(--color-primary);
    font-size: 19px;
}
.login-brand .brand-subtitle {
    color: var(--color-text-muted);
}

.login-card h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
}

.login-card p {
    margin: 10px 0 24px;
    color: var(--color-text-muted);
}

.pending-payment-card {
    max-width: 520px;
}

.pending-payment-message {
    margin: 24px 0;
}

.pending-payment-message h1 {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 28px;
    line-height: 1.2;
}

.pending-payment-message p {
    margin: 8px 0;
}

.table-note {
    font-size: 12px;
    color: var(--color-text-muted);
}

.empty-state {
    padding: 34px 18px;
    text-align: center;
    color: var(--color-text-muted);
}

.pagination {
    margin-top: 18px;
}

.pagination-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pagination-meta {
    font-size: 13px;
    color: var(--color-text-muted);
}

.pagination-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pagination-pages {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination-link:hover {
    background: #eef4f9;
    border-color: #cfd8e3;
}

.pagination-link.is-active {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
}

.pagination-link.is-disabled {
    color: #9ca3af;
    background: #f9fafb;
    cursor: not-allowed;
}

.pagination-link.is-ellipsis {
    min-width: auto;
    height: auto;
    padding: 0 2px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
}

.inline-form {
    display: inline;
}

@media (max-width: 980px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(84vw, 320px);
        height: 100vh;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.24);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.36);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.24s ease, visibility 0.24s ease;
        z-index: 20;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-toggle,
    .sidebar-close {
        display: inline-flex;
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .topbar,
    .page-header,
    .section-header,
    .topbar-heading,
    .user-panel {
        flex-direction: column;
        align-items: stretch;
    }
    .sidebar-top::before {
        width: 150px;
        height: 150px;
        right: -18px;
        opacity: 0.18;
    }
    .sidebar-top .brand-copy {
        max-width: none;
    }

    .topbar {
        padding: 16px 18px;
    }

    .content,
    .login-card,
    .card,
    .table-card,
    .metric-card {
        padding: 18px;
    }

    .user-meta {
        text-align: left;
    }

    .dashboard-split,
    .reports-split {
        grid-template-columns: 1fr;
    }

    .pdv-shell {
        min-height: auto;
        padding: 16px;
    }

    .pdv-console {
        grid-template-columns: minmax(220px, 0.85fr) minmax(220px, 0.85fr) minmax(0, 1.4fr);
    }

    .pdv-shortcuts {
        grid-template-columns: 1fr;
    }

    .pdv-open-title {
        font-size: 32px;
    }

    .pdv-subtotal-value,
    .pdv-final-value {
        font-size: 36px;
    }

    .data-table {
        min-width: 680px;
    }

    .pagination-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination-nav {
        width: 100%;
        justify-content: space-between;
    }

    .pagination-pages {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .content,
    .topbar,
    .card,
    .table-card,
    .metric-card,
    .login-card {
        padding: 14px;
    }
    .login-card::before {
        background-size: 310px;
        background-position: center 74%;
        opacity: 0.12;
    }
    .login-brand {
        padding: 14px;
    }
    .login-brand::after {
        width: 132px;
        height: 132px;
        right: -16px;
        opacity: 0.1;
    }
    .login-brand .brand-mark {
        width: 78px;
        height: 78px;
    }
    .login-brand .brand-logo {
        transform: scale(1.54);
    }

    .topbar-title {
        font-size: 20px;
    }

    .page-header h2,
    .section-header h3 {
        font-size: 18px;
    }

    .metric-value {
        font-size: 24px;
    }

    .pdv-topline,
    .pdv-console,
    .pdv-left-rail,
    .pdv-finance-panel {
        grid-template-columns: 1fr;
    }

    body.pdv-fullscreen .pdv-topline,
    body.pdv-fullscreen .pdv-console,
    body.pdv-fullscreen .pdv-finance-panel {
        grid-template-columns: 1fr;
    }

    .pdv-open-title {
        min-height: 52px;
        font-size: 27px;
    }

    .pdv-operator-badge {
        min-height: auto;
    }

    .pdv-logo-panel {
        min-height: 160px;
    }

    .pdv-shortcuts {
        grid-template-columns: 1fr;
    }

    .pdv-command-grid,
    .pdv-scan-row {
        grid-template-columns: 1fr;
    }

    .pdv-command-grid .btn-success,
    .pdv-subtotal-strip,
    .pdv-final-strip {
        grid-column: auto;
    }

    .pdv-subtotal-value,
    .pdv-final-value {
        font-size: 31px;
    }

    .pdv-received-value,
    .pdv-money-value {
        font-size: 24px;
    }

    .filters-form {
        grid-template-columns: 1fr;
    }

    .actions {
        width: 100%;
    }

    .actions .btn {
        flex: 1 1 auto;
    }

    .data-table {
        min-width: 620px;
    }

    .pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
    }

    .pagination-nav {
        gap: 6px;
    }

    .pagination-pages {
        width: 100%;
        justify-content: flex-start;
    }
}
