/* Atmaal Service Console — PoC by Mehwar.
   Bank-ops look: deep navy/slate, white text, one warm accent for live events.
   Zero external assets (CSP: system fonts only). */

:root {
  --bg: #0a1220;
  --bg-raise: #0d1726;
  --panel: #101c2e;
  --panel-head: #0d1828;
  --line: #1d2f4a;
  --line-soft: #16263c;
  --text: #e8edf5;
  --text-dim: #8fa1ba;
  --text-faint: #5c6d86;
  --accent: #f2a33c;
  --accent-soft: rgba(242, 163, 60, 0.14);
  --green: #3ecf8e;
  --green-soft: rgba(62, 207, 142, 0.12);
  --red: #f2555a;
  --red-soft: rgba(242, 85, 90, 0.12);
  --blue: #5b9dd9;
  --blue-soft: rgba(91, 157, 217, 0.12);
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Noto Naskh Arabic", sans-serif;
  --mono:
    ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

.mono {
  font-family: var(--mono);
}
.dim {
  color: var(--text-faint);
}

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}
.btn:hover {
  background: var(--line);
}
.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #221503;
}
.btn.accent:hover {
  background: #f7b45c;
}
.btn.ghost {
  background: transparent;
}
.btn.ghost:hover {
  background: var(--line-soft);
}
.btn.tiny {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 5px;
}
.btn.wide {
  width: 100%;
  padding: 9px;
  font-size: 0.95rem;
}
.btn.danger {
  color: var(--red);
  border-color: rgba(242, 85, 90, 0.4);
}
.btn.danger:hover {
  background: var(--red-soft);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ---------- badges & chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.poc {
  color: var(--accent);
  border-color: rgba(242, 163, 60, 0.45);
  background: var(--accent-soft);
  text-transform: uppercase;
  font-size: 0.68rem;
}
.badge.conn.live {
  color: var(--green);
  border-color: rgba(62, 207, 142, 0.4);
  background: var(--green-soft);
}
.badge.conn.live::before {
  content: "●";
  font-size: 0.6rem;
}
.badge.conn.offline {
  color: var(--red);
  border-color: rgba(242, 85, 90, 0.5);
  background: var(--red-soft);
}
.badge.conn.offline::before {
  content: "●";
  font-size: 0.6rem;
}

.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--line-soft);
  color: var(--text-dim);
  white-space: nowrap;
}
.chip.code {
  color: var(--accent);
  border-color: rgba(242, 163, 60, 0.35);
  background: var(--accent-soft);
}
.chip.ok {
  color: var(--green);
  border-color: rgba(62, 207, 142, 0.35);
  background: var(--green-soft);
}
.chip.warn {
  color: var(--accent);
  border-color: rgba(242, 163, 60, 0.35);
  background: var(--accent-soft);
}
.chip.bad {
  color: var(--red);
  border-color: rgba(242, 85, 90, 0.35);
  background: var(--red-soft);
}
.chip.info {
  color: var(--blue);
  border-color: rgba(91, 157, 217, 0.35);
  background: var(--blue-soft);
}

/* status chips (tickets) */
.chip.st-open {
  color: var(--blue);
  border-color: rgba(91, 157, 217, 0.35);
  background: var(--blue-soft);
}
.chip.st-escalated {
  color: var(--accent);
  border-color: rgba(242, 163, 60, 0.35);
  background: var(--accent-soft);
}
.chip.st-resolved {
  color: var(--green);
  border-color: rgba(62, 207, 142, 0.35);
  background: var(--green-soft);
}

/* ---------- tooltips (pure CSS) ---------- */
.has-tip {
  position: relative;
  cursor: help;
}
.has-tip .tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 7px);
  left: 0;
  z-index: 60;
  min-width: 180px;
  max-width: 280px;
  padding: 8px 10px;
  background: #050b14;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text);
  white-space: normal;
}
.has-tip:hover .tip {
  display: block;
}
.tip .tip-en {
  display: block;
}
.tip .tip-ar {
  display: block;
  color: var(--text-dim);
  margin-top: 3px;
}

