/*
 * PayHero dashboard UI — standalone stylesheet.
 * Same visual output as the PayHero Meet agent desk, without Tailwind.
 * Requires: Plus Jakarta Sans 400–800 (Google Fonts).
 */

/* ===================================================================
   1. TOKENS
   =================================================================== */
:root {
  /* text */
  --ink: #121826;
  --ink-strong: #0c1222;
  --text-2: #334155;
  --text-3: #475569;
  --muted: #64748b;
  --subtle: #8a94a8;
  --faint: #94a3b8;
  --placeholder: #a3adbd;

  /* surfaces */
  --card: #ffffff;
  --canvas: #eef6f3;
  --inset: #f6f8fb;
  --thead: #f8fafc;
  --row-hover: #f8fbfa;
  --menu-hover: #f4f7fb;
  --btn-hover: #e8eef5;
  --track: #e8eef4;

  /* lines */
  --line: #e6edf5;
  --card-line: #e9eef4;
  --input-line: #dfe6ef;
  --soft-line: #dbe3ee;
  --divider: #eef2f6;
  --hover-line: #c9d5e3;
  --green-line: #cfe9e1;

  /* brand */
  --green: #00aa85;
  --green-dark: #008f6f;
  --green-deep: #087a62;
  --green-tint: #e7f7f3;
  --mint: #7ddec8;
  --navy: #151a2b;

  /* hero tones */
  --tone-green: #087a62;
  --tone-sky: #1d9fdc;
  --tone-rose: #c81e4b;
  --tone-amber: #f07a1a;

  /* chart line colors (rgb triplets for rgba()) */
  --chart-green: 0, 170, 133;
  --chart-sky: 56, 189, 248;
  --chart-rose: 244, 63, 94;
  --chart-amber: 240, 122, 26;

  /* semantic */
  --success: #16a34a;
  --success-text: #047857;
  --success-bg: #dcfce7;
  --warning: #f59e0b;
  --warning-text: #b45309;
  --warning-bg: #fef3c7;
  --info-text: #0369a1;
  --info-bg: #e0f2fe;
  --danger: #e11d48;
  --danger-text: #be123c;
  --danger-strong: #9f1239;
  --danger-bg: #fff1f2;
  --danger-bg-hover: #ffe4e6;
  --danger-line: #fecdd3;

  /* radii */
  --r-frame: 28px;
  --r-dialog: 24px;
  --r-card: 20px;
  --r-quick: 18px;
  --r-row: 16px;
  --r-control: 14px;
  --r-input: 12px;
  --r-small: 10px;
  --r-pill: 999px;

  /* shadows */
  --shadow: 0 10px 28px rgba(21, 34, 56, 0.07);
  --shadow-card: 0 4px 16px rgba(21, 34, 56, 0.04);
  --shadow-control: 0 2px 6px rgba(21, 34, 56, 0.04);
  --shadow-input: 0 1px 2px rgba(21, 34, 56, 0.04);
  --shadow-menu: 0 18px 40px rgba(21, 34, 56, 0.14);
  --shadow-frame: 0 24px 70px rgba(21, 34, 56, 0.16);
  --shadow-btn: 0 8px 18px rgba(0, 170, 133, 0.22);
  --shadow-green: 0 14px 30px rgba(8, 122, 98, 0.28);
  --shadow-sky: 0 14px 30px rgba(29, 159, 220, 0.26);
  --shadow-rose: 0 14px 30px rgba(200, 30, 75, 0.24);
  --shadow-amber: 0 14px 30px rgba(240, 122, 26, 0.24);
  --shadow-navy: 0 14px 30px rgba(21, 26, 43, 0.22);
  --ring-focus: 0 0 0 4px rgba(0, 170, 133, 0.12);
  --sheen: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.16), transparent 55%);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

/* ===================================================================
   2. PAGE BACKGROUND + APP FRAME
   =================================================================== */
body.desk,
body.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 170, 133, 0.28), transparent 34%),
    radial-gradient(circle at 96% 10%, rgba(61, 206, 180, 0.34), transparent 30%),
    #d4efe6;
}

.desk-frame {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
}

.desk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(16, 24, 40, 0.46);
}

.hidden { display: none !important; }

/* ===================================================================
   3. SIDEBAR
   =================================================================== */
.desk-side {
  width: 248px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #c5cde0;
  z-index: 40;
}

.desk-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 22px 14px;
}

.desk-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.desk-logo img { width: 26px; height: 26px; object-fit: contain; }

.desk-brand-kicker {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint);
}

