@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../vendor/dm-sans/dm-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../vendor/dm-sans/dm-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --brand-950: #022d23;
    --brand-900: #064e3b;
    --brand-800: #065f46;
    --brand-700: #047857;
    --brand-600: #059669;
    --brand-500: #10b981;
    --brand-400: #34d399;
    --brand-300: #6ee7b7;
    --brand-200: #a7f3d0;
    --brand-100: #d1fae5;
    --brand-50: #ecfdf5;
    --sidebar-top: #054c39;
    --sidebar-mid: #033a2c;
    --sidebar-bottom: #022d23;
    --sidebar-glow: #155643;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --teal-100: #ccfbf1;
    --teal-50: #f0fdfa;
    --accent-800: #854d0e;
    --accent-700: #a16207;
    --accent-600: #ca8a04;
    --accent-500: #eab308;
    --accent-400: #facc15;
    --accent-300: #fde047;
    --accent-200: #fef08a;
    --accent-100: #fef9c3;
    --accent-50: #fefce8;
    --danger-700: #b91c1c;
    --danger-600: #dc2626;
    --danger-100: #fee2e2;
    --danger-50: #fef2f2;
    --ink-900: #1e293b;
    --ink-800: #334155;
    --ink-700: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --line: #e5ede8;
    --line-strong: #d3e0d8;
    --surface: #f4f8f6;
    --surface-alt: #fbfdfc;
    --white: #ffffff;
    --cream: #fffdf5;
    --warning-bg: #fef9c3;
    --warning-text: #854d0e;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    --sidebar-width: 268px;
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-xs: 0 1px 2px rgba(6, 78, 59, .04);
    --shadow-sm: 0 4px 14px rgba(6, 78, 59, .05);
    --shadow-md: 0 12px 28px rgba(6, 78, 59, .08);
    --shadow-lg: 0 20px 44px rgba(6, 78, 59, .12);
    --shadow-soft: 0 10px 30px rgba(6, 78, 59, .06);

    --bs-primary: var(--brand-900);
    --bs-primary-rgb: 6, 78, 59;
    --bs-link-color: var(--brand-700);
    --bs-link-hover-color: var(--brand-900);
    --bs-body-color: var(--ink-900);
    --bs-body-color-rgb: 30, 41, 59;
    --bs-secondary-color: var(--ink-500);
    --bs-secondary-color-rgb: 100, 116, 139;
    --bs-emphasis-color: var(--ink-900);
    --bs-emphasis-color-rgb: 30, 41, 59;
    --bs-heading-color: var(--ink-900);
    --bs-border-color: var(--line);
}

* {
    box-sizing: border-box;
}

body {
    color: var(--ink-900);
    background:
        radial-gradient(1200px 420px at 15% -10%, rgba(5, 150, 105, .06), transparent 60%),
        radial-gradient(900px 320px at 95% 0%, rgba(250, 204, 21, .08), transparent 55%),
        linear-gradient(180deg, #fbfefc 0%, var(--surface) 100%);
    font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-700);
    text-decoration: none;
}

a:hover {
    color: var(--brand-800);
}

.auth-page {
    --auth-emerald-950: var(--brand-950);
    --auth-emerald-900: #043e2f;
    --auth-emerald-800: var(--brand-900);
    --auth-emerald-700: var(--brand-700);
    --auth-emerald-200: var(--brand-200);
    --auth-bg: #f4fbf7;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    min-height: 100vh;
    color: var(--auth-text);
    font-family: "Plus Jakarta Sans", "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(ellipse 70% 55% at 12% -8%, rgba(6, 78, 59, .11), transparent 60%),
        radial-gradient(ellipse 55% 45% at 88% 108%, rgba(16, 185, 129, .09), transparent 55%),
        linear-gradient(180deg, var(--brand-50) 0%, #f8fafc 100%);
}

.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(6, 78, 59, .055) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 24px;
}

.auth-panel {
    width: min(960px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 56%);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .8);
    border-radius: 24px;
    box-shadow:
        0 25px 50px -12px rgba(2, 44, 34, .10),
        0 8px 24px -8px rgba(2, 44, 34, .06);
}

.auth-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 56px 40px;
    color: #fff;
    background: linear-gradient(145deg, #064e3b 0%, #043e2f 48%, #022c22 100%);
}

.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-visual::before {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -140px;
    background: radial-gradient(circle, rgba(167, 243, 208, .12) 0%, transparent 70%);
}

.auth-visual::after {
    width: 340px;
    height: 340px;
    bottom: -160px;
    left: -120px;
    background: radial-gradient(circle, rgba(16, 185, 129, .10) 0%, transparent 70%);
}

.auth-visual-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .55;
}

.auth-identity {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    animation: auth-fade-up .55s ease-out both;
}

.auth-logo-wrap {
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.auth-brand-logo {
    display: block;
    width: clamp(110px, 12vw, 140px);
    height: auto;
    filter: drop-shadow(0 12px 28px rgba(167, 243, 208, .18));
}

.auth-identity-name {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
    color: #fff;
}

.auth-identity-tagline {
    margin: 0;
    max-width: 300px;
    font-size: .875rem;
    line-height: 1.65;
    font-weight: 500;
    color: rgba(167, 243, 208, .78);
}

@keyframes auth-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-identity { animation: none; }
}

