:root {
    --color-primary: #5B5BD6;
    --color-primary-hover: #4A49C7;
    --color-primary-soft: rgba(91, 91, 214, 0.15);
    --color-accent: #14B8A6;
    --color-bg: #F6F7FB;
    --color-surface: #FFFFFF;
    --color-sidebar: #111827;
    --color-sidebar-hover: #1F2937;
    --color-sidebar-border: rgba(255, 255, 255, 0.08);
    --color-text: #111827;
    --color-text-muted: #6B7280;
    --color-border: #E5E7EB;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.06);
    --shadow-lg: 0 10px 30px rgba(17, 24, 39, 0.08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
}

/* Auth refresh */
.auth-body {
    min-height: 100vh;
    padding: 24px 0;
    overflow-x: hidden;
}

.auth-shell {
    width: min(1200px, calc(100% - 32px));
    margin-inline: auto;
    align-items: stretch;
}

.auth-card {
    min-width: 0;
}

.auth-showcase {
    position: relative;
    min-width: 0;
    display: grid;
    align-content: space-between;
    gap: 24px;
    padding: clamp(24px, 4vw, 36px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .42);
    background: linear-gradient(160deg, rgba(15, 23, 42, .92), rgba(30, 41, 59, .82)), radial-gradient(circle at 20% 18%, rgba(99, 102, 241, .38), transparent 15rem), radial-gradient(circle at 88% 8%, rgba(56, 189, 248, .30), transparent 16rem);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
    color: #f8fafc;
    overflow: hidden;
}

    .auth-showcase::after {
        content: "";
        position: absolute;
        inset: auto -60px -80px auto;
        width: 220px;
        height: 220px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(96, 165, 250, .36), transparent 70%);
        pointer-events: none;
    }

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .85);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.register-wizard-shell {
    grid-template-columns: minmax(320px, .88fr) minmax(0, 1.12fr);
    width: min(1320px, calc(100% - 40px));
}

.register-showcase {
    background: linear-gradient(145deg, rgba(15, 23, 42, .90), rgba(29, 78, 216, .48)), radial-gradient(circle at 18% 18%, rgba(99, 102, 241, .44), transparent 15rem), radial-gradient(circle at 88% 10%, rgba(45, 212, 191, .30), transparent 16rem), url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
}

.register-showcase-copy h2 {
    margin: 14px 0 12px;
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    line-height: 1.02;
}

.register-showcase-copy p {
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    max-width: 34rem;
}

.register-step-rail {
    display: grid;
    gap: 12px;
}

.register-step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: rgba(15, 23, 42, .28);
    color: #fff;
    text-align: left;
}

    .register-step-card.active {
        border-color: rgba(191, 219, 254, .58);
        background: rgba(255, 255, 255, .14);
    }

    .register-step-card.complete {
        border-color: rgba(45, 212, 191, .44);
    }

    .register-step-card small {
        display: block;
        margin-top: 4px;
        color: rgba(255, 255, 255, .7);
    }

.register-step-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-weight: 800;
}

.register-summary-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(15, 23, 42, .38);
    border: 1px solid rgba(255, 255, 255, .12);
}

    .register-summary-card span {
        display: block;
        margin-bottom: 4px;
        color: rgba(255, 255, 255, .68);
        font-size: .85rem;
    }

    .register-summary-card strong {
        color: #fff;
    }

.register-wizard-card {
    max-width: 100%;
    padding: clamp(22px, 3.8vw, 34px);
    border-radius: 28px;
    overflow: hidden;
}

.register-auth-header p {
    max-width: 40rem;
}

.register-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.register-progress-segment {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .24);
}

    .register-progress-segment.active {
        background: linear-gradient(135deg, #111827, #4338ca);
    }

.register-wizard-form {
    display: grid;
    gap: 18px;
}

.register-step-panel {
    display: grid;
    gap: 18px;
}

.register-panel-header h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.register-panel-header p {
    margin: 0;
}

.register-form-grid {
    gap: 14px 16px;
}

.register-slug-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.register-business-email-group {
    grid-column: span 2;
}

.register-email-otp-row {
    grid-template-columns: minmax(280px, 1fr) auto;
}

.register-slug-check {
    min-width: 92px;
}

.register-slug-status {
    margin-top: 8px;
    font-size: .92rem;
    font-weight: 600;
}

    .register-slug-status.success {
        color: #059669;
    }

    .register-slug-status.danger {
        color: #dc2626;
    }

.register-wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.register-wizard-actions-left,
.register-wizard-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.register-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    font-weight: 600;
    pointer-events: auto;
    text-decoration: none;
}

.fleet-import-export {
    margin-bottom: 1rem;
}

.fleet-import-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.fleet-export-actions {
    justify-content: flex-end;
}

.fleet-import-dropzone {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 112px;
    padding: 20px;
    border: 1px dashed color-mix(in srgb, var(--tenant-accent, var(--color-primary)) 45%, var(--color-border));
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.fleet-import-dropzone:hover,
.fleet-import-dropzone:focus-within {
    border-color: var(--tenant-accent, var(--color-primary));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.fleet-import-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--tenant-accent, var(--color-primary));
    background: var(--tenant-accent-soft, var(--color-primary-soft));
    font-size: 22px;
}

.fleet-import-dropzone strong,
.fleet-import-dropzone span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.fleet-import-dropzone span {
    margin-top: 3px;
    color: var(--color-text-muted);
    font-size: .88rem;
}

.fleet-import-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.fleet-import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1rem;
}

.fleet-import-preview {
    margin-top: 1rem;
}

.fleet-import-result {
    display: grid;
    gap: .85rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f8fafc;
}

.fleet-import-result.has-skipped {
    border-color: #fecaca;
    background: #fff7f7;
}

.fleet-import-result.all-saved {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.fleet-import-result > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.fleet-import-result > div:first-child span {
    color: var(--color-text-muted);
}

.fleet-import-preview input {
    min-width: 9rem;
}

.fleet-section-title {
    margin: 1rem 0 .65rem;
    color: var(--color-text);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fleet-passenger-workflow {
    margin-top: 1rem;
    padding-top: .25rem;
}

.assignment-passenger-dropzone {
    min-height: 92px;
}

.passenger-actions,
.passenger-summary {
    margin-top: .75rem;
}

.passenger-preview-table input {
    min-width: 8rem;
}

.passenger-preview-table td {
    vertical-align: top;
}

.compact-empty {
    padding: 1rem;
}

.fleet-row-errors {
    max-width: 24rem;
    color: #b91c1c;
    white-space: normal;
    word-break: break-word;
}

.account-section-card {
    min-height: 100%;
}

.account-profile-line {
    display: grid;
    gap: .25rem;
    margin-bottom: 1rem;
}

.account-profile-line span {
    color: var(--color-text-muted);
}

.account-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.account-fact-grid div {
    padding: .75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f8fafc;
}

.account-fact-grid span {
    display: block;
    font-size: .78rem;
    color: var(--color-text-muted);
}

.account-fact-grid strong {
    display: block;
    margin-top: .2rem;
}

.register-login-link:hover,
.register-login-link:focus {
    color: #334155;
    text-decoration: underline;
}

.register-next-btn,
.register-wizard-form .auth-submit-btn {
    min-width: 180px;
}

.register-wizard-form .auth-submit-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
}

.auth-shell::before,
.register-auth-shell::before {
    display: none !important;
}

@media (max-width: 980px) {
    .auth-body {
        padding: 16px 0;
    }

    .register-wizard-shell,
    .auth-shell {
        grid-template-columns: 1fr;
        width: min(100%, calc(100% - 24px));
    }

    .auth-showcase {
        min-height: 0;
    }

    .register-showcase {
        order: 2;
    }

    .register-wizard-card,
    .auth-card {
        order: 1;
    }
}

@media (max-width: 720px) {
    .auth-status-breadcrumb {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 8px;
        padding: 9px 10px;
        border-radius: 14px;
        font-size: .88rem;
    }

        .auth-status-breadcrumb i {
            width: 30px;
            height: 30px;
            border-radius: 10px;
        }

    .auth-body {
        padding: 10px 0 18px;
    }

    .auth-shell,
    .register-wizard-shell {
        width: min(100%, calc(100% - 16px));
    }

    .auth-card,
    .register-wizard-card {
        padding: 20px 16px;
        border-radius: 22px;
    }

    .register-showcase {
        padding: 18px;
        border-radius: 22px;
    }

    .register-showcase-copy h2 {
        font-size: 1.7rem;
    }

    .register-form-grid,
    .settings-grid.two-col.register-form-grid {
        grid-template-columns: 1fr;
    }

    .register-slug-row {
        grid-template-columns: 1fr;
    }

    .register-wizard-actions,
    .register-wizard-actions-left,
    .register-wizard-actions-right {
        width: 100%;
    }

    .register-wizard-actions-right {
        flex-direction: column;
        align-items: stretch;
    }

    .register-login-link,
    .register-next-btn,
    .register-wizard-form .auth-submit-btn {
        width: 100%;
        text-align: center;
    }
}

.support-chat-shell {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
}

.support-conversation-panel,
.support-chat-card,
.support-empty-state {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .07);
}

.support-conversation-panel,
.support-chat-card {
    padding: 18px;
}

.support-toolbar,
.support-filter-row,
.support-chat-header,
.support-status-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

    .support-toolbar > div:first-child {
        min-width: 0;
    }

.support-filter-row {
    margin: 14px 0;
}

.support-conversation-list {
    display: grid;
    gap: 10px;
}

.support-conversation-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: #fff;
    text-align: left;
}

    .support-conversation-card.active,
    .support-conversation-card:hover {
        border-color: rgba(91, 91, 214, .35);
        background: linear-gradient(135deg, rgba(91, 91, 214, .08), rgba(16, 185, 129, .08));
    }

.support-status-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: #64748b;
}

    .support-status-dot.open {
        background: #22c55e;
    }

    .support-status-dot.waiting {
        background: #f59e0b;
    }

    .support-status-dot.resolved {
        background: #3b82f6;
    }

    .support-status-dot.closed {
        background: #64748b;
    }

.support-conversation-card strong,
.support-conversation-card small {
    grid-column: 2;
}

.support-conversation-card small,
.support-toolbar p,
.support-chat-header p,
.support-message small {
    color: #64748b;
}

.support-message-list {
    display: grid;
    gap: 8px;
    align-content: start;
    align-items: start;
    min-height: 420px;
    max-height: 58vh;
    overflow: auto;
    padding: 10px 4px;
    scroll-behavior: smooth;
}

.support-load-older {
    justify-self: center;
    border: 1px solid rgba(91, 91, 214, .24);
    border-radius: 999px;
    padding: 8px 14px;
    color: #4338ca;
    background: rgba(238, 242, 255, .9);
    font-weight: 700;
}

.support-message {
    justify-self: start;
    width: fit-content;
    max-width: min(720px, 86%);
    padding: 10px 13px;
    border-radius: 16px;
    background: #f8fafc;
    font-size: .92rem;
    line-height: 1.35;
}

    .support-message strong {
        display: inline-block;
        font-size: .9rem;
        font-weight: 650;
        line-height: 1.2;
        margin-right: 8px;
    }

    .support-message small {
        font-size: .78rem;
        font-weight: 400;
    }

    .support-message.theirs {
        justify-self: start;
        background: #f8fafc;
    }

    .support-message.mine {
        justify-self: end;
        background: linear-gradient(135deg, #eef2ff, #ecfeff);
        text-align: left;
    }

    .support-message p {
        margin: 5px 0 0;
        font-size: .92rem;
        font-weight: 400;
        line-height: 1.38;
        white-space: pre-wrap;
    }

.support-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

    .support-reply-form .validation-message {
        grid-column: 1 / -1;
    }

.support-email-toggle {
    align-self: end;
}

.switch-row {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    background: rgba(248, 250, 252, .88);
    color: #334155;
}

    .switch-row input {
        width: 18px;
        height: 18px;
        accent-color: var(--tenant-accent);
    }

.support-empty-state {
    display: grid;
    min-height: 520px;
    place-items: center;
    align-content: center;
    padding: 32px;
    color: #64748b;
    text-align: center;
}

    .support-empty-state i {
        display: grid;
        width: 72px;
        height: 72px;
        place-items: center;
        border-radius: 24px;
        background: #eef2ff;
        color: #5b5bd6;
        font-size: 28px;
    }

.collapsible-card {
    overflow: hidden;
    padding: 1rem 1rem 0rem 1rem !important;
}

.collapsible-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

    .collapsible-card-header h3,
    .collapsible-card-header p {
        margin: 0;
    }

    .collapsible-card-header p {
        color: var(--color-text-muted);
    }

.collapsible-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    color: var(--color-text-muted);
    transition: transform .18s ease, color .18s ease, border-color .18s ease;
}

.collapsible-card[open] .collapsible-card-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
    border-color: rgba(91, 91, 214, .18);
}

.finance-module-nav-polished {
    position: sticky;
    top: var(--top-header-height, 72px);
    z-index: 12;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin-bottom: 18px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    backdrop-filter: blur(10px);
}

.finance-module-nav-polished .finance-module-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.finance-module-nav-polished .finance-module-tab:hover,
.finance-module-nav-polished .finance-module-tab:focus {
    border-color: rgba(91, 91, 214, .18);
    background: #f8fafc;
    color: #1f2937;
}

.finance-module-nav-polished .finance-module-tab.active {
    border-color: rgba(91, 91, 214, .24);
    background: linear-gradient(135deg, rgba(91, 91, 214, .12), rgba(20, 184, 166, .10));
    color: #3730a3;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.financial-tab-row,
.financial-journal-balance-strip,
.financial-route-line,
.financial-route-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.financial-tab-row {
    margin-bottom: 14px;
}

.financial-tab-pill {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-weight: 700;
}

.financial-tab-pill.active {
    border-color: rgba(91, 91, 214, .32);
    background: #eef2ff;
    color: #3730a3;
}

.financial-journal-balance-strip {
    justify-content: flex-end;
}

.financial-journal-balance-strip span {
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: .82rem;
}

.finance-inline-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: .92rem;
    font-weight: 600;
}

.finance-inline-alert.warning {
    border-color: rgba(245, 158, 11, .30);
    background: #fffbeb;
    color: #92400e;
}

.finance-inline-alert.danger {
    border-color: rgba(239, 68, 68, .30);
    background: #fef2f2;
    color: #991b1b;
}

.financial-empty-state-rich {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    padding: 28px;
    text-align: center;
}

.financial-empty-state-rich i {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 22px;
}

.financial-empty-state-rich strong {
    color: #0f172a;
}

.financial-empty-state-rich span {
    max-width: 34rem;
    color: #64748b;
}

.financial-account-summary-grid,
.financial-explainer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.financial-account-summary-card,
.financial-explainer-grid article,
.financial-route-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.financial-account-summary-card {
    display: grid;
    gap: 8px;
}

.financial-account-summary-card strong {
    color: #0f172a;
    font-size: 1.05rem;
}

.financial-account-summary-card small,
.financial-explainer-grid span {
    color: #64748b;
}

.financial-explainer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.financial-explainer-grid article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: start;
}

.financial-explainer-grid i {
    grid-row: span 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: #ecfeff;
    color: #0f766e;
}

.financial-route-line {
    font-weight: 750;
}

.financial-route-line i,
.financial-route-card i {
    color: #94a3b8;
    font-size: .8rem;
}

