@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Premium light system (keep theme light-only) */
    --bg0: #f7f8fc;
    --bg1: #eef2ff;
    --page-bg: #f1f4f9;
    --surface-solid: #ffffff;
    --surface-muted: #f8fafc;
    --surface: rgba(255, 255, 255, 0.86);
    --surface2: rgba(255, 255, 255, 0.72);
    --stroke: rgba(15, 23, 42, 0.10);
    --stroke2: rgba(15, 23, 42, 0.14);
    --text: rgba(15, 23, 42, 0.92);
    --muted: rgba(15, 23, 42, 0.62);
    --muted2: rgba(15, 23, 42, 0.48);
    --shadow: 0 30px 80px rgba(2, 6, 23, 0.14);
    --shadow2: 0 14px 34px rgba(2, 6, 23, 0.10);
    --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.06);
    /* Fibernet brand (logo red + deep violet) */
    --brand: #e11d2e;
    --brand2: #6d28d9;
    --ring: rgba(225, 29, 46, 0.18);
    --ring2: rgba(109, 40, 217, 0.28);
    --danger: #e11d48;
    --dangerBg: rgba(225, 29, 72, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* Thin themed scrollbar (Firefox + WebKit) */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(109, 40, 217, 0.55) rgba(15, 23, 42, 0.10);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(225, 29, 46, 0.65), rgba(109, 40, 217, 0.65));
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.08);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(225, 29, 46, 0.78), rgba(109, 40, 217, 0.78));
}

body {
    margin: 0;
    font-family: Poppins, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background:
        radial-gradient(900px 520px at 12% -8%, rgba(225, 29, 46, 0.045), transparent 58%),
        radial-gradient(720px 480px at 92% 0%, rgba(109, 40, 217, 0.05), transparent 55%),
        var(--page-bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

html.dash-nav-open,
body.dash-nav-open {
    overflow: hidden;
}

input, button, textarea, select {
    font: inherit;
}

a { color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-box {
    width: min(420px, 100%);
    background: var(--surface-solid);
    padding: 28px 26px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    isolation: isolate;
    transform: translateY(0);
    animation: floatIn 500ms ease-out both;
}

.brandmark {
    margin: 2px auto 0;
}

.brand-logo {
    display: block;
    height: 40px;
    width: auto;
    margin: 0 auto;
    filter: drop-shadow(0 12px 26px rgba(2, 6, 23, 0.12));
}

.brand-logo-sm {
    display: block;
    height: 22px;
    width: auto;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.85), transparent 45%),
        linear-gradient(135deg, var(--brand), var(--brand2));
    color: rgba(255, 255, 255, 0.98);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    font-size: 24px;
    box-shadow: 0 18px 40px rgba(225, 29, 46, 0.16), 0 12px 22px rgba(109, 40, 217, 0.12);
}

h2 {
    margin: 14px 0 6px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--muted);
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
}

label {
    display: block;
    text-align: left;
    margin: 14px 0 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--stroke2);
    border-radius: 12px;
    margin-bottom: 10px;
    min-height: 48px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.70);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.input-group input {
    border: none;
    outline: none;
    flex: 1;
    padding: 2px 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.input-group select {
    border: none;
    outline: none;
    flex: 1;
    padding: 2px 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.input-group input[type="file"] {
    padding: 0;
}

.input-group input::placeholder {
    color: rgba(15, 23, 42, 0.35);
}

/* Prevent browser autofill blue background / text color */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    transition: background-color 99999s ease-out 0s;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.86) inset;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.86) inset;
    border-radius: 10px;
}

.input-group input::selection {
    background: rgba(225, 29, 46, 0.18);
}

.input-group:focus-within {
    border-color: rgba(225, 29, 46, 0.40);
    box-shadow: 0 0 0 4px var(--ring);
    background: rgba(255, 255, 255, 0.86);
    transform: translateY(-1px);
}

.input-group i {
    margin-right: 10px;
    color: rgba(15, 23, 42, 0.50);
}

.toggle-password {
    cursor: pointer;
    margin-right: 0 !important;
    margin-left: 10px;
    color: rgba(15, 23, 42, 0.50);
    transition: color 160ms ease, transform 160ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    padding: 0;
}