.pharmacy-logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.pharmacy-logo svg,
.pharmacy-logo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
}

.pharmacy-logo img {
    object-fit: contain;
}

.auth-logo {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-logo img,
.auth-logo svg {
    border-radius: 0;
}

.sidebar-logo img,
.sidebar-logo svg {
    border-radius: 0;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.sidebar-brand-badge {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 84px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(6, 78, 59, .08);
    color: var(--brand-900);
}

.sidebar-brand-badge-sm {
    width: 34px;
    height: 46px;
    border-radius: 11px;
}

.sidebar-brand-badge .sidebar-logo img,
.sidebar-brand-badge .sidebar-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-brand-name {
    overflow: hidden;
    color: var(--brand-900);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--brand-900);
    background: var(--accent-100);
    font-size: 1.45rem;
    box-shadow: 0 10px 25px rgba(6, 78, 59, .18);
    flex: 0 0 auto;
}

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 52px;
    background: #fff;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header h1 {
    margin: 0;
    font-size: clamp(1.875rem, 2.6vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: #0f172a;
}

.auth-form-header p {
    margin: 10px 0 0;
    font-size: .9rem;
    font-weight: 500;
    color: #64748b;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 0;
    border-radius: 12px;
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.45;
}

.auth-alert i {
    font-size: 1rem;
    line-height: 1.3;
    flex: 0 0 auto;
}

.auth-field {
    margin-bottom: 22px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.auth-field .form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .10);
}

.auth-field .invalid-feedback {
    display: block;
    margin-top: 7px;
    color: #dc2626;
    font-size: .78rem;
    font-weight: 500;
}

.auth-field .invalid-feedback[hidden] {
    display: none !important;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 28px;
    flex-wrap: wrap;
}

.auth-options .form-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    min-height: 0;
    padding-left: 0;
}

.auth-check {
    width: 18px;
    height: 18px;
    margin: 0 !important;
    flex: 0 0 auto;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
}

.auth-check:checked {
    background-color: #064e3b;
    border-color: #064e3b;
}

.auth-check:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .16);
}

.auth-options .form-check-label {
    color: #475569;
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.auth-forgot-link {
    font-size: .84rem;
    font-weight: 600;
    color: #047857;
    text-decoration: none;
    transition: color .18s ease;
}

.auth-forgot-link:hover,
.auth-forgot-link:focus-visible {
    color: #064e3b;
    text-decoration: underline;
    outline: none;
}

.auth-form-actions {
    margin-top: 14px;
}

.btn.auth-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    color: #047857;
    background: #fff;
    font-size: .88rem;
    font-weight: 600;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.btn.auth-secondary i {
    color: #d97706;
}

.btn.auth-secondary:hover,
.btn.auth-secondary:focus-visible {
    color: #064e3b;
    background: #ecfdf5;
    border-color: #a7f3d0;
    outline: none;
}

.btn.auth-secondary:hover i,
.btn.auth-secondary:focus-visible i {
    color: #b45309;
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 12px;
    padding: .72rem .9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 .22rem rgba(16, 185, 129, .18);
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input > i {
    position: absolute;
    left: 16px;
    z-index: 2;
    font-size: 1.02rem;
    color: var(--auth-muted);
    pointer-events: none;
    transition: color .18s ease;
}

.auth-input .form-control {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 46px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: .925rem;
    font-weight: 500;
    color: #0f172a;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-input .form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.auth-input .form-control:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .14);
}

.auth-input:focus-within > i {
    color: #059669;
}

.auth-password-toggle {
    position: absolute;
    right: 6px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #047857;
    background: #ecfdf5;
    outline: none;
}

.btn.auth-submit {
    --bs-btn-bg: #064e3b;
    --bs-btn-border-color: #064e3b;
    --bs-btn-hover-bg: #043e2f;
    --bs-btn-hover-border-color: #043e2f;
    --bs-btn-active-bg: #022c22;
    --bs-btn-active-border-color: #022c22;
    --bs-btn-focus-shadow-rgb: 6, 78, 59;
    --bs-btn-disabled-bg: #064e3b;
    --bs-btn-disabled-border-color: #064e3b;
    --bs-btn-disabled-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 12px;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
    box-shadow: 0 10px 24px -8px rgba(6, 78, 59, .45);
    transition: background .18s ease, transform .15s ease, box-shadow .18s ease;
}

.btn.auth-submit:hover {
    color: #fff;
    box-shadow: 0 14px 28px -8px rgba(6, 78, 59, .5);
    transform: translateY(-1px);
}

.btn.auth-submit:active {
    transform: scale(.99) translateY(0);
    box-shadow: 0 6px 16px -6px rgba(6, 78, 59, .4);
}

.btn.auth-submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, .28), 0 10px 24px -8px rgba(6, 78, 59, .45);
}

.btn.auth-submit:disabled,
.btn.auth-submit.is-loading {
    opacity: .75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-reset-help {
    margin: 14px 0 0;
    font-size: .8rem;
    font-weight: 500;
    color: #64748b;
    text-align: center;
}

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 28px 0 0;
    font-size: .75rem;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
}

.auth-security-note i {
    font-size: .85rem;
    color: #64748b;
}

.btn.auth-submit .auth-spinner {
    display: none;
}

.btn.auth-submit.is-loading [data-submit-icon] {
    display: none;
}