.financial-route-card {
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.compact-segmented-control {
    min-height: 36px;
}

.compact-segmented-control button {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid rgba(148, 163, 184, .26);
    background: #fff;
    color: #475569;
    font-weight: 700;
}

.compact-segmented-control button.active {
    background: #eef2ff;
    color: #3730a3;
}

@media (max-width: 1100px) {
    .financial-account-summary-grid,
    .financial-explainer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .finance-module-nav-polished {
        position: static;
        gap: 6px;
        padding: 8px;
    }

    .finance-module-nav-polished .finance-module-tab {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        padding-inline: 10px;
    }

    .financial-account-summary-grid,
    .financial-explainer-grid {
        grid-template-columns: 1fr;
    }

    .financial-journal-balance-strip {
        justify-content: flex-start;
    }
}

.collapsible-card-body {
    padding: 0 24px 24px;
}

@media (max-width: 960px) {
    .support-chat-shell {
        grid-template-columns: 1fr;
    }

    .support-filter-row,
    .support-toolbar,
    .support-chat-header,
    .support-status-actions,
    .support-reply-form {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .support-message {
        max-width: 100%;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

body {
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font: inherit;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: var(--color-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 22px;
    border-bottom: 1px solid var(--color-sidebar-border);
    margin-bottom: 14px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 18px rgba(91, 91, 214, 0.25);
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 13px;
    color: #cbd5e1;
    margin-top: 2px;
}

.sidebar-menu {
    padding-top: 16px;
}

.nav-menu,
.nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-bottom: 6px;
}

.nav-link,
.nav-link-parent,
.nav-sublink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #e5e7eb;
    transition: all 0.2s ease;
}

    .nav-link:hover,
    .nav-sublink:hover {
        background: var(--color-sidebar-hover);
        color: #fff;
    }

    .nav-link.active {
        background: var(--color-primary-soft);
        color: #fff;
        font-weight: 600;
    }

    .nav-sublink.active {
        background: rgba(91, 91, 214, 0.15);
        color: #fff;
        font-weight: 600;
    }

.nav-link-parent {
    /*font-weight: 600;*/
    color: #f9fafb;
    cursor: default;
}

.nav-submenu {
    margin-top: 6px;
    padding-left: 10px;
}

.nav-sublink {
    padding-left: 18px;
    font-size: 14px;
    color: #cbd5e1;
}

.nav-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 76px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.topbar-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
}

.topbar-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .topbar-btn:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(91, 91, 214, 0.25);
}

.topbar-user-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
}

.topbar-user-role {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.page-content {
    position: relative;
    padding: 24px;
}

.page-header {
    margin-bottom: 22px;
}

    .page-header h1 {
        margin: 0 0 8px;
        font-size: 30px;
        line-height: 1.15;
    }

    .page-header p {
        margin: 0;
        color: var(--color-text-muted);
        font-size: 15px;
    }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card,
.content-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.stat-title {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.15;
}

.stat-meta {
    font-size: 13px;
    color: var(--color-text-muted);
}

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr;
    gap: 18px;
}

.content-card-header {
    margin-bottom: 16px;
}

    .content-card-header h3 {
        margin: 0;
        font-size: 18px;
        line-height: 1.2;
    }

.empty-state {
    color: var(--color-text-muted);
    font-size: 14px;
    padding: 24px 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

    .quick-actions .btn {
        width: 100%;
    }

.list-toolbar {
    margin-bottom: 16px;
}

.list-search {
    max-width: 420px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5B5BD6, #6C6CF0);
    color: #fff;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(91, 91, 214, 0.18);
}

    .action-btn:hover {
        background: linear-gradient(135deg, #4A49C7, #5B5BD6);
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(91, 91, 214, 0.22);
    }

    .action-btn:active {
        transform: translateY(0);
    }

    .action-btn:disabled,
    .ghost-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

.action-feedback {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

    .action-feedback.success {
        color: #047857;
        background: rgba(16, 185, 129, .12);
        border: 1px solid rgba(16, 185, 129, .2);
    }

    .action-feedback.error {
        color: #b91c1c;
        background: rgba(239, 68, 68, .12);
        border: 1px solid rgba(239, 68, 68, .2);
    }

.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.pager-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.danger-btn {
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.35);
}

    .danger-btn:hover {
        background: rgba(239, 68, 68, 0.08);
    }

.auth-body {
    background: linear-gradient(135deg, #f6f7fb, #eef2ff);
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--color-surface);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 32px;
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-header {
    margin-bottom: 24px;
}

    .auth-header h1 {
        margin: 0 0 8px;
        font-size: 30px;
    }

    .auth-header p {
        margin: 0;
        color: var(--color-text-muted);
    }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-size: 13px;
        font-weight: 600;
    }

.form-control {
    width: 100%;
    min-height: 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 5px 12px;
    outline: none;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

    .form-control:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 4px rgba(91, 91, 214, 0.12);
    }

.auth-submit-btn {
    height: 40px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #5B5BD6, #6C6CF0);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(91, 91, 214, 0.18);
    padding: 10px 15px;
}

    .auth-submit-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(91, 91, 214, 0.22);
    }

.validation-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    padding: 10px 14px;
    border-radius: 10px;
}

.auth-inline-message {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    padding: 10px 14px;
    border-radius: 10px;
}

.auth-status-breadcrumb {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    background: rgba(248, 250, 252, .92);
    color: #334155;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.45;
}

    .auth-status-breadcrumb i {
        display: inline-grid;
        width: 34px;
        height: 34px;
        place-items: center;
        border-radius: 12px;
        font-size: .95rem;
    }

    .auth-status-breadcrumb span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .auth-status-breadcrumb.danger {
        border-color: rgba(239, 68, 68, .18);
        background: linear-gradient(135deg, rgba(254, 242, 242, .96), rgba(255, 255, 255, .94));
        color: #991b1b;
    }

        .auth-status-breadcrumb.danger i {
            background: rgba(239, 68, 68, .12);
            color: #dc2626;
        }

    .auth-status-breadcrumb.success {
        border-color: rgba(16, 185, 129, .18);
        background: linear-gradient(135deg, rgba(236, 253, 245, .96), rgba(255, 255, 255, .94));
        color: #065f46;
    }

        .auth-status-breadcrumb.success i {
            background: rgba(16, 185, 129, .14);
            color: #059669;
        }

.auth-secondary-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.auth-link-btn {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

    .auth-link-btn:disabled {
        color: var(--color-text-muted);
        cursor: not-allowed;
        opacity: .7;
    }

/* Field-level validation */
.field-validation {
    color: var(--color-danger);
    font-size: 13px;
}

    /* Hide when empty */
    .field-validation:empty {
        display: none;
    }

.input-validation-error {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.required-label::after,
label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: 900;
}

.form-action-message-row {
    width: 100%;
    margin-top: 1rem;
}

    .form-action-message-row .validation-summary-errors,
    .form-action-message-row .validation-errors {
        width: 100%;
        padding: .85rem 1rem;
        border: 1px solid rgba(220, 38, 38, .2);
        border-radius: 1rem;
        background: rgba(254, 242, 242, .88);
        color: #991b1b;
    }

    .form-action-message-row ul {
        margin: 0;
        padding-left: 1.25rem;
    }

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-content {
        padding: 18px;
    }
}

.saas-btn-cancel {
    margin-right: 0.5rem;
}

.form-editor-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(91, 91, 214, .14);
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
    border-radius: 10px;
}

.order-toolbar-actions {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 180px auto;
    gap: .65rem;
    align-items: center;
}

.order-filter-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px 240px;
    gap: .75rem;
    margin: 1rem 0 1.25rem;
    max-width: 880px;
}

.order-editor-panel,
.order-detail-card {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(91, 91, 214, .14);
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
    border-radius: 10px;
}

.order-mode-toggle {
    display: inline-flex;
    gap: .5rem;
    padding: .35rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 999px;
    background: #fff;
}

.order-form-grid {
    margin-bottom: 1rem;
}

.order-adjustment-grid {
    margin-top: 1rem;
}

.pos-adjustment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.pos-workspace-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, .9fr);
    gap: 1rem;
    align-items: start;
}

.pos-entry-card,
.pos-summary-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95));
}

.pos-summary-card {
    position: sticky;
    top: 1rem;
}

.pos-summary-header {
    margin-bottom: 1rem;
}

    .pos-summary-header h4 {
        margin: 0 0 .35rem;
    }

    .pos-summary-header p {
        margin: 0;
        color: var(--color-text-muted);
        font-size: .92rem;
    }

.order-lines-panel {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 1.25rem;
    background: #fff;
}

.order-lines-header,
.invoice-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}

.order-line-row {
    display: grid;
    grid-template-columns: 140px minmax(220px, 1fr) 90px 120px 120px auto auto;
    gap: .5rem;
    align-items: center;
    padding: .55rem 0;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

.order-line-heading {
    display: grid;
    grid-template-columns: 140px minmax(220px, 1fr) 90px 120px 120px auto auto;
    gap: .5rem;
    padding: .35rem 0 .55rem;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.order-line-row:first-of-type {
    border-top: 0;
}

.order-line-placeholder {
    min-width: 40px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px dashed rgba(148, 163, 184, .32);
    background: rgba(248, 250, 252, .74);
}

.order-checkout-panel {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

    .order-checkout-panel .form-group {
        width: min(100%, 280px);
    }

.order-actions-row {
    gap: .75rem;
}

.order-total-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.pos-total-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-total-strip > div,
.invoice-total-panel > div {
    padding: .8rem 1rem;
    border-radius: 1rem;
    background: rgba(91, 91, 214, .08);
}

.order-total-strip span,
.invoice-total-panel span {
    display: block;
    color: #64748b;
    font-size: .78rem;
}

.invoice-print-shell {
    padding: 1rem;
}

.pos-actions-row {
    margin-top: 1.25rem;
    justify-content: stretch;
}

    .pos-actions-row .btn {
        flex: 1;
    }

.invoice-document {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

    .invoice-document.invoice-pos {
        max-width: 300px;
        padding: .65rem;
        border-radius: 0;
        box-shadow: none;
        border: 0;
        font-family: "Consolas", "Courier New", monospace;
        font-size: 11px;
        line-height: 1.25;
    }

        .invoice-document.invoice-pos .invoice-document-header,
        .invoice-document.invoice-pos .invoice-bill-grid {
            display: block;
        }

        .invoice-document.invoice-pos .invoice-number-box {
            min-width: 0;
            margin-top: .5rem;
            padding: .5rem;
            border-radius: .25rem;
            text-align: left;
        }

        .invoice-document.invoice-pos .invoice-lines th,
        .invoice-document.invoice-pos .invoice-lines td {
            padding: .22rem .1rem;
            border-bottom: 1px dashed #cbd5e1;
        }

        .invoice-document.invoice-pos h1 {
            font-size: 1rem;
            text-align: center;
        }

        .invoice-document.invoice-pos p,
        .invoice-document.invoice-pos footer {
            margin-bottom: .25rem;
        }

        .invoice-document.invoice-pos .invoice-total-panel {
            width: 100%;
        }

            .invoice-document.invoice-pos .invoice-total-panel > div {
                padding: .25rem 0;
                border-radius: 0;
                background: transparent;
                border-bottom: 1px dashed #cbd5e1;
            }

    .invoice-document.invoice-a4 {
        max-width: 920px;
    }

.coupon-editor-panel,
.coupon-detail-panel {
    margin-top: 1rem;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}

.dashboard-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 136px;
    padding: 14px 15px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08), 0 2px 0 rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}

    .dashboard-kpi-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background: linear-gradient(140deg, rgba(255, 255, 255, 0.34), transparent 34%);
    }

.dashboard-kpi-card-primary {
    background: #fff;
}

.dashboard-kpi-card-success {
    background: #fff;
}

.dashboard-kpi-card-warning {
    background: #fff;
}

.dashboard-kpi-card-neutral {
    background: #fff;
}

.dashboard-kpi-card .stat-meta.positive {
    color: #059669;
}

.dashboard-kpi-card .stat-meta.negative {
    color: #dc2626;
}

.dashboard-kpi-card .dashboard-kpi-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8fafc;
    border-color: rgba(148, 163, 184, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 5px 10px rgba(15, 23, 42, .06);
    font-size: .92rem;
}

.dashboard-kpi-card .stat-title {
    margin-bottom: 5px;
    font-size: .82rem;
    font-weight: 700;
}

.dashboard-kpi-card .stat-value {
    margin-bottom: 5px;
    font-size: clamp(1.12rem, 1.5vw, 1.48rem);
}

.dashboard-kpi-card .stat-meta {
    display: -webkit-box;
    overflow: hidden;
    font-size: .8rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-panel {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 32%), linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(248, 250, 252, 0.965));
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .65rem;
    align-items: end;
    min-height: 230px;
}

.bar-chart-item {
    display: grid;
    gap: .35rem;
    text-align: center;
    color: #64748b;
    font-size: .75rem;
}

.bar-track {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 999px;
    background: rgba(91, 91, 214, .08);
    overflow: hidden;
}

    .bar-track span {
        width: 100%;
        min-height: 4%;
        border-radius: 999px 999px 0 0;
        background: linear-gradient(180deg, #7c3aed, #14b8a6);
    }

.horizontal-bars {
    display: grid;
    gap: .8rem;
}

.hbar-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    gap: .75rem;
    align-items: center;
}

    .hbar-row > div {
        height: 10px;
        border-radius: 999px;
        background: rgba(148, 163, 184, .18);
        overflow: hidden;
    }

    .hbar-row b {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #5b5bd6, #0f766e);
    }

.invoice-document-header,
.invoice-bill-grid {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .85rem;
    margin-bottom: .85rem;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.invoice-number-box {
    min-width: 220px;
    padding: 1rem;
    border-radius: 1rem;
    background: #111827;
    color: #fff;
    text-align: right;
}

    .invoice-number-box span,
    .invoice-number-box small {
        display: block;
        opacity: .75;
    }

.invoice-total-panel {
    width: min(300px, 100%);
    margin-left: auto;
    display: grid;
    gap: .35rem;
}

    .invoice-total-panel > div {
        padding: .45rem .7rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .invoice-total-panel .grand-total {
        background: #111827;
        color: #fff;
    }

.invoice-document footer {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(148, 163, 184, .25);
    color: #64748b;
    text-align: center;
}

@media print {
    .no-print,
    .top-row,
    .sidebar {
        display: none !important;
    }

    .invoice-print-shell,
    .invoice-document {
        padding: 0;
        box-shadow: none;
    }
}

@media (max-width: 1100px) {
    .order-toolbar-actions,
    .order-filter-row,
    .order-line-row,
    .order-line-heading,
    .order-total-strip {
        grid-template-columns: 1fr;
    }
}

.coupon-switch {
    align-self: end;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: .9rem;
}


.access-denied-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.module-table {
    width: 100%;
    border-collapse: collapse;
}

    .module-table th,
    .module-table td {
        text-align: left;
        padding: 11px 14px;
        border-bottom: 1px solid var(--color-border);
        font-size: 13px;
    }

.module-table th {
    color: var(--color-text-muted);
    font-weight: 600;
}

.settings-grid.four-col,
.report-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-check-group {
    justify-content: end;
}

.report-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-summary-grid .stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, 0.16);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(226, 232, 240, 0.9)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 34%);
    box-shadow:
        0 18px 34px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        inset 0 -10px 20px rgba(15, 118, 110, 0.05);
}

.report-summary-grid .stat-card::after {
    content: "";
    position: absolute;
    inset: auto 16px 12px auto;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(245, 158, 11, 0.16));
    transform: rotate(10deg);
}

.sales-report-insights {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.report-mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.report-mini-row small {
    grid-column: 1 / -1;
    color: var(--color-text-muted);
}

.modal-backdrop-lite {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    z-index: 80;
}

.report-column-modal {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    z-index: 90;
}

.sales-report-preview-shell .preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    max-width: 980px;
    margin: 0 auto 18px;
}

