
:root {
  --bg: #051211; --ink: #eef5f1; --muted: #9ab5ae; --faint: #67847e;
  --panel: rgba(12, 34, 32, .74); --line: rgba(190, 235, 220, .13); --line2: rgba(190, 235, 220, .26);
  --mint: #5fe0b7; --teal: #58c7d8; --amber: #f4ad62; --coral: #ef7a69; --violet: #b9a3f0; --gold: #e9d27a; --cream: #f4f1e4; --ok: #62d69f;
  --r: 16px; --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: Tajawal, Plex, "Segoe UI", Tahoma, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 34vw, 480px); height: 100vh; height: 100dvh; }
.stage { position: relative; min-width: 0; overflow: hidden; background: radial-gradient(1100px 760px at 28% 18%, #0e332f 0%, #081d1b 52%, #040e0d 100%); }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 10px 34px rgba(0, 0, 0, .3); }
.hud { position: absolute; z-index: 2; }

.hud-top { top: 14px; left: 14px; right: 14px; display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; text-decoration: none; color: inherit; }
.brand img { height: 34px; background: var(--cream); border-radius: 10px; padding: 3px; }
.brand b { display: block; font-size: 16px; letter-spacing: .14em; line-height: 1.1; }
.brand span { font-size: 11px; color: var(--muted); }
.clockbox { display: flex; flex-direction: column; justify-content: center; padding: 6px 16px; min-width: 112px; }
.clockbox span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.clockbox b { white-space: nowrap; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.15; }
.speed { display: flex; align-items: center; padding: 4px; gap: 2px; }
.speed button { background: transparent; border: 0; border-radius: 11px; padding: 0 11px; height: 100%; min-height: 34px; color: var(--muted); font-weight: 500; display: grid; place-items: center; transition: background .2s, color .2s; }
.speed button svg { width: 14px; height: 14px; stroke-width: 2.6; }
.speed button:hover { color: var(--ink); }
.speed button.on { background: linear-gradient(135deg, var(--mint), var(--teal)); color: #052422; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 9px 6px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .14); flex: none; }
.stats div { padding: 0 10px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; text-align: center; min-width: 0; }
.stats div:first-child { border-inline-start: 0; }
.stats b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stats span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

.hud-legend { inset-inline-start: 14px; top: 78px; display: flex; flex-direction: column; gap: 5px; padding: 9px 12px; font-size: 11.5px; color: var(--muted); border-radius: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 8px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.dot.ring { background: transparent; border: 1.5px solid #7ee0f2; box-shadow: 0 0 0 2px rgba(126, 224, 242, .25); }
.sq { display: inline-block; width: 10px; height: 9px; margin-inline-end: 8px; border-radius: 2px; background: rgba(239, 122, 105, .3); border: 1.5px solid var(--coral); }

.hud-bottom { left: 14px; right: 14px; bottom: 14px; display: flex; gap: 10px; align-items: flex-end; pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }
.fleet { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; padding: 8px 10px; }
.grp { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line); padding-bottom: 3px; margin: 0 3px 1px; }
.dr { text-align: center; font-size: 10.5px; color: var(--muted); padding: 3px 0 2px; border-radius: 9px; transition: background .3s; }
.dr i { display: block; width: 9px; height: 9px; margin: 0 auto 3px; border-radius: 50%; background: var(--c); opacity: .35; }
.dr b { display: block; font-weight: 600; color: var(--muted); line-height: 1.2; }
.dr .bat { display: block; height: 3px; margin: 3px 5px 0; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.dr .bat em { display: block; height: 100%; background: var(--ok); border-radius: 2px; transition: width .4s; }
.dr.flying i { opacity: 1; box-shadow: 0 0 9px var(--c); }
.dr.flying b { color: var(--ink); }
.dr.flying { background: rgba(255, 255, 255, .04); }
.dr.linklost i { opacity: 1; background: transparent; border: 1.5px dashed var(--coral); }
.dr.linklost b, .dr.failed b { color: var(--coral); }
.dr.failed i { background: var(--coral); opacity: 1; }
.dr.landed i { opacity: .8; background: transparent; border: 1.5px solid var(--ok); }
.dr.low .bat em { background: var(--amber); }
.tools { display: flex; gap: 8px; }
.tool { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; border-radius: 12px; color: var(--ink); font-weight: 500; white-space: nowrap; transition: border-color .2s, transform .15s; }
.tool:hover { border-color: var(--line2); transform: translateY(-1px); }
.tool svg { width: 16px; height: 16px; color: var(--mint); }
.tool b { font-variant-numeric: tabular-nums; }
.tool.on { border-color: rgba(95, 224, 183, .6); background: rgba(14, 52, 46, .85); }
.menu button.on { background: rgba(95, 224, 183, .14); color: var(--mint); font-weight: 600; }
.fleet.many .dr { font-size: 9px; } .fleet.many .dr .bat { margin: 3px 2px 0; }
.menuwrap { position: relative; }
.menu { position: absolute; bottom: 48px; inset-inline-start: 0; min-width: 190px; padding: 6px; display: grid; gap: 2px; border-radius: 14px; animation: rise .18s var(--ease) both; }
.menu button { background: transparent; border: 0; border-radius: 9px; padding: 9px 12px; text-align: start; display: flex; justify-content: space-between; gap: 14px; }
.menu button:hover { background: rgba(255, 255, 255, .07); }
.menu small { color: var(--muted); }
.logpanel { position: absolute; z-index: 3; inset-inline-end: 14px; bottom: 66px; width: min(430px, calc(100% - 28px)); max-height: 46%; display: flex; flex-direction: column; animation: rise .2s var(--ease) both; }
.logpanel header { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px 9px; border-bottom: 1px solid var(--line); }
.logpanel header span { color: var(--muted); font-size: 12px; }
.logpanel header button { margin-inline-start: auto; background: transparent; border: 0; font-size: 20px; line-height: 1; color: var(--muted); }
.log { overflow-y: auto; padding: 8px 14px 12px; font-size: 12px; display: grid; gap: 4px; }
.log div { display: grid; grid-template-columns: 42px 1fr; gap: 8px; line-height: 1.4; }
.log .t { color: var(--faint); font-variant-numeric: tabular-nums; }
.log .k-fault { color: var(--amber); } .log .k-alert { color: var(--coral); font-weight: 600; } .log .k-replan, .log .k-order { color: var(--teal); } .log .k-detect { color: #ffe1a8; } .log .k-filter { color: var(--muted); }
.simnote { position: absolute; z-index: 1; inset-inline-end: 16px; top: 78px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* ------------------------------------------------------------------ chat */
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: linear-gradient(180deg, #0b2422 0%, #071917 100%); border-inline-start: 1px solid var(--line); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.orb { width: 40px; height: 40px; flex: none; border-radius: 13px; background: var(--cream); display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 0 26px rgba(95, 224, 183, .28); }
.orb img { height: 30px; }
.who { min-width: 0; }
.who b { display: block; font-size: 15px; letter-spacing: .1em; line-height: 1.2; }
.who span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aichip { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; font-size: 12px; border: 1px solid rgba(244, 173, 98, .45); background: rgba(244, 173, 98, .08); color: var(--amber); white-space: nowrap; max-width: 56%; }
.aichip span { overflow: hidden; text-overflow: ellipsis; }
.aichip i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--amber); }
.aichip.live { border-color: rgba(98, 214, 159, .5); background: rgba(98, 214, 159, .09); color: var(--ok); }
.aichip.live i { background: var(--ok); box-shadow: 0 0 0 4px rgba(98, 214, 159, .18); animation: breathe 2.2s ease-in-out infinite; }

.tabs { display: flex; gap: 4px; padding: 8px 10px 0; flex: none; }
.tabs button { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--muted); padding: 8px 6px 9px; font-size: 12.5px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s, border-color .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--mint); border-bottom-color: var(--mint); font-weight: 600; }
.tabs button i { font-style: normal; font-size: 10px; margin-inline-start: 6px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs button i:empty { display: none; }
.pane { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.pnote { font-size: 12px; line-height: 1.55; color: var(--muted); padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); flex: none; }
.pnote b { color: var(--ink); font-weight: 600; }
.pempty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 26px 10px; }
.sys { flex: none; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .16); }
summary { cursor: pointer; list-style: none; padding: 8px 11px; font-size: 12px; color: #cfe0db; display: flex; align-items: baseline; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; color: var(--mint); font-weight: 700; width: 9px; flex: none; }
details[open] > summary::before { content: "–"; }
summary span { color: var(--faint); font-size: 11px; margin-inline-start: auto; text-align: end; }
pre { margin: 0; padding: 9px 11px 11px; font: 500 11px/1.55 "IBM Plex Mono", Consolas, "Courier New", monospace; color: #cfe6df; white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--line); max-height: 300px; overflow-y: auto; direction: ltr; text-align: left; }
pre .h { color: var(--mint); font-weight: 700; }
pre .k { color: #8fd0e0; } pre .s { color: #f4cf9a; } pre .n { color: var(--violet); }
.trace { flex: none; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .035); overflow: hidden; }
.trace.flash { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(95, 224, 183, .14); }
.thead { display: flex; align-items: baseline; gap: 9px; padding: 9px 11px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.thead b { color: var(--mint); font-variant-numeric: tabular-nums; }
.thead span { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thead em { font-style: normal; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e2efea; }
.trace details { border-bottom: 1px solid var(--line); }
.up { color: var(--teal); font-style: normal; } .dn { color: var(--ok); font-style: normal; } .xx { color: var(--coral); font-style: normal; }
.tnext { padding: 9px 11px; font-size: 12px; line-height: 1.5; color: #d5e6e0; display: grid; grid-template-columns: 14px 1fr; gap: 6px; }
.tnext.bad { color: #ffd6ce; }
.tlines { margin-top: 9px; display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.tlines button { justify-self: start; margin-top: 3px; background: transparent; border: 0; padding: 0; color: var(--mint); font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px; }
.dcard { flex: none; border: 1px solid var(--line2); border-radius: 14px; background: rgba(255, 255, 255, .05); padding: 10px 12px; }
.dhead { display: flex; align-items: center; gap: 8px; }
.dhead i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 9px var(--c); }
.dhead b { font-size: 15px; } .dhead span { color: var(--muted); font-size: 12px; }
.dhead em { font-style: normal; margin-inline-start: auto; font: 600 11px/1 "IBM Plex Mono", Consolas, monospace; padding: 5px 8px; border-radius: 7px; background: rgba(95, 224, 183, .12); color: var(--mint); white-space: nowrap; }
.dhead button { background: transparent; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 2px; }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; margin-top: 10px; }
.dgrid b { display: block; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dgrid span { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.dwork { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: #d5e6e0; }
.linklog { flex: 1; min-height: 120px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .2); padding: 7px 9px; font: 500 11px/1.6 "IBM Plex Mono", Consolas, "Courier New", monospace; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.lk { display: grid; grid-template-columns: 38px 30px 12px auto 1fr; gap: 6px; align-items: baseline; }
.lk .t { color: var(--faint); } .lk b { color: #e2efea; font-weight: 600; } .lk i { font-style: normal; }
.lk .m { white-space: nowrap; } .lk .d { color: var(--muted); overflow-wrap: anywhere; }
.lk.up i, .lk.up .m { color: var(--teal); } .lk.down i, .lk.down .m { color: var(--ok); } .lk.x i, .lk.x .m { color: var(--coral); }
.thread { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.msg { display: flex; gap: 10px; animation: rise .3s var(--ease) both; }
.msg.me { flex-direction: column; align-items: flex-end; gap: 4px; }
.bubble { max-width: 88%; padding: 10px 15px; border-radius: 18px; border-end-end-radius: 5px; background: linear-gradient(135deg, #1b927d, #197c8f); color: #fff; font-size: 15px; line-height: 1.55; box-shadow: 0 6px 20px rgba(10, 80, 80, .35); overflow-wrap: anywhere; }
.msg.me .meta { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; padding-inline-end: 4px; }
.av { flex: 0 0 28px; height: 28px; margin-top: 2px; border-radius: 9px; background: var(--cream) url(logo-mark.png) center / 21px no-repeat; }
.card { flex: 1; min-width: 0; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 18px; border-start-start-radius: 5px; padding: 12px 14px; transition: border-color .3s; overflow-wrap: anywhere; }
.card.ok { border-color: rgba(98, 214, 159, .38); }
.card.refused { border-color: rgba(239, 122, 105, .55); }
.card.wait { border-color: rgba(244, 173, 98, .7); box-shadow: 0 0 0 3px rgba(244, 173, 98, .1); }
.card p { margin: 0; }
.say { font-size: 14.5px; line-height: 1.6; }
.say + .src { margin-top: 8px; }

.ohead { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.rail { list-style: none; margin: 0 0 2px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rail li { position: relative; text-align: center; padding-top: 17px; font-size: 11px; color: var(--faint); line-height: 1.3; transition: color .3s; }
.rail li::before { content: ""; position: absolute; top: 2px; inset-inline-start: 50%; width: 9px; height: 9px; margin-inline-start: -6px; border-radius: 50%; background: #17322f; border: 1.5px solid var(--line2); z-index: 1; transition: all .3s; }
.rail li::after { content: ""; position: absolute; top: 7.5px; inset-inline-end: 50%; width: 100%; height: 1.5px; background: var(--line); transition: background .3s; }
.rail li:first-child::after { display: none; }
.rail li small { display: block; font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.rail li.done { color: var(--ink); }
.rail li.done::before { background: var(--ok); border-color: var(--ok); }
.rail li.done::after, .rail li.active::after, .rail li.bad::after { background: var(--ok); }
.rail li.done small { color: var(--muted); }
.rail li.active { color: var(--ink); }
.rail li.active::before { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 5px rgba(88, 199, 216, .2); animation: breathe 1.1s ease-in-out infinite; }
.rail li.active small { color: var(--teal); }
.rail li.bad { color: #ffd6ce; }
.rail li.bad::before { background: var(--coral); border-color: var(--coral); }
.rail li.bad small { color: var(--coral); }

.sec { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.tag { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); margin-bottom: 5px; }
.tag.dim { color: var(--faint); }
.sum { font-size: 14.5px; line-height: 1.5; }
.ar { display: block; direction: rtl; text-align: right; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.tasks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.task { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .055); border: 1px solid var(--line); }
.task i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.task em { font-style: normal; color: var(--muted); }
.rules { display: flex; flex-wrap: wrap; gap: 5px; }
.rule { font-size: 11px; padding: 3px 8px; border-radius: 7px; border: 1px solid rgba(98, 214, 159, .35); color: var(--ok); background: rgba(98, 214, 159, .07); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rule.bad { border-color: var(--coral); color: #ffd6ce; background: rgba(239, 122, 105, .16); font-weight: 600; }
.out { font-size: 14px; line-height: 1.55; display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.out svg { margin-top: 2px; color: var(--ok); }
.out.bad svg { color: var(--coral); }
.src { font-size: 11px; color: var(--faint); margin-top: 10px; line-height: 1.45; }
.askbox { background: rgba(244, 173, 98, .08); border: 1px solid rgba(244, 173, 98, .4); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.row input { flex: 1; min-width: 130px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 11px; outline: none; }
.row input:focus { border-color: var(--teal); }
.b { border-radius: 10px; padding: 8px 14px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); font-weight: 500; transition: transform .15s, border-color .2s, opacity .2s; }
.b:hover { transform: translateY(-1px); border-color: var(--ink); }
.b.pri { background: linear-gradient(135deg, var(--mint), var(--teal)); color: #052422; border-color: transparent; font-weight: 700; }
.b.danger { background: linear-gradient(135deg, #f08c6a, #e9655a); color: #2a0b06; border-color: transparent; font-weight: 700; }
.b:disabled { opacity: .45; transform: none; cursor: default; }

.card.alert { border-color: rgba(239, 122, 105, .6); background: linear-gradient(180deg, rgba(239, 122, 105, .13), rgba(239, 122, 105, .03)); }
.card.alert.decided { border-color: var(--line); background: rgba(255, 255, 255, .03); }
.ahead { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; margin-bottom: 7px; }
.ahead i { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(239, 122, 105, .22); animation: breathe 1s ease-in-out infinite; }
.card.alert.decided .ahead i { animation: none; box-shadow: none; background: var(--faint); }
.ahead time { margin-inline-start: auto; font-weight: 500; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card.alert p { font-size: 13.5px; line-height: 1.55; margin: 3px 0; }
.ev { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 6px; background: rgba(88, 199, 216, .12); border: 1px solid rgba(88, 199, 216, .35); color: var(--teal); margin-inline-start: 5px; white-space: nowrap; }

.note { align-self: center; max-width: 94%; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); animation: rise .3s var(--ease) both; }
.note.fault { color: var(--amber); border-color: rgba(244, 173, 98, .35); }
.note.replan { color: var(--teal); border-color: rgba(88, 199, 216, .3); }

.typing { display: flex; align-items: center; gap: 5px; padding: 9px 0 2px; color: var(--muted); font-size: 12.5px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: bounce 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
.typing em { font-style: normal; margin-inline-start: 6px; }

.creed { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mint); margin-bottom: 7px; }
.welcome h2 { margin: 0 0 6px; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.welcome .lead { font-size: 14px; line-height: 1.6; color: #cfe0db; }
.link { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; padding: 9px 11px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; border: 1px solid rgba(244, 173, 98, .35); background: rgba(244, 173, 98, .07); color: #f6cfa0; }
.link i { width: 8px; height: 8px; flex: none; margin-top: 5px; border-radius: 50%; background: var(--amber); }
.link.live { border-color: rgba(98, 214, 159, .4); background: rgba(98, 214, 159, .07); color: #bfeedb; }
.link.live i { background: var(--ok); box-shadow: 0 0 0 4px rgba(98, 214, 159, .18); }
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.starter { display: flex; align-items: center; gap: 10px; text-align: start; padding: 10px 11px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .045); transition: transform .18s var(--ease), border-color .2s, background .2s; min-width: 0; }
.starter:hover { transform: translateY(-2px); border-color: rgba(95, 224, 183, .55); background: rgba(95, 224, 183, .07); }
.starter .ic { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: rgba(95, 224, 183, .12); color: var(--mint); }
.starter b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.starter small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.starter > span { min-width: 0; }

.quick { display: flex; gap: 7px; overflow-x: auto; padding: 8px 14px 0; scrollbar-width: none; flex: none; }
.quick::-webkit-scrollbar { display: none; }
.qchip { flex: none; white-space: nowrap; font-size: 12.5px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: #d5e6e0; transition: border-color .2s, background .2s, transform .15s; }
.qchip:hover { border-color: var(--mint); background: rgba(95, 224, 183, .08); transform: translateY(-1px); }
.composer { display: flex; align-items: flex-end; gap: 6px; margin: 10px 12px calc(12px + env(safe-area-inset-bottom)); padding-block: 7px; padding-inline: 16px 7px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); transition: border-color .2s, box-shadow .2s; flex: none; }
.composer:focus-within { border-color: rgba(95, 224, 183, .65); box-shadow: 0 0 0 4px rgba(95, 224, 183, .1); }
.composer textarea { flex: 1; min-width: 0; resize: none; background: transparent; border: 0; outline: none; padding: 8px 0; font-size: 15px; line-height: 1.45; max-height: 132px; }
.composer textarea { scrollbar-width: none; }
.composer textarea::-webkit-scrollbar { display: none; }
.composer textarea::placeholder { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbtn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; font-weight: 600; transition: background .2s, color .2s, transform .15s; }
.cbtn:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.cbtn.rec { background: var(--coral); color: #2a0b06; animation: breathe 1s ease-in-out infinite; }
.cbtn.send { background: linear-gradient(135deg, var(--mint), var(--teal)); color: #052422; }
.cbtn.send:hover { transform: scale(1.06); }
.cbtn.send svg { stroke-width: 2.6; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ------------------------------------------------------------------ poster figure mode: the map only */
body.fig .chat, body.fig .hud, body.fig .logpanel, body.fig .simnote { display: none; }
body.fig .app { grid-template-columns: 1fr; }
body.fig .stage { background: #0b2321; }

/* ------------------------------------------------------------------ narrow desktop and tablets */
@media (max-width: 1500px) { .tool span { display: none; } .tool { padding: 0 11px; } }

@media (max-width: 430px) { .brand div { display: none; } .brand { padding: 5px; } }

/* ------------------------------------------------------------------ phones: map on top, conversation below */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 43vh minmax(0, 1fr); grid-template-rows: 43dvh minmax(0, 1fr); }
  .chat { border-inline-start: 0; border-top: 1px solid var(--line); }
  .fleet, .brand span { display: none; }
  .stats { padding: 6px 4px; } .stats b { font-size: 14.5px; } .stats span { font-size: 9px; }
  .hud-top { top: 8px; left: 8px; right: 8px; gap: 6px; flex-wrap: nowrap; }
  .brand { padding: 5px 10px 5px 5px; gap: 7px; } .brand img { height: 28px; } .brand b { font-size: 13px; }
  .clockbox { padding: 3px 11px; min-width: 0; } .clockbox span { display: none; } .clockbox b { font-size: 15px; }
  .speed { margin-inline-start: auto; } .speed button { padding: 0 8px; min-height: 28px; font-size: 12.5px; }
  .hud-bottom { left: 8px; right: 8px; bottom: 8px; justify-content: flex-end; }
  .tools { gap: 6px; } .tool { height: 34px; padding: 0 10px; font-size: 12px; border-radius: 10px; } .tool span { display: none; }
  .menu { bottom: 42px; }
  .logpanel { right: 8px; left: 8px; bottom: 50px; width: auto; max-height: 70%; }
  .tabs { padding: 4px 8px 0; } .tabs button { padding: 6px 4px 7px; font-size: 12px; }
  .pane { padding: 10px 10px 8px; }
  .chat-head { padding: 9px 12px; } .orb { width: 34px; height: 34px; border-radius: 11px; } .orb img { height: 25px; } .who span { display: none; }
  .thread { padding: 14px 12px 8px; gap: 12px; }
  .starters { grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
  .starter { padding: 8px 9px; gap: 8px; border-radius: 12px; } .starter .ic { width: 28px; height: 28px; border-radius: 9px; } .starter b { font-size: 12.5px; } .starter small { font-size: 10.5px; }
  .welcome h2 { font-size: 16.5px; } .welcome .lead { font-size: 13px; line-height: 1.5; } .welcome .lead .ar { display: none; }
  .link { font-size: 11.5px; padding: 7px 9px; }
  .card { padding: 11px 12px; }
  .composer { margin: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .composer textarea { font-size: 16px; } /* 16 px stops iOS from zooming the page on focus */
}

/* ------------------------------------------------------------------ the real map */
#gmap { position: absolute; inset: 0; display: none; background: #061a18; }
body.mapmode #gmap { display: block; }
body.mapmode #map { pointer-events: none; }
body.mapmode .stage { background: #061a18; }
#map { z-index: 1; }
.hud, .mappop, .logpanel, .drawhint { z-index: 3; }
.maplibregl-ctrl-top-right { top: 64px !important; right: 6px !important; }
.maplibregl-ctrl-group { background: rgba(12, 34, 32, .82) !important; border: 1px solid var(--line); border-radius: 12px !important; box-shadow: 0 8px 26px rgba(0, 0, 0, .3) !important; overflow: hidden; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.maplibregl-ctrl-group button { width: 32px; height: 32px; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(.88) sepia(.2) hue-rotate(120deg); }
.maplibregl-ctrl-bottom-right { bottom: 66px !important; }
.maplibregl-ctrl-attrib { background: rgba(6, 26, 24, .78) !important; color: var(--muted) !important; font-size: 10.5px; }
.maplibregl-ctrl-attrib a { color: #c9dfd8 !important; }
.maplibregl-ctrl-attrib-button { filter: invert(.85); }
.maplibregl-cooperative-gesture-screen { font-family: Tajawal, Plex, sans-serif; z-index: 4; }
#drawLayer { position: absolute; inset: 0; z-index: 2; cursor: crosshair; touch-action: none; }
.drawhint { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); padding: 8px 10px 8px 14px; font-size: 12.5px; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.drawhint button { background: rgba(255, 255, 255, .08); border: 1px solid var(--line2); border-radius: 8px; padding: 4px 10px; color: var(--ink); }
.tool.on { border-color: var(--mint); color: var(--mint); background: rgba(95, 224, 183, .12); }
.mappop { position: absolute; width: 270px; padding: 12px 14px 12px; border-radius: 14px; animation: rise .18s var(--ease) both; }
.mappop b { display: block; font-size: 14.5px; padding-inline-end: 22px; }
.mappop .ar { text-align: left; direction: rtl; font-size: 12.5px; }
.mappop p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: #c9dcd6; }
.mappop .px { position: absolute; top: 6px; inset-inline-end: 8px; background: transparent; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }
.pacts { display: grid; gap: 5px; margin-top: 10px; }
.pacts button { text-align: start; border-radius: 10px; padding: 7px 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); font-size: 12.5px; transition: border-color .2s, background .2s; }
.pacts button:hover { border-color: var(--mint); background: rgba(95, 224, 183, .1); }
.plink { margin-top: 8px; background: transparent; border: 0; padding: 0; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.card.ping { box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
.fbtn { margin-inline-start: 4px; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line2); background: transparent; color: var(--muted); }
.fbtn.on { border-color: var(--mint); color: var(--mint); background: rgba(95, 224, 183, .12); }

/* ------------------------------------------------------------------ access code */
.chat-head { position: relative; }
.helpbtn { margin-inline-start: auto; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line2); background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; }
.helpbtn:hover { color: var(--ink); border-color: var(--ink); }
.helpbtn + .aichip, .helpbtn + .helpbtn { margin-inline-start: 8px; }
.aichip.lock { border-color: rgba(185, 163, 240, .55); background: rgba(185, 163, 240, .1); color: #d3c6f7; }
.aichip.lock i { background: #b9a3f0; }
.codepop { position: absolute; inset-inline-end: 12px; top: 54px; z-index: 20; width: 300px; padding: 14px; border-radius: 14px; animation: rise .18s var(--ease) both; }
.codepop b { display: block; font-size: 14.5px; }
.codepop .ar { text-align: left; direction: rtl; }
.codepop p { margin: 6px 0 0; font-size: 12.5px; color: #c9dcd6; line-height: 1.5; }
.codepop form { display: flex; gap: 6px; margin-top: 10px; }
.codepop input { flex: 1; min-width: 0; background: rgba(0, 0, 0, .28); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 10px; color: var(--ink); font-family: Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; outline: none; }
.codepop input:focus { border-color: var(--mint); }
.codepop .err { color: var(--coral); min-height: 1.2em; margin-top: 6px; }
.link.lock { border-color: rgba(185, 163, 240, .4); background: rgba(185, 163, 240, .08); color: #ddd3fa; }
.link.lock i { background: #b9a3f0; }
.lnk { display: inline-block; margin-top: 6px; background: rgba(185, 163, 240, .16); border: 1px solid rgba(185, 163, 240, .5); color: #efe9ff; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; }

/* ------------------------------------------------------------------ dashboard and the views the model asks for */
.tabs button { font-size: 12px; padding: 8px 4px 9px; }
.gview { margin-top: 10px; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 11px; background: rgba(0, 0, 0, .14); }
.gvh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.gvh b { font-size: 13px; }
.gvh span { font-size: 10.5px; color: var(--faint); }
.pin { margin-inline-start: auto; font-size: 11px; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line2); background: transparent; color: var(--mint); }
.pin:disabled { color: var(--faint); }
#dashView { gap: 12px; }
/* the button that opens the full dashboard */
.openfull { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: start; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(95, 224, 183, .35); background: linear-gradient(135deg, rgba(95, 224, 183, .14), rgba(88, 199, 216, .05)); color: var(--ink); transition: border-color .2s, transform .15s; }
.openfull:hover { border-color: var(--mint); transform: translateY(-1px); }
.openfull b { display: block; font-size: 14px; font-weight: 600; }
.openfull small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.openfull svg { color: var(--mint); width: 20px; height: 20px; }
/* headline numbers */
.kp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: none; }
.k { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px 14px 13px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02)); }
.k.alert { border-color: rgba(239, 122, 105, .55); background: linear-gradient(180deg, rgba(239, 122, 105, .17), rgba(239, 122, 105, .05)); }
.kl { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.kv { font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kv small { font-size: 15px; font-weight: 500; color: var(--muted); margin-inline-start: 2px; }
.kp.idle .kv { color: var(--faint); }
.ks { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbar, .kseg { display: flex; height: 6px; border-radius: 4px; overflow: hidden; gap: 2px; }
.kbar { background: rgba(255, 255, 255, .07); }
.kbar i { display: block; height: 100%; border-radius: 4px; background: var(--mint); transition: width .6s var(--ease); }
.kseg i { height: 100%; border-radius: 3px; }
.kseg .ok { background: var(--ok); } .kseg .bad { background: var(--coral); } .kseg .idle { background: rgba(255, 255, 255, .24); } .kseg .dim { background: rgba(255, 255, 255, .12); }
/* cards */
.wc { flex: none; min-width: 0; container-type: inline-size; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)); padding: 14px 16px 16px; }
.wc.hot { border-color: rgba(239, 122, 105, .5); }
.wc header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
.wc header > div { min-width: 0; flex: 1; }
.wc h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.wc header p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.unpin { flex: none; width: 28px; height: 28px; border-radius: 8px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 16px; line-height: 1; }
.unpin:hover { color: var(--ink); border-color: var(--line2); }
.st { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); white-space: nowrap; }
.st.ok { color: var(--ok); border-color: rgba(98, 214, 159, .45); }
.st.bad { color: #ffc0b5; border-color: rgba(239, 122, 105, .5); }
.st.idle { color: var(--muted); }
.wnote { font-size: 12px; color: var(--faint); margin: 10px 0 0; line-height: 1.5; }
.wnote.center { text-align: center; flex: none; }
.wempty { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }
.wr { margin-top: 10px; }
.okc { color: var(--ok); } .badc { color: var(--coral); }
/* progress tracks (battery, tasks, drones) */
.trk { display: block; position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.trk i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: 4px; background: #2899ad; transition: width .6s var(--ease); }
.trk i.full { background: var(--ok); }
.trk i.stopped { background: #6f8a84; }
/* battery of every drone */
.bl { display: grid; gap: 8px; }
@container (min-width: 470px) { .bl { grid-template-columns: 1fr 1fr; column-gap: 26px; } }
@container (min-width: 780px) { .bl { grid-template-columns: 1fr 1fr 1fr; } }
.br { display: grid; grid-template-columns: 34px minmax(0, 1fr) 82px; align-items: center; gap: 10px; font-size: 13px; }
.bid { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.btr { position: relative; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .07); }
.btr i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: 5px; transition: width .6s var(--ease); }
.btr .res { position: absolute; inset-inline-start: 20%; top: -3px; bottom: -3px; width: 0; border-inline-start: 1.5px dashed rgba(244, 173, 98, .9); }
.bv { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.low { font-size: 10.5px; font-weight: 600; color: var(--amber); padding: 1px 6px; border: 1px solid rgba(244, 173, 98, .5); border-radius: 999px; }
.bfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.lg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lg span { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 10px; height: 10px; border-radius: 3px; }
.resk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.resk em { height: 12px; border-inline-start: 1.5px dashed rgba(244, 173, 98, .9); }
/* task progress */
.tl2 { display: grid; gap: 13px; }
.th2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; font-size: 13.5px; }
.th2 span { min-width: 0; }
.th2 small { margin-inline-start: 8px; color: var(--faint); font-size: 12px; }
.th2 b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.th2 em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--muted); }
/* coverage over time: the plot keeps time running left to right in both languages */
.lc { direction: ltr; display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: 150px auto; column-gap: 10px; padding-top: 6px; }
.ya { display: flex; flex-direction: column; justify-content: space-between; margin: -8px 0; font-size: 11.5px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.lcplot { position: relative; touch-action: pan-y; }
.lcplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lcplot .g { stroke: rgba(190, 235, 220, .1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lcplot .g.base { stroke: rgba(190, 235, 220, .3); }
.lcplot .ar { fill: rgba(88, 199, 216, .12); stroke: none; }
.lcplot .ln { fill: none; stroke: var(--teal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.lcplot .pt, .lcplot .cdot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 2px #0b2321; }
.lcplot .cdot { background: var(--cream); }
.lcplot .end { position: absolute; transform: translate(10px, -50%); font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lcplot .end.flip { transform: translate(calc(-100% - 10px), -140%); }
.lcplot .cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid rgba(255, 255, 255, .32); }
.lcplot .tip { position: absolute; top: -4px; transform: translateX(12px); display: flex; gap: 8px; align-items: baseline; padding: 5px 10px; border-radius: 8px; background: var(--cream); color: #0e2b28; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); pointer-events: none; font-variant-numeric: tabular-nums; }
.lcplot .tip b { font-size: 13px; }
.lcplot .tip.flip { transform: translateX(calc(-100% - 12px)); }
.xa { grid-column: 2; display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
/* alerts and events */
.al2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.al2 li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line); }
.aid { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, .07); color: var(--muted); font-variant-numeric: tabular-nums; }
.aid.hot { background: rgba(239, 122, 105, .2); color: #ffd0c7; }
.atx b { display: block; font-size: 13.5px; font-weight: 600; }
.atx small { display: block; font-size: 12px; color: var(--muted); }
.ev2 { list-style: none; margin: 0; padding: 0; display: grid; }
.ev2 li { display: grid; grid-template-columns: 50px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.ev2 li:last-child { border-bottom: 0; }
.ev2 time { color: var(--faint); font-variant-numeric: tabular-nums; }
.ev2 .k-fault span { color: var(--amber); } .ev2 .k-alert span { color: #ffb4a6; font-weight: 600; } .ev2 .k-replan span, .ev2 .k-order span { color: var(--teal); } .ev2 .k-detect span { color: #ffe1a8; } .ev2 .k-filter span { color: var(--muted); }
@container (min-width: 760px) { .ev2 { grid-template-columns: 1fr 1fr; column-gap: 30px; } .ev2 li:nth-last-child(2):nth-child(odd) { border-bottom: 0; } }
/* the fleet */
.fg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ft { display: grid; gap: 8px; min-width: 0; text-align: start; padding: 10px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); color: var(--ink); transition: border-color .2s, background .2s; }
.ft:hover { border-color: var(--line2); background: rgba(255, 255, 255, .04); }
.fh { display: flex; align-items: center; gap: 7px; min-width: 0; }
.fh i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fh b { font-size: 14px; font-weight: 600; }
.fh .st { margin-inline-start: auto; }
.ft .trk { height: 6px; }
.fm { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm b { color: var(--ink); font-variant-numeric: tabular-nums; margin-inline-end: 8px; }
/* one drone, and the small number tiles */
.dw2 { display: grid; gap: 11px; }
.dwh2 { display: flex; align-items: center; gap: 8px; }
.dwh2 i { width: 10px; height: 10px; border-radius: 50%; }
.dwh2 b { font-size: 16px; }
.dwh2 > span:not(.st) { color: var(--muted); font-size: 13px; }
.dwh2 .st { margin-inline-start: auto; }
.dwr { display: grid; grid-template-columns: auto 1fr; gap: 24px; }
.dwr small, .mini small { display: block; font-size: 12px; color: var(--muted); }
.dwr b { font-size: 16px; font-weight: 600; }
.mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mini.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini > div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.mini b { display: block; margin-top: 3px; font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mini b i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted); margin-inline-start: 1px; }
/* the full dashboard, over the map */
.dashfull { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; background: rgba(4, 14, 13, .93); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); animation: dfade .2s var(--ease) both; container-type: inline-size; }
.dfhead { flex: none; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.dfhead h3 { margin: 0; font-size: 19px; font-weight: 600; }
.dflive { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.dflive i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: breathe 2s infinite; }
.dflive b { color: var(--ink); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.dfclose { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: var(--ink); font-weight: 500; }
.dfclose:hover { border-color: var(--mint); }
.dfclose svg { width: 16px; height: 16px; }
.dfbody { flex: 1; overflow-y: auto; padding: 18px 22px 28px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
.dfg { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dfg > .span12 { grid-column: span 12; } .dfg > .span8 { grid-column: span 8; } .dfg > .span6 { grid-column: span 6; } .dfg > .span4 { grid-column: span 4; }
.dfg .stack { display: grid; gap: 14px; min-width: 0; }
.dfg .kp { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dfg .k { padding: 15px 18px 16px; }
.dfg .kv { font-size: 36px; }
.dfg .lc { grid-template-rows: 210px auto; }
@container (max-width: 820px) { .dfg > .span8, .dfg > .span4 { grid-column: span 12; } }
@container (max-width: 680px) { .dfg > * { grid-column: span 12 !important; } .dfg .kp { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dfhead, .dfbody { padding-left: 14px; padding-right: 14px; } }
@keyframes dfade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ the guide */
.spot { position: fixed; z-index: 60; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(2, 10, 9, .55), 0 0 0 2px rgba(95, 224, 183, .8); transition: all .3s var(--ease); }
.coach { position: fixed; z-index: 61; width: min(330px, calc(100vw - 24px)); padding: 13px 15px 12px; border-radius: 14px; background: #f4f1e4; color: #0e2b28; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); animation: rise .25s var(--ease) both; }
.coach::before { content: ""; position: absolute; left: var(--ax, 50%); width: 12px; height: 12px; background: #f4f1e4; transform: translateX(-50%) rotate(45deg); }
.coach[data-side="below"]::before { top: -6px; }
.coach[data-side="above"]::before { bottom: -6px; }
.coach[data-side="none"]::before { display: none; }
.coach .ch { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.coach .cstep { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1b7f70; }
.coach .ch b { font-size: 15px; }
.coach .car { font-size: 12.5px; color: #4f6b66; direction: rtl; }
.coach p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: #24403b; }
.coach .cbs { display: flex; gap: 6px; justify-content: flex-end; margin-top: 11px; }
.coach .cb { border-radius: 9px; padding: 6px 12px; border: 1px solid rgba(14, 43, 40, .2); background: transparent; color: #0e2b28; font-weight: 600; font-size: 12.5px; }
.coach .cb.pri { background: #0e3f3c; color: #f4f1e4; border-color: #0e3f3c; }
.coach .cb.ghost { border: 0; color: #4f6b66; font-weight: 500; margin-inline-end: auto; padding-inline-start: 0; }

@media (max-width: 900px) {
  .maplibregl-ctrl-top-right { top: 46px !important; right: 2px !important; }
  .maplibregl-ctrl-group button { width: 28px; height: 28px; }
  .maplibregl-ctrl-bottom-right { bottom: 46px !important; }
  .drawhint { top: 48px; font-size: 11.5px; white-space: normal; width: calc(100% - 20px); }
  .mappop { width: min(270px, calc(100% - 16px)); }
  .codepop { right: 8px; left: 8px; width: auto; top: 48px; }
  .dashfull { position: fixed; z-index: 40; }
  .tabs button { font-size: 11.5px; }
}

/* ------------------------------------------------------------------ the Arabic version (right to left) */
[dir="rtl"] body { font-size: 14.5px; }
[dir="rtl"] .brand b, [dir="rtl"] .who b { letter-spacing: .06em; }
[dir="rtl"] .clockbox span, [dir="rtl"] .stats span, [dir="rtl"] .grp, [dir="rtl"] .kl { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .linklog, [dir="rtl"] .dgrid, [dir="rtl"] .lk, [dir="rtl"] .clockbox b, [dir="rtl"] #codeIn { direction: ltr; }
[dir="rtl"] .linklog { text-align: left; }
[dir="rtl"] .lcplot .tip { direction: ltr; }
[dir="rtl"] .send svg, [dir="rtl"] .openfull svg { transform: scaleX(-1); }
#langBtn { font-family: Tajawal, Plex, sans-serif; font-size: 14px; line-height: 1; }
[dir="rtl"] #langBtn { font-family: Plex, sans-serif; font-size: 11px; letter-spacing: .02em; }

/* a drone on the ground being turned around (quick check or battery swap) */
.dr.turnaround i { opacity: 1; background: transparent; border: 1.5px dashed var(--amber); }
/* the followed drone's state record */
.dtrack { display: grid; gap: 3px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink); }
.dtrack span { display: flex; gap: 8px; }
.dtrack em { flex: none; width: 92px; font-style: normal; color: var(--faint); }
[dir="rtl"] .speed { direction: ltr; }
@media (max-width: 900px) {
  .who { flex: none; }
  .aichip { min-width: 0; } .aichip span { overflow: hidden; text-overflow: ellipsis; }
}
