:root {
  --scale: 1;
  --bg: #F2F7F6;
  --card: #FFFFFF;
  --tile: #F6FAF9;
  --ink: #0F2A3D;
  --muted: #566B78;
  --line: #E0EBE8;
  --pri: #0B7F6E;
  --grad: linear-gradient(135deg, #10947F 0%, #0B7A70 55%, #0A6672 100%);
  --onpri: #FFFFFF;
  --soft: #E1F3EE;
  --softline: #A9DCCD;
  --blue: #1F5F9E;
  --bluesoft: #E6EFF8;
  --warn: #7A4A00;
  --warnsoft: #FFF1CF;
  --warnline: #F1DA9C;
  --danger: #B0261D;
  --dangersoft: #FCEAE8;
  --dangerline: #F3C6C1;
  --nav: #FFFFFF;
  --shadow: 0 4px 16px rgba(15, 42, 61, 0.06);
  --btnshadow: 0 8px 18px rgba(11, 122, 112, 0.28);
  --sel: 0 0 0 4px rgba(16, 148, 127, 0.12);
  --selborder: #10947F;
  --avatar: #EAF2FA;
  --w1: #1B4F86;
  --w2: #2E9C7F;
  --map: #E8F1EE;
  --mapblk: #D7E6E1;
  --maproad: #FFFFFF;
  --stage: #E4EEEC;
  --display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --sans: 'IBM Plex Sans Arabic', 'Readex Pro', system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #071A2B;
  --card: #0D2538;
  --tile: #0A2032;
  --ink: #EAF6F3;
  --muted: #9FB7C2;
  --line: #1D3E53;
  --pri: #45E0B4;
  --grad: linear-gradient(135deg, #5BEBC2 0%, #2FCB9F 100%);
  --onpri: #04241B;
  --soft: rgba(69, 224, 180, 0.12);
  --softline: rgba(69, 224, 180, 0.55);
  --blue: #7DBBF5;
  --bluesoft: rgba(125, 187, 245, 0.14);
  --warn: #F6C452;
  --warnsoft: rgba(246, 196, 82, 0.14);
  --warnline: rgba(246, 196, 82, 0.45);
  --danger: #FF8F85;
  --dangersoft: rgba(255, 143, 133, 0.12);
  --dangerline: rgba(255, 143, 133, 0.4);
  --nav: #081F31;
  --shadow: none;
  --btnshadow: 0 0 22px rgba(69, 224, 180, 0.28);
  --sel: 0 0 18px rgba(69, 224, 180, 0.22);
  --selborder: rgba(69, 224, 180, 0.85);
  --avatar: #10304A;
  --w1: #EAF6F3;
  --w2: #45E0B4;
  --map: #0B2336;
  --mapblk: #10304A;
  --maproad: #163B55;
  --stage: #04111D;
  color-scheme: dark;
}

[data-contrast="high"] {
  --muted: var(--ink);
  --line: var(--ink);
  --softline: var(--pri);
}

[data-motion="reduce"] *, [data-motion="reduce"] *::before, [data-motion="reduce"] *::after {
  animation: none !important;
  transition: none !important;
}

* { box-sizing: border-box; }

html { font-size: calc(16px * var(--scale)); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pri); }

:focus-visible { outline: 3px solid var(--pri); outline-offset: 2px; }

.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 820px; margin: 0 auto; }

.shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.drawer-bg { position: fixed; inset: 0; background: rgba(4, 17, 29, .45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.panel {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: min(520px, 100%);
  z-index: 61;
  border-inline-start: 1px solid var(--line);
  box-shadow: 0 0 60px rgba(4, 17, 29, .25);
  transform: translateX(-105%);
  transition: transform .25s ease;
  visibility: hidden;
}
[dir="ltr"] .drawer { transform: translateX(105%); }
.drawer.open { transform: none; visibility: visible; }

.composer-bar { border-top: 1px solid var(--line); background: var(--bg); }
.composer-bar .composer { border-top: none; }
.nav-in { display: flex; }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--bg); }
.login-brand { background: var(--grad); color: var(--onpri); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; padding: 48px 56px; }
.login-brand img { width: 150px; height: 128px; object-fit: contain; background: #fff; border-radius: 28px; padding: 12px; }
.login-brand .wordmark, .login-brand .wordmark b { color: var(--onpri); }
.lb-tag { font-size: 1.15rem; opacity: .92; }
.login-brand ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-family: var(--display); font-weight: 600; }
.login-brand li { display: flex; align-items: center; gap: 10px; }
.login-brand li span { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; }
.login-main { padding: 24px 40px 40px; display: flex; flex-direction: column; gap: 16px; }
.login-card { width: 100%; max-width: 520px; margin: auto; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; color: var(--muted); font-weight: 600; }
.field input, .field select, .ta { height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 1rem; color: var(--ink); width: 100%; }
.ta { height: auto; padding: 12px 14px; resize: vertical; font-family: var(--sans); }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 28px 22px; align-items: center; text-align: center; }
  .login-brand img { width: 110px; height: 94px; }
  .login-brand ul { display: none; }
  .login-main { padding: 16px 18px 28px; }
}

