:root {
    --ink: #18212f;
    --muted: #667085;
    --line: #d9e2e8;
    --paper: #f7faf8;
    --panel: #ffffff;
    --panel-2: #fbfdfc;
    --teal: #0f766e;
    --green: #059669;
    --red: #dc2626;
    --amber: #d97706;
    --indigo: #4f46e5;
    --blue: #2563eb;
    --violet: #7c3aed;
    --focus: rgba(15, 118, 110, .18);
    --shadow: 0 18px 45px rgba(24, 33, 47, .08);
    --soft-shadow: 0 8px 24px rgba(24, 33, 47, .07);
}

* {
    box-sizing: border-box;
}

html {
    font-family: "Cairo", sans-serif;
    color: var(--ink);
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", sans-serif;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(15, 118, 110, .06), transparent 260px),
        var(--paper);
}

button,
input,
select,
textarea {
    font-family: "Cairo", sans-serif;
}

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

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    fill: currentColor;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, #0d241f 0%, #122f2a 55%, #173225 100%);
    color: #eef8f3;
    padding: 24px;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2dd4bf, #f59e0b);
    color: #10261f;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: rgba(238, 248, 243, .72);
    font-size: 12px;
}

.nav-list {
    display: grid;
    gap: 8px;
    margin-top: 34px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    color: rgba(238, 248, 243, .82);
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.nav-item:hover,
.nav-item.active {
    transform: translateX(-3px);
    background: rgba(255, 255, 255, .1);
    border-color: rgba(45, 212, 191, .38);
    color: #fff;
}

.mobile-menu-button {
    display: none;
}

.main-panel {
    min-width: 0;
    padding: 28px;
    animation: page-in .36s ease both;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--teal);
    font-weight: 700;
    font-size: 13px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 28px;
}

h2 {
    margin-bottom: 0;
    font-size: 18px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.user-chip button,
.panel-header a,
.login-form button {
    border: 0;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card,
.panel,
.login-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    background:
        radial-gradient(circle at var(--spot-x, 85%) var(--spot-y, 0%), rgba(15, 118, 110, .08), transparent 150px),
        var(--panel);
    animation: rise .45s ease both;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.metric-card:hover,
.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 55px rgba(24, 33, 47, .11);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--teal);
}

.metric-card.credit::before {
    background: var(--green);
}

.metric-card.debit::before {
    background: var(--red);
}

.metric-card.profit::before {
    background: var(--amber);
}

.metric-card.neutral::before {
    background: var(--indigo);
}

.metric-card > span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.metric-card > strong {
    font-size: 30px;
}

.money {
    display: inline-flex;
    direction: ltr;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
    max-width: 100%;
}

.money span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.money strong {
    color: var(--ink);
    font-size: 26px;
    font-weight: 800;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
    gap: 18px;
}

.panel {
    padding: 18px;
    margin-bottom: 18px;
    background:
        radial-gradient(circle at var(--spot-x, 90%) var(--spot-y, 0%), rgba(79, 70, 229, .035), transparent 170px),
        var(--panel);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-header a {
    background: #eef8f3;
    color: var(--teal);
}

.page-note {
    margin: 6px 0 0;
    color: var(--muted);
}

.toolbar-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.security-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -8px 0 18px;
}

.security-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 999px;
    background: rgba(236, 253, 245, .8);
    color: var(--teal);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.search-form {
    display: flex;
    gap: 8px;
    flex: 1;
}

.search-form.stacked {
    display: block;
    margin-bottom: 16px;
}

.search-form.slim {
    max-width: 420px;
}

.search-form input,
.form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    min-height: 44px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.search-form input:focus,
.form-control:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px var(--focus);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 800;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn:hover,
.user-chip button:hover,
.login-form button:hover {
    transform: translateY(-1px);
    box-shadow: var(--soft-shadow);
    filter: saturate(1.06);
}

.btn:active,
.user-chip button:active,
.login-form button:active {
    transform: translateY(0);
}

.btn.ripple::after,
.user-chip button.ripple::after,
.login-form button.ripple::after {
    content: "";
    position: absolute;
    left: var(--ripple-x);
    top: var(--ripple-y);
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    transform: translate(-50%, -50%) scale(1);
    animation: ripple .55s ease-out;
    pointer-events: none;
}

.btn.is-loading {
    color: transparent;
}

.btn.is-loading::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    animation: spin .75s linear infinite;
}