/* ---------- login ---------- */
#login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #10203a 0%, var(--bg) 65%);
}
.login-card {
  width: 380px;
  padding: 40px 36px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.logomark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid rgba(242, 163, 60, 0.4);
  border-radius: 12px;
}
.logomark.small {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
  border-radius: 8px;
  margin: 0;
}
.login-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.login-sub {
  margin: 4px 0 26px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
#login-form input[type="password"] {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}
#login-form input[type="password"]:focus {
  border-color: var(--accent);
}
.form-error {
  margin-top: 12px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(242, 85, 90, 0.35);
  border-radius: 6px;
  text-align: start;
}
.poc-note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- console shell ---------- */
#console-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: var(--bg-raise);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.brand-dim {
  color: var(--text-dim);
  font-weight: 500;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.clock {
  color: var(--text-dim);
  font-size: 0.85rem;
}

#panes {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  grid-template-rows: minmax(0, 1fr) minmax(0, 300px);
  gap: 12px;
  padding: 12px;
}
#customers-pane {
  grid-column: 1;
  grid-row: 1;
}
#tickets-pane {
  grid-column: 1;
  grid-row: 2;
}
#feed-pane {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.pane-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line);
}
.pane-head h2 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.pane-head .count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.pane-head .spacer {
  flex: 1;
}
.poll-note {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-faint);
}

/* ---------- tables ---------- */
.table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel-head);
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: start;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
tbody tr.c-row,
tbody tr.t-row {
  cursor: pointer;
}
tbody tr.c-row:hover,
tbody tr.t-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.cell-name .name-en {
  display: block;
  font-weight: 600;
}
.cell-name .name-ar {
  display: block;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.cell-sub {
  display: block;
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 2px;
}

.otp-code {
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.otp-code.expired {
  color: var(--text-faint);
  text-decoration: line-through;
}
.otp-countdown {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: 6px;
}
.otp-countdown.low {
  color: var(--red);
  font-weight: 700;
}
.otp-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 1px;
}
.otp-locked {
  color: var(--red);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.verified-check {
  color: var(--green);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.cell-actions {
  text-align: end;
  white-space: nowrap;
}
.cell-actions .btn + .btn {
  margin-left: 6px;
}

/* scenario editor row */
tr.editor-row > td {
  background: var(--bg-raise);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.editor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
}
.editor-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.editor-group > .group-label {
  flex-basis: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.editor-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.editor-field > span {
  font-size: 0.7rem;
  color: var(--text-dim);
}
.editor-field select,
.editor-field input {
  font: inherit;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
  min-width: 110px;
}
.editor-field input[type="date"] {
  color-scheme: dark;
}
.editor-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-bottom: 5px;
}
.editor-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ticket detail row */
tr.tdetail-row > td {
  background: var(--bg-raise);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.tdetail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tdetail .t-summary {
  font-size: 0.88rem;
}
.tdetail .t-meta {
  font-size: 0.76rem;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.tdetail .t-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tdetail .t-actions .lbl {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- live activity feed ---------- */
#feed-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
#feed-pane {
  display: flex;
  flex-direction: column;
}
.feed-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 2px 10px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.8rem;
}
.feed-time {
  grid-row: 1 / span 2;
  color: var(--text-faint);
  font-size: 0.72rem;
  padding-top: 2px;
}
.feed-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.feed-type {
  font-weight: 700;
  font-size: 0.76rem;
  white-space: nowrap;
}
.feed-type.ev-ok {
  color: var(--green);
}
.feed-type.ev-warn {
  color: var(--red);
}
.feed-type.ev-otp {
  color: var(--accent);
}
.feed-type.ev-look {
  color: var(--blue);
}
.feed-type.ev-ticket {
  color: var(--accent);
}
.feed-type.ev-auth {
  color: var(--text-dim);
}
.feed-who {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-detail {
  grid-column: 2;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- flash on data change (the only motion) ---------- */
@keyframes rowflash {
  0% {
    background-color: var(--accent-soft);
  }
  100% {
    background-color: transparent;
  }
}
tr.flash > td {
  animation: rowflash 1.5s ease-out;
}
.feed-item.flash {
  animation: rowflash 1.5s ease-out;
}

/* ---------- drawer ---------- */
#drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 8, 15, 0.55);
}
#drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: 480px;
  max-width: 92vw;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}
.drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
#drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
}

.d-identity {
  margin-bottom: 14px;
}
.d-identity .d-name {
  font-size: 1.15rem;
  font-weight: 700;
}
.d-identity .d-name-ar {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 1px;
}
.d-identity .d-ids {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.d-kv .k {
  color: var(--text-faint);
}
.d-kv .v {
  color: var(--text);
}
.d-identity .d-ids .k {
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.d-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: visible;
}
.d-card > .d-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-radius: 8px 8px 0 0;
}
.d-card > .d-card-body {
  padding: 10px 12px;
}
.d-kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px 10px;
  font-size: 0.84rem;
}

.d-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.d-timeline li {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}
.d-timeline li:last-child {
  border-bottom: none;
}
.d-timeline .tl-time {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  flex: 0 0 62px;
  padding-top: 2px;
}

.d-tickets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.d-tickets li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--line-soft);
}
.d-tickets li:last-child {
  border-bottom: none;
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 15, 0.6);
}
.modal-card {
  width: 470px;
  max-width: 94vw;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
#add-form {
  padding: 16px;
}
.field {
  display: block;
  margin-bottom: 12px;
}
.field > span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.field > span em {
  color: var(--text-faint);
  font-style: normal;
}
.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
}
.field input:focus,
.field select:focus {
  border-color: var(--accent);
}
.field input.invalid {
  border-color: var(--red);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- toast ---------- */
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  padding: 10px 18px;
  font-size: 0.82rem;
  color: var(--text);
  background: #050b14;
  border: 1px solid var(--red);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#toast.ok {
  border-color: var(--green);
}