.coord { min-height: 100vh; background: var(--bg); }
.c-in { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: 28px; }
.c-top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.c-top .c-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.c-main { padding-block: 22px 40px; display: flex; flex-direction: column; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-v { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1.2; }
.c-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.c-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.livedot { width: 8px; height: 8px; border-radius: 9999px; background: var(--muted); display: inline-block; }
.livedot.on { background: var(--pri); animation: pulse2 1.6s infinite; }
@keyframes pulse2 { 50% { opacity: .35; } }
@media (max-width: 1100px) { .c-grid { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .c-two { grid-template-columns: 1fr; } .c-in { padding-inline: 14px; } }

.top { background: var(--bg); }
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
  gap: 8px;
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand img { width: 44px; height: 38px; object-fit: contain; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--w1); white-space: nowrap; direction: ltr; }
.wordmark b { color: var(--w2); font-weight: 600; }

.top-actions { display: flex; align-items: center; gap: 6px; }

.seg {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 3px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--line);
}
.seg button {
  height: 30px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.seg button[aria-pressed="true"] { background: var(--soft); color: var(--pri); font-weight: 700; }

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn .dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 9999px; background: var(--pri); border: 2px solid var(--card); }

.screen { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.screen-in { animation: fadeUp .28s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.head { padding: 2px 18px 14px; }
.badge { display: inline-block; font-size: 0.6875rem; font-weight: 600; color: var(--pri); background: var(--soft); padding: 3px 10px; border-radius: 9999px; margin-bottom: 8px; }
.head-row { display: flex; align-items: center; gap: 12px; }
.head-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); color: var(--pri); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.head h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.55rem; line-height: 1.35; }
.head p { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.back { width: 44px; height: 44px; border-radius: 9999px; border: none; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
[dir="ltr"] .back svg, [dir="ltr"] .flip svg { transform: scaleX(-1); }

.body { padding: 0 18px 22px; display: flex; flex-direction: column; gap: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.card.hl { border: 1.5px solid var(--selborder); box-shadow: var(--sel); }
.card.tight { padding: 12px 14px; }
.tile { background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }

.h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.05rem; line-height: 1.5; }
.h2.big { font-size: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; line-height: 1.6; }
.xs { font-size: 0.75rem; }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
p { margin: 0; }

.ic-box { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); color: var(--pri); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic-box.sm { width: 38px; height: 38px; border-radius: 12px; }

.btn {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 9999px;
  border: none;
  background: var(--grad);
  color: var(--onpri);
  box-shadow: var(--btnshadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.out { background: transparent; color: var(--pri); border: 1.5px solid var(--softline); box-shadow: none; }
.btn.sm { min-height: 46px; font-size: 0.9375rem; }
.btn[disabled] { background: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }
[data-big="1"] .btn { min-height: 64px; }

.link { background: none; border: none; color: var(--pri); font-weight: 700; padding: 8px; min-height: 44px; font-size: 0.875rem; }

.note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-size: 0.8125rem; line-height: 1.65; }
.note > svg { color: var(--pri); flex-shrink: 0; }
.note.blue { background: var(--bluesoft); }
.note.blue > svg { color: var(--blue); }
.note.warn { background: var(--warnsoft); border: 1px solid var(--warnline); }
.note.warn > svg { color: var(--warn); }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 9999px; color: var(--pri); background: var(--soft); white-space: nowrap; }
.pill.warn { color: var(--warn); background: var(--warnsoft); }
.pill.blue { color: var(--blue); background: var(--bluesoft); }
.pill.danger { color: var(--danger); background: var(--dangersoft); }
.pill.mute { color: var(--muted); background: var(--tile); }

.chk { width: 28px; height: 28px; border-radius: 9999px; background: var(--grad); color: var(--onpri); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pend { width: 28px; height: 28px; border-radius: 9999px; border: 1.5px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 0.8125rem; flex-shrink: 0; }
.spin { width: 28px; height: 28px; border-radius: 9999px; border: 3px solid var(--soft); border-top-color: var(--pri); animation: rot 0.9s linear infinite; flex-shrink: 0; }
@keyframes rot { to { transform: rotate(360deg); } }

.nav { display: flex; padding: 2px 6px 10px; background: var(--nav); border-top: 1px solid var(--line); }
.nav button { position: relative; flex: 1; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: none; background: none; color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.nav button[aria-current="page"] { color: var(--pri); font-weight: 700; }
.nav button[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--pri); }

.avatar { width: 40px; height: 40px; border-radius: 9999px; background: var(--avatar); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 78%; height: 64%; object-fit: contain; }
.avatar.lg { width: 58px; height: 58px; }

.chat { flex: 1; padding: 0 14px 12px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.msg.agent { align-self: flex-end; flex-direction: row-reverse; }
.msg.user { align-self: flex-start; }
.bubble { padding: 12px 14px; font-size: 0.95rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.agent .bubble { background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; box-shadow: var(--shadow); }
.msg.user .bubble { background: var(--soft); border: 1px solid var(--softline); border-radius: 18px 18px 6px 18px; }
[dir="ltr"] .msg.agent { align-self: flex-start; flex-direction: row; }
[dir="ltr"] .msg.user { align-self: flex-end; flex-direction: row-reverse; }
[dir="ltr"] .msg.agent .bubble { border-radius: 18px 18px 18px 6px; }
[dir="ltr"] .msg.user .bubble { border-radius: 18px 18px 6px 18px; }
.msg-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.6875rem; color: var(--muted); }
.speak { width: 32px; height: 32px; border-radius: 9999px; border: 1px solid var(--line); background: var(--card); color: var(--pri); display: inline-flex; align-items: center; justify-content: center; }
.speak[aria-pressed="true"] { background: var(--soft); }
.uavatar { width: 38px; height: 38px; border-radius: 9999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 9999px; background: var(--pri); opacity: .4; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: 1; } }

.plan { margin-inline: 46px 0; }
[dir="ltr"] .plan { margin-inline: 46px 0; }
.plan ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.plan li { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; }
.plan li.now { background: var(--soft); }
.plan code { font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem; color: var(--pri); background: var(--card); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; direction: ltr; }

.composer { padding: 8px 12px 10px; border-top: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--softline); background: var(--card); color: var(--pri); font-size: 0.8125rem; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--grad); color: var(--onpri); border-color: transparent; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 9999px; border: 1px solid var(--line); background: var(--card); font-size: 0.95rem; }
.round { width: 50px; height: 50px; border-radius: 9999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.round.pri { background: var(--grad); color: var(--onpri); border: none; }
.round.live { background: var(--danger); color: #fff; border: none; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(176, 38, 29, .35); } 50% { box-shadow: 0 0 0 10px rgba(176, 38, 29, 0); } }

.option { display: block; cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; text-align: start; width: 100%; }
.option[aria-checked="true"] { border: 1.5px solid var(--selborder); box-shadow: var(--sel); }
.radio { width: 22px; height: 22px; border-radius: 9999px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.option[aria-checked="true"] .radio { border-color: var(--pri); }
.option[aria-checked="true"] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 9999px; background: var(--pri); }

.map { position: relative; height: 190px; border-radius: 20px; overflow: hidden; background: var(--map); border: 1px solid var(--line); }
.map svg { width: 100%; height: 100%; display: block; }
.mpin { position: absolute; width: 40px; height: 40px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); border: none; }
.mpin.on { background: var(--grad); color: var(--onpri); box-shadow: 0 0 0 5px var(--soft); }
.mpin.off { background: var(--card); color: var(--blue); border: 2px solid var(--blue); width: 34px; height: 34px; }
.mpin.home { background: var(--card); color: var(--pri); border: 2px solid var(--pri); }
.map-tag { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 0.75rem; font-weight: 600; background: var(--card); padding: 4px 10px; border-radius: 9999px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border-radius: 12px; }
.steps li.now { background: var(--soft); font-weight: 700; }
.steps li.next { color: var(--muted); }
.steps .num { width: 30px; height: 30px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 0.8125rem; flex-shrink: 0; }
.steps li.done .num { background: var(--grad); color: var(--onpri); }
.steps li.now .num { border: 2px solid var(--pri); color: var(--pri); }
.steps li.next .num { border: 1.5px solid var(--line); }

.qa { min-height: 100px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 0.875rem; }

.listrow { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 8px 0; background: none; border: none; border-bottom: 1px solid var(--line); text-align: start; color: var(--ink); }
.listrow:last-child { border-bottom: none; }

.switch { position: relative; width: 52px; height: 30px; border-radius: 9999px; background: var(--line); border: none; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 9999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: inset-inline-start .2s; }
.switch[aria-checked="true"] { background: var(--grad); }
.switch[aria-checked="true"]::after { inset-inline-start: 25px; }

.segbig { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; border-radius: 9999px; background: var(--tile); border: 1px solid var(--line); }
.segbig button { min-height: 44px; border-radius: 9999px; border: none; background: transparent; font-weight: 600; font-size: 0.875rem; }
.segbig button[aria-pressed="true"] { background: var(--grad); color: var(--onpri); font-weight: 700; }

input[type="range"] { width: 100%; accent-color: var(--pri); height: 28px; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline li { display: flex; gap: 12px; align-items: center; }
.tl-card { flex: 1; display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.tl-card.warn { background: var(--warnsoft); border-color: var(--warnline); }
.tl-dot { width: 40px; height: 40px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--grad); color: var(--onpri); }
.tl-dot.wait { background: transparent; border: 2px dashed var(--softline); color: var(--softline); }
.tl-dot.warn { background: transparent; border: 2px dashed var(--warn); color: var(--warn); }

.mic-hero { position: relative; width: 210px; height: 210px; margin: 6px auto 0; display: flex; align-items: center; justify-content: center; }
.mic-hero::before, .mic-hero::after { content: ""; position: absolute; border-radius: 9999px; background: var(--soft); }
.mic-hero::before { inset: 0; opacity: .55; }
.mic-hero::after { inset: 26px; }
.mic-hero.live::before { animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.1); opacity: 0; } }
.mic-hero button { position: relative; z-index: 1; width: 116px; height: 116px; border-radius: 9999px; border: none; background: var(--grad); color: var(--onpri); box-shadow: var(--btnshadow); display: flex; align-items: center; justify-content: center; }
.mic-hero.live button { background: var(--danger); color: #fff; }

.wave { display: inline-flex; align-items: center; gap: 3px; height: 26px; }
.wave i { width: 3px; border-radius: 2px; background: var(--pri); opacity: .75; height: 8px; }
.wave.on i { animation: wv 1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: .15s; }
.wave i:nth-child(3n) { animation-delay: .3s; }
@keyframes wv { 50% { height: 24px; } }

.diagram { position: relative; height: 220px; overflow: hidden; padding: 0; }
.seat { position: absolute; left: 24px; top: 72px; width: 170px; height: 20px; border-radius: 10px; background: var(--ink); opacity: .85; }
.bowl-body { position: absolute; left: 44px; top: 92px; width: 130px; height: 96px; border-radius: 0 0 42px 42px; background: var(--tile); border: 2px solid var(--line); }
.holder { position: absolute; left: 236px; top: 44px; width: 12px; height: 156px; border-radius: 6px; background: var(--line); }
.base { position: absolute; left: 222px; top: 196px; width: 64px; height: 8px; border-radius: 4px; background: var(--line); }
.cup { position: absolute; width: 64px; height: 44px; transition: left .7s ease, top .7s ease; }
.cup .c { position: absolute; left: 0; top: 10px; width: 64px; height: 34px; border-radius: 6px 6px 18px 18px; background: var(--grad); }
.cup .lid { position: absolute; left: -4px; width: 72px; height: 8px; border-radius: 4px; background: var(--blue); transition: top .4s ease; }
.dlabel { position: absolute; font-size: 0.75rem; color: var(--muted); }

.stars { display: flex; justify-content: center; gap: 6px; }
.stars button { background: none; border: none; padding: 2px; color: var(--softline); }
.stars button[aria-pressed="true"] { color: var(--pri); }

.sheet-wrap { position: fixed; inset: 0; background: rgba(4, 17, 29, .45); display: flex; align-items: flex-end; z-index: 30; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 640px; margin: 0 auto; max-height: 85%; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 18px 22px; display: flex; flex-direction: column; gap: 12px; animation: up .25s ease; }
@keyframes up { from { transform: translateY(30px); } }
.grab { width: 44px; height: 5px; border-radius: 9999px; background: var(--line); margin: 4px auto 6px; }

.toast { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 40; max-width: 90%; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 0.875rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: fadeUp .25s ease; }

.panel-head { padding: 16px 18px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); background: var(--card); }
.panel-tabs { display: flex; gap: 4px; padding: 10px 14px 0; }
.panel-tabs button { flex: 1; min-height: 44px; border: none; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 600; font-size: 0.875rem; }
.panel-tabs button[aria-selected="true"] { color: var(--pri); border-bottom-color: var(--pri); font-weight: 700; }
.panel-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.log li { display: flex; gap: 10px; animation: fadeUp .25s ease; }
.log time { font-size: 0.75rem; color: var(--muted); width: 50px; flex-shrink: 0; padding-top: 2px; direction: ltr; text-align: start; }
.log .entry { flex: 1; padding-inline-start: 10px; border-inline-start: 2px solid var(--softline); }
.log code { font-family: ui-monospace, Menlo, monospace; font-size: 0.75rem; color: var(--pri); direction: ltr; display: inline-block; }
table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
th { text-align: start; color: var(--muted); font-weight: 600; padding: 8px; background: var(--tile); }
td { padding: 10px 8px; border-top: 1px solid var(--line); }
tr.me td { background: var(--soft); }
.bar { height: 14px; border-radius: 4px; background: var(--tile); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--pri); }
.bar > span.hid { background: repeating-linear-gradient(135deg, var(--line) 0 6px, transparent 6px 12px); width: 100%; }
.demo-btn { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 0.875rem; text-align: start; }
.demo-btn[disabled] { opacity: .45; cursor: not-allowed; }
.demo-btn svg { color: var(--pri); flex-shrink: 0; }

