/*!
 * AVERTIVE One Theme 1.0.0
 * Shared stylesheet of Portal, Backup, Archive, Signature (and the system UI).
 * No inline styles needed (CSP compliant). Fonts locally under /static/fonts/.
 * Theme:  <html data-theme="light|dark">  (without the attribute the system setting applies)
 * Accent: <body data-app="portal|backup|archive|signature">
 */

/* ---------- Fonts ---------- */
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg:            light-dark(#f5f6f8, #0e1013);
  --surface:       light-dark(#ffffff, #16191e);
  --surface-2:     light-dark(#f0f2f5, #20242b);
  --sunken:        light-dark(#fafbfc, #121519);
  --hover:         light-dark(#f3f4f6, #20242b);
  --row-hover:     light-dark(#f8f9fb, #1a1e23);
  --seg:           light-dark(#e9ecf0, #0b0d10);
  --pill:          light-dark(#ffffff, #2a2f37);
  --neutral-tint:  light-dark(#eef0f3, #22262d);
  --avatar:        light-dark(#e8eaee, #2a2f37);
  --line-soft:     light-dark(#eceef2, #22262c);
  --line:          light-dark(#e3e6eb, #2a2f37);
  --line-strong:   light-dark(#cfd4db, #3a404a);
  --text:          light-dark(#14171c, #e8eaee);
  --text-2:        light-dark(#4d5562, #a9b0bb);
  --text-3:        light-dark(#6b7380, #8a929e);
  --text-4:        light-dark(#9aa1ad, #646c78);
  --inverse:       light-dark(#14171c, #e8eaee);
  --on-inverse:    light-dark(#ffffff, #14171c);
  --inverse-line:  light-dark(#3a3f48, #b9bfc8);
  --rail:          #101216;

  --good:      light-dark(#1b6b41, #5cc98a);
  --good-bg:   light-dark(#e7f4ec, #132a1e);
  --good-line: light-dark(#c5e3d0, #1f4a33);
  --good-ink:  light-dark(#124d2e, #a6e7c1);
  --warn:      light-dark(#8a5600, #e8b14a);
  --warn-bg:   light-dark(#fbf0d9, #2d2312);
  --warn-line: light-dark(#efd9a6, #4d3b17);
  --warn-ink:  light-dark(#5c3a00, #f3d08c);
  --warn-bar:  light-dark(#c98a12, #e8b14a);
  --bad:       light-dark(#b0302a, #f07a6e);
  --bad-bg:    light-dark(#fbe8e6, #34191a);
  --bad-line:  light-dark(#f0c4bf, #5a2a27);
  --bad-ink:   light-dark(#7a1f1a, #f7b2aa);

  --accent:       var(--inverse);
  --on-accent:    var(--on-inverse);
  --accent-tint:  var(--neutral-tint);
  --accent-hover: var(--text-2);
  --accent-soft:  light-dark(#d9dde3, #2a2f37);

  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  --r-xs: 4px; --r-sm: 6px; --r-md: 7px; --r-lg: 12px; --r-xl: 14px;
  --shadow-pop: 0 16px 40px rgba(16, 18, 22, .16);
  --shadow-panel: -12px 0 40px rgba(16, 18, 22, .18);
  --shadow-dialog: 0 24px 64px rgba(16, 18, 22, .24);
  --scrim: rgba(16, 18, 22, .36);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --rail-w: 72px; --side-w: 240px; --top-h: 56px; --page-max: 1240px;
}
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }
[data-app="backup"]   { --accent: light-dark(#2f5fd0, #7aa2ff); --on-accent: light-dark(#ffffff, #0e1013); --accent-tint: light-dark(#edf2fc, #1a2440); --accent-hover: light-dark(#1f47a6, #a5c0ff); --accent-soft: light-dark(#d6e1f8, #26365c); }
[data-app="archive"]  { --accent: light-dark(#7a4cc2, #b597ee); --on-accent: light-dark(#ffffff, #0e1013); --accent-tint: light-dark(#f3eefb, #271f3d); --accent-hover: light-dark(#5d3699, #cdb6f5); --accent-soft: light-dark(#d9ccef, #3a2d5a); }
[data-app="signature"]{ --accent: light-dark(#0d7f86, #4fc1c7); --on-accent: light-dark(#ffffff, #0e1013); --accent-tint: light-dark(#e6f3f3, #11302f); --accent-hover: light-dark(#0a6166, #86dade); --accent-soft: light-dark(#bfe0e1, #1d4a4a); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.one-mono { font-family: var(--mono); font-size: 12.5px; }
.one-num { font-variant-numeric: tabular-nums; }
.one-muted { color: var(--text-3); }
.one-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.one-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.one-app { display: flex; height: 100vh; overflow: hidden; }
.one-main { flex: 1; min-width: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.one-page { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 32px 28px 64px; display: flex; flex-direction: column; gap: 24px; }
.one-page--wide { max-width: 1320px; }

/* App rail: SaaS edition only. Default: collapsed. */
.one-rail { width: 0; opacity: 0; overflow: hidden; flex: none; height: 100vh; position: sticky; top: 0; z-index: 20; transition: width .26s var(--ease), opacity .2s ease; }
.one-rail.is-open { width: var(--rail-w); opacity: 1; }
.one-rail__inner { width: var(--rail-w); height: 100%; background: var(--rail); border-right: 1px solid #1d2026; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 16px; }
.one-rail__item { position: relative; width: 60px; padding: 8px 0 7px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #9aa1ad; font-size: 10.5px; font-weight: 500; text-decoration: none; }
.one-rail__item:hover { color: #fff; text-decoration: none; background: #1a1d23; }
.one-rail__item.is-active { background: #22262e; color: #fff; }
.one-rail__item.is-active::before { content: ""; position: absolute; left: -6px; top: 14px; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #fff; }
.one-rail__item.is-locked { opacity: .4; }
.one-rail__item--portal { margin-bottom: 10px; }
.one-rail__help { margin-top: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #2a2e36; color: #9aa1ad; display: grid; place-items: center; font-weight: 600; font-size: 13px; }

/* Product tile (monogram). The colours are brand colours, unchanged in dark mode. */
.one-tile { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff; }
.one-tile--sm { width: 20px; height: 20px; border-radius: 5px; font-size: 10px; }
.one-tile--lg { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
.one-tile--portal { background: #e8eaee; color: #101216; font-size: 12.5px; }
.one-tile--backup { background: #2f5fd0; }
.one-tile--archive { background: #7a4cc2; }
.one-tile--signature { background: #0d7f86; }
.one-tile--accent { background: var(--accent); color: var(--on-accent); }

/* Side bar */
.one-side { width: var(--side-w); flex: none; height: 100vh; position: sticky; top: 0; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; padding: 16px 12px; }
.one-side__head { display: flex; align-items: center; gap: 10px; padding: 2px 0 2px 6px; }
.one-side__name { font-weight: 600; font-size: 15px; line-height: 1.15; }
.one-side__brand { font-size: 12px; color: var(--text-3); }
.one-side__brand b { font-weight: 600; letter-spacing: .04em; }
.one-side__switch { margin-left: auto; width: 32px; height: 32px; flex: none; border-radius: var(--r-md); border: 1px solid var(--line); background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.one-side__switch:hover { border-color: var(--line-strong); }
.one-side__switch[aria-expanded="true"] { background: var(--surface-2); }
.one-tenant { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.one-tenant__label { font-size: 11.5px; color: var(--text-3); }
.one-tenant__name { font-weight: 500; font-size: 13.5px; }
.one-nav { display: flex; flex-direction: column; gap: 2px; }
.one-nav__group { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 16px 10px 6px; }
.one-nav__item { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-decoration: none; cursor: pointer; }
.one-nav__item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.one-nav__item[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.one-nav__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.one-licence { margin-top: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--sunken); display: flex; flex-direction: column; gap: 8px; }
.one-licence__row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.one-btn-portal { margin-top: 4px; height: 36px; border-radius: var(--r-md); background: var(--inverse); color: var(--on-inverse); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.one-btn-portal:hover { color: var(--on-inverse); opacity: .88; text-decoration: none; }
.one-btn-portal__mark { width: 18px; height: 18px; border-radius: 5px; background: var(--on-inverse); color: var(--inverse); display: grid; place-items: center; font-size: 8.5px; font-weight: 700; }
.one-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 45; }

/* Top bar */
.one-top { position: sticky; top: 0; z-index: 30; flex: none; height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; }
.one-top__menu { display: none; width: 38px; height: 38px; margin-left: -6px; border: 0; border-radius: 8px; background: transparent; color: var(--text); place-items: center; cursor: pointer; }
.one-top__menu:hover { background: var(--hover); }
.one-crumbs { display: flex; gap: 8px; min-width: 0; white-space: nowrap; font-size: 13.5px; color: var(--text-3); }
.one-crumbs__sep { color: var(--line-strong); }
.one-crumbs__current { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.one-top__spacer { flex: 1; }
.one-search-trigger { flex: 0 1 300px; min-width: 150px; height: 34px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); color: var(--text-3); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; font-size: 13px; cursor: pointer; }
.one-search-trigger:hover { border-color: var(--line-strong); background: var(--surface); }
.one-search-trigger__text { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.one-kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-radius: var(--r-xs); padding: 1px 5px; background: var(--surface); color: var(--text-3); white-space: nowrap; }
.one-user { position: relative; flex: none; }
.one-user__btn { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.one-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--avatar); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; }
.one-avatar--lg { width: 40px; height: 40px; font-size: 13px; }

/* User menu */
.one-menu { position: absolute; right: 0; top: 44px; width: 300px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: 31; overflow: hidden; animation: one-in .14s ease-out; }
.one-menu__head { display: flex; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line-soft); }
.one-menu__section { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.one-menu__actions { display: flex; gap: 8px; padding: 12px 16px 14px; }
.one-menu__actions > * { flex: 1; }

/* Search window (Ctrl K) */
.one-palette-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(16, 18, 22, .32); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 0; }
.one-palette { width: 640px; max-width: 100%; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: var(--r-xl); box-shadow: 0 24px 64px rgba(16, 18, 22, .28); animation: one-in .14s ease-out; }
.one-palette__input { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.one-palette__input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.one-palette__list { overflow-y: auto; padding: 6px 8px 8px; }
.one-palette__group { padding: 12px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.one-palette__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.one-palette__item[aria-selected="true"] { background: var(--accent-tint); }
.one-palette__mark { width: 30px; height: 30px; flex: none; border-radius: var(--r-md); display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--neutral-tint); color: var(--text-2); }
.one-palette__foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ---------- Typography ---------- */
.one-page-head { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; }
.one-page-head__text { flex: 1; min-width: 220px; }
.one-h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.015em; }
.one-lead { margin: 4px 0 0; color: var(--text-2); text-wrap: pretty; }
.one-section-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.one-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.one-back { align-self: flex-start; background: none; border: 0; padding: 0; font-size: 13px; color: var(--text-2); cursor: pointer; }

/* ---------- Buttons ---------- */
.one-btn { height: 36px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 400; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.one-btn:hover { border-color: var(--text-4); text-decoration: none; }
.one-btn--primary { border-color: transparent; background: var(--accent); color: var(--on-accent); font-weight: 500; }
.one-btn--primary:hover { border-color: transparent; filter: brightness(1.06); color: var(--on-accent); }
.one-btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.one-btn--ghost:hover { background: var(--hover); border-color: transparent; }
.one-btn--soft { border-color: transparent; background: var(--surface-2); font-weight: 500; }
.one-btn--danger { border-color: var(--bad); color: var(--bad); font-weight: 500; }
.one-btn--danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.one-btn--outline-accent { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.one-btn--outline-accent:hover { background: var(--accent-tint); border-color: var(--accent); }
.one-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.one-btn--lg { height: 38px; padding: 0 16px; }
.one-btn--icon { width: 32px; height: 32px; padding: 0; }
.one-btn:disabled, .one-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.one-btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Status ---------- */
.one-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 4px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--neutral-tint); color: var(--text-2); }
/* <span class="one-badge one-badge--good"><span class="one-badge__sym" data-sym="✓" aria-hidden="true"></span>Succeeded</span> */
.one-badge__sym { position: relative; width: 14px; height: 14px; flex: none; border-radius: 50%; background: currentColor; }
.one-badge__sym::after { content: attr(data-sym); position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--surface); }
.one-badge--good { background: var(--good-bg); color: var(--good); }
.one-badge--warn { background: var(--warn-bg); color: var(--warn); }
.one-badge--bad  { background: var(--bad-bg);  color: var(--bad); }
.one-badge--run  { background: var(--accent-tint); color: var(--accent); }
.one-dot { width: 16px; height: 16px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--surface); background: var(--text-3); }
.one-dot--good { background: var(--good); } .one-dot--warn { background: var(--warn); } .one-dot--bad { background: var(--bad); }

.one-banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.one-banner__icon { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--surface); }
.one-banner__title { font-weight: 600; }
.one-banner__reasons { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 4px; font-size: 13.5px; }
.one-banner__reasons a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.one-banner--good { background: var(--good-bg); border-color: var(--good-line); color: var(--good-ink); } .one-banner--good .one-banner__icon { background: var(--good); }
.one-banner--warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); } .one-banner--warn .one-banner__icon { background: var(--warn); }
.one-banner--bad  { background: var(--bad-bg);  border-color: var(--bad-line);  color: var(--bad-ink); }  .one-banner--bad .one-banner__icon  { background: var(--bad); }
.one-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; background: var(--warn-bg); color: var(--warn-ink); }

/* ---------- Cards ---------- */
.one-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.one-card--pad { padding: 18px 20px; }
.one-card__head { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.one-card__title { font-size: 15px; font-weight: 600; }
.one-card__sub { font-size: 13px; color: var(--text-2); }
.one-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.one-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.one-stat__label { font-size: 12.5px; color: var(--text-3); }
.one-stat__value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.one-stat__sub { font-size: 12.5px; color: var(--text-2); }
.one-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 13.5px; }
.one-kv__k { color: var(--text-2); white-space: nowrap; flex: none; }
.one-kv__v { font-weight: 500; text-align: right; min-width: 0; }
.one-kv__v.is-empty { color: var(--text-4); }
.one-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); overflow: hidden; }
.one-facts > * { padding: 14px 20px; border-right: 1px solid var(--line-soft); min-width: 0; }

.one-progress { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.one-progress__bar { height: 100%; border-radius: 3px; background: var(--accent); width: var(--value, 0%); transition: width .4s ease; }
.one-progress--warn .one-progress__bar { background: var(--warn-bar); }
.one-progress--bad .one-progress__bar { background: var(--bad); }
.one-progress--thin { height: 3px; }
.one-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--accent-soft); border-top-color: var(--accent); animation: one-spin .8s linear infinite; }

/* ---------- Tables ---------- */
.one-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.one-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.one-table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--text-3); padding: 12px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.one-table td { padding: 12px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.one-table tr:last-child td { border-bottom: 0; }
.one-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.one-table .is-mono { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.one-table tr.is-clickable { cursor: pointer; }
.one-table tr.is-clickable:hover td { background: var(--row-hover); }
.one-table .one-chev { color: var(--text-4); width: 16px; }
.one-cell-2 { display: flex; flex-direction: column; min-width: 0; }
.one-cell-2 > :last-child { font-size: 12.5px; color: var(--text-3); }
.one-table-foot { display: flex; justify-content: space-between; padding: 12px 20px; font-size: 13px; color: var(--text-3); }

/* ---------- Forms ---------- */
.one-field { display: flex; flex-direction: column; gap: 6px; }
.one-label { font-size: 13px; font-weight: 500; }
.one-help { font-size: 12.5px; color: var(--text-3); }
.one-input, .one-textarea, .one-select select { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 0 12px; background: var(--surface); font-size: 13.5px; }
.one-textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.one-input:focus, .one-textarea:focus, .one-select select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.one-input[aria-invalid="true"] { border: 1.5px solid var(--bad); }
.one-field .one-error { font-size: 12.5px; color: var(--bad); }
.one-select { position: relative; }
.one-select select { appearance: none; padding-right: 34px; cursor: pointer; }
.one-select::after { content: ""; position: absolute; right: 14px; top: 13px; width: 6px; height: 6px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(45deg); pointer-events: none; }
.one-setting { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px 32px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); align-items: start; }
.one-setting__title { font-weight: 500; }
.one-setting__desc { font-size: 13px; color: var(--text-2); text-wrap: pretty; }
.one-setting--inline { display: flex; align-items: center; gap: 20px; }
.one-setting--inline > :first-child { flex: 1; min-width: 0; }

/* Segments: filters and toggles, 2 to 5 options */
.one-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--seg); border-radius: 8px; padding: 3px; }
.one-seg__item { padding: 6px 12px; border: 0; border-radius: var(--r-sm); background: transparent; font-size: 13px; white-space: nowrap; cursor: pointer; }
.one-seg__item[aria-pressed="true"], .one-seg__item[aria-selected="true"] { background: var(--pill); box-shadow: 0 1px 2px rgba(16, 18, 22, .14); font-weight: 600; }
.one-seg__count { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; margin-left: 4px; }
.one-seg--full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }

/* Switch: <button role="switch" aria-checked> */
.one-toggle { position: relative; width: 40px; height: 24px; flex: none; border: 0; border-radius: 12px; background: var(--line-strong); cursor: pointer; transition: background .15s; }
.one-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.one-toggle[aria-checked="true"] { background: var(--accent); }
.one-toggle[aria-checked="true"]::after { left: 19px; }
.one-toggle--sm { width: 34px; height: 20px; } .one-toggle--sm::after { top: 2px; left: 2px; width: 16px; height: 16px; } .one-toggle--sm[aria-checked="true"]::after { left: 16px; }

/* Option list: <label class="one-option"><input type="radio" class="one-sr"> … */
.one-options { display: flex; flex-direction: column; gap: 2px; }
.one-option { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-md); cursor: pointer; font-size: 13.5px; }
.one-option::before { content: ""; width: 16px; height: 16px; margin-top: 2px; flex: none; border-radius: 50%; border: 1.5px solid var(--text-4); background: var(--surface); }
.one-option:has(input:checked) { background: var(--accent-tint); }
.one-option:has(input:checked)::before { border: 5px solid var(--accent); }
.one-option__sub { display: block; font-size: 12.5px; color: var(--text-3); }

/* Selection chip with check mark: <label class="one-chip"><input type="checkbox" class="one-sr"> … */
.one-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.one-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.one-chip::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: var(--r-xs); border: 1.5px solid var(--text-4); background: var(--surface); display: grid; place-items: center; font-size: 10px; color: var(--on-accent); }
.one-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.one-chip:has(input:checked)::before { content: "✓"; border-color: var(--accent); background: var(--accent); }

/* Tag field */
.one-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 5px 6px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.one-tag { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 9px; border-radius: 5px; background: var(--surface-2); font-size: 13px; white-space: nowrap; }
.one-tag__x { width: 18px; height: 18px; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--text-3); cursor: pointer; }
.one-tag__x:hover { background: var(--line); }
.one-tags input { flex: 1; min-width: 120px; height: 26px; border: 0; outline: 0; background: transparent; }

/* Info ⓘ: opens below the title */
.one-info-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--text-4); background: transparent; color: var(--text-2); font-size: 11px; font-weight: 600; cursor: pointer; }
.one-info { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--text-2); background: var(--bg); border-radius: 8px; padding: 10px 12px; }

/* Wizard steps */
.one-steps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.one-step { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-3); }
.one-step__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); background: var(--surface); }
.one-step.is-current { color: var(--text); font-weight: 600; }
.one-step.is-current .one-step__n, .one-step.is-done .one-step__n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.one-step + .one-step::before { content: ""; width: 40px; height: 1px; background: var(--line-strong); margin-right: 4px; }

/* ---------- Layers ---------- */
.one-drawer-scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: flex; justify-content: flex-end; }
.one-drawer { width: 520px; max-width: 100%; height: 100%; background: var(--surface); box-shadow: var(--shadow-panel); display: flex; flex-direction: column; animation: one-in .18s ease-out; }
.one-drawer__head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.one-drawer__title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.one-drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 22px; }
.one-drawer__foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.one-close { width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: var(--hover); color: var(--text-2); font-size: 16px; cursor: pointer; }
.one-dl { display: flex; flex-direction: column; }
.one-dl__title { font-size: 13px; font-weight: 600; padding: 14px 0 6px; }
.one-dl__row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.one-dl__row dt { color: var(--text-3); }
.one-dl__row dd { margin: 0; word-break: break-word; }
.one-log { background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; line-height: 1.55; }
.one-log__time { color: var(--text-3); margin-right: 10px; }
.one-log .is-warn { color: var(--warn); } .one-log .is-error { color: var(--bad); }

.one-dialog-scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.one-dialog { width: 520px; max-width: 100%; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-dialog); animation: one-in .16s ease-out; }

.one-toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; max-width: min(420px, calc(100vw - 48px)); display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--inverse); color: var(--on-inverse); font-size: 13.5px; box-shadow: 0 12px 32px rgba(16, 18, 22, .24); animation: one-in .18s ease-out; }
.one-toast__icon { width: 18px; height: 18px; flex: none; border-radius: 50%; background: #3fb37a; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.one-savebar { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 10px 10px 18px; border-radius: var(--r-lg); background: var(--inverse); color: var(--on-inverse); box-shadow: 0 12px 32px rgba(16, 18, 22, .24); animation: one-in .16s ease-out; }
.one-savebar__text { flex: 1; font-size: 13.5px; }
.one-savebar .one-btn { background: transparent; border-color: var(--inverse-line); color: var(--on-inverse); }
.one-savebar .one-btn--primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }

/* Mini bar chart */
.one-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.one-bars__bar { flex: 1; height: var(--value, 0%); border-radius: 3px 3px 0 0; background: var(--accent-soft); transform-origin: bottom; animation: one-grow .5s var(--ease); }
.one-bars__bar.is-current { background: var(--accent); }

/* Empty state / placeholder */
.one-empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 56px 24px; text-align: center; color: var(--text-3); }

/* ---------- Motion ---------- */
@keyframes one-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes one-spin { to { transform: rotate(360deg); } }
@keyframes one-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .one-side { position: fixed; left: calc(-1 * var(--side-w) - 20px); z-index: 50; transition: left .22s ease; }
  .one-side.is-open { left: 0; box-shadow: 0 0 40px rgba(16, 18, 22, .25); }
  .one-top__menu { display: grid; }
  .one-page { padding: 28px 24px 64px; }
}
@media (max-width: 639px) {
  .one-top { padding: 0 14px; gap: 8px; }
  .one-crumbs__parent, .one-crumbs__sep { display: none; }
  .one-search-trigger { flex: 0 0 36px; min-width: 36px; justify-content: center; padding: 0; }
  .one-search-trigger__text, .one-search-trigger .one-kbd { display: none; }
  .one-page { padding: 20px 16px 56px; }
  .one-toast { left: 16px; right: 16px; bottom: 16px; }
}
