:root {
  --orange: #f26b21;
  --orange-bright: #ff7f35;
  --orange-soft: rgba(242,107,33,.12);
  --bg: #0d0b0a;
  --surface: #171411;
  --surface-2: #201b17;
  --line: rgba(255,255,255,.1);
  --text: #f7efe7;
  --muted: #a5978c;
  --success: #69c875;
  --danger: #dd5e54;
  --warning: #f0b45b;
  --display: "Arial Narrow", "Aptos Display", Impact, sans-serif;
  --body: Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; color-scheme: dark; }
body { min-width: 0; min-height: 100%; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { width: 0; height: 0; position: absolute; overflow: hidden; }
.eyebrow { margin: 0 0 8px; color: var(--orange); font-size: .68rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 62px; height: 62px; object-fit: contain; border-radius: 13px; background: #211e1c; }
.brand span { min-width: 0; display: grid; line-height: 1.08; }
.brand b { font-family: var(--display); font-size: 1.17rem; text-transform: uppercase; }
.brand small { margin-top: 6px; color: var(--orange); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; }
.brand.compact img { width: 46px; height: 46px; border-radius: 10px; }
.brand.compact b { font-size: 1rem; }
.primary-button, .secondary-button, .icon-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 11px; font-weight: 850; }
.primary-button { border: 0; padding: 0 20px; background: var(--orange); color: #170b05; box-shadow: 0 12px 30px rgba(242,107,33,.18); }
.primary-button:hover { background: var(--orange-bright); }
.secondary-button { border: 1px solid var(--line); padding: 0 15px; background: var(--surface); color: var(--text); font-size: .75rem; }
.icon-button { width: 46px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(242,107,33,.38); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: wait; }

.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(420px,.95fr); }
.auth-brand { min-width: 0; min-height: 100dvh; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(28px,4vw,58px); background: linear-gradient(100deg,rgba(9,7,6,.98),rgba(9,7,6,.65)),url("../assets/hero-brasa.webp") center/cover; }
.auth-brand::after { content: ""; width: 420px; height: 420px; position: absolute; right: -180px; bottom: -180px; border-radius: 50%; background: var(--orange); filter: blur(90px); opacity: .18; }
.auth-message { max-width: 650px; position: relative; z-index: 1; margin-block: auto; }
.auth-message h1 { max-width: 620px; margin: 0 0 22px; font-family: var(--display); font-size: clamp(4rem,7vw,7rem); line-height: .88; letter-spacing: -.04em; text-transform: uppercase; }
.auth-message h1 em { color: var(--orange); font-style: normal; }
.auth-message > p:last-child { max-width: 500px; margin: 0; color: #b5a79c; }
.auth-security { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0; color: #b5a79c; font-size: .72rem; }
.auth-security span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(105,200,117,.12); color: var(--success); }
.auth-panel { min-width: 0; min-height: 100dvh; display: grid; place-items: center; padding: clamp(22px,4vw,52px); background: #12100e; }
.auth-card { width: min(480px,100%); }
.auth-card h2 { margin: 0 0 5px; font-family: var(--display); font-size: clamp(2.5rem,5vw,3.8rem); text-transform: uppercase; }
.auth-card > p:not(.eyebrow) { margin: 0 0 25px; color: var(--muted); font-size: .82rem; }
.auth-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin-bottom: 23px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #100e0c; }
.auth-tabs button { min-width: 0; min-height: 42px; border: 0; border-radius: 9px; padding: 7px 8px; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 850; }
.auth-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--orange); }
.auth-form > label, .form-grid > label, .editor-form label { display: grid; gap: 7px; color: #c1b4a9; font-size: .7rem; font-weight: 800; }
.auth-form > label { margin-bottom: 16px; }
.auth-form input, .editor-form input, .editor-form select { width: 100%; min-width: 0; height: 50px; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; outline: 0; background: var(--surface); }
.auth-form input:focus, .editor-form input:focus, .editor-form select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.password-field, .phone-field { min-width: 0; display: flex; position: relative; }
.password-field input { padding-right: 49px; }
.password-field button { width: 44px; height: 44px; position: absolute; top: 3px; right: 3px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.phone-field b { min-width: 54px; display: grid; place-items: center; border: 1px solid var(--line); border-right: 0; border-radius: 11px 0 0 11px; background: var(--surface-2); color: var(--orange); }
.phone-field input { border-radius: 0 11px 11px 0; }
.auth-form small, .editor-form small { color: var(--muted); font-size: .62rem; font-weight: 500; }
.auth-form > .primary-button { width: 100%; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-note { margin: 15px 0 0; color: var(--muted); text-align: center; font-size: .67rem; }
.form-error { margin: 0 0 12px; border: 1px solid rgba(221,94,84,.28); border-radius: 9px; padding: 10px 12px; background: rgba(221,94,84,.08); color: #f6a29b; font-size: .7rem; }

.app-view { min-height: 100dvh; background: radial-gradient(circle at 85% 5%,rgba(242,107,33,.08),transparent 30%),var(--bg); }
.app-header { min-height: 74px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 10px clamp(16px,4vw,40px); background: rgba(13,11,10,.92); backdrop-filter: blur(16px); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.courier-main, .admin-main { width: min(1160px,calc(100% - 32px)); margin: 0 auto; padding: clamp(24px,5vw,54px) 0 80px; }
.courier-main { width: min(780px,calc(100% - 32px)); }
.welcome-card { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 18px; margin-bottom: 18px; }
.user-avatar { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px; background: var(--orange-soft); color: var(--orange); font-size: 1.25rem; font-weight: 900; }
.welcome-card h1 { margin: 0; font-family: var(--display); font-size: clamp(2rem,6vw,3rem); text-transform: uppercase; }
.welcome-card p:last-child { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.availability-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 25px 0 18px; border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--surface); }
.availability-card > div { min-width: 0; display: flex; align-items: center; gap: 14px; }
.status-dot { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 7px rgba(165,151,140,.08); }
.availability-card p { min-width: 0; display: grid; gap: 2px; margin: 0; }
.availability-card small { color: var(--muted); font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.availability-card strong { font-family: var(--display); font-size: 1.7rem; }
.availability-card p span { color: var(--muted); font-size: .7rem; }
.availability-card button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex: 0 0 auto; border: 1px solid rgba(105,200,117,.35); border-radius: 12px; padding: 0 17px; background: rgba(105,200,117,.09); color: var(--success); font-weight: 900; }
.availability-card.is-active { border-color: rgba(105,200,117,.34); background: linear-gradient(120deg,rgba(105,200,117,.09),var(--surface)); }
.availability-card.is-active .status-dot { background: var(--success); box-shadow: 0 0 0 7px rgba(105,200,117,.1); }
.availability-card.is-active button { border-color: rgba(221,94,84,.3); background: rgba(221,94,84,.08); color: #ee8a82; }
.courier-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; padding: 5px; background: #100e0c; }
.courier-tabs button { min-width: 0; min-height: 52px; position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 8px; background: transparent; color: var(--muted); font-size: .7rem; font-weight: 850; }
.courier-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--orange); }
.courier-tabs button b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: var(--orange); color: #160d08; font-size: .58rem; }
.courier-panel { min-width: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 25px 0 15px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: clamp(2rem,6vw,2.8rem); line-height: 1; text-transform: uppercase; }
.section-head p:last-child { margin: 7px 0 0; color: var(--muted); font-size: .72rem; }
.orders-status { min-height: 0; margin-bottom: 12px; color: var(--muted); font-size: .7rem; }
.orders-status.warning, .orders-status.error { border: 1px solid rgba(240,180,91,.28); border-radius: 11px; padding: 12px 14px; background: rgba(240,180,91,.08); color: #f2c887; }
.orders-status.error { border-color: rgba(221,94,84,.28); background: rgba(221,94,84,.08); color: #f2a39d; }
.available-orders { display: grid; gap: 13px; }
.delivery-order-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; padding: 18px; background: linear-gradient(145deg,var(--surface-2),var(--surface)); }
.delivery-order-card > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.delivery-order-card > header span, .delivery-order-card > header b { min-width: 0; display: grid; gap: 2px; }
.delivery-order-card > header strong { overflow-wrap: anywhere; color: var(--orange); font-family: var(--display); font-size: 1.35rem; letter-spacing: .02em; }
.delivery-order-card > header b { flex: 0 0 auto; color: var(--text); font-size: 1rem; text-align: right; }
.delivery-order-card small { color: var(--muted); font-size: .57rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.order-detail { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 11px; padding-top: 14px; }
.order-detail svg { margin-top: 2px; color: var(--orange); }
.order-detail span { min-width: 0; display: grid; gap: 3px; }
.order-detail strong { overflow-wrap: anywhere; font-size: .75rem; line-height: 1.45; }
.delivery-order-card .accept-order { width: 100%; margin-top: 17px; }
.assignment-state { display: flex; align-items: center; gap: 10px; margin-top: 17px; border-radius: 10px; padding: 11px 13px; background: rgba(105,200,117,.09); color: var(--success); font-size: .68rem; font-weight: 850; }
.assignment-state .status-dot { width: 10px; height: 10px; background: var(--success); box-shadow: 0 0 0 5px rgba(105,200,117,.1); }
.assignment-state.pending { border: 1px solid rgba(240,180,91,.28); background: rgba(240,180,91,.08); color: #f2c887; line-height: 1.45; }
.assignment-state.pending .status-dot { background: #f2c887; box-shadow: 0 0 0 5px rgba(240,180,91,.1); }
.orders-empty { min-height: 190px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; border: 1px dashed var(--line); border-radius: 17px; padding: 28px; color: var(--muted); text-align: center; }
.orders-empty svg { width: 34px; height: 34px; margin-bottom: 5px; color: var(--orange); }
.orders-empty b { color: var(--text); font-size: .82rem; }
.orders-empty span { font-size: .67rem; }
.profile-card, .courier-list-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.profile-card { padding: 20px; }
.profile-card > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.profile-card h2 { margin: 0; font-family: var(--display); font-size: 2rem; text-transform: uppercase; }
.profile-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.profile-card dl div { min-width: 0; padding: 14px; background: var(--surface-2); }
.profile-card dt { color: var(--muted); font-size: .62rem; }
.profile-card dd { overflow-wrap: anywhere; margin: 4px 0 0; font-size: .78rem; font-weight: 800; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: clamp(2.6rem,7vw,4.5rem); line-height: .9; text-transform: uppercase; }
.page-head p:last-child { margin: 10px 0 0; color: var(--muted); }
.admin-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.admin-metrics article { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: var(--surface); }
.admin-metrics small { color: var(--muted); font-size: .68rem; }
.admin-metrics strong { font-family: var(--display); font-size: 2rem; }
.courier-list-panel { overflow: hidden; }
.list-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px; }
.list-toolbar label { min-width: 0; flex: 1; display: grid; gap: 6px; color: var(--muted); font-size: .62rem; }
.list-toolbar input { width: min(420px,100%); height: 43px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; outline: 0; background: var(--surface-2); }
.courier-list { display: grid; }
.delivery-admin-overview { display: grid; gap: 16px; margin-top: 22px; }
.zenvia-status { display: flex; align-items: center; gap: 11px; border: 1px solid rgba(240,180,91,.28); border-radius: 13px; padding: 12px 14px; background: rgba(240,180,91,.08); color: #f2c887; }
.zenvia-status.ready { border-color: rgba(105,200,117,.25); background: rgba(105,200,117,.08); color: var(--success); }
.zenvia-status .status-dot { width: 9px; height: 9px; flex: 0 0 auto; background: currentColor; box-shadow: 0 0 0 5px currentColor; opacity: .8; }
.zenvia-status span:last-child { display: grid; gap: 2px; }
.zenvia-status b { font-size: .75rem; }
.zenvia-status small { color: var(--muted); font-size: .65rem; }
.delivery-overview-head h2, .delivery-fee-report h3 { margin: 0; font-family: var(--display); text-transform: uppercase; }
.delivery-overview-head h2 { font-size: clamp(2rem,5vw,3rem); }
.delivery-overview-head p:last-child, .delivery-fee-report header p:last-child { margin: 7px 0 0; color: var(--muted); font-size: .72rem; }
.delivery-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.delivery-overview-card, .delivery-fee-report { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.delivery-overview-card > header, .delivery-fee-report > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 17px; }
.delivery-overview-card h3, .delivery-fee-report h3 { font-size: 1.15rem; }
.delivery-overview-card > header > b { color: var(--orange); font-family: var(--display); font-size: 1.8rem; }
.delivery-overview-row { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.delivery-overview-row:last-child { border-bottom: 0; }
.delivery-overview-row > span:not(.courier-avatar) { min-width: 0; flex: 1; display: grid; gap: 3px; }
.delivery-overview-row b { overflow-wrap: anywhere; font-size: .78rem; }
.delivery-overview-row small { color: var(--muted); font-size: .63rem; overflow-wrap: anywhere; }
.delivery-overview-row > strong { color: var(--orange); font-size: .78rem; white-space: nowrap; }
.delivery-overview-row .courier-status { margin-left: auto; }
.delivery-overview-empty { margin: 0; padding: 20px 16px; color: var(--muted); font-size: .7rem; }
.delivery-fee-report > header > strong { color: var(--orange); font-family: var(--display); font-size: 1.8rem; white-space: nowrap; }
.delivery-period-filter { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 16px 0; }
.delivery-period-filter button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: var(--surface-2); color: var(--muted); font-size: .65rem; font-weight: 800; }
.delivery-period-filter button[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.delivery-fee-chart { display: grid; gap: 13px; padding: 18px 16px; }
.delivery-fee-bar { display: grid; gap: 7px; }
.delivery-fee-bar > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.delivery-fee-bar b { font-size: .76rem; }
.delivery-fee-bar span { color: var(--muted); font-size: .63rem; text-align: right; }
.delivery-fee-bar > i { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.delivery-fee-bar > i > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f08b32,var(--orange)); }
.delivery-export { margin-left: auto; border: 1px solid rgba(242,107,33,.45) !important; background: var(--orange-soft) !important; color: var(--orange) !important; }
.delivery-performance > header, .delivery-history > header { align-items: start; }
.delivery-performance > header p:last-child, .delivery-history > header p:last-child { margin: 6px 0 0; color: var(--muted); font-size: .65rem; }
.delivery-performance-row { display: grid; grid-template-columns: minmax(120px,1.2fr) repeat(3,minmax(75px,.8fr)) minmax(85px,.8fr); align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.delivery-performance-row:last-child { border-bottom: 0; }
.delivery-performance-row b { overflow-wrap: anywhere; font-size: .74rem; }
.delivery-performance-row span { color: var(--muted); font-size: .61rem; }
.delivery-performance-row strong { color: var(--orange); font-size: .7rem; white-space: nowrap; }
.delivery-history-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.delivery-history-row:last-child { border-bottom: 0; }
.delivery-history-row > span { min-width: 0; display: grid; gap: 4px; }
.delivery-history-row b { font-size: .75rem; }
.delivery-history-row small { color: var(--muted); font-size: .61rem; }
.delivery-history-status { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; background: rgba(165,151,140,.1); color: var(--muted); font-size: .57rem; font-style: normal; font-weight: 900; }
.delivery-history-status.received { background: rgba(240,180,91,.12); color: #f2c887; }
.delivery-history-status.delivered { background: rgba(105,200,117,.12); color: var(--success); }
.courier-row { min-width: 0; display: grid; grid-template-columns: minmax(190px,1.3fr) minmax(160px,1fr) minmax(135px,.7fr) auto; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.courier-row:last-child { border-bottom: 0; }
.courier-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.courier-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--orange-soft); color: var(--orange); font-size: .68rem; font-weight: 900; }
.courier-identity span, .courier-contact, .courier-vehicle { min-width: 0; display: grid; }
.courier-row b { overflow-wrap: anywhere; font-size: .76rem; }
.courier-row small { overflow-wrap: anywhere; color: var(--muted); font-size: .63rem; }
.courier-status { width: fit-content; margin-top: 5px; border-radius: 999px; padding: 4px 8px; background: rgba(165,151,140,.1); color: var(--muted); font-size: .56rem; font-style: normal; font-weight: 900; }
.courier-status.active { background: rgba(105,200,117,.12); color: var(--success); }
.courier-status.blocked { background: rgba(221,94,84,.1); color: #ee8a82; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.row-actions button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.row-actions button.danger { color: #ee8a82; }
.empty-state { padding: 46px 20px; color: var(--muted); text-align: center; }

.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; opacity: 0; visibility: hidden; transition: .2s ease; }
.modal.open { opacity: 1; visibility: visible; }
.modal-scrim { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(8px); }
.modal-card { width: min(600px,100%); max-height: min(800px,90dvh); position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.55); transform: translateY(12px); transition: .2s ease; }
.modal.open .modal-card { transform: none; }
.modal-card > header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 16px 20px; }
.modal-card h2 { margin: 0; font-family: var(--display); font-size: 2rem; text-transform: uppercase; }
.modal-close { width: 43px; height: 43px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 1.6rem; }
.modal-body { max-height: calc(90dvh - 82px); overflow-y: auto; padding: 20px; }
.editor-form { display: grid; gap: 16px; }
.editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.editor-grid .wide { grid-column: 1 / -1; }
.editor-check { min-height: 48px; display: flex !important; grid-template-columns: auto 1fr; align-items: center; grid-auto-flow: column; justify-content: start; gap: 9px !important; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; background: var(--surface-2); }
.editor-check input { width: 18px; height: 18px; accent-color: var(--orange); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 3px; }
.danger-button { min-height: 46px; border: 1px solid rgba(221,94,84,.35); border-radius: 11px; background: rgba(221,94,84,.08); color: #ee8a82; font-weight: 850; }
.toast { max-width: min(430px,calc(100% - 28px)); position: fixed; z-index: 130; left: 50%; bottom: max(18px,env(safe-area-inset-bottom)); opacity: 0; visibility: hidden; transform: translate(-50%,12px); border-radius: 11px; padding: 13px 17px; background: #f7efe7; color: #160d08; font-size: .74rem; font-weight: 850; text-align: center; box-shadow: 0 18px 60px rgba(0,0,0,.42); transition: .22s ease; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%,0); }
body.modal-open { overflow: hidden; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 240px; padding: 25px; }
  .auth-message { margin-block: 42px 28px; }
  .auth-message h1 { max-width: 440px; font-size: clamp(3.1rem,12vw,5.2rem); }
  .auth-security { display: none; }
  .auth-panel { min-height: auto; padding: 32px 20px 46px; }
  .courier-row { grid-template-columns: minmax(170px,1.2fr) minmax(150px,1fr) auto; }
  .courier-vehicle { display: none; }
}
@media (max-width: 620px) {
  .brand img { width: 50px; height: 50px; }
  .brand b { font-size: 1rem; }
  .auth-tabs { grid-template-columns: 1fr; }
  .auth-tabs button { min-height: 40px; }
  .form-grid, .editor-grid { grid-template-columns: 1fr; }
  .form-grid .wide, .editor-grid .wide { grid-column: auto; }
  .app-header { min-height: 66px; padding-inline: 14px; }
  .brand.compact b { font-size: .88rem; }
  .header-actions > a { display: none; }
  .courier-main, .admin-main { width: min(100% - 24px,1160px); padding-top: 25px; }
  .welcome-card { align-items: start; gap: 12px; }
  .user-avatar { width: 52px; height: 52px; border-radius: 15px; }
  .availability-card { align-items: stretch; flex-direction: column; padding: 17px; }
  .availability-card button { width: 100%; }
  .courier-tabs { position: sticky; top: 76px; z-index: 15; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
  .courier-tabs button { min-height: 48px; flex-direction: column; gap: 2px; padding: 5px 2px; font-size: .6rem; }
  .courier-tabs button svg { width: 18px; height: 18px; }
  .courier-tabs button b { width: 17px; min-width: 17px; height: 17px; position: absolute; top: 3px; right: max(4px,calc(50% - 27px)); font-size: .5rem; }
  .section-head { align-items: stretch; flex-direction: column; }
  .section-head .secondary-button { width: 100%; }
  .profile-card { padding: 16px; }
  .profile-card > header { align-items: start; flex-direction: column; }
  .profile-card > header button { width: 100%; }
  .profile-card dl { grid-template-columns: 1fr; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .primary-button { width: 100%; }
  .admin-metrics { grid-template-columns: 1fr 1fr; }
  .admin-metrics article:first-child { grid-column: 1 / -1; }
  .delivery-overview-grid { grid-template-columns: 1fr; }
  .delivery-fee-report > header { align-items: stretch; flex-direction: column; }
  .delivery-fee-report > header > strong { font-size: 1.55rem; }
  .delivery-fee-bar > div { align-items: start; flex-direction: column; gap: 3px; }
  .delivery-fee-bar span { text-align: left; }
  .delivery-export { width: 100%; margin-left: 0; }
  .delivery-performance-row { grid-template-columns: 1fr 1fr; gap: 7px; }
  .delivery-performance-row b { grid-column: 1 / -1; }
  .delivery-performance-row strong { text-align: right; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .list-toolbar input { width: 100%; }
  .courier-row { grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
  .courier-contact, .courier-vehicle { display: none; }
  .row-actions { align-self: center; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .modal-body { max-height: calc(92dvh - 82px); padding: 16px; }
  .modal-actions { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .auth-brand { min-height: 215px; padding: 20px; }
  .auth-panel { padding-inline: 15px; }
  .brand-copy { display: none; }
  .admin-metrics { grid-template-columns: 1fr; }
  .admin-metrics article:first-child { grid-column: auto; }
  .delivery-order-card { padding: 15px; }
  .delivery-order-card > header { align-items: stretch; flex-direction: column; gap: 8px; }
  .delivery-order-card > header b { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
