/* portal-v2.css - the v2 look, on when <html> has class "v2" (main/theme.py).

   Three parts:
   1. Foundations: typeface, palette, page background.
   2. Calmer chrome for pages written for the dark theme (their colours are
      remapped class by class in portal-v2-bridge.css, which is generated).
   3. The v2 shell. Page content is built from the shared components in
      portal-ui.css ({% load ui %}), which are themed for both looks.

   The look follows benmore.tech: warm off-white page, near-black ink, Inter at
   regular weights, pill buttons, large-radius panels, one brand blue. */

/* --- 1. Foundations ------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/inter/latin-ext.01ba6c2a184b.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/inter/latin.65850a373e25.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html.v2 {
  --v2-bg: #f4f4f2;
  --v2-surface: #ffffff;
  --v2-surface-2: #f7f7f5;
  --v2-surface-3: #ebebe8;
  --v2-line: #e3e3de;
  --v2-line-2: #d2d2cc;
  --v2-ink: #0b0b0b;
  --v2-ink-2: #3d3d3a;
  --v2-muted: #6f6f69;
  --v2-brand: #1d54e2;
  --v2-brand-tint: #eef2fd;
  --v2-panel: #0b0d12;
  --v2-side: #ecece8;                         /* staff sidebar */
  --v2-bar: rgba(244, 244, 242, 0.88);        /* sticky top bars */
  --v2-hover: rgba(11, 11, 11, 0.05);
  --v2-on-ink: #ffffff;                       /* text on an ink-coloured button */
  --v2-ink-hover: #2b2b29;
  --v2-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

