@font-face {
    font-family: "JannaLT";
    src: url("../fonts/JannaLT-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JannaLT";
    src: url("../fonts/JannaLT-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --fl-bg: #f4fbff;
    --fl-bg-mid: #eaf8fb;
    --fl-bg-deep: #ffffff;
    --fl-sidebar: rgba(255, 255, 255, .82);
    --fl-card: rgba(255, 255, 255, .76);
    --fl-card-strong: rgba(255, 255, 255, .92);
    --fl-text: #102131;
    --fl-soft: #24404f;
    --fl-muted: #6a7c86;
    --fl-border: rgba(20, 146, 166, .16);
    --fl-border-strong: rgba(32, 214, 227, .36);
    --fl-blue: #149fc0;
    --fl-teal: #16bfd0;
    --fl-cyan-soft: #7de3ea;
    --fl-purple: #7c5cff;
    --fl-amber: #d88a12;
    --fl-red: #d94b4b;
    --fl-shadow: 0 22px 70px rgba(4, 32, 48, .10);
    --fl-cyan-shadow: 0 18px 52px rgba(32, 214, 227, .16);
    --fl-radius: 8px;
}

* {
    letter-spacing: 0;
}

body {
    font-family: "JannaLT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: white;
    color: var(--fl-text);
    min-height: 100vh;
}

.btn {
    border-radius: 8px;
    font-weight: 300;
}

.btn-primary {
    background: linear-gradient(135deg, var(--fl-blue), var(--fl-teal));
    border: 0;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .16);
}

.btn-light {
    background: #f4f7fb;
    border-color: #e3ebf6;
}

.form-label {
    font-size: 13px;
    font-weight: bold;
    color: black;
}

.form-control,
.form-select,
.input-group-text {
    border-color: var(--fl-border);
    border-radius: 8px;
    font-size: 13px;
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    border-color: #7aa7ff;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

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

.sidebar {
    background: black;
    border-inline-end: 0;
    padding: 22px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 6px 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    min-width: 0;
    padding: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: #082533;
    box-shadow: 0 10px 24px rgba(15, 159, 143, .22);
    flex: 0 0 42px;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

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

.brand small {
    color: #a5a5a5;
    font-size: 12px;
}

.side-nav {
    display: grid;
    gap: 7px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    color: #a5a5a5;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
}

.side-nav a:hover {
    background: #383838;
    color: #d6d6d6;
}

.side-nav a.active {
    background: linear-gradient(135deg, #2563eb6b, #0f9f8f70);
    color: white;
}

.main {
    min-width: 0;
}

.sidebar-collapse {
    background: #151515;
    border-color: #383838;
    color: #d6d6d6;
    flex: 0 0 42px;
}

.sidebar-collapse:hover,
.sidebar-collapse:focus {
    background: #383838;
    border-color: #383838;
    color: white;
}

.modal-title {
    font-weight: 700;
}

.topbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    background: rgba(246, 248, 251, .84);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(223, 231, 241, .8);
    position: sticky;
    top: 0;
    z-index: 20;
}

@media (min-width: 992px) {
    .app-shell.sidebar-collapsed {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .app-shell.sidebar-collapsed .sidebar {
        padding-inline: 14px;
    }

    .app-shell.sidebar-collapsed .sidebar-head {
        align-items: center;
        flex-direction: column;
        gap: 10px;
        padding-inline: 0;
    }

    .app-shell.sidebar-collapsed .brand {
        justify-content: center;
    }

    .app-shell.sidebar-collapsed .brand > span:not(.brand-mark),
    .app-shell.sidebar-collapsed .side-nav a span {
        display: none;
    }

    .app-shell.sidebar-collapsed .side-nav a {
        justify-content: center;
        gap: 0;
        padding: 10px;
    }
}

.topbar-title span,
.content h1,
.content-card h2 {
    font-weight: 700;
}

.topbar-title small {
    display: block;
    color: var(--fl-muted);
    font-size: 13px;
}

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

.topbar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--fl-border);
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}

.content {
    padding: 20px;
}

.card-head p {
    color: var(--fl-muted);
    margin: 4px 0 0;
}

.dashboard-filter {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dashboard-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-filter-form .form-control {
    min-width: 160px;
}

.dashboard-filter-form .btn {
    min-height: 42px;
}

.dashboard-filter-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--fl-muted);
    font-size: 13px;
}

.dashboard-filter-summary span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--fl-border);
    border-radius: 8px;
    background: #fff;
}

