:root {
  --blue: #1463ff;
  --ink: #121316;
  --muted: #66717d;
  --line: #e2e7ec;
  --panel: #fff;
  --wash: #f1f4f7;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #e9edf1;
}
.dashboard-card-top .avatar { width:32px; height:32px; font-size:11px; }
.dashboard-tags { display:flex; flex-wrap:wrap; gap:5px; }
.dashboard-tags>span { background:#edf1f5; color:#465460; border-radius:6px; padding:4px 6px; font-size:10px; font-weight:800; text-transform:uppercase; }
.overdue-section { border:2px solid #c83e36; border-radius:12px; padding:12px; margin-bottom:20px; background:#fff4f3; }
.overdue-section h3 { color:#a4211b; margin-top:0; }
.overdue-label { color:#a4211b!important; font-weight:800; }

.balance-due, .schedule-main .balance-due { display:block; width:fit-content; padding:5px 8px; margin-block:5px; border-radius:7px; background:#fff0dc; color:#9b3500; font-size:13px; font-weight:800; white-space:normal; }
.nav-item.dashboard-nav { display:none; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr); gap:16px; }
.dashboard-column { min-width:0; }
.dashboard-column h2 { font-size:21px; margin:0 0 14px; }
.dashboard-column h3 { font-size:14px; background:#edf1f5; padding:10px; border-radius:6px; }
.dashboard-card { width:100%; text-align:left; display:grid; gap:7px; padding:13px; margin-bottom:9px; border:1px solid var(--line); border-radius:12px; background:white; cursor:pointer; }
.dashboard-card-top { display:flex; justify-content:space-between; gap:7px; }
.dashboard-card-top strong { overflow-wrap:anywhere; }
.dashboard-card-top b { white-space:nowrap; }
.dashboard-card>span:not(:first-child), .dashboard-card small { font-size:12px; color:#53606b; }
.dashboard-card .balance-due { color:#9b3500!important; }
.dashboard-empty, .dashboard-hide { font-size:12px; color:#53606b; }
.dashboard-hide { display:flex; gap:6px; align-items:center; min-height:32px; }
.dashboard-column:last-child .dashboard-card { padding:10px; font-size:13px; }
@media (min-width:768px), (min-width:560px) and (orientation:landscape) {
  body .app-shell, body .bottom-nav, body.locations-mode .app-shell, body.locations-mode .bottom-nav { width:min(100%,1400px); }
  body .bottom-nav { grid-template-columns:repeat(6,1fr); }
  .nav-item.dashboard-nav { display:flex; }
  body .detail-sheet { width:min(92%,850px); }
  body .screen { padding-inline:26px; }
}
@media (max-width:850px) {
  .dashboard-grid { gap:8px; }
  .dashboard-column h2 { font-size:17px; }
  .dashboard-card { padding:9px; font-size:13px; }
  .dashboard-card-top { flex-direction:column; }
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: #e9edf1; }
body.sheet-open { overflow: hidden; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(20, 99, 255, .35); outline-offset: 2px; }

.app-shell {
  width: min(100%, 500px); min-height: 100vh; margin: 0 auto; background: var(--panel);
  padding-bottom: calc(82px + env(safe-area-inset-bottom)); box-shadow: 0 0 40px rgba(24, 36, 50, .08);
}
.app-header {
  height: 72px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.95); backdrop-filter: blur(16px);
}
.brand-logo { display: block; width: 184px; height: auto; }
.icon-button, .close-button {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center;
  background: white; color: var(--ink); cursor: pointer;
}
.icon-button svg, .nav-item svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.refreshing svg { animation: spin .5s linear infinite; }

.screen { padding: 26px 18px 30px; }
.title-row { display: flex; justify-content: space-between; align-items: end; margin: 0 2px 20px; gap: 16px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; line-height: 1.05; }
.count-pill { flex: none; padding: 7px 10px; border-radius: 99px; background: #edf4ff; color: #0849cb; font-size: 12px; font-weight: 800; }
.prototype-note, .live-note { margin: -4px 2px 18px; display: flex; align-items: center; gap: 8px; color: #5c6874; font-size: 12px; }
.prototype-note span, .live-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.order-list { display: grid; gap: 10px; }
.order-card {
  width: 100%; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 16px;
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px; text-align: left;
  box-shadow: 0 5px 20px rgba(24, 36, 50, .045); cursor: pointer;
}
.order-card:active, .schedule-card:active { transform: scale(.995); background: #fafcff; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 800; flex: none; }
.avatar-blue { background: #2f73ef; }.avatar-orange { background: #ef7d20; }.avatar-green { background: #21b783; }
.avatar-purple { background: #983bc1; }.avatar-teal { background: #12a995; }.avatar-pink { background: #db4c87; }.avatar-yellow { background: #c3cc1b; color: #101317; }
.order-main { min-width: 0; display: grid; gap: 4px; }
.order-main strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main span { color: #465460; font-size: 13px; }
.order-main small { color: var(--blue); font-size: 12px; font-weight: 750; }
.order-main .order-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.order-main .order-tags > span { max-width: 100%; padding: 3px 7px; border-radius: 99px; background: #eef2f6; color: #465460; font-size: 10px; font-weight: 800; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.order-side { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; align-items: end; gap: 8px; }
.order-side strong { font-size: 14px; }.order-side b { font-size: 16px; color: #0b4dcc; }

.segments { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; margin-bottom: 16px; background: var(--wash); border-radius: 14px; }
.segment { border: 0; border-radius: 11px; padding: 10px 6px; color: #53606b; background: transparent; font-size: 13px; font-weight: 750; cursor: pointer; }
.segment.active { color: var(--blue); background: white; box-shadow: 0 2px 8px rgba(24, 36, 50, .08); }
.completion-toggle { position: relative; margin: -4px 2px 14px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #465460; font-size: 13px; font-weight: 750; cursor: pointer; }
.completion-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { width: 42px; height: 24px; border-radius: 99px; padding: 3px; background: #ccd3da; transition: background .18s ease; }
.switch-track > span { display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: transform .18s ease; }
.completion-toggle input:checked + .switch-track { background: var(--blue); }
.completion-toggle input:checked + .switch-track > span { transform: translateX(18px); }
.completion-toggle input:focus-visible + .switch-track { outline: 3px solid rgba(20,99,255,.28); outline-offset: 2px; }
.date-band { margin: 0 -18px; padding: 10px 20px; display: flex; gap: 6px; background: #eaf0f4; color: #41515c; border-top: 1px solid #d6dee4; border-bottom: 1px solid #d6dee4; }
.date-band strong, .date-band span { font-size: 14px; }
.schedule-list { margin: 0 -18px; }
.schedule-card {
  border: 0; border-bottom: 1px solid var(--line); width: 100%; padding: 21px 20px; background: white; text-align: left;
  display: grid; grid-template-columns: 70px 46px minmax(0,1fr) auto; gap: 12px; align-items: center; cursor: pointer;
}
.schedule-card time { font-size: 15px; font-weight: 800; white-space: nowrap; }
.schedule-card > b { font-size: 15px; }
.schedule-main { min-width: 0; display: grid; gap: 4px; }
.schedule-main strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-main span { color: #4b5b67; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-main small { color: var(--blue); font-size: 12px; font-weight: 800; }
.empty-state { margin-top: 52px; text-align: center; display: grid; gap: 7px; color: var(--muted); }
.empty-state strong { color: var(--ink); }

.bottom-nav {
  position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 500px);
  height: calc(72px + env(safe-area-inset-bottom)); padding: 8px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(16px);
}
.nav-item { border: 0; border-radius: 14px; background: transparent; color: #65717c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 750; cursor: pointer; }
.nav-item.active { color: var(--blue); background: #edf4ff; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(7, 12, 18, .48); backdrop-filter: blur(2px); }
.detail-sheet {
  position: fixed; z-index: 21; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 500px); max-height: 91vh;
  overflow: auto; background: white; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; box-shadow: 0 -18px 50px rgba(0,0,0,.18);
}
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: #d6dce2; margin: 0 auto 12px; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; }
.sheet-header h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.close-button { font-size: 28px; line-height: 1; }
.status-row { display: flex; justify-content: space-between; align-items: center; background: #edf4ff; color: #0a4dcc; padding: 13px 15px; border-radius: 14px; }
.status-row span { font-size: 13px; font-weight: 800; }.status-row strong { font-size: 19px; }
.detail-section { padding: 20px 2px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.detail-section h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.detail-section > strong { font-size: 18px; }.detail-section a { width: max-content; color: #124fae; text-decoration: none; }
.detail-section p { margin: 0; color: #465460; line-height: 1.45; }
.detail-section dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-section dl div { display: grid; gap: 5px; }.detail-section dt { color: var(--muted); font-size: 12px; font-weight: 750; }
.detail-section dd { margin: 0; font-size: 14px; line-height: 1.45; }
.item-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.item-list li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }.item-list b { color: var(--blue); }
.value-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 36px); padding: 9px 10px 9px 16px; border-radius: 99px; background: #111820; color: white; font-size: 13px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: flex; align-items: center; gap: 12px; }
.toast button { border: 0; border-radius: 99px; padding: 7px 11px; background: white; color: #111820; font-weight: 850; cursor: pointer; }
.header-actions { display: flex; gap: 7px; }
.header-actions form { margin: 0; }
.icon-button:disabled { cursor: wait; opacity: .65; }

.loading-list { display: grid; gap: 10px; }
.loading-list span { height: 80px; border-radius: 18px; background: linear-gradient(90deg, #f0f3f6 25%, #fafbfc 45%, #f0f3f6 65%); background-size: 250% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.error-state { margin: 52px auto 0; max-width: 310px; text-align: center; display: grid; gap: 8px; color: var(--muted); }
.error-state strong { color: var(--ink); }
.error-state button { justify-self: center; margin-top: 10px; border: 0; border-radius: 12px; background: var(--blue); color: white; padding: 11px 18px; font-weight: 800; cursor: pointer; }
.error-state.compact { margin: 24px auto; }
.detail-loading { margin: 24px 0; color: var(--muted); text-align: center; }

.login-page { display: grid; place-items: center; padding: 24px; background: #eef2f5; }
.login-shell { width: min(100%, 420px); }
.login-logo { display: block; width: min(260px, 72%); height: auto; margin: 0 auto 30px; }
.login-card { background: white; padding: 28px; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 20px 60px rgba(24,36,50,.1); }
.login-card h1 { font-size: 32px; }
.login-intro { margin: 10px 0 24px; color: var(--muted); line-height: 1.45; }
.login-error { padding: 11px 13px; border-radius: 12px; background: #fff0f0; color: #a21414; font-size: 13px; }
.login-form { display: grid; gap: 9px; }
.login-form label { font-size: 13px; font-weight: 800; }
.login-form input { width: 100%; border: 1px solid #cfd6dd; border-radius: 13px; padding: 13px 14px; font: inherit; }
.login-form input:focus { border-color: var(--blue); outline: 3px solid rgba(20,99,255,.16); }
.login-form button { margin-top: 7px; border: 0; border-radius: 13px; padding: 13px; background: var(--blue); color: white; font-weight: 850; cursor: pointer; }
.primary-link { display: block; border-radius: 13px; padding: 13px; background: var(--blue); color: white; font-weight: 850; text-align: center; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

body.locations-mode .app-shell, body.locations-mode .bottom-nav { width: min(100%, 820px); }
.inventory-search { height: 52px; margin-bottom: 12px; padding: 0 15px; display: flex; align-items: center; gap: 10px; border: 1px solid #cfd7df; border-radius: 15px; background: white; }
.inventory-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,99,255,.13); }
.inventory-search svg { width: 21px; flex: none; fill: none; stroke: #66717d; stroke-width: 2; stroke-linecap: round; }
.inventory-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.location-segments { grid-template-columns: repeat(3, 1fr); }
.product-list { display: grid; gap: 10px; }
.product-card { width: 100%; min-height: 78px; padding: 12px 13px; display: grid; grid-template-columns: 46px minmax(0,1fr) auto 18px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 17px; background: white; text-align: left; box-shadow: 0 5px 20px rgba(24,36,50,.04); cursor: pointer; }
.product-card:active { transform: scale(.995); background: #fafcff; }
.product-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: #111820; color: white; font-size: 18px; font-weight: 900; }
.product-main { min-width: 0; display: grid; gap: 4px; }
.product-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.product-main small, .product-sku { margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.product-chevron { width: 18px; fill: none; stroke: #9aa5af; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.location-badge { min-width: 43px; padding: 8px 9px; border: 2px solid color-mix(in srgb, var(--location-color) 80%, #000); border-radius: 11px; background: color-mix(in srgb, var(--location-color) 82%, white); color: #101317; font-size: 13px; font-weight: 900; text-align: center; }
.location-badge.unassigned { border: 1px solid #d6dde4; background: #eef2f5; color: #66717d; font-size: 10px; }
.current-location { margin-bottom: 16px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; border-radius: 14px; background: #f1f4f7; color: var(--muted); font-size: 12px; font-weight: 800; }
.location-picker { display: grid; gap: 14px; padding-bottom: 96px; }
.location-area { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; }
.location-area > header { min-height: 54px; padding: 10px 13px; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--area-color) 72%, white); }
.location-area > header span { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid rgba(0,0,0,.7); border-radius: 8px; font-weight: 950; }
.location-area > header strong { font-size: 15px; }
.location-options { display: grid; }
.location-option { padding: 12px 13px; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 10px; border: 0; border-top: 1px solid var(--line); background: white; color: var(--ink); text-align: left; cursor: pointer; }
.location-option:first-child { border-top: 0; }
.location-option strong { width: 40px; height: 36px; display: grid; place-items: center; border: 2px solid var(--area-color); border-radius: 9px; background: color-mix(in srgb, var(--area-color) 22%, white); font-size: 14px; }
.location-option span { color: #52606b; font-size: 12px; line-height: 1.35; }
.location-option.selected { background: color-mix(in srgb, var(--area-color) 12%, white); box-shadow: inset 4px 0 var(--area-color); }
.location-option.selected strong { background: var(--area-color); }
.location-confirm { position: fixed; z-index: 22; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%,500px); margin: 0; padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.location-confirm span { font-size: 12px; line-height: 1.35; }
.location-confirm button { border: 0; border-radius: 12px; padding: 12px 14px; background: var(--blue); color: white; font-size: 13px; font-weight: 850; cursor: pointer; }
.location-confirm button:disabled { opacity: .65; cursor: wait; }
[hidden] { display: none !important; }
.map-sheet { width: min(96%, 960px) !important; }
.premises-overview { display: block; width: 100%; height: auto; }
.map-hotspot { fill: transparent; stroke: transparent; stroke-width: 6; cursor: pointer; }
.map-hotspot:hover, .map-hotspot:focus { fill: #1463ff22; stroke: #1463ff; outline: none; }
.room-map-frame { --card: #fff; --foreground: #121316; --muted-foreground: #647080; --red: #D96F91; --blue: #4E91CF; --green: #63AD78; --yellow: #E8B82E; --orange: #F29A38; max-width: 700px; margin: auto; }
.room-map-frame .map-clickable-label { pointer-events: auto !important; cursor: pointer; text-decoration: underline; font-weight: 800 !important; }
.room-map-frame { --border: #b8c4cf; --muted: #edf0f3; --secondary: #edf0f3; --viz-series-3: #F29A38; --viz-series-4: #63AD78; }
.map-code-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.map-code-buttons button { min-width: 48px; min-height: 48px; padding: 10px; border-radius: 10px; border: 1px solid #bac7d4; background: #edf4ff; font: inherit; cursor: pointer; }
.map-code-buttons button[aria-pressed="true"] { background: #1463ff; color: white; }
#map-zone-details { padding: 12px 0 24px; line-height: 1.5; }
.empty-day { padding: 20px 2px; margin: 0; color: var(--muted); font-size: 14px; }
.packing-open { width: 100%; padding: 13px; margin: 12px 0 18px; border: 1px solid var(--line); border-radius: 12px; background: #edf4ff; color: #124fae; font-weight: 800; cursor: pointer; }
.packing-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.packing-list h3 { padding: 12px; background: #edf4ff; border-radius: 8px; font-size: 15px; }
.packing-row { display: flex; gap: 14px; align-items: center; padding: 18px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.packing-row input { width: 24px; height: 24px; flex: none; accent-color: var(--blue); }
.packing-row span { display: grid; gap: 7px; overflow-wrap: anywhere; }
.packing-row small { color: #52606b; font-size: 14px; }
.packing-row:has(input:checked) { background: #edf8ef; }
.location-editor { padding: 14px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 10px; margin-bottom: 16px; scroll-margin-top: 12px; }
.location-editor input { width: 100%; padding: 12px; font: inherit; border: 1px solid #aebac6; border-radius: 8px; }
.location-editor small, .location-suggestion small { color: var(--muted); line-height: 1.5; }
.location-editor > button, .location-suggestion button { padding: 12px; border: 1px solid var(--line); background: #eef4ff; border-radius: 8px; cursor: pointer; }
body.locations-mode .location-editor .location-confirm { position: static; transform: none; width: 100%; padding: 12px 0 0; grid-template-columns: 1fr; }
.location-confirm strong { overflow-wrap: anywhere; }
.location-picker { padding-bottom: 24px; }
.location-area:nth-child(1) { --area-color: #F29A38; }
.location-area:nth-child(2) { --area-color: #63AD78; }
.location-area:nth-child(3) { --area-color: #E8B82E; }
.location-area:nth-child(4) { --area-color: #4E91CF; }
.location-area:nth-child(5) { --area-color: #4F7FCB; }
.location-area:nth-child(6) { --area-color: #D96F91; }
.location-area > summary { padding: 18px; min-height: 54px; cursor: pointer; font-weight: 800; background: var(--area-color); }
.location-suggestion { padding: 12px; background: #edf4ff; border-radius: 12px; margin-bottom: 14px; }
.location-suggestion summary { cursor: pointer; font-weight: 700; }
.location-suggestion small { display: block; margin-top: 10px; }
.location-badge { max-width: 130px; overflow-wrap: anywhere; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -160% 0; } }
@media (max-width: 380px) {
  .brand-logo { width: 166px; }.order-card { padding: 14px 12px; grid-template-columns: 42px minmax(0,1fr) auto; gap: 10px; }
  .avatar { width: 42px; height: 42px; }.schedule-card { grid-template-columns: 63px 42px minmax(0,1fr) auto; gap: 9px; padding-inline: 13px; }
  .schedule-card > b { font-size: 14px; }h1 { font-size: 29px; }
}
@media (min-width: 640px) {
  body.locations-mode .screen { padding-inline: 24px; }
  .product-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.locations-mode .detail-sheet { width: min(100%, 680px); }
  body.locations-mode .location-confirm { width: min(100%, 680px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; } }
.nav-item { position: relative; min-width: 0; }
.nav-item > span { font-size: 11px; }
.nav-item .todo-badge { position: absolute; top: 0; right: 12%; background: #c82232; color: white; border-radius: 20px; min-width: 20px; padding: 2px 5px; font-size: 11px; font-weight: 800; }
.todo-badge[hidden] { display: none; }
.todo-list { border-top: 1px solid #e1e4e8; }
.todo-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e1e4e8; padding: 12px 0; }
.todo-row > input { width: 26px; height: 26px; flex-shrink: 0; accent-color: #1459cb; cursor: pointer; }
.todo-text { flex: 1; min-width: 0; background: transparent; border: 0; text-align: left; padding: 8px 0; color: inherit; font: inherit; overflow-wrap: anywhere; white-space: pre-wrap; }
.todo-text small { display: block; margin-top: 5px; }
.todo-tag { display: inline-block; background: #edf3ff; color: #174b94; border-radius: 8px; padding: 3px 6px; font-size: 12px; }
.todo-done .todo-text > span { text-decoration: line-through; color: #69727b; }
.todo-moves { display: flex; flex-direction: column; }
.todo-moves button, #todo-sort { min-height: 44px; min-width: 44px; border: 1px solid #dce1e7; border-radius: 8px; background: white; color: #1459cb; padding: 8px; }
.todo-moves button:disabled { opacity: .3; }
.todo-completed-heading { font-size: 18px; margin-top: 28px; }
#todo-text { width: 100%; box-sizing: border-box; font: inherit; border: 1px solid #ccd3db; border-radius: 10px; margin: 10px 0 20px; padding: 12px; }
#todo-staff { border: 1px solid #e1e4e8; border-radius: 10px; max-height: 240px; overflow-y: auto; }
.todo-staff-option { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.todo-staff-option input { width: 22px; height: 22px; }
#todo-submit { position: sticky; bottom: 0; background: #1459cb; color: white; }
.todo-editor-columns { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.todo-editor-task, #todo-staff { min-width:0; }
#todo-text { font-size:16px; }
#todo-staff { margin:0; }
.todo-staff-option { overflow-wrap:anywhere; }
.todo-staff-option input { flex-shrink:0; }
@media (min-width:768px) {
  .todo-editor-columns { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); align-items:start; }
  #todo-text { margin:8px 0 0; min-height:140px; }
  #todo-staff { max-height:220px; }
}