html.v2 body {
  background-color: var(--v2-bg) !important;
  color: var(--v2-ink);
  font-family: var(--v2-font);
  font-weight: 400;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Pages that draw the old grid on <body> or inline, or paint the old page colour inline. */
html.v2 body { background-image: none !important; }
html.v2 .grid-background { background-color: transparent !important; background-image: none !important; }
html.v2 [style*='#0F1117'], html.v2 [style*='#0f1117'] { background-color: transparent !important; background-image: none !important; }
html.v2 ::selection { background: #dbe4fb; }
/* The page body must not trap dialogs and overlays under the sticky header. */
html.v2 main { z-index: auto; }
html.v2 :focus-visible { outline: 2px solid rgba(29, 84, 226, 0.45); outline-offset: 2px; }

/* --- 2. Calmer chrome for pages not yet redesigned -------------------------- */

html.v2 :where(h1, h2, h3, h4) { color: var(--v2-ink); letter-spacing: -0.022em; }
html.v2 :where(h1) { font-weight: 500; letter-spacing: -0.03em; }
/* Inter ships here at 300-500, as on benmore.tech: emphasis is size and space, not weight. */
html.v2 .font-bold, html.v2 .font-extrabold, html.v2 .font-black, html.v2 .font-semibold { font-weight: 500; }
html.v2 :where(b, strong, th) { font-weight: 500; }

/* The dark theme outlined everything twice as thick. */
html.v2 .border-2 { border-width: 1px; }
html.v2 .border-t-2 { border-top-width: 1px; }
html.v2 .border-b-2 { border-bottom-width: 1px; }
html.v2 .border-l-2 { border-left-width: 1px; }
html.v2 .border-r-2 { border-right-width: 1px; }

html.v2 .rounded-md { border-radius: 10px; }
html.v2 .rounded-lg { border-radius: 14px; }
html.v2 .rounded-xl { border-radius: 18px; }
html.v2 .rounded-2xl { border-radius: 24px; }

html.v2 .shadow, html.v2 .shadow-sm, html.v2 .shadow-md { box-shadow: 0 1px 2px rgba(11, 11, 11, 0.04); }
html.v2 .shadow-lg, html.v2 .shadow-xl, html.v2 .shadow-2xl {
  box-shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 14px 32px -18px rgba(11, 11, 11, 0.16);
}
html.v2 .backdrop-blur-sm, html.v2 .backdrop-blur { backdrop-filter: none; }

/* Primary actions are black pills, as on the site. */
html.v2 :where(a, button, input[type='submit'])[class*='bg-blue-6'],
html.v2 :where(a, button, input[type='submit'])[class*='bg-blue-5']:not([class*='bg-blue-500/']),
html.v2 :where(a, button, input[type='submit'])[class*='bg-indigo-6'] { border-radius: 9999px; }
html.v2 .hover\:bg-blue-700:hover, html.v2 .hover\:bg-blue-600:hover, html.v2 .hover\:bg-blue-500:hover,
html.v2 .hover\:bg-indigo-700:hover { background-color: var(--v2-ink-hover); }

/* The classic menu's "current page" marker (base.html). */
html.v2 .active, html.v2 .active:hover {
  background-color: var(--v2-ink) !important; color: var(--v2-on-ink) !important; border: 0 !important;
}

/* Form controls written for dark backgrounds inherit a light default. */
html.v2 :where(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='submit']):not([type='button']), select, textarea) {
  color: var(--v2-ink);
}
html.v2 ::placeholder { color: #9b9b94; opacity: 1; }
html.v2 :where(kbd) {
  background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 6px;
  color: var(--v2-muted); font-family: var(--v2-font); font-size: 12px; padding: 1px 6px;
}

/* Long-form text set for dark pages (Tailwind typography's inverted variant). */
html.v2 .prose-invert {
  --tw-prose-body: var(--v2-ink-2); --tw-prose-headings: var(--v2-ink); --tw-prose-lead: var(--v2-ink-2);
  --tw-prose-links: var(--v2-brand); --tw-prose-bold: var(--v2-ink); --tw-prose-counters: var(--v2-muted);
  --tw-prose-bullets: var(--v2-line-2); --tw-prose-hr: var(--v2-line); --tw-prose-quotes: var(--v2-ink);
  --tw-prose-quote-borders: var(--v2-line); --tw-prose-captions: var(--v2-muted); --tw-prose-code: var(--v2-ink);
  --tw-prose-pre-code: #e7e7e4; --tw-prose-pre-bg: var(--v2-panel); --tw-prose-th-borders: var(--v2-line-2);
  --tw-prose-td-borders: var(--v2-line);
}

/* --- 2b. One standard for pages not yet rebuilt from components ------------------
   Each page in the old theme chose its own heading size, button shape and
   corner radius. These rules read the classes those pages already carry and
   give every page the same answer. Pages built from the ui components
   (class names starting "ui-") are left alone: they are already standard. */

/* Headings: one size per level, whatever text-* class the page used. */
html.v2 main :is(h1):not([class*='ui-']) { font-size: 28px; font-weight: 400; line-height: 1.15; letter-spacing: -0.03em; }
html.v2 main :is(h2):not([class*='ui-']) { font-size: 17px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
html.v2 main :is(h3):not([class*='ui-']) { font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }

/* Table headings: quiet sentence case, not small capitals. */
html.v2 main th:not([class*='ui-']) { font-size: 12.5px; font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--v2-muted); }

/* Surfaces: every bordered box is a rounded card. The percentage keeps tiny
   boxes (drawn checkboxes, icon tiles) from turning into circles. */
html.v2 main :is(div, section, article, form, aside)[class*='border'][class*='bg-gray-9']:not([class*='rounded']):not([class*='ui-']),
html.v2 main :is(div, section, article, form, aside)[class*='border'][class*='bg-gray-8']:not([class*='rounded']):not([class*='ui-']),
html.v2 :is(div, section)[class*='fixed'] > div[class*='bg-gray-9']:not([class*='rounded']) {
  border-radius: min(20px, 30%);
}

/* Form controls: one shape and one border. */
html.v2 main :is(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='color']):not([type='submit']):not([type='button']):not([type='hidden']), select, textarea):not([class*='ui-']) {
  border: 1px solid var(--v2-line-2); border-radius: 12px; background-color: var(--v2-surface);
}
html.v2 main :is(input, select, textarea):not([class*='ui-']):focus {
  border-color: var(--v2-brand); box-shadow: 0 0 0 4px rgba(29, 84, 226, 0.12); outline: none;
}

/* Buttons. The old theme's main action was a blue-tinted outline; it and every
   solid blue button become the same black pill. Other buttons keep their
   colour meaning (grey = secondary, red = destructive) and take the pill shape. */
