@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #eef4f3; --card: #fff; --ink: #0f2a27; --ink-2: #33504c; --muted: #6b807c; --line: #e3ecea;
  --brand-950: #062f2b; --brand-900: #08423c; --brand-800: #0b5149; --brand: #0e5f55; --brand-600: #12786b; --brand-500: #17a38c;
  --mint: #e8f6f2; --mint-2: #d5efe8;
  --green: #16a34a; --green-bg: #e9f8ef; --blue: #2f6fe4; --blue-bg: #eaf1fd; --purple: #7c4ddb; --purple-bg: #f1ecfd;
  --orange: #e8731c; --orange-bg: #fdf0e6; --pink: #db2f5b; --pink-bg: #fdecf0;
  --warn: #c2620e; --warn-bg: #fff4e5; --bad: #d23a55; --bad-bg: #fde9ee; --ok: #15803d; --ok-bg: #e4f7ea;
  --radius: 18px; --shadow: 0 1px 2px rgba(8,66,60,.04), 0 10px 30px rgba(8,66,60,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -.01em; }
a { color: var(--blue); }
.ico { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.hidden { display: none !important; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- shared controls ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 16px; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; transition: transform .06s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--brand-800); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.soft { background: var(--mint); color: var(--brand); } .btn.soft:hover { background: var(--mint-2); }
.btn.danger { background: var(--bad-bg); color: var(--bad); } .btn.danger:hover { background: #fbd9e1; }
.btn.white { background: #fff; color: var(--brand); border: 1px solid var(--line); } .btn.white:hover { background: var(--mint); }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 20px; font-size: 15px; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); position: relative; }
.icon-btn:hover { background: var(--mint); }
.icon-btn .badge-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }

label { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 12px 0 5px; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23,163,140,.15); border-color: var(--brand-500); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mint); color: var(--brand); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.blue { background: var(--blue-bg); color: var(--blue); } .pill.grey { background: #eef2f1; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live .dot { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.error { color: var(--bad); font-size: 13px; margin-top: 8px; }
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); background: #10231f; color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 60; font-size: 14px; max-width: 90vw; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* ---------- stat tiles ---------- */
.tile { border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tile .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.tile b { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--ink); }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile.green { background: var(--green-bg); } .tile.green .t-ic { color: var(--green); }
.tile.blue { background: var(--blue-bg); } .tile.blue .t-ic { color: var(--blue); }
.tile.purple { background: var(--purple-bg); } .tile.purple .t-ic { color: var(--purple); }
.tile.orange { background: var(--orange-bg); } .tile.orange .t-ic { color: var(--orange); }
.tile.pink { background: var(--pink-bg); } .tile.pink .t-ic { color: var(--pink); }
.tile.mint { background: rgba(240,246,245,.9); align-items: center; text-align: center; } .tile.mint .t-ic { color: var(--brand); }
.tile .t-ic .ico { width: 22px; height: 22px; }

/* ---------- chat (shared) ---------- */
.ai-spark { width: 26px; height: 26px; }
.chat-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 4px 2px; min-height: 120px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 15px; white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: #f1f6f5; color: var(--ink); border-bottom-left-radius: 5px; }
.chat-input { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 5px 5px 5px 14px; background: #fff; margin-top: 10px; }
.chat-input input { border: 0; padding: 8px 0; outline: none; }
.chat-input input:focus { outline: none; }
.send-btn { width: 40px; height: 40px; border-radius: 11px; border: 0; background: var(--brand-600); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.send-btn:hover { background: var(--brand); }
.orb { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 12px; background: radial-gradient(circle at 35% 30%, #fff 0, #e0f2fe 35%, #c7d2fe 70%, #ddd6fe 100%); box-shadow: 0 0 0 8px rgba(165,180,252,.18), 0 0 34px rgba(99,102,241,.35); }
.orb .ai-spark { width: 26px; height: 26px; }

/* =================================================================
   DOCTOR DASHBOARD
   ================================================================= */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-950) 100%); color: #d7ece8; padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 6px 10px; }
.brand .logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(145deg, #34d3b0, #10a38a); display: grid; place-items: center; color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.brand .logo .ico { width: 24px; height: 24px; stroke-width: 3.2; }
.brand b { color: #fff; font-size: 16px; display: block; }
.brand span { font-size: 10.5px; opacity: .75; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 0; background: none; color: #cfe5e0; cursor: pointer; text-align: left; font-weight: 500; font-size: 14px; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button.active { background: linear-gradient(90deg, rgba(52,211,176,.28), rgba(52,211,176,.12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(94,234,212,.18); }
.nav .count { margin-left: auto; background: #1fae93; color: #fff; font-size: 11.5px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; }
.ai-promo { margin-top: auto; border-radius: 16px; padding: 16px; background: linear-gradient(160deg, rgba(52,211,176,.22), rgba(255,255,255,.04)); border: 1px solid rgba(94,234,212,.22); color: #e6f5f2; }
.ai-promo b { display: block; font-size: 15px; color: #fff; margin: 8px 0 4px; }
.ai-promo p { margin: 0 0 12px; font-size: 12.5px; opacity: .8; }
.ai-promo .btn { background: #fff; color: var(--brand); padding: 8px 14px; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 70% -10%, #f7fbfa 0, var(--bg) 60%); }
.topnav { display: flex; align-items: center; gap: 12px; padding: 16px 24px; }
.date-pill { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; position: relative; }
.date-pill input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--ok-bg); color: var(--ok); font-weight: 600; padding: 8px 14px; border-radius: 99px; }
.profile { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 5px 12px 5px 5px; cursor: pointer; position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.profile .avatar { background: linear-gradient(145deg, #dbe7e4, #b9d0cb); color: var(--brand); }
.profile b { display: block; font-size: 13.5px; } .profile small { color: var(--muted); font-size: 11.5px; }
.menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(8,66,60,.16); padding: 6px; z-index: 40; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 13.5px; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--mint); }
.notif-list { max-height: 320px; overflow-y: auto; min-width: 300px; }
.notif-list div { padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }

.content { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; padding: 4px 24px 24px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.now { position: relative; overflow: hidden; background: linear-gradient(115deg, #ffffff 0%, #f4fbf9 45%, #def3ed 100%); }
.now::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(94,234,212,.28), transparent 65%); pointer-events: none; }
.now-grid { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; position: relative; z-index: 1; }
.now .label { font-weight: 600; color: var(--ink-2); font-size: 15px; }
.now .num { font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -3px; color: var(--brand-900); font-variant-numeric: tabular-nums; margin-top: 10px; }
.now .timer { font-size: 12px; color: var(--muted); margin-top: 6px; }
.now h2 { font-size: 21px; margin: 0; } .now h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.now .meta { display: flex; align-items: center; gap: 12px; margin: 8px 0; font-size: 13px; color: var(--ink-2); }
.now .meta .ico { width: 14px; height: 14px; }
.note-box { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.8); padding: 2px 12px; margin-top: 10px; color: var(--muted); }
.note-box .ico { width: 15px; height: 15px; }
.note-box textarea { border: 0; background: none; resize: none; padding: 9px 0; min-height: 38px; }
.note-box textarea:focus { outline: none; }
.stetho { position: absolute; right: 18px; top: 12px; width: 96px; height: 96px; z-index: 1; opacity: .95; filter: drop-shadow(0 6px 14px rgba(15,118,110,.25)); }
.controls { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr auto; gap: 10px; margin-top: 18px; position: relative; z-index: 2; }
.controls .btn { padding: 13px 14px; font-size: 14.5px; }
.controls .btn.call { background: linear-gradient(180deg, #11695e, #0b4f47); box-shadow: 0 6px 16px rgba(11,79,71,.28); }
.controls .btn.soft { background: #e7f3f0; color: var(--brand-900); }
.controls .icon-btn { height: 100%; width: 46px; }

.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tiles-card { padding: 14px; }

.table-card { padding: 16px 16px 6px; }
.tabbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tabbar .tab { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 15px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.tabbar .tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tabbar .date-pill { padding: 7px 12px; font-weight: 500; }
.tabbar .icon-btn { width: 38px; height: 38px; }
.search-input { max-width: 220px; padding: 8px 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
td .sub { font-size: 12px; color: var(--muted); }
td.tok { font-weight: 700; }
.pt { display: flex; gap: 11px; align-items: center; }
.pt .avatar { width: 34px; height: 34px; font-size: 12px; }
.av-0 { background: #e0efff; color: #2f6fe4; } .av-1 { background: #f0e9fd; color: #7c4ddb; } .av-2 { background: #e2f6ec; color: #15803d; }
.av-3 { background: #fdeee2; color: #c2620e; } .av-4 { background: #fde8ee; color: #c62a52; } .av-5 { background: #e3f4f1; color: #0e5f55; }
tr.serving td { background: #f2faf8; }
tr.done td, tr.cancelled td { color: var(--muted); }
.row-more { position: relative; display: inline-block; }
.row-more .icon-btn { width: 32px; height: 32px; border: 0; background: none; }

.ai-panel { position: sticky; top: 16px; display: flex; flex-direction: column; height: calc(100vh - 100px); min-height: 560px; }
.ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ai-head h2 { margin: 0; font-size: 18px; }
.beta { background: #eef0ff; color: #5b5bd6; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.ai-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ai-chips .chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ai-chips .chip:hover { border-color: var(--brand-500); background: var(--mint); }
.ai-chips .chip .ico { width: 16px; height: 16px; color: var(--brand-600); }
.ai-panel .chat-msgs { margin-top: 14px; }
.chat-msgs > :first-child { margin-top: auto; }
.ai-panel .msg.assistant { background: #f3f5fb; border: 1px solid #e8ebf6; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; margin-top: 22px; }
.bars div { flex: 1; background: linear-gradient(180deg, #1fae93, #0e5f55); border-radius: 7px 7px 2px 2px; position: relative; min-height: 3px; }
.bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.bar-labels { display: flex; gap: 6px; margin-top: 4px; } .bar-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }

dialog { border: 0; border-radius: 20px; padding: 22px; width: min(500px, 94vw); box-shadow: 0 24px 70px rgba(8,66,60,.3); }
dialog::backdrop { background: rgba(6,47,43,.4); backdrop-filter: blur(2px); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--brand-900), var(--brand-950)); }
.login-card { width: min(420px, 100%); }

@media (max-width: 1280px) { .content { grid-template-columns: 1fr; } .ai-panel { position: static; height: 560px; } }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 18px 10px; } .brand div, .nav button span, .ai-promo, .nav .count { display: none; }
  .nav button { justify-content: center; padding: 13px; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
@media (max-width: 680px) {
  .shell { grid-template-columns: 1fr; } .sidebar { display: none; }
  .topnav { padding: 12px; flex-wrap: wrap; } .content { padding: 4px 12px 16px; }
  .profile div { display: none; }
  .now-grid { grid-template-columns: 1fr; } .stetho { width: 64px; height: 64px; }
  .controls { grid-template-columns: 1fr 1fr; } .controls .icon-btn { width: 100%; height: 46px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* =================================================================
   PATIENT APP
   ================================================================= */
.p-body { background: #eef4f3; }
.p-header { position: sticky; top: 0; z-index: 10; background: linear-gradient(180deg, var(--brand-900), #0a4a43); color: #fff; padding: 14px 16px 16px; display: flex; align-items: center; gap: 11px; padding-top: max(14px, env(safe-area-inset-top)); }
.p-header .logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #34d3b0, #10a38a); display: grid; place-items: center; color: #fff; }
.p-header .logo .ico { width: 24px; height: 24px; stroke-width: 3.4; }
.p-header h1 { font-size: 17px; margin: 0; font-weight: 700; }
.p-header .sub { font-size: 11.5px; opacity: .78; }
.p-header .live-pill { background: rgba(255,255,255,.12); color: #fff; padding: 6px 12px; font-size: 12.5px; }
.p-header .live-pill .dot { background: #4ade80; }
.p-header .bell { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; position: relative; }
.p-header .bell .ico { width: 22px; height: 22px; }
.wrap { max-width: 520px; margin: 0 auto; padding: 14px 14px 110px; display: flex; flex-direction: column; gap: 12px; }

.token-card { position: relative; overflow: hidden; border-radius: 20px; background: linear-gradient(160deg, #ffffff 30%, #eaf7f3 100%); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px; }
.token-card .wave { position: absolute; right: 0; top: 0; width: 75%; height: 95px; pointer-events: none; opacity: .55; }
.token-card .head { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.token-card .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.token-card .num { font-size: 64px; font-weight: 800; letter-spacing: -2px; color: var(--brand-900); line-height: 1.05; }
.token-card .who { text-align: right; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.token-card .who b { font-size: 15px; color: var(--ink); }
.seg { position: relative; height: 6px; border-radius: 99px; background: #e2ece9; margin: 14px 0 16px; }
.seg .fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #0b5149, #17a38c); transition: width .5s; }
.seg .pip { position: absolute; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #c8d8d4; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tiles3 .tile { padding: 12px 8px; gap: 3px; }
.tiles3 .tile b { font-size: 18px; white-space: nowrap; } .tiles3 .tile .t-ic { width: auto; height: auto; }
.reach { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #ecf8f1; border: 1px solid #d6efe0; color: var(--ink); font-size: 13.5px; }
.reach .ico { width: 22px; height: 22px; color: var(--green); }
.token-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.token-actions .btn { padding: 13px; }
.token-card.serving { background: linear-gradient(160deg, #ffffff 20%, #dcf5e6 100%); }

.now-big { text-align: center; }
.now-big .num { font-size: 84px; font-weight: 800; letter-spacing: -3px; color: var(--brand-900); line-height: 1; }
.select-card label { margin-top: 0; }

.find summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; font-size: 14px; }
.find summary::-webkit-details-marker { display: none; }
.find summary .ico { width: 14px; height: 14px; transition: transform .2s; }
.find[open] summary .ico { transform: rotate(90deg); }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day { flex: 0 0 auto; min-width: 92px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; background: #fff; cursor: pointer; }
.day.sel { border-color: var(--brand-500); background: var(--mint); box-shadow: 0 0 0 2px rgba(23,163,140,.15); }
.day.full { opacity: .45; cursor: not-allowed; }
.day b { display: block; font-size: 13.5px; }

.ptabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(8,66,60,.06); }
.ptabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: var(--muted); font-size: 11.5px; font-weight: 500; cursor: pointer; padding: 4px 0; }
.ptabs button .ico { width: 22px; height: 22px; }
.ptabs button .ic-wrap { width: 44px; height: 32px; display: grid; place-items: center; border-radius: 12px; transition: all .2s; }
.ptabs button.active { color: var(--brand); font-weight: 700; }
.ptabs button.active .ic-wrap { background: linear-gradient(180deg, #17a38c, #0e5f55); color: #fff; width: 52px; height: 44px; border-radius: 15px; margin-top: -18px; box-shadow: 0 8px 18px rgba(14,95,85,.35), 0 0 0 4px #fff; }

.alert-banner { position: fixed; top: 74px; left: 12px; right: 12px; z-index: 30; max-width: 500px; margin: auto; background: var(--warn); color: #fff; padding: 14px 16px; border-radius: 16px; box-shadow: 0 12px 34px rgba(0,0,0,.25); font-weight: 600; }
.p-chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 380px; }
.p-chat .ai-chips { flex-direction: row; flex-wrap: wrap; }

/* =================================================================
   TV DISPLAY
   ================================================================= */
.tv { min-height: 100vh; background: radial-gradient(1200px 700px at 50% 30%, #0b4a43 0, var(--brand-950) 70%); color: #fff; display: grid; grid-template-rows: auto 1fr auto; padding: 3vw; font-family: Inter, system-ui, sans-serif; }
.tv .now { display: grid; place-items: center; text-align: center; background: none; }
.tv .now::after { display: none; }
.tv .now .n { font-size: 28vw; font-weight: 800; line-height: 1; color: #5eead4; font-variant-numeric: tabular-nums; letter-spacing: -1vw; }
.tv .next { font-size: 3vw; opacity: .9; }
.tv .flash { animation: flash 1s 3; }
@keyframes flash { 50% { color: #fff; transform: scale(1.04); } }