.btn.auth-submit.is-loading .auth-spinner {
    display: inline-block;
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary {
    --bs-btn-bg: var(--brand-900);
    --bs-btn-border-color: var(--brand-900);
    --bs-btn-hover-bg: var(--brand-800);
    --bs-btn-hover-border-color: var(--brand-800);
    --bs-btn-active-bg: var(--brand-950);
    --bs-btn-active-border-color: var(--brand-950);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--brand-900);
    --bs-btn-disabled-border-color: var(--brand-900);
    --bs-btn-focus-shadow-rgb: 6, 78, 59;
    box-shadow: 0 10px 24px -10px rgba(6, 78, 59, .45);
}

.btn-success {
    --bs-btn-bg: var(--brand-900);
    --bs-btn-border-color: var(--brand-900);
    --bs-btn-hover-bg: var(--brand-800);
    --bs-btn-hover-border-color: var(--brand-800);
    --bs-btn-active-bg: var(--brand-950);
    --bs-btn-active-border-color: var(--brand-950);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--brand-900);
    --bs-btn-disabled-border-color: var(--brand-900);
    --bs-btn-focus-shadow-rgb: 6, 78, 59;
    box-shadow: 0 10px 24px -10px rgba(6, 78, 59, .45);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-900);
    --bs-btn-border-color: var(--brand-900);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-900);
    --bs-btn-hover-border-color: var(--brand-900);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-800);
    --bs-btn-active-border-color: var(--brand-800);
    --bs-btn-disabled-color: var(--brand-900);
    --bs-btn-disabled-border-color: var(--brand-900);
    --bs-btn-focus-shadow-rgb: 6, 78, 59;
}

.btn-outline-secondary {
    --bs-btn-color: var(--ink-700);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: var(--brand-900);
    --bs-btn-hover-bg: var(--brand-50);
    --bs-btn-hover-border-color: var(--brand-200);
    --bs-btn-active-color: var(--brand-950);
    --bs-btn-active-bg: var(--brand-100);
    --bs-btn-active-border-color: var(--brand-200);
    --bs-btn-disabled-color: var(--ink-500);
    --bs-btn-disabled-border-color: var(--line);
    --bs-btn-focus-shadow-rgb: 6, 78, 59;
}

.btn-outline-danger {
    --bs-btn-color: var(--danger-700);
    --bs-btn-border-color: #f4b4b4;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--danger-600);
    --bs-btn-hover-border-color: var(--danger-600);
    --bs-btn-active-bg: var(--danger-700);
    --bs-btn-active-border-color: var(--danger-700);
    --bs-btn-disabled-color: var(--danger-700);
    --bs-btn-disabled-border-color: #f4b4b4;
    --bs-btn-focus-shadow-rgb: 220, 38, 38;
}

.btn-warning {
    --bs-btn-color: #422f00;
    --bs-btn-bg: var(--accent-500);
    --bs-btn-border-color: var(--accent-500);
    --bs-btn-hover-color: #422f00;
    --bs-btn-hover-bg: var(--accent-600);
    --bs-btn-hover-border-color: var(--accent-600);
    --bs-btn-active-color: #422f00;
    --bs-btn-active-bg: var(--accent-700);
    --bs-btn-active-border-color: var(--accent-700);
    --bs-btn-disabled-color: #422f00;
    --bs-btn-disabled-bg: var(--accent-500);
    --bs-btn-disabled-border-color: var(--accent-500);
    --bs-btn-focus-shadow-rgb: 234, 179, 8;
}

.btn-outline-warning {
    --bs-btn-color: var(--accent-700);
    --bs-btn-border-color: var(--accent-500);
    --bs-btn-hover-color: #422f00;
    --bs-btn-hover-bg: var(--accent-500);
    --bs-btn-hover-border-color: var(--accent-500);
    --bs-btn-active-color: #422f00;
    --bs-btn-active-bg: var(--accent-600);
    --bs-btn-active-border-color: var(--accent-600);
    --bs-btn-disabled-color: var(--accent-700);
    --bs-btn-disabled-border-color: var(--accent-500);
    --bs-btn-focus-shadow-rgb: 234, 179, 8;
}

.btn-danger {
    --bs-btn-bg: var(--danger-600);
    --bs-btn-border-color: var(--danger-600);
    --bs-btn-hover-bg: var(--danger-700);
    --bs-btn-hover-border-color: var(--danger-700);
    --bs-btn-active-bg: #991b1b;
    --bs-btn-active-border-color: #991b1b;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--danger-600);
    --bs-btn-disabled-border-color: var(--danger-600);
    --bs-btn-focus-shadow-rgb: 220, 38, 38;
}

.btn-soft {
    color: var(--brand-800);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
}

.btn-soft:hover {
    color: var(--brand-900);
    background: var(--brand-100);
}

.form-check-input:checked {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

.form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

.form-check-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 .22rem rgba(16, 185, 129, .2);
}

.app-body {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    color: #ecfdf3;
    background:
        radial-gradient(circle at top right, rgba(21, 86, 67, .5), transparent 34%),
        radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(160deg, var(--sidebar-top) 0%, var(--sidebar-mid) 55%, var(--sidebar-bottom) 100%);
    background-size: auto, 24px 24px, auto;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 8px 0 32px rgba(6, 78, 59, .22);
    transition: transform .25s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
}

.sidebar-brand-text {
    min-width: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 1.2rem;
    color: #713f12;
    background: var(--accent-100);
}