.toggle-password:hover {
    color: rgba(15, 23, 42, 0.78);
    transform: translateY(-1px);
}

.toggle-password:focus-visible {
    outline: none;
    border-color: rgba(225, 29, 46, 0.35);
    box-shadow: 0 0 0 4px var(--ring);
}

.toggle-password i {
    margin: 0 !important;
}

.login-box button[type="submit"] {
    width: 100%;
    background: radial-gradient(120% 160% at 20% 20%, rgba(255,255,255,0.35), transparent 45%),
        linear-gradient(135deg, var(--brand), var(--brand2));
    border: 1px solid rgba(225, 29, 46, 0.20);
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(225, 29, 46, 0.16), 0 12px 22px rgba(109, 40, 217, 0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    margin-top: 10px;
}

.login-box button[type="submit"]:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(225, 29, 46, 0.18), 0 16px 30px rgba(109, 40, 217, 0.14);
}

.login-box button[type="submit"]:active {
    transform: translateY(0);
}

.login-box button[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--ring2), 0 20px 44px rgba(225, 29, 46, 0.16);
}

.remember {
    text-align: left;
    margin-bottom: 15px;
    color: var(--muted2);
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember label {
    margin: 0;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.error {
    color: rgba(15, 23, 42, 0.92);
    background: var(--dangerBg);
    border: 1px solid rgba(225, 29, 72, 0.22);
    margin: 12px 0 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.footer {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.38);
}

/* Simple dashboard shell */
.app-shell {
    min-height: 100vh;
    padding: 26px;
}

.dash-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(260px, 288px) 1fr;
    gap: 20px;
    padding:
        max(18px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(22px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
}

.dash-main {
    min-width: 0;
}

.dash-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 4px 32px;
}

.dash-topbar {
    max-width: 1200px;
    margin: 0 auto 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-topbar__crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dash-topbar__crumb:empty {
    display: none;
}

.dash-topbar__app {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: rgba(15, 23, 42, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.dash-user__hello {
    font-size: 14px;
    color: rgba(15, 23, 42, 0.72);
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
}

.dash-user__sep {
    opacity: 0.55;
    margin: 0 0.2em;
}

.icon-btn {
    border: 1px solid var(--stroke2);
    background: var(--surface-solid);
    color: rgba(15, 23, 42, 0.78);
    height: 44px;
    width: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.20);
}

.icon-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--ring);
}

.dash-topbar__menuBtn {
    display: none;
}

.dash-sidebar {
    position: sticky;
    top: 22px;
    align-self: start;
    height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.dash-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dash-sidebar__brandText {
    min-width: 0;
    flex: 1;
}

.dash-sidebar__logo {
    height: 34px;
    width: auto;
    flex-shrink: 0;
}

.dash-sidebar__title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: rgba(15, 23, 42, 0.9);
}

.dash-sidebar__subtitle {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.52);
    font-weight: 600;
    margin-top: 2px;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 4px;
    overflow: auto;
}

.dash-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    min-height: 48px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(15, 23, 42, 0.78);
    border: 1px solid transparent;
    background: transparent;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.dash-nav__item i {
    width: 20px;
    text-align: center;
    opacity: 0.9;
    font-size: 16px;
}

.dash-nav__item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.64);
    border-color: rgba(15, 23, 42, 0.10);
}

.dash-nav__item.is-active {
    color: rgba(255, 255, 255, 0.98);
    background: radial-gradient(120% 160% at 20% 20%, rgba(255,255,255,0.30), transparent 45%),
        linear-gradient(135deg, var(--brand), var(--brand2));
    border-color: rgba(225, 29, 46, 0.22);
    box-shadow: 0 18px 36px rgba(225, 29, 46, 0.12), 0 14px 26px rgba(109, 40, 217, 0.10);
}

.dash-sidebar__footer {
    margin-top: auto;
    padding: 10px 4px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dash-hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: clamp(16px, 3vw, 22px) clamp(16px, 3vw, 24px);
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dash-hero::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--brand), var(--brand2));
    border-radius: 18px 0 0 18px;
}

