/* Application visual layer aligned with the public landing page. */
html[data-theme="light"] {
    --app-header-height: 76px;
    --app-canvas: #f7faf8;
    --app-shell-bg: #f7faf8;
    --app-shell-bg-soft: #f2f5f3;
    --app-panel: #ffffff;
    --app-panel-soft: #f2f5f3;
    --app-panel-raise: #ffffff;
    --app-border: #cad5d1;
    --app-border-strong: #9dafaa;
    --app-text: #17211f;
    --app-text-muted: #52615e;
    --app-heading: #17211f;
    --app-accent: #8ab800;
    --app-accent-strong: #6f9400;
    --app-accent-soft: #eef8d6;
    --app-accent-soft-hover: #e2f0bc;
    --app-accent-soft-text: #375000;
    --app-radius-md: 10px;
    --app-radius-lg: 16px;
    --app-shadow-card: 0 1px 2px rgba(23, 33, 31, 0.04);
    --app-shadow-card-hover: 0 1px 2px rgba(23, 33, 31, 0.04);
}

html[data-theme="light"] body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6 {
    line-height: 1.15;
    letter-spacing: -0.025em;
}

html[data-theme="light"] .app-header {
    min-height: 76px;
    padding-block: 0 !important;
    border-bottom-color: var(--app-border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
}

html[data-theme="light"] .app-header > .container-fluid {
    min-height: 76px;
    padding-inline: clamp(16px, 2.5vw, 36px);
}

html[data-theme="light"] .app-header-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border: 0;
    border-radius: 10px;
}

html[data-theme="light"] .app-header-logo-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 10px;
}

html[data-theme="light"] .app-header-text-main {
    font-size: 1.08rem;
    font-weight: 760;
    letter-spacing: -0.02em;
}

html[data-theme="light"] .app-header-context {
    margin-top: 3px;
    font-size: 0.78rem;
}

html[data-theme="light"] .icon-pill,
html[data-theme="light"] .app-user-avatar {
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
}

html[data-theme="light"] .icon-pill:hover,
html[data-theme="light"] .icon-pill:focus,
html[data-theme="light"] .app-user-avatar-link:hover .app-user-avatar,
html[data-theme="light"] .app-user-avatar-link:focus-visible .app-user-avatar {
    border-color: var(--app-border);
    background: var(--app-panel-soft);
}

html[data-theme="light"] .app-sidebar {
    width: 260px;
    padding: 24px 16px;
    border-right: 1px solid var(--app-border);
    background: #ffffff;
}

html[data-theme="light"] .app-sidebar .section-title {
    margin: 20px 12px 8px;
    color: #6d7a76;
    font-size: 0.69rem;
    letter-spacing: 0.12em;
}

html[data-theme="light"] .app-sidebar .nav-link {
    min-height: 46px;
    margin-bottom: 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #40504c;
    font-size: 0.94rem;
    font-weight: 650;
}

html[data-theme="light"] .app-sidebar .nav-link:hover,
html[data-theme="light"] .app-sidebar .nav-link:focus {
    color: var(--app-accent-strong);
    border-color: transparent;
    background: #f2f5f3;
}

html[data-theme="light"] .app-sidebar .nav-link.active {
    color: #ffffff;
    border-color: var(--app-accent);
    background: var(--app-accent);
}

html[data-theme="light"] .app-main-inner {
    width: min(100%, 1480px);
    margin-inline: auto;
    padding: clamp(28px, 4vw, 56px);
}

html[data-theme="light"] .app-page-header {
    align-items: center;
    gap: 32px;
    padding: 0 0 30px;
    border-bottom: 0;
}

html[data-theme="light"] .app-page-header h1 {
    margin: 4px 0 10px;
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 760;
    letter-spacing: -0.035em;
}

