/*
 * OPTIMAL HOME — shared UI foundation 1.0
 * Load styles.css, then app.css. All public classes use the oh- namespace.
 * Keep page-specific styling in separate files; change tokens here once.
 */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --oh-brand: #12696b;
  --oh-brand-hover: #0c5558;
  --oh-brand-soft: #e7f3f1;
  --oh-brand-ink: #105d60;
  --oh-accent: #ff8031;
  --oh-accent-hover: #ed6c20;
  --oh-accent-ink: #301b0e;
  --oh-accent-soft: #fff0e4;
  --oh-bg: #f4f6f5;
  --oh-surface: #ffffff;
  --oh-surface-2: #f8faf9;
  --oh-surface-3: #edf2f0;
  --oh-ink: #183236;
  --oh-muted: #5c706d;
  --oh-subtle: #62756e;
  --oh-border: #e0e8e5;
  --oh-border-strong: #bacbc5;
  --oh-success: #246b46;
  --oh-success-soft: #ebf6ee;
  --oh-warning: #8a501a;
  --oh-warning-soft: #fff3e4;
  --oh-danger: #b13542;
  --oh-danger-soft: #fff0f2;
  --oh-info: #366398;
  --oh-info-soft: #edf3fc;
  --oh-focus: #248c90;
  --oh-shadow-sm: 0 2px 4px #12342d04, 0 6px 18px #12342d04;
  --oh-shadow-md: 0 8px 32px #14362c0e, 0 2px 5px #14362c05;
  --oh-shadow-lg: 0 24px 80px #082d2e24, 0 4px 16px #082d2e10;
  --oh-radius-xs: 6px;
  --oh-radius-sm: 9px;
  --oh-radius: 14px;
  --oh-radius-lg: 20px;
  --oh-radius-xl: 26px;
  --oh-content-gap: 12px;
  --oh-content-padding: 12px;
  --oh-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --oh-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --oh-ease: cubic-bezier(.2,.75,.25,1);
  --oh-fast: 140ms var(--oh-ease);
  --oh-motion: 240ms var(--oh-ease);
  --oh-z-sticky: 5;
  --oh-z-menu: 80;
  --oh-z-overlay: 100;
  --oh-z-toast: 120;
  --oh-z-tooltip: 130;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --oh-brand: #207876;
  --oh-brand-hover: #1b6968;
  --oh-brand-soft: #163735;
  --oh-brand-ink: #8bd9ce;
  --oh-accent: #ff944f;
  --oh-accent-hover: #ffa76f;
  --oh-accent-soft: #392c23;
  --oh-bg: #111b1e;
  --oh-surface: #19262a;
  --oh-surface-2: #1d2c30;
  --oh-surface-3: #24363a;
  --oh-ink: #e6efeb;
  --oh-muted: #a8bcb6;
  --oh-subtle: #97aea7;
  --oh-border: #2b3d40;
  --oh-border-strong: #45605f;
  --oh-success: #a0d7b2;
  --oh-success-soft: #213a2b;
  --oh-warning: #f2cb99;
  --oh-warning-soft: #3c3022;
  --oh-danger: #ffadb6;
  --oh-danger-soft: #422b31;
  --oh-info: #b1d1f2;
  --oh-info-soft: #24364d;
  --oh-focus: #8bd9ce;
  --oh-shadow-sm: 0 4px 16px #00000012;
  --oh-shadow-md: 0 8px 32px #00000024;
  --oh-shadow-lg: 0 24px 80px #00000065;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--oh-bg); scroll-padding-top: 72px; }
body { margin: 0; color: var(--oh-ink); background: var(--oh-bg); font: 15px/1.6 var(--oh-font); -webkit-font-smoothing: antialiased; }
body.oh-scroll-locked { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
button:disabled { opacity: .5; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }
img { display: block; }
svg { display: block; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.3; }
h1 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.045em; font-weight: 750; }
h2 { font-size: 20px; letter-spacing: -.025em; font-weight: 750; }
h3 { font-size: 17px; letter-spacing: -.015em; font-weight: 750; }
::selection { background: #bde7de; color: #123e3e; }
:focus-visible { outline: 2px solid var(--oh-focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
:where(input, textarea, select):focus-visible { outline-offset: 1px; }
* { scrollbar-width: thin; scrollbar-color: var(--oh-border-strong) transparent; }
.oh-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.oh-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.oh-muted { color: var(--oh-muted); }
.oh-subtle { color: var(--oh-subtle); }
.oh-brand-text { color: var(--oh-brand-ink); }
.oh-danger-text { color: var(--oh-danger); }
.oh-success-text { color: var(--oh-success); }
.oh-number { font-variant-numeric: tabular-nums; }
.oh-mono { font-family: var(--oh-mono); }
.oh-nowrap { white-space: nowrap; }
.oh-truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oh-text-right { text-align: right !important; }
.oh-grow { flex: 1; min-width: 0; }
.oh-stack { display: flex; flex-direction: column; gap: var(--oh-content-gap); min-width: 0; }
.oh-stack > *, .oh-grid > * { min-width: 0; }
.oh-stack--sm { gap: 12px; }
.oh-row { display: flex; align-items: center; gap: 12px; }
.oh-row--between { justify-content: space-between; }
.oh-wrap { flex-wrap: wrap; }
.oh-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--oh-content-gap); }
.oh-grid--3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.oh-grid--4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.oh-span-all { grid-column: 1 / -1; }
.oh-divider { border: 0; border-top: 1px solid var(--oh-border); margin: 16px 0; }
.oh-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--oh-brand-ink); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.oh-link { color: var(--oh-brand-ink); font-weight: 700; text-underline-offset: 4px; }
.oh-link:hover { text-decoration: underline; }
kbd { padding: 2px 5px; border: 1px solid var(--oh-border); border-bottom-width: 2px; border-radius: 5px; color: var(--oh-muted); background: var(--oh-surface-2); font: 13px var(--oh-font); }