.export-scope-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.audit-filter-summary {
    display: block;
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1100px) {
    .settings-grid.four-col,
    .report-filter-grid,
    .report-summary-grid,
    .sales-report-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .settings-grid.four-col,
    .report-filter-grid,
    .report-summary-grid,
    .sales-report-insights {
        grid-template-columns: 1fr;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body.sales-report-printing,
    body.sales-report-printing .app-shell,
    body.sales-report-printing .main-content {
        display: block !important;
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body.sales-report-printing .sidebar,
    body.sales-report-printing .sidebar-overlay,
    body.sales-report-printing .topbar,
    body.sales-report-printing .page-header,
    body.sales-report-printing .preview-toolbar {
        display: none !important;
    }

    body.sales-report-printing .sales-report-preview-shell {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
}

.validation-message {
    padding: 2px 10px !important;
    background: none !important;
}

.session-card {
    border-radius: 14px;
}

.session-useragent {
    word-break: break-word;
    color: #495057;
}

.bg-success-subtle {
    background-color: #d1e7dd;
}

.bg-danger-subtle {
    background-color: #f8d7da;
}

.profile-summary-card {
    border-radius: 14px;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
}

.profile-field-value {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
    font-weight: 500;
}

.security-shortcut-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
}

.bg-success-subtle {
    background-color: #d1e7dd;
}

.bg-warning-subtle {
    background-color: #fff3cd;
}

.bg-info-subtle {
    background-color: #cff4fc;
}

.bg-secondary-subtle {
    background-color: #e2e3e5;
}

.profile-summary-card {
    border-radius: 14px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.profile-avatar-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dee2e6;
}

.profile-field-value {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
    font-weight: 500;
}

.security-shortcut-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
}

.bg-success-subtle {
    background-color: #d1e7dd;
}

.bg-warning-subtle {
    background-color: #fff3cd;
}

.bg-info-subtle {
    background-color: #cff4fc;
}

.bg-secondary-subtle {
    background-color: #e2e3e5;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ERP shell refresh */
:root {
    --tenant-sidebar-bg: #111827;
    --tenant-header-bg: #1b445c;
    --tenant-accent: #5B5BD6;
    --tenant-accent-soft: color-mix(in srgb, var(--tenant-accent) 14%, white);
    --tenant-sidebar-soft: color-mix(in srgb, var(--tenant-sidebar-bg) 88%, white);
}

.erp-shell {
    background: radial-gradient(circle at top left, rgba(91, 91, 214, 0.08), transparent 28%), linear-gradient(180deg, #f8f9ff 0%, #f4f6fb 48%, #eef2f8 100%);
}

    .erp-shell .sidebar {
        width: 286px;
        background: linear-gradient(180deg, color-mix(in srgb, var(--tenant-sidebar-bg) 93%, #1f2937) 0%, var(--tenant-sidebar-bg) 100%);
        padding: 16px 12px;
        box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
        transition: width 0.22s ease, padding 0.22s ease;
    }

    .erp-shell.sidebar-collapsed .sidebar {
        width: 86px;
        padding-inline: 10px;
    }

    .erp-shell.sidebar-collapsed .brand-meta,
    .erp-shell.sidebar-collapsed .sidebar-user-meta,
    .erp-shell.sidebar-collapsed .sidebar-status-strip {
        display: none;
    }

    .erp-shell .sidebar-brand {
        align-items: flex-start;
        gap: 10px;
        padding: 8px 8px 12px;
        margin-bottom: 12px;
    }

    .erp-shell .brand-logo {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 72%, white));
        box-shadow: 0 14px 28px color-mix(in srgb, var(--tenant-accent) 32%, transparent);
        font-size: 18px;
        letter-spacing: 0.04em;
    }

    .erp-shell .brand-title {
        font-size: 18px;
    }

    .erp-shell .brand-subtitle {
        color: rgba(226, 232, 240, 0.78);
    }

.sidebar-toggle {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.sidebar-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar,
.topbar-user-avatar {
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 76%, white));
}

.sidebar-user-image,
.topbar-user-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.22);
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 14px;
}

.sidebar-user-role {
    color: rgba(226, 232, 240, 0.74);
    font-size: 12px;
}

.sidebar-status-strip,
.topbar-system-pills,
.header-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-status-pill,
.topbar-pill,
.header-chip,
.topbar-badge,
.session-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar-status-pill {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.erp-shell .nav-item {
    margin-bottom: 5px;
}

.erp-shell .nav-link,
.erp-shell .nav-link-parent,
.erp-shell .nav-sublink {
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
}

.erp-shell .nav-link,
.erp-shell .nav-link-parent {
    background: rgba(255, 255, 255, 0.03);
}

    .erp-shell .nav-link:hover,
    .erp-shell .nav-sublink:hover,
    .erp-shell .nav-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.09);
    }

    .erp-shell .nav-link.active,
    .erp-shell .nav-sublink.active {
        background: linear-gradient(135deg, color-mix(in srgb, var(--tenant-accent) 32%, transparent), rgba(255, 255, 255, 0.12));
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

.nav-toggle-btn {
    width: 100%;
    border: 0;
    background: transparent;
}

.nav-link-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-expand-icon {
    margin-left: auto;
}

.nav-level-1.has-children {
    position: relative;
}

.nav-subgroup-toggle {
    color: #dbeafe;
    /*font-weight: 700;*/
    background: rgba(148, 163, 184, 0.08);
}

.nav-submenu-nested {
    margin: 6px 0 8px 18px;
    padding-left: 8px;
    border-left: 1px solid rgba(148, 163, 184, 0.24);
}

.nav-submenu-nested .nav-sublink {
    min-height: 36px;
    padding-block: 7px;
    color: rgba(226, 232, 240, 0.86);
}

.topbar-navigation-inline .nav-level-1.has-children,
.top-header-navigation .nav-level-1.has-children,
.topbar-navigation-inline .nav-level-2.has-children,
.top-header-navigation .nav-level-2.has-children {
    position: relative;
}

/* Fleet / Logistics workspace */
.fleet-workspace {
    display: grid;
    gap: 14px;
}

.fleet-page-header {
    align-items: flex-start;
    margin-bottom: 4px;
}

.fleet-page-header h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 4px;
}

.fleet-page-header p {
    max-width: 760px;
}

.fleet-page-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.fleet-card {
    border-radius: 8px;
    padding: 14px 16px;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.fleet-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.fleet-card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text);
}

.fleet-card-header p {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--color-text-muted);
}

.fleet-count {
    flex: 0 0 auto;
    padding: 4px 9px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.fleet-filter-grid,
.fleet-form-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.fleet-filter-grid.compact {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.fleet-form-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.fleet-readonly-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.fleet-filter-grid .span-2,
.fleet-form-grid .span-2 {
    grid-column: span 2;
}

.fleet-workspace .form-group {
    margin-bottom: 0;
}

.fleet-workspace .form-group label {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.required-marker {
    color: #dc2626;
    font-weight: 900;
}

.fleet-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

.fleet-inline-reason {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #d8e2e7;
    border-radius: 8px;
    background: #f8fbfc;
    min-width: 260px;
    text-align: left;
}

.fleet-inline-reason label {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.compact-actions {
    margin-top: 0.65rem;
    gap: 0.45rem;
}

.fleet-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 0 0;
}

.fleet-sort-link {
    align-items: center;
    border: 0;
    background: transparent;
    display: inline-flex;
    gap: .35rem;
    padding: 0;
    color: inherit;
    font-weight: 700;
}

.fleet-sort-link .fa-sort {
    color: #94a3b8;
}

.fleet-history-panel {
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

.fleet-documents-panel {
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

.fleet-documents-header,
.fleet-document-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fleet-documents-header {
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.fleet-documents-header h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
}

.fleet-documents-header p,
.fleet-document-row span,
.fleet-documents-empty {
    color: #64748b;
    font-size: 0.82rem;
    margin: 0;
}

.fleet-documents-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.fleet-document-row {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.7rem;
    background: #fff;
}

.fleet-document-row > i {
    color: #0f766e;
    font-size: 1rem;
}

.fleet-document-row div {
    flex: 1;
    min-width: 0;
}

.fleet-document-row a,
.fleet-document-link {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.fleet-document-link {
    background: transparent;
    border: 0;
    color: #0f766e;
    padding: 0;
    text-align: left;
}

.fleet-document-row .btn-icon {
    flex: 0 0 auto;
}

.fleet-documents-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    margin-top: 0.75rem;
    padding: 0.75rem;
}

.fleet-history-title {
    align-items: center;
    display: flex;
    font-weight: 700;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.fleet-workspace .form-control,
.fleet-workspace .form-select {
    border-radius: 7px;
}

.fleet-check-field {
    align-self: end;
}

.fleet-check-field .form-check {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 600;
    color: var(--color-text);
}

.fleet-check-field-inline {
    display: flex;
    align-items: end;
    gap: 16px;
}

.fleet-check-field-inline > label:first-child {
    align-self: center;
    margin-right: 4px;
}

.fleet-filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: end;
}

.fleet-filter-actions .btn,
.fleet-form-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.fleet-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.fleet-form-actions .btn {
    min-height: 34px;
}

.fleet-inline-action {
    margin-top: 0.35rem;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.fleet-setup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.35rem 0.35rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    margin-bottom: 1rem;
}

.fleet-setup-tab {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.fleet-setup-tab.active {
    background: #e8f7f3;
    border-color: #67c8b1;
    color: #126653;
}

.fleet-tab-panel {
    padding-top: 0.25rem;
}

.compact-check {
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
    color: #475569;
}

.fleet-steps-cell {
    min-width: 760px;
}

.fleet-step-list {
    display: grid;
    gap: 0.55rem;
}

.fleet-step-editor {
    display: grid;
    grid-template-columns: 72px minmax(180px, 1.35fr) 120px minmax(220px, 1fr) 78px;
    gap: 0.55rem;
    align-items: end;
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #f8fafc;
}

.fleet-step-editor label {
    display: block;
    margin-bottom: 0.2rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fleet-step-number,
.fleet-step-name,
.fleet-step-type,
.fleet-step-person {
    min-width: 0;
}

.fleet-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-bottom: 1px;
}

.compact-actions {
    gap: 0.35rem;
}

.compact-actions .btn {
    min-height: 30px;
}

.fleet-entry-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.fleet-table-card {
    overflow: hidden;
}

.fleet-table-card .empty-state {
    margin: 0;
    padding: 24px 16px;
    border-radius: 0;
    background: #ffffff;
    text-align: left;
}

.fleet-table {
    margin-bottom: 0;
}

.fleet-table th {
    padding: 10px 14px;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.fleet-table td {
    padding: 11px 14px;
    vertical-align: middle;
    font-size: 13px;
}

.fleet-table .form-select-sm {
    min-width: 142px;
}

.fleet-kpi-grid .stat-card {
    border-radius: 8px;
}

@media (max-width: 1200px) {
    .fleet-filter-grid,
    .fleet-filter-grid.compact,
    .fleet-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .fleet-page-header {
        gap: 12px;
    }

    .fleet-filter-grid,
    .fleet-filter-grid.compact,
    .fleet-form-grid {
        grid-template-columns: 1fr;
    }

    .fleet-filter-grid .span-2,
    .fleet-form-grid .span-2 {
        grid-column: span 1;
    }

    .fleet-card-header,
    .fleet-filter-actions,
    .fleet-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fleet-step-editor {
        grid-template-columns: 1fr;
    }

    .fleet-steps-cell {
        min-width: 420px;
    }

    .fleet-step-actions {
        justify-content: flex-start;
    }
}

.topbar-navigation-inline .nav-submenu-level-2,
.top-header-navigation .nav-submenu-level-2 {
    position: absolute;
    top: 0;
    left: calc(100% + 12px);
    min-width: 230px;
    margin: 0;
    padding: 8px;
    border-left: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 26px 48px rgba(15, 23, 42, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateX(6px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.topbar-navigation-inline .nav-submenu-level-3,
.top-header-navigation .nav-submenu-level-3 {
    position: absolute;
    top: 0;
    left: calc(100% + 12px);
    transform: translateX(6px);
}

.topbar-navigation-inline .nav-level-1.has-children:hover > .nav-submenu-level-2,
.topbar-navigation-inline .nav-level-1.has-children:focus-within > .nav-submenu-level-2,
.top-header-navigation .nav-level-1.has-children:hover > .nav-submenu-level-2,
.top-header-navigation .nav-level-1.has-children:focus-within > .nav-submenu-level-2,
.topbar-navigation-inline .nav-level-2.has-children:hover > .nav-submenu-level-3,
.topbar-navigation-inline .nav-level-2.has-children:focus-within > .nav-submenu-level-3,
.top-header-navigation .nav-level-2.has-children:hover > .nav-submenu-level-3,
.top-header-navigation .nav-level-2.has-children:focus-within > .nav-submenu-level-3 {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.topbar-navigation-inline .nav-subgroup-toggle,
.top-header-navigation .nav-subgroup-toggle {
    color: #0f172a;
    background: transparent;
}

.topbar-navigation-inline .nav-subgroup-toggle:hover,
.top-header-navigation .nav-subgroup-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #312e81;
}

.topbar-navigation-inline .nav-submenu-nested .nav-sublink,
.top-header-navigation .nav-submenu-nested .nav-sublink {
    color: #0f172a;
}

.erp-shell .main-content {
    position: relative;
    overflow: visible;
}

.erp-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 6000;
    height: auto;
    min-height: 68px;
    padding: 10px 24px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--tenant-header-bg) 92%, white), var(--tenant-header-bg));
    backdrop-filter: blur(18px);
}

.topbar-leading {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.topbar-title {
    font-size: 26px;
}

.topbar-subtitle {
    font-size: 14px;
}

.topbar-system-pills {
    margin-right: 4px;
}

.topbar-pill,
.header-chip,
.topbar-badge,
.session-pill {
    background: var(--tenant-accent-soft);
    color: #111827;
}

    .header-chip.success-chip {
        background: rgba(16, 185, 129, .14);
        color: #047857;
    }

.topbar-user {
    padding: 7px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.topbar-btn {
    border-radius: 14px;
}

.topbar-btn-danger {
    color: #b91c1c;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-notification-menu {
    position: relative;
}

.topbar-nav-mode-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
}

.topbar-notification-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
}

.topbar-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    border: 2px solid white;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: min(560px, calc(100vh - 92px));
    overflow: auto;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    z-index: 7000;
}

.topbar-notification-menu:hover .notification-popover,
.topbar-notification-menu:focus-within .notification-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-popover-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

    .notification-popover-header strong,
    .notification-popover-header span {
        display: block;
    }

    .notification-popover-header > div > span {
        color: var(--color-text-muted);
        font-size: 13px;
        margin-top: 2px;
    }

.notification-list {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.notification-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

    .notification-item.unread {
        background: linear-gradient(135deg, var(--tenant-accent-soft), rgba(255, 255, 255, 0.88));
    }

.notification-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tenant-accent);
    background: rgba(255, 255, 255, 0.9);
}

.notification-item strong {
    display: block;
    font-size: 13px;
}

.notification-item p {
    margin: 2px 0 0;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.notification-view-all {
    width: 100%;
}

.topbar-account-menu {
    position: relative;
}

.account-chevron {
    color: var(--color-text-muted);
    font-size: 11px;
    margin-left: 2px;
}

.account-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 24px));
    max-height: min(560px, calc(100vh - 92px));
    overflow: auto;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    z-index: 7000;
}

.topbar-account-menu:hover .account-popover,
.topbar-account-menu:focus-within .account-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-popover-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

    .account-popover-header strong,
    .account-popover-header span {
        display: block;
    }

    .account-popover-header span {
        color: var(--color-text-muted);
        font-size: 13px;
    }

.account-popover-image,
.account-popover-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
}

.account-popover-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 72%, white));
}

.account-popover-meta {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

    .account-popover-meta div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 10px;
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.82);
    }

    .account-popover-meta span {
        color: var(--color-text-muted);
        font-size: 12px;
    }

    .account-popover-meta strong {
        font-size: 13px;
        text-align: right;
    }

.account-popover-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.account-logout-btn {
    width: 100%;
}

.top-navigation-mode .main-content {
    margin-left: 0;
}

