/* =====================================================================
   MAGIC — DCMG Business Platform
   Design system: clean light shell + indigo accent, Plus Jakarta Sans,
   soft white panels (Option A — adapted from the DCMG Dashboard Design Kit).
   Mobile-first PWA: the sidebar collapses to an off-canvas drawer.

   Structure
     1. Design tokens (kit palette; legacy variable names remapped onto it)
     2. App shell        .app .sidebar .nav .topbar .content  (+ mobile drawer)
     3. Kit components    .kpi-* .panel .recon-table .tag .btn-* .gate-badge …
     4. Legacy components .page .stat .card .btn--* .field .table .kb-* …
   ===================================================================== */

/* ------------------------------------------------------------ 1. tokens */
:root {
  /* surfaces */
  --bg:        #f5f7fa;
  --surface:   #ffffff;
  --line:      #e7ebf1;

  /* ink */
  --ink:       #1c2230;
  --body:      #384150;
  --ink-soft:  #5b6472;
  --ink-faint: #97a0b0;
  --muted:     #6b7280;

  /* brand — indigo accent (Option A); sidebar is now light */
  --brand:     #3b5bdb;
  --brand-700: #2f49b0;
  --navy:      #1f2733;   /* login / save bar (kept dark) */
  --navy-deep: #161c26;

  /* legacy aliases: existing views reference --blue / --blue-light.
     Point them at the indigo accent so those screens rebrand automatically. */
  --blue:       #3b5bdb;
  --blue-light: #eef1fd;

  /* status */
  --ok:      #1f9d6b;
  --good:    #1f9d6b;
  --good-bg: #e7f6ef;
  --warn:    #c9871a;
  --warn-bg: #fbf1de;
  --danger:  #cf4040;
  --bad:     #cf4040;
  --info:    #3a72c4;

  --radius:    14px;
  --radius-sm:  9px;
  --shadow:    0 1px 2px rgba(16,24,40,.04), 0 4px 18px rgba(16,24,40,.05);
  --shadow-lg: 0 12px 34px rgba(16,24,40,.14);

  --sidebar-w: 248px;

  --font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------- 2. shell */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  border-right: 1px solid var(--line);
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff; padding: 3px; object-fit: contain;
  flex: 0 0 auto; border: 1px solid var(--line);
}
.brand-mark--letter {
  background: var(--brand); color: #fff; padding: 0; border: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { color: var(--ink); font-size: 15px; letter-spacing: .01em; }
.brand-text span { color: var(--muted); font-size: 11.5px; }

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--ink-soft); font-weight: 500; font-size: 14px;
  margin-bottom: 2px; position: relative;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.is-active { background: var(--blue-light); color: var(--brand); font-weight: 600; }
.nav-icon { display: grid; place-items: center; opacity: .85; flex: 0 0 auto; }
.nav-icon svg { display: block; }
.nav-label { flex: 1; min-width: 0; }
.nav-soon {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg); color: var(--muted);
  padding: 2px 6px; border-radius: 20px;
}
.nav-item.is-active .nav-soon { background: #fff; color: var(--brand); }
.nav-cat { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; padding: 16px 12px 6px; }

/* Expandable nav group (e.g. Dispatch → Piano Delivery Pricing) */
.nav-group { margin-bottom: 2px; }
.nav-item--parent {
  width: 100%; background: transparent; border: 0; cursor: pointer;
  font: inherit; text-align: left; margin-bottom: 0;
}
.nav-caret { flex: 0 0 auto; opacity: .55; transition: transform .16s ease; }
.nav-group.is-open .nav-caret { transform: rotate(90deg); }
.nav-sub {
  display: none;
  padding-left: 30px;
}
.nav-group.is-open .nav-sub { display: block; }
.nav-subitem {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); font-weight: 500; font-size: 13.5px;
  margin: 2px 0; position: relative;
  transition: background .12s, color .12s;
}
.nav-subitem::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.nav-subitem:hover { background: var(--bg); color: var(--ink); }
.nav-subitem.is-active { background: var(--blue-light); color: var(--brand); font-weight: 600; }
.nav-subitem.is-soon { color: var(--ink-faint); cursor: default; }
.nav-subitem.is-soon:hover { background: transparent; color: var(--ink-faint); }
.nav-sublabel { flex: 1; min-width: 0; }
.nav-subitem .nav-soon { margin-left: auto; }

.sidebar__foot { padding: 14px 20px; border-top: 1px solid var(--line); }
.env-pill {
  font-size: 10px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 3px 10px; display: inline-block;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__crumb { color: var(--ink-faint); font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.topbar__wordmark { display: none; font-weight: 700; color: var(--ink); font-size: 15px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto;
}
.nav-toggle:hover { background: var(--bg); }

.user { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: 0 0 auto;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 13px; color: var(--ink); }
.user-meta span { font-size: 11.5px; color: var(--ink-faint); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--ink); }

.content { padding: 24px 28px 48px; max-width: 1560px; width: 100%; }
.content--narrow { max-width: 760px; }

/* scrim for the mobile drawer */
.scrim {
  position: fixed; inset: 0; background: rgba(15,20,28,.5);
  opacity: 0; visibility: hidden; transition: opacity .2s ease; z-index: 40;
}

/* footer */
.app-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: auto; }
.app-footer__inner {
  padding: 16px 28px; text-align: center; color: var(--ink-faint); font-size: 12px;
}
.app-footer__sep { margin: 0 .4rem; }

/* ---- mobile drawer ---- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(16,24,40,.18);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { opacity: 1; visibility: visible; }
  .nav-toggle { display: flex; }
  .topbar__wordmark { display: block; }
  .topbar__crumb { display: none; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .app-footer__inner { padding: 16px; }
}

/* ------------------------------------------------------- 3. kit pieces */

/* page heading (used by content pages) */
.page__head { margin-bottom: 20px; }
.page__head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page__title { margin: 0; font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.page__sub { margin: 4px 0 0; color: var(--ink-faint); font-size: 13.5px; }
.section-title {
  margin: 26px 0 12px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-faint); font-weight: 700;
}

