:root {
    --navy-950: #07101f;
    --navy-900: #0b1629;
    --navy-800: #12213a;
    --slate-900: #172033;
    --slate-700: #465269;
    --slate-600: #647087;
    --slate-500: #7d899d;
    --slate-300: #ccd4e0;
    --slate-200: #e3e8ef;
    --slate-100: #eff3f8;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;
    --cyan-400: #22d3ee;
    --green-700: #047857;
    --green-600: #059669;
    --green-100: #d1fae5;
    --amber-700: #b45309;
    --amber-100: #fef3c7;
    --red-700: #b91c1c;
    --red-100: #fee2e2;
    --violet-700: #6d28d9;
    --violet-100: #ede9fe;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 12px 36px rgba(21, 37, 63, .08);
    --shadow-lg: 0 28px 72px rgba(2, 8, 23, .24);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --sidebar-width: 272px;
}

* { box-sizing: border-box; }

html { min-height: 100%; color-scheme: light; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-900);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

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

/* Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand__mark {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    color: white;
    background: linear-gradient(145deg, var(--blue-500), #1557d8);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}
.brand__mark svg { width: 25px; height: 25px; stroke-width: 1.7; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 4px; letter-spacing: -.03em; }
.brand strong { font-size: 1.08rem; color: white; }
.brand em { font-size: 1.08rem; color: #8fb8ff; font-style: normal; font-weight: 700; }

/* Authentication */
.auth-page { background: var(--navy-950); }
.guest-main { min-height: 100vh; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.05fr) minmax(480px, .95fr); }
.auth-showcase {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: clamp(34px, 5vw, 72px);
    flex-direction: column;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 82% 20%, rgba(34, 211, 238, .16), transparent 28%),
        radial-gradient(circle at 20% 86%, rgba(59, 130, 246, .26), transparent 32%),
        linear-gradient(145deg, #07101f 0%, #0d1f3a 54%, #102b4d 100%);
}
.auth-showcase::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: .22;
    background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom right, #000, transparent 68%);
}
.auth-showcase::after {
    position: absolute;
    top: 12%;
    right: -90px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(148, 197, 255, .22);
    border-radius: 50%;
    box-shadow: inset 0 0 0 42px rgba(37, 99, 235, .04), inset 0 0 0 84px rgba(34, 211, 238, .03);
    content: "";
}
.brand--auth, .auth-showcase__content, .auth-trust { position: relative; z-index: 1; }
.auth-showcase__content { width: min(610px, 100%); margin: auto 0; padding: 72px 0 60px; }
.eyebrow {
    display: inline-block;
    color: var(--blue-600);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.3;
    text-transform: uppercase;
}
.eyebrow--light { color: #75e6fa; }
.auth-showcase h1 {
    max-width: 670px;
    margin: 18px 0 22px;
    color: #fff;
    font-size: clamp(2.85rem, 5vw, 5.4rem);
    font-weight: 720;
    letter-spacing: -.065em;
    line-height: .98;
}
.auth-showcase p { max-width: 600px; margin: 0; color: #b8c8dc; font-size: 1.08rem; line-height: 1.75; }
.feature-list { display: grid; margin: 44px 0 0; padding: 0; gap: 18px; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 16px; }
.feature-list li > span {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    color: #92eaf8;
    border: 1px solid rgba(117, 230, 250, .25);
    border-radius: 12px;
    background: rgba(12, 36, 65, .55);
    font-size: .72rem;
    font-weight: 800;
}
.feature-list div { display: grid; gap: 2px; }
.feature-list strong { color: #f8fbff; font-size: .96rem; }
.feature-list small { color: #91a6c0; font-size: .86rem; }
.auth-trust { display: flex; align-items: center; gap: 10px; color: #9fb1c6; font-size: .82rem; }
.trust-dot { width: 8px; height: 8px; background: #34d399; border-radius: 50%; box-shadow: 0 0 0 5px rgba(52, 211, 153, .1); }
.format-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 38px; }
.format-row span { padding: 9px 12px; color: #cfdef0; border: 1px solid rgba(170, 201, 237, .18); border-radius: 8px; background: rgba(13, 34, 61, .72); font-size: .76rem; font-weight: 800; letter-spacing: .04em; }

.auth-form-panel {
    display: flex;
    min-height: 100vh;
    padding: 48px clamp(28px, 7vw, 112px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}
.auth-mobile-brand { display: none; }
.auth-card { width: min(440px, 100%); }
.auth-card__heading { margin-bottom: 34px; }
.auth-card__heading h2 { margin: 9px 0 8px; color: var(--navy-900); font-size: clamp(2rem, 3vw, 2.55rem); letter-spacing: -.045em; line-height: 1.15; }
.auth-card__heading p { margin: 0; color: var(--slate-600); }
.auth-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { color: #303a4e; font-size: .88rem; font-weight: 700; }
.field small { color: var(--slate-500); font-size: .76rem; }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; top: 50%; left: 15px; width: 20px; height: 20px; color: #8491a5; transform: translateY(-50%); pointer-events: none; }
.input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    color: var(--navy-900);
    border: 1px solid var(--slate-300);
    border-radius: 11px;
    outline: none;
    background: white;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.input-wrap input::placeholder { color: #9aa5b5; }
.input-wrap input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59, 130, 246, .12); }
.auth-switch { margin: 28px 0 0; color: var(--slate-600); text-align: center; font-size: .9rem; }
.auth-switch a { color: var(--blue-600); font-weight: 750; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-legal { width: min(440px, 100%); margin: 40px 0 0; color: #8b96a8; font-size: .74rem; line-height: 1.55; text-align: center; }

/* Buttons and messages */
.button {
    display: inline-flex;
    min-height: 46px;
    padding: 0 19px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--slate-700);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    font-size: .9rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.button svg { width: 19px; height: 19px; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .row-action:focus-visible, .sidebar-link:focus-visible { outline: 3px solid rgba(59,130,246,.28); outline-offset: 2px; }
.button:disabled { cursor: wait; opacity: .72; transform: none; }
.button--primary { color: white; background: linear-gradient(135deg, var(--blue-600), #1c52cf); box-shadow: 0 8px 22px rgba(37, 99, 235, .2); }
.button--primary:hover { background: linear-gradient(135deg, #1f58d6, #1748bb); box-shadow: 0 12px 28px rgba(37, 99, 235, .26); }
.button--success { color: white; background: linear-gradient(135deg, var(--green-600), #047857); box-shadow: 0 8px 22px rgba(5, 150, 105, .18); }
.button--ghost { color: var(--slate-600); border-color: var(--slate-200); background: white; }
.button--ghost:hover { color: var(--navy-900); border-color: var(--slate-300); }
.button--wide { width: 100%; }
.button--small { min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: .78rem; }
.alert { display: flex; margin-bottom: 22px; padding: 14px 15px; align-items: flex-start; gap: 11px; border-radius: 10px; font-size: .85rem; line-height: 1.5; }
.alert svg { width: 20px; height: 20px; flex: 0 0 auto; }
.alert div { display: grid; gap: 2px; }
.alert div span { font-size: .8rem; }
.alert--error { color: var(--red-700); border: 1px solid #fecaca; background: #fff1f2; }

/* Application shell */
.app-page { background: var(--canvas); }
.app-shell { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    padding: 27px 20px 20px;
    flex-direction: column;
    color: #e7eef9;
    background: linear-gradient(180deg, #0a1425 0%, #0c1a30 100%);
    box-shadow: inset -1px 0 rgba(255,255,255,.04);
}
.brand--sidebar { padding: 0 8px; }
.sidebar-nav { display: grid; margin-top: 48px; gap: 7px; }
.sidebar-nav__label { margin: 0 12px 9px; color: #667b99; font-size: .69rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-link { display: flex; min-height: 45px; padding: 0 13px; align-items: center; gap: 12px; color: #9fb0c7; border-radius: 10px; font-size: .88rem; font-weight: 650; text-decoration: none; transition: color .16s, background-color .16s; }
.sidebar-link svg { width: 20px; height: 20px; }
.sidebar-link:hover { color: #f1f7ff; background: rgba(255,255,255,.045); }
.sidebar-link.is-active { color: white; background: linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(37, 99, 235, .09)); box-shadow: inset 3px 0 #4a8cff; }
.sidebar-note { display: flex; margin-top: auto; padding: 15px 12px; align-items: flex-start; gap: 11px; border: 1px solid rgba(148, 163, 184, .12); border-radius: 12px; background: rgba(255,255,255,.025); }
.sidebar-note__icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; color: #7dd3fc; border-radius: 8px; background: rgba(14, 165, 233, .12); }
.sidebar-note__icon svg { width: 18px; height: 18px; }
.sidebar-note div { display: grid; gap: 3px; }
.sidebar-note strong { color: #dce8f7; font-size: .76rem; }
.sidebar-note span { color: #7589a5; font-size: .67rem; line-height: 1.45; }
.sidebar-user { display: flex; margin-top: 17px; padding: 17px 8px 0; align-items: center; gap: 10px; border-top: 1px solid rgba(148, 163, 184, .11); }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; color: #dbeafe; border: 1px solid rgba(96, 165, 250, .28); border-radius: 11px; background: rgba(37, 99, 235, .2); font-size: .83rem; font-weight: 800; }
.avatar--small { width: 30px; height: 30px; border-radius: 8px; font-size: .72rem; }
.sidebar-user__meta { display: grid; min-width: 0; flex: 1; gap: 1px; }
.sidebar-user__meta strong { overflow: hidden; color: #eef5ff; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user__meta span { color: #7488a3; font-size: .68rem; }
.icon-button { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; color: #8193ab; border: 0; border-radius: 8px; cursor: pointer; background: transparent; transition: color .16s, background-color .16s; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover { color: white; background: rgba(255,255,255,.07); }
.icon-button--danger { color: #dc6b71; background: #fff1f2; }
.icon-button--danger:hover { color: var(--red-700); background: var(--red-100); }
.workspace { display: flex; min-width: 0; min-height: 100vh; grid-column: 2; flex-direction: column; }
.topbar { display: flex; height: 76px; padding: 0 clamp(24px, 4vw, 56px); align-items: center; gap: 14px; border-bottom: 1px solid var(--slate-200); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); }
.topbar > div { display: grid; gap: 1px; }
.topbar__eyebrow { color: var(--slate-500); font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.topbar__title { color: var(--navy-900); font-size: 1rem; letter-spacing: -.01em; }
.topbar__security { display: flex !important; margin-left: auto; align-items: center; gap: 8px; color: var(--green-700); font-size: .75rem; font-weight: 650; }
.topbar__security svg { width: 18px; height: 18px; }
.menu-button { display: none; width: 40px; height: 40px; padding: 0; place-items: center; color: var(--slate-700); border: 1px solid var(--slate-200); border-radius: 9px; background: white; }
.menu-button svg { width: 21px; height: 21px; }
.workspace-main { width: 100%; max-width: 1640px; margin: 0 auto; padding: 38px clamp(24px, 4vw, 56px) 54px; flex: 1; }
.app-footer { display: flex; padding: 22px clamp(24px, 4vw, 56px); justify-content: space-between; color: #909bad; border-top: 1px solid var(--slate-200); background: rgba(255,255,255,.5); font-size: .72rem; }
.sidebar-overlay { display: none; }

/* Shared application content */
.page-heading { display: flex; margin-bottom: 28px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading--compact { align-items: center; }
.page-heading h1 { margin: 7px 0 5px; color: var(--navy-900); font-size: clamp(1.85rem, 3vw, 2.55rem); letter-spacing: -.045em; line-height: 1.12; }
.page-heading p { margin: 0; color: var(--slate-600); font-size: .94rem; }
.breadcrumb { display: inline-flex; margin-bottom: 7px; align-items: center; gap: 4px; color: var(--blue-600); font-size: .8rem; font-weight: 700; text-decoration: none; }
.breadcrumb svg { width: 16px; height: 16px; }
.content-card { overflow: hidden; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.content-card__header { display: flex; min-height: 80px; padding: 19px 22px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--slate-200); }
.content-card__header h2, .section-heading h2 { margin: 0; color: var(--navy-900); font-size: 1rem; letter-spacing: -.015em; }
.content-card__header p, .section-heading p { margin: 3px 0 0; color: var(--slate-500); font-size: .76rem; }
.stats-grid { display: grid; margin-bottom: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stats-grid--admin { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { display: flex; min-height: 108px; padding: 20px; align-items: center; gap: 15px; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-sm); }
.stat-card__icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 13px; }
.stat-card__icon svg { width: 24px; height: 24px; }
.stat-card__icon--blue { color: var(--blue-600); background: var(--blue-100); }
.stat-card__icon--amber { color: var(--amber-700); background: var(--amber-100); }
.stat-card__icon--green { color: var(--green-700); background: var(--green-100); }
.stat-card__icon--violet { color: var(--violet-700); background: var(--violet-100); }
.stat-card div { display: grid; gap: 2px; }
.stat-card div span { color: var(--slate-600); font-size: .78rem; font-weight: 600; }
.stat-card div strong { color: var(--navy-900); font-size: 1.65rem; letter-spacing: -.04em; line-height: 1.15; }
.format-pills { display: flex; gap: 6px; }
.format-pills span { padding: 5px 8px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 6px; background: #f8fafc; font-size: .61rem; font-weight: 800; letter-spacing: .04em; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { padding: 12px 16px; color: var(--slate-500); border-bottom: 1px solid var(--slate-200); background: #fafbfd; font-size: .67rem; font-weight: 800; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 16px; color: #3a455a; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .15s; }
.data-table tbody tr:hover { background: #fafcff; }
.row-needs-action { background: #fffdf7; }
.file-cell { display: flex; min-width: 220px; max-width: 360px; align-items: center; gap: 11px; }
.file-cell > div { display: grid; min-width: 0; gap: 2px; }
.file-cell strong { overflow: hidden; color: var(--navy-900); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.file-cell span:not(.file-mark) { color: var(--slate-500); font-size: .68rem; }
.file-cell--compact { min-width: 170px; max-width: 270px; }
.file-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; color: var(--blue-700); border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; font-size: .58rem; font-weight: 850; letter-spacing: .02em; }
.file-mark--pdf { color: var(--red-700); border-color: #fecaca; background: #fff1f2; }
.file-mark--csv, .file-mark--xlsx { color: var(--green-700); border-color: #a7f3d0; background: #ecfdf5; }
.file-mark--jpg, .file-mark--jpeg, .file-mark--png { color: var(--violet-700); border-color: #ddd6fe; background: #f5f3ff; }
.file-mark--zip { color: var(--amber-700); border-color: #fde68a; background: #fffbeb; }
.order-code { padding: 4px 7px; color: #42506a; border: 1px solid var(--slate-200); border-radius: 6px; background: #f8fafc; font-family: "SFMono-Regular", Consolas, monospace; font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.status-badge { display: inline-flex; min-height: 27px; padding: 0 9px; align-items: center; gap: 7px; color: var(--slate-700); border: 1px solid var(--slate-200); border-radius: 999px; background: #f8fafc; font-size: .67rem; font-weight: 750; line-height: 1; white-space: nowrap; }
.status-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--slate-500); }
.status-badge--submitted, .status-badge--pending, .status-badge--awaiting_payment, .status-badge--queued { color: #93530c; border-color: #fde3a7; background: #fffbeb; }
.status-badge--submitted .status-badge__dot, .status-badge--pending .status-badge__dot, .status-badge--awaiting_payment .status-badge__dot, .status-badge--queued .status-badge__dot { background: #f59e0b; }
.status-badge--processing { color: var(--blue-700); border-color: #bfdbfe; background: #eff6ff; }
.status-badge--processing .status-badge__dot { background: var(--blue-500); box-shadow: 0 0 0 3px rgba(59,130,246,.13); }
.status-badge--paid, .status-badge--ready { color: var(--green-700); border-color: #a7f3d0; background: #ecfdf5; }
.status-badge--paid .status-badge__dot, .status-badge--ready .status-badge__dot { background: #10b981; }
.status-badge--failed, .status-badge--expired { color: var(--red-700); border-color: #fecaca; background: #fff1f2; }
.status-badge--failed .status-badge__dot, .status-badge--expired .status-badge__dot { background: #ef4444; }
.date-cell { color: var(--slate-700); white-space: nowrap; }
.date-cell span, .table-subtext { display: block; margin-top: 2px; color: var(--slate-500); font-size: .68rem; }
.nowrap { white-space: nowrap; }
.row-action { display: grid; width: 34px; height: 34px; place-items: center; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 8px; background: white; transition: color .15s, border-color .15s, transform .15s; }
.row-action svg { width: 17px; height: 17px; }
.row-action:hover { color: var(--blue-600); border-color: #bfdbfe; transform: translateX(2px); }
.empty-state { display: flex; min-height: 360px; padding: 48px 24px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state__icon { display: grid; width: 68px; height: 68px; margin-bottom: 18px; place-items: center; color: var(--blue-600); border: 1px solid #dbeafe; border-radius: 20px; background: #eff6ff; }
.empty-state__icon svg { width: 34px; height: 34px; }
.empty-state h3 { margin: 0 0 6px; color: var(--navy-900); font-size: 1.15rem; }
.empty-state p { max-width: 360px; margin: 0 0 22px; color: var(--slate-600); font-size: .87rem; }

/* New order */
.order-create-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .65fr); gap: 22px; }
.upload-card { padding: 24px; }
.section-heading { display: flex; margin-bottom: 23px; align-items: flex-start; gap: 12px; }
.step-number { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; color: var(--blue-600); border-radius: 8px; background: var(--blue-100); font-size: .75rem; font-weight: 850; }
.dropzone { display: flex; min-height: 330px; padding: 32px; flex-direction: column; align-items: center; justify-content: center; color: var(--slate-600); border: 1.5px dashed #b9c5d7; border-radius: 14px; cursor: pointer; background: linear-gradient(180deg, #fbfdff, #f7faff); text-align: center; transition: border-color .18s, background-color .18s, transform .18s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--blue-500); background: #f3f8ff; transform: translateY(-1px); }
.dropzone.has-file { border-style: solid; border-color: #86efac; background: #f3fff8; }
.dropzone__icon { display: grid; width: 66px; height: 66px; margin-bottom: 18px; place-items: center; color: var(--blue-600); border-radius: 19px; background: var(--blue-100); box-shadow: 0 10px 28px rgba(37, 99, 235, .12); }
.dropzone.has-file .dropzone__icon { color: var(--green-700); background: var(--green-100); }
.dropzone__icon svg { width: 32px; height: 32px; }
.dropzone > strong { max-width: 90%; overflow: hidden; color: var(--navy-900); font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
.dropzone > span:not(.dropzone__icon):not(.dropzone__button) { margin-top: 5px; color: var(--slate-500); font-size: .82rem; }
.dropzone__button { margin-top: 19px; padding: 9px 14px; color: var(--blue-700); border: 1px solid #bfdbfe; border-radius: 8px; background: white; font-size: .78rem; font-weight: 800; box-shadow: var(--shadow-sm); }
.upload-rules { display: grid; margin-top: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.upload-rules > div { display: flex; padding: 13px; align-items: flex-start; gap: 9px; border-radius: 9px; background: #f8fafc; }
.upload-rules svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--blue-600); }
.upload-rules span { display: grid; color: var(--slate-500); font-size: .67rem; line-height: 1.35; }
.upload-rules strong { margin-bottom: 2px; color: var(--slate-700); font-size: .7rem; }
.checkout-card { padding: 24px; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-md); }
.checkout-list { display: grid; margin: 25px 0 0; gap: 0; }
.checkout-list > div { display: flex; padding: 13px 0; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--slate-100); }
.checkout-list span { color: var(--slate-600); font-size: .76rem; }
.checkout-list strong { color: var(--navy-900); font-size: .78rem; text-align: right; }
.text-success { color: var(--green-700) !important; }
.checkout-total { display: flex; margin: 15px 0 21px; align-items: center; justify-content: space-between; }
.checkout-total span { color: var(--slate-700); font-weight: 700; }
.checkout-total strong { color: var(--navy-900); font-size: 1.45rem; letter-spacing: -.035em; }
.checkout-card .button--ghost { margin-top: 9px; }
.checkout-note { display: flex; margin: 18px 0 0; align-items: flex-start; gap: 7px; color: var(--slate-500); font-size: .67rem; line-height: 1.45; }
.checkout-note svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* Order detail */
.progress-card { display: flex; margin-bottom: 22px; padding: 22px 26px; align-items: center; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-sm); }
.progress-step { display: flex; min-width: 125px; align-items: center; gap: 10px; color: var(--slate-500); }
.progress-step > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; color: var(--slate-500); border: 1px solid var(--slate-300); border-radius: 50%; background: white; font-size: .72rem; font-weight: 800; }
.progress-step > span svg { width: 16px; height: 16px; }
.progress-step > div { display: grid; gap: 1px; }
.progress-step strong { color: var(--slate-700); font-size: .73rem; white-space: nowrap; }
.progress-step small { color: var(--slate-500); font-size: .63rem; white-space: nowrap; }
.progress-step.is-complete > span { color: white; border-color: var(--green-600); background: var(--green-600); }
.progress-step.is-current > span { color: white; border-color: var(--blue-600); background: var(--blue-600); box-shadow: 0 0 0 5px var(--blue-100); }
.progress-step.is-current strong { color: var(--blue-700); }
.progress-line { height: 1px; min-width: 20px; margin: 0 15px; flex: 1; background: var(--slate-200); }
.progress-line.is-complete { background: #6ee7b7; }
.detail-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 22px; }
.order-summary-card { padding-bottom: 8px; }
.document-highlight { display: flex; margin: 22px; padding: 17px; align-items: center; gap: 13px; border: 1px solid #e5eaf1; border-radius: 11px; background: #f8fafc; }
.document-highlight > div { display: grid; min-width: 0; gap: 2px; }
.document-highlight strong { overflow: hidden; color: var(--navy-900); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.document-highlight span { color: var(--slate-500); font-size: .72rem; }
.detail-list { margin: 0; padding: 0 22px 10px; }
.detail-list > div { display: flex; min-height: 55px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--slate-100); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--slate-600); font-size: .78rem; }
.detail-list dd { margin: 0; color: var(--navy-900); font-size: .82rem; font-weight: 700; text-align: right; }
.order-summary-card > .alert { margin: 14px 22px 18px; }
.action-panel { padding: 28px; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-md); }
.action-panel__icon { display: grid; width: 52px; height: 52px; margin-bottom: 23px; place-items: center; border-radius: 15px; }
.action-panel__icon svg { width: 27px; height: 27px; }
.action-panel__icon--blue { color: var(--blue-600); background: var(--blue-100); }
.action-panel__icon--amber { color: var(--amber-700); background: var(--amber-100); }
.action-panel__icon--green { color: var(--green-700); background: var(--green-100); }
.action-panel__icon--red { color: var(--red-700); background: var(--red-100); }
.action-panel h2 { margin: 8px 0 10px; color: var(--navy-900); font-size: 1.4rem; letter-spacing: -.035em; }
.action-panel > p { margin: 0 0 20px; color: var(--slate-600); font-size: .82rem; line-height: 1.65; }
.order-reference { display: flex; margin-bottom: 20px; padding: 14px; align-items: center; justify-content: space-between; gap: 12px; border: 1px dashed #bfdbfe; border-radius: 10px; background: #f3f8ff; }
.order-reference span { color: var(--slate-600); font-size: .72rem; }
.order-reference strong { color: var(--blue-700); font-family: "SFMono-Regular", Consolas, monospace; font-size: .83rem; letter-spacing: .03em; }
.action-panel__note { display: block; margin-top: 14px; color: var(--slate-500); font-size: .67rem; line-height: 1.45; text-align: center; }
.soft-notice { padding: 13px; color: #8a540d; border: 1px solid #fde3a7; border-radius: 9px; background: #fffbeb; font-size: .74rem; text-align: center; }
.processing-bar { height: 7px; overflow: hidden; border-radius: 99px; background: var(--blue-100); }
.processing-bar span { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-500), var(--cyan-400)); animation: processing 1.5s ease-in-out infinite alternate; }
.is-spinning svg { animation: spin 1.5s linear infinite; }
@keyframes processing { to { transform: translateX(138%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin */
.live-indicator { display: inline-flex; padding: 8px 12px; align-items: center; gap: 8px; color: var(--green-700); border: 1px solid #a7f3d0; border-radius: 999px; background: #ecfdf5; font-size: .72rem; font-weight: 750; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.11); }
.records-count { padding: 6px 9px; color: var(--slate-600); border-radius: 7px; background: var(--slate-100); font-size: .7rem; font-weight: 700; }
.client-cell { display: flex; align-items: center; gap: 9px; }
.client-cell strong { color: var(--navy-900); font-size: .78rem; }
.admin-actions { display: flex; align-items: center; gap: 6px; }
.admin-actions form { margin: 0; }
.muted-dash { color: var(--slate-300); }

/* Responsive */
@media (max-width: 1180px) {
    .stats-grid--admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .progress-step div { display: none; }
    .progress-step { min-width: 30px; }
    .progress-line { margin-inline: 10px; }
}

@media (max-width: 980px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 34px 24px; }
    .auth-mobile-brand { display: flex; margin-bottom: 52px; align-items: center; gap: 10px; color: var(--navy-900); }
    .auth-mobile-brand .brand__mark { width: 38px; height: 38px; }
    .auth-mobile-brand strong { font-size: .95rem; }
    .order-create-grid, .detail-grid { grid-template-columns: 1fr; }
    .checkout-card, .action-panel { position: static; }
}

@media (max-width: 820px) {
    :root { --sidebar-width: 272px; }
    .app-shell { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; z-index: 20; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(4, 10, 20, .56); transition: opacity .22s, visibility .22s; }
    .sidebar-open .sidebar-overlay { visibility: visible; opacity: 1; }
    .workspace { min-height: 100vh; }
    .menu-button { display: grid; }
    .topbar { height: 68px; padding-inline: 18px; }
    .topbar__security { font-size: 0; }
    .topbar__security svg { width: 20px; height: 20px; }
    .workspace-main { padding: 28px 18px 40px; }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-card { min-height: 92px; padding: 15px; }
    .stat-card__icon { width: 40px; height: 40px; }
    .stat-card div span { font-size: .68rem; }
    .stat-card div strong { font-size: 1.35rem; }
    .app-footer { padding-inline: 18px; }
}

@media (max-width: 620px) {
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading > .button { width: 100%; }
    .page-heading h1 { font-size: 1.75rem; }
    .stats-grid, .stats-grid--admin { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { min-height: 82px; }
    .format-pills { display: none; }
    .content-card__header { min-height: 74px; padding: 16px 18px; }
    .upload-card, .checkout-card, .action-panel { padding: 18px; }
    .dropzone { min-height: 260px; padding: 24px 16px; }
    .upload-rules { grid-template-columns: 1fr; }
    .progress-card { padding: 18px; }
    .progress-step { min-width: 28px; }
    .progress-step > span { width: 28px; height: 28px; }
    .progress-line { margin-inline: 5px; }
    .document-highlight { margin: 18px; }
    .detail-list { padding-inline: 18px; }
    .app-footer { display: grid; gap: 3px; text-align: center; }
    .auth-form-panel { justify-content: flex-start; }
    .auth-mobile-brand { margin-bottom: 38px; align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