html[data-theme="light"] .app-page-header p {
    max-width: 720px;
    color: var(--app-text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

html[data-theme="light"] .app-page-eyebrow {
    color: var(--app-accent-strong);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

html[data-theme="light"] .app-page-actions {
    gap: 10px;
}

html[data-theme="light"] .app-local-nav {
    gap: 2px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 28px;
    padding: 5px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: #ffffff;
}

html[data-theme="light"] .app-local-nav a {
    min-height: 42px;
    padding: 8px 15px;
    border: 0;
    border-radius: 8px;
    font-size: 0.92rem;
}

html[data-theme="light"] .app-local-nav a:hover,
html[data-theme="light"] .app-local-nav a:focus {
    color: var(--app-accent-strong);
    background: var(--app-panel-soft);
}

html[data-theme="light"] .app-local-nav a.active {
    color: #ffffff;
    background: var(--app-accent);
}

html[data-theme="light"] .app-status-row {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

html[data-theme="light"] .app-status-item {
    min-height: 112px;
    justify-content: center;
    padding: 20px;
    border: 1px solid #dbe4e0;
    border-radius: 14px;
    background: #ffffff;
}

html[data-theme="light"] .app-status-item span,
html[data-theme="light"] .app-status-item small {
    font-size: 0.82rem;
}

html[data-theme="light"] .app-status-item strong {
    margin-top: 4px;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    letter-spacing: -0.025em;
}

html[data-theme="light"] .app-section-panel,
html[data-theme="light"] .invoice-panel,
html[data-theme="light"] .card {
    border: 1px solid #dbe4e0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

html[data-theme="light"] .app-section-panel {
    padding: clamp(20px, 2.5vw, 30px);
}

html[data-theme="light"] .app-section-head {
    align-items: center;
    margin-bottom: 22px;
}

html[data-theme="light"] .app-section-head h2 {
    margin-top: 4px;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    letter-spacing: -0.025em;
}

html[data-theme="light"] .app-empty-state {
    padding: 22px;
    border: 0;
    border-radius: 12px;
    background: #f2f5f3;
}

html[data-theme="light"] .app-table-wrap,
html[data-theme="light"] .invoice-list-panel .invoice-table-wrapper,
html[data-theme="light"] .invoice-viewer-page .invoice-panel .table-responsive,
html[data-theme="light"] .invoice-overview-page .table-responsive {
    border-color: #dbe4e0;
    border-radius: 12px;
}

html[data-theme="light"] .app-data-table thead th,
html[data-theme="light"] .table thead th,
html[data-theme="light"] .invoice-overview-page .invoice-table thead th,
html[data-theme="light"] .invoice-viewer-page .invoice-table thead th {
    padding: 13px 16px;
    color: #64736f !important;
    background: #f7faf8 !important;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

html[data-theme="light"] .app-data-table td,
html[data-theme="light"] .table td {
    padding: 14px 16px;
}

html[data-theme="light"] .payment-item {
    padding: 16px 10px;
    border-radius: 8px;
}

html[data-theme="light"] .payment-item:hover,
html[data-theme="light"] .payment-item:focus-visible {
    background: #f7faf8;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] textarea.form-control {
    min-height: 46px;
    padding: 10px 12px;
    border-color: #aebdb8;
    border-radius: 9px;
    background: #ffffff;
}

html[data-theme="light"] .form-control:hover,
html[data-theme="light"] .form-select:hover,
html[data-theme="light"] textarea.form-control:hover {
    border-color: #80938d;
}

html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .modal-content {
    border-color: #dbe4e0;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(23, 33, 31, 0.14);
}

html[data-theme="light"] .invoice-overview-sections,
html[data-theme="light"] .dashboard-work-grid {
    gap: 22px;
    margin-top: 22px;
}

html[data-theme="light"] .invoice-panel-head {
    padding: 20px 24px;
    background: #ffffff;
}

html[data-theme="light"] .incoming-workflow-card .incoming-dropzone {
    min-height: 120px;
    border-style: dashed !important;
    border-radius: 12px !important;
    background: #f7faf8;
}

html[data-theme="light"] .incoming-workflow-card .incoming-dropzone:hover {
    background: #eef7f2;
}

html[data-theme="light"] .app-footer {
    background: #ffffff;
}

@media (max-width: 991.98px) {
    html[data-theme="light"] .app-main-inner {
        padding: 28px 22px;
    }
}

@media (max-width: 767.98px) {
    html[data-theme="light"] {
        --app-header-height: 64px;
    }

    html[data-theme="light"] .app-header,
    html[data-theme="light"] .app-header > .container-fluid {
        min-height: 64px;
    }

    html[data-theme="light"] .app-sidebar {
        width: min(88vw, 320px);
        padding: 18px 14px;
    }

    html[data-theme="light"] .app-main-inner {
        padding: 24px 16px;
    }

    html[data-theme="light"] .app-page-header {
        gap: 18px;
        padding-bottom: 24px;
    }

    html[data-theme="light"] .app-page-header h1 {
        font-size: clamp(1.8rem, 9vw, 2.35rem);
    }

    html[data-theme="light"] .app-page-header p {
        font-size: 1rem;
    }

    html[data-theme="light"] .app-local-nav {
        width: 100%;
    }

    html[data-theme="light"] .app-status-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    html[data-theme="light"] .app-status-item {
        min-height: 98px;
        padding: 16px;
    }

    html[data-theme="light"] .invoice-overview-page .invoice-table td,
    html[data-theme="light"] .invoice-overview-page .invoice-table th,
    html[data-theme="light"] .invoice-viewer-page .invoice-table td,
    html[data-theme="light"] .invoice-viewer-page .invoice-table th {
        padding: 10px 12px;
    }
}

@media (max-width: 479.98px) {
    html[data-theme="light"] .app-status-row {
        grid-template-columns: 1fr;
    }

    html[data-theme="light"] .app-section-panel {
        padding: 20px 16px;
    }
}