.dash-hero__text {
    position: relative;
    min-width: 0;
}

.dash-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3.5vw, 1.625rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: rgba(15, 23, 42, 0.92);
}

.dash-hero p {
    margin: 0;
    color: rgba(15, 23, 42, 0.62);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.45;
    max-width: 52ch;
}

.dash-hero--mb {
    margin-bottom: 16px;
}

.dash-hero__icon {
    position: relative;
    z-index: 1;
    height: 48px;
    width: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.98);
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    box-shadow: 0 18px 40px rgba(225, 29, 46, 0.14), 0 14px 24px rgba(109, 40, 217, 0.12);
    flex: 0 0 auto;
    font-size: 18px;
}

.dash-stats {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.stat {
    grid-column: span 3;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    padding: 16px;
    min-width: 0;
}

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

.stat__label {
    font-size: 13px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.62);
}

.stat__value {
    margin-top: 10px;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.stat__hint {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.50);
    font-weight: 600;
}

.stat__icon {
    height: 34px;
    width: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.70);
}

.stat__icon--green { color: #16a34a; }
.stat__icon--violet { color: var(--brand2); }
.stat__icon--red { color: var(--brand); }
.stat__icon--amber { color: #f59e0b; }
.stat__icon--blue { color: #2563eb; }

.dash-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.dash-card {
    grid-column: span 6;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    padding: 18px;
    min-width: 0;
}

.dash-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.86);
    line-height: 1.25;
}

.dash-card--full {
    grid-column: span 12;
}

.dash-grid--mt0 {
    margin-top: 0;
}

.dash-grid--mt {
    margin-top: 16px;
}

.cust-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.cust-head__left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.cust-photo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.70);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.08);
}

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

.cust-photo__ph {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(15, 23, 42, 0.55);
    background: radial-gradient(120% 160% at 20% 20%, rgba(255,255,255,0.55), transparent 45%),
        linear-gradient(135deg, rgba(225, 29, 46, 0.10), rgba(109, 40, 217, 0.10));
}

.cust-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.62);
}

.cust-title {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 800;
    letter-spacing: -0.015em;
    color: rgba(15, 23, 42, 0.88);
}

.cust-sub {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(15, 23, 42, 0.58);
}

.cust-sub--spaced {
    margin-top: 8px;
}

.kv-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
}

.kv {
    grid-column: span 6;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    padding: 14px;
    min-width: 0;
}

.kv--full {
    grid-column: span 12;
}

.kv__k {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.52);
}

.kv__v {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
    color: rgba(15, 23, 42, 0.86);
    word-break: break-word;
}

.chk-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
}

.chk {
    grid-column: span 6;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    color: rgba(15, 23, 42, 0.82);
}

.chk input {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--brand);
}

.amount-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.amount-row__label {
    font-size: 13px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.62);
}

.totals {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    padding: 14px;
}

.totals__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.78);
    padding: 6px 2px;
}

.totals__hint {
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 900;
    color: rgba(225, 29, 72, 0.95);
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-list__item {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
}

.dash-list__meta {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.52);
    font-weight: 700;
    white-space: nowrap;
}

.dash-list__body {
    font-size: 15px;
    color: rgba(15, 23, 42, 0.78);
    font-weight: 650;
    line-height: 1.4;
}

.dash-list__status {
    font-weight: 600;
    color: rgba(15, 23, 42, 0.48);
    font-size: 13px;
}

.dash-list__body a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dash-list__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.08);
}

