/* HealthBox rider panel — core layout and components */
:root {
    --bg: #f3f4f1;
    --surface: #ffffff;
    --surface-2: #f8f9f6;
    --ink: #16201a;
    --ink-2: #2a352e;
    --muted: #66716a;
    --faint: #98a29b;
    --line: #e2e6e0;
    --line-strong: #cfd6cf;
    --accent: #1f7a4d;
    --accent-dark: #165c3a;
    --accent-soft: #e5f1e9;
    --accent-on-dark: #8fd3ab;
    --warn: #8a5a06;
    --warn-soft: #fcf1da;
    --danger: #a3392f;
    --danger-soft: #fbe9e6;
    --info: #2f5b8f;
    --info-soft: #e8eef7;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --shadow: 0 1px 2px rgba(22, 32, 26, .04), 0 12px 32px -14px rgba(22, 32, 26, .12);
    --shadow-lift: 0 2px 4px rgba(22, 32, 26, .05), 0 22px 44px -18px rgba(22, 32, 26, .22);
    --ease: cubic-bezier(.16, 1, .3, 1);
    --font: "Geist", "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0;
    min-height: 100dvh;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; margin: 8px 0 10px; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; margin: 4px 0 0; }
h3 { font-size: 16px; font-weight: 700; }
.mono { font-family: var(--mono); letter-spacing: -.02em; }
.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--accent);
}
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 244, 241, .86);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    width: min(1180px, calc(100% - 48px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--ink);
    color: var(--accent-on-dark);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.top-nav { display: flex; gap: 4px; margin-left: 8px; }
.top-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: background .25s var(--ease), color .25s var(--ease);
}
.top-nav a:hover { background: rgba(22, 32, 26, .05); color: var(--ink); }
.top-nav a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 32, 26, .08), 0 0 0 1px var(--line); }
.nav-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--warn);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}
.rider-chip {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
}
.rider-avatar {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}
.rider-avatar::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--surface);
    animation: presence 2.8s ease-in-out infinite;
}
@keyframes presence { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, .35); } 50% { box-shadow: 0 0 0 4px rgba(31, 122, 77, 0); } }