.btn.primary {
    background: linear-gradient(135deg, var(--teal), #0e9488);
    color: #fff;
}

.btn.ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.btn.danger {
    background: linear-gradient(135deg, var(--red), #f97316);
    color: #fff;
}

.form-panel {
    max-width: 980px;
}

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

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

.field {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.required-field > span::after {
    content: " *";
    color: var(--red);
}

.field.is-valid .form-control {
    border-color: rgba(5, 150, 105, .58);
    background: #fbfffd;
}

.field.is-invalid .form-control {
    border-color: rgba(220, 38, 38, .68);
    background: #fffafa;
}

.field small,
.field-error {
    color: var(--muted);
    font-size: 12px;
}

.field-error {
    color: var(--red);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-field input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 10px;
    grid-column: 1 / -1;
}

.readonly-card {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.65);
}

.fraud-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(217, 119, 6, .24);
    border-radius: 8px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
    color: #92400e;
    padding: 12px 14px;
    font-weight: 800;
}

.money-input {
    letter-spacing: 0;
    direction: ltr;
}

.readonly-card span {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.readonly-card strong {
    font-size: 20px;
}

.currency-field input {
    min-height: 60px;
    font-size: 28px;
    font-weight: 800;
    color: var(--teal);
}

.summary-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
}

.summary-list dt {
    color: var(--muted);
    font-weight: 700;
}

.summary-list dd {
    margin: 0;
    font-weight: 800;
}

.segmented {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.segmented a {
    padding: 10px 14px;
    border-inline-start: 1px solid var(--line);
}

.segmented a:first-child {
    border-inline-start: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eef2ff;
    color: var(--indigo);
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
}

.badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.badge.ok {
    background: #ecfdf5;
    color: var(--green);
}

.badge.danger {
    background: #fef2f2;
    color: var(--red);
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar.fallback {
    display: grid;
    place-items: center;
    background: #eef8f3;
    color: var(--teal);
    font-weight: 800;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell a {
    display: inline-flex;
    margin-inline-end: 8px;
    color: var(--teal);
    font-weight: 800;
}

.danger-panel {
    max-width: 720px;
    border-color: rgba(220, 38, 38, .25);
}

.table-wrap {
    overflow: auto;
    max-width: 100%;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    background: #fff;
}

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    background: #f7faf9;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr {
    transition: background .2s ease;
}

tbody tr:hover {
    background: #f2f8f5;
}

tbody tr {
    animation: table-row-in .28s ease both;
}

.invoice-list {
    display: grid;
    gap: 10px;
}

.invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.invoice-row:hover {
    transform: translateX(-3px);
    border-color: rgba(15, 118, 110, .35);
    background: #fbfefd;
}

.invoice-row span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.invoice-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 28px;
    background: #fff;
    color: #111827;
    box-shadow: var(--shadow);
}

.invoice-copy {
    position: relative;
    height: 148.5mm;
    padding: 12mm;
    border-bottom: 1px dashed #9ca3af;
    overflow: hidden;
}

.invoice-copy:last-child {
    border-bottom: 0;
}

.paid-stamp {
    position: absolute;
    top: 38mm;
    left: 28mm;
    transform: rotate(-18deg);
    border: 4px solid rgba(220, 38, 38, .5);
    border-radius: 8px;
    color: rgba(220, 38, 38, .55);
    font-size: 42px;
    font-weight: 800;
    padding: 4px 20px;
    z-index: 0;
}

.invoice-head,
.invoice-foot,
.barcode-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.invoice-number {
    border: 1px solid #111827;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 800;
}

.invoice-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.invoice-grid div,
.amount-words {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    background: rgba(255,255,255,.82);
}

.invoice-grid span,
.amount-words span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.amount-words {
    margin-bottom: 10px;
}

.barcode-row img {
    max-width: 260px;
    height: 42px;
    object-fit: contain;
}

.signature-box {
    width: 150px;
    min-height: 38px;
    border: 1px dashed #6b7280;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #6b7280;
    font-weight: 700;
}

.invoice-foot {
    margin-top: 10px;
}

.empty {
    color: var(--muted);
}

.messages {
    margin-bottom: 16px;
}

.message {
    position: relative;
    padding: 12px 44px 12px 14px;
    border-radius: 8px;
    background: #eef8f3;
    color: var(--teal);
    font-weight: 700;
    border: 1px solid rgba(15, 118, 110, .2);
    box-shadow: var(--soft-shadow);
    animation: toast-in .35s ease both;
}

.message::before {
    content: "";
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(-50%);
}

.message.error {
    background: #fef2f2;
    color: var(--red);
    border-color: rgba(220, 38, 38, .22);
}

.message.success {
    background: #ecfdf5;
    color: var(--green);
}

.message.warning {
    background: #fffbeb;
    color: var(--amber);
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .12), transparent 35%),
        linear-gradient(225deg, rgba(217, 119, 6, .12), transparent 40%),
        var(--paper);
}

.login-card {
    width: min(440px, 100%);
    padding: 28px;
}

.login-brand {
    color: var(--ink);
    margin-bottom: 20px;
}

.login-brand small {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
}

.login-form button {
    margin-top: 4px;
    padding: 13px 14px;
    font-size: 16px;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes table-row-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ripple {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(22);
    }
}

@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        height: auto;
        padding: 14px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .nav-list {
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 14px;
    }

    .sidebar.nav-open .nav-list {
        display: grid;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-top: 14px;
        width: 100%;
        border: 1px solid rgba(255,255,255,.15);
        border-radius: 8px;
        padding: 12px 14px;
        background: rgba(255,255,255,.1);
        color: #fff;
        font-weight: 800;
    }

    .metric-grid,
    .content-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .toolbar-panel,
    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form.slim {
        max-width: none;
    }

    table.responsive-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 10px;
        background: transparent;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        display: grid;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--soft-shadow);
    }

    .responsive-table td {
        display: grid;
        grid-template-columns: minmax(95px, .45fr) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        border: 0;
        padding: 4px 0;
        text-align: start;
        min-width: 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
    }

    .responsive-table .actions-cell {
        display: flex;
        flex-wrap: wrap;
        white-space: normal;
    }

    .invoice-sheet {
        width: 100%;
        min-height: auto;
        overflow: hidden;
    }

    .invoice-copy {
        height: auto;
        min-height: 0;
        padding: 18px;
    }

    .invoice-grid {
        grid-template-columns: 1fr;
    }

    .invoice-head,
    .invoice-foot,
    .barcode-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .paid-stamp {
        top: 120px;
        left: 18px;
        font-size: 30px;
    }
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .messages,
    .no-print,
    .toolbar-panel:not(.printable) {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .main-panel {
        padding: 0;
    }

    .panel {
        box-shadow: none;
        border: 0;
    }

    .invoice-sheet {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        box-shadow: none;
    }

    @page {
        size: A4;
        margin: 0;
    }
}

@media (max-width: 560px) {
    body {
        padding-bottom: 74px;
    }

    .main-panel,
    .sidebar {
        padding: 14px;
    }

    .nav-list {
        grid-template-columns: 1fr;
    }

    .metric-card > strong,
    .money strong {
        font-size: 22px;
    }

    .metric-grid {
        gap: 10px;
    }

    h1 {
        font-size: 23px;
    }

    h2 {
        font-size: 16px;
    }

    .panel,
    .metric-card {
        padding: 14px;
    }

    .form-actions,
    .segmented {
        flex-direction: column;
        width: 100%;
    }

    .segmented a {
        border-inline-start: 0;
        border-top: 1px solid var(--line);
    }

    .segmented a:first-child {
        border-top: 0;
    }
}

.bottom-nav {
    display: none;
}

@media (max-width: 760px) {
    .bottom-nav {
        position: fixed;
        inset-inline: 10px;
        bottom: 10px;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 8px;
        border: 1px solid rgba(15, 118, 110, .18);
        border-radius: 8px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 16px 42px rgba(24, 33, 47, .18);
        backdrop-filter: blur(12px);
    }

    .bottom-nav a {
        display: grid;
        place-items: center;
        gap: 3px;
        min-width: 0;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        padding: 5px 2px;
        border-radius: 8px;
    }

    .bottom-nav a.active {
        background: #eef8f3;
        color: var(--teal);
    }
}