.erp-shell.top-navigation-mode .topbar {
    background: linear-gradient(180deg, color-mix(in srgb, var(--tenant-sidebar-bg) 93%, #1f2937) 0%, var(--tenant-sidebar-bg) 100%);
}

.topbar-navigation-inline {
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
}

    .topbar-navigation-inline .nav-menu {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .topbar-navigation-inline .nav-item {
        position: relative;
        margin-bottom: 0;
    }

    .topbar-navigation-inline .nav-link,
    .topbar-navigation-inline .nav-link-parent {
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 14px;
        white-space: nowrap;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.06);
        color: rgba(248, 250, 252, 0.86);
    }

        .topbar-navigation-inline .nav-link:hover,
        .topbar-navigation-inline .nav-link-parent:hover,
        .topbar-navigation-inline .nav-link.active,
        .topbar-navigation-inline .nav-link-parent:focus-visible {
            background: rgba(129, 140, 248, 0.22);
            color: #fff;
            border-color: rgba(165, 180, 252, 0.26);
        }

    .topbar-navigation-inline .nav-submenu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 220px;
        padding: 8px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.18);
        box-shadow: 0 26px 48px rgba(15, 23, 42, 0.22);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
        z-index: 7200;
    }

    .topbar-navigation-inline .nav-item:hover > .nav-submenu,
    .topbar-navigation-inline .nav-item:focus-within > .nav-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .topbar-navigation-inline .nav-item:nth-last-child(-n + 2) > .nav-submenu {
        right: 0;
        left: auto;
    }

    .topbar-navigation-inline .nav-menu > .nav-item:first-child > .nav-submenu {
        left: 0;
        right: auto;
        transform-origin: top left;
    }

    .topbar-navigation-inline .nav-menu > .nav-item:first-child .nav-submenu-level-3 {
        left: calc(100% + 12px);
        right: auto;
        transform-origin: top left;
    }

    .topbar-navigation-inline .nav-sublink {
        color: #0f172a;
        border-radius: 12px;
        padding: 10px 12px;
        white-space: nowrap;
    }

        .topbar-navigation-inline .nav-sublink:hover,
        .topbar-navigation-inline .nav-sublink.active {
            background: rgba(99, 102, 241, 0.1);
            color: #312e81;
        }

.top-header-navigation {
    position: sticky;
    top: 68px;
    z-index: 5000;
    padding: 10px 24px 8px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.78));
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    overflow: visible;
}

    .top-header-navigation .nav-menu {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .top-header-navigation .nav-item {
        position: relative;
    }

    .top-header-navigation .nav-link,
    .top-header-navigation .nav-link-parent {
        min-height: 40px;
        padding: 9px 14px;
        border-radius: 14px;
        white-space: nowrap;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.06);
        color: rgba(248, 250, 252, 0.86);
    }

        .top-header-navigation .nav-link:hover,
        .top-header-navigation .nav-link-parent:hover,
        .top-header-navigation .nav-link.active,
        .top-header-navigation .nav-link-parent:focus-visible {
            background: rgba(129, 140, 248, 0.22);
            color: #fff;
            border-color: rgba(165, 180, 252, 0.26);
        }

    .top-header-navigation .nav-submenu {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 220px;
        padding: 8px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.18);
        box-shadow: 0 26px 48px rgba(15, 23, 42, 0.22);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
        z-index: 7200;
    }

    .top-header-navigation .nav-item:hover > .nav-submenu,
    .top-header-navigation .nav-item:focus-within > .nav-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .top-header-navigation .nav-item:nth-last-child(-n + 2) > .nav-submenu {
        right: 0;
        left: auto;
    }

    .top-header-navigation .nav-menu > .nav-item:first-child > .nav-submenu {
        left: 0;
        right: auto;
        transform-origin: top left;
    }

    .top-header-navigation .nav-menu > .nav-item:first-child .nav-submenu-level-3 {
        left: calc(100% + 12px);
        right: auto;
        transform-origin: top left;
    }

    .top-header-navigation .nav-sublink {
        color: #0f172a;
        border-radius: 12px;
        padding: 10px 12px;
        white-space: nowrap;
    }

        .top-header-navigation .nav-sublink:hover,
        .top-header-navigation .nav-sublink.active {
            background: rgba(99, 102, 241, 0.1);
            color: #312e81;
        }

.topbar-navigation-inline .nav-submenu.nav-submenu-level-2,
.top-header-navigation .nav-submenu.nav-submenu-level-2 {
    top: 0;
    left: calc(100% + 12px);
    min-width: 230px;
    margin: 0;
    padding: 8px;
    transform: translateX(6px);
}

.topbar-navigation-inline .nav-submenu.nav-submenu-level-3,
.top-header-navigation .nav-submenu.nav-submenu-level-3 {
    top: 0;
    left: calc(100% + 12px);
    min-width: 230px;
    margin: 0;
    padding: 8px;
    transform: translateX(6px);
}

.topbar-navigation-inline .nav-level-0.has-children > .nav-submenu-level-1,
.top-header-navigation .nav-level-0.has-children > .nav-submenu-level-1 {
    left: 0;
    right: auto;
    transform-origin: top left;
}

.topbar-navigation-inline .nav-level-1.has-children:hover > .nav-submenu-level-2,
.topbar-navigation-inline .nav-level-1.has-children:focus-within > .nav-submenu-level-2,
.top-header-navigation .nav-level-1.has-children:hover > .nav-submenu-level-2,
.top-header-navigation .nav-level-1.has-children:focus-within > .nav-submenu-level-2,
.topbar-navigation-inline .nav-level-2.has-children:hover > .nav-submenu-level-3,
.topbar-navigation-inline .nav-level-2.has-children:focus-within > .nav-submenu-level-3,
.top-header-navigation .nav-level-2.has-children:hover > .nav-submenu-level-3,
.top-header-navigation .nav-level-2.has-children:focus-within > .nav-submenu-level-3 {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.document-request-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-request-form-grid .span-full {
    grid-column: 1 / -1;
}

.document-asset-preview {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.document-asset-preview img {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    max-height: 54px;
    max-width: 140px;
    object-fit: contain;
    padding: 0.35rem;
}

@media (max-width: 768px) {
    .document-request-form-grid {
        grid-template-columns: 1fr;
    }
}

.confirm-dialog-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 140ms ease, visibility 140ms ease;
    z-index: 9999;
}

    .confirm-dialog-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

.confirm-dialog {
    width: min(100%, 420px);
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 34px 80px rgba(15, 23, 42, 0.28);
    text-align: center;
    transform: translateY(10px) scale(0.98);
    transition: transform 160ms ease;
}

.confirm-dialog-backdrop.show .confirm-dialog {
    transform: translateY(0) scale(1);
}

.confirm-dialog-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 30px;
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.95), rgba(255, 247, 237, 0.95));
}

.session-expired-dialog-icon {
    color: var(--tenant-primary);
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(221, 214, 254, 0.9));
}

.confirm-dialog-body h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.confirm-dialog-body p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.kyc-shell {
    display: grid;
    gap: 18px;
}

.kyc-summary-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: end;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--tenant-accent) 18%, transparent), transparent 34%), rgba(255, 255, 255, 0.9);
}

    .kyc-summary-card h3 {
        margin: 8px 0 4px;
        font-size: 28px;
    }

    .kyc-summary-card p {
        color: var(--color-text-muted);
    }

.kyc-progress {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.kyc-progress-track {
    flex: 1;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

    .kyc-progress-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 65%, #22c55e));
    }

.kyc-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.kyc-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: 16px;
    align-items: start;
}

.kyc-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.kyc-card > .settings-grid,
.kyc-card > .document-upload-box {
    align-self: stretch;
}

.kyc-card > .kyc-status-row {
    grid-column: 1 / -1;
}

.kyc-step {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 72%, white));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--tenant-accent) 22%, transparent);
}

.kyc-card-header h3 {
    margin: 0 0 4px;
}

.kyc-card-header p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.document-upload-box {
    min-height: 124px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px dashed color-mix(in srgb, var(--tenant-accent) 42%, rgba(148, 163, 184, 0.45));
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.74));
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

    .document-upload-box > div:last-child {
        min-width: 0;
    }

    .document-upload-box:hover {
        transform: translateY(-1px);
        border-color: var(--tenant-accent);
        box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    }

.document-upload-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tenant-accent);
    background: var(--tenant-accent-soft);
    font-size: 22px;
}

.document-upload-box strong,
.document-upload-box small {
    display: block;
}

.document-upload-box small {
    margin-top: 4px;
    color: var(--color-text-muted);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.kyc-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 16px;
    color: #92400e;
    background: rgba(254, 243, 199, 0.7);
}

    .kyc-status-row.complete {
        color: #047857;
        background: rgba(209, 250, 229, 0.75);
    }

.kyc-review-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .kyc-review-card h3 {
        margin: 0 0 4px;
    }

    .kyc-review-card p {
        margin: 0;
        color: var(--color-text-muted);
    }

.btn {
    --bs-btn-border-radius: 14px;
    --bs-btn-font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color: var(--tenant-accent);
    --bs-btn-border-color: color-mix(in srgb, var(--tenant-accent) 70%, white);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--tenant-accent);
    --bs-btn-hover-border-color: var(--tenant-accent);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--tenant-accent);
    --bs-btn-active-border-color: var(--tenant-accent);
}

.btn-outline-secondary {
    --bs-btn-color: var(--color-text);
    --bs-btn-border-color: rgba(148, 163, 184, 0.35);
    --bs-btn-hover-color: var(--color-text);
    --bs-btn-hover-bg: rgba(148, 163, 184, 0.12);
    --bs-btn-hover-border-color: rgba(148, 163, 184, 0.5);
    --bs-btn-active-color: var(--color-text);
    --bs-btn-active-bg: rgba(148, 163, 184, 0.16);
    --bs-btn-active-border-color: rgba(148, 163, 184, 0.56);
}

.btn-outline-danger {
    --bs-btn-color: #b91c1c;
    --bs-btn-border-color: rgba(239, 68, 68, 0.35);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #dc2626;
    --bs-btn-hover-border-color: #dc2626;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #b91c1c;
    --bs-btn-active-border-color: #b91c1c;
}

.erp-shell .page-content {
    padding: 28px;
}

.page-header-wide {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.stat-card,
.content-card {
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.05);
}

.settings-card,
.profile-hero-card {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.modern-settings-shell .settings-tabs {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
    padding: 14px;
    height: fit-content;
}

.modern-settings-shell .settings-tab {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 16px;
    padding: 14px 16px;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .modern-settings-shell .settings-tab.active {
        background: linear-gradient(135deg, var(--tenant-accent-soft), rgba(255, 255, 255, 0.92));
        color: var(--color-text);
    }

.settings-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-overview-grid,
.theme-editor-grid,
.management-card-grid,
.erp-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.settings-overview-grid {
    margin-bottom: 18px;
}

.settings-overview-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    padding: 16px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

    .settings-overview-card:hover,
    .settings-overview-card.active {
        transform: translateY(-1px);
        border-color: color-mix(in srgb, var(--tenant-accent) 38%, transparent);
        box-shadow: 0 22px 42px rgba(15, 23, 42, 0.08);
    }

    .settings-overview-card strong,
    .settings-overview-card small {
        display: block;
    }

    .settings-overview-card small {
        margin-top: 4px;
        color: var(--color-text-muted);
        line-height: 1.45;
    }

.theme-picker-card,
.management-card,
.erp-note-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
}

.management-card {
    min-height: 180px;
}

    .management-card strong {
        font-size: 16px;
    }

    .management-card small,
    .erp-note-card p {
        color: var(--color-text-muted);
        line-height: 1.55;
    }

.management-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 72%, white));
}

.color-input {
    width: 100%;
    height: 58px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    cursor: pointer;
}

.erp-note-card h4 {
    margin: 0;
    font-size: 16px;
}

.status-banner {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(199deg, var(--tenant-accent-soft), rgb(133 225 127 / 92%));
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.status-banner-dismissible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.status-banner-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: auto;
    border: 0;
    border-radius: 999px;
    color: inherit;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
}

    .status-banner-close:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .status-banner.success {
        color: #064e3b;
        background: linear-gradient(135deg, rgba(220, 252, 231, 0.96), rgba(187, 247, 208, 0.88));
        border-color: rgba(16, 185, 129, 0.28);
    }

    .status-banner.danger {
        color: #7f1d1d;
        background: linear-gradient(135deg, rgba(254, 226, 226, 0.98), rgba(254, 202, 202, 0.88));
        border-color: rgba(239, 68, 68, 0.28);
    }

.action-result-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: min(100%, 520px);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    animation: resultBarIn 0.24s ease-out;
}

.result-crumb {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

@keyframes resultBarIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ghost-btn,
.action-btn {
    border-radius: 14px;
}

.action-btn,
.auth-submit-btn {
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 76%, white));
}

.image-upload-panel,
.security-toggle,
.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.16);
    margin: 22px 0;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-image-showcase-card {
    overflow: hidden;
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--tenant-accent) 18%, transparent), transparent 34%), linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
}

.profile-image-showcase {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.profile-image-preview-wrap {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0 auto;
}

.profile-image-preview {
    width: 190px;
    height: 190px;
    border-radius: 36px;
    object-fit: cover;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
    border: 5px solid rgba(255, 255, 255, 0.9);
}

.profile-image-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 58px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 68%, white));
}

.profile-image-status {
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    font-size: 12px;
    font-weight: 800;
}

    .profile-image-status.pending {
        color: #92400e;
    }

    .profile-image-status.verified {
        color: #047857;
    }

.profile-image-content h3 {
    margin: 4px 0 4px;
    font-size: 28px;
}

.profile-image-content p {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.eyebrow-label {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--tenant-accent-soft);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 800;
}

.profile-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

    .profile-fact-grid div {
        padding: 11px 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(148, 163, 184, 0.14);
    }

    .profile-fact-grid span,
    .field-help,
    .profile-upload-hint {
        display: block;
        color: var(--color-text-muted);
        font-size: 12px;
    }

    .profile-fact-grid strong {
        display: block;
        margin-top: 3px;
        font-size: 13px;
    }

.profile-upload-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.profile-upload-btn {
    position: relative;
    overflow: hidden;
}

.profile-hero-avatar,
.profile-hero-image {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    object-fit: cover;
}

.profile-hero-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--tenant-accent), color-mix(in srgb, var(--tenant-accent) 72%, white));
}

.profile-hero-name {
    font-size: 24px;
    font-weight: 800;
}

.profile-hero-role,
.profile-hero-email,
.toggle-copy,
.session-meta {
    color: var(--color-text-muted);
}

.toggle-title,
.session-title {
    font-weight: 700;
}

.settings-grid {
    display: grid;
    gap: 18px;
}

    .settings-grid.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .settings-grid.two-col > .span-2 {
            grid-column: 1 / -1;
        }

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 18px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.settings-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

    .settings-actions .inline-action-feedback {
        margin-right: auto;
    }

@media (max-width: 1200px) {
    .settings-overview-grid,
    .theme-editor-grid,
    .management-card-grid,
    .erp-note-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .page-header-wide,
    .image-upload-panel,
    .security-toggle,
    .session-item,
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-settings-shell {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .erp-shell .sidebar {
        width: 100px;
    }

    .erp-shell .page-content {
        padding: 18px;
    }

    .theme-editor-grid,
    .settings-overview-grid,
    .management-card-grid,
    .erp-note-grid,
    .kyc-summary-card,
    .kyc-card,
    .profile-image-showcase,
    .pos-workspace-shell,
    .settings-grid.two-col,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .kyc-progress,
    .kyc-review-card {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-image-preview-wrap,
    .profile-image-preview {
        width: 150px;
        height: 150px;
    }

    .topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .pos-summary-card {
        position: static;
    }

    .pos-adjustment-grid,
    .pos-total-strip {
        grid-template-columns: 1fr;
    }
}

.user-role-assign {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.role-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-list-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    text-align: left;
}

    .role-list-item.active {
        border-color: color-mix(in srgb, var(--tenant-accent) 35%, transparent);
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--tenant-accent) 12%, transparent);
    }

.role-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.catalog-list-card {
    margin-bottom: 18px;
    margin-top: 1rem;
}

.catalog-toolbar,
.catalog-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

    .catalog-toolbar h3,
    .catalog-editor-header h3 {
        margin: 0 0 4px;
    }

    .catalog-toolbar p,
    .catalog-editor-header p {
        margin: 0;
        color: var(--color-text-muted);
        font-size: 13px;
    }

.catalog-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: min(100%, 620px);
    margin-top: 1rem;
}

.category-toolbar {
    margin-bottom: 12px;
}

