/* ==========================================================================
   Theme "ommly": the Ommly Brand Guidelines V1.2 applied to the product.
   Palette, Inter, 8-12px radii, neutral surfaces, and the gradient only in controlled places.
   Loaded after ommly.css when UI_THEME=ommly (the default). UI_THEME=automate or classic switch back.
   ========================================================================== */
html[data-ui='ommly'] {
  /* Typography: Inter is the brand typeface (the logo itself is artwork, never typed). */
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Brand palette */
  --o-cyan: #00C8FC;
  --o-blue: #2F6BFF;
  --o-violet: #6538FF;
  --o-midnight: #020817;
  --o-deep: #0B1220;
  --o-frost: #F8FAFC;
  --o-gradient: linear-gradient(#2F6BFF, #2F6BFF);   /* Ommly Blue, solid: the brand guide's primary action colour */

  /* Light theme neutrals */
  --bg: #F5F7FA;           /* Soft Surface */
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;    /* Ommly Frost */
  --sunken: #EEF2F7;
  --hover: #F1F5F9;
  --line: #E2E8F0;         /* Light Border */
  --line-strong: #CBD5E1;
  --ink: #0B1220;          /* Deep Navy: headings */
  --ink-2: #475467;        /* Body Text */
  --ink-3: #667085;        /* Muted Text */

  --brand: #2F6BFF;
  --brand-2: #6538FF;
  --brand-hover: #2459E0;
  --brand-soft: #EEF3FF;
  --brand-ink: #1F4FD1;

  /* Functional colours (status only). The brand values are kept for fills, dots and bars; the text shades are the
     same hues, deepened just enough to reach the 4.5:1 contrast the brand guide requires for normal text. */
  --o-success: #16B364; --o-warn: #F59E0B; --o-danger: #EF4444; --o-info: #3B82F6;
  --success: #0F8A4F;
  --warn: #B45309;
  --danger: #DC2626;
  --info: #2563EB;

  --sb-bg: #FFFFFF;
  --sb-ink: #0B1220;
  --sb-dim: #475467;
  --sb-line: #E2E8F0;
  --sb-w: 272px;

  /* Shape: 8 to 12px corners, 8px spacing rhythm */
  --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-xl: 12px;
  --shadow-1: 0 1px 2px rgba(11, 18, 32, 0.05);
  --shadow-2: 0 1px 3px rgba(11, 18, 32, 0.06), 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-3: 0 18px 40px -12px rgba(11, 18, 32, 0.25);
  --ring: 0 0 0 3px rgba(47, 107, 255, 0.25);
}
html[data-ui='ommly'][data-sidebar='collapsed'] { --sb-w: 76px; }

/* Dark theme: Midnight Navy canvas, Dark Surface panels, Dark Border dividers */
html[data-ui='ommly'][data-theme='dark'] {
  --bg: #020817; --surface: #101827; --surface-2: #0B1220; --sunken: #0B1220; --hover: #172033;
  --line: #1E293B; --line-strong: #2B3A52;
  --ink: #F8FAFC; --ink-2: #CBD5E1; --ink-3: #94A3B8;
  --brand: #2F6BFF; --brand-hover: #4A80FF; --brand-soft: rgba(47, 107, 255, 0.16); --brand-ink: #8CB0FF;
  --success: #34D399; --warn: #FBBF24; --danger: #F87171; --info: #60A5FA; --o-success: #16B364; --o-warn: #F59E0B;
  --sb-bg: #0B1220; --sb-ink: #F8FAFC; --sb-dim: #CBD5E1; --sb-line: #1E293B;
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.4);
  --ring: 0 0 0 3px rgba(79, 130, 255, 0.4);
}


html[data-ui='ommly'] body { font-size: 15.5px; background: var(--bg); color: var(--ink); }
html[data-ui='ommly'] h1, html[data-ui='ommly'] h2, html[data-ui='ommly'] h3 { font-family: var(--font-display); }