.sidebar-brand-name {
    font-size: .94rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.sidebar-brand-sub {
    font-size: .71rem;
    color: rgba(255, 255, 255, .72);
}

.sidebar-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #713f12;
    background: linear-gradient(180deg, var(--accent-200), var(--accent-100));
    font-size: .64rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, .35);
}

.sidebar-role-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-600);
}

.sidebar-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 10px 10px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}

.sidebar-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .14);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    margin-bottom: 5px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .82);
    font-size: .89rem;
    font-weight: 500;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sidebar-link i {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .7);
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    transform: translateX(2px);
}

.sidebar-link:hover i {
    color: var(--accent-200);
}

.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 4px 0 0 var(--accent-400);
}

.sidebar-link.active i {
    color: var(--accent-300);
}

.sidebar-link.is-disabled {
    color: rgba(255, 255, 255, .4);
    cursor: default;
}

.sidebar-link.is-disabled:hover {
    background: transparent;
    transform: none;
}

.sidebar-link .stage-badge {
    margin-left: auto;
    font-size: .6rem;
    color: rgba(255, 255, 255, .7);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    padding: 2px 7px;
}

.sidebar-dropdown-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.sidebar-dropdown-toggle .sidebar-chevron {
    margin-left: auto;
    font-size: .7rem;
    opacity: .7;
    transition: transform .2s ease, opacity .2s ease;
}

.sidebar-group.is-open > .sidebar-dropdown-toggle .sidebar-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--accent-200);
}

.sidebar-dropdown-toggle.is-active-parent {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.sidebar-dropdown-toggle.is-active-parent > i:first-child {
    color: var(--accent-300);
}

.sidebar-submenu {
    display: grid;
    gap: 2px;
    max-height: 0;
    margin: 0 0 0 14px;
    padding-left: 10px;
    border-left: 1px solid rgba(250, 204, 21, .2);
    overflow: hidden;
    opacity: 0;
    transition: max-height .25s ease, opacity .2s ease, margin .25s ease;
}

.sidebar-group.is-open > .sidebar-submenu {
    max-height: 320px;
    margin: 2px 0 6px 14px;
    opacity: 1;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .78);
    font-size: .83rem;
    font-weight: 500;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sidebar-sublink i {
    font-size: .95rem;
    opacity: .85;
}

.sidebar-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    transform: translateX(2px);
}

.sidebar-sublink.active {
    color: #fff;
    background: rgba(250, 204, 21, .14);
    box-shadow: inset 3px 0 0 var(--accent-400);
    font-weight: 600;
}

.sidebar-sublink.active i {
    color: var(--accent-300);
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.sidebar-status {
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.06));
    border: 1px solid rgba(255, 255, 255, .12);
    border-left: 3px solid var(--accent-400);
    font-size: .74rem;
    color: rgba(255, 255, 255, .84);
}

.sidebar-status strong {
    display: block;
    color: #fff;
    font-size: .8rem;
    margin-bottom: 3px;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 28px;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(211, 224, 216, .8);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.topbar-title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}

.topbar-subtitle {
    margin: 2px 0 0;
    color: var(--ink-500);
    font-size: .76rem;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 7px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
    font-size: .82rem;
    font-weight: 700;
}

.user-name {
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.15;
}

.user-role {
    font-size: .66rem;
    color: var(--ink-500);
}

.icon-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink-700);
    background: #fff;
}

.icon-button:hover {
    color: var(--brand-800);
    background: var(--brand-50);
}

.sidebar-toggle {
    display: none;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px;
}

.page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-hero {
    position: relative;
    padding: 24px 24px 22px;
    border: 1px solid rgba(5, 150, 105, .12);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, .14), transparent 26%),
        linear-gradient(135deg, rgba(255,255,255,.97) 0%, rgba(236, 253, 245, .94) 100%);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, .1), transparent 70%);
    pointer-events: none;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--brand-700);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.page-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand-600), var(--accent-400));
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--ink-900);
}

.page-heading p {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--ink-500);
    font-size: .9rem;
    line-height: 1.6;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--ink-900);
}

.section-subtitle {
    margin: 3px 0 0;
    color: var(--ink-500);
    font-size: .76rem;
}

.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--brand-900);
    background: rgba(255,255,255,.85);
    border: 1px solid var(--line-strong);
    font-size: .77rem;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

.greeting-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #713f12;
    background: linear-gradient(180deg, var(--accent-200), var(--accent-100));
    border: 1px solid rgba(250, 204, 21, .45);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-dashboard-hero .page-eyebrow {
    font-size: .8rem;
}

.admin-dashboard-hero .greeting-title {
    font-size: clamp(1.85rem, 2.8vw, 2.45rem);
    line-height: 1.12;
    letter-spacing: -.04em;
}

.greeting-role {
    display: inline-flex;
    align-items: center;
    color: var(--brand-700);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.admin-summary-grid .stat-label {
    font-size: .8rem;
}

.admin-summary-grid .stat-value {
    font-size: clamp(1.75rem, 2vw, 2.15rem);
}

.admin-summary-grid .stat-hint {
    font-size: .77rem;
}

.attention-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(250, 204, 21, .28);
    border-left: 4px solid var(--accent-400);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fffef5 0%, #f7fbf7 100%);
    box-shadow: var(--shadow-xs);
}
.attention-panel.is-safe {
    grid-template-columns: 1fr;
    border-color: rgba(5, 150, 105, .18);
    border-left-color: var(--brand-600);
    background: linear-gradient(135deg, #f4fbf8 0%, #ffffff 100%);
}
.attention-safe {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--brand-900);
    font-weight: 700;
    font-size: .9rem;
}
.attention-safe i { font-size: 1.5rem; color: var(--brand-600); }