.category-toolbar-row {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.category-search {
    width: 100%;
}

.category-add-btn {
    justify-self: end;
    white-space: nowrap;
}

.compact-table th,
.compact-table td {
    vertical-align: middle;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

    .clickable-row:hover {
        background: rgba(77, 119, 255, 0.06);
    }

    .clickable-row.selected {
        background: rgba(77, 119, 255, 0.1);
        box-shadow: inset 3px 0 0 var(--color-primary);
    }

.table-responsive {
    overflow-x: auto;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.erp-table th,
.erp-table td {
    font-size: 13px;
    line-height: 1.35;
    padding: 10px 12px;
}

.erp-table th {
    font-weight: 650;
    color: var(--color-text-muted);
}

.erp-table td strong {
    font-weight: 650;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 6px;
}

    .status-dot.active {
        background: var(--color-success);
    }

    .status-dot.inactive {
        background: var(--color-text-muted);
    }

.catalog-editor-card {
    margin-top: 18px;
}

.catalog-detail-card {
    margin-top: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

    .detail-grid > div {
        border: 1px solid var(--color-border);
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.72);
        padding: 12px 14px;
    }

    .detail-grid span {
        display: block;
        color: var(--color-text-muted);
        font-size: 12px;
        margin-bottom: 4px;
    }

    .detail-grid strong {
        color: var(--color-text);
        font-size: 14px;
    }

.detail-description {
    margin-top: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.04);
    color: var(--color-text-muted);
    padding: 14px;
}

.compact-form .settings-grid {
    gap: 12px;
}

.compact-textarea {
    min-height: 76px;
    resize: vertical;
}

.compact-toggle-grid {
    gap: 10px;
}

.text-end {
    text-align: right !important;
}

.me-1 {
    margin-right: 0.25rem;
}

.btn-sm {
    --bs-btn-padding-y: 0.3rem;
    --bs-btn-padding-x: 0.65rem;
    --bs-btn-font-size: 0.82rem;
}

.customer-toolbar-actions {
    flex: 1;
    min-width: min(100%, 760px);
}

    .customer-toolbar-actions .list-search {
        flex: 1 1 360px;
        max-width: none;
    }

.customer-status-filter {
    flex: 0 0 160px;
}

.customer-add-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.customer-editor-panel {
    margin: 14px 0 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.82));
}

.settings-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pr-header-grid {
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(120px, 0.6fr);
    gap: 10px 14px;
}

.pr-compact-field {
    min-height: 34px;
}

.pr-line-table-wrap {
    margin-bottom: 14px;
}

.pr-line-table th,
.pr-line-table td {
    vertical-align: middle;
}

.pr-line-table .form-control {
    min-width: 110px;
}

.pr-line-table td:first-child .form-control {
    min-width: 220px;
}

.pr-number-field {
    max-width: 130px;
}

.pr-unit-field {
    max-width: 120px;
}

.vendor-select-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

    .vendor-select-panel .check-row {
        align-items: flex-start;
        gap: 10px;
        min-height: 54px;
    }

    .vendor-select-panel small {
        display: block;
        color: var(--color-text-muted);
        font-size: 12px;
        margin-top: 2px;
    }

@media (max-width: 1100px) {
    .vendor-select-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .pr-header-grid,
    .vendor-select-panel {
        grid-template-columns: 1fr;
    }
}

.customer-form-grid {
    gap: 12px;
}

.form-group-wide {
    grid-column: 1 / -1;
}

.customer-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 240px));
}

.customer-detail-card {
    border: 1px solid rgba(91, 91, 214, 0.12);
}

.customer-profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(91, 91, 214, 0.09), rgba(20, 184, 166, 0.08));
}

    .customer-profile-hero h4 {
        margin: 0 0 4px;
    }

    .customer-profile-hero p {
        margin: 0;
        color: var(--color-text-muted);
        font-size: 13px;
    }

.customer-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--tenant-accent), #14b8a6);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 14px 30px rgba(91, 91, 214, 0.2);
}

.customer-profile-hero .header-chip {
    margin-left: auto;
}

    .customer-profile-hero .header-chip + .header-chip {
        margin-left: 0;
    }

.customer-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-description span {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-description p {
    margin: 0;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .user-role-assign,
    .permission-grid,
    .category-toolbar-row {
        grid-template-columns: 1fr;
    }

    .category-add-btn {
        justify-self: stretch;
    }
}

@media (max-width: 1100px) {
    .catalog-toolbar,
    .catalog-editor-header {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-toolbar-actions,
    .customer-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .settings-grid.three-col,
    .customer-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .catalog-toolbar-actions,
    .customer-toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-status-filter,
    .customer-add-btn {
        flex-basis: auto;
    }

    .settings-grid.three-col,
    .customer-detail-grid,
    .customer-toggle-grid {
        grid-template-columns: 1fr;
    }

    .customer-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

        .customer-profile-hero .header-chip {
            margin-left: 0;
        }
}

.cms-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.cms-side {
    position: sticky;
    top: 86px;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.cms-tab {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--color-text);
    font-weight: 800;
    text-align: left;
}

    .cms-tab.active,
    .cms-tab:hover {
        border-color: rgba(91, 91, 214, 0.18);
        background: rgba(91, 91, 214, 0.1);
        color: var(--tenant-accent);
    }

.cms-main {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

    .form-grid.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .form-grid.four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

.form-field {
    display: grid;
    gap: 7px;
    color: var(--color-text);
    font-weight: 800;
}

    .form-field span {
        font-size: 13px;
    }

.required-star {
    color: #dc2626;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

    .section-heading h2 {
        margin: 0;
        font-size: 24px;
    }

    .section-heading p {
        margin: 4px 0 0;
        color: var(--color-text-muted);
    }

.switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 800;
}

.cms-page-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.cms-page-chip {
    display: grid;
    gap: 3px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #fff;
    text-align: left;
}

    .cms-page-chip.active {
        border-color: rgba(91, 91, 214, 0.35);
        background: rgba(91, 91, 214, 0.09);
    }

    .cms-page-chip span {
        font-weight: 900;
    }

    .cms-page-chip small {
        color: var(--color-text-muted);
    }

.section-editor {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px dashed rgba(91, 91, 214, 0.24);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.78);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.metric-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(91, 91, 214, 0.1), rgba(20, 184, 166, 0.08));
}

    .metric-card strong {
        font-size: 26px;
    }

    .metric-card small,
    .metric-card span {
        color: var(--color-text-muted);
    }

@media (max-width: 980px) {
    .cms-shell,
    .form-grid.three,
    .form-grid.four {
        grid-template-columns: 1fr;
    }

    .cms-side {
        position: static;
    }
}

.campaign-detail-panel {
    display: grid;
    gap: 18px;
    padding: clamp(18px, 2.2vw, 28px);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 30px;
    background: radial-gradient(circle at 8% 10%, rgba(91, 91, 214, 0.12), transparent 22rem), radial-gradient(circle at 92% 8%, rgba(20, 184, 166, 0.14), transparent 22rem), rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
}

.campaign-detail-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: clamp(18px, 2vw, 24px);
    border: 1px solid rgba(91, 91, 214, 0.08);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(247, 248, 255, 0.92), rgba(236, 253, 245, 0.88));
}

.campaign-detail-mark {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--tenant-accent), #14b8a6);
    color: #fff;
    font-size: 26px;
    box-shadow: 0 18px 34px rgba(91, 91, 214, 0.24);
}

.campaign-detail-copy {
    display: grid;
    gap: 8px;
}

    .campaign-detail-copy h3 {
        margin: 0;
        color: var(--color-text);
        font-size: clamp(28px, 3.2vw, 44px);
        line-height: 1.02;
        letter-spacing: -0.045em;
        font-weight: 760;
    }

    .campaign-detail-copy p {
        max-width: 760px;
        margin: 0;
        color: var(--color-text-muted);
    }

.campaign-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.campaign-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .campaign-chip-row span {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        padding: 7px 12px;
        border-radius: 999px;
        background: rgba(91, 91, 214, 0.1);
        color: var(--color-text);
        font-size: 13px;
        font-weight: 800;
    }

    .campaign-chip-row .danger {
        background: rgba(239, 68, 68, 0.1);
        color: #b91c1c;
    }

    .campaign-chip-row .success {
        background: rgba(16, 185, 129, 0.13);
        color: #047857;
    }

.campaign-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

    .campaign-metric-grid > div {
        display: grid;
        gap: 6px;
        min-height: 98px;
        padding: 16px;
        border: 1px solid rgba(15, 23, 42, 0.06);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.84);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    }

    .campaign-metric-grid span {
        color: var(--color-text-muted);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .campaign-metric-grid strong {
        color: var(--color-text);
        font-size: 19px;
        line-height: 1.25;
    }

.dashboard-click-card {
    color: inherit;
    text-decoration: none;
    transform: translateZ(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

    .dashboard-click-card:hover,
    .dashboard-click-card:focus-visible {
        border-color: rgba(91, 91, 214, 0.28);
        box-shadow: 0 28px 56px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
        transform: translateY(-6px) scale(1.01);
    }

.dashboard-kpi-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(226, 232, 240, 0.9));
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.88);
    color: var(--tenant-accent);
}

.account-permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 9px;
}

    .account-permission-grid span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        padding: 9px 12px;
        border: 1px solid rgba(15, 23, 42, 0.07);
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.88);
        color: var(--color-text);
        font-weight: 750;
    }

    .account-permission-grid i {
        color: #10b981;
    }

.inline-category-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

    .inline-category-create .btn {
        white-space: nowrap;
    }

@media (max-width: 720px) {
    .campaign-detail-hero {
        grid-template-columns: 1fr;
    }

    .campaign-detail-actions {
        justify-content: flex-start;
    }

    .inline-category-create {
        grid-template-columns: 1fr;
    }
}

/* Responsive shell and public auth polish */
.mobile-navigation-toggle {
    display: none;
}

.mobile-navigation-backdrop {
    display: none;
}

.auth-body {
    background: radial-gradient(circle at 12% 12%, rgba(79, 70, 229, .22), transparent 24rem), radial-gradient(circle at 88% 8%, rgba(14, 165, 233, .14), transparent 22rem), linear-gradient(135deg, #eef2ff, #f8fafc 48%, #ecfeff);
}

.auth-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 460px);
    align-items: center;
    gap: clamp(1.25rem, 4vw, 4rem);
    width: min(1120px, 100%);
    margin-inline: auto;
}

    .auth-shell::before {
        content: "TenantSaaS\A Smart POS, customers, catalog, websites, KYC, and reporting in one secure workspace.";
        white-space: pre-line;
        display: grid;
        align-content: end;
        min-height: 560px;
        padding: clamp(2rem, 5vw, 4rem);
        border: 1px solid rgba(255, 255, 255, .5);
        border-radius: 34px;
        background: linear-gradient(160deg, rgba(15, 23, 42, .88), rgba(30, 41, 59, .76)), radial-gradient(circle at 20% 18%, rgba(99, 102, 241, .42), transparent 16rem), radial-gradient(circle at 92% 2%, rgba(56, 189, 248, .32), transparent 17rem);
        box-shadow: 0 34px 80px rgba(15, 23, 42, .18);
        color: #f8fafc;
        font-size: clamp(1.1rem, 2.4vw, 1.7rem);
        font-weight: 650;
        line-height: 1.45;
    }

.auth-card {
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 28px 72px rgba(15, 23, 42, .16);
    backdrop-filter: blur(18px) saturate(1.08);
    width: 100%;
    max-width: 500px;
    justify-self: center;
    padding: 28px;
}

    .auth-card .form-control {
        min-height: 48px;
        border-radius: 16px;
    }

.register-auth-shell {
    grid-template-columns: minmax(280px, .78fr) minmax(560px, 1.22fr);
    width: min(1280px, 100%);
}

    .register-auth-shell::before {
        content: "Launch faster\A One setup creates tenant access, owner security, default branch, currency, timezone, website content, and backoffice navigation.";
        min-height: 620px;
        background: linear-gradient(135deg, rgba(15, 23, 42, .78), rgba(17, 24, 39, .68)), radial-gradient(circle at 20% 18%, rgba(91, 91, 214, .46), transparent 15rem), radial-gradient(circle at 82% 18%, rgba(20, 184, 166, .42), transparent 16rem), url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1200&q=80");
        background-size: cover;
        background-position: center;
        color: white;
    }

.register-auth-card {
    max-width: 760px;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.register-form-grid {
    gap: 12px 14px;
}

    .register-form-grid .form-group {
        margin-bottom: 0;
    }

.auth-submit-btn {
    height: 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, #111827, #4338ca);
    font-weight: 700;
    padding: 10px 15px;
}

.tenant-pull-right {
    float: right;
}

.tenant-top-1rem {
    margin-top: 1rem;
}

.tenant-bottom-1rem {
    margin-bottom: 1rem;
}

.tenant-top-bottom-1rem {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 980px) {
    .mobile-navigation-toggle {
        display: inline-flex;
    }

    .erp-shell:not(.top-navigation-mode) .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1050;
        width: min(286px, calc(100vw - 3rem));
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 30px 0 70px rgba(15, 23, 42, .22);
    }

    .erp-shell.mobile-navigation-open:not(.top-navigation-mode) .sidebar {
        transform: translateX(0);
    }

    .erp-shell.mobile-navigation-open:not(.top-navigation-mode) .mobile-navigation-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        border: 0;
        background: rgba(15, 23, 42, .42);
    }

    .erp-shell:not(.top-navigation-mode) .main-content {
        width: 100%;
    }

    .topbar {
        min-height: 64px;
        padding: 0 12px;
    }

    .topbar-actions {
        gap: 8px;
    }

    .topbar-account-menu .topbar-user {
        padding: 6px;
    }

    .topbar-user > div:not(.topbar-user-avatar) {
        display: none;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .auth-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }

        .auth-shell::before {
            order: 2;
            min-height: 180px;
            padding: 1.15rem 1.25rem;
            border-radius: 24px;
            font-size: 1rem;
        }

    .auth-card {
        order: 1;
        max-width: 100%;
        max-height: none;
        overflow: visible;
        padding: 22px 18px;
    }

    .register-auth-shell {
        grid-template-columns: 1fr;
    }

        .register-auth-shell::before {
            min-height: 190px;
        }

    .register-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid,
    .header-chip-row {
        grid-template-columns: 1fr;
    }

    .page-header-wide {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .bar-chart {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .bar-chart-item {
        min-width: 58px;
    }

    .hbar-row {
        grid-template-columns: minmax(80px, 1fr);
        gap: 6px;
    }

        .hbar-row div,
        .hbar-row strong {
            grid-column: 1 / -1;
        }
}

/* Auth and branding refinement */
.brand-logo-image {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, .2);
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
}

.auth-split-shell {
    grid-template-columns: minmax(320px, 1.02fr) minmax(420px, .98fr);
    width: min(1240px, calc(100% - 32px));
}

.auth-compact-shell {
    align-items: center;
}

.auth-generic-showcase {
    min-height: 600px;
    background: linear-gradient(150deg, rgba(15, 23, 42, .93), rgba(37, 99, 235, .44)), radial-gradient(circle at 18% 18%, rgba(99, 102, 241, .38), transparent 15rem), radial-gradient(circle at 88% 12%, rgba(45, 212, 191, .22), transparent 16rem), url("https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    background-position: center;
}

.auth-showcase-copy {
    display: grid;
    gap: 12px;
}

    .auth-showcase-copy h2 {
        margin: 0;
        color: #fff;
        font-size: clamp(2rem, 3vw, 3.25rem);
        line-height: 1.02;
        max-width: 11ch;
    }

    .auth-showcase-copy p {
        margin: 0;
        max-width: 34rem;
        color: rgba(255, 255, 255, .8);
        font-size: 1rem;
        line-height: 1.65;
    }

.auth-showcase-points {
    display: grid;
    gap: 12px;
}

    .auth-showcase-points div {
        display: grid;
        gap: 4px;
        padding: 16px 18px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, .12);
        background: rgba(15, 23, 42, .28);
    }

    .auth-showcase-points strong {
        color: #fff;
        font-size: .98rem;
    }

    .auth-showcase-points span {
        color: rgba(255, 255, 255, .72);
        font-size: .92rem;
    }

