/* SK Airways — Resolution Agent
   Design system: white + indigo (IndiGo-style), committed light theme. */

:root {
  --primary: #001871;        /* brand indigo */
  --primary-dark: #001259;
  --link: #2447c5;
  --tint: #eef2fc;           /* light indigo tint surface */
  --tint-2: #e3eafb;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #1f2533;
  --muted: #5b6472;
  --line: #e1e6f0;
  --line-soft: #e7ecf7;
  --panel: #f8fafe;

  --good: #0e7c4a;  --good-bg: #e4f4ec;
  --warn: #935f00;  --warn-bg: #fbf0dc;
  --bad: #c0362c;   --bad-bg: #fbe9e7;
  --info: #2447c5;  --info-bg: #e9effc;
  --neutral: #5b6472; --neutral-bg: #eef0f4;

  --shadow: 0 4px 16px rgba(0, 24, 113, 0.08);

  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
}
button { font-family: inherit; cursor: pointer; }
:is(button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.appbar {
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--primary);
  display: grid;
  place-items: center;
  flex: none;
}
.logo-mark svg { display: block; }
.brand-name {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--primary);
}
.brand-sub {
  color: var(--muted);
  font-size: 12.5px;
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.appbar-spacer { flex: 1; }
.datechip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--tint);
  border-radius: 6px;
  padding: 5px 10px;
  white-space: nowrap;
}
.appbar .linkbtn {
  background: none;
  border: none;
  color: var(--link);
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 7px;
}
.appbar .linkbtn:hover { background: var(--tint); }

/* ---------- landing ---------- */
.hero {
  background: var(--primary);
  color: #ffffff;
  padding: 34px 24px 38px;
}
.hero-inner { max-width: 1080px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.hero p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  max-width: 58em;
}