/* Production dashboard correction pass: calm app shell, clear active states, print-safe templates. */
:root {
    --ink: #18201d;
    --muted: #6b746f;
    --line: #dde6e1;
    --paper: #f5f8f4;
    --panel: #ffffff;
    --panel-2: #f9fbfa;
    --sidebar: #17211d;
    --sidebar-2: #1f3129;
    --teal: #14584c;
    --green: #4bb17a;
    --mint: #b7f28d;
    --red: #d14343;
    --amber: #d8922b;
    --blue: #326fbe;
    --indigo: #6055d8;
    --focus: rgba(75, 177, 122, .22);
    --shadow: 0 10px 28px rgba(17, 24, 39, .07);
    --soft-shadow: 0 5px 16px rgba(17, 24, 39, .06);
}

html,
body {
    background: var(--paper);
}

body {
    background:
        linear-gradient(180deg, rgba(75, 177, 122, .08), rgba(245, 248, 244, 0) 260px),
        var(--paper);
}

.app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    border-inline-end: 1px solid rgba(255, 255, 255, .08);
}

.brand {
    padding: 0 6px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
    border-radius: 8px;
    background: #54c58b;
    color: #13221c;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}

.nav-list {
    gap: 6px;
    margin-top: 22px;
}

.nav-item {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(244, 250, 247, .74);
    background: transparent;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 700;
    transform: none !important;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .08);
    color: #ffffff;
}

.nav-item.active,
.nav-item[aria-current="page"] {
    background: #54c58b;
    border-color: #54c58b;
    color: #10241c;
    box-shadow: 0 8px 20px rgba(84, 197, 139, .24);
}

.nav-item.active .icon,
.nav-item[aria-current="page"] .icon {
    color: #10241c;
}

.main-panel {
    padding: 24px clamp(16px, 2.1vw, 30px) 32px;
    animation: page-in .26s ease both;
}

.topbar {
    min-height: 74px;
    margin: -24px calc(clamp(16px, 2.1vw, 30px) * -1) 20px;
    padding: 18px clamp(16px, 2.1vw, 30px);
    background: rgba(255, 255, 255, .84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.eyebrow {
    color: var(--teal);
}

h1 {
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.25;
}

.page-note {
    color: var(--muted);
    max-width: 780px;
}

.user-chip,
.panel,
.metric-card,
.login-card,
.readonly-card,
.message {
    box-shadow: var(--soft-shadow);
}

.panel,
.metric-card,
.login-card {
    border-color: var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.panel,
.metric-card {
    transform: none !important;
}

.panel:hover,
.metric-card:hover,
.invoice-row:hover {
    transform: none !important;
    box-shadow: var(--soft-shadow);
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
}

.metric-card {
    min-height: 132px;
    padding: 18px;
    background: var(--panel);
    overflow: hidden;
}

.metric-card::before {
    width: 4px;
}

.metric-card > span {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.metric-card .money {
    width: 100%;
    justify-content: flex-end;
}

.money strong,
.metric-card > strong {
    font-size: clamp(22px, 2vw, 30px);
}

.content-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
    gap: 16px;
    align-items: start;
}

.panel {
    padding: 18px;
    margin-bottom: 16px;
    background: var(--panel);
}

.panel-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.panel-header h2 {
    font-size: 17px;
}

.panel-header a {
    background: #edf8f1;
    color: var(--teal);
    border: 1px solid rgba(20, 88, 76, .12);
}

.toolbar-panel {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--soft-shadow);
}

.security-strip {
    margin: 0 0 16px;
}

.security-strip span {
    border-radius: 8px;
    background: #edf8f1;
}

.btn,
.user-chip button,
.login-form button {
    border-radius: 8px;
    min-height: 42px;
    box-shadow: none;
}

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

.btn.primary:hover,
.user-chip button:hover,
.login-form button:hover {
    box-shadow: 0 8px 18px rgba(20, 88, 76, .16);
}

.btn.ghost {
    background: #fff;
    border: 1px solid var(--line);
}

.btn.danger {
    background: var(--red);
}

.segmented a {
    color: var(--muted);
    font-weight: 800;
}

.segmented a:hover,
.segmented a.active {
    background: var(--teal);
    color: #fff;
}

.search-form input,
.form-control,
.login-form input {
    border-radius: 8px;
    background: #fff;
}

.field span {
    color: var(--ink);
}

.field.is-valid .form-control {
    border-color: rgba(75, 177, 122, .68);
}

.field.is-invalid .form-control {
    border-color: rgba(209, 67, 67, .78);
}

.currency-field input {
    color: var(--teal);
    border-width: 2px;
}

.readonly-card {
    background: #f9fbfa;
}

.fraud-note {
    background: #fff8e8;
    border-color: rgba(216, 146, 43, .34);
}

.table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

table {
    background: #fff;
}

th {
    background: #f2f6f3;
    color: #52615b;
    font-weight: 800;
}

td {
    color: #1c2722;
}

tbody tr:hover {
    background: #f7fbf8;
}

.actions-cell a {
    border: 1px solid rgba(20, 88, 76, .16);
    border-radius: 8px;
    padding: 6px 9px;
    background: #f5fbf7;
}

.badge {
    border-radius: 8px;
}

.invoice-row {
    background: #fff;
    border-radius: 8px;
}

.invoice-sheet {
    width: 210mm;
    max-width: 100%;
    min-height: 297mm;
    border: 1px solid #d7dce0;
    box-shadow: 0 18px 45px rgba(17, 24, 39, .12);
}

.invoice-copy {
    padding: 8mm 10mm;
    height: 148.5mm;
}

.invoice-brand-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 20mm;
    padding: 8px 12px;
    background: var(--teal);
    color: #fff;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invoice-logo,
.invoice-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    color: var(--teal);
    object-fit: contain;
}

.invoice-logo-mark {
    display: grid;
    place-items: center;
    font-weight: 800;
}

.invoice-brand h2,
.invoice-brand p,
.invoice-title strong,
.invoice-title span {
    margin: 0;
}

.invoice-brand h2 {
    font-size: 19px;
}

.invoice-brand p,
.invoice-title span {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
}

.invoice-title {
    text-align: left;
}

.invoice-title strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
}

