:root {
  color-scheme: light;
  --bg: #f3f6f8;
  --panel: #ffffff;
  --text: #172033;
  --muted: #657286;
  --line: #d9e0e8;
  --accent: #6a28d9;
  --accent-strong: #4f1ca8;
  --cyan: #00b4ff;
  --danger: #a43838;
  --ok: #17734d;
  --oholiab-purple: #5f2167;
  --oholiab-berry: #8c1c59;
  --oholiab-blue: #26418f;
  --oholiab-copper: #db864e;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Aptos, "Aptos Display", Inter, "Segoe UI", Arial, sans-serif; }
.hidden { display: none !important; }
button, input, select { font: inherit; }
button { background: var(--accent); border: 0; border-radius: 6px; color: white; cursor: pointer; font-weight: 800; min-height: 40px; padding: 9px 13px; }
button:hover { background: var(--accent-strong); }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select { border: 1px solid var(--line); border-radius: 6px; min-height: 40px; padding: 8px 10px; width: 100%; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
label { color: var(--muted); display: grid; font-size: 13px; font-weight: 800; gap: 6px; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: 0; margin: 0 0 6px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.auth-layout { background: linear-gradient(118deg, #8c1c59 0%, #702169 38%, #4b2d79 67%, #26418f 100%); color: #fff; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr); min-height: 100vh; overflow-x: hidden; position: relative; }
.auth-layout::before { background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%); content: ""; height: 60vw; left: -24vw; pointer-events: none; position: fixed; top: -32vw; width: 60vw; }
.auth-story { align-content: center; background: transparent; color: #fff; display: grid; min-height: 100vh; overflow: hidden; padding: clamp(2.5rem, 7vw, 7rem); position: relative; }
.auth-story::before { background: radial-gradient(circle, rgba(255,255,255,.1), transparent 68%); border-radius: 50%; content: ""; height: min(42vw, 560px); left: -22%; position: absolute; top: -26%; width: min(42vw, 560px); }
.auth-story::after { background: radial-gradient(circle, rgba(255,255,255,.18) 0 1px, transparent 1.4px); background-size: 28px 28px; content: ""; inset: 0; opacity: .16; pointer-events: none; position: absolute; }
.story-content { max-width: 620px; position: relative; z-index: 1; }
.landing-brand { align-items: flex-start; display: flex; flex-direction: column; gap: .45rem; margin: 0 0 clamp(2rem, 5vw, 3.5rem); }
.logo-crop { display: block; flex: 0 0 auto; overflow: hidden; position: relative; }
.logo-crop img { left: 50%; max-width: none; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.hero-logo { height: 54px; width: 54px; }
.hero-logo img { filter: brightness(0) invert(1); width: 154px; }
.landing-brand-copy { display: grid; gap: .15rem; }
.landing-brand-copy strong { color: #fff; font-size: clamp(2rem, 3.3vw, 3rem); letter-spacing: -.045em; line-height: 1; }
.landing-brand-copy small { color: rgba(255,255,255,.68); font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.auth-story .eyebrow { color: rgba(255,255,255,.7); letter-spacing: .13em; }
.auth-story h1 { color: #fff; font-size: clamp(2.6rem, 5.3vw, 4.9rem); letter-spacing: -.052em; line-height: 1; margin: 0 0 1.35rem; max-width: 700px; }
.auth-story h1 span { color: rgba(255,255,255,.72); display: block; }
.story-lead { color: rgba(255,255,255,.72); font-size: clamp(.95rem, 1.5vw, 1.1rem); line-height: 1.65; max-width: 540px; }
.story-points { display: grid; gap: .75rem; margin: 2rem 0; max-width: 620px; }
.story-points div { background: rgba(255,255,255,.72); border: 1px solid rgba(95,33,103,.16); border-left: 4px solid #DB864E; border-radius: .9rem; box-shadow: 0 10px 30px rgba(70,35,76,.07); display: grid; gap: .25rem; padding: 1rem 1.1rem; }
.story-points strong { color: #5F2167; }
.story-points span { color: #625668; line-height: 1.45; }
.story-status { align-items: center; color: rgba(255,255,255,.58); display: flex; font-size: .76rem; gap: .55rem; letter-spacing: .025em; margin-top: 2.2rem; }
.story-status span { background: rgba(255,255,255,.9); border-radius: 50%; box-shadow: 0 0 0 5px rgba(255,255,255,.11); height: .42rem; width: .42rem; }
.auth-column { align-content: center; background: transparent; display: grid; gap: 1rem; justify-self: stretch; padding: clamp(1.5rem, 5vw, 5rem); width: 100%; }
.auth-wordmark { align-items: center; color: #fff; display: none; gap: .45rem; justify-self: center; text-align: left; }
.auth-wordmark > span:last-child { display: grid; gap: .15rem; }
.auth-wordmark strong { color: #fff; font-size: 1.45rem; line-height: 1; }
.auth-wordmark small { color: rgba(255,255,255,.68); font-size: .78rem; }
.form-logo { height: 64px; width: 64px; }
.form-logo img { filter: brightness(0) invert(1); width: 182px; }
.auth-panel { backdrop-filter: blur(18px); background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.55); border-radius: 1.2rem; box-shadow: 0 28px 80px rgba(22,16,57,.25); max-height: calc(100vh - 5rem); overflow-y: auto; padding: clamp(1.4rem, 3vw, 2rem); }
.auth-panel-intro { margin-bottom: 1.4rem; }
.auth-panel-intro span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: rgba(255,255,255,.76); display: inline-block; font-size: .62rem; font-weight: 900; letter-spacing: .13em; margin-bottom: .9rem; padding: .35rem .6rem; text-transform: uppercase; }
.auth-panel-intro h2 { color: #fff; font-size: clamp(1.45rem, 2.6vw, 2rem); margin-bottom: .45rem; }
.auth-panel-intro p { color: rgba(255,255,255,.66); font-size: .85rem; line-height: 1.5; margin-bottom: 0; }
.auth-layout .auth-panel label { color: rgba(255,255,255,.82); }
.auth-layout .auth-panel input, .auth-layout .auth-panel select { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.34); color: #fff; padding: .75rem; }
.auth-layout .auth-panel input::placeholder { color: rgba(255,255,255,.5); }
.auth-layout .auth-panel input:hover, .auth-layout .auth-panel select:hover { border-color: rgba(255,255,255,.62); }
.auth-layout .auth-panel input:focus, .auth-layout .auth-panel select:focus { background: rgba(255,255,255,.16); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); outline: none; }
.auth-layout .auth-panel option { background: #4b2d79; color: #fff; }
.auth-layout .auth-panel button:not(.tab-button):not(.text-button):not(.access-mode) { background: #fff; color: var(--oholiab-purple); border-radius: .7rem; min-height: 48px; }
.auth-layout .auth-panel button:not(.tab-button):not(.text-button):not(.access-mode):hover { background: #f2eaf3; }
.auth-layout .auth-panel .text-button { color: rgba(255,255,255,.82); }
.auth-layout .auth-panel .text-button:hover { background: transparent; color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.auth-layout .auth-panel .text-button:focus-visible { background: transparent; color: #fff; outline: 3px solid rgba(255,255,255,.3); outline-offset: 4px; }
.auth-layout .auth-panel .form-message { color: rgba(255,255,255,.76); }
.form-section-title { border-bottom: 1px solid rgba(255,255,255,.22); color: #fff; font-size: .9rem; font-weight: 800; margin: .5rem 0 0; padding-bottom: .55rem; }
.attribution { color: rgba(255,255,255,.58); font-size: .72rem; text-align: center; }
.attribution a { color: inherit; }
.check-label { align-items: start; display: grid; grid-template-columns: 22px 1fr; }
.check-label input { min-height: 20px; width: 20px; }
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.auth-story dl { display: grid; gap: 12px; max-width: 720px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.auth-story dt { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.auth-story dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.auth-panel { margin: 0; max-width: 440px; width: 100%; }
.auth-tabs { align-items: stretch; display: grid; gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.25rem; }
.tab-button { align-items: center; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.7); display: flex; font-size: .92rem; font-weight: 700; justify-content: center; line-height: 1.25; min-height: 58px; padding: .75rem .5rem; text-align: center; width: 100%; }
.tab-button.active { background: rgba(255,255,255,.94); color: var(--oholiab-purple); }
.user-access-modes { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: .8rem; display: grid; gap: .35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .35rem; }
.access-mode { background: transparent; border: 1px solid transparent; border-radius: .6rem; color: rgba(255,255,255,.68); display: grid; gap: .15rem; min-height: 58px; padding: .55rem; text-align: left; }
.access-mode span { font-size: .72rem; font-weight: 600; }
.access-mode strong { font-size: .88rem; }
.access-mode:hover { background: rgba(255,255,255,.1); color: #fff; }
.access-mode.active { background: rgba(255,255,255,.92); border-color: rgba(255,255,255,.28); box-shadow: 0 4px 18px rgba(27,18,61,.14); color: var(--oholiab-purple); }
.form-grid { display: grid; gap: 12px; }
.text-button { background: transparent; color: var(--accent); min-height: auto; padding: 0; text-align: left; }
.form-message { color: var(--muted); min-height: 20px; }
.temporary-auth-notice { color: rgba(255,255,255,.68); font-size: .8rem; line-height: 1.45; margin-bottom: 0; }
.recovery-heading h2 { color: #fff; margin-bottom: .5rem; }
.recovery-heading p:last-child { color: rgba(255,255,255,.68); line-height: 1.5; margin-bottom: .25rem; }
.app-footer { color: var(--muted); font-size: .8rem; padding: 1rem 0; text-align: center; }
.app-footer a { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(0,180,255,.45); outline-offset: 2px; }
@supports not (backdrop-filter: blur(12px)) { .story-points div { background: #fff; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.app-layout { align-items: start; display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; overflow-y: auto; padding: 22px; position: sticky; top: 0; }
.brand { display: block; font-size: 26px; }
.main-nav { align-content: start; display: grid; gap: 8px; margin-top: 24px; }
.main-nav a, .nav-dropdown-toggle { background: transparent; border-radius: 6px; color: var(--muted); font-weight: 800; min-height: 40px; padding: 10px 12px; text-decoration: none; width: 100%; }
.main-nav a { display: block; }
.main-nav a.active, .main-nav a:hover, .nav-dropdown-toggle.active, .nav-dropdown-toggle:hover { background: #e8f1f3; color: var(--accent-strong); }
.nav-dropdown { display: grid; gap: 5px; }
.nav-dropdown-toggle { align-items: center; display: flex; justify-content: space-between; text-align: left; }
.nav-chevron { font-size: 17px; transform: rotate(-90deg); transition: transform 150ms ease; }
.nav-dropdown-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(0); }
.nav-submenu { border-left: 2px solid #ded3e3; display: grid; gap: 3px; margin: 1px 0 3px 12px; padding-left: 8px; }
.main-nav .nav-submenu a { border-radius: 7px; font-size: 13px; min-height: 34px; padding: 8px 10px; }
.main-nav .nav-submenu a.active { background: #eee6f3; box-shadow: inset 3px 0 0 var(--accent); color: #5F2167; }
.user-card { border-top: 1px solid var(--line); display: grid; gap: 10px; padding-top: 16px; }
.sidebar-identity { display: grid; gap: 3px; min-width: 0; }
.sidebar-identity strong { overflow-wrap: anywhere; }
.sidebar-identity span { color: var(--muted); font-size: 12px; }
.content { min-width: 0; padding: 28px clamp(18px, 4vw, 46px) 44px; }
.context-bar { margin-bottom: 24px; }
.context-heading { align-items: start; border-bottom: 1px solid var(--line); display: flex; gap: 24px; justify-content: space-between; padding-bottom: 18px; }
.context-heading h1 { margin-bottom: 0; }
.context-summary { align-items: end; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 12px; gap: 10px 22px; justify-content: flex-end; padding-top: 4px; text-align: right; }
.context-summary span { display: grid; gap: 2px; }
.context-summary strong { color: #758094; font-size: 13px; font-weight: 600; }
.page { display: none; }
.page.active-page { display: grid; gap: 18px; }
.metric-grid { display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.metric-grid span { color: var(--muted); display: block; margin-bottom: 8px; }
.metric-grid strong { font-size: 28px; }
.two-column, .setup-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setup-grid { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
.setup-workspace { min-width: 0; }
.setup-window-stack { display: grid; }
.setup-window { display: none; gap: 16px; min-width: 0; }
.setup-window.active { display: grid; }
.setup-window-header { align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(23,32,51,.04); display: flex; gap: 20px; justify-content: space-between; padding: 18px 20px; }
.setup-window-header h2 { font-size: 28px; margin-bottom: 5px; }
.setup-window-header p:last-child, .records-heading p { color: var(--muted); margin-bottom: 0; }
.setup-header-tools { align-items: flex-end; display: grid; flex: 0 0 auto; gap: 9px; justify-items: end; }
.data-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.data-action { align-items: center; background: #fff; border: 1px solid #cfd8e3; border-radius: 6px; color: #4f596b; cursor: pointer; display: inline-flex; font-size: 12px; font-weight: 800; justify-content: center; line-height: 1; min-height: 30px; padding: 7px 10px; text-decoration: none; white-space: nowrap; }
button.data-action { box-shadow: none; }
.data-action:hover { background: #f5f1f8; border-color: #b9a6c4; color: var(--oholiab-purple); }
.setup-import-panel { align-items: end; display: grid; gap: 12px; grid-template-columns: minmax(240px, 1fr) auto auto minmax(220px, 1fr); padding: 14px 16px; }
.setup-import-panel > button { min-height: 34px; padding: 7px 11px; }
.record-count { background: #eee6f3; border: 1px solid #d9cae0; border-radius: 999px; color: #5F2167; font-size: 12px; font-weight: 900; padding: 7px 11px; white-space: nowrap; }
.setup-window-grid { align-items: start; display: grid; gap: 18px; grid-template-columns: minmax(340px, .42fr) minmax(0, 1fr); }
.parts-window-grid { grid-template-columns: minmax(390px, .48fr) minmax(0, 1fr); }
.setup-settings-form { border-radius: 10px; box-shadow: 0 1px 2px rgba(23,32,51,.04); display: grid; gap: 20px; padding: 20px; }
.setup-settings-form > button:not(.block-help-button) { justify-self: start; min-width: 150px; }
.manufactured-bom-prompt .secondary-action { background: #fff; border: 1px solid #b9a6c4; color: var(--oholiab-purple); justify-self: start; }
.manufactured-bom-prompt .secondary-action:hover { background: #f5f1f8; }
.part-form-message { grid-column: 1 / -1; margin: 0; }
.bom-panel { scroll-margin-top: 24px; }
.settings-section { border-bottom: 1px solid var(--line); display: grid; gap: 14px; padding-bottom: 20px; }
.settings-section:last-of-type { border-bottom: 0; padding-bottom: 0; }
.settings-section h3, .records-heading h3 { font-size: 16px; margin: 0; }
.settings-fields { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-fields input, .settings-fields select, .record-toolbar input, .record-toolbar select { background: #fff; border-color: #cfd8e3; }
.settings-fields input:hover, .settings-fields select:hover, .record-toolbar input:hover, .record-toolbar select:hover { border-color: #aebccd; }
.field-span { grid-column: 1 / -1; }
.switch-control { align-items: center; cursor: pointer; display: flex; gap: 9px; min-height: 40px; }
.switch-control > input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.switch-track { background: #c9d1da; border-radius: 999px; display: inline-flex; height: 24px; padding: 3px; transition: background .18s ease; width: 44px; }
.switch-thumb { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(23,32,51,.25); height: 18px; transform: translateX(0); transition: transform .18s ease; width: 18px; }
.switch-control > input:checked + .switch-track { background: var(--oholiab-purple); }
.switch-control > input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch-control > input:focus-visible + .switch-track { outline: 3px solid rgba(95,33,103,.2); outline-offset: 2px; }
.switch-control > input:disabled + .switch-track { cursor: not-allowed; opacity: .48; }
.switch-state { color: var(--muted); font-size: 13px; font-weight: 800; }
.switch-state::before { content: "No"; }
.switch-control > input:checked ~ .switch-state::before { content: "Yes"; }
.segmented-field { border: 0; margin: 0; min-width: 0; padding: 0; }
.segmented-field legend { font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.segmented-control { background: #eef1f4; border: 1px solid #cfd8e3; border-radius: 7px; display: flex; padding: 3px; }
.segmented-control label { cursor: pointer; flex: 1; position: relative; }
.segmented-control input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.segmented-control span { border-radius: 5px; color: var(--muted); display: block; font-size: 12px; font-weight: 800; padding: 7px 8px; text-align: center; white-space: nowrap; }
.segmented-control input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(23,32,51,.12); color: var(--oholiab-purple); }
.segmented-control input:focus-visible + span { outline: 2px solid var(--oholiab-purple); }
.compact-choice-select { height: 1px; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; width: 1px; }
.compact-choice-field { align-self: end; display: grid; gap: 6px; min-width: 0; }
.compact-choice-field legend { margin-bottom: 0; }
.compact-choice-field .segmented-control { min-height: 40px; }
.compact-choice-field .segmented-control span { align-items: center; display: flex; justify-content: center; min-height: 32px; overflow: hidden; padding-inline: 6px; text-overflow: ellipsis; }
.compact-choice-field .field-help { display: block; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.settings-fields > label, .settings-fields > fieldset { min-width: 0; }
.settings-fields .switch-control { width: 100%; }
.settings-note { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0; }
.selection-status { color: var(--muted); font-size: 12px; line-height: 1.4; margin: 0; }
.quantity-section .settings-fields { grid-template-columns: 1fr; }
.setup-records { border-radius: 10px; box-shadow: 0 1px 2px rgba(23,32,51,.04); display: grid; gap: 16px; min-width: 0; overflow: hidden; padding: 0; }
.setup-settings-form, .setup-import-panel, .setup-records, .help-enabled-block { position: relative; }
.block-help-button { align-items: center; aspect-ratio: 1; background: #f7f4f9; border: 1px solid #d9cae0; border-radius: 50%; color: var(--oholiab-purple); display: flex; flex: 0 0 22px; font-family: Georgia, serif; font-size: 12px; font-style: italic; font-weight: 800; height: 22px; justify-content: center; min-height: 22px; min-width: 22px; padding: 0; position: absolute; right: 10px; top: 10px; width: 22px; z-index: 2; }
.block-help-button:hover { background: #eee6f3; color: var(--oholiab-purple); }
.setup-import-panel .block-help-button { right: 8px; top: 8px; }
.help-dialog { background: #fff; border: 0; border-radius: 12px; box-shadow: 0 28px 80px rgba(23,32,51,.25); color: var(--text); max-height: min(82vh, 760px); max-width: 700px; padding: 0; width: min(calc(100% - 32px), 700px); }
.help-dialog::backdrop { background: rgba(23,32,51,.52); }
.help-dialog-header { align-items: start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 20px 22px 16px; }
.help-dialog-header h2 { margin: 0; }
.help-close { align-items: center; background: transparent; color: var(--muted); display: flex; font-size: 25px; height: 32px; justify-content: center; min-height: 32px; padding: 0; width: 32px; }
.help-close:hover { background: #f2f4f6; color: var(--text); }
.help-dialog-content { max-height: calc(82vh - 86px); overflow-y: auto; padding: 18px 22px 24px; }
.help-dialog-content > p { color: var(--muted); line-height: 1.55; }
.help-dialog-content dl { border: 1px solid var(--line); border-radius: 8px; margin: 0; overflow: hidden; }
.help-dialog-content dl > div { display: grid; gap: 5px; grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); padding: 11px 13px; }
.help-dialog-content dl > div + div { border-top: 1px solid var(--line); }
.help-dialog-content dt { font-size: 13px; font-weight: 900; }
.help-dialog-content dd { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0; }
.help-section + .help-section { margin-top: 20px; }
.help-section h3 { font-size: 15px; margin: 0 0 7px; }
.help-section > p { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 9px 18px; }
.help-field-list, .help-option-list { display: grid; gap: 10px; list-style: none; margin: 0 0 0 18px; padding: 0; }
.help-option-list { margin-left: 28px; }
.help-field-list li, .help-option-list li { display: grid; gap: 3px; }
.help-field-list strong, .help-option-list strong { font-size: 13px; }
.help-field-list span, .help-option-list span { color: var(--muted); font-size: 13px; line-height: 1.45; margin-left: 18px; }
.records-heading { min-height: 78px; padding: 18px 20px 0; }
.record-toolbar { align-items: end; background: #f7f9fa; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, .45fr)); padding: 12px 20px; }
.record-toolbar.uom-record-toolbar { grid-template-columns: minmax(260px, 1fr) minmax(220px, .62fr) minmax(200px, .55fr); }
.uom-record-toolbar .segmented-control span { white-space: nowrap; }
.parts-window-grid .record-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.parts-window-grid .record-toolbar > label:first-child { grid-column: 1 / -1; }
.parts-window-grid .record-toolbar .segmented-field { min-width: 0; }
.parts-window-grid .segmented-control { min-height: 40px; }
.parts-window-grid .segmented-control span { align-items: center; display: flex; font-size: 11px; justify-content: center; line-height: 1.15; min-height: 36px; padding-inline: 5px; white-space: normal; }
.setup-records .table-wrap { padding: 0 18px 18px; }
.setup-records th { background: #fafbfc; white-space: nowrap; }
.status-pill { background: #edf3f1; border-radius: 999px; color: var(--ok); display: inline-block; font-size: 11px; font-weight: 900; padding: 4px 8px; text-transform: capitalize; }
.status-pill.inactive, .status-pill.obsolete { background: #f6eaea; color: var(--danger); }
.status-pill.pending_bom { background: #fff4d8; color: #7a5700; }
.empty-table { color: var(--muted); padding: 26px 10px; text-align: center; }
.wide { grid-column: span 2; }
.panel { padding: 18px; }
.blocking-panel code { background: #eef3f5; border-radius: 6px; display: block; padding: 12px; }
.table-header { align-items: center; display: flex; justify-content: space-between; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 720px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.list-stack { display: grid; gap: 10px; }
.administration-page-header { border-radius: 10px; }
.administration-page-header h2 { margin-bottom: 6px; }
.administration-page-header p:last-child { color: var(--muted); line-height: 1.5; margin-bottom: 0; max-width: 820px; }
.audit-list { display: grid; gap: 14px; }
.audit-card { border-radius: 10px; display: grid; gap: 16px; }
.audit-card > header { align-items: start; border-bottom: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; padding-bottom: 14px; }
.audit-card h3 { font-size: 14px; font-weight: 700; margin: 5px 0 0; }
.audit-card time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.audit-event-type { color: var(--accent-strong); font-size: 16px; font-weight: 900; }
.audit-actor { align-items: center; display: flex; gap: 11px; }
.audit-actor > div { display: grid; gap: 2px; }
.audit-actor span, .audit-actor small { color: var(--muted); font-size: 12px; }
.audit-avatar { align-items: center; background: #eee6f3; border-radius: 50%; color: var(--oholiab-purple) !important; display: flex; flex: 0 0 38px; font-size: 15px !important; font-weight: 900; height: 38px; justify-content: center; }
.audit-details { background: #f7f9fa; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; overflow: hidden; }
.audit-details > div { border-bottom: 1px solid var(--line); display: grid; gap: 4px; padding: 11px 13px; }
.audit-details > div:nth-child(odd) { border-right: 1px solid var(--line); }
.audit-details dt { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.audit-details dd { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.audit-no-details, .audit-empty p { color: var(--muted); margin: 0; }
.audit-card footer { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 11px; gap: 8px 20px; }
.reports-page-header { border-radius: 10px; }
.reports-page-header h2 { margin-bottom: 6px; }
.reports-page-header p:last-child { color: var(--muted); margin: 0; }
.counts-page-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 16px; padding-right: 52px; }
.counts-page-header h2 { margin-bottom: 5px; }
.counts-page-header p:last-child { color: var(--muted); margin: 0; }
.counts-page-header #create-count-button { flex: 0 0 auto; min-height: 34px; padding: 8px 12px; width: auto; }
.counts-list { display: grid; gap: 10px; }
.counts-loading { align-items: center; display: grid; gap: 12px; margin-bottom: 12px; overflow: hidden; padding: 18px; }
.counts-loading.hidden { display: none; }
.counts-loading strong { display: block; }
.counts-loading p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.loading-bar { background: #eadff2; border-radius: 999px; height: 5px; overflow: hidden; width: 100%; }
.loading-bar span { animation: count-loading 1.15s ease-in-out infinite; background: linear-gradient(90deg, var(--oholiab-purple), #8d45d8); border-radius: inherit; display: block; height: 100%; width: 38%; }
#counts-page.is-loading .counts-list { opacity: .5; pointer-events: none; }
@keyframes count-loading { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .loading-bar span { animation-duration: 2.5s; } }
.count-card { padding: 0; overflow: hidden; }
.count-card-row { align-items: center; display: grid; gap: 18px; grid-template-columns: minmax(260px, 1fr) auto auto; padding: 16px 18px; }
.count-card-main { align-items: center; display: flex; gap: 12px; justify-content: space-between; min-width: 0; }
.count-card-main > div { display: grid; gap: 4px; min-width: 0; }
.count-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-card-main span:not(.status-pill), .count-complete { color: var(--muted); font-size: 12px; }
.count-summary { display: flex; gap: 20px; margin: 0; }
.count-summary div { display: grid; gap: 3px; min-width: 54px; }
.count-summary dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.count-summary dd { font-size: 13px; font-weight: 800; margin: 0; text-transform: capitalize; }
.count-actions { align-items: center; display: flex; gap: 7px; justify-content: flex-end; min-width: 150px; }
.count-progress { color: var(--muted); font-size: 12px; max-width: 110px; }
.count-action { min-height: 34px; padding: 7px 11px; width: auto; }
.count-action.secondary { background: #fff; border: 1px solid #cfd8e3; color: var(--oholiab-purple); }
.count-action.secondary:hover { background: #f5f1f8; }
.count-action.danger { background: #fff; border: 1px solid #d7a5ad; color: #9d2638; }
.count-action.danger:hover { background: #fff3f5; }
.count-empty { text-align: center; }
.count-empty h3 { margin-bottom: 5px; }
.count-empty p { color: var(--muted); margin: 0; }
.count-sheet { border-top: 1px solid var(--line); padding: 18px; }
.count-sheet header { align-items: center; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 12px; }
.count-sheet h3, .count-sheet p { margin: 0; }
.count-sheet header p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.count-sheet header button { min-height: 34px; padding: 7px 12px; width: auto; }
.count-sheet input { min-width: 105px; }
.count-sheet .table-wrap { overflow-x: auto; }
.count-sheet table { min-width: 850px; }
.count-sheet .counted-quantity { max-width: 130px; }
.count-variance { font-weight: 800; }
.part-status-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.part-source { color: var(--muted); display: block; font-size: 11px; margin-top: 3px; }
.part-cell { align-items: center; display: flex; gap: 9px; }
.part-cell img { border: 1px solid var(--line); border-radius: 6px; height: 38px; object-fit: cover; width: 38px; }
.part-cell small { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }
.bom-table-action { font-weight: 900; min-width: 110px; white-space: nowrap; }
.category-window-grid { align-items: start; grid-template-columns: minmax(300px, .7fr) minmax(520px, 1.5fr); }
.category-fields { grid-template-columns: 1fr; margin-top: 16px; }
.category-toolbar { grid-template-columns: minmax(220px, 1fr); }
.subcategory-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.subcategory-tags span { background: #f2edf5; border: 1px solid #e2d7e7; border-radius: 999px; color: var(--oholiab-purple); font-size: 12px; font-weight: 800; padding: 5px 9px; }
.empty-value { color: var(--muted); font-size: 12px; }
.part-image-preview { grid-column: 1 / -1; }
.part-image-preview img { border: 1px solid var(--line); border-radius: 8px; height: 110px; object-fit: contain; width: 150px; }
@media (max-width: 1000px) { .category-window-grid { grid-template-columns: 1fr; } }
.bom-panel { margin-top: 18px; padding: 20px; }
.bom-panel > header, .bom-editor-heading { align-items: flex-start; display: flex; gap: 18px; justify-content: space-between; }
.bom-panel > header h2, .bom-panel > header p, .bom-editor-heading h3, .bom-editor-heading p { margin: 0; }
.bom-panel > header > div > p:last-child, .bom-editor-heading p, .bom-loading { color: var(--muted); }
.bom-create-actions, .bom-editor-heading > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.bom-release { align-items: end; background: #f7f9fa; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 12px; grid-template-columns: minmax(220px, 1fr) minmax(170px, .4fr) auto; margin-top: 18px; padding: 14px; }
.bom-release > div { display: grid; gap: 4px; }
.bom-release span { color: var(--muted); font-size: 12px; }
.bom-create-actions { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.bom-create-actions button, .bom-editor-heading button { min-height: 34px; padding: 7px 11px; width: auto; }
.bom-create-actions .secondary, .bom-editor-heading .secondary { background: #fff; border: 1px solid #cfd8e3; color: var(--oholiab-purple); }
.bom-editor { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.bom-notes { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; }
.bom-editor table { min-width: 760px; }
.bom-editor select { min-width: 280px; }
.bom-editor input[name="quantity"] { min-width: 110px; }
.bom-history-list { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.bom-history { border: 1px solid var(--line); border-radius: 8px; margin-top: 9px; overflow: hidden; }
.bom-history summary { align-items: center; cursor: pointer; display: flex; gap: 12px; padding: 13px; }
.bom-history summary span:last-child { color: var(--muted); margin-left: auto; }
.bom-history .table-wrap { border-top: 1px solid var(--line); padding: 0 12px 12px; }
@media (max-width: 800px) { .bom-panel > header, .bom-editor-heading { display: grid; } .bom-notes { grid-template-columns: 1fr; } .bom-history summary { align-items: flex-start; flex-direction: column; } .bom-history summary span:last-child { margin-left: 0; } }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.report-output { border-radius: 10px; min-height: 180px; overflow: hidden; padding: 0; }
.report-empty { display: grid; gap: 6px; padding: 36px 22px; place-items: center; text-align: center; }
.report-empty h3, .report-empty p { margin: 0; }
.report-empty p { color: var(--muted); }
.report-error { background: #fff8f8; }
.report-error h3 { color: var(--danger); }
.report-result-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 18px 20px; }
.report-result-header h3 { margin: 0; }
.report-export { background: var(--accent); border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; padding: 10px 13px; text-decoration: none; }
.report-output .table-wrap { padding: 0 18px 18px; }
.report-output th { background: #fafbfc; white-space: nowrap; }
.mobile-bar, .nav-overlay { display: none; }
.icon-button { display: grid; gap: 4px; height: 40px; place-content: center; width: 40px; }
.icon-button span { background: white; display: block; height: 2px; width: 18px; }

@media (max-width: 1250px) { .parts-window-grid .record-toolbar { grid-template-columns: 1fr; } .parts-window-grid .record-toolbar > label:first-child { grid-column: auto; } }
@media (max-width: 1250px) { .record-toolbar.uom-record-toolbar { grid-template-columns: 1fr; } }

@media (max-width: 1100px) {
  .metric-grid, .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-window-grid, .parts-window-grid { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(380px, .8fr); }
  .auth-story { padding: 3rem; }
  .auth-story h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); }
}

@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding: 2.25rem 1.25rem 1rem; }
  .auth-story h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
  .landing-brand { margin-bottom: 1.5rem; }
  .hero-logo { height: 48px; width: 48px; }
  .hero-logo img { width: 137px; }
  .auth-column { max-width: 480px; padding: 1.5rem 1rem 2rem; }
  .app-layout { grid-template-columns: 1fr; }
  .mobile-bar { align-items: center; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 10px 14px; position: sticky; top: 0; z-index: 11; }
  .sidebar { bottom: 0; left: 0; max-width: 330px; overflow-y: auto; position: fixed; top: 0; transform: translateX(-105%); transition: transform 160ms ease; width: 86vw; z-index: 20; }
  .app-layout.nav-open .sidebar { transform: translateX(0); }
  .nav-overlay { background: rgba(23, 32, 51, .4); border-radius: 0; inset: 0; padding: 0; position: fixed; z-index: 19; }
  .app-layout.nav-open .nav-overlay { display: block; }
  .metric-grid, .two-column, .setup-grid { grid-template-columns: 1fr; }
  .settings-fields, .record-toolbar { grid-template-columns: 1fr; }
  .audit-card > header { display: grid; }
  .audit-details { grid-template-columns: 1fr; }
  .audit-details > div:nth-child(odd) { border-right: 0; }
  .field-span { grid-column: auto; }
  .setup-window-header { align-items: start; flex-direction: column; gap: 8px; }
  .context-heading { align-items: start; flex-direction: column; gap: 10px; }
  .context-summary { justify-content: flex-start; text-align: left; }
  .wide { grid-column: auto; }
  .auth-panel { margin: 0; max-height: none; }
}
.transaction-location-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.transaction-currency-fields { align-items: start; border-left: 3px solid var(--oholiab-purple); display: grid; gap: 14px 12px; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 14px; }
.transaction-currency-fields.hidden { display: none; }
#transaction-base-cost-field { grid-column: 1 / -1; }
.transaction-currency-fields > label { align-content: start; grid-template-rows: auto 40px auto; }
.transaction-currency-fields > label > input, .transaction-currency-fields > label > select { height: 40px; min-height: 40px; }
.calculated-cost { align-content: center; display: grid; gap: 3px; }
.calculated-cost span, .calculated-cost small { color: var(--muted); font-size: 12px; }
.calculated-cost strong { font-size: 15px; }
.bulk-import-panel { margin-bottom: 1rem; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) auto auto; gap: 1rem; align-items: end; }
.bulk-import-panel.hidden { display: none; }
.bulk-import-panel p { margin: .35rem 0 0; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 800px) { .transaction-location-row, .transaction-currency-fields, .bulk-import-panel { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .counts-page-header { align-items: flex-start; flex-direction: column; gap: 14px; } .count-card-row { align-items: stretch; grid-template-columns: 1fr; } .count-actions { flex-wrap: wrap; justify-content: flex-start; min-width: 0; } }
@media (max-width: 800px) { .setup-header-tools { align-items: start; justify-items: start; width: 100%; } .data-actions { justify-content: flex-start; } .setup-import-panel { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .help-dialog-content dl > div { grid-template-columns: 1fr; } }