.desk-brand-name {
  margin: 1px 0 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.desk-nav {
  flex: 1;
  padding: 8px 14px 12px 0;
  overflow: auto;
}

.desk-nav-label {
  margin: 22px 0 8px 24px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f7a92;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin: 3px 0;
  border: 0;
  background: transparent;
  color: #aeb7cc;
  border-radius: 0 999px 999px 0;
  padding: 12px 16px 12px 24px;
  font: 600 13.5px/1.2 var(--font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.nav-item.is-active {
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.nav-item.is-active svg { color: var(--green); }
.nav-label { flex: 1; }

.nav-count {
  margin-left: auto;
  min-width: 1.5rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.nav-count:empty,
.nav-count[data-zero] { display: none; }
.nav-item.is-active .nav-count { background: var(--danger-bg-hover); color: var(--danger-text); }

.desk-side-foot {
  margin: 0 14px;
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.desk-seg-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.desk-seg-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 170, 133, 0.18);
  color: var(--mint);
}

.desk-seg-icon svg { width: 18px; height: 18px; }

.desk-seg-label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f7a92;
}

.desk-foot-name { margin: 2px 0 0; font-size: 14px; font-weight: 700; color: #fff; }

.desk-foot-link,
.desk-foot-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #aeb7cc;
  text-decoration: none;
}

.desk-foot-link svg { width: 16px; height: 16px; }
.desk-foot-link:hover { color: var(--mint); }
.desk-foot-note { color: #8b95ab; font-weight: 500; line-height: 1.45; }

/* ===================================================================
   4. TOP BAR
   =================================================================== */
.desk-stage {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.desk-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 30px;
  padding: 20px 0 16px;
  border-bottom: 1px solid rgba(18, 24, 38, 0.08);
}

.desk-top-spacer { flex: 1; }
.desk-top-divider { width: 1px; height: 30px; background: rgba(18, 24, 38, 0.1); }

.desk-menu {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #0b6e58;
  box-shadow: var(--shadow-control);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.desk-menu svg { width: 22px; height: 22px; }
.desk-menu .desk-menu-close { display: none; }
.desk-menu.is-open { background: var(--green); color: #fff; border-color: transparent; }
.desk-menu.is-open .desk-menu-open { display: none; }
.desk-menu.is-open .desk-menu-close { display: block; }

.desk-status svg,
.desk-user summary svg { width: 16px; height: 16px; color: var(--muted); }

.desk-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 700 13px/1 var(--font);
  box-shadow: var(--shadow-control);
  cursor: pointer;
  white-space: nowrap;
}

.desk-status:hover { border-color: var(--hover-line); }

.desk-status-dot {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
}

.desk-status-dot::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.desk-status.is-on .desk-status-dot { background: var(--success-bg); }
.desk-status.is-on .desk-status-dot::after { background: var(--success); }
.desk-status.is-busy .desk-status-dot { background: var(--warning-bg); }
.desk-status.is-busy .desk-status-dot::after { background: var(--warning); }

.desk-user { position: relative; }

.desk-user summary {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 46px;
  padding: 0 6px 0 0;
  border-radius: 999px;
  list-style: none;
  cursor: pointer;
}

.desk-user summary::-webkit-details-marker { display: none; }

.desk-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #00aa85, #087a62);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(8, 122, 98, 0.25);
}

.desk-user-meta { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.desk-user-meta strong { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.desk-user-meta small { color: var(--muted); font-size: 11.5px; font-weight: 500; }

/* dropdown menu (user menu + row overflow menu share this look) */
.desk-user-menu,
.desk-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-menu);
}

.desk-user-menu a,
.desk-user-menu button,
.desk-dropdown a,
.desk-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font: 600 13px/1.2 var(--font);
  text-decoration: none;
}

.desk-user-menu svg,
.desk-dropdown svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }

.desk-user-menu a:hover,
.desk-user-menu button:hover,
.desk-dropdown a:hover,
.desk-dropdown button:hover { background: var(--menu-hover); }

.desk-dropdown .is-danger,
.desk-dropdown .is-danger svg { color: var(--danger-text); }
.desk-dropdown .is-danger:hover { background: var(--danger-bg); }

/* ===================================================================
   5. MAIN AREA + PAGE HEADER
   =================================================================== */
.desk-main { padding: 26px 30px 40px; }

.desk-view:not(.is-shown) { display: none; }

.desk-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.desk-page-head h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.desk-page-head p {
  margin: 6px 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.desk-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.desk-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font: 700 13px/1 var(--font);
  cursor: pointer;
}

.desk-back svg { width: 16px; height: 16px; }
.desk-back:hover { color: var(--green); }

.desk-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  border-radius: 16px;
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-strong);
  padding: 12px 14px;
  font-size: 14px;
}

.desk-alert button { border: 0; background: transparent; color: var(--danger-text); cursor: pointer; }

/* ===================================================================
   6. PRIMITIVES
   =================================================================== */

/* --- card --- */
.desk-card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--card-line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.desk-card.is-compact { padding: 20px; }
.desk-card.is-flush { padding: 0; overflow: hidden; }

.desk-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.desk-card-head.is-bar { margin: 0; padding: 16px 24px; }

.desk-card h3,
.desk-card-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.desk-card-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.desk-inset {
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 12px;
}

.desk-grid { display: grid; gap: 16px; }
.desk-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desk-grid.is-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.desk-stack > * + * { margin-top: 12px; }