.invoice-meta-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #cfd6dc;
    border-top: 0;
}

.invoice-meta-strip div {
    padding: 7px 9px;
    border-inline-start: 1px solid #cfd6dc;
}

.invoice-meta-strip div:first-child {
    border-inline-start: 0;
}

.invoice-meta-strip span,
.invoice-grid span,
.amount-words span {
    display: block;
    color: #64707a;
    font-size: 10px;
    font-weight: 800;
}

.invoice-meta-strip strong,
.invoice-grid strong,
.amount-words strong {
    font-size: 12px;
}

.invoice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 8px 0;
    border: 1px solid #cfd6dc;
}

.invoice-grid div,
.amount-words {
    border: 0;
    border-inline-start: 1px solid #cfd6dc;
    border-radius: 0;
    background: #fff;
}

.invoice-grid div:first-child {
    border-inline-start: 0;
}

.invoice-table {
    min-width: 0;
    margin: 8px 0;
    border: 1px solid #aeb8c2;
}

.invoice-table th,
.invoice-table td {
    padding: 6px 8px;
    border: 1px solid #cfd6dc;
    font-size: 11px;
}

.invoice-table th {
    background: #eef2f4;
    color: #111827;
}

.invoice-table tfoot th,
.invoice-table tfoot td {
    background: #f8faf9;
    font-weight: 800;
}

.invoice-table .money strong,
.invoice-table .money span {
    font-size: 11px;
}

.amount-words {
    margin: 8px 0;
    border: 1px solid #cfd6dc;
}

.barcode-row {
    padding-top: 3px;
}

.barcode-row img {
    max-width: 230px;
    height: 34px;
}

.barcode-row small {
    max-width: 56%;
    overflow-wrap: anywhere;
    color: #64707a;
    font-size: 8px;
}

.signature-box {
    min-height: 30px;
    width: 130px;
    border-radius: 8px;
    font-size: 11px;
}

.invoice-foot {
    margin-top: 6px;
}

.invoice-foot p {
    margin: 0;
    color: #64707a;
    font-size: 10px;
}

.paid-stamp {
    top: 39mm;
    left: 24mm;
    border-color: rgba(209, 67, 67, .54);
    color: rgba(209, 67, 67, .48);
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        padding: 14px;
    }

    .brand {
        padding-bottom: 12px;
    }

    .nav-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-panel {
        padding: 16px;
    }

    .topbar {
        margin: -16px -16px 16px;
        padding: 14px 16px;
    }

    .metric-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-panel {
        align-items: stretch;
    }

    .invoice-sheet {
        width: 100%;
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: 82px;
    }

    .user-chip {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar-panel,
    .search-form,
    .form-actions {
        width: 100%;
    }

    .btn,
    .toolbar-panel > a,
    .toolbar-panel > button,
    .search-form button {
        width: 100%;
    }

    .responsive-table tr {
        box-shadow: none;
        border-color: var(--line);
    }

    .responsive-table td {
        grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    }

    .responsive-table td,
    .responsive-table td * {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .bottom-nav {
        inset-inline: 8px;
        bottom: 8px;
        border-radius: 8px;
        box-shadow: 0 10px 28px rgba(17, 24, 39, .18);
    }

    .bottom-nav a.active,
    .bottom-nav a[aria-current="page"] {
        background: var(--teal);
        color: #fff;
    }
}

@media (max-width: 560px) {
    .main-panel,
    .sidebar {
        padding: 12px;
    }

    .topbar {
        margin: -12px -12px 14px;
        padding: 13px 12px;
    }

    .metric-card,
    .panel {
        padding: 12px;
    }

    .invoice-copy {
        padding: 14px;
    }

    .invoice-brand-bar,
    .invoice-meta-strip,
    .invoice-grid {
        grid-template-columns: 1fr;
    }

    .invoice-brand-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .invoice-title {
        text-align: right;
    }
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    html,
    body {
        width: 210mm;
        min-height: 297mm;
        background: #fff !important;
    }

    .bottom-nav,
    .security-strip {
        display: none !important;
    }

    body.print-invoice-mode * {
        visibility: hidden !important;
    }

    body.print-invoice-mode .invoice-sheet,
    body.print-invoice-mode .invoice-sheet * {
        visibility: visible !important;
    }

    body.print-invoice-mode .invoice-sheet {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-width: none !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    body.print-invoice-mode .invoice-copy {
        height: 148.5mm !important;
        padding: 8mm 10mm !important;
        border-bottom: 1px dashed #7a8490 !important;
        page-break-inside: avoid !important;
        overflow: hidden !important;
    }

    body.print-invoice-mode .invoice-copy:last-child {
        border-bottom: 0 !important;
    }

    body.print-invoice-mode .invoice-table,
    body.print-invoice-mode .invoice-table.responsive-table {
        min-width: 0 !important;
        border-collapse: collapse !important;
    }

    body.print-invoice-mode .invoice-table thead {
        display: table-header-group !important;
    }

    body.print-invoice-mode .invoice-table tr {
        display: table-row !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.print-invoice-mode .invoice-table th,
    body.print-invoice-mode .invoice-table td {
        display: table-cell !important;
        padding: 5px 7px !important;
        border: 1px solid #cfd6dc !important;
    }

    body.print-invoice-mode .invoice-table td::before {
        content: none !important;
    }

    body.print-panel-mode * {
        visibility: hidden !important;
    }

    body.print-panel-mode .print-panel,
    body.print-panel-mode .print-panel * {
        visibility: visible !important;
    }

    body.print-panel-mode .print-panel {
        position: absolute !important;
        inset: 0 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 10mm !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    body.print-panel-mode .table-wrap {
        border: 0 !important;
        overflow: visible !important;
    }

    body.print-panel-mode table {
        min-width: 0 !important;
        border-collapse: collapse !important;
        font-size: 9pt !important;
    }

    body.print-panel-mode th,
    body.print-panel-mode td {
        padding: 5px !important;
        border: 1px solid #cfd6dc !important;
    }

    body.print-panel-mode .actions-cell,
    body.print-panel-mode .panel-header form,
    body.print-panel-mode .panel-header button {
        display: none !important;
    }
}

.brand-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(20, 88, 76, .12);
}

.brand strong {
    line-height: 1.25;
}

.table-link {
    color: var(--teal);
    font-weight: 800;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) repeat(3, minmax(180px, .6fr));
    gap: 14px;
    align-items: stretch;
    margin-bottom: 16px;
}

.profile-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.profile-card .summary-list {
    grid-column: 1 / -1;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 8px;
    background: #edf8f1;
    color: var(--teal);
    font-size: 28px;
    font-weight: 800;
}

.settings-logo-preview {
    width: 108px;
    height: 108px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--line);
}

.color-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-inline-end: 8px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 50%;
    vertical-align: middle;
}