.dash-list__dot--green { background: #22c55e; }
.dash-list__dot--violet { background: #8b5cf6; }
.dash-list__dot--amber { background: #f59e0b; }
.dash-list__dot--red { background: #ef4444; }

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.qa {
    text-decoration: none;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    padding: 16px;
    display: grid;
    gap: 6px;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.qa:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.08);
}

.qa__icon {
    height: 40px;
    width: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.75);
}

.qa__icon--amber { color: #f59e0b; }
.qa__icon--blue { color: #2563eb; }
.qa__icon--violet { color: var(--brand2); }
.qa__icon--red { color: var(--brand); }

.qa__title {
    font-weight: 800;
    font-size: 15px;
    color: rgba(15, 23, 42, 0.84);
}

.qa__desc {
    font-size: 14px;
    color: rgba(15, 23, 42, 0.58);
    font-weight: 600;
    line-height: 1.4;
}

.dash-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.40);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 30;
}

.dash-shell[data-sidebar-state="open"] .dash-overlay {
    display: block;
}

.topbar {
    max-width: 1080px;
    margin: 0 auto 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, var(--surface), var(--surface2));
    box-shadow: var(--shadow2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    box-shadow: 0 10px 18px rgba(225, 29, 46, 0.16);
}

.content {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.card {
    grid-column: span 12;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.84);
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.dash-subpanel {
    padding: 16px;
    margin-top: 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    box-shadow: none;
}

.dash-subpanel > h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.84);
}

.dash-alert {
    max-width: 1200px;
    margin: 0 auto 14px;
}

.dash-alert--success {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(240, 253, 244, 0.85);
}

.dash-alert__text {
    margin: 0;
    color: rgba(15, 23, 42, 0.82);
    font-weight: 800;
    font-size: 14px;
    line-height: 1.45;
}

.error--in-card {
    margin: 0 0 14px;
}

.form-stack {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.is-hidden {
    display: none !important;
}

#otherChargesDesc:not(.is-hidden),
#chequeExtras:not(.is-hidden) {
    margin-top: 12px;
}

.label--spaced {
    margin-top: 12px;
}

.totals--spaced {
    margin-top: 12px;
}

.input-group--muted {
    opacity: 0.88;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 48px;
    padding: 12px 18px;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--ring2);
}

.btn-primary {
    color: rgba(255, 255, 255, 0.98);
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    border-color: rgba(225, 29, 46, 0.22);
    box-shadow: 0 12px 28px rgba(225, 29, 46, 0.14), 0 8px 18px rgba(109, 40, 217, 0.1);
}

.btn-primary:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn--mt {
    margin-top: 12px;
}

.btn--mt-lg {
    margin-top: 16px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: var(--surface-muted);
    color: rgba(15, 23, 42, 0.78);
    font-size: 13px;
    font-weight: 700;
}

.pill .ok {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 10px 18px rgba(16, 185, 129, 0.20);
}

.icon-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: rgba(15, 23, 42, 0.55);
}

.icon-btn--ghost:hover {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.85);
}

.dash-table-card {
    border-radius: 18px;
    border: 1px solid var(--stroke);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    padding: 0;
    overflow: hidden;
}

.dash-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 640px;
}

.dash-table th,
.dash-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    vertical-align: middle;
}

.dash-table th {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.52);
    background: var(--surface-muted);
    white-space: nowrap;
}

.dash-table tbody tr:hover {
    background: rgba(241, 244, 249, 0.85);
}

.dash-table__mono {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.78);
}

.dash-table__num {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    white-space: nowrap;
}

.dash-table__col-action {
    width: 72px;
    text-align: center;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    background: rgba(109, 40, 217, 0.1);
    color: rgba(91, 33, 182, 0.95);
}

.dash-badge--pending {
    background: rgba(245, 158, 11, 0.14);
    color: rgba(146, 64, 14, 0.95);
}

.dash-empty-card p {
    margin: 0 0 8px;
    max-width: 42ch;
}

.receipt-cards {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.receipt-card {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: var(--surface-solid);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.receipt-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.receipt-card__id {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: rgba(15, 23, 42, 0.86);
}

.receipt-card__sub {
    margin-top: 4px;
    color: rgba(15, 23, 42, 0.56);
    font-weight: 650;
    font-size: 13px;
}

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

.receipt-card__kv {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    padding: 12px;
    min-width: 0;
}

.receipt-card__k {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.52);
}

.receipt-card__v {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.86);
    word-break: break-word;
}

.receipt-card__money {
    font-variant-numeric: tabular-nums;
}

.receipt-card__foot {
    display: flex;
    justify-content: flex-end;
}

.receipt-card__time {
    font-size: 13px;
    font-weight: 650;
    color: rgba(15, 23, 42, 0.52);
}