/* --- form fields --- */
.desk-field { display: block; font-size: 14px; }
.desk-field + .desk-field { margin-top: 16px; }

.desk-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
}

.desk-help { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.desk-input,
.desk-select,
.desk-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-line);
  border-radius: var(--r-input);
  background: #fff;
  color: var(--ink);
  font: 400 14px/1.4 var(--font);
  box-shadow: var(--shadow-input);
  color-scheme: light;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.desk-textarea { resize: vertical; }
.desk-input::placeholder,
.desk-textarea::placeholder { color: var(--faint); }

.desk-input:focus,
.desk-select:focus,
.desk-textarea:focus {
  border-color: var(--green);
  box-shadow: var(--ring-focus);
}

.desk-input.is-mono { font-family: var(--mono); }

.desk-search {
  min-height: 42px;
  padding-left: 38px;
  font-weight: 500;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 13px center / 16px;
}

.desk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.desk-filters .desk-search { width: 100%; max-width: 24rem; }
.desk-filters .desk-select { width: auto; min-height: 42px; font-weight: 500; }

.desk-amount { position: relative; display: block; }
.desk-amount > span {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}
.desk-amount .desk-input { padding-left: 48px; font-size: 16px; font-weight: 700; }

/* radio / checkbox choice card */
.desk-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--inset);
  cursor: pointer;
}

.desk-choice input { margin-top: 3px; accent-color: var(--green); }
.desk-choice strong { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.desk-choice small { display: block; font-size: 12px; color: var(--muted); }

/* day chip (checkbox pill) */
.desk-chip input { position: absolute; opacity: 0; pointer-events: none; }
.desk-chip span {
  display: inline-flex;
  min-width: 3.25rem;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--input-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.desk-chip input:checked + span { border-color: var(--green); background: var(--green); color: #fff; }
.desk-chip input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

/* --- buttons --- */
.desk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--soft-line);
  border-radius: var(--r-small);
  background: #fff;
  color: #1e293b;
  font: 700 14px/1.2 var(--font);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-input);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.desk-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.desk-btn:hover { background: var(--btn-hover); }

.desk-btn.is-primary {
  border-color: transparent;
  border-radius: var(--r-input);
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.desk-btn.is-primary:hover { background: var(--green-dark); }

.desk-btn.is-danger {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-text);
  box-shadow: none;
}
.desk-btn.is-danger:hover { background: var(--danger-bg-hover); }

.desk-btn.is-danger-solid {
  border-color: transparent;
  border-radius: var(--r-input);
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}
.desk-btn.is-danger-solid:hover { background: #f43f5e; }

.desk-btn.is-sm { padding: 6px 12px; font-size: 12px; }
.desk-btn.is-md { padding: 8px 12px; font-size: 12px; }
.desk-btn.is-block { width: 100%; padding-top: 12px; padding-bottom: 12px; }
.desk-btn.is-icon { width: 34px; height: 34px; padding: 0; }
.desk-btn.is-icon svg { width: 16px; height: 16px; }

.desk-btn:disabled,
.desk-btn[aria-disabled="true"] {
  background: var(--track) !important;
  color: var(--faint) !important;
  border-color: transparent;
  box-shadow: none !important;
  cursor: not-allowed;
}

.desk-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green-dark);
  font: 700 13px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.desk-link:hover { color: var(--green); }

/* segmented control (tabs / toggles) */
.desk-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.desk-seg button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font: 700 12px/1 var(--font);
  cursor: pointer;
}

.desk-seg button.is-active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 170, 133, 0.24);
}

/* --- pills / badges --- */
.desk-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: #f1f5f9;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-pill svg { width: 12px; height: 12px; flex-shrink: 0; }
.desk-pill.is-status { text-transform: uppercase; letter-spacing: 0.025em; }
.desk-pill.is-success { background: rgba(52, 211, 153, 0.15); color: var(--success-text); }
.desk-pill.is-warning { background: rgba(251, 191, 36, 0.15); color: var(--warning-text); }
.desk-pill.is-info { background: rgba(56, 189, 248, 0.15); color: var(--info-text); }
.desk-pill.is-danger { background: var(--danger-bg); color: var(--danger-text); }
.desk-pill.is-violet { background: #f3e8ff; color: #6d28d9; }
.desk-pill.is-money { background: var(--success-bg); color: var(--success-text); }
.desk-pill.is-brand { background: rgba(0, 170, 133, 0.2); color: var(--success-text); text-transform: uppercase; letter-spacing: 0.025em; }

.desk-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.desk-count.is-on { background: var(--green); color: #fff; }

/* --- table (desktop) + card list (mobile) --- */
.desk-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.desk-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  color: var(--ink);
}

.desk-table thead { background: var(--thead); }

.desk-table th {
  padding: 12px 16px;
  color: var(--subtle);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.desk-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--divider);
  vertical-align: top;
}