.stack-list,
.ledger-mini,
.ledger-list {
    display: grid;
    gap: 10px;
}

.stack-row,
.ledger-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.ledger-mini-row strong,
.ledger-mini-row span {
    display: block;
}

.ledger-mini-row span {
    color: var(--muted);
    font-size: 12px;
}

.ledger-entry {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.ledger-entry > header,
.ledger-entry > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.ledger-entry > header {
    background: #f6faf7;
    border-bottom: 1px solid var(--line);
}

.ledger-entry > footer {
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--line);
}

.ledger-entry header span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.ledger-balance {
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.ledger-balance.ok {
    background: #ecfdf5;
    color: var(--green);
}

.ledger-balance.danger {
    background: #fef2f2;
    color: var(--red);
}

.invoice-sheet {
    --print-primary: var(--teal);
}

.invoice-brand-bar {
    background: var(--print-primary);
}

.invoice-logo {
    object-fit: cover;
}

.paid-stamp {
    z-index: 5;
    opacity: .34;
    background: rgba(255, 255, 255, .22);
    pointer-events: none;
}

.invoice-head,
.invoice-foot,
.barcode-row,
.invoice-brand-bar,
.invoice-meta-strip,
.invoice-grid,
.invoice-table,
.amount-words {
    position: relative;
    z-index: 2;
}

@media (max-width: 980px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .profile-card {
        grid-template-columns: 1fr;
    }

    .stack-row,
    .ledger-mini-row,
    .ledger-entry > header,
    .ledger-entry > footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    body.print-panel-mode .print-panel {
        position: static !important;
        inset: auto !important;
        display: block !important;
        width: 100% !important;
        margin: 0 0 6mm !important;
        padding: 6mm !important;
        page-break-inside: avoid !important;
    }

    body.print-panel-mode .main-panel {
        padding: 0 !important;
    }

    body.print-panel-mode .metric-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5mm !important;
    }

    body.print-panel-mode .metric-card,
    body.print-panel-mode .panel {
        border: 1px solid #d1d5db !important;
        box-shadow: none !important;
    }

    body.print-invoice-mode .paid-stamp {
        z-index: 5 !important;
        opacity: .34 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.print-invoice-mode .invoice-brand-bar {
        background: var(--print-primary) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Premium product system v3: Schoolfin RTL finance workstation. */
:root {
    --sf-ink: #17211f;
    --sf-ink-2: #263833;
    --sf-muted: #697773;
    --sf-soft: #eef5f2;
    --sf-paper: #f3f7f5;
    --sf-panel: #ffffff;
    --sf-panel-tint: #fbfdfc;
    --sf-line: #dce7e2;
    --sf-line-strong: #c7d6cf;
    --sf-teal: #0f766e;
    --sf-emerald: #18a06d;
    --sf-mint: #b6ed8f;
    --sf-indigo: #4f46e5;
    --sf-purple: #805ad5;
    --sf-amber: #f59e0b;
    --sf-coral: #e2574c;
    --sf-slate: #1f2937;
    --sf-sidebar: #151d1b;
    --sf-sidebar-2: #20342e;
    --radius-shell: 28px;
    --radius-card: 16px;
    --radius-control: 10px;
    --shadow-float: 0 28px 80px rgba(15, 23, 42, .13);
    --shadow-card: 0 14px 38px rgba(15, 23, 42, .08);
    --shadow-soft: 0 7px 22px rgba(15, 23, 42, .07);
    --focus-ring: 0 0 0 4px rgba(15, 118, 110, .16);
}

html {
    background: var(--sf-paper);
}

body {
    padding: 18px;
    color: var(--sf-ink);
    background:
        linear-gradient(125deg, rgba(24, 160, 109, .14), rgba(24, 160, 109, 0) 31%),
        linear-gradient(245deg, rgba(79, 70, 229, .13), rgba(79, 70, 229, 0) 36%),
        linear-gradient(25deg, rgba(245, 158, 11, .13), rgba(245, 158, 11, 0) 30%),
        var(--sf-paper);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 118, 110, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, transparent, #000 10%, #000 70%, transparent);
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1760px;
    min-height: calc(100vh - 36px);
    margin: 0 auto;
    grid-template-columns: 270px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius-shell);
    background: rgba(255, 255, 255, .68);
    box-shadow: var(--shadow-float);
}

.sidebar {
    height: calc(100vh - 36px);
    padding: 20px 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 34%),
        linear-gradient(160deg, var(--sf-sidebar), var(--sf-sidebar-2));
    border-inline-end: 1px solid rgba(255, 255, 255, .08);
}

.brand {
    gap: 12px;
    padding: 8px 8px 18px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.brand strong {
    color: #ffffff;
    font-size: 15px;
}

.brand small {
    color: rgba(236, 253, 245, .68);
}

.nav-item {
    position: relative;
    min-height: 46px;
    border-radius: 14px;
    color: rgba(244, 250, 247, .72);
    font-weight: 800;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    opacity: .86;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .09);
    color: #ffffff;
}

.nav-item.active,
.nav-item[aria-current="page"] {
    background: linear-gradient(135deg, #b6ed8f, #5ad39a);
    color: #10231c;
    box-shadow: 0 12px 28px rgba(90, 211, 154, .24);
}

.main-panel {
    min-width: 0;
    padding: 0 28px 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .28) 230px),
        rgba(248, 251, 250, .9);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    min-height: 86px;
    margin: 0 -28px 22px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(220, 231, 226, .82);
    backdrop-filter: blur(18px);
}