html.v2 :is(a, button, input[type='submit'])[class*='bg-blue-500/10'][class*='border-blue-500']:not([class*='ui-']),
html.v2 :is(a, button, input[type='submit'])[class*='bg-blue-500/20'][class*='border-blue-500']:not([class*='ui-']) {
  background-color: var(--v2-ink); border-color: var(--v2-ink); color: var(--v2-on-ink); box-shadow: none;
}
html.v2 :is(a, button, input[type='submit'])[class*='bg-blue-500/10'][class*='border-blue-500']:not([class*='ui-']):hover,
html.v2 :is(a, button, input[type='submit'])[class*='bg-blue-500/20'][class*='border-blue-500']:not([class*='ui-']):hover {
  background-color: var(--v2-ink-hover); border-color: var(--v2-ink-hover); color: var(--v2-on-ink);
}
html.v2 :is(a, button)[class*='bg-blue-500/10'][class*='border-blue-500']:not([class*='ui-']) :is(span, svg, i, p),
html.v2 :is(a, button)[class*='bg-blue-500/20'][class*='border-blue-500']:not([class*='ui-']) :is(span, svg, i, p) { color: var(--v2-on-ink); }
html.v2 main :is(button, input[type='submit'], a[class*='px-'][class*='py-'][class*='border']):not([class*='ui-']):not([class*='rounded-full']):not([class*='w-full']) {
  border-radius: 9999px;
}
html.v2 main :is(button, a[class*='px-'][class*='py-'][class*='border'])[class*='w-full']:not([class*='ui-']):not([class*='rounded']) { border-radius: 12px; }

/* Status labels: tinted boxes become pills without an outline. */
html.v2 main span[class*='border'][class*='/10']:not([class*='ui-']),
html.v2 main span[class*='border'][class*='/20']:not([class*='ui-']) { border-color: transparent; border-radius: 9999px; }

/* --- 3. The v2 frame ---------------------------------------------------------
   Staff: a fixed sidebar (snippets/shell_v2.html). Clients: a slim top bar. */

.v2-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--v2-ink); text-decoration: none; flex-shrink: 0; }
.v2-brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.v2-brand-custom { height: 30px; max-width: 170px; object-fit: contain; }
.v2-brand-name { display: flex; flex-direction: column; font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.v2-brand-name small { margin-top: 3px; font-size: 10.5px; font-weight: 400; letter-spacing: 0; color: var(--v2-muted); }

.v2-side {
  position: fixed; inset: 0 auto 0 0; z-index: 60; width: 244px; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 12px 12px; background: var(--v2-side); border-right: 1px solid var(--v2-line); overflow-y: auto;
}
.v2-side > .v2-brand { padding: 2px 8px 4px; }
body:has(> .v2-side) { padding-left: 244px; }
.v2-side-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px; width: 100%;
  border: 1px solid var(--v2-line-2); border-radius: 10px; background: var(--v2-surface); cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--v2-muted);
}
.v2-side-search:hover { border-color: var(--v2-ink); }
.v2-side-search span { flex: 1; text-align: left; }
.v2-side-search kbd { font: inherit; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; background: var(--v2-bg); border: 1px solid var(--v2-line); color: var(--v2-muted); }
.v2-side-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.v2-side-label { margin: 16px 0 4px; padding: 0 10px; font-size: 11.5px; letter-spacing: 0.02em; color: var(--v2-muted); }
.v2-side-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
  font-size: 14px; color: var(--v2-ink-2); text-decoration: none; transition: background-color 0.12s;
}
.v2-side-link .ui-icon { color: var(--v2-muted); }
.v2-side-link:hover { background: var(--v2-hover); color: var(--v2-ink); }
.v2-side-link.is-active { background: var(--v2-surface); color: var(--v2-ink); font-weight: 500; box-shadow: 0 0 0 1px var(--v2-line); }
.v2-side-link.is-active .ui-icon { color: var(--v2-ink); }

.v2-menu { position: relative; }
.v2-menu-panel {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 70; min-width: 232px; padding: 6px;
  background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 18px 40px -16px rgba(11, 11, 11, 0.22);
}
.v2-menu-panel-right { left: auto; right: 0; }
.v2-menu-panel-up { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; }
.v2-menu.is-open > .v2-menu-panel { display: block; }
.v2-menu-item {
  display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 9px; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: 14px; color: var(--v2-ink); text-decoration: none;
}
.v2-menu-item:hover { background: var(--v2-bg); }
.v2-menu-who { padding: 10px 10px 8px; font-size: 14px; font-weight: 500; display: flex; flex-direction: column; gap: 1px; }
.v2-menu-who small { font-size: 12.5px; font-weight: 400; color: var(--v2-muted); }
.v2-menu-sep { height: 1px; margin: 6px; background: var(--v2-line); }