.landing-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
.card:hover { box-shadow: var(--shadow); border-color: #c9d4ee; }
.card-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 13.5px;
  flex: none;
}
.card-name { font-weight: 600; font-size: 15px; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.pnr { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.tier {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2.5px 9px;
}
.tier-gold     { background: #f7efd8; color: #8a6400; }
.tier-silver   { background: var(--neutral-bg); color: var(--neutral); }
.tier-platinum { background: var(--info-bg); color: var(--info); }

.mode {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2.5px 9px;
  white-space: nowrap;
}
.mode-ai    { background: var(--info-bg); color: var(--info); }
.mode-rules { background: var(--neutral-bg); color: var(--neutral); }

.flightline {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.flightline .f { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.pill {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.pill-cancelled  { background: var(--bad-bg);  color: var(--bad); }
.pill-delayed    { background: var(--warn-bg); color: var(--warn); }
.pill-unaffected { background: var(--good-bg); color: var(--good); }
.pill-neutral    { background: var(--info-bg); color: var(--info); }

.card p.desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  flex: 1;
}
.card-actions { display: flex; gap: 8px; align-items: center; }

.btn {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
}
.btn:hover { background: var(--bg); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--link);
}
.btn-ghost:hover { background: var(--tint); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

.textlink {
  background: none;
  border: none;
  padding: 0;
  color: var(--link);
  font-size: 13.5px;
  font-weight: 500;
}
.textlink:hover { text-decoration: underline; }
a.textlink { text-decoration: none; }
a.textlink:hover { text-decoration: underline; }
.landing-links { display: flex; gap: 22px; flex-wrap: wrap; }

.landing-foot {
  margin-top: 40px;
  color: var(--muted);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ---------- chat layout ---------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  height: calc(100vh - 57px);
  max-width: 1500px;
  margin: 0 auto;
}
.chatcol {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  border-right: 1px solid var(--line);
}
.chathead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.backarrow {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.backarrow:hover { background: var(--tint); border-color: #c9d4ee; }
.iconbtn {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.iconbtn:hover { background: var(--tint); border-color: #c9d4ee; }
.chathead .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chathead .who .avatar { width: 34px; height: 34px; font-size: 12px; }
.chathead .who .nm { font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.chathead-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.esc-banner {
  display: none;
  background: var(--bad-bg);
  color: var(--bad);
  font-weight: 500;
  font-size: 13px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
}
.esc-banner.show { display: block; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  .messages { scroll-behavior: auto; }
}
.msg {
  max-width: min(72%, 620px);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14.3px;
  animation: rise 0.22s ease-out;
  overflow-wrap: break-word;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .msg { animation: none; }
}
.msg-agent {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.msg-time {
  font-size: 10.5px;
  color: var(--muted);
  margin: 2px 6px 10px;
  font-family: var(--mono);
}

/* boarding-pass card — the customer's booking, straight from the data pack */
.ticket {
  align-self: stretch;
  max-width: min(92%, 660px);
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 2px 0 10px;
  animation: rise 0.22s ease-out;
  box-shadow: 0 4px 16px rgba(0, 24, 113, 0.07);
}
.ticket .stub {
  flex: none;
  width: 52px;
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.ticket .stub .air {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #c3cdea;
}
.ticket .tmain {
  flex: 1;
  padding: 14px 18px 12px;
  border-right: 2px dashed var(--line);
  min-width: 0;
}
.ticket .trow1 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ticket .route {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ticket .route .arr { color: var(--link); font-weight: 400; padding: 0 4px; }
.ticket .fno { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ticket .tgrid {
  display: flex;
  gap: 26px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.ticket .tf .k {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticket .tf .v { font-family: var(--mono); font-size: 13.5px; margin-top: 2px; }
.ticket .tf .v.strike { text-decoration: line-through; color: var(--muted); }
.ticket .tside {
  flex: none;
  width: 168px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
}
.ticket .stamp {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid;
  border-radius: 6px;
  padding: 4px 10px;
  transform: rotate(-4deg);
}
.stamp-cancelled  { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.stamp-delayed    { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.stamp-unaffected { color: var(--good); border-color: var(--good); background: var(--good-bg); }
.ticket .tpnr { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* resolution summary card, shown after turns that changed the booking */
.rescard {
  align-self: stretch;
  max-width: min(86%, 680px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 4px 0 10px;
  animation: rise 0.22s ease-out;
}
.rescard-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.rescard-title .rid { text-transform: none; letter-spacing: 0; }
.rescard-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  padding: 3px 0;
}
.rescard-row span:first-child { flex: none; font-weight: 700; }
.rescard-row.ok span:first-child { color: var(--good); }
.rescard-row.esc span:first-child { color: var(--bad); }
.rescard .rid {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.msg-time.t-user { align-self: flex-end; }
.msg-time.t-agent { align-self: flex-start; }

.typing {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: none;
  gap: 5px;
}
.typing.show { display: inline-flex; }
.typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.1s infinite both;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 70%, 100% { opacity: 0.25; } 35% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .typing i { animation: none; opacity: 0.6; }
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 18px 4px;
}
.chip {
  border: 1px solid #d6def0;
  background: var(--surface);
  color: var(--link);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.8px;
  font-weight: 400;
  text-align: left;
}
.chip:hover { background: var(--tint); border-color: var(--link); }

.inputrow {
  display: flex;
  gap: 10px;
  padding: 12px 18px 16px;
  background: var(--bg);
}
.inputrow input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14.3px;
  font-family: inherit;
  min-width: 0;
}
.inputrow input::placeholder { color: var(--muted); }
.inputrow input:focus { border-color: var(--link); outline: none; }

/* ---------- inspector ---------- */
.inspector {
  background: var(--surface);
  overflow-y: auto;
  padding: 0 0 24px;
}
.insp-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  padding: 14px 18px 11px;
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.insp-title { font-size: 13.5px; font-weight: 600; margin: 0 0 2px; }
.insp-head .sub { font-size: 12px; color: var(--muted); }
.insp-section { padding: 14px 18px 4px; }
.insp-section h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.count-badge {
  background: var(--neutral-bg);
  color: var(--neutral);
  border-radius: 999px;
  font-size: 10.5px;
  padding: 1px 8px;
  font-family: var(--mono);
}
.empty-note { color: var(--muted); font-size: 12.6px; font-style: italic; }

.turn-group { margin-bottom: 14px; }
.turn-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trace-entry {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--panel);
  animation: rise 0.22s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .trace-entry { animation: none; }
}
.verdict {
  flex: none;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 4px;
  padding: 2.5px 6px;
  text-transform: uppercase;
  margin-top: 1px;
  white-space: nowrap;
}
.v-data       { background: var(--neutral-bg); color: var(--neutral); }
.v-info       { background: var(--info-bg);    color: var(--info); }
.v-allowed    { background: var(--good-bg);    color: var(--good); }
.v-action     { background: var(--good-bg);    color: var(--good); }
.v-blocked    { background: var(--bad-bg);     color: var(--bad); }
.v-supervisor { background: var(--warn-bg);    color: var(--warn); }
.v-escalated  { background: var(--bad-bg);     color: var(--bad); }
.trace-body { min-width: 0; }
.trace-rule { font-weight: 600; font-size: 12.3px; }
.trace-detail { font-size: 12px; color: var(--muted); font-weight: 400; }

.ledger-item, .esc-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--good);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--panel);
  font-size: 12.6px;
  animation: rise 0.22s ease-out;
}
.esc-item { border-left-color: var(--bad); }
.ledger-item .id, .esc-item .id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 1.5px;
}

/* ---------- modals ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  z-index: 100;
  overflow-y: auto;
}
.overlay.show { display: flex; }
.modal {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 860px;
  width: 100%;
  box-shadow: var(--shadow);
  padding: 26px 30px 30px;
}
.modal h2 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.modal .modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.modal h3 { font-size: 14px; font-weight: 600; margin: 22px 0 8px; }
.modal h3 .sec { color: var(--link); font-family: var(--mono); font-size: 12px; margin-right: 6px; }
.modal p, .modal li { font-size: 13.5px; color: var(--ink); font-weight: 400; }
.modal li strong, .modal p strong { font-weight: 600; }
.modal ul { margin: 6px 0; padding-left: 20px; }
.modal .note {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
}
.modal-close-row { display: flex; justify-content: flex-end; margin-top: 20px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.modal table { border-collapse: collapse; width: 100%; font-size: 12.8px; min-width: 640px; }
.modal th {
  background: var(--tint);
  color: var(--primary);
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.modal td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.modal td.mono { font-size: 12px; }

.phase-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.phase-list li {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
}
.phase-list .ph {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--link);
  font-weight: 600;
  padding-top: 2px;
  white-space: nowrap;
}
.phase-list .ph-body { font-size: 13.3px; }
.phase-list .ph-body strong { display: block; font-weight: 600; }
.phase-list .ph-body span { color: var(--muted); font-size: 12.6px; }

/* ================= SKY (login + dashboard hero) ================= */
.sky {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #001871 0%, #16307f 55%, #2c4ba8 100%);
  color: #fff;
}
.cloud {
  position: absolute;
  height: 22px; width: 90px;
  background: #fff; opacity: 0.13;
  border-radius: 999px;
  animation: drift linear infinite;
}
.cloud::before {
  content: ""; position: absolute;
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; top: -18px; left: 16px;
}
.cloud::after {
  content: ""; position: absolute;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; top: -10px; left: 48px;
}
@keyframes drift {
  from { transform: translateX(-140px); }
  to   { transform: translateX(calc(100vw + 140px)); }
}
.skyplane {
  position: absolute;
  animation: fly 16s ease-in-out infinite;
  opacity: 0.9;
}
@keyframes fly {
  0%   { transform: translate(-90px, 26px) rotate(6deg); }
  45%  { transform: translate(46vw, -14px) rotate(-3deg); }
  100% { transform: translate(calc(100vw + 90px), 18px) rotate(5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cloud, .skyplane { animation: none; }
}

/* ================= view transitions ================= */
.view { animation: viewin 0.35s ease-out; }
@keyframes viewin {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

/* ================= login ================= */
.loginwrap {
  min-height: calc(100vh - 57px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px 80px;
}
.logincard {
  position: relative; z-index: 2;
  width: min(430px, 94vw);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 12, 60, 0.35);
  padding: 30px 30px 26px;
  color: var(--ink);
}
.logincard h1 { font-size: 22px; font-weight: 650; margin: 0 0 4px; }
.logincard .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.loginfield { position: relative; }
.loginfield input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px; font-family: inherit;
  color: var(--ink); background: var(--surface);
}
.loginfield input:focus { border-color: var(--link); outline: none; }
.loginlist {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
  z-index: 5;
}
.loginlist.show { display: block; }
.loginopt {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  border-top: 1px solid var(--line-soft);
}
.loginopt:first-child { border-top: none; }
.loginopt:hover { background: var(--tint); }
.loginopt .nm { font-weight: 600; font-size: 14px; }
.loginopt .sub { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.loginfoot { margin-top: 18px; font-size: 12px; color: var(--muted); }

/* ================= dashboard ================= */
.dashhero { padding: 34px 0 76px; }
.dashhero .inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.dashhero h1 { font-size: 28px; font-weight: 650; margin: 0 0 6px; }
.dashhero .sub { font-size: 14px; color: #c3cdea; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dashbody { max-width: 1080px; margin: -44px auto 0; padding: 0 24px 56px; position: relative; z-index: 3; }
.dashgrid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .dashgrid { grid-template-columns: 1fr; } }
.dashcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.dashcard h3 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.dashcard .ticket { max-width: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.dashcard .ticket:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 24, 113, 0.14); }
.tickhint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ariacard { display: flex; gap: 16px; align-items: center; }
.aria-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  background: conic-gradient(from 210deg, #001871, #2c4ba8, #6c8be8, #001871);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 22px;
  box-shadow: 0 6px 18px rgba(0, 24, 113, 0.35);
}
.aria-avatar.sm { width: 38px; height: 38px; font-size: 15px; box-shadow: none; }
.ariacard .nm { font-weight: 650; font-size: 17px; }
.ariacard .role { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.feeditem {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line-soft); border-left: 3px solid var(--good);
  background: var(--panel); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 8px;
  font-size: 12.8px; line-height: 1.45;
  animation: viewin 0.3s ease-out;
}
.feeditem.tk { border-left-color: var(--bad); }
.feeditem.tk.done { border-left-color: var(--good); }
.feeditem .id { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.feeditem .st { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.feeditem .st.open { color: var(--warn); }
.feeditem .st.approved { color: var(--good); }
.feeditem .st.denied { color: var(--bad); }

/* ================= chat extras ================= */
.msg b { font-weight: 650; }
.tkr {
  align-self: stretch;
  max-width: min(86%, 660px);
  display: flex; gap: 14px; align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--warn);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 4px 0 10px;
  animation: rise 0.25s ease-out;
}
.tkr .ic {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--warn-bg); color: var(--warn);
  display: grid; place-items: center; font-size: 18px;
}
.tkr b { font-size: 14px; }
.tkr .id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tkr p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ================= voice mode ================= */
.voiceoverlay {
  position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(120% 120% at 50% 30%, #14245c 0%, #060b1f 70%);
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; padding: 40px 24px;
  color: #dfe6f8; text-align: center;
}
.voiceoverlay.show { display: flex; }
.orb {
  width: 170px; height: 170px; border-radius: 50%;
  background: conic-gradient(from 0deg, #3a5bd9, #7fa8ff, #b58cff, #3a5bd9);
  filter: blur(1px);
  position: relative;
  animation: orbspin 6s linear infinite;
  box-shadow: 0 0 70px rgba(90, 130, 255, 0.45);
  transition: transform 0.25s ease;
}
.orb::after {
  content: ""; position: absolute; inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #16245c, #0a1230 70%);
}
.voiceoverlay.speaking .orb { animation: orbspin 2.2s linear infinite, orbpulse 0.9s ease-in-out infinite; }
.voiceoverlay.listening .orb {
  animation: orbspin 10s linear infinite, orbpulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 80px rgba(120, 220, 170, 0.4);
}
@keyframes orbspin { to { transform: rotate(360deg); } }
@keyframes orbpulse { 0%, 100% { scale: 1; } 50% { scale: 1.09; } }
@media (prefers-reduced-motion: reduce) { .orb, .voiceoverlay.speaking .orb, .voiceoverlay.listening .orb { animation: none; } }
.voicename { font-size: 15px; font-weight: 650; letter-spacing: 0.05em; color: #fff; }
.voicestatus { font-size: 12.5px; color: #8fa0cc; letter-spacing: 0.08em; text-transform: uppercase; }
.voicetext { max-width: 640px; font-size: 16.5px; line-height: 1.6; color: #dfe6f8; min-height: 54px; }
.voicecards { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.voicecards .pill { font-size: 12px; }
.voiceclose {
  position: absolute; top: 22px; right: 26px;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  border: none; border-radius: 999px;
  padding: 9px 18px; font-size: 13px; cursor: pointer;
}
.voiceclose:hover { background: rgba(255, 255, 255, 0.2); }

/* ================= simplified modal tiles ================= */
.tilegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.mtile {
  border: 1px solid var(--line-soft); background: var(--panel);
  border-radius: 10px; padding: 12px 14px;
}
.mtile .t { font-weight: 650; font-size: 13.5px; color: var(--primary); }
.mtile p { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }

/* ---------- console: opt-in drawer on every screen size ---------- */
.workspace { grid-template-columns: 1fr; }
.chatcol {
  border-right: none;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.inspector {
  position: fixed;
  top: 57px;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 60;
}
@media (prefers-reduced-motion: reduce) {
  .inspector { transition: none; }
}
.inspector.open { transform: none; }
.console-toggle { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1000px) {
  .msg { max-width: 88%; }
}

/* message grouping: one sender label per run of bubbles */
.msg-time.ghost { display: none; }
.msg + .msg { margin-top: 2px; }
.msg.msg-agent { box-shadow: 0 1px 3px rgba(0, 24, 113, 0.05); }
.chathint {
  align-self: flex-start;
  font-size: 12px;
  color: var(--muted);
  margin: 2px 6px 10px;
}
.msg .caret {
  display: inline-block;
  width: 7px; height: 15px;
  background: var(--link);
  vertical-align: -2px;
  margin-left: 2px;
  animation: caretblink 0.8s steps(1) infinite;
}
@keyframes caretblink { 50% { opacity: 0; } }
@media (max-width: 640px) {
  .brand-sub, .datechip { display: none; }
  .chathead .who .pnr { display: none; }
  .hero { padding: 26px 18px 30px; }
  .landing-body { padding: 22px 18px 40px; }
}