.topbar-main {
    display: grid;
    grid-template-columns: minmax(220px, .85fr) minmax(260px, 1fr);
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.page-heading {
    min-width: 0;
}

h1 {
    font-size: 30px;
    line-height: 1.22;
    letter-spacing: 0;
}

h2 {
    font-size: 19px;
    line-height: 1.32;
    letter-spacing: 0;
}

.eyebrow,
.hero-kicker {
    color: var(--sf-teal);
    font-size: 12px;
    font-weight: 900;
}

.page-note {
    color: var(--sf-muted);
    line-height: 1.75;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--sf-line);
    border-radius: 999px;
    background: #f6faf8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.top-search .icon {
    color: var(--sf-muted);
}

.top-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--sf-ink);
    font-size: 14px;
}

.top-search:focus-within,
.form-control:focus,
.search-form input:focus,
.login-form input:focus {
    border-color: rgba(15, 118, 110, .58);
    box-shadow: var(--focus-ring);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-action,
.icon-button,
.time-chip,
.filter-chip,
.audit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid var(--sf-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--sf-ink-2);
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}

.quick-action {
    border-color: rgba(24, 160, 109, .28);
    background: linear-gradient(135deg, var(--sf-teal), var(--sf-emerald));
    color: #ffffff;
}

.icon-button {
    width: 42px;
    padding: 0;
    color: var(--sf-teal);
}

.time-chip {
    background: #f6faf8;
    color: var(--sf-muted);
    white-space: nowrap;
}

.user-chip {
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.security-strip {
    gap: 9px;
    margin: 0 0 20px;
}

.security-strip span {
    border-radius: 999px;
    background: rgba(236, 253, 245, .78);
    color: var(--sf-teal);
}

.command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.command-actions,
.component-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.segmented {
    border-radius: 999px;
    border-color: var(--sf-line);
    padding: 4px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.segmented a {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: var(--sf-muted);
}

.segmented a.active,
.segmented a:hover {
    background: var(--sf-slate);
    color: #ffffff;
}

.btn,
.user-chip button,
.login-form button {
    border-radius: var(--radius-control);
    min-height: 44px;
    letter-spacing: 0;
    box-shadow: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--sf-teal), var(--sf-emerald));
    color: #ffffff;
}

.btn.secondary {
    background: linear-gradient(135deg, var(--sf-indigo), #6d5dfc);
    color: #ffffff;
}

.btn.success {
    background: linear-gradient(135deg, var(--sf-emerald), #65c98d);
    color: #ffffff;
}

.btn.ghost {
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--sf-line);
    color: var(--sf-ink);
}

.btn.danger,
.destructive {
    background: linear-gradient(135deg, var(--sf-coral), #f97316);
    color: #ffffff;
}

.btn:hover,
.quick-action:hover,
.icon-button:hover,
.filter-chip:hover,
.user-chip button:hover,
.login-form button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.btn:focus-visible,
.quick-action:focus-visible,
.icon-button:focus-visible,
.nav-item:focus-visible,
.filter-chip:focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
}

.panel,
.metric-card,
.login-card,
.invoice-paper-card,
.style-hero,
.hero-card,
.payment-composer-card {
    border: 1px solid rgba(220, 231, 226, .9);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-card);
}

.panel,
.metric-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(251, 253, 252, .96)),
        #ffffff;
}

.panel:hover,
.metric-card:hover,
.invoice-row:hover,
.class-collection-card:hover,
.debtor-row:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(15, 118, 110, .2);
    box-shadow: 0 20px 48px rgba(15, 23, 42, .1);
}

.panel-header {
    border-bottom-color: rgba(220, 231, 226, .86);
}

.panel-header a,
.panel-header button {
    border-radius: 999px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .62fr);
    gap: 16px;
    margin-bottom: 18px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 172px;
    align-items: center;
    gap: 18px;
    min-height: 228px;
    padding: 28px;
    background:
        linear-gradient(135deg, #11231f, #143e38 58%, #1d5a4e);
    color: #ffffff;
}

.hero-card::after,
.payment-composer-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 26%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 15px);
    opacity: .55;
}

.hero-copy,
.hero-ring,
.payment-composer-card > * {
    position: relative;
    z-index: 1;
}

.hero-copy h2 {
    max-width: 650px;
    margin: 10px 0;
    color: #ffffff;
    font-size: 34px;
}

.hero-copy p,
.payment-composer-card p {
    max-width: 620px;
    color: rgba(255, 255, 255, .72);
    line-height: 1.8;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #b6ed8f;
    padding: 7px 11px;
}