.auth-login-card {
    max-width: 560px;
    min-height: 610px !important;
    border-radius: 22px;
    padding: clamp(24px, 3vw, 36px);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-links {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.auth-links-spread {
    justify-content: space-between;
}

.auth-links a,
.auth-text-btn,
.register-login-link {
    color: #475569;
    font-weight: 600;
}

.auth-text-btn {
    border: 0;
    padding: 0;
    background: transparent;
}

.register-wizard-shell {
    grid-template-columns: minmax(320px, .86fr) minmax(560px, 1.14fr);
    width: min(1340px, calc(100% - 32px));
}

.register-showcase {
    min-height: 750px;
}

.register-showcase-copy h2 {
    max-width: 13ch;
    font-size: clamp(2rem, 3vw, 3.4rem);
}

.register-step-card {
    backdrop-filter: blur(8px);
}

.register-step-number {
    width: 36px;
    height: 36px;
    font-size: .82rem;
}

.register-wizard-card {
    align-self: center;
    max-width: 760px;
    min-height: 760px;
}

.register-wizard-form .form-control,
.auth-card .form-control {
    min-height: 52px;
    border-radius: 16px;
}

.register-form-grid .span-2 {
    grid-column: 1 / -1;
}

.platform-brand-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: rgba(248, 250, 252, .92);
    margin-top: 1rem;
}

    .platform-brand-preview > div {
        display: grid;
        gap: 4px;
    }

    .platform-brand-preview strong {
        font-size: 1rem;
        color: var(--color-text);
    }

    .platform-brand-preview span {
        color: var(--color-text-muted);
    }

.inventory-inline-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(91, 91, 214, .16);
    background: rgba(243, 244, 255, .9);
}

    .inventory-inline-summary strong {
        color: var(--color-text);
    }

    .inventory-inline-summary span {
        color: var(--color-text-muted);
    }

.action-toast-shell {
    position: fixed;
    top: calc(var(--top-header-height, 0px) + 12px);
    right: 24px;
    z-index: 5500;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.action-toast {
    min-width: 280px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
    background: #fff;
    color: var(--color-text);
}

.inline-action-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
}

    .inline-action-feedback.success {
        color: #047857;
        background: rgba(16, 185, 129, .12);
        border: 1px solid rgba(16, 185, 129, .2);
    }

    .inline-action-feedback.error {
        color: #b91c1c;
        background: rgba(239, 68, 68, .12);
        border: 1px solid rgba(239, 68, 68, .2);
    }

    .inline-action-feedback.warning {
        color: #92400e;
        background: rgba(245, 158, 11, .12);
        border: 1px solid rgba(245, 158, 11, .22);
    }

    .inline-action-feedback.info {
        color: #075985;
        background: rgba(14, 165, 233, .12);
        border: 1px solid rgba(14, 165, 233, .22);
    }

.action-toast.success {
    border-color: rgba(16, 185, 129, .22);
}

    .action-toast.success i {
        color: #10b981;
    }

.action-toast.error {
    border-color: rgba(239, 68, 68, .22);
}

    .action-toast.error i {
        color: #ef4444;
    }

.action-toast.warning {
    border-color: rgba(245, 158, 11, .24);
}

    .action-toast.warning i {
        color: #f59e0b;
    }

.action-toast.info {
    border-color: rgba(14, 165, 233, .24);
}

    .action-toast.info i {
        color: #0ea5e9;
    }

.form-label-with-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.required-indicator {
    color: #ef4444;
    margin-left: 4px;
}

.info-icon-btn {
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    background: rgba(248, 250, 252, .96);
    color: var(--color-text-muted);
    flex-shrink: 0;
    padding: 0.1rem;
}

    .info-icon-btn:hover {
        color: var(--color-accent);
        border-color: rgba(91, 91, 214, .28);
    }

.page-title-with-help {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.list-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

    .list-filter-grid .form-group {
        margin-bottom: 0;
    }

.inventory-report-shell {
    display: grid;
    gap: 20px;
}

.inventory-report-filters {
    padding: 22px 24px;
}

.inventory-report-filter-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 0;
}

.inventory-finance-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.inventory-finance-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 10px;
    padding: 22px 24px;
    border-radius: 24px;
    border: 1px solid rgba(91, 91, 214, .14);
    background: radial-gradient(circle at top right, rgba(91, 91, 214, .12), transparent 42%), linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(244, 246, 255, .92));
    box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

.inventory-finance-kicker {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.inventory-finance-panel strong {
    font-size: clamp(1.6rem, 2.2vw, 2.35rem);
    line-height: 1;
    color: #0f172a;
}

.inventory-finance-panel p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.inventory-finance-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .16);
    font-size: .92rem;
    color: var(--color-text-muted);
}

    .inventory-finance-meta strong {
        font-size: 1rem;
        color: #111827;
    }

.inventory-report-stats .stat-card-emphasis {
    border: 1px solid rgba(239, 68, 68, .14);
    background: radial-gradient(circle at top right, rgba(239, 68, 68, .10), transparent 38%), linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 247, 247, .96));
}

.inventory-report-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, .9fr);
    gap: 20px;
}

.inventory-report-card {
    height: 100%;
}

    .inventory-report-card .content-card-header p {
        margin: 4px 0 0;
        color: var(--color-text-muted);
    }

.inventory-report-card-wide {
    min-height: 100%;
}

.inventory-report-card-alert {
    border: 1px solid rgba(239, 68, 68, .12);
    background: radial-gradient(circle at top right, rgba(248, 113, 113, .08), transparent 38%), rgba(255, 255, 255, .96);
}

.inventory-deadstock-list {
    display: grid;
    gap: 14px;
}

.inventory-deadstock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(239, 68, 68, .10);
    background: rgba(255, 251, 251, .92);
}

.inventory-deadstock-value {
    display: grid;
    justify-items: end;
    gap: 10px;
}

    .inventory-deadstock-value span {
        font-weight: 700;
        color: #991b1b;
    }

.inventory-financial-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.inventory-financial-line {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(248, 250, 252, .9);
}

    .inventory-financial-line span {
        color: var(--color-text-muted);
        font-size: .9rem;
    }

    .inventory-financial-line strong {
        color: #0f172a;
        font-size: 1.15rem;
    }

.inventory-financial-line-strong {
    border-color: rgba(91, 91, 214, .16);
    background: rgba(243, 244, 255, .95);
}

.inventory-chip-positive {
    background: rgba(16, 185, 129, .14);
    color: #047857;
}

.inventory-chip-warning {
    background: rgba(245, 158, 11, .14);
    color: #b45309;
}

.inventory-chip-danger {
    background: rgba(239, 68, 68, .14);
    color: #b91c1c;
}

.inventory-chip-neutral {
    background: rgba(148, 163, 184, .16);
    color: #475569;
}

.financial-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.module-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    margin-bottom: 18px;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .96));
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.module-subnav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    color: rgba(255, 255, 255, .78);
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

    .module-subnav-link:hover {
        background: rgba(255, 255, 255, .08);
        color: #fff;
        transform: translateY(-1px);
    }

    .module-subnav-link.active {
        background: linear-gradient(135deg, #eef2ff, #dbeafe);
        color: #0f172a;
        box-shadow: inset 0 0 0 1px rgba(91, 91, 214, .16);
    }

.inventory-dashboard-bars .hbar-row span {
    font-weight: 600;
}

.inventory-dashboard-bars .hbar-row b {
    background: linear-gradient(135deg, #5b5bd6, #14b8a6);
}

.procurement-3d-card,
.procurement-3d-panel {
    transform: translateZ(0);
    box-shadow: 0 26px 60px rgba(15, 23, 42, .11), 0 10px 22px rgba(20, 184, 166, .05), inset 0 1px 0 rgba(255, 255, 255, .92), inset 0 -14px 28px rgba(15, 23, 42, .035);
}

    .procurement-3d-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 34px 72px rgba(15, 23, 42, .14), 0 12px 26px rgba(20, 184, 166, .08), inset 0 1px 0 rgba(255, 255, 255, .95);
    }

.procurement-value-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.procurement-value-card {
    min-height: 142px;
}

.procurement-pipeline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.procurement-pipeline-step,
.procurement-flow-step {
    position: relative;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: radial-gradient(circle at top right, rgba(20, 184, 166, .12), transparent 36%), linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 250, 252, .94));
    box-shadow: 0 18px 38px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .9);
}

    .procurement-pipeline-step strong {
        display: block;
        font-size: 2rem;
        line-height: 1;
        color: #0f172a;
    }

    .procurement-pipeline-step span,
    .procurement-flow-step strong {
        display: block;
        margin-top: 8px;
        font-weight: 800;
        color: #111827;
    }

    .procurement-pipeline-step p,
    .procurement-flow-step p {
        margin: 6px 0 0;
        color: #64748b;
        font-size: .88rem;
    }

.procurement-timeline {
    display: grid;
    gap: 10px;
}

.procurement-timeline-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(248, 250, 252, .86);
    border: 1px solid rgba(148, 163, 184, .14);
}

    .procurement-timeline-row p {
        margin: 3px 0 0;
        color: #64748b;
    }

.procurement-timeline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-weight: 800;
    color: #0f766e;
    background: linear-gradient(135deg, rgba(204, 251, 241, .96), rgba(219, 234, 254, .9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .84);
}

.procurement-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.procurement-flow-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #5b5bd6);
    box-shadow: 0 12px 22px rgba(15, 118, 110, .22);
}

.procurement-quote-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    align-items: stretch;
}

    .procurement-quote-grid .inventory-report-card {
        min-width: 0;
    }

.procurement-history-panel {
    background: radial-gradient(circle at top left, rgba(20, 184, 166, .12), transparent 34%), linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .95));
}

.procurement-history-summary {
    margin-bottom: 18px;
}

.procurement-audit-timeline {
    position: relative;
    display: grid;
    gap: 16px;
}

    .procurement-audit-timeline::before {
        content: "";
        position: absolute;
        left: 26px;
        top: 10px;
        bottom: 10px;
        width: 2px;
        background: linear-gradient(180deg, rgba(20, 184, 166, .5), rgba(91, 91, 214, .25));
    }

.procurement-audit-event {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
}

.procurement-audit-marker {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
}

    .procurement-audit-marker span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 46px;
        height: 46px;
        padding: 0 8px;
        border-radius: 16px;
        background: linear-gradient(135deg, #0f766e, #5b5bd6);
        color: #fff;
        font-size: .72rem;
        font-weight: 800;
        box-shadow: 0 16px 28px rgba(15, 118, 110, .18), inset 0 1px 0 rgba(255, 255, 255, .32);
    }

.procurement-audit-body {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.procurement-event-grid {
    margin-top: 12px;
}

.procurement-history-note {
    margin-top: 10px;
}

.procurement-history-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

    .procurement-history-metrics > div {
        padding: 12px;
        border-radius: 16px;
        background: rgba(248, 250, 252, .9);
        border: 1px solid rgba(148, 163, 184, .13);
    }

    .procurement-history-metrics span {
        display: block;
        color: #64748b;
        font-size: .76rem;
    }

    .procurement-history-metrics strong {
        display: block;
        margin-top: 4px;
        color: #0f172a;
        overflow-wrap: anywhere;
    }

@media (max-width: 1000px) {
    .procurement-pipeline,
    .procurement-flow {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .procurement-value-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .procurement-history-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .procurement-quote-grid,
    .procurement-pipeline,
    .procurement-flow,
    .procurement-value-grid {
        grid-template-columns: 1fr;
    }

    .procurement-timeline-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

        .procurement-timeline-row .text-end {
            grid-column: 1 / -1;
            text-align: left !important;
        }

    .procurement-audit-timeline::before {
        left: 20px;
    }

    .procurement-audit-event {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .procurement-audit-marker span {
        min-width: 38px;
        height: 38px;
        border-radius: 14px;
        font-size: .64rem;
    }

    .procurement-history-metrics {
        grid-template-columns: 1fr;
    }
}

.finance-page-header {
    margin-bottom: 18px;
}

.financial-command-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.financial-period-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.financial-period-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(255, 255, 255, .94);
    color: #334155;
    font-weight: 700;
    transition: all .2s ease;
}

    .financial-period-pill:hover {
        border-color: rgba(37, 99, 235, .24);
        color: #0f172a;
        transform: translateY(-1px);
    }

    .financial-period-pill.active {
        border-color: rgba(99, 102, 241, .18);
        background: radial-gradient(circle at top right, rgba(99, 102, 241, .12), transparent 42%), linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(240, 244, 255, .95));
        color: #312e81;
        box-shadow: 0 12px 26px rgba(99, 102, 241, .10), inset 0 1px 0 rgba(255, 255, 255, .92);
    }

.financial-command-card {
    display: grid;
    gap: 4px;
    min-height: 104px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .20);
    background: #fff;
    box-shadow: 0 10px 18px rgba(15, 23, 42, .08), 0 2px 0 rgba(15, 23, 42, .05), inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -1px 0 rgba(15, 23, 42, .04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .financial-command-card:hover {
        transform: translateY(-1px);
        border-color: rgba(91, 91, 214, .26);
        box-shadow: 0 14px 24px rgba(15, 23, 42, .10), 0 2px 0 rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255, 255, 255, .98), inset 0 -1px 0 rgba(15, 23, 42, .05);
    }

    .financial-command-card span {
        font-size: .76rem;
        font-weight: 750;
        letter-spacing: 0;
        text-transform: none;
        color: #64748b;
    }

    .financial-command-card strong {
        font-size: 1.12rem;
        line-height: 1.1;
        color: #0f172a;
    }

    .financial-command-card p {
        margin: 0;
        color: #64748b;
        font-size: .82rem;
        line-height: 1.35;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

.financial-hero-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .98);
}

.financial-hero-card-contrast {
    border-color: rgba(91, 91, 214, .18);
    background: #fff;
    color: #0f172a;
}

.financial-hero-kicker {
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
    color: #64748b;
}

.financial-hero-card-contrast .financial-hero-kicker,
.financial-hero-card-contrast p {
    color: #64748b;
}

.financial-hero-card strong {
    font-size: clamp(1.18rem, 1.4vw, 1.55rem);
    line-height: 1.05;
    color: #0f172a;
}

.financial-hero-card-contrast strong {
    color: #0f172a;
}

.financial-hero-card p {
    margin: 0;
    color: #64748b;
    font-size: .85rem;
    line-height: 1.4;
}

.financial-dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .85fr);
    gap: 20px;
}

.financial-summary-panel {
    height: 100%;
}

.financial-summary-list {
    display: grid;
    gap: 12px;
}

.financial-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(248, 250, 252, .92);
    border: 1px solid rgba(148, 163, 184, .14);
}

    .financial-summary-row span {
        color: var(--color-text-muted);
    }

    .financial-summary-row strong {
        color: #0f172a;
    }

.financial-summary-row-strong {
    background: rgba(238, 242, 255, .96);
    border-color: rgba(91, 91, 214, .16);
}

.financial-trends-card {
    margin-bottom: 20px;
}

.financial-mini-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.financial-mini-chart-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(248, 250, 252, .88);
}

.financial-mini-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

    .financial-mini-chart-header strong {
        color: #0f172a;
    }

    .financial-mini-chart-header span {
        color: var(--color-text-muted);
        font-weight: 700;
    }

.financial-mini-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 180px;
}

.financial-mini-bar-stack {
    display: grid;
    justify-items: center;
    align-content: end;
    gap: 8px;
    min-height: 180px;
}

    .financial-mini-bar-stack span {
        font-size: .78rem;
        color: var(--color-text-muted);
        font-weight: 700;
    }

.financial-mini-bar {
    width: 100%;
    min-height: 10%;
    border-radius: 12px 12px 6px 6px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .35);
}