.attention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid rgba(229, 237, 232, .9);
    border-radius: 14px;
    color: var(--ink-900);
    background: rgba(255,255,255,.92);
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.attention-item:hover {
    color: var(--ink-900);
    border-color: rgba(250, 204, 21, .45);
    box-shadow: 0 10px 24px rgba(6, 78, 59, .07);
    transform: translateY(-2px);
    text-decoration: none;
}

.attention-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: var(--brand-800);
    background: var(--brand-100);
    font-size: 1.05rem;
}

.attention-icon.is-warning {
    color: var(--warning-text);
    background: var(--warning-bg);
}

.attention-icon.is-danger {
    color: var(--danger-text);
    background: var(--danger-bg);
}

.attention-item strong {
    display: block;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.35;
}

.attention-item small {
    display: block;
    margin-top: 2px;
    color: var(--ink-500);
    font-size: .72rem;
}

.card {
    border: 1px solid rgba(229, 237, 232, .95);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-title {
    margin: 0;
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.card-subtitle {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: .75rem;
    line-height: 1.45;
}

.card-body {
    padding: 22px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    height: 100%;
    border: 1px solid rgba(229, 237, 232, .95);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff 0%, #fcfefd 100%);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-600), rgba(250, 204, 21, .35));
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -48px;
    bottom: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, .08), transparent 70%);
}

.stat-card:hover {
    border-color: rgba(5, 150, 105, .22);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card.is-accent-danger { border-left: 4px solid var(--danger-600); }
.stat-card.is-accent-warning { border-left: 4px solid var(--accent-400); }
.stat-card.is-accent-success { border-left: 4px solid var(--brand-600); }
.stat-card.is-accent-danger::before,
.stat-card.is-accent-warning::before,
.stat-card.is-accent-success::before { display: none; }

.stat-card.is-hero {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(21, 86, 67, .55), transparent 34%),
        linear-gradient(150deg, var(--brand-900) 0%, var(--sidebar-mid) 58%, var(--brand-950) 100%);
    border: 0;
    box-shadow: 0 16px 36px rgba(6, 78, 59, .24);
}
.stat-card.is-hero::before, .stat-card.is-hero::after { display: none; }
.stat-card.is-hero .stat-label,
.stat-card.is-hero .stat-hint,
.stat-card.is-hero .stat-meta { color: rgba(255,255,255,.84); }
.stat-card.is-hero .stat-value { color: #fff; font-size: clamp(1.5rem, 2vw, 2.2rem); }
.stat-card.is-hero .stat-icon { background: rgba(255,255,255,.14); color: #fef08a; border-color: rgba(255,255,255,.16); box-shadow: none; }

.stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.stat-label {
    color: var(--ink-500);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.stat-value {
    margin-top: 10px;
    color: var(--ink-900);
    font-size: clamp(1.55rem, 1.8vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.05;
}

.stat-hint {
    margin-top: 10px;
    color: var(--ink-500);
    font-size: .72rem;
    line-height: 1.45;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(5, 150, 105, .12);
    border-radius: 14px;
    font-size: 1.15rem;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px rgba(6, 78, 59, .06);
}

.stat-icon.teal {
    color: var(--brand-700);
    background: var(--brand-100);
}

.stat-icon.blue {
    color: var(--accent-700);
    background: var(--accent-100);
}

.stat-icon.green {
    color: var(--brand-800);
    background: var(--brand-100);
}

.stat-icon.amber {
    color: #854d0e;
    background: var(--accent-100);
    border-color: rgba(250, 204, 21, .28);
}

.stat-icon.red {
    color: var(--danger-text);
    background: var(--danger-bg);
    border-color: rgba(220, 38, 38, .14);
}

.stat-icon.slate {
    color: var(--ink-500);
    background: #f1f5f3;
}

.table {
    margin-bottom: 0;
    font-size: .82rem;
}

.table > :not(caption) > * > * {
    padding: .78rem .7rem;
    border-bottom-color: #edf6f0;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--brand-900);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #f4fbf6 0%, #edf7f0 100%);
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}

.table-responsive {
    position: relative;
    background:
        linear-gradient(90deg, var(--white) 30%, rgba(255, 255, 255, 0)),
        linear-gradient(90deg, rgba(255, 255, 255, 0), var(--white) 70%) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(6, 78, 59, .12), rgba(6, 78, 59, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(6, 78, 59, .12), rgba(6, 78, 59, 0)) 100% 0;
    background-repeat: no-repeat;
    background-color: var(--white);
    background-size: 36px 100%, 36px 100%, 12px 100%, 12px 100%;
    background-attachment: local, local, scroll, scroll;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: #f7fcf8;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-aman,
.badge-in {
    color: var(--brand-800);
    background: var(--brand-100);
    border-color: rgba(5, 150, 105, .14);
}

.badge-menipis,
.badge-warning {
    color: #854d0e;
    background: var(--accent-100);
    border-color: rgba(250, 204, 21, .28);
}

.badge-habis,
.badge-out,
.badge-danger {
    color: var(--danger-text);
    background: var(--danger-bg);
    border-color: rgba(220, 38, 38, .12);
}

.badge-expired {
    color: #991b1b;
    background: #fee2e2;
    border-color: rgba(220, 38, 38, .14);
}

.badge-incomplete,
.badge-muted {
    color: var(--ink-700);
    background: #f1f5f3;
    border-color: rgba(100, 116, 139, .12);
}

.badge-info {
    color: #854d0e;
    background: var(--accent-100);
    border-color: rgba(250, 204, 21, .28);
}

.bg-success {
    background-color: var(--brand-600) !important;
}

.bg-warning {
    background-color: var(--accent-500) !important;
}

.bg-danger {
    background-color: var(--danger-600) !important;
}

.bg-secondary {
    background-color: #94a3b8 !important;
}

.empty-state {
    padding: 38px 22px;
    text-align: center;
    color: var(--ink-500);
}

.empty-state-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border: 1px solid var(--brand-100);
    border-radius: 18px;
    color: var(--brand-700);
    background: linear-gradient(145deg, var(--brand-50), var(--brand-100));
    font-size: 1.35rem;
}

.empty-state h3 {
    margin: 0 0 6px;
    color: var(--ink-700);
    font-size: .92rem;
    font-weight: 700;
}

.empty-state p {
    max-width: 390px;
    margin: 0 auto;
    font-size: .78rem;
    line-height: 1.6;
}

.alert {
    border: 0;
    border-radius: 13px;
    font-size: .82rem;
}

.alert-success {
    color: var(--brand-900);
    background: var(--brand-100);
}

.alert-info {
    color: var(--warning-text);
    background: var(--warning-bg);
}

.alert-warning {
    color: var(--warning-text);
    background: var(--warning-bg);
}

.alert-danger {
    color: var(--danger-text);
    background: var(--danger-bg);
}

.alert a {
    color: inherit;
    text-decoration: underline;
}

.info-strip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--accent-200);
    border-radius: 14px;
    background: var(--warning-bg);
    color: var(--warning-text);
    font-size: .78rem;
    line-height: 1.6;
}

.info-strip i {
    font-size: 1rem;
    margin-top: 1px;
    color: var(--accent-600);
}

.chart-wrap {
    position: relative;
    min-height: 280px;
}

.chart-wrap-shift {
    min-height: 340px;
}

.report-print-brand { display: flex; justify-content: center; margin-bottom: 8px; }
.report-print-logo img, .report-print-logo svg { width: 48px; height: 48px; }

.chart-legend {
    display: flex;
    gap: 16px;
    font-size: .72rem;
    color: var(--ink-500);
}

.legend-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 5px;
}

.mini-list {
    display: grid;
    gap: 13px;
}

.mini-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.mini-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(6, 78, 59, .06);
    border-radius: 12px;
    flex: 0 0 auto;
    font-size: .92rem;
}