.hero-ring {
    display: grid;
    place-items: center;
    width: 154px;
    height: 154px;
    justify-self: end;
    border-radius: 50%;
    background:
        radial-gradient(circle, #14342d 0 55%, transparent 56%),
        conic-gradient(#b6ed8f calc(var(--value) * 1%), rgba(255, 255, 255, .18) 0);
}

.hero-ring strong,
.hero-ring span {
    grid-area: 1 / 1;
    text-align: center;
}

.hero-ring strong {
    margin-top: -12px;
    font-size: 34px;
}

.hero-ring span {
    margin-top: 48px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 800;
}

.payment-composer-card {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: space-between;
    min-height: 228px;
    padding: 24px;
    background: linear-gradient(145deg, #ffffff, #f1fbf6);
}

.payment-composer-card span {
    color: var(--sf-teal);
    font-size: 12px;
    font-weight: 900;
}

.payment-composer-card strong {
    color: var(--sf-ink);
    font-size: 25px;
}

.payment-composer-card p {
    color: var(--sf-muted);
}

.premium-kpis {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 14px;
}

.metric-card {
    min-height: 142px;
    padding: 20px;
    overflow: hidden;
}

.metric-card::before {
    width: 5px;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -18px -24px auto;
    width: 120px;
    height: 82px;
    border-radius: 38px;
    background: rgba(15, 118, 110, .07);
    transform: rotate(-18deg);
}

.metric-card.credit::before,
.metric-card.credit::after {
    background-color: var(--sf-emerald);
}

.metric-card.credit::after {
    background: rgba(24, 160, 109, .09);
}

.metric-card.debit::before {
    background: var(--sf-coral);
}

.metric-card.debit::after {
    background: rgba(226, 87, 76, .09);
}

.metric-card.profit::before {
    background: var(--sf-amber);
}

.metric-card.profit::after {
    background: rgba(245, 158, 11, .12);
}

.metric-card.indigo::before {
    background: var(--sf-indigo);
}

.metric-card.indigo::after {
    background: rgba(79, 70, 229, .1);
}

.metric-card.purple::before {
    background: var(--sf-purple);
}

.metric-card.purple::after {
    background: rgba(128, 90, 213, .1);
}

.metric-card > span {
    color: var(--sf-muted);
}

.money strong,
.metric-card > strong {
    color: var(--sf-ink);
    font-size: 28px;
    line-height: 1.1;
}

.money span {
    color: var(--sf-muted);
}

.dashboard-grid,
.style-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.panel.wide {
    margin-bottom: 0;
}

.chart-card {
    min-height: 338px;
}

.cashflow-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(54px, 1fr));
    align-items: end;
    gap: 14px;
    min-height: 224px;
    padding: 18px 8px 2px;
    border-radius: 14px;
    background:
        repeating-linear-gradient(0deg, transparent 0 43px, rgba(105, 119, 115, .12) 44px),
        linear-gradient(180deg, #fbfdfc, #ffffff);
}

.cashflow-chart.demo {
    grid-template-columns: repeat(4, minmax(54px, 1fr));
}

.cashflow-month {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 10px;
    min-height: 190px;
    text-align: center;
}

.bar-pair {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 8px;
    height: 160px;
}

.bar {
    width: 18px;
    min-height: 12px;
    border-radius: 999px 999px 6px 6px;
    transform-origin: bottom;
    animation: bar-rise .62s ease both;
}

.bar.income {
    background: linear-gradient(180deg, #8ee8a5, var(--sf-emerald));
}

.bar.expense {
    background: linear-gradient(180deg, #ffb0a9, var(--sf-coral));
}

.cashflow-month strong {
    color: var(--sf-muted);
    font-size: 12px;
}

.category-bars,
.class-collection-list,
.debtor-list,
.audit-timeline,
.skeleton-stack {
    display: grid;
    gap: 12px;
}

.category-row,
.class-collection-card,
.debtor-row,
.timeline-item {
    border: 1px solid var(--sf-line);
    border-radius: 14px;
    background: #ffffff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.category-row {
    display: grid;
    gap: 9px;
    padding: 13px;
}

.category-row > div,
.class-collection-card > div,
.debtor-row {
    min-width: 0;
}

.progress-track {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f0;
}

.progress-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sf-teal), var(--sf-mint));
    animation: progress-in .6s ease both;
}

.class-collection-card {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(140px, auto) minmax(140px, auto);
    gap: 12px;
    align-items: center;
    padding: 14px;
}

.class-collection-card .progress-track {
    grid-column: 1 / -1;
}

.class-collection-card strong,
.debtor-row strong,
.timeline-item strong,
.paper-head strong {
    color: var(--sf-ink);
}

.class-collection-card span,
.class-money span,
.debtor-row small {
    color: var(--sf-muted);
    font-size: 12px;
    font-weight: 800;
}

.class-money {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.class-money .money strong,
.class-money .money span {
    font-size: 13px;
}

.debtor-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.debtor-row .money strong {
    font-size: 16px;
}

.premium-list .invoice-row {
    border-radius: 14px;
    padding: 13px;
    background: #ffffff;
}

.premium-list .invoice-row > div {
    min-width: 0;
}

.premium-list .invoice-row strong,
.premium-list .invoice-row span {
    overflow-wrap: anywhere;
}

.audit-timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--sf-emerald);
    box-shadow: 0 0 0 5px rgba(24, 160, 109, .14);
}

.timeline-item p {
    margin: 4px 0 2px;
    color: var(--sf-muted);
    line-height: 1.55;
}

.timeline-item small {
    color: var(--sf-muted);
    font-weight: 800;
}

.premium-table-wrap {
    border-radius: var(--radius-card);
    border-color: var(--sf-line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.premium-table-wrap table {
    min-width: 760px;
}

.premium-table-wrap th {
    background: #f6faf8;
    color: #52625d;
}

.premium-table-wrap td,
.premium-table-wrap th {
    padding: 15px 14px;
}

.person-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.avatar.fallback {
    background: linear-gradient(135deg, #ecfdf5, #dff7e8);
    color: var(--sf-teal);
}

.badge.warning {
    background: #fff7ed;
    color: #c46c05;
}

.badge.audit {
    background: #eef2ff;
    color: var(--sf-indigo);
}

.badge.ok {
    background: #ecfdf5;
    color: var(--sf-emerald);
}

.badge.danger {
    background: #fff1f0;
    color: var(--sf-coral);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 24px;
    border: 1px dashed var(--sf-line-strong);
    border-radius: var(--radius-card);
    background: #fbfdfc;
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #ecfdf5;
    color: var(--sf-teal);
    font-size: 24px;
    font-weight: 900;
}

.premium-empty {
    min-height: 234px;
}

.form-control,
.search-form input,
.login-form input,
select,
textarea {
    border-radius: var(--radius-control);
}

.field span {
    font-weight: 900;
}

.summary-banner {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5, #f7fff9);
    color: var(--sf-teal);
    font-weight: 900;
}

.summary-banner span {
    color: var(--sf-muted);
    font-size: 13px;
}

.style-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 26px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(79, 70, 229, .06)),
        #ffffff;
}

.style-hero h2 {
    margin: 10px 0;
    font-size: 31px;
}

.style-hero p {
    max-width: 720px;
    color: var(--sf-muted);
    line-height: 1.8;
}

.brand-preview-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
    padding: 14px;
    border: 1px solid var(--sf-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .74);
}

.brand-preview-card strong,
.brand-preview-card span {
    display: block;
}