/* ---------- Sidebar ---------- */
html[data-ui='ommly'] .sidebar { background: var(--sb-bg); border-right: 1px solid var(--sb-line); padding: 14px 14px 12px; }
html[data-ui='ommly'] .sb-top { padding: 4px 6px 14px; }
html[data-ui='ommly'] .sb-brand, html[data-ui='ommly'] .sb-brand:hover { color: var(--ink); }
html[data-ui='ommly'] .sb-logo { background: linear-gradient(135deg, #0a4d3c, #12806a); box-shadow: none; border-radius: 10px; }
html[data-ui='ommly'] .sb-wordmark { font: 600 21px var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
html[data-ui='ommly'] .sb-collapse { color: var(--ink-3); }
html[data-ui='ommly'] .sb-nav { gap: 2px; }
html[data-ui='ommly'] .sb-section { color: var(--ink-3); font: 600 12px var(--font-sans); letter-spacing: 0.09em; opacity: 1; padding: 20px 12px 8px; }
html[data-ui='ommly'] .sb-link { height: 44px; font-size: 15.5px; font-weight: 500; color: var(--ink-2); border-radius: 10px; gap: 13px; }
html[data-ui='ommly'] .sb-link > i { font-size: 20px; color: var(--ink-2); }
html[data-ui='ommly'] .sb-link:hover { background: var(--hover); color: var(--ink); }
html[data-ui='ommly'] .sb-link:hover > i { transform: none; }
html[data-ui='ommly'] .sb-link.active { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .sb-link.active > i { color: #fff; }
html[data-ui='ommly'] .sb-link.active::before { display: none; }
html[data-ui='ommly'] .sb-link.sb-sub { height: 38px; font-size: 14.5px; padding-left: 46px; }
html[data-ui='ommly'] .sb-badge { background: var(--brand); color: #fff; border: 0; box-shadow: none; font: 700 12px var(--font-sans); min-width: 26px; height: 24px; border-radius: 999px; }
html[data-ui='ommly'] .sb-link.active .sb-badge { background: #fff; color: var(--brand); }
html[data-ui='ommly'] .sb-link.has-new:not(.active) .sb-badge { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .sb-alerts { margin-top: 2px; }
html[data-ui='ommly'] .sb-balance {
  display: flex; align-items: center; gap: 10px; margin: 10px 2px 8px; padding: 10px 14px; border-radius: 12px;
  background: #dbeafe; color: #1d4ed8; font-weight: 500; font-size: 15px; border: 1px solid #c7dbfb;
}
html[data-ui='ommly'] .sb-balance:hover { background: #cfe2fd; color: #1d4ed8; }
html[data-ui='ommly'] .sb-balance .ico { width: 30px; height: 30px; border-radius: 50%; background: #2563eb; color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; }
html[data-ui='ommly'] .sb-balance b { font-weight: 700; font-size: 17px; }
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-balance { padding: 8px; justify-content: center; }
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-balance .txt { display: none; }
html[data-ui='ommly'][data-theme='dark'] .sb-balance { background: #12284a; color: #93c5fd; border-color: #1c3a66; }
html[data-ui='ommly'] .sb-user { background: transparent; border: 0; border-top: 1px solid var(--sb-line); border-radius: 0; margin-top: 10px; padding: 14px 6px 4px; }
html[data-ui='ommly'] .sb-avatar { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .sb-avatar::after { border-color: var(--sb-bg); }
html[data-ui='ommly'] .sb-who b { color: var(--ink); font-size: 15px; font-weight: 600; }
html[data-ui='ommly'] .sb-who span { color: var(--ink-3); font-size: 13px; }
html[data-ui='ommly'] .sb-tool { color: var(--ink-3); }
html[data-ui='ommly'] .sb-tool:hover { background: var(--hover); color: var(--ink); }
html[data-ui='ommly'] .sb-nav { scrollbar-color: rgba(15, 26, 42, 0.18) transparent; }
html[data-ui='ommly'] .sb-nav::-webkit-scrollbar-thumb { background: rgba(15, 26, 42, 0.18); }

/* ---------- Page ---------- */
html[data-ui='ommly'] .main { background: var(--bg); }
html[data-ui='ommly'] .page { max-width: 1380px; padding: 28px 32px 64px; }
html[data-ui='ommly'] .page-bg { background: none; }
html[data-ui='ommly'] .page-head { margin-bottom: 22px; }
html[data-ui='ommly'] .page-head-icon { display: none; }
html[data-ui='ommly'] .page-head h1 { font: 700 34px/1.15 var(--font-display); letter-spacing: -0.02em; }
html[data-ui='ommly'] .page-head .lede, html[data-ui='ommly'] p.lede { font-size: 17px; color: var(--ink-3); margin-top: 4px; }
html[data-ui='ommly'] .crumbs { font-size: 14px; }
html[data-ui='ommly'] .safe-banner { font-size: 14px; }

/* ---------- Cards, buttons, forms ---------- */
html[data-ui='ommly'] .card { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); background: var(--surface); }
html[data-ui='ommly'] .card-head { padding: 18px 22px; }
html[data-ui='ommly'] .card-title { font: 600 18px var(--font-display); color: var(--ink); }
html[data-ui='ommly'] .card-sub { font-size: 14px; }
html[data-ui='ommly'] .card-body { padding: 20px 22px; }
html[data-ui='ommly'] .card-foot { padding: 14px 22px; background: var(--surface-2); }

html[data-ui='ommly'] .btn { border-radius: 10px; font-weight: 600; font-size: 15px; box-shadow: none; transition: background 0.15s, border-color 0.15s, color 0.15s; }
html[data-ui='ommly'] .btn-primary { background: var(--brand); background-image: none; border-color: var(--brand); color: #fff; box-shadow: none; }
html[data-ui='ommly'] .btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; filter: none; transform: none; box-shadow: none; }
html[data-ui='ommly'] .btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: none; }
html[data-ui='ommly'] .btn-ghost:hover { background: var(--hover); border-color: var(--line-strong); }
html[data-ui='ommly'] .btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
html[data-ui='ommly'] .btn-soft:hover { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--brand-ink); }
html[data-ui='ommly'] .btn-success { background: var(--success); }
html[data-ui='ommly'] .btn-lg { font-size: 16px; }

html[data-ui='ommly'] .input, html[data-ui='ommly'] .select, html[data-ui='ommly'] .textarea { border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 15px; box-shadow: none; }
html[data-ui='ommly'] .input:focus, html[data-ui='ommly'] .select:focus, html[data-ui='ommly'] .textarea:focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; }
html[data-ui='ommly'] .label { font-weight: 600; font-size: 14px; color: var(--ink); }
html[data-ui='ommly'] .hint { color: var(--ink-3); }

html[data-ui='ommly'] .badge { border-radius: 999px; font-weight: 600; }
html[data-ui='ommly'] .b-brand { background: var(--brand-soft); color: var(--brand-ink); }
html[data-ui='ommly'] .callout.accent { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
html[data-ui='ommly'] .callout.accent i { color: var(--brand); }
html[data-ui='ommly'] a.btn, html[data-ui='ommly'] .sb-link, html[data-ui='ommly'] .sb-brand { color: inherit; }
html[data-ui='ommly'] a.btn-primary, html[data-ui='ommly'] a.btn-primary:hover { color: #fff; }

/* ---------- Tables (header row in plain bold text, like the reference) ---------- */
html[data-ui='ommly'] .table-wrap { background: var(--surface); }
html[data-ui='ommly'] .table th { background: var(--surface); color: var(--ink); text-transform: none; letter-spacing: 0; font: 600 15px var(--font-sans); padding: 15px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
html[data-ui='ommly'] .table td { padding: 16px 18px; font-size: 15px; border-bottom: 1px solid var(--line); }
html[data-ui='ommly'] .table tbody tr:hover td { background: #f6f8fa; }
html[data-ui='ommly'][data-theme='dark'] .table tbody tr:hover td { background: var(--hover); }
html[data-ui='ommly'] .table a { color: var(--ink); font-weight: 500; }
html[data-ui='ommly'] .table a:hover { color: var(--brand); }

/* ---------- KPI cards: label and icon on top, big number underneath ---------- */
html[data-ui='ommly'] .stats { gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
html[data-ui='ommly'] .stat { flex-direction: row-reverse; justify-content: space-between; align-items: flex-start; padding: 22px 24px; min-height: 142px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line); gap: 12px; }
html[data-ui='ommly'] .stat > div:not(.stat-ico) { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; }
html[data-ui='ommly'] .stat-ico { background: none !important; color: var(--ink-3) !important; width: auto; height: auto; font-size: 22px; border-radius: 0; }
html[data-ui='ommly'] .stat-label { order: -1; font-size: 16px; color: var(--ink-2); font-weight: 500; margin-bottom: 20px; }
html[data-ui='ommly'] .stat-value { font: 700 36px/1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; }

/* ---------- Dashboard plan bar: the dark green band across the top ---------- */
html[data-ui='ommly'] .status-bar {
  background: var(--brand); color: #fff; border: 0; border-radius: 0; box-shadow: none;
  margin: -28px -32px 24px; padding: 16px 32px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
html[data-ui='ommly'] .status-bar .muted, html[data-ui='ommly'] .status-bar .tiny { color: rgba(255, 255, 255, 0.72); letter-spacing: 0.08em; font-size: 12px; }
html[data-ui='ommly'] .status-bar .strong { color: #fff; font-size: 18px; font-weight: 600; }
html[data-ui='ommly'] .status-bar .badge { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ---------- Segmented tabs, chips, modals ---------- */
html[data-ui='ommly'] .seg { background: var(--sunken); border-radius: 12px; }
html[data-ui='ommly'] .seg-item { border-radius: 9px; font-weight: 600; }
html[data-ui='ommly'] .seg-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
html[data-ui='ommly'] .seg-item.active .n { color: var(--brand); }
html[data-ui='ommly'] .modal { border-radius: 16px; }
html[data-ui='ommly'] .toast { border-radius: 12px; }
html[data-ui='ommly'] .switch:checked { background: var(--brand); }

/* ---------- Desk, chats, avatars ---------- */
html[data-ui='ommly'] .q-item.active { background: var(--brand-soft); }
html[data-ui='ommly'] .avatar:not([class*='plat-']) { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .bubble.out, html[data-ui='ommly'] .msg-out .bubble, html[data-ui='ommly'] .bubble-out { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .btn-approve, html[data-ui='ommly'] .approve-btn { background: var(--brand); }

/* ---------- Sign-in and landing ---------- */
html[data-ui='ommly'] .auth-hero { background: #06352a; }
html[data-ui='ommly'] .auth-hero::before { background: #0f766e; }
html[data-ui='ommly'] .auth-hero::after { background: #10b981; }
html[data-ui='ommly'] .demo-ai .row span.go { background: var(--brand); }
html[data-ui='ommly'] .auth-brand .sb-logo { background: linear-gradient(135deg, #10b981, #0f766e); }
html[data-ui='ommly'] .landing-ico { color: var(--brand); }
html[data-ui='ommly'] .landing { background: var(--bg); }

/* ---------- Refinements after the first side-by-side check ---------- */
/* Sidebar groups stay open, as in the reference. */
html[data-ui='ommly'] .sb-link.group-closed { display: flex; }
html[data-ui='ommly'] .sb-section[data-group] { cursor: default; }
html[data-ui='ommly'] .sb-section[data-group]::after { display: none; }

/* Narrow icon rail: a thin divider instead of label text. */
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-section { height: 1px; padding: 0; margin: 10px 14px; background: var(--sb-line); font-size: 0; color: transparent; overflow: hidden; }
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-alerts { justify-content: center; padding: 0; }
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-balance { margin: 8px 6px; }

/* Leftover purple and pink from the old look. */
html[data-ui='ommly'] .thread-head::after { background: var(--line); height: 1px; opacity: 1; }
html[data-ui='ommly'] .bubble.mine { background: var(--brand); box-shadow: none; }
html[data-ui='ommly'] .meter-bar i { background: var(--brand); }
html[data-ui='ommly'] .q-item.active::before { background: var(--brand); }

/* One Alerts bell: the sidebar row. The small bell among the tools is hidden. */
html[data-ui='ommly'] .sb-tools [data-alerts-bell] { display: none; }
html[data-ui='ommly'] .sb-alerts .sb-badge { margin-left: auto; }

/* ==========================================================================
   Polish pass: the same look, finished properly.
   ========================================================================== */
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html[data-ui='ommly'] .page { animation: page-in 0.28s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { html[data-ui='ommly'] .page { animation: none; } }

/* Visible keyboard focus everywhere. */
html[data-ui='ommly'] :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
html[data-ui='ommly'] .input:focus-visible, html[data-ui='ommly'] .select:focus-visible, html[data-ui='ommly'] .textarea:focus-visible { outline: none; }

/* One pager look for every list: "Rows per page [10]" on the left, "Page 1 of N" and square buttons on the right. */
html[data-ui='ommly'] .ct-pager, html[data-ui='ommly'] .pager, html[data-ui='ommly'] .au-pager,
html[data-ui='ommly'] .ld-pager, html[data-ui='ommly'] .sh-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--line); margin: 0; font-size: 15px; color: var(--ink-2); background: transparent;
}
html[data-ui='ommly'] .ct-pager .select, html[data-ui='ommly'] .pager .select, html[data-ui='ommly'] .au-pager .select,
html[data-ui='ommly'] .ld-pager .select, html[data-ui='ommly'] .sh-pager .select { width: 76px; height: 38px; min-height: 38px; padding: 0 10px; margin-left: 8px; }
html[data-ui='ommly'] .ct-pager .pg { gap: 8px; }
html[data-ui='ommly'] .ct-pager .btn-icon, html[data-ui='ommly'] .pager .btn, html[data-ui='ommly'] .au-pager .btn,
html[data-ui='ommly'] .ld-pager .btn, html[data-ui='ommly'] .sh-pager .btn { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 8px; justify-content: center; }
html[data-ui='ommly'] .card-foot.spread { font-size: 15px; }

/* Row actions fold into a three-dot menu when there are three or more (script adds the wrapper). */
html[data-ui='ommly'] .kebab { display: inline-block; }
html[data-ui='ommly'] .kebab-btn { width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; font-size: 18px; }
html[data-ui='ommly'] .kebab-btn:hover, html[data-ui='ommly'] .kebab-btn[aria-expanded='true'] { background: var(--hover); border-color: var(--line); color: var(--ink); }
html[data-ui='ommly'] .kebab-menu { display: none; position: fixed; z-index: 400; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px -10px rgba(15, 26, 42, 0.28); }
html[data-ui='ommly'] .kebab-menu.open { display: block; }
html[data-ui='ommly'] .kebab-menu > *, html[data-ui='ommly'] .kebab-menu form { display: block; margin: 0; width: 100%; }
html[data-ui='ommly'] .kebab-menu .btn { width: 100%; justify-content: flex-start; height: 40px; border: 0; background: transparent; box-shadow: none; border-radius: 8px; color: var(--ink); font-weight: 500; }
html[data-ui='ommly'] .kebab-menu .btn:hover { background: var(--hover); }
html[data-ui='ommly'] .kebab-menu .btn-danger-soft { color: var(--danger); }
html[data-ui='ommly'] .kebab-menu .btn-danger-soft:hover { background: var(--danger-soft); color: var(--danger); }

/* Search box in the sidebar and the Ctrl+K palette. */
html[data-ui='ommly'] .sb-search {
  display: flex; align-items: center; gap: 10px; width: calc(100% - 4px); margin: 4px 2px 6px; padding: 0 12px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink-3); font: 500 14.5px var(--font-sans); cursor: pointer; text-align: left;
}
html[data-ui='ommly'] .sb-search:hover { border-color: var(--ink-3); color: var(--ink-2); }
html[data-ui='ommly'] .sb-search kbd { margin-left: auto; font: 600 11.5px var(--font-sans); padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-3); background: var(--surface-2); }
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-search { justify-content: center; padding: 0; }
html[data-ui='ommly'][data-sidebar='collapsed'] .sb-search span, html[data-ui='ommly'][data-sidebar='collapsed'] .sb-search kbd { display: none; }

.cmdk-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(15, 26, 42, 0.45); display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0; backdrop-filter: blur(2px); }
.cmdk-overlay.open { display: flex; }
.cmdk { width: min(620px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(15, 26, 42, 0.5); overflow: hidden; font-family: var(--font-sans); }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font: 500 17px var(--font-sans); background: transparent; color: var(--ink); outline: none; }
.cmdk ul { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.cmdk li a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--ink); font-size: 15.5px; }
.cmdk li a i { font-size: 18px; color: var(--ink-3); width: 20px; text-align: center; }
.cmdk li a small { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.cmdk li.active a, .cmdk li a:hover { background: var(--brand); color: #fff; }
.cmdk li.active a i, .cmdk li.active a small, .cmdk li a:hover i, .cmdk li a:hover small { color: rgba(255, 255, 255, 0.85); }
.cmdk .cmdk-empty { padding: 22px; text-align: center; color: var(--ink-3); }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; background: var(--surface-2); }
.cmdk-foot kbd { font: 600 11px var(--font-sans); padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }

/* Support sits at the bottom under the person, as in the reference. */
html[data-ui='ommly'] .sb-support { margin: 2px 0 0; height: 40px; }
html[data-ui='ommly'] .sb-tools { margin-top: 2px; }
html[data-ui='ommly'] .kebab-menu > .btn, html[data-ui='ommly'] .kebab-menu > a { display: flex; align-items: center; }
html[data-ui='ommly'] .kebab-menu form .btn { display: flex; align-items: center; }

/* Support is pinned at the bottom, so the copy inside the Account group is hidden. */
html[data-ui='ommly'] .sb-nav a.sb-link[href$='/support/'] { display: none; }

/* Phones: the bottom bar keeps only the main links. Search, balance and the pinned extras are for the wide sidebar. */
@media (max-width: 960px) {
  html[data-ui='ommly'] .sb-balance, html[data-ui='ommly'] .sb-search,
  html[data-ui='ommly'] .sb-alerts, html[data-ui='ommly'] .sb-support { display: none; }
  html[data-ui='ommly'] .sb-nav a.sb-link[href$='/support/'] { display: flex; }
  html[data-ui='ommly'] .sidebar { padding: 6px 8px; border-right: 0; border-top: 1px solid var(--sb-line); }
  html[data-ui='ommly'] .sb-link { color: var(--ink-2); }
  html[data-ui='ommly'] .sb-link.active { background: var(--brand-soft); color: var(--brand); }
  html[data-ui='ommly'] .sb-link.active > i { color: var(--brand); }
  html[data-ui='ommly'] .page { padding: 20px 16px 84px; }
  html[data-ui='ommly'] .page-head h1 { font-size: 28px; }
  html[data-ui='ommly'] .status-bar { margin: -20px -16px 18px; padding: 14px 16px; gap: 16px; }
}
@media (max-width: 960px) {
  html[data-ui='ommly'] .sb-link { flex-direction: column; justify-content: center; gap: 3px; height: 52px; padding: 0 10px; font-size: 10.5px; border-radius: 12px; }
  html[data-ui='ommly'] .sb-link > i { font-size: 19px; }
  html[data-ui='ommly'] .sb-badge { position: absolute; top: 2px; right: 10px; min-width: 18px; height: 18px; font-size: 10px; padding: 0 4px; }
}

/* ==========================================================================
   Brand rules
   ========================================================================== */
html[data-ui='ommly'] { --link: #2F6BFF; }
html[data-ui='ommly'][data-theme='dark'] { --link: #7FA6FF; }
html[data-ui='ommly'] a:not([class]) { color: var(--link); }
html[data-ui='ommly'] body { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
html[data-ui='ommly'] :is(.main, .auth-panel, .landing-body) :is(h1, h2, h3) { color: var(--ink); }
html[data-ui='ommly'] .auth-hero :is(h1, h2, h3) { color: #F8FAFC; }

/* Type scale: H1 36/700, card and section titles 18/600, UI labels 13-15/500, captions 12-13/400 */
html[data-ui='ommly'] .page-head h1 { font: 700 36px/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
html[data-ui='ommly'] .page-head .lede, html[data-ui='ommly'] p.lede { font-size: 16px; color: var(--ink-3); }
html[data-ui='ommly'] .card-title { font: 600 18px var(--font-display); }
html[data-ui='ommly'] .btn { font-weight: 500; font-size: 14px; }
html[data-ui='ommly'] .label { font-weight: 500; font-size: 14px; color: var(--ink); }
html[data-ui='ommly'] .hint, html[data-ui='ommly'] .tiny { font-size: 12.5px; }
html[data-ui='ommly'] .sb-link { font-size: 14.5px; font-weight: 500; }
html[data-ui='ommly'] .sb-section { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; }

/* ---------- Logo: the supplied artwork, never typed text ---------- */
html[data-ui='ommly'] .sb-brand { padding: 6px 4px; }
html[data-ui='ommly'] .sb-brand .sb-logo, html[data-ui='ommly'] .sb-brand .sb-wordmark { display: none; }
html[data-ui='ommly'] .brand-full { height: 40px; width: auto; display: block; }
html[data-ui='ommly'] .brand-full-dark { display: none; }
html[data-ui='ommly'][data-theme='dark'] .brand-full-light { display: none; }
html[data-ui='ommly'][data-theme='dark'] .brand-full-dark { display: block; }
html[data-ui='ommly'] .brand-mark { display: none; width: 40px; height: 40px; }
html[data-ui='ommly'][data-sidebar='collapsed'] .brand-full { display: none !important; }
html[data-ui='ommly'][data-sidebar='collapsed'] .brand-mark { display: block; }
/* Anywhere else the old "O" tile appears, show the mascot mark and drop the typed word next to it. */
html[data-ui='ommly'] .sb-logo { background: url('../brand/mark.png') center / contain no-repeat; color: transparent; font-size: 0; box-shadow: none; border-radius: 0; width: 44px; height: 44px; }
html[data-ui='ommly'] .auth-brand, html[data-ui='ommly'] .auth-mobile-brand { font-size: 0; }
html[data-ui='ommly'] .auth-brand .brand-full { height: 52px; }
html[data-ui='ommly'] .auth-brand .brand-full-dark { display: block; }
html[data-ui='ommly'] .auth-brand .brand-full-light { display: none; }
html[data-ui='ommly'] .auth-mobile-brand .brand-full { height: 36px; }

/* ---------- Navigation: conventional, with a controlled gradient accent on the active item ---------- */
html[data-ui='ommly'] .sb-link.active { background: var(--brand-soft); color: var(--brand-ink); }
html[data-ui='ommly'] .sb-link.active > i { color: var(--brand); }
html[data-ui='ommly'] .sb-link.active::before { display: block; content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--o-gradient); animation: none; }
html[data-ui='ommly'] .sb-badge, html[data-ui='ommly'] .sb-link.active .sb-badge, html[data-ui='ommly'] .sb-link.has-new:not(.active) .sb-badge { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .sb-balance { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
html[data-ui='ommly'] .sb-balance:hover { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand-ink); }
html[data-ui='ommly'] .sb-balance .ico { background: var(--brand); }
html[data-ui='ommly'][data-theme='dark'] .sb-balance { background: rgba(47, 107, 255, 0.14); color: #A9C4FF; border-color: rgba(47, 107, 255, 0.35); }
html[data-ui='ommly'] .sb-avatar, html[data-ui='ommly'] .avatar:not([class*='plat-']) { background: var(--brand-soft); color: var(--brand-ink); }
html[data-ui='ommly'] .sb-who b { font-weight: 600; }

/* ---------- Surfaces and components ---------- */
html[data-ui='ommly'] .card { border-radius: 12px; box-shadow: var(--shadow-2); }
html[data-ui='ommly'] .btn { border-radius: 10px; }
html[data-ui='ommly'] .btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-ui='ommly'] .btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
html[data-ui='ommly'] .btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
html[data-ui='ommly'] .input, html[data-ui='ommly'] .select, html[data-ui='ommly'] .textarea { border-radius: 10px; font-size: 14.5px; border-color: var(--line-strong); }
html[data-ui='ommly'][data-theme='dark'] .input, html[data-ui='ommly'][data-theme='dark'] .select, html[data-ui='ommly'][data-theme='dark'] .textarea { background: var(--surface-2); }
html[data-ui='ommly'] .badge { border-radius: 8px; font-weight: 600; font-size: 12px; }
html[data-ui='ommly'] .seg { border-radius: 10px; }
html[data-ui='ommly'] .seg-item { border-radius: 8px; font-weight: 500; }
html[data-ui='ommly'] .seg-item.active { color: var(--brand-ink); }
html[data-ui='ommly'] .modal { border-radius: 12px; }
html[data-ui='ommly'] .table th { background: var(--surface-2); color: var(--ink-2); font: 600 13px var(--font-sans); padding: 12px 18px; }
html[data-ui='ommly'] .table tbody tr:hover td { background: var(--hover); }
html[data-ui='ommly'] .table a { color: var(--ink); font-weight: 500; }
html[data-ui='ommly'] .table a:hover { color: var(--brand); }
html[data-ui='ommly'] .stat-label { font-size: 14px; color: var(--ink-3); font-weight: 500; }
html[data-ui='ommly'] .stat-value { font: 700 32px/1 var(--font-display); color: var(--ink); }
html[data-ui='ommly'] .meter-bar i, html[data-ui='ommly'] .q-item.active::before { background: var(--brand); }
html[data-ui='ommly'] .q-item.active { background: var(--brand-soft); }
html[data-ui='ommly'] .q-item.active::before { background: var(--o-gradient); }
html[data-ui='ommly'] .bubble.mine { background: var(--brand); color: #fff; }
html[data-ui='ommly'] .thread-head::after { background: var(--line); }
html[data-ui='ommly'] .callout.accent { background: var(--brand-soft); }

/* ---------- The few places the gradient is allowed ---------- */
/* 1. The selected call to action: approving a reply. */
html[data-ui='ommly'] .composer-actions .btn-primary { background-image: var(--o-gradient); border-color: transparent; }
html[data-ui='ommly'] .composer-actions .btn-primary:hover { filter: brightness(1.06); background-image: var(--o-gradient); }
/* 2. AI indicators: a small signal beside a clear label ("AI draft", "Written by AI"). */
html[data-ui='ommly'] i.bi-stars { background: var(--o-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-ui='ommly'] .ai-tag { background: var(--brand-soft); color: var(--brand-ink); }
/* 3. The dashboard plan band: Deep Navy with a gradient edge. */
html[data-ui='ommly'] .status-bar { background: var(--o-deep); border-bottom: 3px solid transparent; border-image: linear-gradient(#2F6BFF, #2F6BFF) 1; }
html[data-ui='ommly'][data-theme='dark'] .status-bar { background: var(--surface); }
html[data-ui='ommly'] .status-bar .badge { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- Empty states may carry the mascot, always with a plain-words label ---------- */
html[data-ui='ommly'] .empty-ico { width: 76px; height: 76px; border-radius: 16px; background: var(--brand-soft) url('../brand/mark.png') center / 74% no-repeat; }
html[data-ui='ommly'] .empty-ico i { display: none; }

/* ---------- Sign-in and public pages: Midnight Navy with a restrained gradient glow ---------- */
html[data-ui='ommly'] .auth-hero { background: var(--o-midnight); }
html[data-ui='ommly'] .auth-hero::before { background: var(--o-blue); opacity: 0.4; }
html[data-ui='ommly'] .auth-hero::after { background: var(--o-violet); opacity: 0.38; }
html[data-ui='ommly'] .demo-ai .row span.go { background: var(--brand); }
html[data-ui='ommly'] .auth-hero .demo-ai .tag i { color: var(--o-cyan); }
html[data-ui='ommly'] .landing-ico { color: var(--brand); }

/* ---------- Focus is always visible, in both themes ---------- */
html[data-ui='ommly'] :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
html[data-ui='ommly'][data-theme='dark'] :focus-visible { outline-color: #7FA6FF; }

/* ---------- Motion: 150-250 ms, and none for people who ask for less ---------- */
html[data-ui='ommly'] .page { animation-duration: 0.22s; }
@media (prefers-reduced-motion: reduce) { html[data-ui='ommly'] *, html[data-ui='ommly'] *::before, html[data-ui='ommly'] *::after { animation: none !important; transition: none !important; } }

/* Phones: the active tab uses the soft brand tint. */
@media (max-width: 960px) {
  html[data-ui='ommly'] .sb-link.active { background: var(--brand-soft); color: var(--brand); }
  html[data-ui='ommly'] .sb-link.active::before { left: 50%; top: 2px; bottom: auto; width: 22px; height: 3px; transform: translateX(-50%); border-radius: 0 0 3px 3px; }
  html[data-ui='ommly'] .page-head h1 { font-size: 28px; }
}

/* ---------- Public landing page: dark hero moment, light sections ---------- */
html[data-ui='ommly'] .landing-band { background: var(--o-midnight); color: #CBD5E1; position: relative; overflow: hidden; }
html[data-ui='ommly'] .landing-band::before { content: ''; position: absolute; width: 560px; height: 560px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 107, 255, 0.45), transparent 65%); pointer-events: none; }
html[data-ui='ommly'] .landing-band::after { content: ''; position: absolute; width: 520px; height: 520px; left: 30%; bottom: -320px; border-radius: 50%; background: radial-gradient(circle, rgba(101, 56, 255, 0.35), transparent 65%); pointer-events: none; }
html[data-ui='ommly'] .landing-nav, html[data-ui='ommly'] .landing-hero { position: relative; z-index: 1; }
html[data-ui='ommly'] .landing-hero h1 { color: #F8FAFC; }
html[data-ui='ommly'] .landing-hero .sub { color: #CBD5E1; }
html[data-ui='ommly'] .landing-tag { color: #94A3B8; }
html[data-ui='ommly'] .landing-band .btn-primary { background-image: var(--o-gradient); border-color: transparent; color: #fff; }
html[data-ui='ommly'] .landing-band .btn-primary:hover { filter: brightness(1.07); background-image: var(--o-gradient); }
html[data-ui='ommly'] .landing-band .btn-ghost { background: transparent; color: #F8FAFC; border-color: rgba(248, 250, 252, 0.35); }
html[data-ui='ommly'] .landing-band .btn-ghost:hover { background: rgba(248, 250, 252, 0.08); border-color: rgba(248, 250, 252, 0.6); }

html[data-ui='ommly'] .landing-grid h3 { margin: 12px 0 6px; font: 600 18px var(--font-display); }
html[data-ui='ommly'] .landing-grid p { margin: 0; color: var(--ink-3); }
html[data-ui='ommly'] .landing-steps h2, html[data-ui='ommly'] .landing-enquire h2 { font: 600 28px var(--font-display); }

/* Bigger mascot in the narrow rail (the artwork has built-in breathing room), and brand fills for status dots */
html[data-ui='ommly'] .brand-mark { width: 48px; height: 48px; margin: -4px; }
html[data-ui='ommly'] .dot.on { background: var(--o-success); }
html[data-ui='ommly'] .dot.off, html[data-ui='ommly'] .dot.idle { background: var(--line-strong); }
html[data-ui='ommly'] .safe-banner { color: var(--warn); }

/* Contrast fixes from measuring the rendered pages */
html[data-ui='ommly'] .safe-banner { color: #92400E; }
html[data-ui='ommly'][data-theme='dark'] .safe-banner { color: #FBBF24; }
html[data-ui='ommly'][data-theme='dark'] .btn-primary, html[data-ui='ommly'][data-theme='dark'] a.btn-primary, html[data-ui='ommly'][data-theme='dark'] .btn-primary:hover { color: #fff; }
html[data-ui='ommly'][data-theme='dark'] .sb-link.active { color: #A9C4FF; }

/* Header dropdowns (e.g. Follow-ups "New follow-up") must paint above the cards below,
   which are their own stacking layer because of their entrance transform. */
html[data-ui='ommly'] .page-head { position: relative; z-index: 20; }
html[data-ui='ommly'] .ct-menu .ct-pop { z-index: 40; background: var(--surface); }
html[data-ui='ommly'] .ct-menu .ct-pop form .btn-primary { background: var(--brand); color: #fff; justify-content: center; width: 100%; padding: 10px 14px; font-weight: 600; }
html[data-ui='ommly'] .ct-menu .ct-pop form .btn-primary:hover { background: var(--brand-hover, var(--brand)); filter: brightness(.95); }
html[data-ui='ommly'] .ct-menu .ct-pop input[type=datetime-local], html[data-ui='ommly'] .ct-menu .ct-pop textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 14px var(--font-sans); }

/* Landing: nav links stay light on the dark band; icon tiles keep white glyphs */
html[data-ui='ommly'] .landing-nav .landing-links a { color: #CBD5E1; }
html[data-ui='ommly'] .landing-nav .landing-links a:hover { color: #fff; }
html[data-ui='ommly'] .lp-ico i, html[data-ui='ommly'] .lp-ico i.bi-stars { color: #fff; -webkit-text-fill-color: #fff; background: none; }
html[data-ui='ommly'] .lp-draft .lp-ai i, html[data-ui='ommly'] .lp-pill i { -webkit-text-fill-color: currentColor; background: none; color: #7DD3FC; }

/* Sidebar list scrolls under the pinned Support link: fade the cut edge instead of a half-cut row */
html[data-ui='ommly'] .sb-nav { padding-bottom: 12px; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); }

/* "N new drafts" pill on the open approval desk */
.pulse-pill { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: inline-flex; gap: 8px; align-items: center;
  padding: 10px 18px; border: 0; border-radius: 999px; cursor: pointer; font: 600 14px var(--font-sans, Inter, sans-serif); color: #fff;
  background: #2F6BFF; box-shadow: 0 10px 30px rgba(47, 107, 255, .45); animation: pulse-in .25s ease-out; }
.pulse-pill[hidden] { display: none; }
.pulse-pill i.bi-stars { -webkit-text-fill-color: #fff; background: none; color: #fff; }
@keyframes pulse-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-pill { animation: none; } }

/* ======================================================================
   Calm, light and clean: the same brand palette, turned down.
   Softer page, hairline borders, no heavy blocks of colour, lighter type.
   ====================================================================== */
html[data-ui='ommly']:not([data-theme='dark']) {
  --bg: #F8FAFC;                       /* Frost */
  --line: #EAEFF5;
  --shadow-2: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html[data-ui='ommly'] .page-bg { background: none; }
html[data-ui='ommly'] .card, html[data-ui='ommly'] .stat { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); border-color: var(--line); }

/* Top status strip: a light card, not a dark bar */
html[data-ui='ommly'] .status-bar,
html[data-ui='ommly'][data-theme='dark'] .status-bar {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-image: none;
  border-radius: 12px; margin: 0 0 20px; padding: 14px 22px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html[data-ui='ommly'] .status-bar .muted, html[data-ui='ommly'] .status-bar .tiny { color: var(--ink-3); font-size: 11.5px; }
html[data-ui='ommly'] .status-bar .strong { color: var(--ink); font-size: 16px; font-weight: 600; }
html[data-ui='ommly'] .status-bar .badge { background: var(--brand-soft); color: var(--brand-ink); }
@media (max-width: 820px) { html[data-ui='ommly'] .status-bar { margin: 0 0 14px; padding: 12px 16px; } }

/* "Safe mode" note: a quiet flat strip instead of loud stripes */
html[data-ui='ommly'] .safe-banner { background: #FFFBEB; background-image: none; border-bottom: 1px solid #FDE68A; padding: 7px 16px; font-size: 13px; }
html[data-ui='ommly'] .safe-banner i { animation: none; }
html[data-ui='ommly'][data-theme='dark'] .safe-banner { background: rgba(245, 158, 11, 0.08); border-bottom-color: rgba(245, 158, 11, 0.25); }

/* Count badges: soft tint with blue text, not solid blue */
html[data-ui='ommly'] .sb-badge, html[data-ui='ommly'] .sb-link.active .sb-badge, html[data-ui='ommly'] .sb-link.has-new:not(.active) .sb-badge,
html[data-ui='ommly'] .sb-alerts .sb-badge { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
html[data-ui='ommly'] .sb-balance { background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
html[data-ui='ommly'] .sb-balance:hover { background: var(--brand-soft); color: var(--ink); }
html[data-ui='ommly'] .sb-balance .ico { background: var(--brand-soft); color: var(--brand); }
html[data-ui='ommly'] .sb-balance b { font-weight: 600; font-size: 16px; }

/* Lighter type: calm headings, numbers that do not shout */
html[data-ui='ommly'] .page-head h1, html[data-ui='ommly'] .dash-head h1 { font: 600 28px/1.2 var(--font-display); letter-spacing: -0.015em; }
html[data-ui='ommly'] .page-head .lede, html[data-ui='ommly'] p.lede { font-size: 15px; }
html[data-ui='ommly'] .card-title { font: 600 16px var(--font-display); }
html[data-ui='ommly'] .stat-value { font-weight: 600; font-size: 30px; letter-spacing: -0.02em; }
html[data-ui='ommly'] .stat-label { font-size: 13.5px; color: var(--ink-3); }
html[data-ui='ommly'] .stat { min-height: 112px; padding: 18px 20px; }

/* Cards keep their natural height: no tall empty boxes */
html[data-ui='ommly'] .grid-2 { align-items: start; }