.mini-title {
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.35;
}

.mini-meta {
    margin-top: 2px;
    color: var(--ink-500);
    font-size: .7rem;
    line-height: 1.45;
}

.app-footer {
    padding: 18px 28px 26px;
    color: var(--ink-500);
    font-size: .7rem;
    text-align: center;
}

.error-code {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.06em;
    color: var(--brand-700);
}

.auth-card {
    width: min(480px, 100%);
    padding: 48px 38px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1199.98px) {
    .content {
        padding: 24px;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-grid;
    }

    .mobile-brand {
        display: flex;
    }

    .topbar-title,
    .topbar-subtitle {
        display: none;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: block;
        background: rgba(15, 23, 42, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }

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

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

    .auth-shell {
        padding: 24px;
    }

    .auth-panel {
        grid-template-columns: 1fr;
        min-height: 0;
        max-width: 560px;
    }

    .auth-visual {
        padding: 40px 32px 36px;
    }

    .auth-visual::before {
        width: 280px;
        height: 280px;
        top: -140px;
        right: -100px;
    }

    .auth-visual::after {
        width: 220px;
        height: 220px;
        bottom: -110px;
        left: -80px;
    }

    .auth-logo-wrap {
        margin-bottom: 14px;
    }

    .auth-brand-logo {
        width: 96px;
    }

    .auth-identity-tagline {
        max-width: 360px;
    }

    .auth-form-side {
        padding: 44px 36px 40px;
    }

    .auth-form-wrap {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .attention-panel {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .dashboard-hero {
        padding: 20px 18px;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        padding: 13px 16px;
    }

    .content {
        padding: 18px 16px;
    }

    .topbar-subtitle,
    .user-name,
    .user-role {
        display: none;
    }

    .user-pill {
        padding: 5px;
        border: 0;
        background: transparent;
    }

    .auth-shell {
        padding: 16px;
        align-items: start;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .auth-panel {
        border-radius: 20px;
    }

    .auth-visual {
        padding: 32px 24px 28px;
    }

    .auth-brand-logo {
        width: 84px;
    }

    .auth-identity-name {
        font-size: 1.4rem;
    }

    .auth-identity-tagline {
        font-size: .82rem;
    }

    .auth-form-side {
        padding: 32px 24px 28px;
    }

    .auth-form-header {
        margin-bottom: 28px;
    }

    .auth-form-header h1 {
        font-size: 1.75rem;
    }

    .auth-options {
        margin-bottom: 24px;
    }

    .auth-input .form-control,
    .btn.auth-submit {
        height: 50px;
    }

    .auth-input .form-control {
        font-size: 1rem;
    }

    .auth-security-note {
        margin-top: 24px;
        font-size: .72rem;
    }

    .auth-card {
        padding: 34px 24px;
    }
}

.sidebar-count {
    margin-left: auto;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    color: var(--brand-900);
    background: var(--accent-100);
    font-size: .62rem;
    font-weight: 800;
    text-align: center;
}

a.user-pill {
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

a.user-pill:hover {
    color: inherit;
    border-color: var(--line-strong);
    box-shadow: 0 8px 20px rgba(6, 78, 59, .08);
}

.topbar-notification {
    position: relative;
}

.topbar-notification > i {
    color: var(--accent-600);
}

.topbar-notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    border: 2px solid #fff;
    font-size: .58rem;
    font-weight: 800;
}

.app-table > :not(caption) > * > * {
    vertical-align: middle;
}

.stat-meta {
    display: block;
    margin-top: 4px;
    color: var(--ink-500);
    font-size: .7rem;
    line-height: 1.45;
}

.stat-value-sm {
    font-size: 1.08rem;
    letter-spacing: -.02em;
}

.stat-icon-warning {
    color: var(--accent-700);
    background: var(--accent-100);
}

.stat-icon-danger {
    color: var(--danger-700);
    background: var(--danger-100);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-500);
    background: #fff;
    font-size: .7rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.filter-pill:hover {
    color: var(--brand-800);
    border-color: var(--brand-200);
    background: var(--brand-50);
}

.filter-pill.active {
    color: var(--brand-900);
    border-color: var(--brand-200);
    background: var(--brand-100);
}

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-500);
    background: #fff;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.status-tab:hover {
    color: var(--brand-800);
    border-color: var(--brand-200);
    background: var(--brand-50);
}

.status-tab.active {
    color: var(--brand-900);
    border-color: var(--brand-200);
    background: var(--brand-100);
}

.status-tab.is-approved.active {
    color: var(--brand-900);
    border-color: rgba(5, 150, 105, .24);
    background: var(--brand-100);
}

.status-tab.is-rejected.active {
    color: var(--danger-text);
    border-color: rgba(220, 38, 38, .2);
    background: var(--danger-bg);
}

.status-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--ink-700);
    background: #f1f5f3;
}