.v2-side-who {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px;
  background: none; cursor: pointer; text-align: left; font: inherit;
}
.v2-side-who:hover, .v2-menu.is-open > .v2-side-who { background: var(--v2-hover); }
.v2-side-who-text { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; color: var(--v2-ink); }
.v2-side-who-text small { font-size: 12px; color: var(--v2-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-avatar {
  width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 9999px; cursor: pointer;
  background: var(--v2-ink); color: var(--v2-on-ink); font: inherit; font-size: 13.5px; font-weight: 500;
}
.v2-side .v2-avatar { cursor: inherit; }

/* Clients: top bar */
.v2-header { position: sticky; top: 0; z-index: 50; background: var(--v2-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--v2-line); }
.v2-header-inner { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; height: 60px; display: flex; align-items: center; gap: 1.25rem; }
.v2-nav { flex: 1; }

/* Staff on a small screen: the sidebar becomes a drawer under a top bar */
.v2-topbar { display: none; }
.v2-side-scrim { display: none; }
.v2-burger { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--v2-line-2); border-radius: 10px; background: var(--v2-surface); color: var(--v2-ink); cursor: pointer; }
@media (max-width: 960px) {
  body:has(> .v2-side) { padding-left: 0; }
  .v2-topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; height: 56px; padding: 0 1rem; background: var(--v2-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--v2-line); }
  .v2-side { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: none; }
  html.v2-side-open .v2-side { transform: none; box-shadow: 0 0 60px rgba(11, 11, 11, 0.25); }
  html.v2-side-open .v2-side-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(11, 11, 11, 0.32); }
}

/* The page column: wide enough for tables, never edge to edge. */
html.v2 body > main { max-width: 76rem; padding-top: 2rem; padding-bottom: 4rem; }
@media print { .v2-side, .v2-topbar, .v2-side-scrim { display: none !important; } body:has(> .v2-side) { padding-left: 0 !important; } }

/* --- Page fixes: pages whose own <style> block hard-codes dark colours ---------- */

/* Sign-in page (templates/login.html). */
html.v2 .v2-login-logo { filter: brightness(0); }
html.v2 .v2-login-card {
  background: var(--v2-surface); border: 1px solid var(--v2-line); border-radius: 24px;
  box-shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 24px 48px -28px rgba(11, 11, 11, 0.2);
}
html.v2 .v2-login-card h1 { font-size: 30px; font-weight: 400; letter-spacing: -0.035em; }
html.v2 .v2-login-card input[type='text'], html.v2 .v2-login-card input[type='password'] {
  height: 48px; border: 1px solid var(--v2-line-2); border-radius: 12px; background: var(--v2-surface);
}
html.v2 .v2-login-card input[type='text']:focus, html.v2 .v2-login-card input[type='password']:focus {
  border-color: var(--v2-brand); box-shadow: 0 0 0 4px rgba(29, 84, 226, 0.12);
}
html.v2 .v2-login-card .checkbox-box { border-radius: 6px; border-color: var(--v2-line-2); }
html.v2 .v2-login-card a { color: var(--v2-ink); text-decoration: underline; text-decoration-color: var(--v2-line-2); text-underline-offset: 3px; }
html.v2 .v2-login-submit, html.v2 .v2-login-submit:hover {
  height: 48px; padding-top: 0; padding-bottom: 0; border: 0; border-radius: 9999px;
  background: var(--v2-ink); color: var(--v2-on-ink); box-shadow: none; opacity: 1;
}
html.v2 .v2-login-submit:hover { background: var(--v2-ink-hover); }
html.v2 .v2-login-submit svg { display: none; }

/* Project pages (templates/detailbase.html) take their colours from variables. */
html.v2 {
  --bg-primary: var(--v2-bg); --bg-secondary: var(--v2-bar); --bg-card: var(--v2-surface); --bg-card-hover: var(--v2-surface-2);
  --border-primary: var(--v2-line); --border-secondary: var(--v2-line); --text-primary: var(--v2-ink); --text-secondary: var(--v2-ink-2);
  --text-tertiary: var(--v2-muted); --grid-color: transparent; --accent-blue: var(--v2-brand); --accent-blue-dim: var(--v2-brand-tint);
}

/* Payments (projects/templates/payments/partials/parent_header.html). */
html.v2 .pp-head .pp-eyebrow { color: var(--v2-muted); font-weight: 400; letter-spacing: 0.08em; }
html.v2 .pp-head .pp-title { color: var(--v2-ink); font-weight: 400; letter-spacing: -0.03em; }

/* Project pages (templates/detailbase.html): page chrome is left out when a document prints. */
@media print {
  html.v2 .v2-header, html.v2 .pd-chrome { display: none !important; }
}