/* KPI cards */
.kpi-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.kpi-icon { color: var(--ink-faint); display: grid; place-items: center; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.kpi-card.is-good { border-color: #bfe6d4; }
.kpi-card.is-good .kpi-value { color: var(--good); }
.kpi-card.is-warn { border-color: #f0dcae; }
.kpi-card.is-warn .kpi-value { color: var(--warn); }
.kpi-card.is-bad  { border-color: #f0c4c4; }
.kpi-card.is-bad .kpi-value { color: var(--bad); }

/* grids + panels */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.panel-tag {
  font-size: 11px; color: var(--ink-faint);
  background: var(--bg); border-radius: 20px; padding: 3px 10px;
}
.panel-link { font-size: 12.5px; color: var(--brand); font-weight: 500; }
.panel-note { font-size: 12.5px; color: var(--ink-faint); margin: 12px 0 0; line-height: 1.55; }

/* data table */
.recon-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.recon-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink-faint); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.recon-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--body); }
.recon-table tr:last-child td { border-bottom: none; }
.recon-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.recon-table .tender { font-weight: 500; color: var(--ink); }
.recon-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: none; color: var(--ink); }
.recon-table .row-flag { background: #fdf7ec; }
.recon-table td.bad { color: var(--bad); font-weight: 600; }
.recon-table td.muted { color: var(--ink-faint); }
.recon-table tbody tr.clickable { cursor: pointer; }
.recon-table tbody tr.clickable:hover { background: var(--bg); }

/* pills + tags (kit) */
.tag.ok   { background: var(--good-bg); color: var(--good); }
.tag.soft { background: #eef0f4; color: var(--ink-soft); }
.tag.flag { background: var(--warn-bg); color: var(--warn); }

/* status pills for the report register */
.status-pill {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 20px; font-weight: 700; white-space: nowrap;
}
.status-complete { background: var(--good-bg); color: var(--good); }
.status-due      { background: var(--warn-bg); color: var(--warn); }
.status-overdue  { background: #fdeaea; color: var(--bad); }
.status-inactive { background: #eef0f4; color: var(--ink-soft); }

/* big pass/fail badges */
.gate-badge { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 22px; display: inline-flex; align-items: center; gap: 6px; }
.gate-badge.pass { background: var(--good-bg); color: var(--good); }
.gate-badge.fail { background: var(--warn-bg); color: var(--warn); }

/* buttons (kit) */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 9px; cursor: pointer; border: 1px solid transparent;
  min-height: 42px; line-height: 1;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-primary:disabled, .btn-ghost:disabled { opacity: .55; cursor: not-allowed; }

/* placeholder page (unbuilt modules) */
.placeholder {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px; max-width: 720px; margin: 8px auto; text-align: center;
}
.placeholder-icon {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px;
  background: var(--bg); color: var(--brand); display: grid; place-items: center;
}
.placeholder h2 { margin: 0 0 10px; font-size: 22px; color: var(--ink); }
.placeholder-blurb { color: var(--ink-soft); max-width: 520px; margin: 12px auto 4px; line-height: 1.6; }
.placeholder-badge {
  display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  background: var(--warn-bg); color: var(--warn); padding: 4px 12px; border-radius: 20px; font-weight: 600;
}
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* generic form fields shared by new screens */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font); font-size: 15px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
  background: var(--surface); width: 100%;
}
.form-field textarea { min-height: 84px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.field-hint { font-size: 11.5px; color: var(--ink-faint); }

/* masked credential rows (integrations) */
.cred-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cred-row:last-child { border-bottom: none; }
.cred-label { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.cred-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink); background: var(--bg); padding: 4px 10px; border-radius: 7px; }
.cred-value.empty { color: var(--ink-faint); font-style: italic; font-family: var(--font); background: transparent; padding: 0; }

.back-link { display: inline-block; color: var(--ink-faint); font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.back-link:hover { color: var(--brand); }

/* admin sub-nav (tabs under Admin) */
.subnav { display: flex; gap: 6px; margin: 0 0 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.subnav a {
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* flash banner */
.sample-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--warn-bg); border: 1px solid #f0dcae; color: #7a5a12;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px;
}
.sample-banner.ok { background: var(--good-bg); border-color: #bfe6d4; color: #14603f; }
.sample-banner.bad { background: #fdeaea; border-color: #f0c4c4; color: #8f2626; }
.sample-tag {
  flex-shrink: 0; background: var(--warn); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
}
.sample-banner.ok .sample-tag { background: var(--good); }
.sample-banner.bad .sample-tag { background: var(--bad); }

/* ---------------------------------------------------- 4. legacy compat */

/* summary stat bar (dashboard / inventory / crm) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 4px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat--ok { border-left-color: var(--good); }
.stat--warn { border-left-color: var(--warn); }
.stat--danger { border-left-color: var(--bad); }
.stat__label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 600; }
.stat__value { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat__meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* card grid (module tiles, admin users) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card-grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.card__icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--blue-light); color: var(--brand);
  border-radius: 10px; font-size: 1.1rem; flex: 0 0 auto;
}
.card__body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.card__title { font-weight: 600; color: var(--ink); }
.card__desc { font-size: 12.5px; color: var(--ink-faint); }
.card__chev { color: var(--ink-faint); font-size: 1.3rem; }

/* buttons (legacy .btn family) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 9px; border: 1px solid transparent;
  padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 42px;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg); color: var(--ink); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--line); }
.btn--danger:hover { background: #fdeaea; }
.btn--sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field__input {
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; font: inherit; font-size: 15px; min-height: 44px; background: #fff; width: 100%; color: var(--ink);
}
.field__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }

/* alerts */
.alert { border-radius: 9px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; }
.alert--error { background: #fdeaea; color: var(--bad); border: 1px solid #f0c4c4; }
.alert--ok { background: var(--good-bg); color: var(--good); border: 1px solid #bfe6d4; }
.empty { color: var(--ink-faint); text-align: center; padding: 32px; }

/* portal panels (partners/customers reuse these class names) */
.panel__title { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); font-weight: 700; }
.panel__lead { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.panel__note { font-size: 13px; color: var(--ink-faint); margin: 0 0 12px; }
.panel--danger { border-color: #f0c4c4; }
.panel--danger .panel__title { color: var(--danger); }

/* admin tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 14px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink-faint); font-weight: 600; border-bottom: 1px solid var(--line); background: var(--bg);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--body); }
.table tr:last-child td { border-bottom: none; }
.table--tight td, .table--tight th { padding: 7px 10px; }

/* tags / labels (legacy pill + inline label variants) */
.tag {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase;
}
.tag--ok    { background: var(--good-bg); color: var(--good); }
.tag--muted { background: #eef0f4; color: var(--ink-soft); }
.tag--navy, .tag--admin { background: var(--blue-light); color: var(--brand); margin-left: .35rem; }

/* misc admin controls */
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--brand); }
.grant-list { display: flex; flex-direction: column; }
.grant { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.grant:last-child { border-bottom: 0; }
.grant__name { font-weight: 600; color: var(--ink); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--brand); }
.assign-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }

/* segmented control */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span { display: block; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; user-select: none; white-space: nowrap; }
.seg__opt + .seg__opt span { border-left: 1px solid var(--line); }
.seg__opt input:checked + span { background: var(--brand); color: #fff; }

/* bottom sheet + save bar (retuned to brand) */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--surface); border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(16,24,40,.18);
  transform: translateY(100%); transition: transform .22s ease; z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.is-open { transform: translateY(0); }
.sheet__inner { max-width: 1000px; margin: 0 auto; padding: 18px; }
.savebar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--navy); color: #fff;
  transform: translateY(100%); transition: transform .2s ease; z-index: 70;
  padding-bottom: env(safe-area-inset-bottom);
}
.savebar.is-open { transform: translateY(0); }
.savebar__inner { max-width: 1000px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* ---------- login / auth (kit login card) ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--navy); }
.auth__card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: 18px; padding: 34px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center;
}
.auth__brand { text-align: center; margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; }
.auth__brand .brand__sub { color: var(--ink-faint); font-size: 12.5px; }
.auth__welcome { text-align: center; color: var(--body); font-size: 14.5px; margin: 0 0 20px; }
.auth__form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth__note { font-size: 11.5px; color: var(--ink-faint); text-align: center; margin: 18px 0 0; line-height: 1.5; }
.auth__logo { width: auto; margin: 0 auto 10px; display: block; }
.auth__logo--full { max-width: 210px; height: auto; }
.brand__sub { font-size: 12.5px; color: var(--ink-faint); letter-spacing: .02em; }

/* Microsoft SSO button */
.btn--ms {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 16px; background: #fff; border: 1px solid #d0d4dc; border-radius: 10px;
  color: #1c2230; font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn--ms:hover { background: #f7f8fa; border-color: #b9bfcb; }
.btn__ms-logo {
  width: 18px; height: 18px; flex: 0 0 auto;
  background-image: linear-gradient(#F25022 0 0), linear-gradient(#7FBA00 0 0), linear-gradient(#00A4EF 0 0), linear-gradient(#FFB900 0 0);
  background-repeat: no-repeat; background-size: 8px 8px;
  background-position: left top, right top, left bottom, right bottom;
}

/* =====================================================================
   INTRANET — knowledge base (kept on its own navy-tinted identity;
   retuned only where it referenced shared tokens)
   ===================================================================== */
.kb { --kb-ink:#1c2230; --kb-accent:#b8472f; }
.page__head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.kb-search { display: flex; gap: 8px; margin: 0 0 16px; }
.kb-search__input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; font: inherit; min-height: 44px; background: #fff; }
.kb-search__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }

.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); transition: border-color .12s ease, transform .12s ease;
}
.kb-item:hover { border-color: var(--brand); transform: translateY(-1px); }
.kb-item__main { display: flex; flex-direction: column; min-width: 0; }
.kb-item__title { font-weight: 600; color: var(--ink); }
.kb-item__excerpt { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.kb-item__cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); background: var(--blue-light); padding: 3px 8px; border-radius: 6px; white-space: nowrap; flex: 0 0 auto; }
.pin { color: var(--warn); margin-right: 4px; }

.kb-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); max-width: 760px; line-height: 1.65; }
.kb-article h2 { color: var(--ink); margin: 24px 0 10px; font-size: 20px; }
.kb-article h3 { color: var(--ink); margin: 20px 0 8px; font-size: 17px; }
.kb-article h2:first-child, .kb-article h3:first-child { margin-top: 0; }
.kb-article p { margin: 0 0 16px; }
.kb-article ul, .kb-article ol { margin: 0 0 16px 20px; }
.kb-article a { color: var(--brand); text-decoration: underline; }
.kb-article blockquote { border-left: 3px solid var(--brand); margin: 0 0 16px; padding: 4px 0 4px 16px; color: var(--body); }
.kb-article pre { background: #f3f5f8; border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px; overflow-x: auto; font-size: 13px; }
.kb-article code { background: #f3f5f8; padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.kb-article img { max-width: 100%; height: auto; border-radius: 9px; }
.kb-article table { border-collapse: collapse; width: 100%; margin: 0 0 16px; }
.kb-article th, .kb-article td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; }
.kb-article th { background: #f3f5f8; }

/* editor */
.editor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.editor__toolbar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 6px; background: #f3f5f8; border-bottom: 1px solid var(--line); }
.editor__toolbar button { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid transparent; background: transparent; border-radius: 5px; cursor: pointer; font-size: 13.5px; color: var(--body); }
.editor__toolbar button:hover { background: #e4e9f0; border-color: var(--line); }
.editor__sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.editor__surface { min-height: 300px; padding: 16px 18px; line-height: 1.6; outline: none; }
.editor__surface:focus { box-shadow: inset 0 0 0 2px rgba(59,91,219,.15); }
.editor__surface h2 { font-size: 19px; margin: 16px 0 8px; }
.editor__surface h3 { font-size: 17px; margin: 14px 0 6px; }
.editor__surface blockquote { border-left: 3px solid var(--brand); padding-left: 16px; color: var(--ink-faint); }

/* KB hero + tiles + cards (kept navy hero for depth, rust accents) */
.kb-hero { position: relative; border-radius: 20px; padding: 44px 24px 40px; margin-bottom: 28px; overflow: hidden;
  background: radial-gradient(120% 140% at 10% 0%, #2a3441 0%, #1f2733 45%, #161c26 100%); color: #fff; isolation: isolate; }
.kb-hero--slim { padding: 24px; }
.kb-hero__glow { position: absolute; inset: -40% -10% auto auto; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(59,91,219,.4), transparent 60%); filter: blur(20px); z-index: -1; animation: kbFloat 12s ease-in-out infinite; }
@keyframes kbFloat { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,25px)} }
.kb-hero__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.kb-hero--slim .kb-hero__inner { text-align: left; }
.kb-hero__title { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.kb-hero__sub { margin: 0 0 22px; opacity: .85; font-size: 15px; }
.kb-hero__search { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px); border-radius: 14px; padding: 6px 6px 6px 14px; max-width: 560px; margin: 0 auto; }
.kb-hero--slim .kb-hero__search { margin: 12px 0 0; }
.kb-hero__icon { width: 20px; height: 20px; color: rgba(255,255,255,.8); flex: 0 0 auto; }
.kb-hero__input { flex: 1; background: transparent; border: 0; outline: none; color: #fff; font: inherit; font-size: 15px; min-height: 40px; }
.kb-hero__input::placeholder { color: rgba(255,255,255,.6); }
.kb-hero__go { border: 0; border-radius: 10px; padding: 10px 18px; min-height: 44px; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; transition: filter .1s ease, transform .1s ease; }
.kb-hero__go:hover { filter: brightness(1.06); transform: translateY(-1px); }
.kb-hero__new { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: #fff; font-size: 14px; opacity: .9; border-bottom: 1px dashed rgba(255,255,255,.4); }
.kb-hero__new:hover { opacity: 1; }

.kb-section { margin: 0 0 36px; }
.kb-section__title { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 800; margin: 0 0 16px; }
.kb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 16px; }
.kb-tile { position: relative; overflow: hidden; border-radius: 16px; padding: 20px; min-height: 128px; display: flex; flex-direction: column; color: #fff; box-shadow: 0 6px 20px rgba(16,24,40,.18); transition: transform .16s ease, box-shadow .16s ease; }
.kb-tile:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 14px 34px rgba(16,24,40,.28); }
.kb-tile__icon { font-size: 27px; margin-bottom: auto; opacity: .95; }
.kb-tile__name { font-weight: 700; font-size: 17px; margin-top: 10px; }
.kb-tile__count { font-size: 13px; opacity: .82; }
.kb-tile__arrow { position: absolute; right: 16px; bottom: 16px; font-size: 19px; opacity: 0; transform: translateX(-6px); transition: all .18s ease; }
.kb-tile:hover .kb-tile__arrow { opacity: 1; transform: translateX(0); }
.grad-a { background: linear-gradient(135deg,#5B8DEF,#2F6BC9); }
.grad-b { background: linear-gradient(135deg,#7C5CFC,#5433C9); }
.grad-c { background: linear-gradient(135deg,#c85a3c,#9a3a26); }
.grad-d { background: linear-gradient(135deg,#20B597,#0E8A72); }
.grad-e { background: linear-gradient(135deg,#EA5B8B,#C93268); }
.grad-f { background: linear-gradient(135deg,#3AB6D9,#1E88B0); }
.grad-g { background: linear-gradient(135deg,#8E9BAD,#5C6B80); }
.grad-h { background: linear-gradient(135deg,#C9A227,#A07E13); }

.kb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 16px; }
.kb-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.kb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--kb-accent); }
.kb-card__pin { position: absolute; top: 14px; right: 16px; color: var(--warn); }
.kb-card__cat { align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: var(--blue-light); padding: 3px 8px; border-radius: 6px; }
.kb-card__title { font-weight: 700; color: var(--kb-ink); font-size: 16px; line-height: 1.3; }
.kb-card__excerpt { font-size: 13.5px; color: var(--ink-faint); line-height: 1.45; }
.kb-card__more { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.kb-card__more span { transition: transform .14s ease; display: inline-block; }
.kb-card:hover .kb-card__more span { transform: translateX(4px); }

.kb-cathead { margin-bottom: 24px; }
.kb-cathead__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 8px; }
.kb-cathead__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; background: var(--blue-light); color: var(--brand); border-radius: 14px; font-size: 23px; }
.kb-cathead__title { margin: 8px 0 2px; font-size: 25px; font-weight: 800; color: var(--kb-ink); }
.kb-cathead__count { margin: 0; color: var(--ink-faint); font-size: 14px; }

.kb-read__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.kb-read__back { color: var(--ink-faint); font-size: 14px; font-weight: 600; }
.kb-read__back:hover { color: var(--brand); }
.kb-read__back--light { color: rgba(255,255,255,.85); }
.kb-read__back--light:hover { color: #fff; }

.kb-doc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px; box-shadow: var(--shadow); max-width: 820px; margin: 0 auto; }
.kb-doc__head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.kb-doc__cat { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); background: var(--blue-light); padding: 4px 10px; border-radius: 6px; margin-bottom: 12px; }
.kb-doc__title { margin: 0; font-size: 30px; font-weight: 800; color: var(--kb-ink); letter-spacing: -.02em; line-height: 1.2; }
.kb-doc__meta { display: inline-block; margin-top: 10px; color: var(--ink-faint); font-size: 13px; }
.kb-doc__body { line-height: 1.7; color: var(--body); font-size: 16px; }
.kb-doc__body h2 { color: var(--kb-ink); margin: 28px 0 11px; font-size: 22px; }
.kb-doc__body h3 { color: var(--kb-ink); margin: 22px 0 8px; font-size: 18px; }
.kb-doc__body h2:first-child, .kb-doc__body h3:first-child { margin-top: 0; }
.kb-doc__body p { margin: 0 0 18px; }
.kb-doc__body ul, .kb-doc__body ol { margin: 0 0 18px 22px; }
.kb-doc__body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.kb-doc__body blockquote { border-left: 4px solid var(--kb-accent); margin: 0 0 18px; padding: 8px 0 8px 18px; color: var(--body); background: linear-gradient(90deg, rgba(59,91,219,.06), transparent); border-radius: 0 8px 8px 0; }
.kb-doc__body pre { background: #161c26; color: #e6ecf5; border-radius: 12px; padding: 16px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.5; }
.kb-doc__body code { background: var(--blue-light); color: var(--brand-700); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.kb-doc__body pre code { background: transparent; color: inherit; padding: 0; }
.kb-doc__body img { max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0; }
.kb-doc__body table { border-collapse: collapse; width: 100%; margin: 0 0 18px; font-size: 15px; }
.kb-doc__body th, .kb-doc__body td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
.kb-doc__body th { background: #f3f5f8; font-weight: 700; }
.embed { position: relative; width: 100%; padding-top: 56.25%; margin: 20px 0; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(16,24,40,.2); background:#000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kb-read__admin { max-width: 820px; margin: 24px auto 0; text-align: right; }
.kb-results__count { color: var(--ink-faint); margin: 0 0 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page__title { font-size: 20px; }
  .stat__value, .kpi-value { font-size: 22px; }
  .assign-row { grid-template-columns: 1fr; }
  .grant { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kb-hero { padding: 28px 16px; }
  .kb-hero__title { font-size: 24px; }
  .kb-doc { padding: 24px; border-radius: 16px; }
  .kb-doc__title { font-size: 24px; }
  .kb-cathead__row { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Training module — quiz player + course cards.
   Scoped under .training so it can only affect Training screens.
   Uses the Magic palette tokens (navy/rust) so it reads as native.
   ============================================================ */
.training .zh { color: var(--muted); font-size: .92em; }

/* Pending-course cards on the dashboard */
.training .tr-course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.training .tr-course {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.training .tr-course h3 { margin: 2px 0 0; font-size: 16px; color: var(--ink); }
.training .tr-course__desc { margin: 0; color: var(--body); font-size: 13.5px; line-height: 1.5; flex: 1; }
.training .tr-course__meta { color: var(--ink-faint); font-size: 12px; }
.training .tr-course__cta { margin-top: 6px; }
.training .tag.is-warn-tag { background: var(--warn-bg); color: var(--warn); align-self: flex-start; }

/* Feedback + citation */
.training .tr-message {
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px;
  border: 1px solid var(--line);
}
.training .tr-message.is-good { background: var(--good-bg); border-color: #bfe6d3; color: #14523a; }
.training .tr-message.is-bad  { background: #fbe9e9; border-color: #f2c9c9; color: #8f2b2b; }
.training .tr-citation { margin-top: 8px; font-size: 13px; color: var(--body); }

/* Progress bar */
.training .tr-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 4px 0 18px; }
.training .tr-progress__bar { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }

/* Question / step block */
.training .tr-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--surface); }
.training .tr-block__num { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 700; }
.training .tr-block__q { font-size: 17px; font-weight: 600; color: var(--ink); margin: 8px 0 14px; line-height: 1.45; }
.training .tr-helper, .training .tr-muted { color: var(--muted); font-size: 13px; }
.training .tr-helper { margin-bottom: 10px; }
.training .tr-lock {
  background: var(--warn-bg); color: #7a5713; border: 1px solid #f0dcae;
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; margin: 4px 0 14px;
}

/* Answers — single choice (buttons) */
.training .tr-answers { display: grid; gap: 10px; }
.training .tr-answer {
  text-align: left; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; cursor: pointer; transition: all .15s ease;
}
.training .tr-answer:hover:not(:disabled) { border-color: var(--brand); background: #f4f6fd; }
.training .tr-answer.selected { border-color: var(--brand); background: #e9edfb; }
.training .tr-answer:disabled { opacity: .6; cursor: default; }

/* Answers — multi choice (checkbox rows) */
.training .tr-checks { }
.training .tr-check {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
}
.training .tr-check.selected { border-color: var(--brand); background: #e9edfb; }
.training .tr-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); cursor: pointer; }

.training .tr-btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.training .tr-confirm { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: 14px; color: var(--body); }
.training .tr-confirm input { width: 18px; height: 18px; accent-color: var(--brand); }

/* Optional rewatch/reopen panels */
.training .tr-optional { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; background: var(--bg); }
.training .tr-optional > summary { cursor: pointer; font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* Video */
.training .tr-video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 8px 0 16px; }
.training .tr-video-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.training .tr-video-status { font-size: 12px; color: var(--warn); margin-bottom: 6px; }
.training .tr-video-status.done { color: var(--good); font-weight: 600; }
.training .tr-video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.training .tr-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* PDF viewer */
.training .pdf-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.training .pdf-tab { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 13px; cursor: pointer; }
.training .pdf-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.training .pdf-frame { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; height: 62vh; min-height: 420px; }
.training .pdf-frame iframe { width: 100%; height: 100%; border: 0; }
.training .pdf-actions { margin-top: 12px; }

/* On-screen certificate (print-friendly) */
.training .tr-cert {
  margin-top: 18px; border: 1px solid var(--line); border-top: 6px solid var(--navy);
  border-radius: var(--radius); padding: 40px; text-align: center; background: var(--surface);
}
.training .tr-cert__logos { margin-bottom: 20px; }
.training .tr-cert__logos img { height: 50px; width: auto; margin: 0 14px; vertical-align: middle; }
.training .tr-cert__mini { font-size: 12px; letter-spacing: 5px; text-transform: uppercase; color: var(--navy); font-weight: 700; }
.training .tr-cert__rule { width: 56px; height: 3px; background: var(--brand); margin: 12px auto 22px; }
.training .tr-cert__lead { font-size: 15px; color: var(--muted); margin: 6px 0; }
.training .tr-cert__name { font-size: 28px; font-weight: 700; color: var(--navy); margin: 8px 0 16px; }
.training .tr-cert__course { font-size: 21px; font-weight: 700; color: var(--ink); margin: 8px 0 20px; }
.training .tr-cert__meta { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }

@media print {
  .sidebar, .topbar, .subnav, .page__head, .kpi-grid, .tr-block, .tr-message, .tr-progress { display: none !important; }
  .training .tr-cert { border: none; margin: 0; }
  .app, .content, .page { margin: 0 !important; padding: 0 !important; }
}

/* Admin → Training matrices */
.tadmin-lead { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.tadmin .tag.is-good-tag { background: var(--good-bg); color: var(--good); }
.tadmin-inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0; }
.tadmin-mini { width: 130px !important; padding: 6px 9px !important; font-size: 12px !important; display: inline-block !important; }
.tadmin-danger { color: var(--danger); border-color: #eecccc; }
.tadmin-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.tadmin-matrix th, .tadmin-matrix td { text-align: center; white-space: nowrap; }
.tadmin-matrix th:first-child, .tadmin-matrix td:first-child { text-align: left; white-space: normal; min-width: 190px; }
.tadmin-matrix input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.tadmin-matrix .col-all { background: #f4f6fd; }
.tadmin .is-good-text { color: var(--good); font-weight: 600; }
.tadmin .is-bad-text { color: var(--danger); font-weight: 600; }

/* ============================================================
   Min Sell module
   ============================================================ */
/* Reusable status pills (used by Min Sell + others) */
.tag.is-good-tag { background: var(--good-bg); color: var(--good); }
.tag.is-warn-tag { background: var(--warn-bg); color: var(--warn); }
.tag.is-bad-tag  { background: #fbe9e9; color: var(--danger); }
.tag.is-info-tag { background: #e8f0fb; color: var(--info); }
.kpi-card.is-info { }

.minsell .ms-search { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.minsell .ms-search .field__input { max-width: 380px; }

.minsell .ms-form .ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.minsell .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.minsell .field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.minsell .field__hint { font-size: 12px; color: var(--muted); }
.minsell .ms-check { flex-direction: row; align-items: center; gap: 8px; }
.minsell .ms-check input { width: 18px; height: 18px; accent-color: var(--brand); }

.minsell .ms-pricebox { display: flex; gap: 26px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 4px 0 16px; }
.minsell .ms-pricebox > div { display: flex; flex-direction: column; }
.minsell .ms-pricebox span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.minsell .ms-pricebox strong { font-size: 17px; color: var(--ink); }

.minsell .ms-supply { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 16px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.minsell .ms-supply legend { padding: 0 6px; }
.minsell .ms-radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.minsell .ms-radio input { width: 17px; height: 17px; accent-color: var(--brand); }

.minsell .ms-gp { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; background: #e9edfb; border: 1px solid #d3ddf7; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 16px; }
.minsell .ms-gp__item { display: flex; flex-direction: column; }
.minsell .ms-gp__item span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-700); }
.minsell .ms-gp__item strong { font-size: 22px; color: var(--ink); }
.minsell .ms-gp__note { font-size: 12px; color: var(--muted); margin-left: auto; }

.minsell .ms-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 22px; }
.minsell .ms-detail > div { display: flex; flex-direction: column; gap: 2px; }
.minsell .ms-detail span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.minsell .ms-detail strong { font-size: 15px; color: var(--ink); }
.minsell .ms-detail__wide { grid-column: 1 / -1; }

.minsell .ms-import { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; background: var(--bg); }
.minsell .ms-import__row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.minsell .ms-import code { background: #eef0f4; padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* Public approval page (bare) */
.ms-public { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.ms-public__card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 28px; }
.ms-public__brand { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand); font-weight: 800; }
.ms-public h1 { font-size: 22px; margin: 8px 0 2px; color: var(--ink); }
.ms-public__sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.ms-public__rows { display: grid; gap: 8px; margin: 14px 0 20px; }
.ms-public__rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ms-public__rows span { color: var(--ink-soft); font-size: 13px; }
.ms-public__rows b { color: var(--ink); font-size: 14px; }
.ms-public__name { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ms-public__name span { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.ms-public__name em { color: var(--muted); font-style: normal; font-weight: 400; }
.ms-public__name input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.ms-public__btns { display: grid; gap: 10px; }
.ms-btn { padding: 14px 16px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; color: #fff; }
.ms-btn--approve { background: var(--good); }
.ms-btn--call { background: var(--info); }
.ms-btn--decline { background: var(--danger); }
.ms-public__done { padding: 14px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; margin: 6px 0 10px; }
.ms-public__done--good { background: var(--good-bg); color: #14523a; }
.ms-public__done--info { background: #e8f0fb; color: #1c4e8f; }
.ms-public__done--bad { background: #fbe9e9; color: #8f2b2b; }

/* Min Sell — delete controls */
.minsell .ms-row-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.minsell .link-danger { background: none; border: 0; padding: 0; font: inherit; color: var(--danger); cursor: pointer; text-decoration: underline; }
.minsell .link-danger:hover { color: #a5302f; }
.minsell .btn-danger { background: var(--danger); color: #fff; border: 0; border-radius: 9px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.minsell .btn-danger:hover { background: #a5302f; }
.minsell .ms-delete { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #eecccc; }
.minsell .ms-delete > div { display: flex; flex-direction: column; }

/* Min Sell — notification recipients */
.minsell .ms-recip { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.minsell .ms-recip__form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.minsell .ms-recip__form .field__input { width: auto; min-width: 180px; }
.minsell .ms-recip__active { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.minsell .ms-recip__active input { width: 17px; height: 17px; accent-color: var(--brand); }
.minsell .ms-recip__add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.minsell .ms-recip__add .field__input { min-width: 200px; }

/* Min Sell — owner actions on a request */
.minsell .ms-owner-actions { margin: 4px 0 16px; }
.minsell .ms-approve { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }

/* ============================================================
   CRM module
   ============================================================ */
.crm .crm-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.crm .crm-filters .field__input { width: auto; min-width: 150px; flex: 0 0 auto; }
.crm .crm-filters input[type=search] { flex: 1 1 260px; min-width: 220px; }
.crm .crm-head-actions { display: flex; gap: 10px; align-items: center; }

/* ---- CRM landing: recent + follow-up graph ---- */
.crm-landing { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .crm-landing { grid-template-columns: 1fr; } }
.fu-graph { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 8px 2px 0; }
.fu-graph__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.fu-graph__bar { width: 60%; min-height: 3px; background: var(--brand); border-radius: 5px 5px 0 0; position: relative; transition: background .12s; }
.fu-graph__bar.is-empty { background: var(--line); }
.fu-graph__bar.is-today { background: var(--warn); }
.fu-graph__n { font-size: 12px; font-weight: 700; color: var(--ink); }
.fu-graph__lbl { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.fu-graph__lbl b { display: block; color: var(--body); }

/* ---- Key note (red banner) ---- */
.keynote { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  background: #fef2f2; border: 1px solid #fca5a5; border-left: 4px solid #dc2626;
  color: #7f1d1d; border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.keynote__tag { font-weight: 800; color: #dc2626; white-space: nowrap; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; }
.keynote__body { flex: 1; min-width: 200px; font-weight: 600; }
.keynote__actions { display: flex; gap: 12px; align-items: center; }
.keynote__actions button { background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; color: #b91c1c; padding: 0; }
.keynote__actions .link-danger { color: #b91c1c; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; }
.modal.is-open { display: block; }
.modal__scrim { position: absolute; inset: 0; background: rgba(15,20,28,.5); }
.modal__card { position: absolute; left: 50%; top: 8vh; transform: translateX(-50%);
  width: min(1000px, 94vw); max-height: 84vh; overflow: auto; background: #fff;
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 22px 24px; }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal__head h2 { margin: 0; font-size: 18px; }
.modal__close { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal__card textarea.field__input { min-height: 130px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---- unified task/follow-up add form ---- */
.crm-item-add { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.crm-item-add__type { display: flex; gap: 8px; margin-bottom: 10px; }
.crm-item-add__type label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; background: #fff; }
.crm-item-add__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crm-item-add__row .field__input { width: auto; flex: 1 1 200px; min-width: 160px; }
.crm-item-add__row .field__input[type=date] { flex: 0 0 auto; min-width: 150px; }

/* two-column customer page */
.crm .crm-cols { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .crm .crm-cols { grid-template-columns: 1.7fr 1fr; align-items: start; } }
.crm .crm-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.crm .crm-side { display: flex; flex-direction: column; gap: 18px; }

/* details */
.crm .crm-detail { display: grid; gap: 12px; }
.crm .crm-detail > div { display: flex; flex-direction: column; gap: 2px; }
.crm .crm-detail span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.crm .crm-detail strong { font-size: 14.5px; color: var(--ink); font-weight: 600; }
.crm .crm-summary { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.crm .crm-detail-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.crm .crm-summary p { margin: 6px 0 0; color: var(--body); font-size: 13.5px; line-height: 1.5; }

/* opportunities */
.crm .crm-opp { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crm .crm-opp:last-child { border-bottom: 0; }
.crm .crm-opp__title { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crm .crm-opp__meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.crm .crm-opp__stage .field__input { min-width: 140px; padding: 7px 10px; }

/* add-note box */
.crm .crm-note { margin-bottom: 16px; }
.crm .crm-note__row { display: flex; gap: 10px; flex-wrap: wrap; }
.crm .crm-note__row select { max-width: 130px; }
.crm .crm-note__row input[type=text] { flex: 1; min-width: 200px; }

/* timeline */
.crm .crm-timeline { list-style: none; margin: 0; padding: 0; }
.crm .crm-tl { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.crm .crm-tl:last-child { border-bottom: 0; }
.crm .crm-tl__icon { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.crm .crm-tl__text { color: var(--ink); font-size: 14px; line-height: 1.45; }
.crm .crm-tl__meta { color: var(--ink-faint); font-size: 12px; margin-top: 3px; }

/* profiles + fieldsets on the form */
.crm .crm-form .ms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 12px; }
.crm .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.crm .field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.crm .crm-fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 14px; }
.crm .crm-fieldset legend { padding: 0 6px; }
.crm .crm-profiles { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.crm .crm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.crm .crm-check input { width: 17px; height: 17px; accent-color: var(--brand); }
.crm .crm-check em { color: var(--muted); font-style: normal; font-size: 12px; }
.crm .crm-followup .field { margin-bottom: 10px; }
.crm .crm-dupe { margin: 8px 0; padding: 8px 0; font-size: 13.5px; }
.crm textarea.field__input { resize: vertical; font: inherit; }

/* =====================================================================
   Notifications — topbar bell, dropdown, live toasts
   ===================================================================== */
.notif { position: relative; }
.notif__btn { position: relative; }
.notif__badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.notif__badge[hidden] { display: none; }
.notif__panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: 90vw;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(16,24,40,.16); z-index: 60; overflow: hidden;
}
.notif__panel[hidden] { display: none; }
.notif__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.notif__head strong { font-size: 14px; color: var(--ink); }
.notif__clear { background: none; border: 0; color: var(--brand); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.notif__list { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
.notif__item { border-radius: var(--radius-sm); }
.notif__item a { display: block; padding: 10px 12px; text-decoration: none; color: inherit; }
.notif__item:not(:has(a)) { padding: 10px 12px; }
.notif__item:hover { background: var(--bg); }
.notif__item.is-unread { background: #eef4ff; }
.notif__item.is-unread:hover { background: #e4edff; }
.notif__item-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.notif__item-body { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.notif__empty { padding: 18px 12px; text-align: center; color: var(--ink-faint); font-size: 13px; }

.toast-stack {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(16,24,40,.18);
  padding: 12px 34px 12px 14px; position: relative;
  opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast--sms { border-left-color: var(--good); }
.toast--task { border-left-color: var(--warn); }
.toast--link { cursor: pointer; }
.toast__title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.toast__body { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.toast__x { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 18px; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.toast__x:hover { color: var(--ink); }

/* =====================================================================
   CRM — two-way SMS thread + prospect tasks
   ===================================================================== */
.crm .crm-thread { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.crm .crm-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; position: relative; }
.crm .crm-msg__meta { display: block; font-size: 11px; margin-top: 4px; opacity: .75; }
.crm .crm-msg--out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.crm .crm-msg--out.is-failed { background: #b04a3d; }
.crm .crm-msg--in { align-self: flex-start; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.crm .crm-sms-form { display: flex; gap: 8px; align-items: flex-end; }
.crm .crm-sms-form textarea { flex: 1; resize: vertical; min-height: 42px; font: inherit; }
.crm .crm-sms-note { font-size: 12px; color: var(--ink-faint); margin: 2px 0 10px; }
.crm .crm-sms-warn { font-size: 12.5px; color: var(--bad); margin: 2px 0 10px; }

.crm .crm-tasks { list-style: none; margin: 0 0 14px; padding: 0; }
.crm .crm-task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crm .crm-task:last-child { border-bottom: 0; }
.crm .crm-task.is-done .crm-task__title { text-decoration: line-through; color: var(--ink-faint); }
.crm .crm-task__check { margin-top: 1px; }
.crm .crm-task__check button { background: none; border: 1.6px solid var(--line); width: 20px; height: 20px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--good); }
.crm .crm-task.is-done .crm-task__check button { background: var(--good); border-color: var(--good); color: #fff; }
.crm .crm-task__title { font-size: 14px; color: var(--ink); font-weight: 500; }
.crm .crm-task__meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.crm .crm-task__meta .is-overdue { color: var(--bad); font-weight: 600; }
.crm .crm-task-form .ms-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .crm .crm-task-form .ms-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* Persistent "customer SMS needs review" flag — sits under the topbar,
   sticky so it stays visible while scrolling; server-rendered so it survives
   reloads, and updated live by the notification poller. */
.review-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; background: var(--warn-bg); color: #7a4d00;
  border-bottom: 1px solid #f0d9a8; font-size: 14px;
}
.review-bar[hidden] { display: none; }
.review-bar__icon { font-size: 16px; line-height: 1; }
.review-bar__text { flex: 1; }
.review-bar__text strong { font-weight: 800; }
.review-bar__btn {
  background: var(--brand); color: #fff; text-decoration: none;
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.review-bar__btn:hover { background: var(--brand-700); }
.review-bar__x { background: none; border: 0; font-size: 20px; line-height: 1; color: #9a7530; cursor: pointer; padding: 0 4px; }
.review-bar__x:hover { color: #6b4e10; }
.crm .crm-tl__link { margin-top: 3px; font-size: 12.5px; }

/* ============================================================================
   Sales (MUSIPOS) — polished filter bar + stat tiles. Shared by the dashboard
   "Sales — this month" panel and the Sales report page.
   ========================================================================== */
.sales-live__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sales-live__head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.sales-live__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--good); background: var(--good-bg); padding: 3px 9px; border-radius: 999px;
}
.sales-live__badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px rgba(31,157,107,.16);
}
.sales-live__full { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.sales-live__scope { margin: 12px 2px; font-size: 12.5px; color: var(--ink-faint); }
.sales-live__scope strong { color: var(--ink); font-weight: 650; }

/* Filter bar */
.sl-filters {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap;
  margin: 14px 0 4px; padding: 14px 16px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.sl-select { display: flex; flex-direction: column; gap: 6px; min-width: 210px; flex: 1 1 210px; }
.sl-select > span { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
.sl-select select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  width: 100%; padding: 10px 36px 10px 13px; margin: 0;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 1px 1px rgba(16,24,40,.03); cursor: pointer; transition: border-color .12s, box-shadow .12s;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397a0b0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 16px;
}
.sl-select select:hover { border-color: #cdd3dd; }
.sl-select select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--blue-light); }
.sl-reset { align-self: flex-end; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); padding: 10px 6px; text-decoration: none; white-space: nowrap; }
.sl-reset:hover { color: var(--ink); }

/* Stat tiles */
.sl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.sl-tile {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px 14px; overflow: hidden;
}
.sl-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.sl-tile--sales::before { background: var(--brand); }
.sl-tile--gp::before { background: var(--good); }
.sl-tile__k { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.sl-tile__k .u { color: var(--ink-faint); font-weight: 500; }
.sl-tile__v { display: block; margin-top: 7px; font-size: 27px; line-height: 1.05; font-weight: 750; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sl-tile__m { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 11.5px; color: var(--ink-faint); }
.sl-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.sl-chip--good { color: var(--good); background: var(--good-bg); }
.sl-chip--bad  { color: var(--bad);  background: #fdeaea; }

/* Leaderboard, refreshed */
.sl-board { margin-top: 18px; }
.sl-board__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sl-board__head h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.sl-board__head span { font-size: 12px; color: var(--ink-faint); }
.sl-rows { list-style: none; margin: 0; padding: 0; }
.sl-rows li { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.sl-rows li:last-child { border-bottom: 0; }
.sl-rank { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); background: var(--bg); }
.sl-rows li:nth-child(1) .sl-rank { color: #8a6d0f; background: #fbf1de; }
.sl-name { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sl-name .st { color: var(--ink-faint); font-weight: 500; font-size: 12.5px; }
.sl-amt { font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sl-bpct { flex: none; min-width: 46px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); background: var(--bg); border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.sl-bpct--hit { color: var(--good); background: var(--good-bg); }
.sl-bpct--none { color: var(--ink-faint); }

/* Budget progress bar + pace marker (on the MTD tiles) */
.sl-tile__b { margin-top: 10px; }
.sl-bar { position: relative; height: 7px; border-radius: 999px; background: var(--line); }
.sl-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--brand); min-width: 2px; }
.sl-bar__fill--gp { background: var(--good); }
.sl-bar__fill--behind { background: var(--warn); }
.sl-bar__pace { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--ink); opacity: .45; }
.sl-bl { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 11px; color: var(--ink-faint); }
.sl-bl b { color: var(--ink); font-weight: 700; }
.sl-bl .beh { color: var(--warn); font-weight: 700; }
.sl-bl .ahd { color: var(--good); font-weight: 700; }
.sl-nb { margin-top: 9px; font-size: 11px; color: var(--ink-faint); }

/* ============================================================================
   Intranet v4 — breadcrumb, article + rail layout, media embeds, access badges.
   ========================================================================== */
.kb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin: 2px 2px 14px; color: var(--ink-faint); }
.kb-crumbs a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.kb-crumbs a:hover { color: var(--brand); }
.kb-crumbs__sep { color: var(--ink-faint); }
.kb-crumbs__here { color: var(--ink); font-weight: 600; }

.kb-doc2 { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .kb-doc2 { grid-template-columns: 1fr; } .kb-rail { order: -1; } }

.kb-doc__tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.kb-doc__cat { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--brand); text-decoration: none; background: var(--blue-light); padding: 3px 9px; border-radius: 999px; }
.kb-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.kb-badge--role { color: #8a5a00; background: #fbf1de; }
.kb-badge--pw { color: var(--ink-soft); background: var(--bg); }
.kb-doc__byline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.kb-doc__byline .kb-doc__meta { font-size: 13px; color: var(--ink-faint); }
.kb-doc__byline .kb-doc__meta strong { color: var(--ink-soft); font-weight: 700; }
.kb-doc__byline .kb-doc__meta--upd { padding-left: 10px; border-left: 1px solid var(--line); }
.kb-doc__edit { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: none; }

/* Media / attachments */
.kb-media { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.kb-media__h { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.kb-embed { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kb-embed--yt, .kb-embed--video { position: relative; }
.kb-embed--yt iframe, .kb-embed--video video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.kb-embed figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; font-size: 12.5px; color: var(--ink-soft); border-top: 1px solid var(--line); }
/* Consistent, generous PDF height so every document reads the same. */
.kb-embed--pdf iframe { display: block; width: 100%; height: 80vh; min-height: 560px; border: 0; background: var(--bg); }
.kb-embed__pdfbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.kb-embed__pdfbar > span { font-weight: 600; color: var(--ink); }
.kb-embed__acts { display: inline-flex; align-items: center; gap: 12px; }
.kb-embed__pdfbar a { color: var(--brand); text-decoration: none; font-weight: 600; }
.kb-embed__fs { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.kb-embed__fs:hover { border-color: #cdd3dd; color: var(--ink); }
/* Fullscreen: fill the screen, keep media contained. */
.kb-embed:fullscreen { background: #0b0d10; display: flex; flex-direction: column; }
.kb-embed:fullscreen iframe, .kb-embed:fullscreen video { flex: 1; width: 100vw; height: 100vh; aspect-ratio: auto; }
.kb-embed:-webkit-full-screen iframe, .kb-embed:-webkit-full-screen video { width: 100vw; height: 100vh; }
.kb-embed:fullscreen .kb-embed__pdfbar, .kb-embed:fullscreen figcaption { background: #14171c; color: #e6e9ef; border-color: #2a2f38; }
.kb-embed:fullscreen .kb-embed__pdfbar > span, .kb-embed:fullscreen figcaption span { color: #e6e9ef; }
.kb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kb-gallery__item { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.kb-gallery__item img { display: block; width: 100%; height: 130px; object-fit: cover; }
.kb-files { display: flex; flex-direction: column; gap: 8px; }
.kb-file { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.kb-file:hover { border-color: #cdd3dd; }
.kb-file__ic { font-size: 18px; color: var(--ink-soft); }
.kb-file__meta strong { display: block; font-size: 13.5px; color: var(--ink); }
.kb-file__sub { font-size: 11.5px; color: var(--ink-faint); }

/* Prev / next */
.kb-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.kb-pn__a { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.kb-pn__a:hover { border-color: #cdd3dd; }
.kb-pn__next { text-align: right; }
.kb-pn__k { font-size: 11.5px; font-weight: 700; color: var(--ink-faint); }
.kb-pn__t { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* Right rail */
.kb-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.kb-rail__box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; }
.kb-rail__h { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.kb-rail__list, .kb-rail__cats { list-style: none; margin: 0; padding: 0; }
.kb-rail__list li + li { margin-top: 2px; }
.kb-rail__list a { display: block; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; }
.kb-rail__list a:hover { background: var(--bg); color: var(--ink); }
.kb-rail__cats > li > a { display: block; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.kb-rail__cats > li > a:hover, .kb-rail__cats a.is-on { background: var(--blue-light); color: var(--brand); }
.kb-rail__cats ul { list-style: none; margin: 2px 0 6px; padding: 0 0 0 14px; }
.kb-rail__cats ul a { display: block; padding: 4px 8px; border-radius: 8px; font-size: 13px; color: var(--ink-faint); text-decoration: none; }
.kb-rail__cats ul a:hover, .kb-rail__cats ul a.is-on { color: var(--brand); }

/* Locked / restricted page */
.kb-locked { max-width: 460px; margin: 30px auto; text-align: center; padding: 30px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.kb-locked__icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); color: var(--ink-soft); }
.kb-locked__title { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.kb-locked__msg { font-size: 14px; color: var(--body); margin: 0 0 6px; }
.kb-locked__sub { font-size: 12.5px; color: var(--ink-faint); margin: 0 0 16px; }
.kb-locked__err { font-size: 12.5px; color: var(--bad); margin: 0 0 10px; }
.kb-locked__form { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.kb-locked__form input { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; min-width: 180px; }
.kb-locked__form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--blue-light); }

/* Attachment management list (editor) */
.kb-attlist { list-style: none; margin: 0; padding: 0; }
.kb-attlist__row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.kb-attlist__row:last-child { border-bottom: 0; }
.kb-attlist__ic { font-size: 17px; width: 22px; text-align: center; }
.kb-attlist__name { flex: 1; font-size: 13.5px; color: var(--ink); }
.kb-attlist__name .muted { display: block; font-size: 11.5px; color: var(--ink-faint); }
.editor__toolbar .editor__clear { color: var(--bad); font-weight: 600; }
.editor__toolbar .editor__clear:hover { background: #fdeaea; }

/* ---- Intranet: article change history (revisions) ------------------------ */
.kb-hist__head { margin: 6px 0 18px; }
.kb-hist__title { font-size: 24px; font-weight: 750; color: var(--ink); margin: 0 0 4px; }
.kb-hist__sub { color: var(--ink-soft); margin: 0; line-height: 1.5; }
.kb-hist__empty { color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }

.kb-hist { list-style: none; margin: 0; padding: 0; position: relative; }
.kb-hist::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.kb-hist__item { position: relative; padding: 0 0 14px 30px; }
.kb-hist__dot { position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--ink-faint); box-sizing: border-box; }
.kb-hist__dot--created  { border-color: #1f9d55; }
.kb-hist__dot--updated  { border-color: #2f6fed; }
.kb-hist__dot--restored { border-color: #d08700; }
.kb-hist__dot--deleted  { border-color: var(--brand); }
.kb-hist__card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kb-hist__item.is-current .kb-hist__card { border-color: #cdd8f5; box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.kb-hist__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kb-hist__badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; }
.kb-hist__badge--created  { background: #e7f6ee; color: #1f7a45; }
.kb-hist__badge--updated  { background: #e9f0fe; color: #2453c0; }
.kb-hist__badge--restored { background: #fdf1dc; color: #9a6400; }
.kb-hist__badge--deleted  { background: #fdeaea; color: var(--brand); }
.kb-hist__now { font-size: 11px; font-weight: 700; color: #2453c0; background: #e9f0fe; padding: 2px 8px; border-radius: 999px; }
.kb-hist__meta { color: var(--ink-soft); font-size: 13px; margin-left: auto; }
.kb-hist__meta strong { color: var(--ink); font-weight: 650; }
.kb-hist__what { margin: 8px 0 0; color: var(--body); font-size: 13.5px; line-height: 1.5; }
.kb-hist__acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kb-hist__acts form { margin: 0; }

/* Read-only past-version viewer */
.kb-rev__notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fdf7e8; border: 1px solid #f0e2be; border-radius: 12px; padding: 12px 16px; margin: 6px 0 18px; }
.kb-rev__notice-txt { color: #6b551b; font-size: 13.5px; line-height: 1.5; }
.kb-rev__notice-txt strong { color: #4d3d10; }
.kb-rev__facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.kb-rev__fact { font-size: 12px; font-weight: 600; color: var(--ink-soft); background: #f1f3f7; border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }
.kb-rev__excerpt { color: var(--ink-soft); font-size: 15px; line-height: 1.55; margin: 6px 0 14px; }
.kb-rev__body { line-height: 1.65; color: var(--body); }

/* ---- Sales dashboard: period toggle, KPI tiles, category bars ------------- */
.sl-seg { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 4px 0 2px; }
.sl-seg__b { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--ink-soft); text-decoration: none; }
.sl-seg__b:hover { background: #f1f3f7; color: var(--ink); }
.sl-seg__b.is-on { background: var(--brand); color: #fff; }
.sl-seg__range { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; padding: 0 8px; }

.sl-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
@media (max-width: 720px) { .sl-kpis { grid-template-columns: repeat(2, 1fr); } }
.sl-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.sl-kpi__k { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.sl-kpi__k .u { font-size: 10.5px; color: var(--ink-faint); font-weight: 600; }
.sl-kpi__v { font-size: 24px; font-weight: 760; color: var(--ink); letter-spacing: -.01em; }
.sl-kpi__m { font-size: 12px; color: var(--ink-soft); }

.sl-cat { display: flex; flex-direction: column; gap: 8px; }
.sl-cat__row { display: grid; grid-template-columns: 190px 1fr 160px; align-items: center; gap: 12px; }
@media (max-width: 640px) { .sl-cat__row { grid-template-columns: 120px 1fr; } .sl-cat__val { grid-column: 2; text-align: right; } }
.sl-cat__name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-cat__bar { height: 12px; background: #eef0f4; border-radius: 999px; overflow: hidden; }
.sl-cat__fill { display: block; height: 100%; background: linear-gradient(90deg, #2f6fed, #6aa1ff); border-radius: 999px; }
.sl-cat__val { font-size: 13px; font-weight: 650; color: var(--ink); text-align: right; }

.sl-lead td { vertical-align: middle; }
.sl-more { margin-top: 10px; }

/* ---- Sales: commission tile, YTD, estimate note, staff visibility -------- */
.sl-tile--comm { border-top: 3px solid #7c4dff; }
.sl-tile__v--muted { color: var(--ink-faint); }
.sl-estimate { margin: 8px 2px 0; font-size: 12px; color: var(--ink-soft); }
.sl-amt__gp { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.staff-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.staff-row:hover { border-color: #cdd3dd; }
.staff-row.is-hidden { background: #fbfbfc; opacity: .7; }
.staff-row input { width: 16px; height: 16px; flex: none; }
.staff-row__name { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.staff-row__meta { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); text-align: right; }

/* ---- Top-bar date + clock ------------------------------------------------ */
.topbar__clock { display: flex; align-items: baseline; gap: 8px; margin: 0 auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topbar__clock-date { font-size: 12.5px; font-weight: 600; color: var(--ink-soft, #5b6472); }
.topbar__clock-time { font-size: 14px; font-weight: 750; color: var(--ink, #1c2230); letter-spacing: .01em; }
@media (max-width: 720px) { .topbar__clock { display: none; } }

/* ---- Sales report (running day board) ------------------------------------ */
.sr-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #1f7a45; background: #e7f6ee; border: 1px solid #bfe6cf; padding: 3px 10px; border-radius: 999px; margin-left: 10px; }
.sr-items td { vertical-align: top; }
.sr-items td:nth-child(3) { min-width: 220px; }