/* Shared buttons: teal primary, orange create actions, quiet icon actions. */
.oh-btn {
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  min-height:40px; padding:9px 15px; border:1px solid #0d6466; border-radius:10px;
  background:linear-gradient(135deg,#19797a,#126366); color:#fff; font-size:14px; font-weight:750; line-height:1.4;
  text-align:center; text-decoration:none; box-shadow:inset 0 1px #ffffff18,0 2px 4px #0c35380d;
  transition:background var(--oh-fast),border-color var(--oh-fast),box-shadow var(--oh-fast),transform var(--oh-fast),color var(--oh-fast);
}
.oh-btn:hover:not(:disabled) { background:linear-gradient(135deg,#218a88,#146e70); border-color:#258f8b; box-shadow:0 5px 14px #125b5c24; transform:translateY(-1px); }
.oh-btn:active:not(:disabled) { transform:translateY(0); box-shadow:inset 0 2px 3px #002b2c1a; }
.oh-btn .oh-icon { width:17px; height:17px; }
.oh-btn--accent,.oh-btn--create { background:linear-gradient(135deg,#ffad70,#ff8a40); border-color:#ff9953; color:#19383b; box-shadow:inset 0 1px #ffffff50,0 3px 10px #ac4f1720; }
.oh-btn--accent:hover:not(:disabled),.oh-btn--create:hover:not(:disabled) { background:linear-gradient(135deg,#ffbc88,#ff9953); border-color:#ffc49a; box-shadow:0 5px 18px #ff803133; }
.oh-btn--create { padding:7px 16px 7px 7px; gap:10px; }
.oh-btn__glyph { display:grid; place-items:center; width:27px; height:27px; flex-shrink:0; border-radius:7px; background:#174b4d; color:#fff; box-shadow:inset 0 1px #ffffff20; transition:background var(--oh-fast),transform var(--oh-fast); }
.oh-btn--create:hover .oh-btn__glyph { background:#10383a; transform:rotate(90deg); }
.oh-btn--secondary { background:var(--oh-surface); border-color:var(--oh-border-strong); color:var(--oh-brand-ink); box-shadow:0 1px 2px #0c353806; }
.oh-btn--secondary:hover:not(:disabled) { background:var(--oh-brand-soft); border-color:var(--oh-brand); color:var(--oh-brand-ink); box-shadow:0 4px 10px #125b5c10; }
.oh-btn--soft { background:var(--oh-brand-soft); border-color:transparent; color:var(--oh-brand-ink); box-shadow:none; }
.oh-btn--soft:hover:not(:disabled) { background:var(--oh-brand-soft); border-color:var(--oh-brand); color:var(--oh-brand-ink); }
.oh-btn--ghost { background:transparent; border-color:transparent; color:var(--oh-muted); box-shadow:none; }
.oh-btn--ghost:hover:not(:disabled) { background:var(--oh-surface-3); border-color:var(--oh-border); color:var(--oh-ink); box-shadow:none; }
.oh-btn--danger { background:linear-gradient(135deg,#b94453,#9e3140); color:#fff; border-color:#a63343; }
.oh-btn--danger:hover:not(:disabled) { background:linear-gradient(135deg,#c64c5c,#ad3646); border-color:#ca5b69; box-shadow:0 4px 14px #a6334326; }
.oh-btn--danger-soft { background:var(--oh-danger-soft); color:var(--oh-danger); border-color:color-mix(in srgb,var(--oh-danger) 22%,transparent); box-shadow:none; }
.oh-btn--danger-soft:hover:not(:disabled) { background:var(--oh-danger-soft); color:var(--oh-danger); border-color:var(--oh-danger); box-shadow:0 3px 10px #a6334314; }
.oh-btn--on-dark { color:#edf8f4; background:#ffffff0c; border-color:#ffffff40; box-shadow:inset 0 1px #ffffff0c; }
.oh-btn--on-dark:hover:not(:disabled) { color:#fff; background:#ffffff18; border-color:#a2c9bd; }
.oh-btn--sm { min-height:36px; padding:7px 11px; font-size:13px; border-radius:9px; }
.oh-btn--lg { min-height:46px; padding:12px 20px; font-size:15px; }
.oh-btn--block { width:100%; }
.oh-icon-btn { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:36px; height:36px; padding:0; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--oh-muted); transition:background var(--oh-fast),color var(--oh-fast),border-color var(--oh-fast); }
.oh-icon-btn:hover:not(:disabled) { color:var(--oh-brand-ink); background:var(--oh-brand-soft); }
.oh-icon-btn--border { border-color:var(--oh-border); background:var(--oh-surface); }
.oh-icon-btn--danger:hover { background:var(--oh-danger-soft); color:var(--oh-danger); }
.oh-action-btn { display:inline-grid; place-items:center; flex:0 0 auto; width:36px; height:36px; padding:0; border:1px solid var(--oh-border); border-radius:10px; color:var(--oh-brand-ink); background:var(--oh-surface-2); box-shadow:0 1px 2px #0c353805; transition:background var(--oh-fast),border-color var(--oh-fast),transform var(--oh-fast),box-shadow var(--oh-fast); }
.oh-action-btn .oh-icon { width:17px; height:17px; }
.oh-action-btn:hover:not(:disabled) { background:var(--oh-brand-soft); border-color:var(--oh-brand); box-shadow:0 4px 10px #125b5c12; transform:translateY(-1px); }
.oh-action-btn--warm { color:var(--oh-warning); background:var(--oh-warning-soft); border-color:color-mix(in srgb,var(--oh-warning) 18%,transparent); }
.oh-action-btn--warm:hover:not(:disabled) { background:var(--oh-warning-soft); border-color:var(--oh-warning); }
.oh-action-btn--danger { color:var(--oh-danger); background:var(--oh-danger-soft); border-color:color-mix(in srgb,var(--oh-danger) 18%,transparent); }
.oh-action-btn--danger:hover:not(:disabled) { background:var(--oh-danger-soft); border-color:var(--oh-danger); box-shadow:0 4px 10px #a6334314; }
.oh-btn[aria-busy="true"] { padding-left:39px; pointer-events:none; }
.oh-btn[aria-busy="true"]::before { content:""; position:absolute; left:15px; width:14px; height:14px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:oh-spin .7s linear infinite; }
.oh-btn[aria-busy="true"] > .oh-icon { display:none; }
.oh-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }

/* Panels, hero and KPIs */
.oh-card { min-width: 0; background: var(--oh-surface); border: 1px solid var(--oh-border); border-radius: var(--oh-radius); box-shadow: var(--oh-shadow-sm); }
.oh-card__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 22px; }
.oh-card__head h2, .oh-card__head h3 { margin: 0; font-size: 17px; }
.oh-card__head p { margin: 5px 0 0; color: var(--oh-muted); font-size: 14px; }
.oh-card__body { padding: 0 22px 22px; }
.oh-card__body--padded { padding-top: 22px; }
.oh-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--oh-border); color: var(--oh-muted); font-size: 14px; }
.oh-card__head--border { border-bottom: 1px solid var(--oh-border); }
.oh-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.oh-section-head h2 { margin: 4px 0 0; }
.oh-section-head p { margin: 6px 0 0; color: var(--oh-muted); font-size: 15px; }
.oh-hero {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--oh-radius-lg);
  color: #f2f8f4; background: #12393b; border: 1px solid #244f50;
  background-image: linear-gradient(90deg,#12393b 0%,#12393bed 42%,#12393b42 100%), var(--oh-hero-image, url('../images/hero-architecture.svg'));
  background-size: cover; background-position: center; box-shadow: 0 8px 26px #0c3b3610;
}
.oh-hero__body { min-height: 188px; display: flex; align-items: center; padding: 24px; }
.oh-hero__copy { max-width: 660px; }
.oh-hero .oh-eyebrow { color: #91c5b7; margin-bottom: 13px; }
.oh-hero .oh-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--oh-accent); }
.oh-hero h1 { margin: 0 0 12px; max-width: 620px; font-size: clamp(28px,3vw,40px); font-weight: 650; letter-spacing: -.045em; }
.oh-hero h1 em { font-style: normal; color: #c4e0d4; }
.oh-hero p { color: #b4d0c7; max-width: 510px; font-size: 15px; margin: 0 0 21px; }
.oh-hero__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 10px 24px; background: #08282b45; border-top: 1px solid #ffffff12; font-size: 13px; color: #b6cfc7; }
.oh-hero__foot > span { display: inline-flex; align-items: center; gap: 8px; }
.oh-hero__foot strong { color: #f1f7f3; font-weight: 700; }
.oh-hero__foot .oh-icon { width: 14px; height: 14px; }
.oh-hero__meta { margin-left: auto; }
.oh-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--oh-content-gap); }
.oh-kpi { position: relative; padding: 21px 22px 18px; overflow: hidden; }
.oh-kpi__label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--oh-muted); font-size: 14px; font-weight: 650; }
.oh-kpi__label .oh-icon { width: 18px; height: 18px; color: var(--oh-subtle); }
.oh-kpi__value { display: block; margin: 11px 0 9px; font-size: clamp(25px,2.35vw,32px); letter-spacing: -.05em; line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; }
.oh-kpi__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; color: var(--oh-muted); }
.oh-trend { display: inline-flex; align-items: center; gap: 3px; color: var(--oh-success); font-weight: 750; }
.oh-trend--down { color: var(--oh-danger); }
.oh-trend .oh-icon { width: 13px; height: 13px; }
.oh-sparkline { width: 83px; height: 28px; margin-left: auto; color: var(--oh-brand); }
.oh-icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--oh-border); border-radius: 11px; background: var(--oh-surface-2); color: var(--oh-brand-ink); }
.oh-icon-tile--accent { background: var(--oh-accent-soft); color: var(--oh-warning); border-color: transparent; }
.oh-icon-tile--danger { background: var(--oh-danger-soft); color: var(--oh-danger); border-color: transparent; }
.oh-avatar { display: inline-grid; place-items: center; position: relative; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--oh-brand-soft); color: var(--oh-brand-ink); font-size: 13px; font-weight: 800; }
.oh-avatar--square { border-radius: 9px; }
.oh-avatar--lg { width: 46px; height: 46px; font-size: 16px; }
.oh-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.oh-avatar-group { display: inline-flex; padding-left: 6px; }
.oh-avatar-group .oh-avatar { margin-left: -6px; border: 2px solid var(--oh-surface); width: 30px; height: 30px; font-size: 11px; }
.oh-online { position: absolute; bottom: 0; right: 0; width: 9px; height: 9px; border: 2px solid var(--oh-surface); border-radius: 50%; background: #54b785; }
.oh-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 4px 8px; background: var(--oh-surface-3); border: 1px solid transparent; border-radius: 6px; color: var(--oh-muted); font-size: 12px; font-weight: 750; line-height: 1.6; white-space: nowrap; }
.oh-badge--success { background: var(--oh-success-soft); color: var(--oh-success); }
.oh-badge--warning { background: var(--oh-warning-soft); color: var(--oh-warning); }
.oh-badge--danger { background: var(--oh-danger-soft); color: var(--oh-danger); }
.oh-badge--info { background: var(--oh-info-soft); color: var(--oh-info); }
.oh-badge--brand { background: var(--oh-brand-soft); color: var(--oh-brand-ink); }
.oh-badge--outline { border-color: var(--oh-border); background: transparent; }
.oh-dot { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.oh-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 5px; color: var(--oh-muted); background: var(--oh-surface-3); font-size: 12px; font-weight: 750; }

/* Form vocabulary. The accessible native checkbox is rendered as a switch. */
.oh-form { display: grid; gap: 19px; }
.oh-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.oh-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.oh-label, .oh-field > label { color: var(--oh-ink); font-size: 14px; font-weight: 750; }
.oh-required { color: var(--oh-danger); margin-left: 3px; }
.oh-input, .oh-select, .oh-textarea { display: block; width: 100%; min-height: 43px; padding: 11px 13px; border: 1px solid var(--oh-border-strong); border-radius: 8px; color: var(--oh-ink); background: var(--oh-surface); font-size: 15px; line-height: 1.5; transition: border-color var(--oh-fast), box-shadow var(--oh-fast); }
.oh-input::placeholder, .oh-textarea::placeholder { color: var(--oh-subtle); opacity: 1; }
.oh-input:hover, .oh-select:hover, .oh-textarea:hover { border-color: var(--oh-muted); }
.oh-input:focus, .oh-select:focus, .oh-textarea:focus { border-color: var(--oh-focus); box-shadow: 0 0 0 3px #248c9015; outline: none; }
.oh-textarea { min-height: 105px; resize: vertical; }
.oh-select { appearance: none; padding-right: 35px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23738480' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 12px center; background-size: 14px; background-repeat: no-repeat; }
.oh-input:disabled, .oh-select:disabled, .oh-textarea:disabled { color: var(--oh-muted); background-color: var(--oh-surface-3); cursor: not-allowed; opacity: .75; }
.oh-input[readonly] { background-color: var(--oh-surface-2); }
.oh-input-wrap { position: relative; display: flex; align-items: center; }
.oh-input-wrap > .oh-icon { position: absolute; left: 13px; color: var(--oh-subtle); width: 17px; height: 17px; pointer-events: none; }
.oh-input-wrap > .oh-input { padding-left: 13px; }
.oh-input-wrap:has(> .oh-icon:not([hidden])) > .oh-input { padding-left: 39px; }
.oh-input-wrap > .oh-icon-btn { position: absolute; right: 4px; }
.oh-input-wrap:has(> .oh-icon-btn) > .oh-input { padding-right: 45px; }
.oh-input-addon { position: absolute; right: 13px; color: var(--oh-muted); font-size: 14px; pointer-events: none; }
.oh-input-wrap:has(.oh-input-addon) > .oh-input { padding-right: 48px; }
.oh-help { margin: 0; font-size: 13px; color: var(--oh-muted); line-height: 1.6; }
.oh-field-error { margin: 0; color: var(--oh-danger); font-size: 13px; font-weight: 600; }
[aria-invalid="true"] { border-color: var(--oh-danger) !important; }
.oh-form-summary { padding: 12px 15px; color: var(--oh-danger); background: var(--oh-danger-soft); border-radius: 8px; font-size: 14px; }
.oh-fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--oh-border); border-radius: 10px; }
.oh-fieldset legend { padding: 0 6px; font-size: 14px; font-weight: 750; }
.oh-switch { display: inline-flex; align-items: center; gap: 10px; position: relative; cursor: pointer; font-size: 14px; color: var(--oh-ink); }
.oh-switch input { position: absolute; width: 36px; height: 20px; left: 0; top: 50%; margin: 0; transform: translateY(-50%); opacity: 0; cursor: inherit; z-index: 1; }
.oh-switch__track { position: relative; display: inline-block; width: 36px; height: 20px; flex: 0 0 auto; border-radius: 20px; background: var(--oh-border-strong); border: 1px solid transparent; transition: background var(--oh-fast); }
.oh-switch__track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #001c2620; transition: transform var(--oh-fast); }
.oh-switch input:checked + .oh-switch__track { background: var(--oh-brand); }
.oh-switch input:checked + .oh-switch__track::after { transform: translateX(16px); }
.oh-switch input:focus-visible + .oh-switch__track { outline: 2px solid var(--oh-focus); outline-offset: 3px; }
.oh-switch input:disabled ~ * { opacity: .5; cursor: not-allowed; }
.oh-switch__copy { display: grid; gap: 2px; }
.oh-switch__copy small { color: var(--oh-muted); font-size: 13px; }
.oh-switch--card { display: flex; padding: 14px 16px; border: 1px solid var(--oh-border); border-radius: 10px; background: var(--oh-surface); }
.oh-switch--card input { left: 16px; }
.oh-switch--card:has(input:checked) { border-color: var(--oh-brand); background: var(--oh-brand-soft); }
.oh-switch--sm .oh-switch__track, .oh-switch--sm input { width: 29px; height: 17px; }
.oh-switch--sm .oh-switch__track::after { width: 11px; height: 11px; }
.oh-switch--sm input:checked + .oh-switch__track::after { transform: translateX(12px); }
.oh-toggle-all { display: block; padding: 0; width: 29px; height: 17px; border-radius: 20px; border: 0; background: var(--oh-border-strong); position: relative; }
.oh-toggle-all::after { content: ""; position: absolute; left: 3px; top: 3px; width: 11px; height: 11px; background: white; border-radius: 50%; transition: transform var(--oh-fast); }
.oh-toggle-all[aria-pressed="true"], .oh-toggle-all[aria-pressed="mixed"] { background: var(--oh-brand); }
.oh-toggle-all[aria-pressed="true"]::after { transform: translateX(12px); }
.oh-toggle-all[aria-pressed="mixed"]::after { transform: translateX(6px); }
.oh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--oh-border); border-radius: 7px; background: var(--oh-surface); color: var(--oh-muted); font-size: 13px; }
.oh-chip[aria-pressed="true"] { border-color: var(--oh-brand); color: var(--oh-brand-ink); background: var(--oh-brand-soft); }
.oh-chip .oh-icon { width: 13px; height: 13px; }
.oh-otp { display: flex; gap: 9px; }
.oh-otp input { width: 48px; height: 56px; padding: 0; text-align: center; font-size: 24px; font-weight: 750; }

/* Collapsible filters, tabs, segments */
.oh-filters { border: 1px solid var(--oh-border); border-radius: 10px; background: var(--oh-surface-2); }
.oh-filters > summary { display: flex; align-items: center; gap: 9px; padding: 12px 15px; list-style: none; cursor: pointer; color: var(--oh-muted); font-size: 14px; font-weight: 700; }
.oh-filters > summary::-webkit-details-marker { display: none; }
.oh-filters > summary .oh-icon { width: 16px; height: 16px; }
.oh-filters > summary .oh-chevron { margin-left: auto; transition: transform var(--oh-motion); }
.oh-filters[open] > summary .oh-chevron { transform: rotate(180deg); }
.oh-filters__body { border-top: 1px solid var(--oh-border); padding: 18px; display: grid; gap: 18px; }
.oh-filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: 13px 22px; }
.oh-filters__label { font-size: 13px; font-weight: 750; min-width: 90px; }
.oh-tabs { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--oh-border); }
.oh-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 10px 2px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--oh-muted); background: transparent; font-size: 14px; font-weight: 700; }
.oh-tab[aria-selected="true"] { border-color: var(--oh-brand); color: var(--oh-brand-ink); }
.oh-tab:hover { color: var(--oh-ink); }
.oh-tabpanel { padding-top: 20px; }
.oh-segment { display: inline-flex; align-items: center; padding: 3px; gap: 3px; border: 1px solid var(--oh-border); border-radius: 8px; background: var(--oh-surface-2); }
.oh-segment button { padding: 6px 11px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--oh-muted); font-size: 13px; font-weight: 750; }
.oh-segment button[aria-pressed="true"] { color: var(--oh-ink); background: var(--oh-surface); border-color: var(--oh-border); box-shadow: 0 1px 3px #082d2e08; }

/* Tables: no viewport overflow; first two columns can be sticky independently. */
.oh-table-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 22px 18px; }
.oh-table-toolbar .oh-search { width: min(100%,280px); margin-right: auto; }
.oh-search .oh-input { min-height: 38px; font-size: 14px; }
.oh-table-region { position: relative; overflow: auto; max-height: 64vh; border-block: 1px solid var(--oh-border); border-radius: 0; }
.oh-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.oh-table th { position: sticky; top: 0; z-index: 3; padding: 13px 16px; text-align: left; background: var(--oh-surface-2); color: var(--oh-muted); font-size: 12px; font-weight: 750; letter-spacing: .025em; border-bottom: 1px solid var(--oh-border); white-space: nowrap; }
.oh-table th button[data-sort] { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; }
.oh-sort-glyph { opacity: .55; }
.oh-sort-glyph .oh-icon { width: 12px; height: 12px; }
.oh-table th[aria-sort="ascending"], .oh-table th[aria-sort="descending"] { color: var(--oh-brand-ink); }
.oh-table th[aria-sort="ascending"] .oh-sort-glyph, .oh-table th[aria-sort="descending"] .oh-sort-glyph { opacity: 1; }
.oh-table th[aria-sort="descending"] .oh-sort-glyph { transform: rotate(180deg); }
.oh-table td { padding: 16px; border-bottom: 1px solid var(--oh-border); background: var(--oh-surface); vertical-align: middle; line-height: 1.5; }
.oh-table tbody tr:last-child td { border-bottom: 0; }
.oh-table tbody tr:hover td { background: var(--oh-surface-2); }
.oh-table tbody tr.is-selected td { background: var(--oh-brand-soft); }
.oh-table strong { font-weight: 750; }
.oh-table .oh-cell-sub { display: block; margin-top: 4px; color: var(--oh-muted); font-size: 12px; }
.oh-table .oh-select-cell { width: 52px; min-width: 52px; padding-left: 20px; padding-right: 3px; }
.oh-table .oh-sticky-1 { position: sticky; left: 0; z-index: 2; }
.oh-table .oh-sticky-2 { position: sticky; left: var(--oh-first-col-width,52px); z-index: 2; }
.oh-table th.oh-sticky-1, .oh-table th.oh-sticky-2 { z-index: 4; }
.oh-table .oh-sticky-edge { box-shadow: 5px 0 8px -8px #093e3b88; }
.oh-table--compact td { padding-top: 10px; padding-bottom: 10px; }
.oh-table--wide { min-width: 940px; }
.oh-table .oh-amount { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.oh-table__empty td { padding: 48px 20px; text-align: center; color: var(--oh-muted); }
.oh-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; color: var(--oh-muted); font-size: 13px; }
.oh-pagination nav { display: flex; align-items: center; gap: 5px; }
.oh-page { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--oh-muted); background: transparent; font-size: 13px; }
.oh-page[aria-current="page"] { border-color: var(--oh-border); color: var(--oh-brand-ink); background: var(--oh-brand-soft); font-weight: 800; }
.oh-page:hover { background: var(--oh-surface-3); }
.oh-page .oh-icon { width: 14px; height: 14px; }
.oh-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 22px; background: var(--oh-brand-soft); color: var(--oh-brand-ink); border-top: 1px solid var(--oh-border); font-size: 14px; }
.oh-bulk > strong { margin-right: auto; }

/* Native dialogs provide focus containment and an inert background. */
.oh-modal { width: min(600px,calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--oh-border); border-radius: 18px; background: var(--oh-surface); color: var(--oh-ink); overflow: visible; box-shadow: var(--oh-shadow-lg); }
.oh-modal[open] { animation: oh-appear 160ms ease-out; }
.oh-modal::backdrop { background: #071e26a8; backdrop-filter: blur(5px); }
.oh-modal__layout { display: flex; flex-direction: column; max-height: calc(100dvh - 50px); overflow: hidden; border-radius: inherit; }
.oh-modal__head { display: flex; align-items: flex-start; gap: 12px; flex: 0 0 auto; padding: 23px 26px 20px; border-bottom: 1px solid var(--oh-border); }
.oh-modal__head h2 { font-size: 19px; margin: 0; }
.oh-modal__head p { color: var(--oh-muted); margin: 5px 0 0; font-size: 14px; }
.oh-modal__head > .oh-icon-btn { margin: -6px -8px 0 auto; }
.oh-modal__body { padding: 24px 26px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.oh-modal__foot { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 9px; padding: 17px 26px; border-top: 1px solid var(--oh-border); background: var(--oh-surface-2); flex: 0 0 auto; }
.oh-modal__foot .oh-help { margin-right: auto; }
/* Dark modal chrome is shared by editors, password dialogs and confirmations. */
.oh-modal__head,.oh-modal__foot {
  --oh-surface:#224649; --oh-surface-2:#294e51; --oh-surface-3:#31595b;
  --oh-ink:#f1f7f4; --oh-muted:#bbd1ca; --oh-border:#39595c; --oh-border-strong:#5a7978;
  --oh-brand-soft:#2a5653; --oh-brand-ink:#d6f3e9; --oh-danger-soft:#50333a; --oh-danger:#ffc0c8;
  color:var(--oh-ink); background:linear-gradient(115deg,#123538,#1a4245); border-color:#33585b;
}
.oh-modal__head { position:relative; align-items:center; padding:21px 24px; }
.oh-modal__head::before { content:""; position:absolute; inset:0 auto auto 0; width:76px; height:3px; background:var(--oh-accent); }
.oh-modal__head h2 { color:var(--oh-ink); font-size:19px; }
.oh-modal__head .oh-eyebrow { color:#a8d2c5; font-size:10px; margin-bottom:5px; letter-spacing:.13em; }
.oh-modal__head p { overflow-wrap:anywhere; }
.oh-modal__head > div { min-width:0; }
.oh-modal__head > .oh-icon-btn { margin:0 -5px 0 auto; }
.oh-modal__emblem { display:grid; place-items:center; flex:0 0 auto; width:42px; height:42px; border:1px solid #ffffff25; border-radius:12px; background:#ffffff0a; color:#c3e7da; }
.oh-modal__emblem .oh-icon { width:22px; height:22px; }
.oh-modal__foot { padding:14px 24px; }
.oh-modal__foot .oh-btn--secondary { background:#ffffff08; }
.oh-modal__foot .oh-btn--secondary:hover { background:#ffffff14; }
.oh-modal__foot .oh-help { color:#bbd1ca; }
.oh-modal__body > .oh-callout { align-items:flex-start; }
@media(max-width:480px) { .oh-modal__head { padding:18px; gap:10px; } .oh-modal__foot { padding:13px 18px; } .oh-modal__emblem { width:36px; height:36px; } .oh-action-btn { width:40px; height:40px; } }

.oh-modal--sm { width: min(440px,calc(100% - 32px)); }
.oh-modal--lg { width: min(900px,calc(100% - 40px)); }
.oh-modal--xl { width: min(1200px,calc(100% - 40px)); }
.oh-modal--drawer { width: min(470px,100%); height: 100dvh; max-height: none; margin: 0 0 0 auto; border-radius: 18px 0 0 18px; }
.oh-modal--drawer .oh-modal__layout { height: 100%; max-height: none; }
.oh-modal--drawer .oh-modal__body { flex: 1; }
.oh-confirm-visual { margin-bottom: 17px; width: 48px; height: 48px; border-radius: 14px; }
.oh-confirm-copy { margin: 0; color: var(--oh-muted); font-size: 15px; white-space: pre-line; }
.oh-confirm-detail { margin-top: 14px; padding: 12px; background: var(--oh-surface-2); border-radius: 8px; font-size: 14px; }

/* Toasts are reparented into the active modal so they remain above its backdrop. */
.oh-toasts { position:fixed; right:max(20px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); z-index:var(--oh-z-toast); display:flex; flex-direction:column; align-items:stretch; gap:12px; width:min(416px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:6px; margin:-6px; overflow:auto; scrollbar-width:none; pointer-events:none; }
.oh-toast { --toast-tone:var(--oh-brand-ink); --toast-soft:var(--oh-brand-soft); position:relative; display:grid; grid-template-columns:42px minmax(0,1fr) 28px; align-items:start; gap:13px; flex:0 0 auto; padding:18px 15px 22px 18px; color:var(--oh-ink); background:linear-gradient(110deg,color-mix(in srgb,var(--toast-soft) 55%,var(--oh-surface)),var(--oh-surface) 60%); border:1px solid color-mix(in srgb,var(--toast-tone) 22%,var(--oh-border)); border-radius:16px; box-shadow:0 12px 30px #092c301c,0 2px 6px #092c300a,inset 0 1px 0 #ffffff66; overflow:hidden; pointer-events:auto; isolation:isolate; animation:oh-toast-in 320ms cubic-bezier(.16,1,.3,1); }
.oh-toast::before { content:""; position:absolute; left:0; top:18px; bottom:18px; width:3px; border-radius:0 4px 4px 0; background:var(--toast-tone); }
.oh-toast--success { --toast-tone:var(--oh-brand-ink); --toast-soft:var(--oh-brand-soft); }
.oh-toast--warning { --toast-tone:var(--oh-warning); --toast-soft:var(--oh-warning-soft); }
.oh-toast--error { --toast-tone:var(--oh-danger); --toast-soft:var(--oh-danger-soft); }
.oh-toast--info { --toast-tone:var(--oh-info); --toast-soft:var(--oh-info-soft); }
.oh-toast__icon { display:grid; place-items:center; width:42px; height:42px; color:var(--toast-tone); background:var(--toast-soft); border:1px solid color-mix(in srgb,var(--toast-tone) 16%,transparent); border-radius:13px; box-shadow:inset 0 1px 0 #ffffff70; }
.oh-toast__icon .oh-icon { width:22px; height:22px; stroke-width:1.8; }
.oh-toast__copy { min-width:0; padding-top:1px; }
.oh-toast__title { display:block; color:var(--oh-ink); font-size:14px; font-weight:800; letter-spacing:-.015em; line-height:1.4; margin:0 0 5px; overflow-wrap:anywhere; }
.oh-toast__message { margin:0; color:var(--oh-muted); font-size:13px; line-height:1.6; white-space:pre-line; overflow-wrap:anywhere; max-height:35dvh; overflow:auto; overscroll-behavior:contain; }
.oh-toast .oh-toast__close { width:28px; height:28px; min-width:28px; min-height:28px; padding:6px; margin:-4px -3px 0 0; color:var(--oh-muted); border:1px solid transparent; border-radius:8px; background:transparent; }
.oh-toast .oh-toast__close:hover { color:var(--oh-ink); border-color:var(--oh-border); background:var(--oh-surface); }
.oh-toast .oh-toast__close .oh-icon { width:14px; height:14px; }
.oh-toast__track { position:absolute; left:73px; right:18px; bottom:10px; height:3px; background:color-mix(in srgb,var(--toast-tone) 10%,transparent); border-radius:6px; overflow:hidden; }
.oh-toast__progress { display:block; width:100%; height:100%; background:var(--toast-tone); opacity:.55; border-radius:inherit; transform-origin:left; }
.oh-toast.is-paused .oh-toast__progress { opacity:.85; }
.oh-toast__action { display:inline-flex; align-items:center; gap:7px; margin-top:10px; padding:5px 9px; border:1px solid color-mix(in srgb,var(--toast-tone) 22%,transparent); border-radius:7px; background:var(--oh-surface); color:var(--toast-tone); font-size:12px; font-weight:750; }
.oh-toast__action:hover { background:var(--toast-soft); border-color:var(--toast-tone); }
.oh-toast__action .oh-icon { width:14px; height:14px; }
.oh-toast.is-leaving { pointer-events:none; animation:oh-toast-out 180ms ease-in forwards; }
[data-theme="dark"] .oh-toast { box-shadow:0 12px 32px #00000040,inset 0 1px 0 #ffffff09; }
[data-theme="dark"] .oh-toast__icon { box-shadow:inset 0 1px 0 #ffffff0a; }
.oh-loading { position: fixed; inset: 0; z-index: var(--oh-z-overlay); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #112b2c4a; backdrop-filter: blur(4px); cursor: progress; }
.oh-loading__card { display: flex; flex-direction: column; align-items: center; gap: 17px; min-width: 230px; padding: 29px 36px; background: var(--oh-surface); border: 1px solid var(--oh-border); border-radius: 20px; box-shadow: var(--oh-shadow-lg); }
.oh-loading__text { font-size: 14px; font-weight: 700; color: var(--oh-ink); margin: 0; }
.oh-spinner { position: relative; width: 44px; height: 44px; border: 2px solid var(--oh-brand-soft); border-top-color: var(--oh-brand); border-right-color: var(--oh-brand); border-radius: 50%; animation: oh-spin .9s linear infinite; }
.oh-spinner::before { content: ""; position: absolute; inset: 7px; border: 2px solid transparent; border-bottom-color: var(--oh-accent); border-left-color: var(--oh-accent); border-radius: 50%; animation: oh-spin 1.4s linear infinite reverse; }
.oh-spinner--sm { width: 20px; height: 20px; }
.oh-spinner--sm::before { display: none; }
.oh-loading--local { position: absolute; border-radius: inherit; background: #f4f8f6b3; backdrop-filter: blur(2px); z-index: 9; }
.oh-loading--local .oh-loading__card { min-width: 0; padding: 18px; border: 0; box-shadow: none; background: transparent; }
.oh-busy-host { position: relative; }
[data-theme="dark"] .oh-loading--local { background: #14292db3; }
.oh-skeleton { position: relative; overflow: hidden; background: var(--oh-surface-3); border-radius: 6px; min-height: 14px; }
.oh-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,transparent,#ffffff35,transparent); transform: translateX(-100%); animation: oh-shimmer 1.7s infinite; }
.oh-progress { width: 100%; height: 5px; overflow: hidden; border-radius: 10px; background: var(--oh-surface-3); }
.oh-progress__fill { display: block; height: 100%; width: var(--oh-progress,0%); max-width: 100%; border-radius: inherit; background: var(--oh-brand); transition: width var(--oh-motion); }

/* Floating menus and keyboard / pointer tooltips */
.oh-menu { position: fixed; z-index: var(--oh-z-menu); min-width: 190px; padding: 6px; border: 1px solid var(--oh-border); border-radius: 11px; background: var(--oh-surface); box-shadow: var(--oh-shadow-lg); }
.oh-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: 6px; color: var(--oh-ink); background: transparent; font-size: 14px; text-align: left; }
.oh-menu__item:hover, .oh-menu__item:focus { background: var(--oh-surface-3); outline-offset: -2px; }
.oh-menu__item .oh-icon { width: 16px; height: 16px; color: var(--oh-muted); }
.oh-menu__item--danger, .oh-menu__item--danger .oh-icon { color: var(--oh-danger); }
.oh-menu__divider { margin: 5px 3px; border-top: 1px solid var(--oh-border); }
.oh-tooltip { position: fixed; z-index: var(--oh-z-tooltip); max-width: min(280px,calc(100vw - 24px)); padding: 8px 11px; background: #173a3d; color: #f3faf5; border: 1px solid #36575a; border-radius: 7px; box-shadow: 0 5px 20px #082d2e23; pointer-events: none; font-size: 13px; line-height: 1.5; }
.oh-tooltip--chart { padding: 13px 15px; min-width: 180px; border-radius: 10px; }
.oh-tooltip__title { display: block; color: #a7c5bd; font-size: 12px; margin-bottom: 7px; }
.oh-tooltip__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; }
.oh-tooltip__row + .oh-tooltip__row { margin-top: 5px; }
.oh-tooltip__row strong { font-variant-numeric: tabular-nums; font-size: 15px; }

/* File inputs & gallery. HEIC originals are uploaded; preview is a server concern. */
.oh-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 145px; padding: 25px; border: 1px dashed var(--oh-border-strong); border-radius: 12px; background: var(--oh-surface-2); text-align: center; transition: border-color var(--oh-fast), background var(--oh-fast); }
.oh-dropzone.is-dragging { border-color: var(--oh-brand); background: var(--oh-brand-soft); }
.oh-dropzone > .oh-icon { color: var(--oh-brand-ink); width: 27px; height: 27px; margin-bottom: 3px; }
.oh-dropzone p { margin: 0; font-size: 14px; color: var(--oh-muted); }
.oh-dropzone label { cursor: pointer; color: var(--oh-brand-ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.oh-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.oh-dropzone:focus-within { outline: 2px solid var(--oh-focus); outline-offset: 3px; }
.oh-file-list { display: grid; gap: 8px; margin-top: 12px; }
.oh-file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--oh-border); border-radius: 9px; background: var(--oh-surface); }
.oh-file-item__thumb { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 7px; background: var(--oh-surface-3); color: var(--oh-brand-ink); overflow: hidden; }
.oh-file-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.oh-file-item strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oh-file-item small { display: block; font-size: 12px; color: var(--oh-muted); margin-top: 2px; }
.oh-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(175px,1fr)); gap: 15px; }
.oh-file-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--oh-border); border-radius: 12px; background: var(--oh-surface); transition: border-color var(--oh-fast), box-shadow var(--oh-fast); }
.oh-file-card:hover { border-color: var(--oh-brand); box-shadow: var(--oh-shadow-md); }
.oh-file-card__preview { display: grid; grid-template-rows: minmax(0,1fr); place-items: center; position: relative; height: 132px; overflow: hidden; background: var(--oh-surface-2); color: var(--oh-brand-ink); }
.oh-file-card__preview > img { width: 100%; height: 100%; min-height: 0; min-width: 0; object-fit: cover; }
.oh-file-card__preview > .oh-icon { width: 38px; height: 38px; stroke-width: 1.2; }
.oh-file-card__preview .oh-badge { position: absolute; right: 9px; bottom: 9px; background: var(--oh-surface); }
.oh-file-card__body { padding: 12px 14px; }
.oh-file-card strong { display: block; font-size: 14px; margin-bottom: 3px; }
.oh-file-card small { color: var(--oh-muted); font-size: 12px; }
.oh-gallery { width: min(1360px,calc(100% - 48px)); height: min(900px,calc(100dvh - 48px)); background: var(--oh-surface); }
.oh-gallery .oh-modal__layout { height: 100%; max-height: 100%; }
.oh-gallery__head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--oh-border); }
.oh-gallery__head h2 { margin: 0; font-size: 15px; }
.oh-gallery__head small { font-size: 12px; color: var(--oh-muted); }
.oh-gallery__tools { display: flex; gap: 5px; align-items: center; margin-left: auto; }
.oh-gallery__stage { position: relative; flex: 1; min-height: 0; display: flex; overflow: auto; align-items: center; justify-content: center; background: var(--oh-surface-3); }
.oh-gallery__stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.oh-gallery__stage.is-zoomed { align-items: flex-start; justify-content: flex-start; }
.oh-gallery__stage.is-zoomed img { max-width: none; max-height: none; flex-shrink: 0; }
.oh-gallery__stage iframe { width: 100%; height: 100%; border: 0; background: white; }
.oh-gallery__stage video { width: 100%; height: 100%; max-height: 100%; background: #0a1719; }
.oh-gallery__fallback { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px; text-align: center; font-size: 15px; }
.oh-gallery__foot { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--oh-border); background: var(--oh-surface); }
.oh-gallery__thumbs { display: flex; gap: 7px; overflow: auto; flex: 1; }
.oh-gallery__thumb { width: 42px; height: 36px; display: grid; place-items: center; padding: 0; flex: 0 0 auto; border: 2px solid transparent; border-radius: 6px; overflow: hidden; color: var(--oh-muted); background: var(--oh-surface-3); }
.oh-gallery__thumb[aria-current="true"] { border-color: var(--oh-brand); }
.oh-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.oh-gallery__count { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--oh-muted); white-space: nowrap; }

/* Charts, activity, timeline, empty states, callouts */
.oh-chart { position: relative; min-width: 0; }
.oh-chart svg { width: 100%; height: auto; overflow: visible; }
.oh-chart__grid { stroke: var(--oh-border); stroke-dasharray: 3 5; }
.oh-chart__axis { fill: var(--oh-muted); font: 13px var(--oh-font); }
.oh-chart__point { cursor: pointer; outline: none; }
.oh-chart__point:hover, .oh-chart__point:focus-visible { stroke: var(--oh-accent); stroke-width: 3px; }
.oh-chart__legend { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.oh-chart__legend button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 3px 0; background: transparent; color: var(--oh-muted); font-size: 13px; }
.oh-chart__legend button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.oh-chart__swatch { width: 7px; height: 7px; border-radius: 50%; background: var(--oh-series-color,var(--oh-brand)); }
.oh-chart__table { font-size: 12px; color: var(--oh-muted); margin-top: 12px; }
.oh-chart__table summary { cursor: pointer; padding: 4px 0; }
.oh-chart__table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.oh-chart__table td, .oh-chart__table th { padding: 5px 9px; border-bottom: 1px solid var(--oh-border); text-align: right; }
.oh-chart__table th:first-child, .oh-chart__table td:first-child { text-align: left; }
.oh-donut { width: 142px; height: 142px; position: relative; border-radius: 50%; background: conic-gradient(var(--oh-brand) 0 70%,var(--oh-accent) 70% 90%,var(--oh-surface-3) 90%); }
.oh-donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--oh-surface); }
.oh-donut__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.oh-donut__label strong { font-size: 26px; letter-spacing: -.04em; }
.oh-donut__label small { color: var(--oh-muted); font-size: 12px; }
.oh-timeline { list-style: none; padding: 0; margin: 0; }
.oh-timeline li { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--oh-border); }
.oh-timeline li:first-child { padding-top: 0; }
.oh-timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.oh-timeline__time { min-width: 40px; padding-top: 2px; font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.oh-timeline__mark { width: 3px; border-radius: 4px; flex-shrink: 0; background: var(--oh-brand); }
.oh-timeline__mark--accent { background: var(--oh-accent); }
.oh-timeline strong { display: block; margin-bottom: 4px; font-size: 14px; }
.oh-timeline p { margin: 0; color: var(--oh-muted); font-size: 12px; }
.oh-timeline .oh-avatar-group { margin-top: 9px; }
.oh-timeline .oh-badge { align-self: flex-start; }
.oh-activity { list-style: none; padding: 0; margin: 0; }
.oh-activity li { position: relative; display: flex; gap: 13px; padding-bottom: 23px; }
.oh-activity li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 1px; background: var(--oh-border); }
.oh-activity strong { font-size: 14px; }
.oh-activity p { margin: 3px 0 5px; font-size: 14px; color: var(--oh-muted); }
.oh-activity time { font-size: 12px; color: var(--oh-subtle); }
.oh-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.oh-empty .oh-icon-tile { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 4px; }
.oh-empty h3 { margin: 0; font-size: 16px; }
.oh-empty p { max-width: 380px; margin: 0; color: var(--oh-muted); font-size: 14px; line-height: 1.8; }
.oh-callout { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border: 1px solid var(--oh-border); border-radius: 10px; background: var(--oh-brand-soft); color: var(--oh-brand-ink); font-size: 14px; }
.oh-callout .oh-icon { width: 18px; height: 18px; }
.oh-callout p { margin: 3px 0 0; line-height: 1.7; }
.oh-callout--warning { background: var(--oh-warning-soft); color: var(--oh-warning); }
.oh-callout--danger { background: var(--oh-danger-soft); color: var(--oh-danger); }
.oh-accordion { border-bottom: 1px solid var(--oh-border); }
.oh-accordion > summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; }
.oh-accordion > summary::-webkit-details-marker { display: none; }
.oh-accordion > summary .oh-icon { width: 15px; height: 15px; transition: transform var(--oh-motion); }
.oh-accordion[open] > summary .oh-icon { transform: rotate(180deg); }
.oh-accordion > div { padding-bottom: 18px; color: var(--oh-muted); font-size: 14px; }
.oh-command__search { display: flex; align-items: center; gap: 13px; padding: 18px 22px; border-bottom: 1px solid var(--oh-border); }
.oh-command__search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--oh-ink); outline: none; font-size: 16px; }
.oh-command__results { padding: 8px; max-height: 360px; overflow-y: auto; }
.oh-command__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--oh-ink); font-size: 14px; }
.oh-command__item:hover, .oh-command__item.is-active { background: var(--oh-brand-soft); color: var(--oh-brand-ink); }
.oh-command__item small { margin-left: auto; color: var(--oh-muted); font-size: 12px; }
.oh-command__foot { padding: 12px 20px; border-top: 1px solid var(--oh-border); color: var(--oh-muted); font-size: 12px; display: flex; gap: 15px; }

@keyframes oh-spin { to { transform: rotate(360deg); } }
@keyframes oh-shimmer { to { transform: translateX(100%); } }
@keyframes oh-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes oh-toast-in { from { opacity:0; transform:translate3d(20px,8px,0) scale(.96); } to { opacity:1; transform:translate3d(0,0,0) scale(1); } }
@keyframes oh-toast-out { to { opacity:0; transform:translate3d(18px,0,0) scale(.97); } }
@media (max-width: 1190px) {
  .oh-kpi-grid { gap: 12px; }
  .oh-kpi { padding: 18px 16px; }
  .oh-kpi__foot { font-size: 12px; }
  .oh-sparkline { display: none; }
  .oh-grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .oh-grid, .oh-grid--3 { grid-template-columns: minmax(0,1fr); }
  .oh-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .oh-hero__body { padding: 20px; min-height: 180px; }
  .oh-hero__foot { padding: 10px 20px; gap: 8px 16px; }
  .oh-hero__meta { margin-left: 0; }
  .oh-hero h1 { font-size: 32px; }
  .oh-section-head { flex-wrap: wrap; }
  .oh-card__head, .oh-card__foot, .oh-pagination { padding-left: 17px; padding-right: 17px; }
  .oh-card__body { padding-left: 17px; padding-right: 17px; }
  .oh-table-toolbar { padding-inline: 17px; }
  .oh-modal { max-height: calc(100dvh - 24px); }
  .oh-modal__layout { max-height: calc(100dvh - 26px); }
  .oh-modal__head { padding: 20px; }
  .oh-modal__body { padding: 20px; }
  .oh-modal__foot { padding: 15px 20px; }
  .oh-modal--drawer { max-height: none; border-radius: 0; }
  .oh-toasts { right: 16px; bottom: max(16px,env(safe-area-inset-bottom)); }
  .oh-gallery { width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: none; }
  .oh-gallery__head { gap: 5px; }
  .oh-gallery__head .oh-grow { flex-basis: calc(100% - 40px); order: -2; }
  .oh-gallery__head > [data-modal-close] { order: -1; }
  .oh-gallery__tools { margin-left: 0; }
}
@media (max-width: 480px) {
  .oh-input, .oh-select, .oh-textarea { font-size: 16px; }
  .oh-switch { min-height: 44px; }
  .oh-form-grid { grid-template-columns: minmax(0,1fr); }
  .oh-hero__body { padding: 20px 16px; }
  .oh-hero h1 { font-size: 29px; }
  .oh-hero__foot { padding-inline: 16px; }
  .oh-kpi { padding: 16px 14px; }
  .oh-kpi__label { font-size: 13px; }
  .oh-kpi__value { font-size: 25px; }
  .oh-kpi__label > .oh-icon { display: none; }
  .oh-table-toolbar .oh-search { width: 100%; }
  .oh-modal__foot .oh-help { width: 100%; }
  .oh-otp { gap: 6px; }
  .oh-otp input { width: calc((100% - 30px)/6); }
  .oh-icon-btn { min-width: 40px; min-height: 40px; }
  .oh-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .oh-spinner { border-color: var(--oh-brand); border-style: dotted; }
}
@media (forced-colors: active) {
  .oh-switch__track, .oh-toggle-all { border: 1px solid ButtonText; }
  .oh-switch__track::after, .oh-toggle-all::after { background: ButtonText; }
  .oh-switch input:checked + .oh-switch__track { background: Highlight; }
}
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .oh-no-print, .oh-toasts, .oh-loading, .oh-tooltip, .oh-menu, .oh-modal { display: none !important; }
  .oh-card { box-shadow: none; break-inside: avoid; }
  .oh-table-region { max-height: none; overflow: visible; }
  .oh-table th, .oh-table .oh-sticky-1, .oh-table .oh-sticky-2 { position: static; }
  .oh-hero { print-color-adjust: exact; }
}

/* Shared multiselect dropdowns + asynchronous autocomplete. */
.oh-multi { min-width:0; }
.oh-multi__trigger { display:flex; align-items:center; gap:9px; width:100%; min-height:46px; padding:10px 12px; border:1px solid var(--oh-border-strong); border-radius:8px; background:var(--oh-surface); color:var(--oh-ink); text-align:left; transition:border-color var(--oh-fast),box-shadow var(--oh-fast); }
.oh-multi__trigger > .oh-icon:first-child { color:var(--oh-brand-ink); width:17px; height:17px; flex-shrink:0; }
.oh-multi__trigger [data-multi-summary] { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.oh-multi__trigger:hover,.oh-multi__trigger[aria-expanded=true],.oh-multi__trigger.is-filtered { border-color:var(--oh-brand); }
.oh-multi__trigger[aria-expanded=true] { box-shadow:0 0 0 3px color-mix(in srgb,var(--oh-brand) 12%,transparent); }
.oh-multi__chevron { width:15px; height:15px; color:var(--oh-muted); transition:transform var(--oh-fast); }
.oh-multi__trigger[aria-expanded=true] .oh-multi__chevron { transform:rotate(180deg); }
.oh-multi__count { display:grid; place-items:center; min-width:22px; height:22px; padding:0 5px; border-radius:7px; font-size:11px; font-weight:750; color:var(--oh-brand-ink); background:var(--oh-brand-soft); }
.oh-picker { position:fixed; inset:auto; z-index:var(--oh-z-menu); margin:0; padding:0; display:flex; flex-direction:column; min-width:0; border:1px solid var(--oh-border-strong); border-radius:13px; background:var(--oh-surface); color:var(--oh-ink); box-shadow:0 18px 55px #0d34342b,0 3px 10px #0d343417; overflow:hidden; font-size:14px; }
.oh-picker::backdrop { background:transparent; pointer-events:none; }
.oh-multi__head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 15px 10px; flex-shrink:0; }
.oh-multi__head strong { font-size:14px; }
.oh-multi__head [data-multi-status] { color:var(--oh-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.oh-multi__tools { display:flex; gap:6px; padding:0 12px 10px; flex-shrink:0; }
.oh-multi__tools button { display:flex; align-items:center; justify-content:center; gap:6px; flex:1; padding:7px 10px; border:1px solid var(--oh-border); border-radius:7px; background:var(--oh-surface-2); color:var(--oh-brand-ink); font-size:12px; font-weight:700; transition:background var(--oh-fast),border-color var(--oh-fast); }
.oh-multi__tools button:hover { background:var(--oh-brand-soft); border-color:var(--oh-brand); }
.oh-multi__tools .oh-icon { width:14px; height:14px; }
.oh-multi__search { position:relative; margin:0 12px 7px; flex-shrink:0; }
.oh-multi__search > .oh-icon { position:absolute; width:15px; height:15px; left:10px; top:13px; color:var(--oh-muted); pointer-events:none; }
.oh-multi__search .oh-input { min-height:40px; padding:8px 10px 8px 32px; font-size:13px; }
.oh-multi__options { overflow:auto; overscroll-behavior:contain; min-height:0; padding:0 7px 7px; }
.oh-multi__option { width:100%; padding:10px 9px; gap:12px; border-radius:8px; transition:background var(--oh-fast); }
.oh-multi__option:hover,.oh-multi__option:focus-within { background:var(--oh-surface-2); }
.oh-multi__option:has(input:checked) { color:var(--oh-brand-ink); }
.oh-multi__option [data-multi-label] { order:1; flex:1; min-width:0; overflow-wrap:anywhere; font-size:14px; line-height:1.5; }
.oh-multi__option .oh-switch__track { order:2; }
.oh-multi__option input { left:auto; right:9px; }
.oh-picker__empty { padding:12px 9px; color:var(--oh-muted); font-size:13px; margin:0; }
.oh-autocomplete { position:relative; min-width:0; }
/* Suggestions alone never reserve space for an icon in the input. */
.oh-autocomplete > .oh-input { padding-left:13px; }
.oh-autocomplete:has(> .oh-autocomplete__glyph:not([hidden])) > .oh-input { padding-left:37px; }
.oh-autocomplete__glyph { position:absolute; left:12px; top:50%; width:16px; height:16px; transform:translateY(-50%); color:var(--oh-muted); pointer-events:none; }
.oh-autocomplete__status { padding:12px 14px; margin:0; color:var(--oh-muted); font-size:11px; line-height:1.5; border-bottom:1px solid var(--oh-border); flex-shrink:0; background:var(--oh-surface-2); }
.oh-autocomplete__list { overflow:auto; overscroll-behavior:contain; padding:5px; min-height:0; }
.oh-autocomplete__list:empty { display:none; }
.oh-autocomplete__option { display:flex; align-items:center; gap:10px; padding:10px 9px; border-radius:8px; cursor:pointer; transition:background var(--oh-fast); }
.oh-autocomplete__option:hover,.oh-autocomplete__option[aria-selected=true] { background:var(--oh-brand-soft); }
.oh-autocomplete__option > .oh-icon:first-child { width:30px; height:30px; padding:6px; border:1px solid var(--oh-border); border-radius:9px; background:var(--oh-surface); color:var(--oh-brand-ink); flex-shrink:0; }
.oh-autocomplete__option > .oh-icon:last-child { width:15px; height:15px; color:var(--oh-muted); flex-shrink:0; }
.oh-autocomplete__copy { display:grid; gap:3px; min-width:0; flex:1; }
.oh-autocomplete__copy strong { font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.oh-autocomplete__copy small { font-size:12px; line-height:1.45; color:var(--oh-muted); overflow-wrap:anywhere; }
@media(max-width:640px) { .oh-multi__trigger { min-height:46px; } .oh-multi__search .oh-input { font-size:16px; } .oh-multi__option { padding:12px 9px; min-height:44px; } .oh-autocomplete__option { min-height:48px; } }
@media(prefers-reduced-motion:reduce) { .oh-multi__trigger,.oh-multi__chevron,.oh-multi__tools button,.oh-autocomplete__option { transition:none; } }
.oh-single__option { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:42px; border:0; border-radius:8px; padding:10px 9px; text-align:left; color:var(--oh-ink); background:transparent; font-size:14px; }
.oh-single__option:hover,.oh-single__option:focus-visible { background:var(--oh-surface-2); }
.oh-single__option[aria-selected=true] { color:var(--oh-brand-ink); background:var(--oh-brand-soft); font-weight:700; }
.oh-single__option > .oh-icon { width:16px; height:16px; visibility:hidden; flex-shrink:0; }
.oh-single__option[aria-selected=true] > .oh-icon { visibility:visible; }
.oh-single__option > span { overflow-wrap:anywhere; }

/* Icon-only actions stay centered even in compact rows. */
.oh-action-btn>.oh-icon,.oh-icon-btn>.oh-icon{display:block;flex-shrink:0;margin:0}