/* --- One page column -------------------------------------------------------
   The top bar, the page and the footer share one width and one side padding,
   so every left and right edge on a page lines up. */
html.v2 { --v2-page-max: 76rem; --v2-page-pad: 1rem; }
@media (min-width: 640px) { html.v2 { --v2-page-pad: 1.5rem; } }
@media (min-width: 1024px) { html.v2 { --v2-page-pad: 2rem; } }
html.v2 body > main, html.v2 .v2-header-inner, html.v2 body > footer.pd-chrome {
  max-width: var(--v2-page-max) !important; margin-inline: auto; padding-inline: var(--v2-page-pad) !important;
}

/* Footer: one for every page, on the page column. */
html.v2 body { display: flex; flex-direction: column; min-height: 100vh; }
html.v2 body > main { flex: 1 0 auto; width: 100%; }
.v2-footer { margin-top: auto; border-top: 1px solid var(--v2-line); }
.v2-footer-inner {
  max-width: var(--v2-page-max); margin-inline: auto; padding: 18px var(--v2-page-pad) 22px; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  font-size: 13px; color: var(--v2-muted);
}
.v2-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.v2-footer a { color: var(--v2-muted); text-decoration: none; }
.v2-footer a:hover { color: var(--v2-ink); text-decoration: underline; }
@media print { .v2-footer { display: none !important; } }

/* --- Sidebar that fits the window --------------------------------------------
   Compact rows and folding groups (script in snippets/shell_v2.html): the menu
   never needs to scroll on a laptop screen. */
.v2-side { gap: 10px; padding: 14px 10px 10px; }
.v2-side-link { padding: 6px 10px; font-size: 13.5px; }
.v2-side-nav { gap: 0; }
.v2-side-group { margin-top: 6px; }
.v2-side-group > summary.v2-side-label {
  display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 6px 10px; border-radius: 9px;
  list-style: none; cursor: pointer; user-select: none; font-size: 12px; color: var(--v2-muted);
}
.v2-side-group > summary::-webkit-details-marker { display: none; }
.v2-side-group > summary:hover { background: var(--v2-hover); color: var(--v2-ink); }
.v2-side-group > summary .ui-icon { transition: transform 0.15s; transform: rotate(-90deg); color: var(--v2-muted); }
.v2-side-group[open] > summary .ui-icon { transform: none; }
.v2-side-group-links { display: flex; flex-direction: column; gap: 1px; padding-bottom: 2px; }
/* Search box: the shortcut sits inside the box with even space around it. */
.v2-side-search { height: 34px; padding: 0 6px 0 10px; }
.v2-side-search kbd { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; margin: 0; line-height: 1; font-size: 11.5px; border-radius: 6px; }


/* --- Dark mode ----------------------------------------------------------------
   html.v2.dark (cookie portal_mode, main/theme.py). The same layout and components;
   only the variables change. The colour bridge is not loaded in dark mode. */
html.v2.dark {
  --v2-bg: #0e0f11; --v2-surface: #17181b; --v2-surface-2: #1c1e22; --v2-surface-3: #26282d;
  --v2-line: #2a2c31; --v2-line-2: #3b3e45;
  --v2-ink: #f4f4f2; --v2-ink-2: #c9c9c4; --v2-muted: #8f8f89;
  --v2-brand: #86a8ff; --v2-brand-tint: #1a2440; --v2-panel: #000000;
  --v2-side: #131417; --v2-bar: rgba(14, 15, 17, 0.88); --v2-hover: rgba(255, 255, 255, 0.06);
  --v2-on-ink: #0b0b0b; --v2-ink-hover: #dadad5;
  color-scheme: dark;
}
html.v2.dark .v2-menu-panel { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -16px rgba(0, 0, 0, 0.7); }
html.v2.dark .v2-brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
/* Paper (documents, contracts) keeps the light palette in dark mode; see portal-ui.css. */
html.v2.dark .ui-paper, html.v2.dark .ui-sheet {
  --v2-bg: #f4f4f2; --v2-surface: #ffffff; --v2-surface-2: #f7f7f5; --v2-surface-3: #ebebe8;
  --v2-line: #e3e3de; --v2-line-2: #d2d2cc; --v2-ink: #0b0b0b; --v2-ink-2: #3d3d3a; --v2-muted: #6f6f69;
  --v2-brand: #1d54e2; --v2-brand-tint: #eef2fd; --v2-on-ink: #ffffff; --v2-ink-hover: #2b2b29; --v2-hover: rgba(11, 11, 11, 0.05);
}