.dashboard-filter-summary strong {
    color: var(--fl-text);
}

.dashboard-panel {
    height: 100%;
    padding: 16px;
    border: 1px solid var(--fl-border);
    border-radius: 8px;
    background: #fff;
}

.chart-wrap {
    position: relative;
    height: 300px;
}

.chart-wrap-sm {
    height: 260px;
}

.stat-card,
.content-card {
    background: var(--fl-card);
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    box-shadow: var(--fl-shadow);
}

.stat-card {
    min-height: 116px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.stat-card span {
    color: var(--fl-muted);
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 30px;
    line-height: 1;
}

.stat-card i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 23px;
}

.tone-blue i { background: rgba(37, 99, 235, .1); color: var(--fl-blue); }
.tone-green i { background: rgba(15, 159, 143, .12); color: var(--fl-teal); }
.tone-amber i { background: rgba(216, 138, 18, .14); color: var(--fl-amber); }
.tone-red i { background: rgba(217, 75, 75, .12); color: var(--fl-red); }

.content-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

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

.card-head h2 {
    font-size: 18px;
    margin: 0;
}

.activity-card {
    height: 100%;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-item strong,
.activity-item small {
    display: block;
}

.activity-item small {
    color: var(--fl-muted);
}

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

.table-toolbar .search-box {
    width: min(360px, 100%);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-inline-start: auto;
}

.toolbar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    color: white;
    background: black;
    font-size: 13px;
    border-bottom-color: black;
    white-space: nowrap;
}

.table tbody td {
    border-top-color: #edf2f7;
    color: #233047;
    font-size: 13px;
    vertical-align: middle;
}

.table-actions .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.table-foot {
    border-top: 0;
    padding-top: 0;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    direction: ltr;
}

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

.limit-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.limit-control .form-select {
    width: 84px;
    min-height: 34px;
}

.tax-report-shell {
    display: grid;
    gap: 18px;
}

.tax-report-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .65fr) minmax(150px, .65fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    background: rgba(244, 251, 255, .86);
    border: 1px solid rgba(20, 146, 166, .14);
    border-radius: 8px;
}

.tax-report-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.tax-report-print {
    display: grid;
    gap: 18px;
}

.tax-report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    color: #06121f;
    background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(232, 250, 252, .78));
    border: 1px solid rgba(20, 146, 166, .16);
    border-radius: 8px;
}

.tax-report-head h2 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 800;
}

.tax-report-head p,
.tax-report-period small {
    margin: 0;
    color: var(--fl-muted);
}

.tax-report-period {
    display: grid;
    gap: 4px;
    text-align: end;
}

.tax-report-period span {
    font-weight: 800;
    color: var(--fl-text);
}

.tax-report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.tax-report-summary div {
    padding: 14px;
    background: rgba(255, 255, 255, .84);
    border: 1px solid rgba(20, 146, 166, .14);
    border-radius: 8px;
}

.tax-report-summary span {
    display: block;
    margin-bottom: 4px;
    color: var(--fl-muted);
    font-size: 12px;
    font-weight: 100;
    text-transform: uppercase;
}

.tax-report-summary strong {
    color: var(--fl-text);
    font-size: 18px;
}

.tax-report-table tfoot th {
    color: #06121f;
    background: rgba(32, 214, 227, .12);
    border-top: 2px solid rgba(20, 146, 166, .24);
}

.erpnext-wizard-shell {
    display: grid;
    gap: 18px;
}