/* Page */
.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 120px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading p { color: var(--muted); margin: 0; max-width: 60ch; }
.section-block { margin-top: 44px; }
.section-block.compact { margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.section-heading > a, .link-accent { color: var(--accent); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.section-heading > a:hover, .link-accent:hover { color: var(--accent-dark); }
.section-heading p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

/* Reveal motion */
.reveal > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Buttons */
.button {
    appearance: none;
    border: 1px solid transparent;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.button:active { transform: scale(.98); }
.button:disabled { opacity: .6; cursor: wait; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { background: var(--surface); border-color: var(--line); }
.button-secondary:hover { border-color: var(--line-strong); }
.button-block { width: 100%; }
.text-button { appearance: none; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 12px; font-weight: 500; }
.text-button.danger { color: var(--danger); padding-left: 0; }

/* Status pills */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 99px;
    padding: 4px 10px 4px 8px;
    font-size: 12px;
    font-weight: 600;
    background: #eef0ed;
    color: #56625b;
    white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-confirmed { background: var(--info-soft); color: var(--info); }
.status-on_the_way, .status-pending { background: var(--warn-soft); color: var(--warn); }
.status-on_the_way::before { animation: blink 1.6s ease-in-out infinite; }
.status-delivered, .status-approved, .status-received { background: var(--accent-soft); color: var(--accent-dark); }
.status-failed, .status-rejected, .status-returned { background: var(--danger-soft); color: var(--danger); }
@keyframes blink { 50% { opacity: .35; } }

/* Alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; font-size: 14px; animation: rise .5s var(--ease) both; }
.alert-success { background: var(--accent-soft); color: var(--accent-dark); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.admin-preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; padding: 13px 16px; border: 1px solid #ecd39b; border-radius: var(--radius-sm); background: #fff9ea; color: #5d4300; }
.admin-preview-banner div { display: flex; flex-direction: column; gap: 2px; }
.admin-preview-banner strong { font-size: 14px; }
.admin-preview-banner span { font-size: 12px; opacity: .8; }
.admin-preview-banner a { font-weight: 600; text-decoration: underline; white-space: nowrap; }

/* Dashboard */
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.greet p { color: var(--muted); margin: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
.balance-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 26px;
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: transform .35s var(--ease);
}
.balance-card::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(143, 211, 171, .16);
    box-shadow: 0 0 0 40px rgba(143, 211, 171, .03), 0 0 0 80px rgba(143, 211, 171, .02);
    pointer-events: none;
}
a.balance-card:hover { transform: translateY(-2px); }
a.balance-card:active { transform: scale(.99); }
.balance-label { font-size: 13px; color: #aebbb3; font-weight: 500; }
.balance-amount { display: block; font-size: clamp(34px, 4.4vw, 46px); line-height: 1; letter-spacing: -.035em; font-weight: 700; margin-top: 10px; }
.balance-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255, 255, 255, .1); border-radius: 14px; overflow: hidden; }
.balance-split > div { background: var(--ink-2); padding: 14px 16px; }
.balance-split small { display: block; color: #aebbb3; font-size: 12px; }
.balance-split strong { display: block; font-size: 18px; margin-top: 4px; letter-spacing: -.01em; }
.balance-split .is-warn strong { color: #f4c76b; }
.balance-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: #aebbb3; position: relative; z-index: 1; }
.balance-foot b { color: var(--accent-on-dark); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
a:hover .arrow { transform: translateX(3px); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.stat span { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat strong { font-size: 30px; line-height: 1; letter-spacing: -.03em; font-weight: 700; }
.stat small { color: var(--faint); font-size: 12px; margin-left: 4px; font-weight: 500; letter-spacing: 0; }
.stat-money strong { font-size: 22px; color: var(--accent-dark); }

/* Order list */
.order-list { display: grid; gap: 10px; }
.order-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.order-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.order-row:active { transform: scale(.995); }
.order-number span { display: block; color: var(--faint); font-size: 12px; }
.order-number strong { font-family: var(--mono); font-size: 16px; letter-spacing: -.02em; }
.order-customer { min-width: 0; }
.order-customer strong { display: block; font-size: 15px; font-weight: 600; }
.order-customer span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.order-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.order-meta > strong { font-size: 15px; font-weight: 700; }
.row-arrow { width: 18px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease), stroke .3s; }
.order-row:hover .row-arrow { transform: translateX(3px); stroke: var(--ink); }

/* Empty state */
.empty-state {
    display: grid;
    justify-items: start;
    gap: 6px;
    padding: 32px 28px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .55);
}
.empty-state svg { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.empty-state h3 { margin: 0; }
.empty-state p { color: var(--muted); margin: 0; font-size: 14px; }

/* Filters */
.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
label > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input, select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(31, 122, 77, .14); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.stack-form { display: grid; gap: 16px; }
.field-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.field-error { display: block; color: var(--danger); font-size: 13px; margin-top: 6px; }
.pagination-wrap { margin-top: 18px; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; flex-wrap: wrap; }
.page-item .page-link { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.page-item.active .page-link { background: var(--ink); color: #fff; border-color: var(--ink); }
.page-item.disabled .page-link { color: var(--faint); }

/* Order detail */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.detail-head p { color: var(--muted); margin: 0; }
.detail-head h1 { font-family: var(--mono); letter-spacing: -.04em; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 20px; align-items: start; }
.detail-main { display: grid; gap: 16px; }
.info-section { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.info-section h2 { margin: 6px 0 4px; }
.info-section > p { color: var(--muted); max-width: 60ch; margin: 0; }
.action-pair { display: flex; gap: 10px; margin-top: 18px; }
.item-list { margin-top: 10px; }
.order-item-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.order-item-line:first-child { border-top: 0; }
.order-item-line span > strong, .order-item-line span > small { display: block; }
.order-item-line span > strong { font-weight: 600; }
.order-item-line small { color: var(--muted); margin-top: 3px; font-size: 13px; }
.item-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 600; }
.order-item-line .item-price { text-align: right; flex-shrink: 0; }
.order-item-line .item-price > strong { display: block; font-size: 15px; }
.return-form { display: flex; justify-content: flex-end; align-items: flex-end; gap: 8px; margin-top: 10px; }
.return-form label span { font-size: 11px; color: var(--muted); margin-bottom: 3px; text-align: left; font-weight: 500; }
.return-form input { width: 68px; height: 38px; padding: 0 10px; background: #fff; }
.return-form button { min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.return-form button:hover { background: var(--warn-soft); border-color: #ecd39b; color: var(--warn); }
.return-form button:active { transform: scale(.97); }
.return-form button:disabled { opacity: .6; }
.payment-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}
.payment-panel .eyebrow { color: var(--accent-on-dark); }
.collection-total { display: block; font-size: 40px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; margin: 8px 0 6px; }
.payment-panel > p { color: #aebbb3; font-size: 14px; margin: 0; }
.payment-panel dl { margin: 20px 0; }
.payment-panel dl > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .1); padding: 12px 0; font-size: 14px; }
.payment-panel dt { color: #aebbb3; }
.payment-panel dd { margin: 0; font-weight: 600; text-align: right; }
.payment-panel .button-primary { background: var(--accent-on-dark); color: #0f2a1b; }
.payment-panel .button-primary:hover { background: #a7e0be; }
.confirm-money { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; padding: 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .06); cursor: pointer; }
.confirm-money input { margin-top: 2px; flex-shrink: 0; }
.confirm-money span { font-size: 14px; margin: 0; color: #fff; font-weight: 500; }
.status-form { margin-top: 14px; }
.secondary-status { text-align: center; margin-top: 4px; }
.secondary-status .text-button { color: #f0a59d; }
.notice { padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-sm); font-size: 14px; color: #d4ddd7; margin: 0; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.profile-summary, .password-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.avatar-letter { width: 64px; height: 64px; border-radius: 20px; background: var(--ink); color: var(--accent-on-dark); font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.profile-summary h2 { margin: 16px 0 8px; font-size: 22px; }
.profile-summary dl { margin: 22px 0 8px; }
.profile-summary dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.profile-summary dt { font-size: 13px; color: var(--muted); }
.profile-summary dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.password-panel h2 { margin: 6px 0 20px; }
.password-panel p { color: var(--muted); }

/* Login */
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(1040px, 100%); min-height: 620px; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--surface); border-radius: 30px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.login-intro { background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-intro::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; right: -160px; bottom: -140px; border: 1px solid rgba(143, 211, 171, .18); box-shadow: 0 0 0 50px rgba(143, 211, 171, .03), 0 0 0 100px rgba(143, 211, 171, .02); }
.login-intro .eyebrow { color: var(--accent-on-dark); }
.login-intro h1 { font-size: clamp(36px, 4.6vw, 52px); margin: 18px 0; }
.login-intro p { max-width: 40ch; color: #aebbb3; }
.route-line { display: flex; align-items: center; width: 72%; }
.route-line span { width: 10px; height: 10px; border: 2px solid var(--accent-on-dark); border-radius: 50%; }
.route-line i { position: relative; height: 1px; background: rgba(255, 255, 255, .16); flex: 1; overflow: hidden; }
.route-line i::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--accent-on-dark), transparent); animation: travel 2.8s var(--ease) infinite; }
@keyframes travel { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.login-panel { padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.login-brand { margin-bottom: 44px; }
.form-heading h2 { font-size: 28px; margin-bottom: 6px; }
.form-heading p, .login-help { color: var(--muted); }
.form-heading { margin-bottom: 22px; }
.login-help { font-size: 13px; margin: 22px 0 0; }

/* Bottom nav (mobile) */
.bottom-nav { display: none; }

@media (max-width: 900px) {
    .top-nav { display: none; }
    .topbar-inner { width: calc(100% - 32px); height: 60px; }
    .rider-chip { padding: 3px; }
    .rider-chip .rider-name { display: none; }
    .page-shell { width: calc(100% - 32px); padding: 24px 0 112px; }
    .greet, .page-heading { display: block; }
    .greet .desktop-action, .page-heading .desktop-action { display: none; }
    .dash-grid { grid-template-columns: 1fr; }
    .balance-card { padding: 22px; }
    .detail-grid { grid-template-columns: 1fr; }
    .payment-panel { position: static; order: -1; }
    .profile-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .filter-bar label:first-child { grid-column: 1 / -1; }
    .filter-bar .button { grid-column: 1 / -1; }
    .bottom-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        padding: 6px;
        border-radius: 20px;
        background: rgba(22, 32, 26, .94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 18px 40px -12px rgba(22, 32, 26, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
    }
    .bottom-nav a {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 4px 6px;
        border-radius: 14px;
        color: #9aa79f;
        font-size: 11px;
        font-weight: 600;
        transition: background .25s var(--ease), color .25s var(--ease);
    }
    .bottom-nav a.active { color: #fff; background: rgba(255, 255, 255, .1); }
    .bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .bottom-nav .nav-badge { position: absolute; top: 3px; left: calc(50% + 6px); }
    .login-page { padding: 0; }
    .login-shell { min-height: 100dvh; display: block; border-radius: 0; border: 0; }
    .login-intro { display: none; }
    .login-panel { min-height: 100dvh; padding: 32px 24px; }
}

@media (max-width: 560px) {
    .order-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num meta" "cust cust"; gap: 8px 12px; padding: 14px 16px; }
    .order-number { grid-area: num; display: flex; align-items: baseline; gap: 6px; }
    .order-meta { grid-area: meta; flex-direction: row-reverse; align-items: center; gap: 10px; }
    .order-customer { grid-area: cust; }
    .row-arrow { display: none; }
    .stat { padding: 15px; }
    .stat strong { font-size: 26px; }
    .stat-money strong { font-size: 19px; }
    .detail-head { display: block; }
    .detail-head .status { margin-top: 10px; }
    .action-pair { display: grid; grid-template-columns: 1fr 1fr; }
    .order-item-line { flex-direction: column; gap: 8px; }
    .order-item-line .item-price { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
    .return-form { margin-top: 0; }
    .admin-preview-banner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
