/* LaLo-BMS – shared design tokens & components */
:root {
  --teal: #0E7C86; --teal-600: #0A6A73; --teal-700: #08565E; --teal-50: #E7F4F5; --teal-100: #CDE9EB;
  --navy: #0B3B45; --navy-2: #0F4955; --navy-3: #16596A;
  --coral: #F26B4F; --coral-600: #DE5638; --coral-50: #FEEEEA;
  --bg: #F6F8F9; --card: #FFFFFF; --line: #E2E8EB; --line-2: #EEF2F4;
  --text: #13262C; --text-2: #46595F; --muted: #7B8C92;
  --free: #16A34A; --busy: #2563EB; --lunch: #F59E0B; --off: #94A3B8; --lost: #DC2626;
  --t-wait: #EA580C; --t-enroute: #2563EB; --t-picked: #7C3AED; --t-done: #16A34A;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 40, 48, .05), 0 2px 8px rgba(16, 40, 48, .04);
  --shadow-lg: 0 10px 30px rgba(11, 59, 69, .16), 0 2px 6px rgba(11, 59, 69, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 13.5px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.42; }
button { font-family: inherit; font-size: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide { display: none !important; }
.sp { flex: 1; }
.b { font-weight: 700; }
.sm { font-size: 12px; }
.xs { font-size: 11px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; background: #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-600); }
.btn.coral { background: var(--coral); color: #fff; }
.btn.coral:hover { background: var(--coral-600); }
.btn.outline { border-color: var(--line); background: #fff; color: var(--text); }
.btn.outline:hover { border-color: #C9D3D7; background: #FAFCFC; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.soft { background: var(--teal-50); color: var(--teal-700); }
.btn.soft:hover { background: var(--teal-100); }
.btn.danger { background: #FEE2E2; color: #B91C1C; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); position: relative; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }

/* pills / chips / badges */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; color: var(--c); background: var(--bg); white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.chip.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip b { font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag.qr { background: #E0F2FE; color: #0369A1; }
.tag.fo { background: #F3E8FF; color: #7E22CE; }
.tag.vip { background: #FEF3C7; color: #A16207; }
.tag.warn { background: #FEE2E2; color: #B91C1C; }
.tag.ok { background: #DCFCE7; color: #15803D; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.av { border-radius: 50%; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; letter-spacing: .02em; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); min-height: 48px; }
.card-h h3 { font-size: 14px; font-weight: 700; }
.card-h .sub { color: var(--muted); font-size: 12px; font-weight: 500; }
.card-b { padding: 14px; }

/* tables */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.tbl tr:hover td { background: #FAFCFC; }
.tbl tr.sel td { background: var(--teal-50); }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; background: #fff; outline: none; width: 100%; }
textarea.input { height: auto; padding: 9px 11px; resize: none; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 124, 134, .12); }
.search { position: relative; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 32px; }
.switch { width: 38px; height: 22px; border-radius: 11px; background: #CBD5DA; position: relative; display: inline-block; flex: none; cursor: pointer; transition: background .2s; border: 0; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .2s; }
.switch.on { background: var(--teal); }
.switch.on::after { left: 19px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 10px; }
.tabs button { white-space: nowrap; border: 0; background: none; height: 38px; padding: 0 10px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.tabs button.on { color: var(--teal); border-bottom-color: var(--teal); }
.tabs button .cnt { background: var(--line-2); color: var(--text-2); border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 18px; }
.tabs button.on .cnt { background: var(--teal-50); color: var(--teal-700); }

/* toasts */
.toasts { position: fixed; right: 18px; top: 72px; display: flex; flex-direction: column; gap: 8px; z-index: 999; pointer-events: none; }
.toast { min-width: 280px; max-width: 360px; background: #0F2E35; color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: tin .3s ease; pointer-events: auto; }
.toast.ok { background: #0F5132; } .toast.warn { background: #7C2D12; } .toast.new { background: #fff; color: var(--text); border-left: 4px solid var(--coral); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .35s; }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* modal & drawer */
.modal-back { position: fixed; inset: 0; background: rgba(9, 32, 38, .42); display: flex; align-items: center; justify-content: center; z-index: 500; animation: fade .2s; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 560px; max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); overflow: auto; }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); gap: 10px; }
.modal-h h3 { font-size: 16px; }
.modal-b { padding: 18px 20px; display: grid; gap: 14px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }

/* map */
.rmap { position: relative; overflow: hidden; background: #E7DCC4; }
.rmap .poim, .rmap .stopm, .rmap .zonem, .rmap .parkm { cursor: pointer; }
.rmap .poim:hover circle, .rmap .stopm:hover rect { filter: brightness(1.08) drop-shadow(0 0 2px rgba(0,0,0,.35)); }
.rm-focus { position: absolute; right: 10px; top: 120px; height: 28px; padding: 0 10px; border: 0; border-radius: 14px; background: #0B3B45; color: #fff; font-size: 12px; font-weight: 700; box-shadow: var(--shadow-lg); display: none; }
.rm-focus.on { display: block; }
.rm-march-slow { animation: march 2.4s linear infinite; }
.mk-pulse { animation: mkpulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mkpulse { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.9); opacity: 0; } }
.shot .rm-march-slow, .shot .mk-pulse { animation: none; }
.rmap-svg { width: 100%; height: 100%; display: block; user-select: none; font-family: var(--font); }
.rmap .bm { cursor: pointer; }
.rm-ctrl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); overflow: hidden; }
.rm-ctrl button { width: 32px; height: 32px; border: 0; background: #fff; font-size: 17px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.rm-ctrl button:last-child { border-bottom: 0; font-size: 14px; }
.rm-ctrl button:hover { background: var(--line-2); }
.rm-march { animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -40; } }
.bm-pulse { animation: bpulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bpulse { 0%, 100% { opacity: .05; } 50% { opacity: .28; } }
.shot .rm-march, .shot .bm-pulse { animation: none; }

/* phone frame */
.phone { width: 414px; height: 868px; border-radius: 58px; background: #0E1416; padding: 12px; box-shadow: 0 0 0 2px #2A3438, 0 30px 60px rgba(11, 40, 48, .28), 0 8px 18px rgba(11, 40, 48, .18); position: relative; flex: none; }
.phone::before { content: ""; position: absolute; right: -3px; top: 190px; width: 3px; height: 70px; border-radius: 0 3px 3px 0; background: #2A3438; }
.phone .scr { width: 390px; height: 844px; border-radius: 46px; overflow: hidden; background: #fff; position: relative; display: flex; flex-direction: column; isolation: isolate; }
.phone .cam { position: absolute; top: 12px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #05080A; z-index: 50; box-shadow: inset 0 0 0 2px #1B2428; }
.phone.ios .cam { width: 120px; height: 34px; margin-left: -60px; top: 11px; border-radius: 20px; background: #000; box-shadow: none; }
.sb { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-weight: 600; font-size: 15px; flex: none; position: relative; z-index: 40; color: #0B1F24; }
.sb.dark { color: #fff; }
.sb-r { display: flex; align-items: center; gap: 6px; }
.sb-off { font-size: 11px; font-weight: 700; color: #DC2626; margin-right: 2px; }
.home-ind { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(0, 0, 0, .78); z-index: 60; }
.home-ind.light { background: rgba(255, 255, 255, .85); }

/* stage for single-phone pages */
.phone-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 40px; padding: 16px; }
.phone-holder { transform-origin: center center; }
.screens-nav { width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); align-self: center; }
.screens-nav h2 { font-size: 16px; }
.screens-nav .sub { font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.screens-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.screens-nav a:hover { background: var(--line-2); }
.screens-nav a.on { background: var(--teal-50); color: var(--teal-700); }
.screens-nav .num { width: 20px; height: 20px; border-radius: 6px; background: var(--line-2); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.screens-nav a.on .num { background: var(--teal); color: #fff; }
.screens-nav .back { display: inline-flex; margin-bottom: 10px; font-size: 12px; color: var(--teal); font-weight: 600; padding: 0; }
@media (max-width: 760px) { .screens-nav { display: none; } .phone-stage { padding: 0; } }
html.bare body { background: transparent; }
html.bare .screens-nav { display: none; }
html.bare .phone-stage { padding: 0; min-height: 0; display: block; }

/* gallery */
.gallery { min-height: 100vh; padding: 34px 40px 20px; background: linear-gradient(180deg, #F3F7F8, #E6EFF1); display: flex; flex-direction: column; }
.gallery .gallery-row { flex: 1; align-items: center; padding-bottom: 30px; }
.gallery-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.gallery-h h1 { font-size: 26px; color: var(--navy); }
.gallery-h p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.gallery-row { display: flex; justify-content: center; gap: 22px; }
.gallery-item { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gallery-frame { overflow: hidden; border-radius: 46px; }
.gallery-frame iframe { border: 0; width: 414px; height: 868px; transform-origin: 0 0; display: block; background: transparent; }
.gallery-cap { font-weight: 700; color: var(--navy); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.gallery-cap .n { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.gallery-cap small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

/* brand mark */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #12A3AE, #0E7C86); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 2px 6px rgba(14, 124, 134, .35); flex: none; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.01em; line-height: 1.1; }
.brand-name small { display: block; font-size: 10.5px; font-weight: 600; opacity: .7; letter-spacing: .02em; }

/* scrollbars */
.scroll { overflow: auto; }
.scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-thumb { background: #D5DEE1; border-radius: 4px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
