/* Variant C operator-shell shared styles (sidebar + topbar + page chrome) */

:root {
  --brand: #009bc1;
  --brand-hover: #0082a4;
  --brand-50: #eff8fb;
  --brand-100: #d6eff5;
  --brand-700: #00627a;
  --brand-900: #0a2c38;
  --ink: #0f1928;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #6b7280;
  --muted-soft: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --bg: #f9fafb;
  --bg-2: #f4f6f9;
  --white: #ffffff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
.display { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; }
.mono { font-family: 'IBM Plex Mono', monospace; }

.app {
  display: grid;
  grid-template-columns: 230px 1fr;
  grid-template-rows: 56px 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 0 rgba(15,25,40,0.02);
  position: sticky; top: 0; z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 1px 0 rgba(0,155,193,0.20), 0 2px 4px rgba(0,155,193,0.18);
}
.brand-mark::before {
  content: '';
  position: absolute; inset: 5px;
  border: 2px solid var(--white);
  border-radius: 3px;
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 30% 100%, 0 70%);
}
.brand .div { color: var(--muted-soft); margin: 0 8px; font-weight: 400; }
.brand small {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500; font-size: 13px;
  color: var(--text-2);
}
.top-search {
  flex: 1; max-width: 480px;
  margin: 0 32px;
  position: relative;
}
.top-search input {
  width: 100%;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13.5px;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.top-search input:focus { border-color: var(--brand); background: var(--white); box-shadow: 0 0 0 3px var(--brand-50); }
.top-search::before {
  content: '⌕';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
}
.top-search .kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
}
.top-right { display: flex; align-items: center; gap: 16px; }
.uptime-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.uptime-pill .dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }
.op-avatar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.op-avatar .av {
  width: 28px; height: 28px;
  background: var(--brand); color: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 12px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

aside.side {
  border-right: 1px solid var(--line);
  background: var(--white);
  padding: 16px 0;
}
.side-group {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  padding: 12px 18px 6px;
}
.side a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color .12s, background-color .12s, border-color .12s;
}
.side a:hover { background: var(--bg); color: var(--text); }
.side a.cur { color: var(--brand); background: var(--brand-50); border-left-color: var(--brand); font-weight: 600; }
.side a .ic {
  width: 16px; height: 16px;
  background: var(--bg-2);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
}
.side a.cur .ic { background: var(--brand); color: var(--white); }
.side a .ct {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  background: var(--line-soft);
  color: var(--muted);
  border-radius: 999px;
}
.side a .ct.danger { background: var(--danger-bg); color: var(--danger); }
.side hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }

main { padding: 24px; min-width: 0; overflow-x: hidden; }

.crumbs { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--brand); text-decoration: none; }
.crumbs .sep { margin: 0 6px; color: var(--muted-soft); }

.page-h {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}
.page-h h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.page-h .sub {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 6px;
}

.btn {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: color .12s, background-color .12s, border-color .12s;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); color: var(--white); border-color: var(--brand); box-shadow: 0 1px 2px rgba(0,155,193,0.15); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--white); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.card-h {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg);
}
.card-h .t {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px;
}
.tag.brand { background: var(--brand-50); color: var(--brand); }
.tag.success { background: rgba(22,163,74,0.10); color: var(--success); }
.tag.warning { background: rgba(217,119,6,0.10); color: var(--warning); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.muted { background: var(--line-soft); color: var(--muted); }

table.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.tbl th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}
.tbl td { font-size: 13px; color: var(--text); }
.tbl tr:hover td { background: var(--bg); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .ref {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--brand);
}
.tbl .pj {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: var(--ink);
}

/* page mobile fallback */
/* MOBILE/TABLET OPERATOR CONSOLE
   Sidebar collapses, search hides, tables become horizontally scrollable,
   topbar tightens, breadcrumbs + page-header wrap. */

@media (max-width: 1100px) {
  /* tablet: narrower sidebar */
  .app { grid-template-columns: 200px 1fr; }
  aside.side { padding: 12px 0; }
  .side-group { padding: 10px 14px 4px; font-size: 9.5px; }
  .side a { padding: 7px 14px; font-size: 12.5px; gap: 8px; }
  .top-search { max-width: 280px; margin: 0 16px; }
}

@media (max-width: 720px) {
  /* mobile: full single column, no sidebar */
  body { overflow-x: hidden; }
  .app { grid-template-columns: 1fr; grid-template-rows: 56px 1fr; min-height: 100vh; }
  aside.side { display: none; }

  .topbar { padding: 0 12px; gap: 8px; }
  .brand { font-size: 13px; gap: 8px; flex-shrink: 0; }
  .brand-mark { width: 24px; height: 24px; }
  .brand .div, .brand small { display: none; } /* hide "/ Operator console" suffix on mobile */
  .top-search { display: none; }
  .uptime-pill { display: none; }
  .op-avatar span { display: none; } /* show only avatar circle */

  main { padding: 16px 12px; min-width: 0; overflow-x: hidden; }
  .crumbs { font-size: 10.5px; margin-bottom: 10px; }

  .page-h { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; }
  .page-h h1 { font-size: 22px; }
  .page-h .sub { font-size: 13px; }

  /* tables become horizontally scrollable inside their card */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl, table.pricing-tbl { min-width: 560px; }
  .tbl th, .tbl td { padding: 9px 12px; font-size: 12px; }

  /* tabs scroll horizontally on mobile */
  .tabs { overflow-x: auto; gap: 0; padding: 0 12px; }
  .tab { padding: 11px 12px; font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }

  /* filter chips wrap and shrink */
  .chip { font-size: 10.5px; padding: 4px 9px; }
}

@media (max-width: 480px) {
  /* very narrow: hide engagement meta cells beyond the essentials */
  .page-h h1 { font-size: 19px; line-height: 1.15; }
}
