/* LaLo-BMS – Web Admin / FO console */
body.admin { overflow: hidden; height: 100vh; }
.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.embed .app { grid-template-columns: 1fr; }
.side { background: var(--navy); color: #CFE3E6; display: flex; flex-direction: column; min-height: 0; }
.embed .side { display: none; }
.side .brand { padding: 16px 16px 14px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.side nav { padding: 8px 10px; flex: 1; overflow: auto; }
.side .grp { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: #6FA3AB; padding: 12px 10px 5px; }
.side a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: #C4DADD; font-weight: 600; font-size: 13px; margin-bottom: 1px; }
.side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side a.on { background: var(--teal); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.side a .badge { margin-left: auto; }
.side .me { margin: 10px; padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 10px; color: #fff; }
.side .me small { display: block; color: #8FB9BF; font-size: 11px; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: 60px; flex: none; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.top h1 { font-size: 18px; }
.top .crumb { font-size: 12px; color: var(--muted); }
.top .clock { font-size: 15px; font-weight: 700; color: var(--navy); }
.top .live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #15803D; background: #F0FDF4; border: 1px solid #BBF7D0; height: 28px; padding: 0 10px; border-radius: 14px; }
.top .live i { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); }
.top .shiftc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--line-2); height: 28px; padding: 0 10px; border-radius: 14px; }
.top .icon-btn .badge { position: absolute; top: -5px; right: -6px; }
.top .user { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid var(--line); }
.top .user b { display: block; font-size: 13px; }
.top .user small { color: var(--muted); font-size: 11px; }
.embed .top { height: 48px; padding: 0 12px; }
.embed .top h1 { font-size: 15px; }
.page { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; }
.page.fixed { overflow: hidden; }
.embed .page { padding: 10px; }

/* KPI tiles */
.kpis { display: grid; gap: 12px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .lbl { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .lbl .ic { color: var(--teal); }
.kpi .val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.15; }
.kpi .val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi .delta { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.kpi .delta.up { color: #15803D; } .kpi .delta.dn { color: #B91C1C; }

/* dashboard */
.dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.dash .kpis { grid-column: 1 / -1; grid-template-columns: repeat(5, 1fr); }
.span8 { grid-column: span 8; } .span4 { grid-column: span 4; } .span6 { grid-column: span 6; } .span3 { grid-column: span 3; } .span12 { grid-column: 1 / -1; } .span5 { grid-column: span 5; } .span7 { grid-column: span 7; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.alerts .al { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.alerts .al:last-child { border-bottom: 0; }
.al .ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.al b { font-size: 12.5px; display: block; }
.al small { color: var(--muted); font-size: 11.5px; }
.rank { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.rank:last-child { border-bottom: 0; }
.rank .n { width: 20px; font-weight: 800; color: var(--muted); text-align: center; }

/* dispatch */
.dispatch { display: grid; height: 100%; gap: 12px; grid-template-columns: 316px 1fr; grid-template-rows: 1fr 292px; grid-template-areas: "queue map" "queue detail"; }
.embed .dispatch { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 400px; grid-template-areas: "map map" "queue detail"; gap: 10px; }
.queue { grid-area: queue; display: flex; flex-direction: column; min-height: 0; }
.mapcard { grid-area: map; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.mapcard .map { flex: 1; min-height: 0; border-radius: 0 0 var(--radius) var(--radius); }
.detail { grid-area: detail; display: grid; grid-template-columns: 340px 1fr; gap: 12px; min-height: 0; }
.embed .detail { grid-template-columns: 1fr; }
.embed .detail .reqcard { display: none; }
.qlist { flex: 1; min-height: 0; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.rq { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; position: relative; }
.rq:hover { border-color: #C5D2D6; }
.rq.sel { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(14, 124, 134, .15); background: #FBFEFE; }
.rq.new { animation: rqnew 1.6s ease 2; }
@keyframes rqnew { 0%, 100% { background: #fff; } 40% { background: #FFF1EC; } }
.rq-top { display: flex; align-items: center; gap: 6px; }
.rq-top .code { font-weight: 800; font-size: 13px; color: var(--navy); }
.rq-top .timer { margin-left: auto; font-weight: 700; font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.rq-top .timer.warn { color: #C2410C; } .rq-top .timer.bad { color: #DC2626; }
.rq-route { margin-top: 6px; font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.rq-route .arr { color: var(--muted); flex: none; }
.rq-meta { margin-top: 5px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); flex-wrap: wrap; }
.rq-meta .ic { color: var(--muted); }
.qhead { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.qhead h3 { font-size: 14px; }
.qfilter { display: flex; gap: 6px; padding: 8px 10px 0; align-items: center; }
.qfilter .chip { height: 24px; font-size: 11.5px; }
.maphead { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: nowrap; }
.maphead h3 { font-size: 14px; white-space: nowrap; }
.lg-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.lg-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-chip b { color: var(--text); }
.map-overlay { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, .94); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; }
.reqcard, .sugcard { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.rc-h { padding: 11px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; }
.rc-h .code { font-size: 16px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.card-h h3 { white-space: nowrap; }
.rc-b { padding: 10px 14px; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 9px; }
.route2 { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; row-gap: 2px; }
.route2 .pt { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; justify-self: center; }
.route2 .pt.a { background: #fff; border: 3px solid var(--coral); }
.route2 .pt.b { background: var(--teal); border: 3px solid var(--teal-100); }
.route2 .ln { width: 2px; height: 12px; background: repeating-linear-gradient(var(--line) 0 3px, transparent 3px 6px); justify-self: center; }
.route2 b { font-size: 13.5px; }
.route2 small { color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.kv { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px 12px; font-size: 12.5px; }
.kv label { color: var(--muted); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.note { background: #FFFBEB; border: 1px solid #FDE68A; color: #854D0E; border-radius: 8px; padding: 6px 10px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.rc-f { padding: 9px 14px; border-top: 1px solid var(--line-2); display: flex; gap: 6px; }
.sg-list { flex: 1; min-height: 0; overflow: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 5px; }
.sg { display: grid; grid-template-columns: 22px 46px minmax(0,1fr) 64px 56px 52px; align-items: center; gap: 9px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; background: #fff; }
.sg:hover { border-color: #C5D2D6; }
.sg.on { border-color: var(--teal); background: #F5FBFB; box-shadow: 0 0 0 2px rgba(14, 124, 134, .12); }
.sg.bad { opacity: .78; background: #FCFCFD; cursor: not-allowed; }
.sg .rk { width: 22px; height: 22px; border-radius: 6px; background: var(--line-2); color: var(--text-2); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.sg.on .rk { background: var(--teal); color: #fff; }
.sg .bid { display: inline-flex; align-items: center; justify-content: center; height: 22px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 12px; padding: 0 6px; }
.sg .who b { font-size: 12.5px; display: block; }
.sg .who small { font-size: 11.5px; color: var(--muted); }
.sg .m b { display: block; font-size: 13px; }
.sg .m small { color: var(--muted); font-size: 11px; }
.score { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 4px; }
.score i { display: block; height: 100%; background: linear-gradient(90deg, #12A3AE, #0E7C86); border-radius: 3px; }
.sg-f { padding: 9px 12px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* map page */
.mappage { display: grid; grid-template-columns: 300px 1fr; gap: 12px; height: 100%; }
.blist { flex: 1; overflow: auto; }
.bitem { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.bitem:hover { background: #FAFCFC; }
.bitem.on { background: var(--teal-50); }
.bitem .bid { width: 44px; height: 24px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.popup { position: absolute; width: 270px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 20; transform: translate(-50%, calc(-100% - 24px)); }
.popup::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 4px rgba(0, 0, 0, .05); }
.popup .ph { padding: 11px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-2); }
.popup .pb { padding: 10px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 12.5px; }
.popup .pb span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.popup .pf { padding: 8px 12px 12px; display: flex; gap: 6px; }

/* history */
.histpage { display: grid; grid-template-columns: 330px 1fr; gap: 12px; height: 100%; }
.playbar { position: absolute; left: 14px; right: 14px; bottom: 14px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.playbar input[type=range] { flex: 1; accent-color: var(--teal); }
.playbar .pbtn { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; }
.stops { overflow: auto; flex: 1; }
.stop { display: grid; grid-template-columns: 46px 16px 1fr; gap: 8px; padding: 7px 14px; font-size: 12.5px; align-items: start; }
.stop .t { font-weight: 700; color: var(--text-2); }
.stop .d { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; }
.stop.past .t { color: var(--muted); }
.stop.cur { background: var(--teal-50); }
.sumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; }
.sumgrid div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.sumgrid b { display: block; font-size: 17px; color: var(--navy); }
.sumgrid span { font-size: 11px; color: var(--muted); font-weight: 600; }

/* fleet & drivers */
.split { display: grid; grid-template-columns: 1fr 340px; gap: 12px; height: 100%; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.bat { display: inline-flex; align-items: center; gap: 6px; }
.bat .bar { width: 36px; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.bat .bar i { display: block; height: 100%; border-radius: 4px; }
.bidpill { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 22px; padding: 0 8px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 12px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; background: #fff; box-shadow: var(--shadow-lg); z-index: 400; display: flex; flex-direction: column; animation: dr .25s ease; }
@keyframes dr { from { transform: translateX(40px); opacity: 0; } }
.drawer .dh { padding: 16px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.drawer .db { padding: 16px 18px; display: grid; gap: 14px; overflow: auto; flex: 1; align-content: start; }
.drawer .df { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.infolist { display: grid; gap: 0; }
.infolist div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.infolist div:last-child { border-bottom: 0; }
.infolist span { color: var(--muted); }

/* shifts */
.gantt { position: relative; }
.g-head, .g-row { display: grid; grid-template-columns: 210px 1fr 78px; align-items: center; }
.g-head { height: 32px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); font-weight: 600; background: #FAFBFC; }
.g-row { height: 31px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.g-row .nm { display: flex; align-items: center; gap: 7px; padding-left: 12px; min-width: 0; }
.g-row .nm b { font-size: 12px; }
.g-track { position: relative; height: 100%; }
.g-hours { position: relative; height: 100%; }
.g-hours span { position: absolute; top: 9px; transform: translateX(-50%); }
.g-seg { position: absolute; top: 7px; height: 17px; border-radius: 5px; }
.g-seg.work { background: #CDE9EB; border: 1px solid #9FD2D6; }
.g-seg.plan { background: repeating-linear-gradient(45deg, #EEF6F7 0 5px, #E2EFF1 5px 10px); border: 1px dashed #A9CDD1; }
.g-seg.lunch { background: #FDE68A; border: 1px solid #F5C94A; }
.g-seg.lunch.over { background: #FCA5A5; border-color: #EF4444; }
.g-seg.lost { background: #FECACA; border: 1px solid #F87171; }
.g-trip { position: absolute; top: 11px; height: 9px; border-radius: 2px; background: #2563EB; opacity: .75; }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--coral); z-index: 3; }
.g-now::before { content: attr(data-t); position: absolute; top: -1px; left: 50%; transform: translateX(-50%); background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }

/* qr */
.qrpage { display: grid; grid-template-columns: 1fr 340px; gap: 12px; height: 100%; }
.qrgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px; overflow: auto; align-content: start; }
.qrc { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; cursor: pointer; }
.qrc:hover { border-color: #C5D2D6; }
.qrc.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(14, 124, 134, .14); }
.qrc.off { opacity: .55; }
.qrc .nm { font-weight: 800; font-size: 13px; color: var(--navy); }
.qrc .sb2 { font-size: 11px; color: var(--muted); margin-top: -4px; }
.qrc .ft { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-2); border-top: 1px solid var(--line-2); padding-top: 6px; }
.a6 { width: 250px; height: 352px; margin: 0 auto; border-radius: 6px; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .12), 0 0 0 1px var(--line); display: flex; flex-direction: column; overflow: hidden; }
.a6 .hd { background: linear-gradient(135deg, #0B3B45, #0E7C86); color: #fff; padding: 14px 16px 12px; text-align: center; }
.a6 .hd b { display: block; font-size: 15px; }
.a6 .hd small { font-size: 10.5px; opacity: .85; }
.a6 .bd { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; text-align: center; }
.a6 .rm { font-weight: 800; font-size: 18px; color: var(--navy); }
.a6 .ml { font-size: 9px; color: var(--text-2); line-height: 1.5; }

/* chat */
.chatpage { display: grid; grid-template-columns: 300px 1fr 280px; gap: 12px; height: 100%; }
.clist { overflow: auto; flex: 1; }
.citem { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: center; }
.citem.on { background: var(--teal-50); }
.citem .ctx { min-width: 0; flex: 1; }
.citem b { font-size: 13px; }
.citem .last { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem .tm { font-size: 11px; color: var(--muted); }
.gav { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; position: relative; }
.onl { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22C55E; border: 2px solid #fff; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; background: #F7FAFA; }
.msg { display: flex; gap: 8px; max-width: 72%; align-items: flex-end; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bub { background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: 13px; }
.msg.me .bub { background: var(--teal); color: #fff; border-color: var(--teal); border-radius: 14px 14px 4px 14px; }
.msg .who { font-size: 11px; font-weight: 700; color: var(--teal-700); margin-bottom: 2px; }
.msg .tm { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.msg.me .tm { text-align: right; }
.sysmsg { align-self: center; font-size: 11.5px; color: var(--muted); background: #EEF3F4; border-radius: 10px; padding: 3px 10px; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.voice .pl { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; }
.wave { display: flex; align-items: center; gap: 2px; height: 22px; flex: 1; }
.wave i { width: 3px; border-radius: 2px; background: #9CC9CD; display: block; }
.tripcard { border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px; padding: 8px 10px; background: rgba(255, 255, 255, .12); min-width: 230px; }
.photo { width: 230px; height: 130px; border-radius: 10px; margin-top: 6px; overflow: hidden; }
.composer { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); }
.composer .input { flex: 1; }
.qreplies { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; }

/* reports */
.reports { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.reports .kpis { grid-column: 1 / -1; grid-template-columns: repeat(6, 1fr); }
.filters { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.filters .input { width: auto; height: 34px; }
.heat td { padding: 0; }
.chart-wrap { padding: 10px 14px 12px; }

/* settings */
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.setrow { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.setrow:last-child { border-bottom: 0; }
.setrow .tx { flex: 1; min-width: 0; }
.setrow .tx b { display: block; font-size: 13px; }
.setrow .tx small { color: var(--muted); font-size: 12px; }
.setrow .num { width: 92px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; height: 32px; overflow: hidden; }
.setrow .num input { width: 50px; border: 0; text-align: center; font-weight: 700; outline: none; height: 100%; }
.setrow .num span { font-size: 11px; color: var(--muted); padding-right: 8px; }
.perm td, .perm th { text-align: center; }
.perm td:first-child, .perm th:first-child { text-align: left; }
.perm .y { color: var(--teal); } .perm .n { color: #CBD5DA; }

/* pooling */
.poolpage { display: grid; grid-template-columns: 380px 1fr; gap: 12px; height: 100%; }
.pg { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; background: #fff; }
.pg.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(14, 124, 134, .14); }
.pg.bad { background: #FFFBFB; border-color: #FCA5A5; }
.pg .ttl { display: flex; align-items: center; gap: 8px; }
.pg .ttl b { font-size: 13px; }
.pgreq { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 8px; background: var(--bg); border-radius: 7px; }
.seats { display: flex; gap: 4px; flex-wrap: wrap; }
.seat { width: 22px; height: 24px; border-radius: 6px 6px 4px 4px; background: #E9EEF0; border: 1px solid #D5DEE1; position: relative; }
.seat.f1 { background: #0E7C86; border-color: #0A6A73; }
.seat.f2 { background: #F26B4F; border-color: #DE5638; }
.seat.f3 { background: #7C3AED; border-color: #6D28D9; }
.seat.x { background: #FEE2E2; border-color: #FCA5A5; }
.seatbar { display: flex; align-items: center; gap: 10px; }
.tl { display: flex; flex-direction: column; gap: 0; }
.tl .st { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 6px 0; position: relative; }
.tl .st .nb { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; z-index: 1; }
.tl .st::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: -8px; width: 2px; background: var(--line); }
.tl .st:last-child::before { display: none; }
.mapside { position: absolute; right: 12px; bottom: 12px; width: 320px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); }

.embed .sg { grid-template-columns: 22px 50px 1fr 64px 64px; gap: 8px; }
.embed .sg .scorecol { display: none; }
.btn.pressing { animation: press .7s ease; }
@keyframes press { 0% { box-shadow: 0 0 0 0 rgba(14,124,134,.6); } 100% { box-shadow: 0 0 0 14px rgba(14,124,134,0); } }

.queue .tabs { padding: 0 6px; justify-content: space-between; }
.queue .tabs button { padding: 0 5px; font-size: 12px; }
.split .tbl th, .split .tbl td { padding: 9px 9px; }

/* ---------------------------------------------------------------- V4 · real resort map */
.combo { position: relative; }
.combo .ci { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.combo .input { padding-left: 32px; }
.combo-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60; max-height: 300px; overflow: auto; padding: 4px; }
.combo.open .combo-list { display: block; }
.ci-it { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.ci-it:hover, .ci-it.on { background: var(--teal-50); }
.ci-it b { display: block; font-size: 13px; }
.ci-it small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 440px; }
.ci-empty { padding: 10px; color: var(--muted); font-size: 12.5px; }
.combo-sub { margin-top: 4px; min-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zdot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pno { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #E0453A; background: #fff; color: #3A2A28; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pno.lg { width: 28px; height: 28px; font-size: 13px; }
.modal .est { display: flex; gap: 8px; align-items: flex-start; background: var(--teal-50); color: var(--teal-700); padding: 10px 12px; border-radius: 9px; font-size: 12.5px; }
.tag.pooltag { background: #EDE9FE; color: #6D28D9; }
.mlayers { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.97); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; width: 236px; z-index: 5; }
.mlayers .ml-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; padding: 2px 6px 4px; }
.mlayers button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: left; }
.mlayers button:hover { background: var(--line-2); }
.mlayers button { white-space: nowrap; }
.mlayers button small { margin-left: auto; color: var(--muted); font-weight: 700; }
.mlayers .sw { width: 28px; height: 16px; border-radius: 8px; background: #CBD5DA; position: relative; flex: none; transition: background .2s; }
.mlayers .sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .2s; }
.mlayers button.on .sw { background: var(--teal); }
.mlayers button.on .sw::after { left: 14px; }
.mlayers .ml-x { margin-left: auto; width: 24px; height: 24px; padding: 0; justify-content: center; border-radius: 7px; color: var(--muted); transform: rotate(180deg); }
.mlayers .ml-x:hover { background: var(--line-2); color: var(--text); }
.mlayers.min { width: auto; padding: 0; background: transparent; box-shadow: none; }
.mlayers .ml-pill { gap: 7px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.97); box-shadow: var(--shadow-lg); font-size: 12.5px; font-weight: 700; color: var(--text); }
.mlayers .ml-pill:hover { background: #fff; color: var(--teal); }
.mlayers .ml-pill small { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: var(--teal-50, #E6F4F4); color: var(--teal); font-weight: 800; }
.mlayers .ml-pill svg:last-child { color: var(--muted); }
.mlegend { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.97); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px 12px; display: grid; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-2); z-index: 5; max-width: calc(100% - 90px); }
.mlegend .lg-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.mlegend .lg-row span { display: inline-flex; align-items: center; gap: 5px; }
.lg-stop { width: 13px; height: 13px; border-radius: 4px; background: #F7C531; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #E2B11E; display: inline-block; }
.lg-poi { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #E0453A; font-style: normal; font-size: 9px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.lg-p { width: 15px; height: 15px; border-radius: 4px; background: #3B6FB6; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.lg-one { width: 22px; height: 0; border-top: 2.5px dashed #E11D48; display: inline-block; }
.roomcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #FCFEFE; }
.popup.poicard { width: 300px; }
.popup .icon-btn.sm { width: 26px; height: 26px; }
.mappage { grid-template-columns: 320px 1fr; }
.embed .dispatch { grid-template-rows: 1fr 318px; }
.embed .maphead .sub { display: none; }
.embed .map-overlay { font-size: 10.5px; padding: 4px 8px; gap: 6px; }
.embed .sugcard .tl .st { padding: 3px 0; }