/* ---------- testing guide page (/guide) ---------- */
html[data-lang="en"] .lang-ar {
  display: none !important;
}
html[data-lang="ar"] .lang-en {
  display: none !important;
}

.num {
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
}

#guide-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #10203a 0%, var(--bg) 55%);
}
.g-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 30px 20px 56px;
}
.g-wrap a {
  color: var(--blue);
  text-decoration: none;
}
.g-wrap a:hover {
  text-decoration: underline;
}

.g-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.g-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.g-sub {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.g-header .spacer {
  flex: 1;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel);
}
.lang-switch button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  padding: 6px 16px;
  cursor: pointer;
}
.lang-switch button:hover {
  color: var(--text);
}
.lang-switch button.active {
  background: var(--accent);
  color: #221503;
}

.g-console-link {
  display: inline-block;
  margin: 0 0 24px;
  font-size: 0.8rem;
}

.g-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.g-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--panel-head);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.g-card-body {
  padding: 16px;
  font-size: 0.92rem;
  line-height: 1.7;
}
.g-card-body p {
  margin: 0 0 10px;
}
.g-card-body p:last-child {
  margin-bottom: 0;
}

.g-dial {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.g-phone {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent) !important;
  direction: ltr;
  unicode-bidi: isolate;
}
.g-phone-backup {
  color: var(--text-dim);
  font-size: 0.84rem;
}
.g-phone-backup .num {
  color: var(--text);
  font-weight: 600;
}

.g-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.g-steps li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.g-steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.g-step-num {
  flex: 0 0 26px;
  height: 26px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(242, 163, 60, 0.35);
  border-radius: 50%;
}
.g-step-body {
  min-width: 0;
}
.g-step-title {
  font-weight: 600;
}
.g-step-note {
  color: var(--text-dim);
  font-size: 0.82rem;
}
.g-keys {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.g-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
}
.g-key .chip.code {
  min-width: 22px;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
}
.g-key .g-key-note {
  color: var(--text-faint);
  font-size: 0.76rem;
}

.g-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.g-way {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.g-way-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(242, 163, 60, 0.45);
  border-radius: 999px;
  padding: 3px 10px;
}
.g-way-tag.alt {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(91, 157, 217, 0.45);
}
.g-way p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.g-personas-table th,
.g-personas-table td {
  vertical-align: top;
}
.g-personas-table .cell-nid {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.g-persona-role {
  font-weight: 600;
  display: block;
}
.g-persona-desc {
  color: var(--text-dim);
  font-size: 0.84rem;
}
.g-quote {
  font-weight: 600;
  display: block;
}
.g-quote-alt {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.g-footer {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.g-footer .g-footer-line {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.g-footer a {
  color: var(--accent);
}

/* guide link on the console login card */
.guide-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
}
.guide-link:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  .g-two {
    grid-template-columns: 1fr;
  }
  .g-title {
    font-size: 1.2rem;
  }
  .g-phone {
    font-size: 1.15rem;
  }
}

/* ---------- narrow fallback (console is projector-first, keep usable) ---------- */
@media (max-width: 1180px) {
  #panes {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 280px) minmax(0, 280px);
  }
  #customers-pane {
    grid-column: 1;
    grid-row: 1;
  }
  #tickets-pane {
    grid-column: 1;
    grid-row: 2;
  }
  #feed-pane {
    grid-column: 1;
    grid-row: 3;
  }
  #topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
}