.integrations-shell {
    display: grid;
    gap: 18px;
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.integration-tile {
    min-height: 184px;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    padding: 18px;
    text-align: start;
    background: linear-gradient(135deg, rgba(244, 251, 255, .96), rgba(255, 255, 255, .98));
    border: 1px solid rgba(20, 146, 166, .18);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(4, 32, 48, .08);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.integration-tile:hover,
.integration-tile:focus {
    background: linear-gradient(135deg, rgba(235, 252, 255, .98), rgba(255, 255, 255, 1));
    border-color: rgba(22, 191, 208, .38);
    box-shadow: 0 22px 52px rgba(4, 32, 48, .12), 0 10px 28px rgba(22, 191, 208, .12);
    outline: 0;
    transform: translateY(-2px);
}

.integration-card-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.integration-card-icon {
    flex: 0 0 52px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #06121f, #16bfd0);
    border-radius: 8px;
    font-size: 24px;
    box-shadow: 0 14px 30px rgba(22, 191, 208, .18);
}

.integration-card-icon img {
    display: block;
    width: 34px;
    height: 34px;
}

.integration-card-icon-image {
    background: linear-gradient(135deg, #0b2f45, #0f9fbc);
}

.integration-card-copy {
    min-width: 0;
}

.integration-card-copy span {
    display: block;
    margin-bottom: 2px;
    color: var(--fl-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.integration-tile h2 {
    margin: 0 0 4px;
    color: var(--fl-text);
    font-size: 18px;
    font-weight: 800;
}

.integration-tile p {
    margin: 0;
    color: var(--fl-muted);
    font-size: 13px;
}

.erpnext-wizard-panel,
.erpnext-wizard-output {
    padding: 18px;
    background: rgba(244, 251, 255, .86);
    border: 1px solid rgba(20, 146, 166, .14);
    border-radius: 8px;
}

.erpnext-wizard-head,
.erpnext-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.erpnext-wizard-head h2,
.erpnext-result-head h3 {
    margin: 0 0 4px;
    color: var(--fl-text);
    font-weight: 800;
}

.erpnext-wizard-head p,
.erpnext-result-head p,
.erpnext-wizard-empty span,
.erpnext-wizard-loading small {
    margin: 0;
    color: var(--fl-muted);
}

.erpnext-wizard-empty,
.erpnext-wizard-loading {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    color: var(--fl-muted);
}

.erpnext-wizard-empty i {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #06121f, #16bfd0);
    border-radius: 8px;
    font-size: 26px;
}

.erpnext-wizard-empty strong,
.erpnext-wizard-loading strong {
    color: var(--fl-text);
}

.erpnext-steps {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.erpnext-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(20, 146, 166, .14);
    border-radius: 8px;
}

.erpnext-step i {
    font-size: 20px;
}

.erpnext-step.is-ok i {
    color: var(--fl-green);
}

.erpnext-step.is-failed i {
    color: var(--fl-red);
}

.erpnext-step strong,
.erpnext-step span {
    display: block;
}

.erpnext-step strong {
    color: var(--fl-text);
}

.erpnext-step span {
    color: var(--fl-muted);
    font-size: 13px;
}

.erpnext-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.erpnext-summary-grid div {
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(20, 146, 166, .14);
    border-radius: 8px;
}

.erpnext-summary-grid span {
    display: block;
    margin-bottom: 4px;
    color: var(--fl-muted);
    font-size: 12px;
    font-weight: 100;
    text-transform: uppercase;
}

.erpnext-summary-grid strong {
    display: block;
    color: var(--fl-text);
    overflow-wrap: anywhere;
}

.badge {
    border-radius: 7px;
    font-weight: 100;
    font-size: 12px;
    text-transform: capitalize;
}

.invoice-type-badges {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.invoice-type-badges .badge {
    white-space: nowrap;
}

.modal-content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(17, 24, 39, .18);
    max-height: calc(100vh - 48px);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--fl-blue), var(--fl-teal));
    color: white;
    border-color: transparent;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: .9;
}

.modal-body {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}

.modal-footer {
    background: #efefef;
    border-color: #edf2f7;
}

.detail-list code {
    white-space: pre-wrap;
    color: #233047;
    background: #f4f7fb;
    border-radius: 6px;
    display: block;
    padding: 8px;
}

.invoice-detail {
    background: #f7fafc;
}

.invoice-detail-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(29, 78, 216, .08), rgba(20, 184, 166, .10));
    border: 1px solid #dfeaf6;
    margin-bottom: 16px;
}

.invoice-detail-hero > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.invoice-detail-hero h3 {
    margin: 8px 0 4px;
    font-size: 1.35rem;
    color: #172033;
    word-break: break-word;
}

.invoice-detail-hero p {
    margin: 0;
    color: #64748b;
}

.invoice-hero-total {
    min-width: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    border-left: 1px solid rgba(15, 23, 42, .10);
    padding-left: 18px;
}

.invoice-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.invoice-hero-qr {
    width: 92px;
    min-height: 92px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #06121f;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dbe8ef;
    border-radius: 8px;
}

.invoice-hero-qr:hover {
    color: #06121f;
    border-color: rgba(20, 191, 208, .55);
    box-shadow: 0 10px 24px rgba(20, 191, 208, .14);
}

.invoice-hero-qr img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.invoice-hero-qr span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.invoice-hero-qr-empty i {
    font-size: 34px;
    color: #94a3b8;
}

.invoice-hero-total span,
.invoice-meta-item span,
.invoice-total-grid span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.invoice-hero-total strong {
    color: #0f766e;
    font-size: 1.45rem;
}

.invoice-detail-tabs {
    margin-bottom: 14px;
}

.invoice-detail-tabs .nav-link {
    font-weight: 700;
    color: #475569;
}

.invoice-detail-tabs .nav-link.active {
    color: var(--fl-blue);
}

.invoice-detail-content {
    min-height: 260px;
}

.invoice-panel,
.invoice-qr-card {
    background: #fff;
    border: 1px solid #e6eef7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.invoice-panel h6 {
    margin-bottom: 14px;
    color: #172033;
    font-weight: 800;
}

.invoice-meta-grid,
.invoice-response {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.invoice-meta-item {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 10px;
    min-width: 0;
}

.invoice-meta-item strong {
    display: block;
    color: #172033;
    font-weight: 800;
    overflow-wrap: anywhere;
}

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

.invoice-total-grid div {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 12px;
}

.invoice-total-grid strong {
    display: block;
    color: #172033;
    font-size: 1.05rem;
}

.invoice-qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-height: 100%;
}

.invoice-qr-card img {
    width: min(100%, 260px);
    aspect-ratio: 1;
    object-fit: contain;
    padding: 12px;
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
}

.invoice-detail-table {
    border: 1px solid #edf2f7;
    border-radius: 8px;
}

.invoice-detail-table th {
    background: #f8fafc;
    color: #475569;
    font-size: .78rem;
    text-transform: uppercase;
}

.invoice-technical .accordion-item {
    border-color: #e6eef7;
}

.invoice-response-panel {
    margin-bottom: 14px;
}

.invoice-response-raw {
    margin-top: 14px;
}

.invoice-detail-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.invoice-raw-code,
.invoice-log-context {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #233047;
    background: #f4f7fb;
    border-radius: 6px;
    padding: 10px;
    font-size: .82rem;
}

.invoice-log-context {
    max-height: 140px;
    overflow: auto;
}

.empty-detail {
    width: 100%;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .invoice-detail-hero,
    .invoice-total-grid,
    .invoice-meta-grid,
    .invoice-response {
        grid-template-columns: 1fr;
    }

    .tax-report-filter,
    .tax-report-summary {
        grid-template-columns: 1fr;
    }

    .tax-report-head {
        display: grid;
    }

    .tax-report-period {
        text-align: start;
    }

    .erpnext-wizard-head,
    .erpnext-result-head {
        display: grid;
    }

    .erpnext-summary-grid {
        grid-template-columns: 1fr;
    }

    .invoice-detail-hero {
        display: grid;
    }

    .invoice-hero-actions {
        justify-content: flex-start;
    }

    .invoice-hero-total {
        align-items: flex-start;
        border-left: 0;
        border-top: 1px solid rgba(15, 23, 42, .10);
        padding-left: 0;
        padding-top: 14px;
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    body,
    .app-body,
    .main {
        background: #fff !important;
    }

    .sidebar,
    .topbar,
    .no-print,
    .modal,
    script {
        display: none !important;
    }

    .app-shell {
        display: block !important;
    }

    .main,
    .content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .tax-report-print,
    .tax-report-head,
    .stat-card,
    .tax-report-summary div,
    .table-responsive {
        box-shadow: none !important;
        background: #fff !important;
        border-color: #d7dde5 !important;
    }

    .tax-report-head {
        padding: 0 0 10px !important;
        border: 0 !important;
        border-bottom: 1px solid #d7dde5 !important;
    }

    .stat-card {
        min-height: auto;
        padding: 10px;
        break-inside: avoid;
    }

    .stat-card i {
        display: none;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table {
        font-size: 11px;
    }

    .table thead th {
        color: #000 !important;
        background: #e9edf3 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .badge {
        color: #000 !important;
        background: transparent !important;
        border: 1px solid #ccd3dc;
    }
}

.invoice-lines th,
.invoice-lines td {
    min-width: 116px;
}

.invoice-lines th:first-child,
.invoice-lines td:first-child {
    min-width: 220px;
}

.invoice-lines th:last-child,
.invoice-lines td:last-child {
    min-width: 46px;
    width: 46px;
}

.invoice-lines .form-control-sm {
    min-height: 36px;
}

.api-docs-selector {
    max-width: 520px;
}

.api-docs-modal-shell {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.api-docs-account {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 0 18px;
    border-bottom: 1px solid #edf2f7;
    margin-bottom: 18px;
}

.api-docs-account span,
.api-docs-account strong {
    display: block;
}

.docs-block {
    margin-bottom: 18px;
}

.copy-row {
    display: flex;
    gap: 10px;
}

.copy-row .code-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.copy-code {
    position: relative;
}

.copy-code .btn {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
}

.docs-block pre {
    direction: ltr;
    text-align: left;
    background: #101828;
    color: #d1e7ff;
    border-radius: 8px;
    padding: 16px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.docs-block pre code {
    color: inherit;
}

.select2-container--default .select2-selection--single {
    border-color: var(--fl-border);
    border-radius: 8px;
    min-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 13px;
    line-height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-results__option {
    font-size: 13px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.login-body {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(15, 159, 143, .1) 52%, rgba(216, 138, 18, .09)),
        #f6f8fb;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 460px);
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--fl-border);
    box-shadow: var(--fl-shadow);
    border-radius: 10px;
    padding: 30px;
}

.login-panel h1 {
    margin: 16px 0 4px;
    font-size: 28px;
    font-weight: 700;
}

.login-panel .brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 10px;
}

.login-panel p {
    color: var(--fl-muted);
    margin-bottom: 24px;
}

.login-lang {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

    .sidebar-collapse {
        display: none;
    }

    .sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: 280px;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    [dir="rtl"] .sidebar {
        transform: translateX(105%);
    }

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

    .topbar {
        padding: 0 16px;
        height: auto;
        min-height: 72px;
    }

    .content {
        padding: 20px;
    }

    .table-toolbar .search-box,
    .toolbar-actions,
    .toolbar-actions .btn {
        width: 100%;
    }

    .table-foot,
    .footer-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .api-docs-account {
        grid-template-columns: 1fr;
    }

    .copy-row {
        align-items: stretch;
        flex-direction: column;
    }

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

@media (max-width: 575.98px) {
    .topbar-title small,
    .user-pill span {
        display: none;
    }

    .topbar-actions {
        gap: 6px;
    }

    .content-card {
        padding: 0;
    }

    .dashboard-filter,
    .dashboard-filter-form,
    .dashboard-filter-form > div,
    .dashboard-filter-form .btn,
    .dashboard-filter-summary {
        width: 100%;
    }

    .dashboard-filter-form .form-control {
        width: 100%;
    }

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

    .integration-tile {
        min-height: 150px;
    }
}

/* Premium light enterprise theme */
body {
    background:
        radial-gradient(circle at 14% 0%, rgba(32, 214, 227, .20), transparent 34%),
        radial-gradient(circle at 92% 6%, rgba(124, 92, 255, .12), transparent 30%),
        linear-gradient(135deg, #ffffff, #f4fbff 48%, #eaf8fb);
    color: var(--fl-text);
}

body::before {
    background:
        linear-gradient(rgba(6, 44, 58, .026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 44, 58, .026) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .42), transparent 78%);
}

a {
    color: #0d95aa;
}

a:hover {
    color: #065f6f;
}

.main {
    background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(244, 251, 255, .18));
}

.sidebar {
    background:
        radial-gradient(circle at 22% 0%, rgba(32, 214, 227, .16), transparent 32%),
        rgba(255, 255, 255, .82);
    border-inline-end: 1px solid rgba(20, 146, 166, .14);
    box-shadow: 18px 0 52px rgba(4, 32, 48, .08);
}

.brand,
.topbar-title span,
.content h1,
.content-card h2,
.card-head h2,
.modal-title {
    color: var(--fl-text);
}

.brand-mark {
    background: #082533;
    box-shadow: 0 14px 32px rgba(22, 191, 208, .20);
}

.brand small,
.topbar-title small,
.card-head p,
.activity-item small,
.dashboard-filter-summary,
.text-muted {
    color: var(--fl-muted) !important;
}

.side-nav a {
    color: #49616d;
    border-color: transparent;
}

.side-nav a:hover {
    color: #071b2a;
    background: rgba(32, 214, 227, .10);
    border-color: rgba(32, 214, 227, .22);
}

.side-nav a.active {
    color: #06121f;
    background:
        linear-gradient(135deg, rgba(32, 214, 227, .18), rgba(124, 92, 255, .08)),
        rgba(255, 255, 255, .72);
    border-color: rgba(32, 214, 227, .34);
    box-shadow: 0 14px 30px rgba(22, 191, 208, .12);
}

.topbar {
    background: rgba(255, 255, 255, .78);
    border-bottom: 1px solid rgba(20, 146, 166, .14);
    box-shadow: 0 18px 42px rgba(4, 32, 48, .08);
}

.btn {
    font-size: 14px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #06121f, #0f9fbc 54%, #20d6e3);
    box-shadow: 0 16px 34px rgba(22, 191, 208, .22);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    box-shadow: 0 18px 42px rgba(22, 191, 208, .30);
}

.sidebar-collapse,
.btn-light,
.user-pill,
.user-menu-toggle,
.dashboard-filter-summary span,
.page-link {
    color: var(--fl-soft);
    background: rgba(255, 255, 255, .72);
    border-color: rgba(20, 146, 166, .18);
    box-shadow: 0 12px 28px rgba(4, 32, 48, .08);
}

.sidebar-collapse:hover,
.sidebar-collapse:focus,
.btn-light:hover,
.btn-light:focus,
.user-menu-toggle:hover,
.user-menu-toggle:focus,
.page-link:hover,
.page-link:focus {
    color: #06121f;
    background: rgba(255, 255, 255, .94);
    border-color: rgba(32, 214, 227, .36);
}

.btn:disabled,
.btn.disabled {
    color: rgba(36, 64, 79, .46);
    background: rgba(255, 255, 255, .52);
    border-color: rgba(20, 146, 166, .12);
}

.form-label {
    color: #102131;
}

.form-control,
.form-select,
.input-group-text,
.select2-container--default .select2-selection--single {
    color: var(--fl-text);
    background: rgba(255, 255, 255, .82);
    border-color: rgba(20, 146, 166, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.form-control::placeholder {
    color: rgba(91, 115, 128, .68);
}

.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    color: var(--fl-text);
    background: #fff;
    border-color: rgba(22, 191, 208, .72);
    box-shadow: 0 0 0 .2rem rgba(32, 214, 227, .14), 0 12px 26px rgba(4, 32, 48, .07);
}

.form-control::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: .72;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--fl-text);
    box-shadow: 0 0 0 1000px #fff inset;
    caret-color: var(--fl-text);
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    color: var(--fl-text);
}

.select2-dropdown {
    color: var(--fl-text);
    background: rgba(255, 255, 255, .98);
    border-color: rgba(20, 146, 166, .18);
    box-shadow: 0 24px 70px rgba(4, 32, 48, .16);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    color: var(--fl-text);
    background: #fff;
    border-color: rgba(20, 146, 166, .20);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    color: #06121f;
    background: rgba(32, 214, 227, .28);
}

.select2-container--default .select2-results__option--selected {
    color: #06121f;
    background: rgba(32, 214, 227, .14);
}

.stat-card,
.content-card,
.dashboard-panel,
.login-panel,
.modal-content,
.invoice-panel,
.invoice-qr-card,
.invoice-meta-item,
.invoice-total-grid div,
.api-docs-shell {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(247, 253, 255, .68)),
        rgba(255, 255, 255, .72);
    border: 1px solid rgba(20, 146, 166, .16);
    box-shadow: var(--fl-shadow), inset 0 1px 0 rgba(255, 255, 255, .88);
}

.stat-card {
    min-height: 100px;
}

.stat-card span {
    color: var(--fl-muted);
    font-weight: 100;
    font-size: 12px;
    text-transform: uppercase;
}

.stat-card strong {
    color: var(--fl-text);
    font-size: 20px;
    line-height: 1;
    text-shadow: none;
}

.stat-card i {
    color: #fff;
}

.tone-blue i,
.tone-green i {
    background: linear-gradient(135deg, #06121f, var(--fl-teal));
}

.dashboard-panel::before,
.stat-card::before {
    background: radial-gradient(circle at 88% 8%, rgba(32, 214, 227, .16), transparent 32%);
}

.table-responsive {
    background: rgba(255, 255, 255, .55);
    border-color: rgba(20, 146, 166, .14);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--fl-text);
    --bs-table-hover-bg: rgba(32, 214, 227, .07);
    --bs-table-hover-color: #06121f;
}

.table thead th {
    color: #fff;
    background: linear-gradient(135deg, #06121f, #0a2c3a);
    border-bottom-color: rgba(32, 214, 227, .30);
}

.table tbody td {
    color: #24404f;
    background: rgba(255, 255, 255, .62);
    border-top-color: rgba(20, 146, 166, .10);
}

html[dir="ltr"] .table tbody td:last-child {
    text-align: right;
}

html[dir="rtl"] .table tbody td:last-child {
    text-align: left;
}

html[dir="ltr"] .table thead th:last-child {
    text-align: right;
}

html[dir="rtl"] .table thead th:last-child {
    text-align: left;
}

.table tbody tr:hover td {
    color: #06121f;
    background: rgba(32, 214, 227, .08);
}

.table-foot {
    color: var(--fl-soft);
}

.page-item.active .page-link {
    color: #fff;
    background: #06121f;
    border-color: #06121f;
}

.modal-content {
    border-color: rgba(20, 146, 166, .22);
    box-shadow: 0 30px 90px rgba(4, 32, 48, .18), 0 0 60px rgba(32, 214, 227, .10);
}

.modal-header {
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(125, 227, 234, .26), transparent 34%),
        linear-gradient(135deg, #06121f, #0a2c3a 58%, #16bfd0);
    border-bottom: 1px solid rgba(32, 214, 227, .20);
}

.modal-header .modal-title {
    color: #fff;
}

.modal-body {
    color: var(--fl-soft);
    scrollbar-color: rgba(20, 146, 166, .38) rgba(240, 250, 252, .72);
}

.modal-footer {
    background: rgba(244, 251, 255, .84);
    border-color: rgba(20, 146, 166, .14);
}

.invoice-detail,
.invoice-detail-hero,
.invoice-meta-item,
.invoice-total-grid div,
.invoice-raw-code,
.invoice-log-context,
.detail-list code,
.empty-detail {
    color: var(--fl-soft);
    background: rgba(255, 255, 255, .64);
    border-color: rgba(20, 146, 166, .14);
}

.invoice-detail-hero {
    background:
        radial-gradient(circle at 86% 0%, rgba(32, 214, 227, .13), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, .84), rgba(244, 251, 255, .72));
}

.invoice-detail-hero h3,
.invoice-panel h6,
.invoice-meta-item strong,
.invoice-total-grid strong,
.detail-list code {
    color: var(--fl-text);
}

.invoice-detail-hero p,
.invoice-hero-total span,
.invoice-meta-item span,
.invoice-total-grid span,
.empty-detail {
    color: var(--fl-muted);
}

.invoice-hero-total {
    border-left-color: rgba(20, 146, 166, .14);
}

.invoice-detail-tabs .nav-link {
    color: var(--fl-muted);
}

.invoice-detail-tabs .nav-link.active {
    color: #06121f;
    background: rgba(32, 214, 227, .18);
    border-color: rgba(32, 214, 227, .28);
}

.accordion-item,
.accordion-button {
    color: var(--fl-soft);
    background: rgba(255, 255, 255, .76);
    border-color: rgba(20, 146, 166, .14);
}

.accordion-button:not(.collapsed) {
    color: #06121f;
    background: rgba(32, 214, 227, .12);
}

.invoice-detail-table th {
    color: #fff;
    background: #06121f;
}

.docs-block pre {
    background: #06121f;
    color: #d8f7fa;
}

.copy-row .code-input,
.invoice-raw-code,
.invoice-log-context {
    background: rgba(244, 251, 255, .86);
    color: var(--fl-soft);
}

.alert {
    color: var(--fl-soft);
    background: rgba(32, 214, 227, .10);
    border-color: rgba(20, 146, 166, .18);
}

.swal2-popup {
    color: var(--fl-soft);
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(20, 146, 166, .18);
    box-shadow: 0 30px 90px rgba(4, 32, 48, .18);
}

.swal2-title,
.swal2-html-container,
.swal2-input {
    color: var(--fl-text);
}

.swal2-input {
    background: #fff;
    border-color: rgba(20, 146, 166, .18);
}

.tippy-box {
    color: #06121f;
    background: #d8f7fa;
}

.tippy-arrow {
    color: #d8f7fa;
}

.login-body {
    background:
        radial-gradient(circle at 16% 0%, rgba(32, 214, 227, .20), transparent 34%),
        radial-gradient(circle at 86% 18%, rgba(124, 92, 255, .12), transparent 34%),
        linear-gradient(135deg, #ffffff, #f4fbff 56%, #eaf8fb);
}

.login-panel p,
.login-lang {
    color: var(--fl-muted);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 8px;
    border-radius: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 32px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #06121f, var(--fl-teal));
    box-shadow: 0 10px 22px rgba(22, 191, 208, .20);
}

.user-menu-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
    text-align: start;
    line-height: 1.1;
}

.user-menu-copy strong,
.user-dropdown-head strong {
    color: var(--fl-text);
    font-size: 13px;
    font-weight: 700;
}

.user-menu-copy small,
.user-dropdown-head small {
    color: var(--fl-muted);
    font-size: 11px;
    text-transform: capitalize;
}

.user-dropdown {
    min-width: 260px;
    padding: 8px;
    border: 1px solid rgba(20, 146, 166, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(4, 32, 48, .16);
    backdrop-filter: blur(18px);
}

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.dropdown-divider {
    border-top-color: rgba(20, 146, 166, .12);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    border-radius: 8px;
    color: var(--fl-soft);
    font-size: 13px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #06121f;
    background: rgba(32, 214, 227, .12);
}

@media (max-width: 575.98px) {
    .user-menu-copy {
        display: none;
    }

    .user-menu-toggle {
        padding: 6px;
    }

    .user-dropdown {
        min-width: min(280px, calc(100vw - 24px));
    }
}

/* User requested light workspace with dark sidebar navigation */
.main {
    background: white;
}

.content-card {
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
}

.sidebar {
    background:
        radial-gradient(circle at 18% 0%, rgba(32, 214, 227, .14), transparent 34%),
        linear-gradient(180deg, #000, #06121f 72%, #02070d);
    border-inline-end: 0;
    box-shadow: 18px 0 52px rgba(4, 18, 30, .18);
}

.brand {
    color: #fff;
}

.brand small {
    color: #a7b8c2 !important;
}

.side-nav a {
    color: #a5a5a5;
    border-color: transparent;
}

.side-nav a.active {
    background: linear-gradient(135deg, #06121f, #16bfd08c);
    color: white;
    border-color: rgba(125, 227, 234, .16);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .20);
}

.side-nav a:hover {
    background: #0a5f6b75;
    color: #bfbfbf;
    border-color: transparent;
}

.sidebar-collapse {
    color: #d6d6d6;
    background: #151515;
    border-color: #383838;
}

.sidebar-collapse:hover,
.sidebar-collapse:focus {
    color: white;
    background: #383838;
    border-color: #383838;
}

.tippy-box {
    color: #fff;
    background: #000;
}

.tippy-arrow {
    color: #000;
}

.user-menu-toggle {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus {
    background: transparent;
    box-shadow: none;
}

.user-dropdown {
    background: rgb(255 255 255);
}

.modal-content {
    border-color: transparent;
    border: 0;
    background: #fff;
}

.modal-body {
    background: #fff;
}

.tone-red i {
    background: rgb(217 75 75);
    color: white;
}

.tone-amber i {
    background: rgb(216 138 18);
    color: white;
}