.status-tab.is-approved .status-tab-count {
    color: var(--brand-800);
    background: var(--brand-100);
}

.status-tab.is-rejected .status-tab-count {
    color: var(--danger-text);
    background: var(--danger-bg);
}

@media (max-width: 575.98px) {
    .status-tab {
        flex: 1 1 100%;
        justify-content: space-between;
    }
}

.formula-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--ink-700);
    background: var(--brand-50);
    border: 1px solid var(--line);
    font-size: .74rem;
    line-height: 1.55;
}

.formula-note i {
    color: var(--brand-700);
}

.priority-rank {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    color: #854d0e;
    background: var(--accent-100);
    font-size: .72rem;
    font-weight: 800;
}

.priority-rank.is-critical {
    color: var(--danger-700);
    background: var(--danger-100);
}

.row-unread {
    background: var(--accent-100);
}

.row-unread:hover {
    background: var(--accent-200) !important;
}

.row-unread td:first-child {
    box-shadow: inset 3px 0 0 var(--accent-500);
}

.table-muted {
    opacity: .58;
}

.detail-label {
    color: var(--ink-500);
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.detail-value {
    color: var(--ink-900);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.5;
}

.user-avatar-lg {
    width: 76px;
    height: 76px;
    font-size: 1.55rem;
}

.stock-hint {
    color: var(--ink-500);
    font-size: .68rem;
}

.item-row td {
    vertical-align: top;
}

.item-row .item-quantity {
    max-width: 110px;
}

.item-row .item-price {
    min-width: 120px;
}

.eoq-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.eoq-table {
    min-width: 1100px;
}

.eoq-table td,
.eoq-table th {
    height: 72px;
    vertical-align: middle;
}

.eoq-table .eoq-sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    min-width: 220px;
    box-shadow: 8px 0 12px -12px rgba(15, 23, 42, .35);
}

.eoq-table thead .eoq-sticky-col {
    z-index: 3;
    background: linear-gradient(180deg, #f4fbf6 0%, #edf7f0 100%);
}

.eoq-detail-list {
    display: grid;
    gap: 14px;
}

.eoq-detail {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.eoq-detail[open] {
    border-color: rgba(5, 150, 105, .22);
    box-shadow: var(--shadow-sm);
}

.eoq-detail-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    list-style: none;
    cursor: pointer;
    background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
}

.eoq-detail-summary::-webkit-details-marker {
    display: none;
}

.eoq-detail-summary:hover {
    background: #f7fcf8;
}

.eoq-detail-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.eoq-detail-title {
    color: var(--ink-900);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.35;
}

.eoq-detail-meta {
    margin-top: 2px;
    color: var(--ink-500);
    font-size: .72rem;
}

.eoq-detail-summary-result {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: .8rem;
}

.eoq-detail-summary-result strong {
    color: var(--brand-800);
    white-space: nowrap;
}

.eoq-detail-summary-label {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--accent-700);
    background: var(--accent-100);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.eoq-detail-chevron {
    color: var(--ink-400);
    font-size: .8rem;
    transition: transform .2s ease;
}

.eoq-detail[open] .eoq-detail-chevron {
    transform: rotate(180deg);
}

.eoq-detail-body {
    padding: 16px 18px 18px;
    border-top: 1px dashed var(--line);
}

.eoq-param {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #fff 0%, #fcfefd 100%);
}

.eoq-param::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: linear-gradient(90deg, var(--brand-600), rgba(250, 204, 21, .35));
}

