/* Master Admin console (multi-company P2b), restyled in 2.14.1.

   Its own frame so nobody confuses the platform console with a company's
   screens: near-black glass, a floating island nav, cards built as a panel
   sitting in a tray (shell + core), pill buttons.

   iOS 12 floor (Safari 12): no flex `gap` (margins instead; grid gap is
   fine), no `inset`, no :is()/:where(), -webkit- prefixes on
   backdrop-filter and appearance. Motion is transform/opacity only and
   off under prefers-reduced-motion. */

body.console {
  --cx-bg: #07070b;
  --cx-core: #101017;
  --cx-core-2: #0c0c12;
  --cx-hair: rgba(255, 255, 255, 0.07);
  --cx-hair-2: rgba(255, 255, 255, 0.12);
  --cx-text: #ecebf4;
  --cx-text-2: #a3a1b5;
  --cx-text-3: #6f6d82;
  --cx-violet: #8b7cff;
  --cx-violet-soft: rgba(139, 124, 255, 0.16);
  --cx-green: #4ade80;
  --cx-amber: #f5a524;
  --cx-red: #f26d6d;
  --cx-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --cx-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --cx-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

  margin: 0; min-height: 100vh;
  background: var(--cx-bg); color: var(--cx-text);
  font-family: var(--cx-font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[lang="fa"] body.console { --cx-font: 'Vazirmatn', 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Two slow light pools behind everything. Fixed and pointer-less, so they
   never repaint while the page scrolls. */
body.console::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(42rem 30rem at 12% -6%, rgba(124, 108, 255, 0.16), transparent 70%),
    radial-gradient(36rem 28rem at 96% 8%, rgba(45, 212, 191, 0.07), transparent 70%);
}
body.console a { color: #c9c2ff; text-decoration: none; transition: color 300ms var(--cx-ease); }
body.console a:hover { color: #fff; }
body.console .dim { color: var(--cx-text-3); }
body.console .mono { font-family: var(--cx-mono); font-size: 0.92em; }

/* ---------- Top bar ----------
   Brand | sections | language + account, on one row when it fits. Below
   1180px the sections take a second row of their own that scrolls
   sideways, so nothing ever wraps under the brand or overlaps it. The
   account is a <details> menu: no script needed to open it, and it works
   on iOS 12. */
.cx-nav-wrap { position: -webkit-sticky; position: sticky; top: 12px; z-index: 20; padding: 0 16px; }
.cx-nav {
  max-width: 1240px; margin: 12px auto 0; box-sizing: border-box;
  display: flex; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 22px;
  background: rgba(16, 16, 24, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--cx-hair);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 50px -24px rgba(0, 0, 0, 0.8);
}
.cx-brand {
  display: flex; align-items: center; flex: 0 0 auto; height: 38px; padding: 0 8px;
  color: #fff !important; font-weight: 600; letter-spacing: 0.02em;
}
.cx-brand-mark { width: 28px; height: 22px; color: #f4f2ff; margin-inline-end: 4px; overflow: visible; }
.cx-brand-word { font-size: 13px; font-weight: 600; letter-spacing: 0.32em; }
[dir="rtl"] .cx-brand { direction: ltr; }
.cx-brand-tag {
  margin-inline-start: 10px; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: #cfc8ff; background: var(--cx-violet-soft);
}
[lang="fa"] .cx-brand-tag, [lang="fa"] .cx-eyebrow, [lang="fa"] .cx-label, [lang="fa"] .cx-table th { letter-spacing: 0; text-transform: none; }

.cx-links {
  display: flex; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; justify-content: center;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 8px;
}
.cx-links::-webkit-scrollbar { display: none; }
.cx-links a {
  display: inline-block; flex: 0 0 auto; white-space: nowrap; margin: 0 1px;
  padding: 9px 13px; border-radius: 999px; font-size: 14px; line-height: 20px; color: var(--cx-text-2);
  transition: background-color 300ms var(--cx-ease), color 300ms var(--cx-ease);
}
.cx-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.cx-links a.is-active { color: #fff; background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.cx-links a:focus { outline: none; box-shadow: 0 0 0 3px var(--cx-violet-soft); }

.cx-tools { display: flex; align-items: center; flex: 0 0 auto; margin-inline-start: auto; }
.cx-tools > * + * { margin-inline-start: 8px; }

.cx-lang { display: flex; align-items: center; height: 38px; box-sizing: border-box; padding: 4px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--cx-hair); }
.cx-lang form { margin: 0; }
.cx-lang button {
  min-width: 34px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 12px/1 var(--cx-font); letter-spacing: 0.04em; color: var(--cx-text-2); background: transparent;
  transition: background-color 300ms var(--cx-ease), color 300ms var(--cx-ease);
}
.cx-lang button:hover { color: #fff; }
.cx-lang button.is-active { color: #0b0a14; background: #ecebff; }
[lang="fa"] .cx-lang button { letter-spacing: 0; }

.cx-account { position: relative; }
.cx-account summary {
  display: flex; align-items: center; height: 38px; box-sizing: border-box; padding: 0 12px 0 4px;
  border-radius: 999px; cursor: pointer; list-style: none; color: var(--cx-text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--cx-hair);
  transition: background-color 300ms var(--cx-ease);
}
[dir="rtl"] .cx-account summary { padding: 0 4px 0 12px; }
.cx-account summary::-webkit-details-marker { display: none; }
.cx-account summary::marker { content: ""; }
.cx-account summary:hover, .cx-account[open] summary { background: rgba(255, 255, 255, 0.09); }
.cx-account summary:focus { outline: none; box-shadow: 0 0 0 3px var(--cx-violet-soft); }
.cx-avatar {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 9px; margin-inline-end: 8px;
  font-size: 12px; font-weight: 700; color: #0b0a14; background: #cfc8ff;
}
.cx-account-name { font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-caret {
  width: 7px; height: 7px; margin-inline-start: 9px; margin-top: -3px;
  border-right: 1.5px solid var(--cx-text-2); border-bottom: 1.5px solid var(--cx-text-2);
  -webkit-transform: rotate(45deg); transform: rotate(45deg);
  transition: transform 300ms var(--cx-ease);
}
.cx-account[open] .cx-caret { -webkit-transform: rotate(-135deg); transform: rotate(-135deg); margin-top: 3px; }
.cx-account-menu {
  position: absolute; top: 46px; right: 0; z-index: 30; min-width: 220px; box-sizing: border-box;
  padding: 14px; border-radius: 18px; background: #15151d; border: 1px solid var(--cx-hair-2);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
}
[dir="rtl"] .cx-account-menu { right: auto; left: 0; }
.cx-account-who { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cx-account-who strong { font-size: 14px; font-weight: 600; color: #fff; margin-inline-end: 10px; }
.cx-role { padding: 3px 9px; border-radius: 999px; font-size: 11px; color: #cfc8ff; background: var(--cx-violet-soft); white-space: nowrap; }
.cx-account form { margin: 0; }
.cx-account-out { width: 100%; }

@media (max-width: 1180px) {
  /* The sections get a row of their own instead of squeezing the bar. */
  .cx-links {
    order: 3; flex: 1 0 100%; justify-content: flex-start;
    margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--cx-hair);
  }
}

/* ---------- Page ---------- */
.cx-main { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 64px 24px 120px; box-sizing: border-box; }
.cx-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
.cx-hero > div:first-child { max-width: 720px; margin-inline-end: 24px; }
.cx-eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 4px 11px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cx-text-2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--cx-hair);
}
.cx-main h1 {
  text-wrap: balance;
  font-family: var(--cx-font); font-weight: 600; font-size: 40px; line-height: 1.08;
  letter-spacing: -0.035em; margin: 0 0 10px; color: #fff;
}
.cx-lede { margin: 0; font-size: 16px; color: var(--cx-text-2); max-width: 62ch; }
.cx-meta { margin: 0; font-size: 14px; color: var(--cx-text-2); }
/* One box per item: Latin words (a code, a time zone) inside Persian text
   would otherwise let the browser reorder the separators between them. */
.cx-meta { display: flex; flex-wrap: wrap; align-items: center; }
.cx-meta-item { display: inline-block; white-space: nowrap; margin: 2px 0; }
.cx-meta-item + .cx-meta-item::before { content: "·"; display: inline-block; margin: 0 10px; color: var(--cx-text-3); }

/* ---------- Shell + core (a panel set in its tray) ---------- */
.cx-shell {
  padding: 6px; margin-bottom: 20px; border-radius: 28px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--cx-hair);
}
.cx-core {
  border-radius: 22px; padding: 26px 28px;
  background: linear-gradient(180deg, var(--cx-core), var(--cx-core-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cx-core + .cx-core { margin-top: 6px; }
.cx-core h2 { font-family: var(--cx-font); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; color: #fff; }
.cx-core .cx-sub { margin: 0 0 20px; font-size: 13.5px; color: var(--cx-text-3); max-width: 70ch; }
.cx-core > h2:last-child, .cx-core > .cx-sub:last-child { margin-bottom: 0; }
.cx-shell.is-warn { background: rgba(245, 165, 36, 0.05); border-color: rgba(245, 165, 36, 0.22); }
.cx-shell.is-danger { background: rgba(242, 109, 109, 0.05); border-color: rgba(242, 109, 109, 0.22); }
.cx-shell.is-warn h2::before, .cx-shell.is-danger h2::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-inline-end: 10px; vertical-align: 2px;
}
.cx-shell.is-warn h2::before { background: var(--cx-amber); box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.16); }
.cx-shell.is-danger h2::before { background: var(--cx-red); box-shadow: 0 0 0 4px rgba(242, 109, 109, 0.16); }
.cx-list { margin: 0; padding-inline-start: 18px; color: var(--cx-text-2); font-size: 14px; }
.cx-list li { margin-bottom: 6px; }

/* ---------- Bento tiles ---------- */
.cx-bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-gap: 16px; gap: 16px; margin-bottom: 20px; }
.cx-bento .cx-shell { margin-bottom: 0; display: flex; }
.cx-bento .cx-core { flex: 1 1 auto; display: flex; flex-direction: column; }
.cx-span-3 { grid-column: span 3; }
.cx-span-4 { grid-column: span 4; }
.cx-span-5 { grid-column: span 5; }
.cx-span-6 { grid-column: span 6; }
.cx-span-7 { grid-column: span 7; }
.cx-span-8 { grid-column: span 8; }
.cx-tall { grid-row: span 2; }
.cx-stat-label { font-size: 12px; font-weight: 500; color: var(--cx-text-3); margin-bottom: 14px; }
.cx-stat { font-size: 36px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.cx-tall .cx-stat { font-size: 72px; margin-top: auto; }
.cx-stat-note { margin-top: 10px; font-size: 13px; color: var(--cx-text-2); }
.cx-stat-text { font-size: 15px; color: var(--cx-text); }

/* ---------- Tables ---------- */
.cx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -10px; }
.cx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cx-table th {
  text-align: start; white-space: nowrap; padding: 0 10px 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-text-3);
}
.cx-table td { padding: 14px 10px; border-top: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.cx-table tbody tr { transition: background-color 300ms var(--cx-ease); }
.cx-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.cx-table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-table .nowrap { white-space: nowrap; }
.cx-table .end { text-align: end; }
.cx-name { color: #fff !important; font-weight: 500; }
.cx-name-sub { display: block; font-size: 12px; color: var(--cx-text-3); font-family: var(--cx-mono); }
.cx-chip {
  display: inline-block; padding: 2px 9px; margin: 1px 4px 1px 0; border-radius: 999px;
  font-size: 12px; font-family: var(--cx-mono); color: var(--cx-text-2); background: rgba(255, 255, 255, 0.05);
}
.cx-chip.is-off { opacity: 0.45; }
.cx-chip.is-accent { color: #cfc8ff; background: var(--cx-violet-soft); font-family: var(--cx-font); }
.cx-status { display: inline-flex; align-items: center; white-space: nowrap; font-size: 13px; color: var(--cx-text-2); }
.cx-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 8px; background: var(--cx-text-3); }
.cx-status.is-active::before { background: var(--cx-green); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14); }
.cx-status.is-suspended::before, .cx-status.is-pending::before { background: var(--cx-amber); box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.14); }
.cx-status.is-archived::before, .cx-status.is-ended::before { background: var(--cx-text-3); }
.cx-empty { color: var(--cx-text-3); padding: 18px 10px !important; }
.cx-details { font-size: 12px; color: var(--cx-text-3); }

/* ---------- Buttons: pills, with an optional icon island ---------- */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  font: 500 14px/1.2 var(--cx-font); white-space: nowrap;
  color: var(--cx-text) !important; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cx-hair-2); -webkit-appearance: none;
  transition: transform 500ms var(--cx-ease), background-color 400ms var(--cx-ease), border-color 400ms var(--cx-ease);
}
.cx-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.2); }
.cx-btn:active { transform: scale(0.98); }
.cx-btn:focus { outline: none; }
.cx-btn:focus-visible { box-shadow: 0 0 0 4px var(--cx-violet-soft); }
.cx-btn-primary { color: #0b0a14 !important; background: #ecebff; border-color: transparent; box-shadow: inset 0 1px 0 #fff, 0 10px 30px -12px rgba(139, 124, 255, 0.7); }
.cx-btn-primary:hover { background: #fff; border-color: transparent; }
.cx-btn-danger { color: #ffd9d9 !important; background: rgba(242, 109, 109, 0.12); border-color: rgba(242, 109, 109, 0.3); }
.cx-btn-danger:hover { background: rgba(242, 109, 109, 0.2); border-color: rgba(242, 109, 109, 0.45); }
.cx-btn-sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.cx-btn.has-icon { padding-inline-end: 6px; }
.cx-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-inline-start: 12px; border-radius: 50%;
  font-size: 15px; background: rgba(11, 10, 20, 0.08);
  transition: transform 500ms var(--cx-ease);
}
.cx-btn-danger .cx-btn-icon, .cx-btn:not(.cx-btn-primary) .cx-btn-icon { background: rgba(255, 255, 255, 0.08); }
.cx-btn:hover .cx-btn-icon { transform: translate(3px, -1px) scale(1.05); }
[dir="rtl"] .cx-btn-icon { -webkit-transform: scaleX(-1); transform: scaleX(-1); }
[dir="rtl"] .cx-btn:hover .cx-btn-icon { transform: scaleX(-1) translate(3px, -1px) scale(1.05); }
.cx-actions { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 -10px; }
.cx-actions > * { margin: 0 10px 10px 0; }
[dir="rtl"] .cx-actions > * { margin: 0 0 10px 10px; }
.cx-actions form { display: inline-block; }
.cx-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.cx-row-actions form { margin: 3px 0 3px 8px; }
[dir="rtl"] .cx-row-actions form { margin: 3px 8px 3px 0; }
.cx-submit { margin-top: 26px; }
.cx-btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--cx-text-2); cursor: pointer; }
.cx-btn-link:hover { color: #fff; }

/* ---------- Fields ---------- */
.cx-form-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 20px 22px; gap: 20px 22px; }
.cx-form-grid .cx-wide { grid-column: 1 / -1; }
.cx-form-stack .cx-field + .cx-field { margin-top: 18px; }
.cx-filters { display: flex; flex-wrap: wrap; align-items: flex-end; }
.cx-filters .cx-field { margin: 0 14px 0 0; min-width: 200px; }
[dir="rtl"] .cx-filters .cx-field { margin: 0 0 0 14px; }
.cx-field { min-width: 0; border: 0; padding: 0; margin: 0; }
.cx-label, .cx-field legend {
  display: block; padding: 0; margin-bottom: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-text-3);
}
.cx-field input[type="text"], .cx-field input[type="password"], .cx-field input[type="email"],
.cx-field input[type="number"], .cx-field input[type="search"], .cx-field input:not([type]),
.cx-field select, .cx-field textarea {
  display: block; width: 100%; box-sizing: border-box; min-height: 48px; margin: 0;
  padding: 12px 15px; border-radius: 14px; font: 400 15px/1.3 var(--cx-font);
  color: var(--cx-text); background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--cx-hair-2); -webkit-appearance: none; appearance: none;
  transition: border-color 350ms var(--cx-ease), box-shadow 350ms var(--cx-ease), background-color 350ms var(--cx-ease);
}
.cx-field input[type="file"] {
  display: block; width: 100%; box-sizing: border-box; padding: 14px 15px; border-radius: 14px;
  font: 400 14px/1.3 var(--cx-font); color: var(--cx-text-2);
  background: rgba(255, 255, 255, 0.035); border: 1px dashed var(--cx-hair-2); cursor: pointer;
}
.cx-field select {
  padding-inline-end: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a3a1b5' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 17px center;
}
[dir="rtl"] .cx-field select { background-position: left 17px center; }
.cx-field select option, .cx-field select optgroup { background: #15151d; color: var(--cx-text); }
.cx-field input:hover, .cx-field select:hover, .cx-field textarea:hover { border-color: rgba(255, 255, 255, 0.2); }
.cx-field input:focus, .cx-field select:focus, .cx-field textarea:focus {
  outline: none; border-color: rgba(139, 124, 255, 0.7);
  background-color: rgba(139, 124, 255, 0.05); box-shadow: 0 0 0 4px var(--cx-violet-soft);
}
.cx-field input:disabled, .cx-field select:disabled { opacity: 0.55; cursor: not-allowed; }
.cx-help { margin-top: 8px; font-size: 12.5px; color: var(--cx-text-3); }
.cx-error { margin-top: 8px; font-size: 13px; color: #ffb4b4; }
.cx-error::before { content: "● "; color: var(--cx-red); font-size: 9px; vertical-align: 2px; }
.cx-field.has-error input, .cx-field.has-error select { border-color: rgba(242, 109, 109, 0.6); }

/* Tick boxes: a tile per choice, a drawn box (the native one cannot be
   styled on iOS 12 otherwise). */
.cx-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-gap: 8px; gap: 8px; }
.cx-check {
  display: flex; align-items: center; cursor: pointer; padding: 11px 14px; border-radius: 14px;
  font-size: 14px; color: var(--cx-text-2); background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 350ms var(--cx-ease), border-color 350ms var(--cx-ease), color 350ms var(--cx-ease);
}
.cx-check:hover { background: rgba(255, 255, 255, 0.05); color: var(--cx-text); }
.cx-check.is-solo { display: inline-flex; padding: 12px 16px; }
.cx-check input {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; margin: 0; margin-inline-end: 12px;
  width: 20px; height: 20px; border-radius: 7px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.25); background: transparent;
  transition: background-color 300ms var(--cx-ease), border-color 300ms var(--cx-ease), transform 300ms var(--cx-ease);
}
.cx-check input:checked {
  border-color: var(--cx-violet); background-color: var(--cx-violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.2l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.cx-check input:focus { outline: none; box-shadow: 0 0 0 4px var(--cx-violet-soft); }
.cx-check input:active { transform: scale(0.9); }
.cx-check input:checked + span { color: #fff; }
.cx-check-all { margin-bottom: 12px; }

/* ---------- Messages ---------- */
.cx-msg {
  display: flex; align-items: center; margin-bottom: 14px; padding: 12px 18px; border-radius: 16px;
  font-size: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--cx-hair);
}
.cx-msg::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 12px; background: var(--cx-violet); }
.cx-msg.is-success::before { background: var(--cx-green); }
.cx-msg.is-warning::before { background: var(--cx-amber); }
.cx-msg.is-error { background: rgba(242, 109, 109, 0.08); border-color: rgba(242, 109, 109, 0.25); }
.cx-msg.is-error::before { background: var(--cx-red); }

/* ---------- Sign-in ---------- */
.cx-auth { max-width: 460px; margin: 6vh auto 0; }
.cx-auth h1 { font-size: 30px; }
.cx-auth-logo { display: block; width: 96px; height: 120px; margin: 4px 0 28px; font-family: var(--cx-font); direction: ltr; }
.cx-auth .cx-lede { font-size: 14.5px; margin-bottom: 24px; }
.cx-key { display: block; font-family: var(--cx-mono); font-size: 17px; letter-spacing: 2px; color: #fff; word-spacing: 4px; }
.cx-qr { display: table; margin: 14px 0 10px; padding: 10px; border-radius: 18px; background: #fff; }
.cx-qr svg { display: block; width: 200px; height: auto; }
.cx-copy { display: flex; align-items: stretch; max-width: 380px; margin-bottom: 8px; }
.cx-copy-field {
  flex: 1 1 auto; min-width: 0; height: 40px; box-sizing: border-box; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--cx-hair-2); background: rgba(255, 255, 255, 0.04);
  font: 600 14px/40px var(--cx-mono); letter-spacing: 0.06em; color: #fff; direction: ltr; text-align: left;
}
.cx-copy-field:focus { outline: none; border-color: rgba(139, 124, 255, 0.7); box-shadow: 0 0 0 3px var(--cx-violet-soft); }
.cx-copy .cx-btn { flex: 0 0 auto; height: 40px; min-height: 40px; margin-inline-start: 8px; }
.cx-copy .cx-btn.is-done { color: #0b0a14 !important; background: #b9f6ca; border-color: transparent; }
.cx-steps { padding-inline-start: 20px; color: var(--cx-text-2); font-size: 14px; }
.cx-steps li { margin-bottom: 12px; }
.cx-link { word-break: break-all; font-family: var(--cx-mono); font-size: 12px; color: var(--cx-text-3); }

/* ---------- Entry motion ---------- */
@-webkit-keyframes cx-rise { from { opacity: 0; -webkit-transform: translateY(18px); } to { opacity: 1; -webkit-transform: none; } }
@keyframes cx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.cx-main > * { -webkit-animation: cx-rise 800ms var(--cx-ease) both; animation: cx-rise 800ms var(--cx-ease) both; }
.cx-main > *:nth-child(2) { -webkit-animation-delay: 70ms; animation-delay: 70ms; }
.cx-main > *:nth-child(3) { -webkit-animation-delay: 140ms; animation-delay: 140ms; }
.cx-main > *:nth-child(4) { -webkit-animation-delay: 210ms; animation-delay: 210ms; }
.cx-main > *:nth-child(5) { -webkit-animation-delay: 280ms; animation-delay: 280ms; }
.cx-main > *:nth-child(n+6) { -webkit-animation-delay: 340ms; animation-delay: 340ms; }
@media (prefers-reduced-motion: reduce) {
  .cx-main > * { -webkit-animation: none; animation: none; }
  body.console * { transition: none !important; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  .cx-span-3, .cx-span-4, .cx-span-5 { grid-column: span 6; }
  .cx-span-6, .cx-span-7, .cx-span-8 { grid-column: span 12; }
  .cx-tall { grid-row: auto; }
  .cx-tall .cx-stat { font-size: 56px; margin-top: 8px; }
}
@media (max-width: 767px) {
  .cx-nav-wrap { top: 8px; padding: 0 10px; }
  .cx-nav { padding: 6px 8px; border-radius: 20px; }
  .cx-brand { padding: 0 4px; }
  .cx-brand-tag { display: none; }               /* the violet dot already says "console" */
  .cx-account summary, [dir="rtl"] .cx-account summary { padding: 0 4px; }
  .cx-avatar { margin-inline-end: 0; }
  .cx-account-name, .cx-caret { display: none; }
  .cx-links a { padding: 8px 11px; font-size: 13.5px; }
  .cx-main { padding: 36px 16px 80px; }
  .cx-main h1 { font-size: 30px; }
  .cx-hero > div:first-child { margin-inline-end: 0; margin-bottom: 16px; }
  .cx-bento { grid-template-columns: 1fr; }
  .cx-bento > * { grid-column: auto !important; }
  .cx-core { padding: 20px 18px; }
  .cx-form-grid { grid-template-columns: 1fr; }
  .cx-filters .cx-field { min-width: 0; width: 100%; margin: 0 0 12px; }
}