.desk-table tbody tr { transition: background 0.12s ease; }
.desk-table tbody tr:hover { background: var(--row-hover); }
.desk-table td:first-child > .cell-title { font-weight: 700; }
.desk-table .cell-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.desk-table .cell-muted { color: var(--muted); }
.desk-table .cell-num { font-variant-numeric: tabular-nums; }
.desk-table .cell-mono { font-family: var(--mono); color: var(--text-2); }
.desk-table .cell-actions { text-align: right; white-space: nowrap; }

.desk-mobile-list { display: none; }
.desk-mobile-list > * + * { margin-top: 12px; }

.desk-mobile-card {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.desk-mobile-card dl { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.desk-mobile-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.desk-mobile-card dd { margin: 0; color: var(--text-2); text-align: right; }

/* --- list row (queue item, agent row) --- */
.desk-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--divider);
  border-radius: var(--r-row);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.desk-row:hover { border-color: var(--green-line); box-shadow: 0 8px 20px rgba(0, 170, 133, 0.08); }
.desk-row.is-roomy { border-color: var(--card-line); border-radius: var(--r-card); padding: 16px 20px; box-shadow: var(--shadow-card); }
.desk-row-body { min-width: 0; flex: 1; }
.desk-row-title { margin: 0; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.desk-row-meta { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.desk-row-actions { display: flex; flex-shrink: 0; gap: 8px; }

.desk-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--faint);
}
.desk-presence.is-online { background: var(--success); }
.desk-presence.is-busy { background: var(--warning); }

/* --- pager --- */
.desk-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 14px;
}
.desk-pager p { margin: 0; }
.desk-pager-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.desk-pager .desk-input { width: 64px; padding: 8px; text-align: center; font-size: 12px; font-weight: 600; }

/* --- empty states --- */
.desk-empty-box {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.desk-empty-dashed {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--soft-line);
  border-radius: 16px;
  background: var(--thead);
}
.desk-empty-dashed strong { display: block; color: var(--text-2); font-size: 14px; font-weight: 500; }
.desk-empty-dashed span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }

/* --- code --- */
.desk-code,
.desk-card pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--menu-hover);
  color: #1e293b;
  font: 14px/1.6 var(--mono);
}

.desk-endpoint {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--inset);
  color: var(--success-text);
  font: 14px/1.4 var(--mono);
  word-break: break-all;
}

/* --- modal --- */
.desk-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
  background: rgba(16, 24, 40, 0.46);
  backdrop-filter: blur(8px);
}

.desk-modal.is-center { align-items: center; }

.desk-dialog {
  width: 100%;
  max-width: 32rem;
  margin: 24px 0;
  padding: 20px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--card-line);
  border-radius: var(--r-dialog);
  box-shadow: var(--shadow-card), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.desk-dialog.is-wide { max-width: 42rem; }

.desk-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.desk-dialog-head h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.desk-dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.desk-dialog-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.desk-dialog-foot.is-end { justify-content: flex-end; }
.desk-status-line { min-height: 1.25rem; margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* ===================================================================
   7. STAT CARDS (filter tiles on list pages)
   =================================================================== */
.stat-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }

.stat-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  padding: 18px 20px;
  text-align: left;
  border: 1px solid transparent;
  min-height: 112px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

button.stat-card { width: 100%; cursor: pointer; }

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stat-dot, var(--faint));
  flex-shrink: 0;
}