@media (max-width: 520px) {
  .top .wordmark { display: none; }
  .top-actions { gap: 4px; }
  .top-in { padding: 12px 12px 6px; }
  .c-top .wordmark { font-size: .95rem; }
  .c-top .top-actions .btn span { display: none; }
  .c-top .top-actions .btn { min-height: 44px; padding: 0 12px; }
  .coord { overflow-x: hidden; }
}

.agent-hub { background: linear-gradient(160deg, var(--card) 0%, var(--soft) 140%); border-color: var(--softline); }
.ai-strip { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--bluesoft); color: var(--blue); font-size: .8125rem; font-weight: 700; }
.ai-strip code { font-family: ui-monospace, Menlo, monospace; font-size: .6875rem; color: var(--muted); font-weight: 500; direction: ltr; margin-inline-start: auto; }

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.login-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #04212E 0%, #073D46 40%, #0A6A5E 75%, #10947F 100%);
  background-size: 220% 220%;
  animation: bgshift 14s ease-in-out infinite;
  isolation: isolate;
}
@keyframes bgshift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
#neural { position: absolute; inset: 0; z-index: 0; }
.orb { position: absolute; border-radius: 9999px; filter: blur(60px); opacity: .55; z-index: 0; pointer-events: none; }
.orb.o1 { width: 340px; height: 340px; background: #2CF0B8; top: -80px; inset-inline-start: -60px; animation: float1 11s ease-in-out infinite; }
.orb.o2 { width: 280px; height: 280px; background: #3C8DD6; bottom: -60px; inset-inline-end: -40px; animation: float2 13s ease-in-out infinite; }
.orb.o3 { width: 200px; height: 200px; background: #45E0B4; top: 45%; inset-inline-start: 55%; opacity: .3; animation: float1 9s ease-in-out infinite reverse; }
@keyframes float1 { 50% { transform: translate(40px, 30px) scale(1.12); } }
@keyframes float2 { 50% { transform: translate(-30px, -40px) scale(1.08); } }
.lb-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; max-width: 460px; pointer-events: none; }
.lb-inner .glass, .lb-inner .ai-chip { pointer-events: auto; }
.logo-ring { position: relative; width: 150px; height: 150px; border-radius: 34px; padding: 4px; display: flex; align-items: center; justify-content: center; }
.ring-spin { position: absolute; inset: 0; border-radius: 34px; background: conic-gradient(from var(--ang), #2CF0B8, #3C8DD6, transparent 40%, #2CF0B8 70%, #45E0B4); animation: spin 4s linear infinite; filter: drop-shadow(0 0 14px rgba(44, 240, 184, .7)); }
@keyframes spin { to { --ang: 360deg; } }
.login-brand .logo-ring img { position: relative; width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 30px; padding: 14px; box-shadow: 0 0 40px rgba(44, 240, 184, .35); }
.login-brand img { width: auto; height: auto; background: none; padding: 0; border-radius: 0; }
.ai-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 9999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(160, 255, 228, .35); color: #CFFFF0; font-size: .8125rem; font-weight: 700; backdrop-filter: blur(6px); box-shadow: 0 0 20px rgba(44, 240, 184, .25); }
.ai-chip .livedot { background: #2CF0B8; }
.shimmer { margin: 0; font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1.1; background: linear-gradient(90deg, #FFFFFF 0%, #A6FFE4 30%, #FFFFFF 50%, #7CC6FF 70%, #FFFFFF 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shim 5s linear infinite; text-shadow: 0 0 30px rgba(44, 240, 184, .25); }
@keyframes shim { to { background-position: 200% center; } }
.lb-tag { color: #DDF7EF; font-size: 1.1rem; }
.typed-line { min-height: 1.8em; font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: #7DFFD6; text-shadow: 0 0 16px rgba(44, 240, 184, .6); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: #7DFFD6; margin-inline-start: 4px; vertical-align: -3px; animation: blinkc 1s steps(2) infinite; box-shadow: 0 0 8px #2CF0B8; }
@keyframes blinkc { 50% { opacity: 0; } }
.login-brand ul { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 6px; }
.glass { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(160, 255, 228, .22); backdrop-filter: blur(8px); color: #fff; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.glass:hover { transform: translateX(-4px); border-color: rgba(160, 255, 228, .6); box-shadow: 0 0 24px rgba(44, 240, 184, .3); }
[dir="ltr"] .glass:hover { transform: translateX(4px); }
.glass > span { width: 40px; height: 40px; border-radius: 12px; background: rgba(44, 240, 184, .18); color: #A6FFE4; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.glass b { display: block; font-family: var(--display); font-weight: 600; font-size: .98rem; }
.glass small { display: block; color: #BFE9DD; font-size: .78rem; }

.glow-card { position: relative; }
.glow-card::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--ang), transparent 0deg, #2CF0B8 60deg, #3C8DD6 120deg, transparent 180deg, transparent 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 5s linear infinite; pointer-events: none; opacity: .9; }
.login-card.glow-card { padding: 28px; border-radius: 26px; background: var(--card); box-shadow: 0 20px 60px rgba(11, 122, 112, .14), 0 0 0 1px var(--line); }
.plan.glow-card::before { opacity: 0; transition: opacity .3s; }
.plan.glow-card.thinking::before { opacity: 1; animation-duration: 2s; }
.plan.thinking { box-shadow: 0 0 30px rgba(44, 240, 184, .25); }

.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; inset-inline-start: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: sweep 3.2s ease-in-out infinite; }
@keyframes sweep { 0% { inset-inline-start: -60%; } 55%, 100% { inset-inline-start: 130%; } }

.pulse-ring { position: relative; overflow: visible; }
.pulse-ring::after { content: ""; position: absolute; inset: -4px; border-radius: 9999px; border: 2px solid var(--pri); opacity: .6; animation: ring2 2.2s ease-out infinite; }
@keyframes ring2 { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }

.option[role="radio"] { transition: box-shadow .25s, border-color .25s, transform .2s; }
.option[role="radio"]:hover { box-shadow: 0 0 0 4px var(--soft); }
.option[aria-checked="true"] { box-shadow: var(--sel), 0 0 26px rgba(44, 240, 184, .18); }

@media (max-width: 860px) {
  .login-brand { padding: 30px 20px 26px; }
  .lb-inner { align-items: center; text-align: center; max-width: none; }
  .login-brand ul { display: none; }
  .logo-ring { width: 108px; height: 108px; border-radius: 26px; }
  .ring-spin { border-radius: 26px; }
  .login-brand .logo-ring img { border-radius: 22px; padding: 10px; }
  .shimmer { font-size: 2.2rem; }
}
