:root {
    --navy-950: #061221;
    --navy-900: #0a192b;
    --navy-800: #12243a;
    --ink: #0b1729;
    --muted: #66758a;
    --line: #dfe7ee;
    --surface: #ffffff;
    --canvas: #edf3f6;
    --teal-700: #087b72;
    --teal-600: #0b9488;
    --teal-500: #16b8aa;
    --teal-100: #dff8f3;
    --blue-600: #1764d8;
    --blue-100: #eaf2ff;
    --orange: #ff9e2a;
    --danger: #bd3347;
    --shadow: 0 18px 50px rgba(5, 20, 36, .14);
    --header-height: 72px;
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.app-body { overflow: hidden; }
.app-header {
    position: fixed;
    z-index: 1000;
    inset: 0 0 auto;
    height: var(--header-height);
    padding: 0 clamp(18px, 3vw, 40px);
    background: rgba(6, 18, 33, .97);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.09);
    backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1; gap: 5px; }
.brand strong { font-size: 22px; letter-spacing: -.7px; }
.brand strong span { color: var(--orange); }
.brand small { color: #91a5bb; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--orange);
    background: linear-gradient(145deg, rgba(22,184,170,.2), rgba(23,100,216,.18));
    border: 1px solid rgba(255,255,255,.1);
}
.brand-mark svg { width: 29px; height: 29px; fill: currentColor; }
.brand-mark svg path:last-child { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; }
.brand-mark--large { width: 74px; height: 74px; border-radius: 22px; }
.brand-mark--large svg { width: 52px; height: 52px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.connection-pill {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 999px;
    color: #c9d5e1;
    font-size: 12px;
    font-weight: 700;
}
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52,211,153,.12); }
.connection-pill.error .live-dot { background: #fb7185; box-shadow: 0 0 0 5px rgba(251,113,133,.12); }
.connection-pill.loading .live-dot { background: #fbbf24; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .35; } }

.icon-button, .sync-button, .logout-link {
    min-height: 40px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.07);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 750;
}
.icon-button { width: 42px; font-size: 24px; }
.sync-button { padding: 0 16px; gap: 8px; background: var(--teal-700); border-color: #179c90; }
.sync-button:hover { background: var(--teal-600); }
.sync-button:disabled { opacity: .6; cursor: wait; }
.sync-button.syncing .sync-icon { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logout-link { padding: 0 13px; color: #c9d5e1; font-size: 12px; }

.workspace {
    position: fixed;
    inset: var(--header-height) 0 0;
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(480px, .92fr);
    overflow: hidden;
}
.map-panel { position: relative; min-width: 0; background: #dce7e6; }
#map { position: absolute; inset: 0; z-index: 1; }
.leaflet-container { font: inherit; background: #dce7e6; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 8px 24px rgba(5,20,36,.16) !important; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.45; min-width: 190px; }
.leaflet-popup-content strong { font-size: 14px; }
.leaflet-popup-content small { display: block; margin-top: 3px; color: var(--muted); }

.map-overlay { position: absolute; z-index: 500; pointer-events: none; }
.map-overlay--top { left: 22px; top: 22px; }
.map-title { display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(5,20,36,.13); backdrop-filter: blur(12px); }
.map-title__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--teal-100); color: var(--teal-700); font-size: 21px; }
.map-title div { display: grid; gap: 2px; }
.map-title strong { font-size: 13px; }
.map-title small { color: var(--muted); font-size: 11px; }
.map-legend { position: absolute; z-index: 500; left: 22px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 13px; border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(5,20,36,.12); color: #435268; font-size: 10px; font-weight: 700; }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-600); }
.legend-dot--trendyol { background: #f97316; }
.legend-dot--yemeksepeti { background: #e11d48; }
.legend-dot--getir { background: #6d28d9; }
.legend-dot--migros { background: #f59e0b; }

.map-marker { background: transparent; border: 0; }
.map-marker__pin { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); background: var(--teal-600); box-shadow: 0 5px 14px rgba(5,20,36,.28); color: #fff; }
.map-marker__pin span { transform: rotate(45deg); font-size: 10px; font-weight: 900; }
.map-marker--trendyol .map-marker__pin { background: #f97316; }
.map-marker--yemeksepeti .map-marker__pin { background: #e11d48; }
.map-marker--getir .map-marker__pin { background: #6d28d9; }
.map-marker--migros .map-marker__pin { background: #f59e0b; }
.map-marker--selected .map-marker__pin { width: 40px; height: 40px; margin: -3px; box-shadow: 0 0 0 6px rgba(22,184,170,.25), 0 8px 18px rgba(5,20,36,.35); }

.orders-sheet { position: relative; z-index: 10; min-width: 0; background: var(--canvas); border-left: 1px solid #d4dfe6; overflow: hidden; }
.sheet-handle { display: none; }
.sheet-scroll { height: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.sheet-scroll::-webkit-scrollbar { width: 9px; }
.sheet-scroll::-webkit-scrollbar-thumb { background: #c8d4dc; border: 3px solid var(--canvas); border-radius: 99px; }
.sheet-inner { width: min(100%, 760px); margin: 0 auto; padding: 28px clamp(20px, 3.2vw, 42px) 70px; }
.sheet-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 5px; color: var(--teal-700); font-size: 10px; font-weight: 900; letter-spacing: 1.7px; }
.sheet-heading h1 { margin: 0; font-size: clamp(29px, 3vw, 40px); line-height: 1; letter-spacing: -1.5px; }
.last-sync { color: var(--muted); font-size: 11px; text-align: right; }

.stat-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card { min-width: 0; display: grid; gap: 3px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 4px 14px rgba(5,20,36,.035); }
.stat-card span, .stat-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 10px; font-weight: 700; }
.stat-card strong { font-size: 25px; line-height: 1.1; letter-spacing: -.7px; }
.stat-card--accent { color: #fff; border-color: var(--navy-900); background: linear-gradient(135deg, var(--navy-950), #102d43); }
.stat-card--accent span, .stat-card--accent small { color: #a9bbc9; }

.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.search-box { min-width: 0; height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--muted); transition: .2s border, .2s box-shadow; }
.search-box:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(22,184,170,.1); }
.search-box span { font-size: 22px; line-height: 1; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; color: #8795a7; background: #f6f8fa; font-size: 9px; box-shadow: 0 1px 0 #dfe6eb; }
.filter-toggle { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; }
.filter-toggle b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--teal-700); font-size: 10px; }

.time-chips { display: flex; gap: 7px; margin: 11px 0; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
.time-chips::-webkit-scrollbar { display: none; }
.time-chips button { flex: 0 0 auto; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: #536177; background: #fff; font-size: 10px; font-weight: 800; }
.time-chips button:hover { border-color: #aebbc5; }
.time-chips button.active { color: #fff; border-color: var(--teal-700); background: var(--teal-700); box-shadow: 0 5px 14px rgba(8,123,114,.2); }

.filters { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0 0 15px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.filters.open { display: grid; }
.filters label { display: grid; gap: 5px; color: #647287; font-size: 9px; font-weight: 850; letter-spacing: .4px; text-transform: uppercase; }
.filters select { width: 100%; min-width: 0; height: 38px; padding: 0 28px 0 9px; border: 1px solid #dce4ea; border-radius: 10px; outline: 0; color: var(--ink); background: #f8fafb; font-size: 11px; text-overflow: ellipsis; }
.filters select:focus { border-color: var(--teal-500); }
.clear-filters { align-self: end; height: 38px; border: 0; border-radius: 10px; color: var(--danger); background: #fff0f2; font-size: 10px; font-weight: 850; }

.list-status { min-height: 24px; padding: 2px 1px 8px; color: var(--muted); font-size: 11px; }
.order-groups { display: grid; gap: 18px; }
.order-group { display: grid; gap: 9px; }
.group-heading { position: sticky; z-index: 4; top: -1px; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px; background: linear-gradient(var(--canvas) 75%, transparent); color: var(--ink); }
.group-heading div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.group-heading i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--teal-500); box-shadow: 0 0 0 4px rgba(22,184,170,.1); }
.group-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.group-heading span { color: var(--muted); font-size: 10px; font-weight: 750; }

.order-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 16px rgba(5,20,36,.045); transition: .2s transform, .2s border, .2s box-shadow; }
.order-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--teal-500); }
.order-card:hover { transform: translateY(-1px); border-color: #b8d8d4; box-shadow: 0 10px 26px rgba(5,20,36,.08); }
.order-card.selected { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(22,184,170,.12), 0 12px 28px rgba(5,20,36,.1); }
.order-card__main { padding: 16px 17px 13px 20px; cursor: pointer; }
.order-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.order-number { margin: 0; font-size: 16px; line-height: 1.2; letter-spacing: -.25px; }
.customer-name { margin: 4px 0 0; color: #4d5b70; font-size: 12px; font-weight: 650; }
.order-price { flex: 0 0 auto; font-size: 17px; letter-spacing: -.3px; }
.order-address { margin: 12px 0 9px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #69778a; font-size: 11px; line-height: 1.45; }
.restaurant-line { display: flex; align-items: center; gap: 7px; color: var(--teal-700); font-size: 11px; font-weight: 850; }
.restaurant-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-row { margin-top: 11px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag { min-height: 23px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 7px; color: #526176; background: #f0f4f7; font-size: 9px; font-weight: 800; }
.tag--status { color: #17603d; background: #e3f8ec; }
.tag--new { color: #174f9e; background: #e7f0ff; }
.tag--missing { color: #9b4050; background: #fff0f2; }
.tag--platform { color: #47327e; background: #f0ecff; }
.order-card__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 0 17px 15px 20px; }
.action-button { min-height: 39px; border: 1px solid #cfdae2; border-radius: 11px; color: var(--blue-600); background: #f9fbfc; font-size: 10px; font-weight: 850; }
.action-button--primary { padding: 0 15px; color: #fff; border-color: var(--teal-700); background: var(--teal-700); }
.action-button--primary:hover { background: var(--teal-600); }
.action-button:disabled { color: #8997a8; border-color: #e2e8ed; background: #f1f4f6; cursor: not-allowed; }

.empty-state { padding: 42px 20px; border: 1px dashed #becbd4; border-radius: 20px; text-align: center; background: rgba(255,255,255,.55); }
.empty-state__icon { width: 56px; height: 56px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 18px; color: var(--teal-700); background: var(--teal-100); font-size: 28px; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; }
.empty-state p { max-width: 360px; margin: 0 auto; color: var(--muted); font-size: 11px; line-height: 1.5; }

.detail-drawer { position: fixed; z-index: 2000; inset: 0; visibility: hidden; pointer-events: none; }
.detail-drawer.open { visibility: visible; pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2,10,20,.54); opacity: 0; transition: opacity .22s; }
.detail-drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; z-index: 1; inset: 0 0 0 auto; width: min(560px, 100%); display: flex; flex-direction: column; background: var(--canvas); box-shadow: -20px 0 60px rgba(2,10,20,.25); transform: translateX(102%); transition: transform .27s cubic-bezier(.2,.8,.2,1); }
.detail-drawer.open .drawer-panel { transform: translateX(0); }
.drawer-head { flex: 0 0 auto; min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; color: #fff; background: var(--navy-950); }
.drawer-head h2 { margin: 0; font-size: 24px; letter-spacing: -.7px; }
.drawer-head .eyebrow { color: #63d5ca; }
.drawer-close { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; color: #fff; background: rgba(255,255,255,.08); font-size: 28px; line-height: 1; }
.drawer-content { flex: 1; overflow: auto; padding: 20px 22px 50px; }
.detail-hero { padding: 20px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #0a2237, #0b4c50); box-shadow: var(--shadow); }
.detail-hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.detail-hero h3 { margin: 3px 0 0; font-size: 19px; }
.detail-hero strong { font-size: 24px; }
.detail-hero p { margin: 15px 0 0; color: #c1d5d7; font-size: 12px; line-height: 1.55; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.detail-actions a { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 12px; color: #fff; background: var(--teal-600); text-decoration: none; font-size: 11px; font-weight: 850; }
.detail-actions a.secondary { color: #d7e3e9; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); }
.detail-actions a.disabled { opacity: .5; pointer-events: none; }
.detail-section { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.detail-section h4 { margin: 0 0 14px; font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-field { min-width: 0; display: grid; gap: 4px; }
.detail-field span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.detail-field strong { overflow-wrap: anywhere; font-size: 11px; line-height: 1.4; }
.detail-field--wide { grid-column: 1 / -1; }
.item-list { display: grid; gap: 0; }
.item-row { display: grid; grid-template-columns: 1fr auto; gap: 13px; padding: 12px 0; border-top: 1px solid #edf1f4; }
.item-row:first-child { border-top: 0; padding-top: 0; }
.item-row:last-child { padding-bottom: 0; }
.item-row strong { font-size: 11px; }
.item-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.item-price { white-space: nowrap; font-size: 11px; font-weight: 850; }
.drawer-loading { display: grid; place-items: center; min-height: 240px; color: var(--muted); font-size: 12px; }

.toast-stack { position: fixed; z-index: 3000; right: 18px; bottom: 18px; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 260px; max-width: min(390px, calc(100vw - 36px)); padding: 13px 15px; border-radius: 13px; color: #fff; background: var(--navy-900); box-shadow: var(--shadow); font-size: 11px; line-height: 1.45; transform-origin: bottom right; animation: toastIn .22s both; }
.toast.success { background: #096c62; }
.toast.error { background: #a92d41; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }

.login-body { min-height: 100vh; display: grid; place-items: center; overflow: auto; color: #fff; background: radial-gradient(circle at 18% 20%, rgba(11,148,136,.2), transparent 34%), radial-gradient(circle at 90% 90%, rgba(23,100,216,.19), transparent 34%), var(--navy-950); }
.login-shell { width: min(1060px, calc(100% - 36px)); min-height: 570px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: clamp(40px, 8vw, 110px); padding: 60px 30px; }
.login-brand .eyebrow { color: #62d9ce; }
.login-brand h1 { max-width: 610px; margin: 18px 0; font-size: clamp(42px, 6vw, 74px); line-height: .98; letter-spacing: -3.5px; }
.login-brand > p:last-child { max-width: 520px; color: #9fb1c4; font-size: 15px; line-height: 1.7; }
.login-card { padding: 30px; border: 1px solid rgba(255,255,255,.1); border-radius: 25px; background: rgba(255,255,255,.075); box-shadow: 0 30px 80px rgba(0,0,0,.25); backdrop-filter: blur(20px); }
.login-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-card__head div { display: grid; gap: 3px; }
.login-card__head strong { font-size: 20px; }
.login-card__head small { color: #9fb1c4; font-size: 11px; }
.login-card form { display: grid; gap: 12px; }
.login-card label { color: #b9c7d5; font-size: 11px; font-weight: 800; }
.password-field { height: 52px; display: flex; align-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(2,10,20,.32); }
.password-field input { min-width: 0; height: 100%; flex: 1; padding: 0 15px; color: #fff; border: 0; outline: 0; background: transparent; }
.password-field span { padding: 0 16px; color: #62d9ce; font-size: 20px; }
.primary-button { min-height: 50px; margin-top: 6px; border: 0; border-radius: 14px; color: #fff; background: var(--teal-600); font-weight: 850; }
.form-error { margin: 0; color: #fda4af; font-size: 11px; }
.setup-warning { padding: 18px; border: 1px solid rgba(251,191,36,.26); border-radius: 15px; color: #fde68a; background: rgba(251,191,36,.08); }
.setup-warning p { margin: 8px 0 0; color: #cbd5e1; font-size: 11px; line-height: 1.6; }
.setup-warning code { color: #fff; }

@media (max-width: 1120px) {
    .workspace { grid-template-columns: minmax(380px, .9fr) minmax(460px, 1.1fr); }
    .connection-pill { display: none; }
    .sheet-inner { padding-inline: 22px; }
}

@media (max-width: 900px) {
    :root { --header-height: 64px; }
    .app-header { padding: 0 14px; }
    .brand-mark { width: 36px; height: 36px; }
    .brand strong { font-size: 19px; }
    .brand small { display: none; }
    .header-actions { gap: 7px; }
    .logout-link, .icon-button { display: none; }
    .sync-button { min-height: 38px; padding: 0 12px; border-radius: 11px; }
    .sync-button span:last-child { display: none; }
    .sync-button .sync-icon { font-size: 21px; }
    .workspace { display: block; inset: var(--header-height) 0 0; overflow: hidden; }
    .map-panel { position: absolute; inset: 0 0 auto; height: 46vh; min-height: 270px; border: 0; }
    .map-overlay--top { top: 12px; left: 12px; }
    .map-title { padding: 9px 11px; border-radius: 13px; }
    .map-title__icon { width: 31px; height: 31px; }
    .map-title strong { font-size: 11px; }
    .map-title small { font-size: 9px; }
    .map-legend { display: none; }
    .leaflet-control-zoom { margin-top: 66px !important; }
    .orders-sheet { position: absolute; inset: 40vh 0 0; border: 0; border-radius: 25px 25px 0 0; box-shadow: 0 -12px 34px rgba(5,20,36,.16); transition: top .28s cubic-bezier(.2,.8,.2,1); }
    .orders-sheet.expanded { top: 8px; }
    .orders-sheet.collapsed { top: 70vh; }
    .sheet-handle { position: absolute; z-index: 20; inset: 0 0 auto; width: 100%; height: 31px; display: grid; place-items: center; border: 0; background: transparent; }
    .sheet-handle span { width: 46px; height: 5px; border-radius: 999px; background: #c6d1da; }
    .sheet-scroll { padding-top: 23px; scrollbar-width: none; }
    .sheet-scroll::-webkit-scrollbar { display: none; }
    .sheet-inner { padding: 10px 14px 75px; }
    .sheet-heading { align-items: center; margin-bottom: 13px; }
    .sheet-heading h1 { font-size: 27px; }
    .last-sync { max-width: 145px; font-size: 9px; }
    .stat-grid { gap: 7px; }
    .stat-card { padding: 12px; border-radius: 13px; }
    .stat-card strong { font-size: 21px; }
    .stat-card span, .stat-card small { font-size: 8px; }
    .search-box { height: 43px; }
    .search-box kbd { display: none; }
    .filter-toggle { padding: 0 11px; }
    .filter-toggle span { display: none; }
    .time-chips { margin-block: 9px; }
    .time-chips button { height: 32px; font-size: 9px; }
    .filters { grid-template-columns: 1fr 1fr; padding: 11px; }
    .order-groups { gap: 15px; }
    .order-card__main { padding: 14px 14px 11px 18px; }
    .order-card__actions { padding: 0 14px 13px 18px; }
    .order-number { font-size: 15px; }
    .order-price { font-size: 15px; }
    .drawer-panel { inset: 8vh 0 0; width: 100%; border-radius: 24px 24px 0 0; transform: translateY(102%); }
    .detail-drawer.open .drawer-panel { transform: translateY(0); }
    .drawer-head { min-height: 78px; padding: 15px 17px; border-radius: 24px 24px 0 0; }
    .drawer-head h2 { font-size: 21px; }
    .drawer-content { padding: 16px 14px 42px; }
    .toast-stack { right: 12px; bottom: 12px; }
    .login-shell { grid-template-columns: 1fr; gap: 32px; padding: 38px 0; }
    .login-brand h1 { font-size: clamp(40px, 12vw, 62px); }
    .login-card { padding: 23px; }
}

@media (max-width: 430px) {
    .stat-card--accent { grid-column: span 1; }
    .stat-card { padding: 11px 9px; }
    .stat-card strong { font-size: 19px; }
    .filters { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-field--wide { grid-column: auto; }
}

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

