/* =============================================================================
   RIDKK × MHI — Spare Parts Intelligence Platform
   Dark navy sidebar (RIDKK identity) · light operational workspace
============================================================================= */

:root {
  --navy: #0a1628;
  --navy-2: #12233d;
  --navy-3: #1a2942;
  --gold: #c9a227;
  --gold-light: #e8c547;
  --bg: #f2f4f8;
  --card: #ffffff;
  --ink: #17233a;
  --ink-soft: #5a6982;
  --ink-dim: #93a0b4;
  --line: #e3e8f0;
  --ok: #0e9f6e;
  --ok-bg: #e3f6ef;
  --warn: #d97706;
  --warn-bg: #fdf3e3;
  --crit: #dc2626;
  --crit-bg: #fdeaea;
  --info: #2563eb;
  --info-bg: #e8effd;
  --purple: #7c3aed;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(23, 35, 58, .07), 0 4px 14px rgba(23, 35, 58, .05);
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; }

#app { display: flex; min-height: 100vh; }

/* ------------------------------- sidebar --------------------------------- */
#sidebar {
  width: 232px; flex: 0 0 232px; background: linear-gradient(180deg, var(--navy) 0%, #0c1b31 100%);
  color: #dfe6f2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 22px 20px 16px; border-bottom: 1px solid rgba(201, 162, 39, .18); }
.brand-logo {
  font-weight: 800; font-size: 24px; letter-spacing: 5px;
  background: linear-gradient(135deg, #c9a227, #e8c547 55%, #c9a227);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: 3.2px; color: #8fa0ba; margin-top: 2px; }
.brand-client { font-size: 11px; color: #aab8cd; margin-top: 12px; }
.brand-client strong { color: #fff; letter-spacing: .5px; }

#nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
#nav a {
  display: flex; align-items: center; gap: 10px; color: #b9c5d8; text-decoration: none;
  padding: 10px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; position: relative;
}
#nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
#nav a.active { background: rgba(201, 162, 39, .14); color: var(--gold-light); font-weight: 600; }
#nav a.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--gold); }
.nico { width: 18px; text-align: center; opacity: .9; }
.nbadge {
  margin-left: auto; background: var(--gold); color: var(--navy); border-radius: 9px;
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; font-family: var(--mono);
}
.nbadge:empty { display: none; }
.nbadge.warn { background: #e5735a; color: #fff; }
.naddon {
  margin-left: auto; font-family: var(--mono); font-size: 8.5px; letter-spacing: 1px;
  color: var(--gold); border: 1px solid rgba(201, 162, 39, .45); border-radius: 8px;
  padding: 1px 7px; text-transform: uppercase;
}

.side-foot { padding: 14px 18px 18px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sap-badge { font-family: var(--mono); font-size: 10px; color: #9fdcbf; letter-spacing: .4px; display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: #2ecc8f; box-shadow: 0 0 6px #2ecc8f; }
.side-note { font-size: 10px; color: #6d7d96; margin-top: 10px; line-height: 1.5; }
.side-copy { font-size: 9px; color: #51617a; margin-top: 8px; }

/* -------------------------------- topbar --------------------------------- */
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
#page-title { font-size: 19px; font-weight: 700; }
#page-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.top-right { display: flex; align-items: center; gap: 18px; }
.clockbox { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.userchip { display: flex; align-items: center; gap: 10px; }
.uavatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--gold-light); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.uname { font-size: 12.5px; font-weight: 600; }
.urole { font-size: 10.5px; color: var(--ink-dim); }

#view { padding: 24px 28px 60px; flex: 1; }

/* -------------------------------- shared --------------------------------- */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px 0; }
.card-title { font-size: 14.5px; font-weight: 700; }
.card-hint { font-size: 11.5px; color: var(--ink-dim); }

.kpi { padding: 16px 20px; }
.kpi-k { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-soft); }
.kpi-v { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.kpi-s { font-size: 11.5px; color: var(--ink-dim); margin-top: 4px; }
.kpi-v .unit { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-right: 4px; }
.kpi.crit .kpi-v { color: var(--crit); }
.kpi.warn .kpi-v { color: var(--warn); }
.kpi.ok .kpi-v { color: var(--ok); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill.high { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.dim { background: #eef1f6; color: var(--ink-soft); }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink-dim); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--card);
}
table.t td { padding: 10px 14px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.t tr:hover td { background: #f7f9fc; cursor: pointer; }
table.t tr.nohover:hover td { background: transparent; cursor: default; }
.mono { font-family: var(--mono); font-size: 12px; }
.r { text-align: right; }
td.r, th.r { text-align: right; }
.b { font-weight: 700; }
.sub { color: var(--ink-dim); font-size: 11.5px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; background: var(--navy); color: #fff;
  border: none; border-radius: 9px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
}
.btn:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.gold:hover { background: var(--gold-light); }
.btn.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink-dim); color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: 12px; }

input.inp, select.inp {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px; font-size: 13px;
  font-family: 'Inter', sans-serif; color: var(--ink); background: #fff; outline: none;
}
input.inp:focus, select.inp:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .15); }

.section-gap { margin-top: 16px; }

/* ------------------------------- overview -------------------------------- */
.ov-flex { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; }
.risk-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid #eef1f6; cursor: pointer; }
.risk-row:hover { background: #f7f9fc; }
.risk-row:last-child { border-bottom: none; }
.risk-main { flex: 1; min-width: 0; }
.risk-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-sub { font-size: 11.5px; color: var(--ink-dim); font-family: var(--mono); }
.coverbar { width: 90px; height: 6px; background: #edf0f5; border-radius: 3px; overflow: hidden; }
.coverbar i { display: block; height: 100%; border-radius: 3px; }

.alert-line { display: flex; gap: 12px; padding: 11px 20px; border-bottom: 1px solid #eef1f6; align-items: flex-start; }
.alert-line:last-child { border-bottom: none; }
.al-ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 30px; }
.al-t { font-size: 12.5px; font-weight: 600; }
.al-s { font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; line-height: 1.45; }

/* charts */
.chart-wrap { padding: 6px 14px 14px; }
svg.chart text { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-dim); }

/* ------------------------------- assistant ------------------------------- */
.chat-shell { display: grid; grid-template-columns: 1fr 320px; gap: 16px; height: calc(100vh - 205px); min-height: 480px; }
.chat-card { display: flex; flex-direction: column; overflow: hidden; }
#chat-scroll { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 78%; }
.msg.user { align-self: flex-end; }
.msg .who { font-size: 10.5px; color: var(--ink-dim); margin-bottom: 4px; font-weight: 600; }
.msg.user .who { text-align: right; }
.msg .bub { padding: 12px 15px; border-radius: 13px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-wrap: break-word; }
.msg.user .bub { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai .bub { background: #f4f6fa; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .bub b, .msg .bub strong { font-weight: 700; }
.cite { display: inline-block; background: var(--info-bg); color: var(--info); font-family: var(--mono); font-size: 11px; padding: 0 6px; border-radius: 5px; cursor: pointer; font-weight: 600; }
.cite:hover { text-decoration: underline; }
.engine-tag { font-size: 10px; color: var(--ink-dim); font-family: var(--mono); margin-top: 5px; }
#chat-input-row { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); background: #fbfcfe; }
#chat-input { flex: 1; }
.chips { display: flex; flex-direction: column; gap: 8px; }
.chip {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; font-size: 12.5px; color: var(--ink); cursor: pointer; font-family: 'Inter', sans-serif;
  line-height: 1.45;
}
.chip:hover { border-color: var(--gold); background: #fffdf4; }
.chip .cq { font-weight: 600; }
.chip .cd { color: var(--ink-dim); font-size: 11px; margin-top: 2px; }
.typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 6px; height: 6px; background: var(--ink-dim); border-radius: 50%; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }

/* -------------------------------- drawer --------------------------------- */
#drawer-mask { position: fixed; inset: 0; background: rgba(10, 22, 40, .45); z-index: 60; }
#drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw; background: var(--card);
  z-index: 61; box-shadow: -18px 0 50px rgba(10, 22, 40, .25); overflow-y: auto; padding: 26px 28px;
}
.hidden { display: none !important; }
.d-close { position: absolute; top: 18px; right: 20px; background: #eef1f6; border: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--ink-soft); }
.d-mat { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.d-name { font-size: 19px; font-weight: 800; margin: 4px 0 2px; }
.d-cat { font-size: 12px; color: var(--ink-dim); margin-bottom: 14px; }
.d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.d-stat { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.d-stat .k { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-dim); font-weight: 600; }
.d-stat .v { font-size: 16px; font-weight: 800; margin-top: 3px; }
.d-reco { border-radius: 10px; padding: 14px 16px; margin-top: 14px; font-size: 13px; line-height: 1.6; }
.d-reco.order { background: var(--crit-bg); border: 1px solid #f5c9c9; }
.d-reco.hold { background: var(--warn-bg); border: 1px solid #f0dcb6; }
.d-reco.none, .d-reco.review { background: var(--ok-bg); border: 1px solid #bfe8d8; }
.d-reco .rt { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }

/* ------------------------------ factory order ---------------------------- */
.order-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; flex-wrap: wrap; gap: 12px; }
.order-sum { display: flex; gap: 28px; }
.os { }
.os .k { font-size: 10.5px; text-transform: uppercase; color: var(--ink-dim); letter-spacing: .5px; font-weight: 600; }
.os .v { font-size: 19px; font-weight: 800; margin-top: 2px; }
.prio { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.prio.p1 { background: var(--crit-bg); color: var(--crit); }
.prio.p2 { background: var(--warn-bg); color: var(--warn); }
.prio.p3 { background: var(--info-bg); color: var(--info); }
.excl { background: #fbf7ec; border: 1px dashed #ddc98a; border-radius: 10px; padding: 13px 16px; margin: 8px 20px; font-size: 12.5px; line-height: 1.55; }
.excl .xt { font-weight: 700; }

/* -------------------------------- alerts --------------------------------- */
.acard { border-left: 4px solid var(--line); }
.acard.spike { border-left-color: var(--purple); }
.acard.slow { border-left-color: var(--warn); }
.acard.err { border-left-color: var(--crit); }
.acard.drift { border-left-color: var(--info); }
.acard .card-pad { padding: 15px 18px; }
.a-k { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.acard.spike .a-k { color: var(--purple); }
.acard.slow .a-k { color: var(--warn); }
.acard.err .a-k { color: var(--crit); }
.acard.drift .a-k { color: var(--info); }
.a-t { font-size: 14px; font-weight: 700; margin: 5px 0 4px; }
.a-d { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }

/* ------------------------------ simulation ------------------------------- */
.sim-controls { display: grid; grid-template-columns: 1fr 1fr auto; gap: 22px; align-items: end; padding: 20px; }
.sim-c label { font-size: 12px; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 10px; }
.sim-c label .val { color: var(--navy); font-weight: 800; font-family: var(--mono); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.sim-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sim-reco { background: #fffdf4; border: 1px solid #eadfae; border-radius: var(--radius); padding: 16px 20px; font-size: 13.5px; line-height: 1.6; }

/* ---------------------------- customer service --------------------------- */
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wa { background: #e5ddd5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.wa-head { background: #075e54; color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 11px; }
.wa-ava { width: 34px; height: 34px; border-radius: 50%; background: #128c7e; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.wa-name { font-size: 13px; font-weight: 700; }
.wa-status { font-size: 10.5px; opacity: .85; }
.wa-body { padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; }
.wa-msg { max-width: 82%; padding: 8px 12px; border-radius: 9px; font-size: 12.8px; line-height: 1.5; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); position: relative; }
.wa-msg .wt { font-size: 9.5px; color: rgba(0, 0, 0, .4); text-align: right; margin-top: 3px; font-family: var(--mono); }
.wa-msg.in { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.wa-msg.out { background: #dcf8c6; align-self: flex-end; border-top-right-radius: 2px; }
.wa-msg.rtl { direction: rtl; text-align: right; }
.wa-tag { align-self: center; background: rgba(7, 94, 84, .12); color: #075e54; font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 10px; letter-spacing: .5px; }
.q-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #eef1f6; font-size: 12.5px; gap: 8px; }
.q-line:last-child { border-bottom: none; }
.cs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }

/* --------------------------------- sap ----------------------------------- */
.sap-mode { display: inline-flex; align-items: center; gap: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 800; font-size: 12px; padding: 6px 14px; border-radius: 20px; letter-spacing: 1px; }
.conn { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid #eef1f6; }
.conn:last-child { border-bottom: none; }
.c-proto { font-family: var(--mono); font-size: 10.5px; font-weight: 600; background: var(--navy); color: var(--gold-light); padding: 3px 9px; border-radius: 6px; min-width: 92px; text-align: center; }
.c-name { flex: 1; font-size: 13px; font-weight: 600; }
.c-meta { font-size: 11px; color: var(--ink-dim); font-family: var(--mono); }
.c-status { font-size: 11px; font-weight: 700; }
.c-status.ok { color: var(--ok); }
.c-status.standby { color: var(--ink-dim); }
.guar { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.guar .gi { color: var(--ok); font-weight: 800; }

/* --------------------------- notifications ------------------------------- */
.livechip {
  display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px;
  color: var(--ok); background: var(--ok-bg); padding: 5px 12px; border-radius: 20px; font-weight: 600;
}
.ldot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: lpulse 2s infinite; }
@keyframes lpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(14,159,110,.5) } 50% { box-shadow: 0 0 0 5px rgba(14,159,110,0) } }

#bell {
  position: relative; background: #f2f4f8; border: 1px solid var(--line); width: 38px; height: 38px;
  border-radius: 10px; cursor: pointer; color: var(--ink-soft); display: flex; align-items: center; justify-content: center;
}
#bell:hover { color: var(--ink); border-color: var(--ink-dim); }
#bell.ring { animation: bellring .7s ease; }
@keyframes bellring { 0%,100% { transform: rotate(0) } 20% { transform: rotate(14deg) } 40% { transform: rotate(-12deg) } 60% { transform: rotate(8deg) } 80% { transform: rotate(-5deg) } }
#bell-badge {
  position: absolute; top: -6px; right: -6px; background: var(--crit); color: #fff; font-size: 10px;
  font-weight: 700; font-family: var(--mono); min-width: 17px; height: 17px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff;
}
#bell-badge:empty { display: none; }

#notif-panel {
  position: absolute; top: 56px; right: 24px; width: 400px; max-width: 92vw; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(10, 22, 40, .25);
  z-index: 80; overflow: hidden;
}
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.np-head button { background: none; border: none; color: var(--info); font-size: 11.5px; cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 600; }
.np-mute { font-size: 11px; color: var(--ink-soft); display: flex; align-items: center; gap: 4px; cursor: pointer; }
#np-list { max-height: 420px; overflow-y: auto; }
.np-empty { padding: 26px 16px; text-align: center; color: var(--ink-dim); font-size: 12px; }
.np-item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid #eef1f6; }
.np-item:last-child { border-bottom: none; }
.np-item.unread { background: #f6f9ff; }
.np-item .al-ico { margin-top: 2px; }
.np-t { font-size: 12.5px; font-weight: 700; }
.np-b { font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.np-time { font-size: 10px; color: var(--ink-dim); font-family: var(--mono); margin-top: 4px; }
.np-act { background: none; border: none; color: var(--info); font-weight: 700; font-size: 11.5px; cursor: pointer; padding: 0; margin-top: 5px; font-family: 'Inter', sans-serif; }
.np-act:hover { text-decoration: underline; }

#ntoasts { position: fixed; top: 74px; right: 22px; z-index: 85; display: flex; flex-direction: column; gap: 10px; width: 372px; max-width: 92vw; }
.ntoast {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--info);
  border-radius: 12px; box-shadow: 0 16px 44px rgba(10, 22, 40, .22); padding: 13px 15px;
  display: flex; gap: 11px; align-items: flex-start;
  transform: translateX(420px); opacity: 0; transition: transform .38s cubic-bezier(.2,.9,.3,1.2), opacity .3s;
}
.ntoast.in { transform: translateX(0); opacity: 1; }
.ntoast.crit { border-left-color: var(--crit); }
.ntoast.warn { border-left-color: var(--warn); }
.ntoast.ok { border-left-color: var(--ok); }
.ntoast.wa { border-left-color: #25d366; }
.ntoast .nt-x { background: none; border: none; color: var(--ink-dim); cursor: pointer; font-size: 13px; padding: 0 0 0 4px; }

/* -------------------------------- toast ---------------------------------- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(90px);
  background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 11px; font-size: 13px;
  box-shadow: 0 12px 34px rgba(10, 22, 40, .35); transition: transform .3s ease; z-index: 90; max-width: 90vw;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ------------------------------ responsive ------------------------------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .ov-flex, .cs-grid, .chat-shell { grid-template-columns: 1fr; }
  .chat-shell { height: auto; }
  #chat-scroll { max-height: 55vh; }
}
@media (max-width: 800px) {
  #sidebar { display: none; }
  .g3, .g2, .sim-res { grid-template-columns: 1fr; }
  #view { padding: 16px; }
}