.eoq-param-holding::before {
    background: linear-gradient(90deg, var(--accent-400), rgba(5, 150, 105, .3));
}

.eoq-param-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eoq-param-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--brand-700);
    background: var(--brand-50);
    font-size: 1rem;
}

.eoq-param-holding .eoq-param-icon {
    color: var(--accent-700);
    background: var(--accent-50);
}

.eoq-param-label {
    display: block;
    color: var(--ink-500);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.eoq-param-symbol {
    display: block;
    color: var(--ink-900);
    font-size: .95rem;
    font-weight: 800;
}

.eoq-param-value {
    color: var(--brand-800);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.eoq-param-value .eoq-param-unit {
    color: var(--ink-500);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: 0;
}

.eoq-param-desc {
    margin: 0;
    color: var(--ink-700);
    font-size: .74rem;
    line-height: 1.5;
}

.eoq-param-source {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    color: var(--ink-500);
    font-size: .68rem;
    line-height: 1.45;
}

.eoq-param-source i {
    margin-top: 1px;
    color: var(--brand-600);
}

.eoq-result {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 18px;
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at top right, rgba(21, 86, 67, .55), transparent 38%),
        linear-gradient(150deg, var(--brand-900) 0%, var(--sidebar-mid) 58%, var(--brand-950) 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(6, 78, 59, .2);
}

.eoq-result-main {
    flex: 1 1 280px;
}

.eoq-result-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fef08a;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.eoq-result-value {
    margin-top: 8px;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.05;
}

.eoq-result-value span {
    color: rgba(255, 255, 255, .8);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: 0;
}

.eoq-result-value.is-empty {
    color: #fef08a;
    font-size: 1.3rem;
}

.eoq-result-desc {
    max-width: 48ch;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: .76rem;
    line-height: 1.5;
}

.eoq-result-reasons {
    margin: 10px 0 0;
    padding-left: 18px;
    color: rgba(255, 255, 255, .78);
    font-size: .72rem;
    line-height: 1.5;
}

.eoq-result-formula {
    display: flex;
    flex: 0 1 240px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .1);
}

.eoq-result-formula-label {
    color: #fef08a;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.eoq-result-formula code {
    padding: 0;
    color: #fff;
    background: transparent;
    font-size: .86rem;
}

.eoq-result-source {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: rgba(255, 255, 255, .78);
    font-size: .66rem;
    line-height: 1.4;
}

@media (max-width: 575.98px) {
    .eoq-detail-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .eoq-detail-summary-result {
        width: 100%;
        justify-content: space-between;
    }
}

.report-print-header {
    display: none;
}

.report-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.report-heading h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.report-heading p {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: .76rem;
}

.report-signature {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    max-width: 620px;
    margin: 48px 0 0 auto;
    text-align: center;
    font-size: .76rem;
    line-height: 1.6;
}

.report-signature div {
    min-width: 160px;
}

.report-signature span {
    display: block;
    color: var(--ink-500);
}

.report-signature strong {
    display: block;
    margin-top: 48px;
    padding-top: 8px;
    border-top: 1px solid var(--ink-700);
}

@media print {
    .sidebar,
    .topbar,
    .app-footer,
    .sidebar-backdrop,
    .no-print {
        display: none !important;
    }

    .app-main {
        margin-left: 0;
    }

    .content {
        max-width: none;
        padding: 0;
    }

    .report-heading {
        display: none !important;
    }

    .report-print-header {
        display: block;
        margin-bottom: 24px;
        text-align: center;
    }

    .report-print-header h2 {
        margin: 0 0 4px;
        font-size: 1.35rem;
        font-weight: 800;
    }

    .report-print-header p {
        margin: 0;
        color: var(--ink-500);
        font-size: .78rem;
    }

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

    .card-header {
        padding: 10px 0;
    }

    .table {
        font-size: .72rem;
    }

    .badge-soft {
        border: 1px solid currentColor;
    }

    .report-signature {
        page-break-inside: avoid;
    }
}

.confirm-modal {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 20px;
    box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .22);
}

.confirm-modal .modal-body {
    padding: 32px 28px 20px;
    text-align: center;
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.5rem;
}

.confirm-modal-icon.is-danger {
    color: #dc2626;
    background: #fef2f2;
}

.confirm-modal-icon.is-primary {
    color: #047857;
    background: #ecfdf5;
}

.confirm-modal-title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #0f172a;
}

.confirm-modal-message {
    font-size: .9rem;
    line-height: 1.6;
    color: #64748b;
}

.confirm-modal-footer {
    gap: 10px;
    padding: 0 28px 28px;
    border-top: 0;
    justify-content: center;
}

.confirm-modal-footer .btn {
    min-width: 120px;
    padding: .62rem 1rem;
}