.finance-mini-bar-revenue {
    background: linear-gradient(180deg, #22c55e, #15803d);
}

.finance-mini-bar-cogs {
    background: linear-gradient(180deg, #f59e0b, #b45309);
}

.finance-mini-bar-income {
    background: linear-gradient(180deg, #6366f1, #4338ca);
}

.finance-mini-bar-loss {
    background: linear-gradient(180deg, #fb7185, #e11d48);
}

.financial-stats-grid {
    margin-bottom: 20px;
}

.financial-stat-card {
    min-height: 100%;
}

.financial-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.financial-account-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .9fr);
    gap: 20px;
}

.financial-side-editor {
    height: 100%;
    position: sticky;
    top: 88px;
}

.financial-row-selected {
    background: rgba(238, 242, 255, .72);
}

.finance-surface-card {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055), inset 0 1px 0 rgba(255, 255, 255, .98);
}

.finance-inline-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    color: #0f172a;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.finance-inline-tag-soft {
    background: rgba(91, 91, 214, .12);
    color: #3730a3;
}

.finance-type-asset {
    background: rgba(37, 99, 235, .14);
    color: #1d4ed8;
}

.finance-type-liability {
    background: rgba(245, 158, 11, .14);
    color: #b45309;
}

.finance-type-revenue {
    background: rgba(16, 185, 129, .14);
    color: #047857;
}

.finance-type-expense {
    background: rgba(239, 68, 68, .14);
    color: #b91c1c;
}

.financial-mini-ledger {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.financial-mini-ledger-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(248, 250, 252, .92);
    border: 1px solid rgba(148, 163, 184, .12);
}

.finance-statement-label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    font-weight: 600;
    color: #0f172a;
}

@media (max-width: 1200px) {
    .list-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .financial-command-strip,
    .inventory-report-filter-grid,
    .financial-hero-grid,
    .financial-mini-chart-grid,
    .financial-dashboard-grid,
    .financial-filter-grid,
    .financial-account-grid,
    .inventory-finance-band,
    .inventory-report-grid,
    .inventory-financial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .finance-module-nav,
    .financial-command-strip,
    .inventory-report-filter-grid,
    .financial-hero-grid,
    .financial-mini-chart-grid,
    .financial-dashboard-grid,
    .financial-filter-grid,
    .financial-account-grid,
    .inventory-finance-band,
    .inventory-report-grid,
    .inventory-financial-grid {
        grid-template-columns: 1fr;
    }

    .financial-side-editor {
        position: static;
        top: auto;
    }

    .inventory-deadstock-row,
    .inventory-finance-meta {
        grid-template-columns: 1fr;
        display: grid;
        justify-content: stretch;
    }

    .inventory-deadstock-value {
        justify-items: stretch;
    }
}

@media (max-width: 720px) {
    .action-toast-shell {
        left: 12px;
        right: 12px;
        top: calc(var(--top-header-height, 0px) + 12px);
        justify-content: stretch;
    }

    .action-toast {
        min-width: 0;
        width: 100%;
    }

    .list-filter-grid {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        flex-wrap: wrap;
    }

        .settings-actions .inline-action-feedback {
            order: -1;
            width: 100%;
            margin-right: 0;
        }
}

.readonly-code {
    background: #f8fafc !important;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: .04em;
}

.form-actions-right,
.hr-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.hr-filter-actions {
    grid-column: auto;
    min-width: 170px;
    width: 100%;
}

    .hr-filter-actions .btn,
    .hr-filter-actions button {
        width: auto;
        min-width: 78px;
        white-space: nowrap;
    }

.hr-filter-grid {
    align-items: end;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hr-inline-form-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(110px, 1fr));
    gap: 1rem;
    align-items: end;
}

.hr-inline-form-grid .span-full {
    grid-column: 1 / -1;
}

.hr-inline-form-grid .span-wide {
    grid-column: span 2;
}

.hr-schedule-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    min-height: 40px;
    padding: .65rem .8rem;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: .75rem;
    background: rgba(248, 250, 252, .8);
    color: var(--tenant-text);
}

.hr-schedule-preview.muted {
    color: var(--tenant-muted);
}

.hr-history-modal {
    max-width: 720px;
    width: min(720px, calc(100vw - 2rem));
}

.hr-history-list {
    display: grid;
    gap: .75rem;
    padding-top: 1rem;
}

.hr-history-item {
    display: grid;
    gap: .25rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: .75rem;
    background: rgba(248, 250, 252, .82);
}

.hr-history-item p {
    margin: .25rem 0 0;
    color: var(--tenant-muted);
}

.hr-weekday-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.hr-check-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 999px;
    background: #fff;
    color: var(--color-text);
}

.hr-setup-filter {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hr-setup-stack .setup-entry-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hr-list-card,
.hr-form-card,
.hr-calendar-card {
    width: 100%;
}

.hr-card {
    margin-bottom: 1rem;
}

.hr-section-stack,
.hr-setup-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.hr-collapse-header {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0 14px;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    background: transparent;
    color: #0f172a;
    text-align: left;
    font-weight: 900;
    font-size: 18px;
}

    .hr-collapse-header span {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .hr-collapse-header small {
        color: var(--color-text-muted);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-collapse-header > i {
        color: var(--color-text-muted);
    }

.hr-card-subheader {
    margin-top: 14px;
}

.hr-table-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

    .hr-table-footer label {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        font-weight: 800;
        color: var(--color-text-muted);
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .hr-table-footer .form-control {
        width: 92px;
    }

.hr-calendar-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.hr-calendar-select {
    min-width: 220px;
}

.hr-calendar-date {
    width: 156px;
    justify-self: center;
}

.hr-calendar-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: rgba(248, 250, 252, .78);
}

    .hr-calendar-toolbar > strong {
        text-align: center;
        color: #0f172a;
        font-size: 18px;
    }

.hr-calendar-nav,
.hr-calendar-view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hr-calendar-view-tabs {
    justify-content: flex-end;
}

    .hr-calendar-view-tabs button {
        min-height: 34px;
        padding: 6px 12px;
        border: 1px solid rgba(148, 163, 184, .26);
        border-radius: 999px;
        background: #fff;
        color: var(--color-text);
        font-weight: 800;
    }

        .hr-calendar-view-tabs button.active {
            border-color: rgba(13, 148, 136, .42);
            background: rgba(20, 184, 166, .12);
            color: #0f766e;
        }

.hr-calendar-month-header {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

    .hr-calendar-month-header span {
        color: var(--color-text-muted);
        font-size: 12px;
        font-weight: 900;
        text-align: center;
        text-transform: uppercase;
    }

.hr-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.hr-calendar-day {
    min-height: 128px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

    .hr-calendar-day.muted-month {
        opacity: .52;
        background: #f8fafc;
    }

    .hr-calendar-day strong {
        display: block;
        margin-bottom: 10px;
        color: #0f172a;
    }

.hr-calendar-entry {
    display: grid;
    gap: 6px;
}

    .hr-calendar-entry small {
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--color-text-muted);
        font-weight: 700;
    }

    .hr-calendar-entry p {
        margin: 2px 0 0;
        color: var(--color-text-muted);
        font-size: 13px;
    }

.hr-calendar-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.hr-calendar-week-day,
.hr-calendar-day-view,
.hr-calendar-month-tile {
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.hr-calendar-week-day {
    min-height: 190px;
    padding: 12px;
}

    .hr-calendar-week-day > strong {
        display: block;
        margin-bottom: 12px;
        color: #0f172a;
    }

.hr-calendar-day-view {
    min-height: 190px;
    margin-top: 14px;
    padding: 18px;
}

.hr-calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.hr-calendar-month-tile {
    display: grid;
    gap: 8px;
    min-height: 108px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
}

    .hr-calendar-month-tile strong {
        color: #0f172a;
        font-size: 18px;
    }

    .hr-calendar-month-tile span {
        color: var(--color-text-muted);
        font-weight: 700;
    }

    .hr-calendar-month-tile:hover {
        border-color: rgba(13, 148, 136, .35);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
    }

.hr-search-select {
    position: relative;
}

.hr-multi-select-box {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 12px;
    background: #fff;
}

    .hr-multi-select-box input {
        min-width: 180px;
        flex: 1 1 160px;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--color-text);
    }

.hr-multi-select-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid rgba(20, 184, 166, .20);
    border-radius: 999px;
    background: rgba(240, 253, 250, .92);
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
}

    .hr-multi-select-chip button {
        display: inline-grid;
        place-items: center;
        width: 18px;
        height: 18px;
        border: 0;
        border-radius: 50%;
        background: rgba(15, 118, 110, .10);
        color: #0f766e;
    }

.note-editor.note-frame {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 14px;
    overflow: hidden;
}

.note-editor .note-toolbar {
    background: rgba(248, 250, 252, .96);
}

.note-editor .note-editable {
    min-height: 150px;
    color: var(--color-text);
}

.hr-rich-content {
    color: var(--color-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.hr-rich-content:empty::before {
    content: "-";
    color: var(--color-text-muted);
}

.hr-document-entry .document-upload-box {
    width: 100%;
    min-height: 74px;
    border-radius: 16px;
}

.hr-document-panel {
    padding-bottom: 28px;
}

.hr-document-panel .hr-filter-grid {
    grid-template-columns: minmax(220px, 320px) minmax(220px, 320px) 1fr;
    align-items: end;
    margin-bottom: 18px;
}

.hr-document-entry {
    max-width: 920px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.hr-document-entry .form-actions-right {
    padding-top: 4px;
}

.hr-document-panel .erp-table {
    border-top: 1px solid rgba(148, 163, 184, .18);
}

.hr-search-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .16);
}

    .hr-search-menu button {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid rgba(148, 163, 184, .12);
        background: #fff;
        text-align: left;
    }

        .hr-search-menu button:hover {
            background: #f8fafc;
        }

        .hr-search-menu button span {
            color: var(--color-text-muted);
            font-size: 14px;
            font-weight: 500;
        }

.hr-profile-hero {
    display: grid;
    grid-template-columns: auto 1fr minmax(260px, .9fr);
    align-items: center;
    gap: 18px;
    margin-bottom: 1rem;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(45, 212, 191, .16), transparent 34%), linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 22px 55px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.hr-employee-detail-hero {
    grid-template-columns: auto minmax(320px, 1fr) minmax(340px, .85fr);
    gap: 22px;
    padding: 24px;
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .90) 58%, rgba(236, 253, 245, .92) 100%),
        radial-gradient(circle at 96% 4%, rgba(45, 212, 191, .24), transparent 34%);
}

.hr-avatar {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.hr-employee-detail-hero .hr-avatar {
    width: 88px;
    height: 88px;
    border-radius: 26px;
    font-size: 28px;
    box-shadow: 0 18px 32px rgba(15, 118, 110, .24);
}

.hr-profile-primary {
    min-width: 0;
}

.hr-profile-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hr-profile-code {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    background: rgba(248, 250, 252, .82);
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.hr-profile-hero h2 {
    margin: 8px 0 4px;
    color: #0f172a;
}

.hr-employee-detail-hero h2 {
    max-width: 720px;
    margin-top: 10px;
    font-size: clamp(28px, 2.5vw, 40px);
    line-height: 1.08;
}

.hr-profile-hero p {
    margin: 0;
    color: var(--color-text-muted);
    font-weight: 700;
}

.hr-profile-primary small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-weight: 750;
}

.hr-profile-meta {
    display: grid;
    gap: 8px;
    color: var(--color-text-muted);
    font-weight: 700;
}

    .hr-profile-meta span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

.hr-employee-detail-hero .hr-profile-meta {
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.hr-employee-detail-hero .hr-profile-meta i {
    width: 18px;
    color: #0f766e;
    text-align: center;
}

.hr-profile-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}

.hr-mini-card,
.hr-detail-item {
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.hr-mini-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    min-height: 104px;
    color: inherit;
    text-align: left;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

button.hr-mini-card {
    cursor: pointer;
}

button.hr-mini-card:hover,
button.hr-mini-card.active {
    transform: translateY(-2px);
    border-color: rgba(20, 184, 166, .42);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .09);
}

button.hr-mini-card.active {
    background: linear-gradient(145deg, #ffffff, #ecfdf5);
}

    .hr-mini-card i {
        color: #0f766e;
    }

    .hr-mini-card span,
    .hr-detail-item span {
        color: var(--color-text-muted);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .hr-mini-card strong {
        color: #0f172a;
        font-size: 24px;
    }

.hr-profile-nav-card {
    position: sticky;
    top: 0;
    z-index: 8;
    padding-bottom: 18px;
}

.hr-profile-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
}

.hr-profile-tabs .nav-item {
    flex: 0 0 auto;
}

.hr-profile-tabs .nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    color: #64748b;
    background: #fff;
    font-weight: 850;
    white-space: nowrap;
}

.hr-profile-tabs .nav-link.active {
    border-color: rgba(20, 184, 166, .42);
    background: rgba(204, 251, 241, .72);
    color: #0f766e;
    box-shadow: 0 12px 24px rgba(15, 118, 110, .10);
}

.hr-self-page-header {
    align-items: center;
}

.hr-self-header-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hr-self-hero {
    margin-bottom: 18px;
}

.hr-self-summary {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.hr-self-summary .hr-mini-card {
    min-height: 118px;
    border-radius: 14px;
}

.hr-self-summary .hr-mini-card small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.hr-self-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
    gap: 1rem;
    align-items: start;
}

.hr-self-panel {
    min-height: 100%;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .88);
}

.hr-self-panel-wide {
    grid-column: 1 / -1;
}

.hr-self-panel .content-card-header h3 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.hr-self-panel .content-card-header h3 i,
.hr-self-action-card .content-card-header h3 i {
    color: #0f766e;
}

.hr-self-filter-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(170px, auto);
    padding: 12px;
    margin: 12px 0 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 14px;
    background: #f8fafc;
}

.hr-self-table th,
.hr-self-table td {
    white-space: nowrap;
}

.hr-self-schedule-card,
.hr-self-money-grid,
.hr-balance-list,
.hr-component-list,
.hr-document-list,
.hr-holiday-list {
    margin-top: 12px;
}

.hr-self-schedule-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 14px;
    background: #f8fafc;
}

.hr-self-schedule-card strong {
    color: #0f172a;
    font-size: 18px;
}

.hr-self-schedule-card small {
    color: #64748b;
    font-weight: 700;
}

.hr-self-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hr-self-money-grid div {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 12px;
    background: #f8fafc;
}

.hr-self-money-grid span,
.hr-component-row span,
.hr-document-row span,
.hr-holiday-row span,
.hr-balance-row span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.hr-self-money-grid strong {
    color: #0f172a;
    overflow-wrap: anywhere;
}

.hr-balance-list,
.hr-component-list,
.hr-document-list,
.hr-holiday-list {
    display: grid;
    gap: 10px;
}

.hr-balance-row,
.hr-component-row,
.hr-document-row,
.hr-holiday-row {
    display: grid;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 12px;
    background: #fff;
}

.hr-balance-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.hr-component-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.hr-document-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.hr-holiday-row {
    grid-template-columns: auto minmax(0, 1fr);
}

.hr-document-row i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #0f766e;
    background: #f0fdfa;
}

.hr-document-row .btn i {
    width: auto;
    height: auto;
    border-radius: 0;
    color: inherit;
    background: transparent;
}

.hr-balance-row div,
.hr-component-row div,
.hr-document-row div,
.hr-holiday-row div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.hr-balance-row strong,
.hr-component-row strong,
.hr-document-row strong,
.hr-holiday-row strong {
    color: #0f172a;
    overflow-wrap: anywhere;
}

.hr-balance-row em,
.hr-component-row em,
.hr-document-row em {
    color: #0f172a;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.hr-holiday-date {
    width: 48px;
    height: 52px;
    place-items: center;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, .14);
}

.hr-holiday-date strong {
    font-size: 18px;
    line-height: 1;
}

.hr-self-action-card {
    margin-top: 1rem;
}

.hr-compliance-notify {
    display: grid;
    gap: 4px;
    min-width: 150px;
}

.hr-compliance-notify label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.hr-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 14px;
}