.pending-detail__titleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pending-detail__title {
    font-weight: 900;
    font-size: 18px;
}

.pending-detail__sub {
    margin-top: 6px;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 650;
    font-size: 13px;
}

.pending-detail__grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pending-detail__card {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
    padding: 14px;
}

.pending-detail__card h3,
.pending-detail__section h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.82);
}

.pending-detail__kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.pending-detail__kv:last-child {
    border-bottom: none;
}

.pending-detail__kv span {
    color: rgba(15, 23, 42, 0.55);
    font-weight: 700;
    font-size: 13px;
}

.pending-detail__kv strong {
    color: rgba(15, 23, 42, 0.88);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.pending-detail__section {
    margin-top: 16px;
}

.pending-rows {
    display: grid;
    gap: 8px;
}

.pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface-muted);
}

.pending-row span {
    font-weight: 700;
    color: rgba(15, 23, 42, 0.68);
}

.pending-row strong {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: rgba(15, 23, 42, 0.88);
    white-space: nowrap;
}

.pending-row a {
    color: var(--brand);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pending-detail__note {
    margin: 10px 0 0;
    color: rgba(15, 23, 42, 0.72);
    font-weight: 650;
    line-height: 1.45;
}

.pending-detail__actions {
    margin-top: 16px;
}

.pending-detail__err {
    color: rgba(225, 29, 72, 0.95);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 18px;
}

@media (max-width: 720px) {
    .receipt-card__grid {
        grid-template-columns: 1fr;
    }
    .pending-detail__grid {
        grid-template-columns: 1fr;
    }
}

.dash-dialog {
    width: min(720px, 94vw);
    max-height: min(88vh, 900px);
    padding: 0;
    border: none;
    border-radius: 18px;
    box-shadow: var(--shadow);
    color: var(--text);
}

.dash-dialog::backdrop {
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.dash-dialog__inner {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 900px);
}

.dash-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dash-dialog__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
}

.dash-dialog__body {
    padding: 16px 18px 20px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dash-dialog__loading {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.dash-dialog__section {
    margin-bottom: 18px;
}

.dash-dialog__section:last-child {
    margin-bottom: 0;
}

.dash-dialog__h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
}

.dash-dialog__kvgrid {
    display: grid;
    gap: 8px 12px;
}

.dash-dialog__kv {
    display: grid;
    grid-template-columns: minmax(0, 160px) 1fr;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .dash-dialog__kv {
        grid-template-columns: 1fr;
    }
}

.dash-dialog__k {
    font-weight: 700;
    color: rgba(15, 23, 42, 0.52);
}

.dash-dialog__v {
    font-weight: 650;
    color: rgba(15, 23, 42, 0.88);
    word-break: break-word;
}

.dash-dialog__pre {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 12px;
    line-height: 1.45;
    overflow: auto;
    max-height: 220px;
}

.dash-muted {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

@media (max-width: 720px) {
    .kv,
    .chk {
        grid-column: span 12;
    }
}

/* MOBILE */
@media (max-width: 920px) {
    .dash-shell {
        grid-template-columns: 1fr;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        gap: 14px;
    }

    .dash-topbar__menuBtn {
        display: inline-flex;
    }

    .dash-user {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .dash-sidebar {
        position: fixed;
        top: max(10px, env(safe-area-inset-top));
        bottom: max(10px, env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));
        width: min(86vw, 320px);
        height: auto;
        max-height: calc(100vh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
        z-index: 40;
        transform: translateX(-110%);
        transition: transform 180ms ease;
    }

    .dash-shell[data-sidebar-state="open"] .dash-sidebar {
        transform: translateX(0);
    }

    .dash-overlay[hidden] {
        display: none;
    }

    .dash-content {
        padding: 10px 2px 22px;
    }

    .stat { grid-column: span 6; }
    .dash-card { grid-column: span 12; }
}

@media (max-width: 480px) {
    .login-box {
        width: 100%;
    }

    .stat { grid-column: span 12; }
    .qa-grid { grid-template-columns: 1fr; }
    .kv { grid-column: span 12; }
    .chk { grid-column: span 12; }

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

    .dash-hero__icon {
        align-self: flex-end;
    }
}