:root {
    --ink: #171a16;
    --muted: #6f746b;
    --line: #e6e8e1;
    --paper: #f5f6f1;
    --card: #ffffff;
    --lime: #d9ff66;
    --lime-dark: #bde744;
    --green: #216a4b;
    --blue: #315eff;
    --plum: #6d4b79;
    --orange: #ec7c31;
    --shadow: 0 18px 55px rgba(36, 41, 31, .09);
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.eyebrow {
    margin: 0 0 9px;
    color: #858a80;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.muted { color: var(--muted); }
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    color: #11140f;
    background: var(--lime);
    font-family: Georgia, serif;
    font-size: 23px;
    font-style: italic;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 0 19px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { color: #10130e; background: var(--lime); box-shadow: 0 8px 20px rgba(181, 220, 67, .23); }
.button.primary:hover { background: var(--lime-dark); box-shadow: 0 10px 28px rgba(181, 220, 67, .3); }
.button.ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.button.danger { color: #8d2d2a; background: #fff7f5; border-color: #efd2cd; }
.button.danger:hover { color: #74211f; background: #fce9e5; border-color: #e6bdb6; }
.button.full { width: 100%; }
.button[disabled] { opacity: .65; pointer-events: none; }

/* Login */
.login-page { min-height: 100vh; background: #f5f6f1; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(440px, .9fr); }
.login-story {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px clamp(46px, 7vw, 112px);
    color: #fff;
    background:
        radial-gradient(circle at 86% 18%, rgba(217,255,102,.15), transparent 30%),
        linear-gradient(145deg, #11150f 0%, #20271b 52%, #171d14 100%);
}
.login-story::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    right: -270px;
    bottom: 5%;
    border: 1px solid rgba(217,255,102,.18);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(217,255,102,.025), 0 0 0 140px rgba(217,255,102,.02);
}
.login-story::after {
    content: "COD";
    position: absolute;
    right: -18px;
    bottom: 54px;
    color: rgba(255,255,255,.018);
    font: 900 250px/1 Georgia, serif;
    letter-spacing: -.08em;
}
.brand-lockup.light { position: relative; z-index: 1; color: #fff; }
.story-copy { position: relative; z-index: 1; max-width: 650px; }
.story-copy .eyebrow { color: var(--lime); }
.story-copy h1 { margin: 0 0 28px; font-size: clamp(50px, 6vw, 88px); line-height: 1.02; letter-spacing: -.065em; }
.story-copy h1 em { color: var(--lime); font-family: Georgia, "Songti SC", serif; font-weight: 400; }
.story-copy > p:last-child { max-width: 490px; margin: 0; color: #bfc6b8; font-size: 17px; line-height: 1.8; }
.story-metrics { position: relative; z-index: 1; display: flex; gap: 54px; }
.story-metrics div { display: grid; gap: 4px; }
.story-metrics strong { color: var(--lime); font: 400 32px/1 Georgia, serif; }
.story-metrics span { color: #8f9889; font-size: 12px; }
.login-panel { display: grid; place-items: center; padding: 40px clamp(28px, 6vw, 88px); }
.login-card { width: min(100%, 440px); }
.login-card h2 { margin: 0 0 10px; font-size: 38px; letter-spacing: -.045em; }
.login-card > .muted { margin: 0 0 34px; font-size: 14px; }
.mobile-brand { display: none; }
.stack-form { display: grid; gap: 17px; }
.stack-form label { display: grid; gap: 8px; color: #464b43; font-size: 12px; font-weight: 750; }
.stack-form input:not([type="radio"]):not([type="file"]), .stack-form textarea {
    width: 100%;
    border: 1px solid #dfe2da;
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: #fbfcf9;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 500;
    transition: border .18s ease, box-shadow .18s ease, background .18s ease;
}
.stack-form input:not([type="radio"]):not([type="file"]):focus, .stack-form textarea:focus { border-color: #9dad76; background: #fff; box-shadow: 0 0 0 4px rgba(192,222,101,.16); }
.stack-form textarea { resize: vertical; line-height: 1.55; }
.input-wrap { position: relative; display: block; }
.input-wrap input { min-height: 54px; padding-left: 50px !important; }
.input-icon { position: absolute; z-index: 1; left: 16px; top: 50%; transform: translateY(-50%); display: grid; min-width: 21px; place-items: center; color: #868d80; font-size: 13px; font-weight: 900; }
.login-form .button { min-height: 54px; margin-top: 5px; }
.security-note { margin: 26px 0 0; text-align: center; color: #8d9289; font-size: 11px; }
.security-note span { margin-right: 5px; color: #73a64e; font-size: 8px; }
.alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 11px; font-size: 13px; line-height: 1.5; }
.alert.error { color: #8a312f; background: #fff0ee; border: 1px solid #f3d2ce; }
.alert.success { color: #246344; background: #eef9f0; border: 1px solid #cee8d3; }

/* Setup */
.setup-page { min-height: 100vh; color: #e9eee6; background: #11150f; }
.setup-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; display: grid; grid-template-columns: .78fr 1.22fr; gap: 80px; align-items: start; }
.setup-brand { position: sticky; top: 72px; padding: 22px 0; }
.setup-brand .brand-mark { margin-bottom: 58px; }
.setup-brand .eyebrow { color: var(--lime); }
.setup-brand h1 { margin: 0 0 24px; color: #fff; font-size: clamp(45px, 5vw, 68px); line-height: 1.04; letter-spacing: -.06em; }
.setup-brand > p:not(.eyebrow) { max-width: 440px; color: #99a294; line-height: 1.8; }
.feature-list { margin: 58px 0 0; padding: 0; list-style: none; display: grid; gap: 20px; }
.feature-list li { display: flex; align-items: center; gap: 15px; color: #c4cac0; font-size: 14px; }
.feature-list span { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #3f483a; border-radius: 50%; color: var(--lime); font-size: 9px; }
.setup-card { color: var(--ink); background: #f8f9f5; border-radius: 30px; padding: clamp(28px, 5vw, 54px); box-shadow: 0 35px 90px rgba(0,0,0,.3); }
.setup-heading, .modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.setup-heading h2, .setup-card > h2 { margin: 0 0 28px; font-size: 30px; letter-spacing: -.04em; }
.secure-pill, .step-pill { flex: 0 0 auto; padding: 7px 10px; border-radius: 99px; color: #446231; background: #e8f5d2; font-size: 10px; font-weight: 800; }
.stack-form fieldset { min-width: 0; margin: 0; padding: 23px; border: 1px solid #e1e4dc; border-radius: 17px; background: #fff; }
.stack-form legend { padding: 0 8px; color: #363a34; font-size: 13px; font-weight: 800; }
.stack-form legend span { display: inline-grid; width: 23px; height: 23px; margin-right: 7px; place-items: center; border-radius: 50%; color: #171a15; background: var(--lime); font-size: 10px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.align-end { align-items: end; }
fieldset > .form-grid, fieldset > label, .account-row > .form-grid, .account-row > label { margin-top: 13px; }
.account-row + .account-row { margin-top: 21px; padding-top: 21px; border-top: 1px dashed #dde0d8; }
.account-row > strong { font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 13px; }
.choice-grid.vertical { grid-template-columns: 1fr; }
.choice { cursor: pointer; position: relative; display: block !important; }
.choice input { position: absolute; opacity: 0; }
.choice > span { min-height: 82px; display: flex; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid #dfe2da; border-radius: 13px; padding: 14px 15px; background: #fbfcf9; transition: border .16s ease, box-shadow .16s ease, background .16s ease; }
.choice input:checked + span { border-color: #9aae60; background: #f5fbdc; box-shadow: inset 0 0 0 1px #9aae60; }
.choice strong { color: #31362e; font-size: 12px; }
.choice small { color: #7c8277; font-size: 10px; line-height: 1.5; }
.form-note { margin: 0; color: #989d94; text-align: center; font-size: 10px; }
.success-orb { display: grid; width: 64px; height: 64px; margin-bottom: 25px; place-items: center; border-radius: 50%; background: var(--lime); font-size: 28px; font-weight: 900; }

/* Main app */
.app-page { min-height: 100vh; background: var(--paper); }
.app-shell { width: min(var(--max), calc(100% - 44px)); margin: 0 auto; }
.app-header { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e2e4dd; }
.desktop-nav { display: flex; align-self: stretch; gap: 32px; }
.desktop-nav a { position: relative; display: grid; place-items: center; color: #787e74; font-size: 13px; font-weight: 700; }
.desktop-nav a.active { color: var(--ink); }
.desktop-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; color: #f5f6f0; background: #273020; font-size: 13px; font-weight: 800; }
.avatar.tiny { width: 34px; height: 34px; font-size: 11px; }
.user-copy { display: grid; min-width: 70px; }
.user-copy strong { font-size: 12px; }
.user-copy small { margin-top: 2px; color: #92978d; font-size: 9px; }
.icon-button { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 11px; cursor: pointer; color: #7a8075; background: transparent; font-size: 17px; }
.icon-button:hover { background: #e9ebe5; }
.hero { padding: 60px 0 34px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.06em; }
.hero > div > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { position: relative; overflow: hidden; min-height: 165px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; background: var(--card); }
.stat-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -42px; top: -47px; border-radius: 50%; opacity: .09; background: currentColor; }
.stat-card.warm { color: #91631b; }
.stat-card.blue { color: var(--blue); }
.stat-card.plum { color: var(--plum); }
.stat-card.green { color: var(--green); }
.stat-icon { display: grid; width: 32px; height: 32px; margin-bottom: 19px; place-items: center; border-radius: 9px; color: currentColor; background: color-mix(in srgb, currentColor 10%, white); font-size: 14px; font-weight: 800; }
.stat-card.plum .stat-icon { font-size: 8px; letter-spacing: -.02em; }
.stat-card p { margin: 0 0 6px; color: #71766d; font-size: 11px; font-weight: 700; }
.stat-card > strong { display: block; color: var(--ink); font: 500 34px/1.1 Georgia, "Songti SC", serif; letter-spacing: -.03em; }
.stat-card > strong.money-stat { font: 800 19px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.stat-card small { display: block; margin-top: 8px; color: #9aa096; font-size: 9px; }

.finance-panel { margin: 18px 0 48px; overflow: hidden; border-radius: var(--radius-lg); padding: 27px 30px 30px; color: #edf0eb; background: linear-gradient(125deg, #171c15, #242b20); box-shadow: 0 20px 45px rgba(31,38,27,.14); }
.finance-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.finance-heading .eyebrow { color: #819077; }
.finance-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #94a18c; font-size: 10px; font-weight: 700; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(217,255,102,.1); }
.finance-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1.1fr; align-items: center; gap: 25px; }
.finance-item { display: grid; gap: 6px; }
.finance-item span { color: #899284; font-size: 10px; }
.finance-item strong { color: #fff; font: 500 25px/1.2 Georgia, serif; letter-spacing: -.02em; }
.finance-item small { color: #677061; font-size: 9px; }
.finance-item.total { border-left: 1px solid #3a4235; padding-left: 28px; }
.finance-item.total strong { color: var(--lime); font-size: 31px; }
.finance-sign { color: #5e675a; font: 300 27px/1 Georgia, serif; }
.negative-note { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid #353d31; color: #e1bd93; font-size: 10px; }
.separate-fee-note { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid #353d31; color: #c8d3c2; font-size: 10px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 29px; letter-spacing: -.045em; }
.search-box { display: flex; align-items: center; width: min(100%, 345px); height: 43px; overflow: hidden; border: 1px solid #dee1d9; border-radius: 12px; background: #fff; }
.search-box > span { padding-left: 14px; color: #858b80; font-size: 19px; }
.search-box input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; padding: 0 10px; color: var(--ink); background: transparent; font-size: 12px; }
.search-box button { align-self: stretch; border: 0; padding: 0 14px; cursor: pointer; color: #646a60; background: #f2f4ee; font-size: 11px; font-weight: 800; }
.filter-tabs { display: flex; align-items: center; gap: 5px; overflow-x: auto; margin-bottom: 15px; padding-bottom: 3px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 39px; border-radius: 10px; padding: 0 14px; color: #787e74; font-size: 11px; font-weight: 750; }
.filter-tabs a:hover { background: #eaede6; }
.filter-tabs a.active { color: #fff; background: #20251d; }
.filter-tabs span { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 99px; color: #545a50; background: #e4e7df; font-size: 8px; }
.filter-tabs a.active span { color: #171b14; background: var(--lime); }
.orders-list { display: grid; gap: 13px; }
.order-card { display: grid; grid-template-columns: minmax(0, 1fr) 245px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); box-shadow: 0 4px 18px rgba(38,44,33,.025); }
.order-main { min-width: 0; padding: 21px 24px 18px; }
.order-action { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #e9ebe5; padding: 22px; background: #fafbf8; }
.order-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid #eff0ec; }
.order-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.order-id strong { font-size: 12px; letter-spacing: .02em; }
.order-id small { color: #7e857a; font-size: 10px; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #c0a13d; box-shadow: 0 0 0 2px #f0e7c8; }
.status-accepted .status-dot { background: #5277f3; box-shadow: 0 0 0 2px #dce4ff; }
.status-delivered .status-dot { background: #795a82; box-shadow: 0 0 0 2px #ebdeee; }
.status-settled .status-dot { background: #4d9c71; box-shadow: 0 0 0 2px #d9eee2; }
.status-pill { flex: 0 0 auto; border-radius: 99px; padding: 7px 11px; font-size: 9px; font-weight: 850; }
.status-pill.pending { color: #88631d; background: #f8efd2; }
.status-pill.accepted { color: #315ac2; background: #e9efff; }
.status-pill.delivered { color: #65436d; background: #f1e6f3; }
.status-pill.settled { color: #2d714d; background: #dff2e6; }
.order-body { display: grid; grid-template-columns: minmax(220px, 1.45fr) minmax(150px, .7fr) auto; gap: 24px; align-items: center; padding: 21px 0 17px; }
.mini-label { margin: 0 0 6px; color: #747b70; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.customer-block h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.03em; }
.order-dimension { display: grid; gap: 3px; margin-top: 10px; }
.order-dimension > span { color: #7f867b; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.order-dimension > a { color: #3f5f9f; font-size: 12px; font-weight: 750; }
.address-dimension { position: relative; padding-right: 70px; }
.map-link { position: absolute; right: 0; bottom: 1px; }
.address { display: flex; align-items: start; gap: 6px; max-width: 500px; margin: 3px 0 0; color: #52594f; font-size: 12px; line-height: 1.55; }
.address i { flex: 0 0 auto; color: #969c91; font-style: normal; }
.order-note { margin: 10px 0 0; padding: 7px 9px; border-radius: 8px; color: #666d62; background: #f5f6f2; font-size: 10px; line-height: 1.5; }
.order-note strong { margin-right: 5px; color: #53594f; }
.money-block > strong { display: block; font: 500 21px/1.25 Georgia, serif; }
.money-block > small { display: block; margin-top: 8px; color: #a0a59b; font-size: 8px; }
.money-breakdown { display: grid; gap: 4px; margin-top: 9px; }
.money-breakdown span { display: flex; justify-content: space-between; gap: 10px; color: #70776c; font-size: 10px; }
.money-breakdown b { color: #4c5249; }
.photo-strip { display: flex; max-width: 190px; }
.photo-strip a { position: relative; width: 58px; height: 58px; margin-left: -9px; overflow: hidden; border: 3px solid #fff; border-radius: 12px; background: #eef0ea; box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.photo-strip a:first-child { margin-left: 0; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.photo-strip span { position: absolute; right: 3px; bottom: 3px; border-radius: 4px; padding: 2px 3px; color: #fff; background: rgba(20,23,18,.75); font-size: 6px; }
.order-progress { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; padding: 3px 0 0; }
.order-progress::before { content: ""; position: absolute; top: 12px; left: 7%; right: 7%; height: 1px; background: #e3e6de; }
.progress-step { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; color: #8f968b; font-size: 9px; }
.progress-step i { display: grid; width: 20px; height: 20px; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #9ca198; background: #e8ebe4; box-shadow: 0 0 0 1px #e1e4dc; font-style: normal; font-size: 7px; font-weight: 800; }
.progress-step.done, .progress-step.current { color: #4c5348; }
.progress-step.done i { color: #fff; background: #617259; box-shadow: 0 0 0 1px #617259; }
.progress-step.current i { color: #171a15; background: var(--lime); box-shadow: 0 0 0 1px #bedf5e; }
.assigned { display: flex; align-items: center; gap: 9px; margin: 0 0 19px; }
.assigned > span:last-child { display: grid; }
.assigned small { margin-bottom: 2px; color: #9a9f96; font-size: 8px; }
.assigned strong { font-size: 11px; }
.action-copy { margin: 0 0 14px; color: #7e847a; font-size: 10px; line-height: 1.55; }
.delete-order-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e7e9e3; }
.complete-stamp, .waiting-state { display: flex; align-items: center; gap: 10px; }
.complete-stamp > span, .waiting-state > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #246d49; background: #e2f3e8; font-weight: 900; }
.waiting-state > span { color: #67456f; background: #f0e4f2; }
.complete-stamp > div, .waiting-state > div { display: grid; gap: 3px; }
.complete-stamp strong, .waiting-state strong { font-size: 11px; }
.complete-stamp small, .waiting-state small { color: #9a9f96; font-size: 8px; }
.settlement-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e7e9e3; color: #777d73; font-size: 9px; }
.empty-state { display: grid; min-height: 310px; place-items: center; align-content: center; border: 1px dashed #d8dcd2; border-radius: var(--radius-lg); text-align: center; background: rgba(255,255,255,.45); }
.empty-icon { display: grid; width: 50px; height: 50px; margin-bottom: 14px; place-items: center; border-radius: 16px; color: #92998d; background: #e9ece5; font-size: 21px; }
.empty-state h3 { margin: 0 0 7px; font-size: 18px; }
.empty-state p { margin: 0 0 19px; color: #90968c; font-size: 11px; }
.app-footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; margin-top: 40px; border-top: 1px solid #e1e4dc; color: #a0a69b; font-size: 9px; }
.mobile-nav { display: none; }

/* Toast & modal */
.toast { position: fixed; z-index: 100; top: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: min(92vw, 530px); border: 1px solid #dce1d7; border-radius: 13px; padding: 11px 12px; color: #374033; background: rgba(255,255,255,.97); box-shadow: 0 14px 42px rgba(20,27,16,.17); font-size: 12px; font-weight: 650; }
.toast > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #245d41; background: #dff1e4; font-size: 10px; font-weight: 900; }
.toast.error > span { color: #8a302e; background: #fae3df; }
.toast button { margin-left: auto; border: 0; cursor: pointer; color: #9ba197; background: transparent; font-size: 19px; }
.toast.is-hidden { display: none; }
.modal { width: auto; max-width: none; height: auto; max-height: none; border: 0; padding: 0; background: transparent; }
.modal::backdrop { background: rgba(12,15,11,.68); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(92vw, 510px); max-height: 88vh; overflow-y: auto; border-radius: 24px; padding: 31px; color: var(--ink); background: #f9faf7; box-shadow: 0 35px 100px rgba(0,0,0,.33); }
.modal-card.wide { width: min(92vw, 700px); }
.modal-card h2 { margin: 0; font-size: 27px; letter-spacing: -.045em; }
.modal-card > .muted { margin: -6px 0 2px; font-size: 11px; line-height: 1.6; }
.modal-close { position: absolute; z-index: 2; top: 15px; right: 15px; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 12px; cursor: pointer; color: #767c72; background: #eceee9; font-size: 21px; }
.modal-heading { padding-right: 36px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 3px; }
.upload-drop { position: relative; display: flex !important; min-height: 126px; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed #bdc4b5; border-radius: 15px; padding: 18px; cursor: pointer; background: #f4f6f0; }
.upload-drop.compact { min-height: 105px; }
.upload-drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload-drop .upload-icon { display: grid; width: 31px; height: 31px; margin: 0 auto 8px; place-items: center; border-radius: 9px; color: #263020; background: var(--lime); font-size: 18px; }
.upload-drop strong { display: block; color: #50564d; font-size: 11px; }
.upload-drop small { display: block; margin-top: 4px; color: #9ca297; font-size: 8px; }
.file-preview { display: block; margin-top: 7px; color: #5d7550; font-size: 9px; }
.choice:focus-within > span, .upload-drop:focus-within { outline: 3px solid rgba(49,94,255,.22); outline-offset: 2px; }
.inline-calculation { min-height: 69px; display: grid; align-content: center; gap: 3px; border: 1px solid #dfe4d8; border-radius: 12px; padding: 10px 13px; background: #f2f7e8; }
.inline-calculation span { color: #89937f; font-size: 8px; }
.inline-calculation strong { color: #34442d; font: 500 17px/1.2 Georgia, serif; }
.inline-calculation small { color: #7a8571; font-size: 8px; }
.excel-mapping { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.excel-mapping div { display: grid; gap: 3px; min-height: 78px; align-content: center; border: 1px solid #e0e4da; border-radius: 12px; padding: 11px 13px; background: #fff; }
.excel-mapping div:first-child { grid-column: 1 / -1; }
.excel-mapping span { color: #8b9187; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.excel-mapping strong { color: #353c31; font-size: 13px; }
.excel-mapping small { color: #8e9589; font-size: 9px; line-height: 1.4; }
.import-note { margin: -3px 0 0; border-left: 3px solid #badc56; padding: 2px 0 2px 11px; color: #747c6f; font-size: 9px; line-height: 1.55; }
.import-status { min-height: 1.4em; margin: -4px 0 0; color: #5d7550; font-size: 10px; font-weight: 700; line-height: 1.45; }
.import-status:empty { display: none; }
.settle-summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid #e1e4dc; border-radius: 14px; background: #fff; }
.settle-summary div { display: grid; gap: 5px; padding: 14px; border-right: 1px solid #e7e9e3; }
.settle-summary div:last-child { border-right: 0; }
.settle-summary span { color: #92988e; font-size: 8px; }
.settle-summary strong { font: 600 14px/1.2 Georgia, serif; }
.settle-summary .accent { background: #f2f8de; }
.settle-summary .accent strong { color: #3d532d; }

@supports not (color: color-mix(in srgb, red, white)) {
    .stat-icon { background: #f0f2ec; }
}

@media (max-width: 980px) {
    .login-shell { grid-template-columns: .95fr 1.05fr; }
    .login-story { padding: 42px; }
    .story-metrics { gap: 28px; }
    .setup-shell { grid-template-columns: 1fr; gap: 35px; padding: 40px 0; }
    .setup-brand { position: static; }
    .setup-brand .brand-mark, .feature-list { margin-top: 0; margin-bottom: 30px; }
    .setup-brand h1 { font-size: 48px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .order-card { grid-template-columns: minmax(0, 1fr) 220px; }
    .order-body { grid-template-columns: minmax(200px, 1.2fr) minmax(150px, .8fr); }
    .photo-strip { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    body.app-page { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .login-shell { display: block; min-height: 100vh; }
    .login-story { display: none; }
    .login-panel { min-height: 100vh; display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 32px 24px; }
    .mobile-brand { display: inline-flex; margin: 0 0 48px; }
    .login-card { width: 100%; }
    .login-card h2 { font-size: 34px; }
    .setup-shell { width: min(100% - 24px, 620px); padding: 25px 0; }
    .setup-brand { padding: 10px 8px; }
    .setup-brand .brand-mark { margin-bottom: 25px; }
    .setup-brand h1 { font-size: 39px; }
    .setup-brand > p:not(.eyebrow), .feature-list { display: none; }
    .setup-card { border-radius: 22px; padding: 23px 18px; }
    .setup-heading { display: block; }
    .secure-pill { display: none; }
    .form-grid.two, .choice-grid { grid-template-columns: 1fr; }
    .app-shell { width: min(100% - 28px, 680px); }
    .app-header { height: 68px; }
    .desktop-nav, .user-copy { display: none; }
    .app-header .brand-mark { width: 34px; height: 34px; }
    .hero { padding: 38px 0 24px; display: block; }
    .hero h1 { font-size: 38px; }
    .hero-actions { margin-top: 22px; }
    .hero-actions .button { flex: 1; }
    .desktop-only { display: none !important; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 145px; padding: 16px; }
    .stat-icon { margin-bottom: 14px; }
    .stat-card > strong { font-size: 29px; }
    .stat-card > strong.money-stat { font-size: 15px; }
    .finance-panel { margin-bottom: 37px; border-radius: 20px; padding: 23px 19px; }
    .finance-grid { grid-template-columns: 1fr 1fr; gap: 19px 12px; }
    .finance-sign { display: none; }
    .finance-item.total { grid-column: 1 / -1; border-top: 1px solid #353d31; border-left: 0; padding: 17px 0 0; }
    .finance-item strong { font-size: 20px; }
    .finance-item.total strong { font-size: 29px; }
    .section-heading { display: block; }
    .search-box { width: 100%; margin-top: 17px; }
    .order-card { display: block; }
    .order-main { padding: 18px 17px 16px; }
    .order-action { border-top: 1px solid #e9ebe5; border-left: 0; padding: 17px; }
    .order-topline { align-items: start; }
    .order-id { flex-wrap: wrap; }
    .order-id small { flex-basis: calc(100% - 17px); margin-left: 17px; }
    .order-body { grid-template-columns: 1fr 1fr; gap: 19px 12px; }
    .photo-strip { max-width: none; }
    .order-progress { gap: 3px; }
    .progress-step { display: grid; justify-items: center; gap: 5px; text-align: center; }
    .assigned { margin-bottom: 12px; }
    .modal-card, .modal-card.wide { width: 100vw; max-width: none; max-height: 92vh; margin-top: 8vh; border-radius: 24px 24px 0 0; padding: 28px 19px calc(26px + env(safe-area-inset-bottom)); }
    .modal { width: 100%; margin: auto 0 0; }
    .modal-actions { display: grid; grid-template-columns: .75fr 1.25fr; }
    .settle-summary { grid-template-columns: 1fr; }
    .excel-mapping { grid-template-columns: 1fr; }
    .excel-mapping div:first-child { grid-column: auto; }
    .settle-summary div { border-right: 0; border-bottom: 1px solid #e7e9e3; }
    .settle-summary div:last-child { border-bottom: 0; }
    .mobile-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); min-height: calc(62px + env(safe-area-inset-bottom)); padding: 7px 10px env(safe-area-inset-bottom); border-top: 1px solid #e2e5dd; background: rgba(250,251,248,.96); backdrop-filter: blur(15px); }
    .mobile-nav a, .mobile-nav button { display: grid; place-items: center; align-content: center; gap: 2px; border: 0; color: #70766b; background: transparent; font-size: 8px; font-weight: 700; }
    .mobile-nav span { font-size: 18px; font-weight: 500; }
    .mobile-nav button { color: #24311d; }
    .mobile-nav button span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #151912; background: var(--lime); }
    .app-footer { display: none; }
}

@media (max-width: 420px) {
    .app-shell { width: calc(100% - 22px); }
    .brand-lockup { gap: 8px; font-size: 14px; }
    .hero h1 { font-size: 34px; }
    .hero-actions { display: grid; grid-template-columns: 1.2fr .8fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-height: 137px; }
    .finance-heading { display: block; }
    .live-indicator { margin-top: 10px; }
}

@media (max-width: 560px) {
    .order-body { display: block; }
    .money-block { margin-top: 19px; padding-top: 16px; border-top: 1px solid #eff0ec; }
    .photo-strip { margin-top: 18px; }
    .address-dimension { padding-right: 0; }
    .map-link { position: static; width: max-content; margin-top: 4px; }
}

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