.hr-detail-item {
    display: grid;
    gap: 8px;
    padding: 14px;
}

    .hr-detail-item i {
        color: #2563eb;
    }

    .hr-detail-item strong {
        color: #0f172a;
        overflow-wrap: anywhere;
    }

.hr-dashboard-grid {
    display: grid;
    grid-template-columns: 1.55fr repeat(4, minmax(150px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.hr-dashboard-grid-expanded {
    grid-template-columns: 1.65fr repeat(4, minmax(150px, 1fr));
}

.hr-report-metric-grid {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 16px;
}

.hr-metric-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow: 0 24px 52px rgba(15, 23, 42, .10), 0 8px 18px rgba(20, 184, 166, .05), inset 0 1px 0 rgba(255, 255, 255, .96), inset 0 -14px 26px rgba(15, 23, 42, .025);
    transition: transform .18s ease, box-shadow .18s ease;
}

.hr-report-metric-card {
    min-height: 156px;
    padding: 18px 18px 16px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 86% 14%, rgba(14, 165, 233, 0.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow:
        0 22px 42px rgba(15, 23, 42, 0.11),
        0 8px 16px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -18px 28px rgba(15, 23, 42, 0.03);
}

.hr-metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0f766e, #4338ca);
    opacity: .78;
}

.hr-report-metric-card::before {
    width: 5px;
    background: linear-gradient(180deg, #0f766e, #2563eb);
}

.hr-report-metric-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 116px;
    height: 116px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.035);
    box-shadow: inset 0 18px 36px rgba(255, 255, 255, 0.72);
}

.hr-metric-primary::before {
    background: linear-gradient(180deg, #2563eb, #0f766e);
}

.hr-metric-success::before {
    background: linear-gradient(180deg, #059669, #0f766e);
}

.hr-metric-warning::before {
    background: linear-gradient(180deg, #d97706, #7c3aed);
}

.hr-metric-danger::before {
    background: linear-gradient(180deg, #dc2626, #ea580c);
}

.hr-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 64px rgba(15, 23, 42, .13), 0 10px 22px rgba(20, 184, 166, .07), inset 0 1px 0 rgba(255, 255, 255, .96);
}

.hr-metric-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.hr-metric-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #0f766e;
    background: linear-gradient(145deg, rgba(240, 253, 250, 0.95), rgba(239, 246, 255, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hr-metric-kicker {
    padding: 5px 9px;
    border-radius: 999px;
    color: #475569;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.hr-metric-card > span {
    position: relative;
    z-index: 1;
    display: block;
    color: #64748b;
    font-size: .86rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hr-metric-card > strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: .75rem;
    color: #0f172a;
    font-size: 2rem;
    line-height: 1;
}

.hr-report-metric-card .hr-metric-kicker {
    display: inline-flex;
    color: #475569;
    font-size: 11px;
    line-height: 1;
}

.hr-report-metric-card small {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.hr-two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.hr-report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
}

.hr-hero-widget,
.hr-3d-widget,
.hr-chart-card {
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 22px 55px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .72);
}

.hr-hero-widget {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    min-height: 178px;
    padding: 24px;
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, .18), transparent 34%), linear-gradient(145deg, #ffffff, #f8fafc);
    color: #0f172a;
    box-shadow: 0 28px 64px rgba(15, 23, 42, .13), 0 10px 22px rgba(20, 184, 166, .07), inset 0 1px 0 rgba(255, 255, 255, .96), inset 0 -18px 34px rgba(15, 23, 42, .03);
}

    .hr-hero-widget span {
        color: #64748b;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .08em;
    }

    .hr-hero-widget h2 {
        margin: 8px 0;
        font-size: 52px;
        line-height: 1;
        color: #0f172a;
    }

    .hr-hero-widget p {
        margin: 0;
        color: #64748b;
    }

.hr-orbit-map {
    position: relative;
    width: 130px;
    height: 130px;
    align-self: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(125, 211, 252, .22) 38%, rgba(255, 255, 255, .08) 39%);
    transform: rotateX(58deg) rotateZ(-18deg);
}

    .hr-orbit-map span {
        position: absolute;
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: #22c55e;
        box-shadow: 0 0 0 8px rgba(34, 197, 94, .16);
    }

        .hr-orbit-map span:nth-child(1) { left: 24px; top: 28px; }
        .hr-orbit-map span:nth-child(2) { right: 22px; top: 42px; background: #38bdf8; }
        .hr-orbit-map span:nth-child(3) { left: 58px; bottom: 18px; background: #f59e0b; }
        .hr-orbit-map span:nth-child(4) { right: 38px; bottom: 48px; background: #fb7185; }

.hr-3d-widget {
    display: grid;
    gap: 8px;
    min-height: 178px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    transform: perspective(900px) rotateX(2deg);
}

    .hr-3d-widget i {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: rgba(15, 23, 42, .06);
    }

    .hr-3d-widget span,
    .hr-3d-widget small {
        color: var(--color-text-muted);
        font-weight: 700;
    }

    .hr-3d-widget strong {
        font-size: 34px;
        line-height: 1;
        color: #0f172a;
    }

.accent-green i { color: #16a34a; background: rgba(22, 163, 74, .12); }
.accent-red i { color: #dc2626; background: rgba(220, 38, 38, .10); }
.accent-amber i { color: #d97706; background: rgba(217, 119, 6, .12); }
.accent-blue i { color: #2563eb; background: rgba(37, 99, 235, .12); }
.accent-indigo i { color: #4f46e5; background: rgba(79, 70, 229, .12); }
.accent-teal i { color: #0f766e; background: rgba(15, 118, 110, .12); }
.accent-violet i { color: #7c3aed; background: rgba(124, 58, 237, .12); }
.accent-slate i { color: #475569; background: rgba(71, 85, 105, .12); }

.hr-analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.hr-chart-card {
    min-height: 260px;
}

.hr-donut {
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    margin: 12px auto;
    border-radius: 50%;
    background: conic-gradient(#22c55e 0 var(--present), #ef4444 var(--present) calc(var(--present) + var(--absent)), #f59e0b 0 100%);
    box-shadow: inset 0 0 0 24px #fff, 0 18px 40px rgba(15, 23, 42, .12);
}

    .hr-donut span {
        font-size: 28px;
        font-weight: 900;
        color: #0f172a;
    }

.hr-chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--color-text-muted);
    font-weight: 700;
}

    .hr-chart-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .hr-chart-legend i {
        width: 10px;
        height: 10px;
        border-radius: 999px;
    }

.legend-green { background: #22c55e; }
.legend-red { background: #ef4444; }
.legend-amber { background: #f59e0b; }

.hr-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 48px;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--color-text-muted);
    font-weight: 800;
}

    .hr-bar-row div {
        height: 14px;
        overflow: hidden;
        border-radius: 999px;
        background: #e2e8f0;
    }

    .hr-bar-row b {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #16a34a, #22c55e);
    }

        .hr-bar-row b.muted {
            background: linear-gradient(90deg, #64748b, #94a3b8);
        }

.hr-uae-map {
    min-height: 150px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(34, 197, 94, .16), transparent 42%), linear-gradient(145deg, #eff6ff, #f8fafc);
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
}

    .hr-uae-map i {
        font-size: 38px;
        color: #ef4444;
    }

.hr-map-card p {
    margin: 12px 0 0;
    color: var(--color-text-muted);
}

.hr-mini-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

    .hr-mini-kpi-row div {
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, .18);
        border-radius: 16px;
        background: linear-gradient(145deg, #fff, #f8fafc);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 24px rgba(15, 23, 42, .06);
    }

    .hr-mini-kpi-row span {
        display: block;
        color: #64748b;
        font-size: .78rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .hr-mini-kpi-row strong {
        display: block;
        margin-top: 4px;
        color: #0f172a;
        font-size: 1.25rem;
    }

.hr-dashboard-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.hr-dashboard-line {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .92);
}

    .hr-dashboard-line i {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 14px;
    }

    .hr-dashboard-line span {
        color: #64748b;
        font-weight: 800;
    }

    .hr-dashboard-line strong {
        color: #0f172a;
        font-size: 1.35rem;
    }

@media (max-width: 1280px) {
    .hr-dashboard-grid,
    .hr-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-hero-widget {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .hr-dashboard-grid,
    .hr-analytics-grid,
    .hr-calendar-month-header,
    .hr-calendar-week-grid,
    .hr-calendar-year-grid,
    .hr-calendar-grid {
        grid-template-columns: 1fr;
    }

    .hr-table-footer,
    .hr-calendar-controls,
    .hr-calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-calendar-toolbar {
        display: flex;
    }

    .hr-calendar-toolbar > strong,
    .hr-calendar-view-tabs,
    .hr-calendar-nav {
        justify-content: center;
        text-align: center;
    }

    .form-actions-right,
    .hr-filter-actions {
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .hr-profile-hero,
    .hr-employee-detail-hero,
    .hr-profile-summary,
    .hr-detail-grid,
    .hr-document-panel .hr-filter-grid {
        grid-template-columns: 1fr;
    }

      .hr-table-footer .form-control,
      .hr-calendar-select,
      .hr-calendar-date {
          width: 100%;
          min-width: 0;
      }

      .hr-inline-form-grid {
          grid-template-columns: 1fr;
      }

      .hr-inline-form-grid .span-wide {
          grid-column: 1 / -1;
      }
  }

.platform-brand-preview-image,
.platform-brand-preview-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    flex-shrink: 0;
}

.platform-brand-preview-image {
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, .18);
    background: #fff;
}

.platform-brand-preview-mark {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #111827, #4338ca);
    color: #fff;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .hr-self-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-self-grid {
        grid-template-columns: 1fr;
    }

    .hr-self-panel-wide {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .hr-self-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .hr-self-header-actions .btn {
        flex: 1 1 0;
        justify-content: center;
    }

    .hr-self-summary,
    .hr-self-filter-grid,
    .hr-self-money-grid,
    .hr-component-row,
    .hr-document-row {
        grid-template-columns: 1fr;
    }

    .hr-self-table th,
    .hr-self-table td {
        white-space: normal;
    }

    .hr-component-row,
    .hr-document-row {
        align-items: start;
    }
}

@media (max-width: 1100px) {
    .auth-split-shell,
    .register-wizard-shell {
        grid-template-columns: 1fr;
    }

    .auth-generic-showcase,
    .register-showcase {
        min-height: 280px;
    }

    .register-wizard-card {
        max-width: 100%;
        min-height: 0;
    }
}

@media (max-width: 720px) {
    .auth-body {
        padding: 12px 0 20px;
    }

    .auth-shell,
    .auth-split-shell,
    .register-wizard-shell {
        width: min(100%, calc(100% - 12px));
        gap: 14px;
    }

    .auth-showcase,
    .auth-generic-showcase,
    .register-showcase {
        min-height: 0;
        padding: 18px;
        border-radius: 22px;
    }

    .auth-showcase-copy h2,
    .register-showcase-copy h2 {
        max-width: none;
        font-size: 1.75rem;
    }

    .auth-card,
    .register-wizard-card {
        padding: 18px 14px;
        border-radius: 22px;
    }

    .auth-links,
    .auth-links-spread,
    .register-wizard-actions,
    .register-wizard-actions-left,
    .register-wizard-actions-right {
        width: 100%;
    }

    .auth-links-spread,
    .register-wizard-actions-right {
        flex-direction: column;
        align-items: stretch;
    }

        .auth-links-spread a,
        .auth-text-btn,
        .register-login-link,
        .auth-submit-btn,
        .register-next-btn {
            width: 100%;
            text-align: center;
        }
}
.expense-dashboard-section {
    margin-bottom: 1rem;
}

    .expense-dashboard-section > summary {
        cursor: pointer;
        list-style: none;
    }

.expenses-filter-grid {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
}

.expense-entry-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 12px 14px;
}

    .expense-entry-grid .span-2 {
        grid-column: span 2;
    }

    .expense-entry-grid .span-3 {
        grid-column: span 3;
    }

    .expense-entry-grid .span-6 {
        grid-column: 1 / -1;
    }

    .expense-entry-grid .short-field {
        max-width: 140px;
    }

.expense-form-surface {
    margin-bottom: 1rem;
}

.expense-form-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

    .expense-form-fieldset:disabled {
        opacity: .92;
    }

.expense-check-row {
    align-self: end;
    min-height: 38px;
    margin: 0;
}

.expense-lines-table td {
    min-width: 120px;
}

    .expense-lines-table .line-description-cell {
        min-width: 260px;
    }

.expense-form-actions {
    gap: 10px;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .32);
    background: rgba(255, 255, 255, .92);
    color: var(--color-text);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

    .secondary-btn:hover {
        border-color: rgba(91, 91, 214, .38);
        color: var(--color-accent);
        background: rgba(245, 247, 255, .98);
    }

    .secondary-btn.danger-btn,
    .danger-btn {
        color: var(--color-danger);
        border-color: rgba(239, 68, 68, .36);
    }

.expense-reject-panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, .18);
    background: linear-gradient(180deg, rgba(255, 247, 247, .92), rgba(255, 255, 255, .96));
}

    .expense-reject-panel.payment-panel {
        border-color: rgba(91, 91, 214, .18);
        background: linear-gradient(180deg, rgba(247, 249, 255, .95), rgba(255, 255, 255, .98));
    }

    .expense-reject-panel.inline {
        margin-top: 0;
    }

.payment-entry-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.expense-reject-row td {
    background: rgba(255, 247, 247, .45);
}

.expense-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.expense-setup-grid {
    align-items: start;
}

    .expense-setup-grid > .dashboard-panel:first-child {
        grid-column: 1 / -1;
    }

.setup-entry-grid {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.expenses-setup-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(120px, 160px) auto;
    margin-top: 18px;
}

.petty-account-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.petty-account-tile {
    display: grid;
    gap: 4px;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, .92);
    color: var(--color-text);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
}

    .petty-account-tile.active {
        border-color: rgba(91, 91, 214, .45);
        background: linear-gradient(180deg, rgba(245, 247, 255, .98), rgba(255, 255, 255, .96));
    }

    .petty-account-tile span,
    .petty-account-tile em {
        color: var(--color-text-muted);
        font-size: .82rem;
        font-style: normal;
    }

.petty-operation-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.petty-movement-filter {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.petty-settlement-grid {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.petty-replenishment-filter {
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 150px) auto;
}

@media (max-width: 1200px) {
    .expenses-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .expense-entry-grid,
    .petty-movement-filter,
    .petty-settlement-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .expenses-filter-grid,
    .expense-entry-grid,
    .setup-entry-grid,
    .petty-operation-grid,
    .petty-movement-filter,
    .petty-settlement-grid,
    .petty-replenishment-filter,
    .expenses-setup-filter {
        grid-template-columns: 1fr;
    }

        .expense-entry-grid .span-2,
        .expense-entry-grid .span-3,
        .expense-entry-grid .span-6 {
            grid-column: auto;
        }

        .expense-entry-grid .short-field {
            max-width: none;
        }

    .expense-upload-row {
        grid-template-columns: 1fr;
    }
}
.register-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.register-plan-card {
    display: grid;
    gap: .25rem;
    min-height: 110px;
    padding: .9rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: .85rem;
    background: #fff;
    color: inherit;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.register-plan-card:hover,
.register-plan-card.selected {
    border-color: #198754;
    box-shadow: 0 12px 28px rgba(25, 135, 84, .14);
    transform: translateY(-1px);
}

.register-plan-card span {
    font-weight: 700;
}

.register-plan-card strong {
    color: #0f5132;
}

.register-plan-card small {
    color: #64748b;
    line-height: 1.35;
}

.compact-filter {
    min-width: 150px;
}

.module-toggle-grid .check-row {
    align-items: flex-start;
}

.module-toggle-grid .check-row span {
    display: grid;
    gap: .15rem;
}

.module-toggle-grid .check-row small {
    color: #64748b;
    font-size: .78rem;
}

@media (max-width: 720px) {
    .register-plan-grid {
        grid-template-columns: 1fr;
    }

    .compact-filter {
        min-width: 100%;
    }
}