.stat-value {
  margin: 16px 0 0;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-money { font-size: 1.7rem; white-space: nowrap; }
.stat-note { margin: 8px 0 0; font-size: 12px; color: var(--subtle); }

.stat-card[data-dot="all"] { --stat-dot: #087a62; }
.stat-card[data-dot="success"] { --stat-dot: #16a34a; }
.stat-card[data-dot="warning"] { --stat-dot: #f59e0b; }
.stat-card[data-dot="info"] { --stat-dot: #1d9fdc; }
.stat-card[data-dot="neutral"] { --stat-dot: #64748b; }
.stat-card[data-dot="danger"] { --stat-dot: #e11d48; }

.stat-green, .stat-teal { color: #fff; }
.stat-green { background: var(--tone-green); box-shadow: var(--shadow-green); }
.stat-teal { background: var(--tone-sky); box-shadow: var(--shadow-sky); }
.stat-green .stat-label, .stat-teal .stat-label { color: rgba(255, 255, 255, 0.78); }
.stat-green .stat-value, .stat-teal .stat-value { color: #fff; }
.stat-green .stat-note, .stat-plain.is-on .stat-note { color: rgba(255, 255, 255, 0.78); }

.stat-plain {
  background: #fff;
  border-color: var(--card-line);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  cursor: pointer;
}
.stat-plain .stat-label { color: var(--subtle); }
.stat-plain .stat-value { color: var(--ink); }
.stat-plain:hover { border-color: var(--green-line); box-shadow: 0 10px 24px rgba(0, 170, 133, 0.1); transform: translateY(-1px); }

.stat-plain.is-on { background: var(--tone-green); border-color: transparent; box-shadow: var(--shadow-green); }
.stat-plain.is-on::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sheen); }
.stat-plain.is-on .stat-label { color: rgba(255, 255, 255, 0.78); --stat-dot: #fff; }
.stat-plain.is-on .stat-value { color: #fff; }

/* ===================================================================
   8. STATE BANNER (big colored status card with action)
   =================================================================== */
.state-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 22px 24px;
  color: #fff;
  border-radius: 20px;
  background: var(--navy);
  box-shadow: var(--shadow-navy);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.state-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sheen); }
.state-card.is-online { background: var(--tone-green); box-shadow: 0 14px 30px rgba(8, 122, 98, 0.28); }
.state-card.is-active { background: var(--tone-sky); box-shadow: var(--shadow-sky); }
.state-card .dash-hero-icon { color: var(--navy); }
.state-card.is-online .dash-hero-icon { color: var(--tone-green); }
.state-card.is-active .dash-hero-icon { color: var(--tone-sky); }

.state-card-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.state-card-kicker { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
.state-card-title { margin: 4px 0 0; color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.state-card-hint { margin: 4px 0 0; max-width: 28rem; color: rgba(255, 255, 255, 0.82); font-size: 13px; }

.state-card-action {
  margin-top: 18px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: #fff;
  color: #122033;
  font: 700 13px/1.2 var(--font);
  cursor: pointer;
}

.state-card-action.is-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }

/* ===================================================================
   9. DASHBOARD
   =================================================================== */
.dash-head,
.dash-kicker-row,
.dash-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dash-head { margin-bottom: 26px; }
.dash-kicker-row { margin-bottom: 16px; }

.dash-head h2,
.dash-kicker-row h3,
.dash-panel h3 { margin: 0; color: var(--ink-strong); }

.dash-head h2 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.04em; }
.dash-kicker-row h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.03em; }
.dash-panel h3 { font-size: 1rem; font-weight: 800; letter-spacing: -0.02em; }

.dash-head p,
.dash-kicker-row p,
.dash-panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.dash-note { color: var(--danger-text); }
.dash-note:empty { display: none; }

.dash-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-control);
}

.dash-range svg { width: 18px; height: 18px; color: var(--muted); }
.dash-range select { border: 0; background: transparent; color: var(--ink); font: 700 13px/1 var(--font); outline: none; cursor: pointer; }

.dash-section + .dash-section { margin-top: 40px; }

/* hero row: two colored KPI tiles + one chart panel */
.dash-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(170px, 215px) minmax(170px, 215px) minmax(0, 1fr);
  align-items: stretch;
}

.dash-hero-card {
  position: relative;
  min-height: 228px;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.dash-hero-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sheen); }
.dash-hero-card.is-green { background: var(--tone-green); box-shadow: var(--shadow-green); }
.dash-hero-card.is-sky { background: var(--tone-sky); box-shadow: var(--shadow-sky); }
.dash-hero-card.is-rose { background: var(--tone-rose); box-shadow: var(--shadow-rose); }
.dash-hero-card.is-amber { background: var(--tone-amber); box-shadow: var(--shadow-amber); }

.dash-hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 22px 24px;
}

.dash-hero-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.dash-hero-icon svg { width: 24px; height: 24px; }
.dash-hero-card.is-green .dash-hero-icon { color: var(--tone-green); }
.dash-hero-card.is-sky .dash-hero-icon { color: var(--tone-sky); }
.dash-hero-card.is-rose .dash-hero-icon { color: var(--tone-rose); }
.dash-hero-card.is-amber .dash-hero-icon { color: var(--tone-amber); }

.dash-hero-stat { display: flex; align-items: center; gap: 12px; }
.dash-hero-num { margin: 0; font-size: 2.9rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.dash-hero-name { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; opacity: 0.92; }

.dash-hero-foot { padding: 14px 22px 16px; background: rgba(0, 0, 0, 0.16); }
.dash-hero-foot span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
.dash-hero-foot strong { display: block; margin-top: 5px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }

/* white panel */
.dash-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.dash-panel.dash-performance { background: linear-gradient(180deg, #eefaf5 0%, #fbfefd 60%, #fff 100%); }
.dash-panel.dash-performance.is-rose { background: linear-gradient(180deg, #fff1f4 0%, #fffbfc 60%, #fff 100%); }
.dash-panel-head { align-items: flex-start; margin-bottom: 10px; }

.dash-legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.dash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dash-legend i { width: 8px; height: 8px; border-radius: 50%; }

.dash-chart { position: relative; flex: 1; min-height: 110px; margin: 0 -6px; }
.dash-chart.is-tall { min-height: 160px; }

.dash-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }

.dash-minis p,
.dash-metric-copy p,
.dash-inline-stat {
  margin: 0;
  color: var(--subtle);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-minis strong { display: block; margin-top: 6px; color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; text-transform: none; }
.dash-inline-stat strong { display: inline; margin-left: 6px; color: var(--ink); font-size: 14px; letter-spacing: 0; }

.dash-split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); margin-top: 18px; }

/* gauge */
.dash-metrics { flex: 1; display: flex; align-items: center; gap: 36px; padding: 8px 4px 0; }
.dash-gauge-wrap { position: relative; width: 200px; height: 200px; flex-shrink: 0; }

.dash-gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dash-gauge-label strong { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }
.dash-gauge-label span { margin-top: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.dash-gauge-label em { margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }

.dash-metric-copy { display: grid; gap: 26px; }
.dash-metric-copy strong { display: block; margin-top: 6px; color: #3b4456; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; text-transform: none; }

/* "More details >" link */
.dash-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green-dark);
  font: 700 13px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.dash-more::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.dash-more:hover { color: var(--green); }

/* person / ranked list row */
.dash-person { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--divider); }
.dash-person:first-child { border-top: 0; padding-top: 6px; }
.dash-person > div { min-width: 0; flex: 1; }

.dash-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--green-tint);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
}

.dash-avatar.tone-1 { background: #e0f2fe; color: #0369a1; }
.dash-avatar.tone-2 { background: #fce7f3; color: #be185d; }
.dash-avatar.tone-3 { background: #fef3c7; color: #b45309; }
.dash-avatar.tone-4 { background: #ede9fe; color: #6d28d9; }
.dash-avatar.is-sm { width: 38px; height: 38px; font-size: 12.5px; }

.dash-rank {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  background: var(--faint);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.dash-rank.is-1 { background: #f5b301; }
.dash-rank.is-2 { background: #1d9fdc; }
.dash-rank.is-3 { background: #f472b6; }

.dash-person-name { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-person-meta { margin: 3px 0 0; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dash-person-count { flex: 0 0 auto !important; text-align: right; }
.dash-person-count strong { display: block; font-size: 18px; font-weight: 800; color: var(--ink); line-height: 1; }
.dash-person-count span { color: var(--subtle); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.dash-empty { margin: 12px 0; color: var(--muted); font-size: 14px; }

/* quick action cards */
.dash-quick { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.dash-quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--card-line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dash-quick-card:hover { transform: translateY(-2px); border-color: #d4e6df; box-shadow: 0 12px 26px rgba(21, 34, 56, 0.08); }
.dash-quick-card:disabled { opacity: 0.6; cursor: progress; transform: none; }

.dash-quick-card.is-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #00aa85 0%, #087a62 100%);
  color: #fff;
  box-shadow: var(--shadow-green);
}

.dash-quick-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-tint);
  color: var(--green-dark);
}

.dash-quick-icon svg { width: 22px; height: 22px; }
.dash-quick-card.is-primary .dash-quick-icon { background: #fff; color: var(--tone-green); }
.dash-quick-icon.is-amber { background: #fff4e6; color: #d9650b; }
.dash-quick-icon.is-violet { background: #f1ecff; color: #6d28d9; }
.dash-quick-icon.is-sky { background: #e6f5fd; color: #1d8fc7; }

.dash-quick-copy { min-width: 0; }
.dash-quick-copy strong { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.dash-quick-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.dash-quick-card.is-primary .dash-quick-copy small { color: rgba(255, 255, 255, 0.82); }

.dash-quick-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px 14px 20px;
  border: 1px solid #bfe9dc;
  border-radius: 16px;
  background: #ecfaf5;
}

.dash-quick-result-kicker { margin: 0; color: var(--green-dark); font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dash-quick-result-url { margin: 4px 0 0; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.dash-quick-result-actions { display: flex; flex-shrink: 0; gap: 8px; }

/* small dashboard button */
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 700 12.5px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.dash-btn:hover { border-color: #cfd9e4; }
.dash-btn.is-primary { border-color: transparent; background: var(--green); color: #fff; }
.dash-btn.is-primary:hover { background: var(--green-dark); }
.dash-btn.is-ghost { width: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }

/* 3-column board of list panels */
.dash-board { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; margin-top: 18px; }

.dash-meet-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }
.dash-meet-row:first-child { border-top: 0; padding-top: 4px; }

.dash-meet-dot {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--faint);
}

.dash-meet-dot svg { width: 18px; height: 18px; }
.dash-meet-dot.is-success { background: #e3f8f1; color: #087a62; }
.dash-meet-dot.is-warning { background: #fff4e6; color: #d9650b; }
.dash-meet-dot.is-info { background: #e6f5fd; color: #1d8fc7; }

.dash-meet-copy { flex: 1; min-width: 0; }

.dash-meet-pill {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.dash-meet-pill.is-success { background: #dcf5ec; color: #087a62; }
.dash-meet-pill.is-warning { background: #ffefd9; color: var(--warning-text); }
.dash-meet-pill.is-info { background: var(--info-bg); color: var(--info-text); }

.dash-meet-actions { display: flex; flex-shrink: 0; gap: 6px; }

.dash-icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dash-icon-btn svg { width: 16px; height: 16px; }
.dash-icon-btn:hover { border-color: #cfd9e4; color: var(--ink); }
.dash-icon-btn.is-primary { border-color: transparent; background: var(--green); color: #fff; }
.dash-icon-btn.is-primary:hover { background: var(--green-dark); color: #fff; }
.dash-icon-btn.is-done { border-color: #bfe9dc; background: #ecfaf5; color: var(--green-dark); }

/* mini stat tiles inside a panel */
.dash-guest-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 8px; }

.dash-guest-stats p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f9fb;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-guest-stats strong { display: block; margin-top: 4px; color: var(--ink); font-size: 18px; letter-spacing: -0.02em; text-transform: none; }

.dash-empty-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px dashed #d6e2ec;
  border-radius: 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.dash-empty-card p { margin: 0; }

/* horizontal bar breakdown (e.g., star ratings) */
.dash-rating-bars { display: grid; gap: 8px; }

.dash-rating-row {
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dash-rating-track { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.dash-rating-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.dash-stars { color: #d97706; letter-spacing: 0.5px; font-size: 13px; font-weight: 800; }

.dash-panel-search {
  width: min(100%, 240px);
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: 600 13px/1 var(--font);
}

/* ===================================================================
   10. LOGIN
   =================================================================== */
body.login-body { padding: 16px; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: calc(100vh - 32px);
  border-radius: 28px;
  overflow: hidden;
  background: var(--canvas);
  box-shadow: var(--shadow-frame);
}

.login-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 34px 44px 30px;
  background: var(--navy);
  color: #c5cde0;
}

.login-glow {
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: login-drift 16s ease-in-out infinite alternate;
}

.login-glow.is-one { top: -180px; right: -160px; background: radial-gradient(circle, rgba(0, 170, 133, 0.75), transparent 65%); }
.login-glow.is-two { bottom: -220px; left: -180px; background: radial-gradient(circle, rgba(29, 159, 220, 0.55), transparent 65%); animation-duration: 20s; }

@keyframes login-drift { to { transform: translate(-40px, 50px) scale(1.12); } }

.login-brand { display: flex; align-items: center; gap: 12px; }

.login-pitch h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.9rem, 2.8vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.login-pitch h2 span {
  background: linear-gradient(90deg, #7ddec8, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-pitch p { margin: 14px 0 0; max-width: 26rem; color: #aeb7cc; font-size: 14.5px; line-height: 1.6; }

.login-stage { position: relative; width: 420px; max-width: 100%; height: 360px; margin: auto; }

.login-tile,
.login-chart {
  --tx: 0px;
  --ty: 0px;
  position: absolute;
  transition: transform 0.25s ease-out;
  animation: login-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-tile {
  width: 188px;
  min-height: 170px;
  padding: 20px;
  border-radius: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.login-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 55%); }

.login-tile.is-green { top: 4%; left: 0; background: var(--tone-green); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28); transform: translate(var(--tx), var(--ty)) rotate(-4deg); animation-delay: 0.1s; }
.login-tile.is-sky { top: 0; left: 204px; background: var(--tone-sky); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28); transform: translate(var(--tx), var(--ty)) rotate(3deg); animation-delay: 0.22s; }
.login-tile.is-green .dash-hero-icon { color: var(--tone-green); }
.login-tile.is-sky .dash-hero-icon { color: var(--tone-sky); }

.login-tile-name { margin: auto 0 0; padding-top: 26px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.login-tile-foot { margin: 4px 0 0; font-size: 12.5px; font-weight: 500; opacity: 0.85; }

.login-chart {
  top: 196px;
  left: 50px;
  width: min(340px, 78%);
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #eefaf5 0%, #fff 70%);
  color: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
  transform: translate(var(--tx), var(--ty));
  animation-delay: 0.34s;
}

.login-chart-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }

.login-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--success-bg);
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
}

.login-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: login-pulse 1.6s ease-out infinite; }

@keyframes login-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

.login-chart svg { display: block; width: 100%; height: 84px; margin: 10px 0 6px; overflow: visible; }
.login-line { stroke-dasharray: 420; stroke-dashoffset: 420; animation: login-draw 1.6s 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.login-line.is-two { animation-delay: 0.85s; }
.login-area { opacity: 0; animation: login-fade 0.8s 1.4s ease forwards; }

@keyframes login-draw { to { stroke-dashoffset: 0; } }
@keyframes login-fade { to { opacity: 1; } }
@keyframes login-rise {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}

.login-chart p { margin: 0; color: var(--muted); font-size: 12px; }
.login-hero-foot { margin: 0; color: #6f7a92; font-size: 12px; font-weight: 600; }

.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(420px, 100%); animation: login-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.login-card.is-shaking { animation: login-shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes login-shake {
  15%, 85% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(5px); }
  45%, 55% { transform: translateX(-7px); }
}

.login-brand-mobile { display: none; margin-bottom: 28px; }
.login-kicker { margin: 0; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); }
.login-product { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.login-card h1 { margin: 0; color: var(--ink-strong); font-size: 2rem; font-weight: 800; letter-spacing: -0.045em; }
.login-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-radius: 14px;
  background: var(--danger-bg);
  color: var(--danger-strong);
  font-size: 13.5px;
  font-weight: 600;
}

.login-error svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.login-form { display: grid; gap: 18px; margin-top: 26px; }
.login-field { display: grid; gap: 7px; }
.login-label { color: var(--text-2); font-size: 12.5px; font-weight: 700; transition: color 0.15s ease; }
.login-field:focus-within .login-label { color: var(--green-dark); }

.login-input { position: relative; display: flex; align-items: center; }

.login-input > svg {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--faint);
  pointer-events: none;
  transition: color 0.15s ease;
}

.login-field:focus-within .login-input > svg { color: var(--green); }

.login-input input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 44px;
  border: 1px solid var(--input-line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 500 15px/1.2 var(--font);
  outline: none;
  box-shadow: var(--shadow-input);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input input:hover { border-color: var(--hover-line); }
.login-input input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0, 170, 133, 0.14); }
.login-input input::placeholder { color: var(--placeholder); }

.login-field.is-invalid .login-input input { border-color: #fb7185; box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12); }
.login-field.is-invalid .login-input > svg,
.login-field.is-invalid .login-label { color: var(--danger); }

.login-hint { display: none; color: var(--danger); font-size: 12px; font-weight: 600; }
.login-field.is-invalid .login-hint { display: block; }

.login-eye {
  position: absolute;
  right: 6px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.login-eye:hover { background: #f1f5f9; color: var(--ink); }
.login-eye svg { width: 19px; height: 19px; }
.login-eye svg[hidden] { display: none; }

.login-caps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 12px;
  font-weight: 700;
}

.login-caps[hidden] { display: none; }
.login-caps svg { width: 14px; height: 14px; }

.login-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  margin-top: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font: 700 15px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 170, 133, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 16px 30px rgba(0, 170, 133, 0.32); }
.login-submit:active { transform: translateY(0); }
.login-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0, 170, 133, 0.28); }

.login-submit-arrow { width: 18px; height: 18px; transition: transform 0.2s ease; }
.login-submit:hover .login-submit-arrow { transform: translateX(3px); }

.login-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: login-spin 0.7s linear infinite;
}

.login-submit.is-loading { cursor: progress; background: var(--green-dark); transform: none; }
.login-submit.is-loading .login-submit-arrow { display: none; }
.login-submit.is-loading .login-spinner { display: block; }

@keyframes login-spin { to { transform: rotate(360deg); } }

.login-foot {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(18, 24, 38, 0.08);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.login-foot a { color: var(--green-dark); font-weight: 700; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }

/* ===================================================================
   11. RESPONSIVE
   =================================================================== */
@media (min-width: 640px) {
  .desk-filters .desk-search { width: auto; min-width: 20rem; }
}

@media (max-width: 767px) {
  .desk-table-wrap.has-mobile { display: none; }
  .desk-mobile-list { display: block; }
  .desk-grid.is-2 { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
  .desk-side {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .desk-side.is-open { transform: none; }
  .desk-menu { display: inline-flex; }
  .desk-user-meta { display: none; }
  .desk-main { padding: 20px 16px 32px; }
  .desk-top { margin: 0 16px; padding: 14px 0 12px; }
  .desk-top-divider { display: none; }
}

@media (min-width: 1024px) {
  body.desk { padding: 16px; }

  .desk-frame {
    min-height: calc(100vh - 32px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-frame);
  }

  .desk-side { position: relative; transform: none; }
  .desk-backdrop { display: none; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-grid.is-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .state-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .state-card-action { width: auto; min-width: 168px; margin-top: 0; }
}

@media (min-width: 1280px) {
  .stat-grid.is-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
  .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-board > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .dash-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hero > .dash-panel { grid-column: 1 / -1; }
  .dash-split { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  body.login-body { padding: 0; }
  .login-shell { grid-template-columns: 1fr; min-height: 100vh; border-radius: 0; box-shadow: none; }
  .login-hero { display: none; }
  .login-brand-mobile { display: flex; }
  .login-main { place-items: start center; padding: 48px 22px; }
}

@media (min-width: 961px) and (max-width: 1180px) {
  .login-stage { scale: 0.84; }
}

@media (max-width: 560px) {
  .desk-row { flex-wrap: wrap; }
  .desk-row-actions { width: 100%; justify-content: flex-end; }
  .dash-hero { grid-template-columns: 1fr; }
  .dash-metrics { flex-direction: column; align-items: flex-start; }
  .dash-minis { grid-template-columns: 1fr; }
  .dash-quick, .dash-board { grid-template-columns: 1fr; }
  .dash-quick-result { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .login-glow, .login-tile, .login-chart, .login-card, .login-line, .login-area, .login-live i { animation: none !important; }
  .login-line { stroke-dashoffset: 0; }
  .login-area { opacity: 1; }
}