.brand-preview-card span {
    color: var(--sf-muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.token-chip {
    display: grid;
    place-items: center;
    min-height: 72px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}

.token-chip.emerald {
    background: var(--sf-emerald);
}

.token-chip.teal {
    background: var(--sf-teal);
}

.token-chip.indigo {
    background: var(--sf-indigo);
}

.token-chip.amber {
    background: var(--sf-amber);
}

.token-chip.purple {
    background: var(--sf-purple);
}

.token-chip.coral {
    background: var(--sf-coral);
}

.type-scale {
    display: grid;
    gap: 8px;
}

.type-scale h1,
.type-scale h2,
.type-scale p,
.type-scale small {
    margin: 0;
}

.type-scale small {
    color: var(--sf-muted);
    font-weight: 800;
}

.filter-chip.active {
    background: #17211f;
    color: #ffffff;
    border-color: #17211f;
}

.audit-badge {
    justify-content: flex-start;
    width: fit-content;
    margin-top: 12px;
    background: #f6faf8;
}

.invoice-paper-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    padding: 22px;
    background:
        linear-gradient(180deg, #ffffff, #f8faf9);
}

.invoice-paper-card::before {
    content: "";
    position: absolute;
    inset-inline: 22px;
    top: 76px;
    border-top: 1px dashed var(--sf-line-strong);
}

.paper-head,
.paper-signatures {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.paper-head span,
.paper-body span,
.paper-signatures span {
    color: var(--sf-muted);
    font-size: 12px;
    font-weight: 900;
}

.paper-body {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 30px 0;
}

.paper-body > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    background: #ffffff;
}

.paper-body p {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--sf-line);
    border-radius: 12px;
    color: var(--sf-ink);
    font-weight: 900;
}

.stamp-preview {
    position: absolute;
    inset-inline-end: 24px;
    top: 68px;
    transform: rotate(-14deg);
    border: 3px solid rgba(226, 87, 76, .42);
    border-radius: 12px;
    color: rgba(226, 87, 76, .52) !important;
    padding: 4px 18px;
    font-size: 31px !important;
}

.paper-signatures span {
    display: grid;
    place-items: center;
    width: 48%;
    min-height: 54px;
    border: 1px dashed var(--sf-line-strong);
    border-radius: 12px;
}

.skeleton-line {
    display: block;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #edf2f0, #ffffff, #edf2f0);
    background-size: 220% 100%;
    animation: shimmer 1.2s linear infinite;
}

.skeleton-line.wide {
    width: 100%;
}

.skeleton-line:not(.wide):not(.short) {
    width: 74%;
}

.skeleton-line.short {
    width: 44%;
}

.login-body {
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(125deg, rgba(24, 160, 109, .16), rgba(24, 160, 109, 0) 36%),
        linear-gradient(245deg, rgba(79, 70, 229, .14), rgba(79, 70, 229, 0) 42%),
        linear-gradient(20deg, rgba(245, 158, 11, .14), rgba(245, 158, 11, 0) 34%),
        var(--sf-paper);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .58fr);
    width: min(1120px, 100%);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 30px;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--shadow-float);
}

.login-hero {
    display: grid;
    align-content: space-between;
    min-height: 100%;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(17, 35, 31, .95), rgba(20, 62, 56, .94)),
        #11231f;
    color: #ffffff;
}

.login-hero .brand {
    border-bottom: 0;
}

.login-hero-copy h1 {
    max-width: 620px;
    margin: 12px 0;
    color: #ffffff;
    font-size: 38px;
}

.login-hero-copy p {
    max-width: 590px;
    color: rgba(255, 255, 255, .72);
    line-height: 1.9;
}

.login-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.login-trust-grid span {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    padding: 12px;
    color: rgba(255, 255, 255, .82);
    font-weight: 900;
    text-align: center;
}

.login-card {
    display: grid;
    align-content: center;
    width: auto;
    padding: 38px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.login-card-head h2 {
    margin: 10px 0 6px;
    font-size: 29px;
}

.login-card-head p {
    color: var(--sf-muted);
}

.login-form button {
    background: linear-gradient(135deg, var(--sf-teal), var(--sf-emerald));
}

@keyframes bar-rise {
    from {
        transform: scaleY(.18);
        opacity: .35;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes progress-in {
    from {
        transform: scaleX(.18);
        transform-origin: right;
    }
    to {
        transform: scaleX(1);
        transform-origin: right;
    }
}

@keyframes shimmer {
    to {
        background-position: -220% 0;
    }
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .topbar-main {
        grid-column: 1 / -1;
    }

    .user-chip {
        justify-self: end;
    }

    .premium-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero,
    .dashboard-grid,
    .style-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    body {
        padding: 0;
    }

    body::before {
        display: none;
    }

    .app-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sidebar {
        height: auto;
        border-radius: 0;
    }

    .main-panel {
        padding: 0 16px 96px;
    }

    .topbar {
        position: relative;
        grid-template-columns: 1fr;
        margin: 0 -16px 18px;
        padding: 14px 16px;
    }

    .topbar-main {
        grid-template-columns: 1fr;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .topbar-actions > * {
        flex: 1 1 auto;
    }

    .brand strong {
        color: #ffffff;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-ring {
        justify-self: start;
    }

    .class-collection-card {
        grid-template-columns: 1fr;
    }

    .class-money {
        justify-items: start;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-hero {
        min-height: 420px;
    }
}

@media (max-width: 640px) {
    .main-panel {
        padding-inline: 12px;
    }

    .topbar {
        margin-inline: -12px;
        padding-inline: 12px;
    }

    h1 {
        font-size: 23px;
    }

    h2 {
        font-size: 17px;
    }

    .command-bar,
    .command-actions,
    .component-row {
        align-items: stretch;
        flex-direction: column;
    }

    .command-bar .btn,
    .command-actions .btn,
    .component-row .btn,
    .quick-action,
    .time-chip {
        width: 100%;
    }

    .segmented {
        display: grid;
        width: 100%;
        border-radius: 16px;
    }

    .segmented a {
        text-align: center;
    }

    .dashboard-hero,
    .dashboard-grid,
    .style-grid {
        gap: 12px;
    }

    .hero-card,
    .payment-composer-card,
    .style-hero,
    .panel,
    .metric-card,
    .invoice-paper-card {
        border-radius: 14px;
        padding: 16px;
    }

    .hero-copy h2 {
        font-size: 25px;
    }

    .hero-ring {
        width: 132px;
        height: 132px;
    }

    .premium-kpis,
    .metric-grid,
    .token-grid,
    .style-hero,
    .brand-preview-card {
        grid-template-columns: 1fr;
    }

    .cashflow-chart {
        grid-template-columns: repeat(3, minmax(64px, 1fr));
        overflow-x: auto;
    }

    .debtor-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .debtor-row .money {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .login-body {
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-hero,
    .login-card {
        padding: 24px;
    }

    .login-hero-copy h1 {
        font-size: 28px;
    }

    .login-trust-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        padding: 0 !important;
    }

    body::before {
        display: none !important;
    }

    .app-shell {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-width: none !important;
        min-height: 0 !important;
    }
}
