@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --brand-purple: #7d4092;
  --brand-purple-strong: #6b337f;
  --brand-action: #7d4092;
  --brand-action-hover: #6b337f;
  --brand-purple-deep: #341a4a;
  --brand-purple-deeper: #281438;
  --brand-gold: #fcc501;
  --ink: #28242d;
  --ink-soft: #514a58;
  --muted: #6e6675;
  --quiet: #827a89;
  --canvas: #f5f4f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #faf9fb;
  --surface-tint: #f0eaf3;
  --line: #e4dfe8;
  --line-strong: #d4cbd9;
  --success: #16714b;
  --success-soft: #e7f4ec;
  --warning: #8a5b00;
  --warning-soft: #fff4d5;
  --danger: #a43f43;
  --danger-soft: #fbeaec;
  --info: #315d87;
  --info-soft: #eaf2fa;
  --nav-ink: #f8f4fa;
  --nav-muted: #e2d6e9;
  --nav-border: #ffffff1c;
  --focus: #9560ad;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --shadow-sm: 0 1px 2px rgb(37 24 46 / 6%);
  --shadow-md: 0 10px 28px rgb(37 24 46 / 12%);
  --shadow-dialog: 0 24px 72px rgb(18 10 25 / 30%);
  --sidebar-width: 264px;
  --sidebar-compact: 76px;
  --topbar-height: 68px;
  --motion-fast: 140ms;
  --motion-medium: 210ms;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
  --z-sticky: 4;
  --z-sidebar: 30;
  --z-topbar: 40;
  --z-toast: 80;
  --z-draft-bar: 90;
  --z-popover: 120;
  --z-modal: 200;
  --type-data: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-family: var(--type-data);
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-purple: #b17ac2;
  --brand-purple-strong: #d4a9df;
  --brand-action: #854c99;
  --brand-action-hover: #754187;
  --brand-purple-deep: #2a1838;
  --brand-purple-deeper: #20132c;
  --ink: #f4eff6;
  --ink-soft: #ded5e2;
  --muted: #b5aabd;
  --quiet: #a093a9;
  --canvas: #17131c;
  --surface: #211a29;
  --surface-raised: #282130;
  --surface-soft: #1d1725;
  --surface-tint: #35263e;
  --line: #3c3145;
  --line-strong: #51445b;
  --success: #83d4a5;
  --success-soft: #1d392b;
  --warning: #f2ce70;
  --warning-soft: #3d3218;
  --danger: #f29ca1;
  --danger-soft: #45262c;
  --info: #9bc8f2;
  --info-soft: #203349;
  --nav-ink: #f9f4fb;
  --nav-muted: #eee7f1;
  --nav-border: #ffffff1c;
  --focus: #d0a2df;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 20%);
  --shadow-md: 0 10px 28px rgb(0 0 0 / 28%);
  --shadow-dialog: 0 24px 72px rgb(0 0 0 / 54%);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--canvas); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  transition: background-color var(--motion-medium) var(--ease-out), color var(--motion-medium) var(--ease-out);
}
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: #fff; background: var(--brand-purple); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-soft); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 2px solid var(--surface-soft); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--quiet); }
input, textarea, select, button { accent-color: var(--brand-purple); }
input::placeholder, textarea::placeholder { color: var(--quiet); opacity: 1; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; opacity: .58; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--brand-purple-deep);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.skip-link:focus { transform: translateY(0); }

/* Login */
.login-screen {
  display: grid;
  grid-template-columns: minmax(330px, .88fr) minmax(420px, 1.12fr);
  min-height: 100vh;
  background: var(--surface);
}
.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  background: var(--brand-purple-deep);
  color: #fff;
}
.login-brand-panel::after {
  position: absolute;
  right: -105px;
  bottom: -130px;
  width: 410px;
  height: 410px;
  border: 1px solid #ffffff18;
  border-radius: 2px;
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}
.login-brand-panel::before {
  position: absolute;
  right: -22px;
  bottom: -45px;
  width: 260px;
  height: 260px;
  border: 1px solid #ffffff18;
  border-radius: 2px;
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}
.login-brand {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 194px;
  height: 126px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: #fff;
}
.login-brand img { display: block; width: 100%; height: auto; }
.login-brand-copy { position: relative; z-index: 1; max-width: 460px; padding: 45px 0; }
.brand-rule { display: block; width: 42px; height: 4px; margin-bottom: 26px; background: var(--brand-gold); }
.login-brand-copy h1 {
  max-width: 440px;
  margin: 0;
  font-size: clamp(36px, 4.2vw, 54px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.08;
}
.login-brand-copy > p:last-child { max-width: 380px; margin: 18px 0 0; color: #f6eef8; font-size: 16px; line-height: 1.7; }
.login-brand-foot { position: relative; z-index: 1; color: #f1e9f4; font-size: 12px; font-weight: 700; letter-spacing: .15em; }
.login-main { display: flex; flex-direction: column; justify-content: center; width: min(100%, 610px); min-height: 100vh; margin-inline: auto; padding: 44px clamp(30px, 7vw, 92px); }
.login-card { display: grid; width: 100%; max-width: 380px; gap: 19px; margin: 0 auto; }
.login-card-brand { display: none; }
.login-intro { margin-bottom: 8px; }
.login-intro h2 { margin: 0; font-size: 31px; font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.login-intro .muted { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.login-card label, .field-label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.required-mark { color: var(--danger); }
.login-card input, .field, .field-select, .field-text {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgb(30 18 40 / 3%);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background-color var(--motion-medium);
}
.login-card input, .field, .field-select { min-height: 44px; padding: 0 12px; }
.field-text { min-height: 96px; padding: 10px 12px; resize: vertical; }
.login-card input:hover, .field:hover, .field-select:hover, .field-text:hover { border-color: var(--quiet); }
.login-card input:focus, .field:focus, .field-select:focus, .field-text:focus { border-color: var(--brand-purple); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-purple) 18%, transparent); outline: 0; }
.login-submit { margin-top: 5px; }
.login-error { min-height: 0; margin: 0; color: var(--danger); font-size: 13px; }
.login-error:empty { display: none; }
.login-footnote { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; text-wrap: pretty; }
.login-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 380px); margin: 34px auto 0; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .12em; }

/* Application shell and navigation */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 18px 14px 14px;
  overflow: visible;
  background: var(--brand-purple-deep);
  color: var(--nav-ink);
  transition: width var(--motion-medium) var(--ease-out), transform var(--motion-medium) var(--ease-out);
}
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; margin: 0 2px 27px; }
.brand { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 4px 2px; }
.brand-logo-window {
  position: relative;
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #ffffffa0;
  border-radius: var(--radius-sm);
  background: #fff;
}
.brand-logo-window img { position: absolute; inset: 3px; display: block; width: 34px; max-width: none; height: 34px; object-fit: contain; }
.brand-copy { display: grid; min-width: 0; gap: 2px; }
.brand-copy strong { color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .15em; line-height: 1.1; }
.brand-copy small { color: var(--nav-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.icon-button {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: currentColor;
  transition: background-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}
.icon-button svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.sidebar-collapse { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.sidebar-collapse svg { width: 17px; height: 17px; }
.sidebar-collapse:hover { background: var(--surface-tint); color: var(--brand-purple); }
.workspace-label { margin: 0 10px 9px; color: #e2d6e9; font-size: 12px; font-weight: 750; letter-spacing: .15em; }
.primary-nav { display: grid; gap: 4px; }
.primary-nav a, .sidebar-bottom > a {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--nav-muted);
  font-size: 13px;
  font-weight: 580;
  transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast);
}
.primary-nav a:hover, .sidebar-bottom > a:hover { background: #ffffff12; color: #fff; }
.primary-nav a.active, .sidebar-bottom > a.active {
  border-color: #ffffff16;
  background: #ffffff18;
  color: #fff;
  font-weight: 680;
}
.primary-nav a.active::before, .sidebar-bottom > a.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-gold);
  content: "";
}
.nav-icon { display: inline-flex; flex: 0 0 20px; align-items: center; justify-content: center; width: 20px; height: 20px; color: #ddcce5; }
.nav-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.active .nav-icon { color: #fff; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; margin-left: auto; padding: 0 6px; border-radius: 999px; background: var(--brand-gold); color: #34253b; font-size: 12px; font-weight: 800; }
.sidebar-bottom { display: grid; gap: 4px; margin-top: auto; }
.nav-divider { height: 1px; margin: 0 9px 9px; background: var(--nav-border); }
.theme-control {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--nav-muted);
  font-size: 12px;
  font-weight: 570;
  text-align: left;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}
.theme-control:hover { background: #ffffff12; color: #fff; }
.theme-icon { display: inline-flex; width: 19px; height: 19px; align-items: center; justify-content: center; }
.theme-icon svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: inline-flex; }
.theme-control-label { font-size: 12px; }
.login-theme-control { color: var(--ink-soft); }
.login-theme-control:hover { background: var(--surface-tint); color: var(--ink); }
.profile-row { display: flex; min-width: 0; align-items: center; gap: 9px; margin-top: 8px; padding: 14px 4px 3px; border-top: 1px solid var(--nav-border); }
.avatar { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff26; border-radius: 50%; background: #ffffff16; color: #fff; font-size: 13px; font-weight: 750; }
.profile-meta { display: grid; min-width: 0; flex: 1; gap: 2px; }
.profile-meta strong { overflow: hidden; color: #fff; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.profile-meta small { color: var(--nav-muted); font-size: 12px; text-transform: capitalize; }
.logout-button { width: 34px; height: 34px; color: var(--nav-muted); }
.logout-button:hover { background: #ffffff16; color: #fff; }
.main-area { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left var(--motion-medium) var(--ease-out); }
.topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--ink-soft);
}
.breadcrumbs { display: flex; min-width: 0; align-items: center; gap: 10px; color: var(--quiet); font-size: 12px; }
.breadcrumbs strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.crumb-slash { color: var(--line-strong); }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.topbar-actions .icon-button { color: var(--ink-soft); }
.notification-button i { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand-gold); }
.topbar-divider { width: 1px; height: 22px; background: var(--line); }
.topbar-user { max-width: 220px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu { display: none; color: var(--ink); }
.sidebar-scrim { position: fixed; z-index: 25; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(18 12 24 / 48%); }
.page-content { width: min(100%, 1600px); min-height: calc(100vh - var(--topbar-height)); margin-inline: auto; padding: 32px clamp(20px, 3vw, 42px) 54px; }

/* Shared page structure */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-head > div { min-width: 0; }
.page-head h1 { margin: 0; color: var(--ink); font-size: clamp(24px, 2.2vw, 30px); font-weight: 660; letter-spacing: -.035em; line-height: 1.16; }
.page-head p { max-width: 72ch; margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.page-head-actions { min-width: 0; }
.section-title { margin: 26px 0 12px; color: var(--ink); font-size: 16px; font-weight: 680; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.panel, .panel-head, .panel-body { min-width: 0; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; min-height: 57px; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.panel-head > div { display: grid; gap: 3px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-head > svg { width: 19px; height: 19px; fill: none; stroke: var(--brand-purple); stroke-width: 1.8; }
.panel-head h2, .panel-head h3 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 680; }
.panel-body { padding: 18px; }
.form-section { margin-top: 20px; padding-top: 19px; border-top: 1px solid var(--line); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section:is(fieldset) { min-width: 0; margin: 20px 0 0; padding: 19px 0 0; border-right: 0; border-bottom: 0; border-left: 0; }
.form-section legend { padding: 0; }
.form-section h3 { margin: 0 0 7px; color: var(--ink); font-size: 14px; font-weight: 680; }
.form-section > p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.form-grid .wide { grid-column: 1 / -1; }
.field-label .field-help, .field-help { color: var(--muted); font-size: 12px; font-weight: 450; line-height: 1.5; }
.field-label .field-help { display: block; margin-top: -2px; }
.field-label :is(input, select, textarea) { margin-top: 1px; }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-card { position: relative; display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: border-color var(--motion-fast), background-color var(--motion-fast); }
.choice-card:has(input:checked) { border-color: var(--brand-purple); background: var(--surface-tint); }
.choice-card input { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; }
.choice-card label { display: grid; flex: 1; gap: 4px; cursor: pointer; }
.choice-card strong { color: var(--ink); font-size: 13px; font-weight: 670; }
.choice-card small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.toggle { width: 42px; height: 24px; cursor: pointer; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; display: flex; min-width: min(100%, 260px); max-width: 420px; flex: 1 1 260px; align-items: center; }
.search-box > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--quiet); fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }
.search-box input { width: 100%; min-height: 40px; padding: 0 12px 0 37px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.search-box input:focus { border-color: var(--brand-purple); outline: 3px solid color-mix(in srgb, var(--brand-purple) 16%, transparent); }
.filter { min-height: 40px; padding: 0 32px 0 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-soft); }
.filter-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 650; }

/* Buttons and icon controls */
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}
.button:hover { border-color: var(--brand-purple); background: var(--surface-soft); color: var(--brand-purple); }
.button:active { transform: translateY(1px); }
.button.primary { border-color: var(--brand-action); background: var(--brand-action); color: #fff; }
.button.primary:hover { border-color: var(--brand-action-hover); background: var(--brand-action-hover); color: #fff; }
.button.subtle { border-color: transparent; background: var(--surface-tint); color: var(--brand-purple); }
.button.subtle:hover { border-color: var(--line-strong); background: var(--surface); }
.button.danger { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); background: var(--surface); color: var(--danger); }
.button.danger:hover { background: var(--danger-soft); }
.button.small { min-height: 32px; padding: 0 10px; font-size: 12px; }
.button.full { width: 100%; }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-label { display: inline-flex; align-items: center; gap: 8px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--brand-purple); font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--brand-purple-strong); }

/* Operational dashboard */
.hero-card {
  position: relative;
  display: flex;
  min-height: 158px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
  padding: 28px 32px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--brand-purple-deep);
  color: #fff;
}
.hero-card::after { position: absolute; top: -84px; right: 13%; width: 230px; height: 230px; border: 1px solid #ffffff20; border-radius: 4px; content: ""; transform: rotate(45deg); }
.hero-copy { position: relative; z-index: 1; max-width: 610px; }
.hero-copy h2 { margin: 0 0 7px; color: #fff; font-size: 23px; font-weight: 660; letter-spacing: -.025em; line-height: 1.25; }
.hero-copy p { margin: 0; color: #e3d9e8; font-size: 13px; line-height: 1.6; }
.hero-note { position: relative; z-index: 1; flex: 0 0 auto; max-width: 245px; padding: 10px 13px; border: 1px solid #ffffff35; border-radius: var(--radius-sm); color: #f3e9f6; font-size: 12px; line-height: 1.45; }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-card {
  display: flex;
  min-height: 162px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}
.action-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-purple) 52%, var(--line)); box-shadow: var(--shadow-md); }
.action-content { display: grid; gap: 4px; }
.action-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--surface-tint); color: var(--brand-purple); }
.action-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action-card h3 { margin: 0 0 5px; color: var(--ink); font-size: 14px; font-weight: 680; }
.action-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.action-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 13px; color: var(--brand-purple); font-size: 12px; font-weight: 700; }
.action-arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 19px; }
.stat-card { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { color: var(--ink); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: var(--radius-sm); background: var(--surface-tint); color: var(--brand-purple); }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Tables, catalog, requests */
.table-wrap { position: relative; max-width: 100%; overflow: auto; scrollbar-color: var(--line-strong) var(--surface-soft); }
.table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.data-table { width: 100%; min-width: 740px; border-collapse: separate; border-spacing: 0; color: var(--ink-soft); font-size: 13px; }
.data-table caption { padding: 9px 14px; color: var(--muted); font-size: 12px; text-align: left; }
.data-table th { position: sticky; z-index: 2; top: 0; padding: 11px 13px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .025em; text-align: left; white-space: nowrap; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.45; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-tint) 42%, var(--surface)); }
.data-table tbody tr:focus-within { background: var(--surface-tint); }
.data-table td:first-child, .data-table th:first-child { padding-left: 17px; }
.sort-button { padding: 3px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; white-space: nowrap; }
.sort-button:hover { color: var(--brand-purple); }
.sort-button span { margin-left: 3px; color: var(--brand-purple); font-size: 12px; }
.product-main { display: grid; min-width: 160px; gap: 3px; }
.product-main strong { color: var(--ink); font-size: 13px; font-weight: 650; }
.product-sub, .detail-block small, .timeline small { color: var(--muted); font-size: 12px; }
.sku { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.missing-price, .source-missing { display: inline-block; color: var(--muted); font-size: 12px; font-style: italic; white-space: nowrap; }
.org-price { display: grid; gap: 3px; margin: 3px 0; white-space: nowrap; }
.org-price .product-sub { font-size: 12px; }
.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.status.pending, .status.draft { border-color: color-mix(in srgb, var(--warning) 22%, transparent); background: var(--warning-soft); color: var(--warning); }
.status.in-progress { border-color: color-mix(in srgb, var(--info) 20%, transparent); background: var(--info-soft); color: var(--info); }
.status.completed, .status.active, .status.publish { border-color: color-mix(in srgb, var(--success) 20%, transparent); background: var(--success-soft); color: var(--success); }
.status.rejected, .status.inactive, .status.archived { border-color: color-mix(in srgb, var(--danger) 22%, transparent); background: var(--danger-soft); color: var(--danger); }
.status.private, .status.unknown, .status.withdrawn { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.parent-reference { color: var(--muted); font-size: 12px; }
.source-conflict { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: 12px; font-weight: 700; white-space: nowrap; }
.source-record-note, .source-item-context { color: var(--muted); font-size: 12px; }
.source-record-count { color: var(--muted); font-size: 12px; font-weight: 650; }
.source-items-panel { margin-top: 20px; }
.source-items-table { min-width: 1050px; }
.source-picker-row { background: var(--surface-soft); }
.source-picker-warning { display: block; margin-top: 6px; }
.table-scroll-hint { display: none; margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.45; }
.catalog-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.catalog-pagination > div { display: flex; gap: 8px; }
.catalog-pagination .button:disabled { opacity: .46; }
.picker-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 10px; color: var(--muted); font-size: 12px; }
.picker-pagination span { margin-right: auto; }
.picker-pagination .button { min-width: 88px; }
.table-empty { display: grid; min-height: 185px; place-content: center; justify-items: center; gap: 7px; padding: 24px; color: var(--muted); text-align: center; }
.table-empty strong { color: var(--ink); font-size: 14px; }
.table-empty > span:not(.empty-icon) { max-width: 52ch; font-size: 13px; }
.page-error { display: grid; justify-items: start; gap: 10px; padding: 20px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: var(--radius-md); background: var(--danger-soft); color: var(--danger); }
.page-error p { margin: 0; color: var(--ink-soft); }
.empty-icon { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 3px; border-radius: 50%; background: var(--surface-tint); color: var(--brand-purple); }
.empty-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.request-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.request-filters button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 650; }
.request-filters button:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.request-filters button.active { border-color: var(--brand-purple); background: var(--surface-tint); color: var(--brand-purple); }
.request-id { color: var(--brand-purple); font-weight: 700; font-variant-numeric: tabular-nums; }
.request-id:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Forms, request composition, import */
.selected-product-search { position: relative; }
.product-picker-list { display: grid; max-height: min(350px, 42vh); gap: 4px; margin-top: 9px; padding: 6px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.product-picker-row { display: flex; min-height: 56px; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.product-picker-row:hover { background: var(--surface-soft); }
.product-picker-row:has(input:checked) { background: var(--surface-tint); }
.product-picker-row > span:nth-child(2) { display: grid; min-width: 0; flex: 1; gap: 3px; }
.product-picker-row strong { overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 650; }
.product-picker-row small, .product-picker-status { color: var(--muted); font-size: 12px; }
.product-picker-row input { width: 18px; height: 18px; flex: 0 0 18px; }
.picked-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.picked-product { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; }
.selected-product { margin: 12px 0; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.selected-product h4 { margin: 0 0 12px; color: var(--ink); font-size: 14px; }
.change-row { display: grid; grid-template-columns: minmax(130px, .72fr) minmax(160px, 1fr) minmax(160px, 1fr); gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.change-row > strong { color: var(--ink-soft); font-size: 12px; }
.current-value { min-height: 40px; padding: 9px 10px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.edit-field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.edit-new-value, .edit-images { min-width: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.check-card { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.check-card:hover { border-color: var(--brand-purple); background: var(--surface-soft); }
.check-card input { width: 17px; height: 17px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail-block { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); overflow-wrap: anywhere; }
.detail-block h4 { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.detail-block p { margin: 0; color: var(--ink-soft); font-size: 13px; white-space: pre-wrap; }
.detail-block small { display: block; margin-top: 7px; }
.detail-block details { margin-top: 8px; }
.detail-block summary { color: var(--brand-purple); font-size: 12px; cursor: pointer; }
.variation-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.variation-row h4 { grid-column: 1 / -1; margin: 0; color: var(--ink); font-size: 13px; }
.variation-row .remove-variation { justify-self: end; }
.file-drop { display: grid; min-height: 86px; place-content: center; gap: 7px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-soft); color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.file-drop:hover, .file-drop:focus-within { border-color: var(--brand-purple); background: var(--surface-tint); }
.file-drop input { max-width: 100%; font-size: 12px; }
.import-mapping { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.import-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 16px; }
.import-summary span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; font-weight: 650; }

/* Feedback, timeline, notifications, dialogs */
.notice { margin: 12px 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--info) 22%, var(--line)); border-radius: var(--radius-sm); background: var(--info-soft); color: var(--info); font-size: 13px; line-height: 1.5; }
.notice.warning { border-color: color-mix(in srgb, var(--warning) 28%, var(--line)); background: var(--warning-soft); color: var(--warning); }
.notice.error { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); background: var(--danger-soft); color: var(--danger); }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 16px 20px; border-left: 1px solid var(--line-strong); }
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before { position: absolute; top: 3px; left: -5px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand-purple); box-shadow: 0 0 0 1px var(--brand-purple); content: ""; }
.timeline-item p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.timeline-item small { display: block; margin-top: 4px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row > div { display: grid; gap: 4px; }
.setting-row strong { color: var(--ink); font-size: 13px; font-weight: 650; }
.setting-row small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgb(24 16 30 / 56%); animation: backdrop-in 130ms ease-out both; }
.modal { display: flex; width: min(520px, 100%); max-height: min(88vh, 880px); flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); animation: dialog-in 180ms var(--ease-out) both; }
.modal-backdrop:has(.modal.large) { align-items: stretch; justify-content: flex-end; padding: 0; }
.modal.large { width: min(760px, calc(100vw - 76px)); height: 100dvh; max-height: 100dvh; border-top: 0; border-right: 0; border-bottom: 0; border-radius: 0; animation: drawer-in 210ms var(--ease-out) both; }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 21px 15px; border-bottom: 1px solid var(--line); background: var(--surface); }
.modal-head h2 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 680; letter-spacing: -.02em; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-head .icon-button { color: var(--muted); }
.modal-content { min-height: 0; padding: 19px 21px; overflow: auto; overscroll-behavior: contain; }
.modal-foot { position: sticky; z-index: 2; bottom: 0; display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 13px 21px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.toast-region { position: fixed; z-index: 150; top: 82px; right: 22px; display: grid; width: min(380px, calc(100vw - 32px)); gap: 9px; pointer-events: none; }
.modal-open .toast:not(.error) { display: none; }
.toast { display: flex; min-height: 50px; align-items: center; padding: 13px 16px; border: 1px solid color-mix(in srgb, var(--success) 32%, var(--line)); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--success); box-shadow: var(--shadow-md); font-size: 13px; font-weight: 620; animation: toast-in 160ms var(--ease-out) both; pointer-events: auto; }
.toast.error { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); color: var(--danger); }
.toast.info { border-color: color-mix(in srgb, var(--info) 38%, var(--line)); color: var(--info); }
.notification-list { display: grid; max-height: min(64vh, 540px); overflow: auto; }
.notification-item { display: grid; gap: 4px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: var(--surface-tint); }
.notification-item strong { color: var(--ink); font-size: 13px; font-weight: 680; }
.notification-item p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.notification-item small { color: var(--muted); font-size: 12px; }
.notification-bullet { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-purple); }
.skeleton { position: relative; min-height: 14px; overflow: hidden; border-radius: 4px; background: var(--surface-tint); }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 82%, transparent), transparent); content: ""; animation: shimmer 1.25s ease-in-out infinite; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Collapsed navigation */
:root[data-sidebar-collapsed="true"] .sidebar { width: var(--sidebar-compact); padding-inline: 11px; }
:root[data-sidebar-collapsed="true"] .main-area { margin-left: var(--sidebar-compact); }
:root[data-sidebar-collapsed="true"] .sidebar-brand-row { justify-content: center; margin-inline: 0; }
:root[data-sidebar-collapsed="true"] .navigation-group-label { display: none; }
:root[data-sidebar-collapsed="true"] .brand { justify-content: center; }
:root[data-sidebar-collapsed="true"] .brand-logo-window { flex-basis: 42px; }
:root[data-sidebar-collapsed="true"] .brand-copy,
:root[data-sidebar-collapsed="true"] .workspace-label,
:root[data-sidebar-collapsed="true"] .nav-label,
:root[data-sidebar-collapsed="true"] .nav-count,
:root[data-sidebar-collapsed="true"] .theme-control-label,
:root[data-sidebar-collapsed="true"] .profile-meta { display: none; }
:root[data-sidebar-collapsed="true"] .primary-nav a,
:root[data-sidebar-collapsed="true"] .sidebar-bottom > a,
:root[data-sidebar-collapsed="true"] .theme-control { justify-content: center; gap: 0; padding-inline: 0; }
:root[data-sidebar-collapsed="true"] .primary-nav a.active::before,
:root[data-sidebar-collapsed="true"] .sidebar-bottom > a.active::before { left: -11px; }
:root[data-sidebar-collapsed="true"] .nav-icon { flex-basis: 22px; }
:root[data-sidebar-collapsed="true"] .primary-nav a[data-tooltip]::after,
:root[data-sidebar-collapsed="true"] .sidebar-bottom > a[data-tooltip]::after { position: absolute; z-index: 50; top: 50%; left: calc(100% + 12px); display: block; width: max-content; max-width: 220px; padding: 7px 10px; transform: translate(-4px, -50%); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-md); content: attr(data-tooltip); font-size: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity var(--motion-fast), transform var(--motion-fast); }
:root[data-sidebar-collapsed="true"] .primary-nav a:hover::after,
:root[data-sidebar-collapsed="true"] .primary-nav a:focus-visible::after,
:root[data-sidebar-collapsed="true"] .sidebar-bottom > a:hover::after,
:root[data-sidebar-collapsed="true"] .sidebar-bottom > a:focus-visible::after { transform: translate(0, -50%); opacity: 1; }
:root[data-sidebar-collapsed="true"] .profile-row { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 6px; padding-inline: 0; }
:root[data-sidebar-collapsed="true"] .logout-button { position: static; width: 38px; height: 38px; opacity: 1; }

@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(22px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-in { from { transform: translateY(-5px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Product operations compositions */
.dashboard-section { margin-top: 26px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.section-heading h2, .section-heading h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 680; letter-spacing: -.01em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.attention-panel { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.attention-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: var(--radius-sm); background: var(--surface-tint); color: var(--brand-purple); }
.attention-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.attention-copy h2 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 680; }
.attention-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.attention-actions { display: flex; justify-content: flex-end; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .85fr); gap: 16px; margin-top: 20px; }
.dashboard-rail { display: grid; align-content: start; gap: 12px; }
.queue-panel { min-width: 0; }
.queue-list { display: grid; }
.queue-row { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.queue-row:hover { background: var(--surface-soft); }
.queue-row:last-child { border-bottom: 0; }
.queue-status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 13px; font-weight: 580; }
.queue-row strong { min-width: 28px; color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-purple); box-shadow: 0 0 0 3px var(--surface-tint); }
.status-dot.pending { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.status-dot.completed { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.status-dot.rejected { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.catalog-snapshot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.snapshot-heading { display: flex; min-width: 0; align-items: center; gap: 8px; color: var(--brand-purple); }
.snapshot-heading svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.snapshot-heading h2 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 680; }
.catalog-snapshot > strong { grid-column: 1; color: var(--ink); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.catalog-snapshot > p { grid-column: 1; margin: -4px 0 0; color: var(--muted); font-size: 12px; }
.catalog-snapshot > .text-button { grid-column: 2; grid-row: 2 / span 2; }
.catalog-platform-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px 15px; min-width: 350px; }
.catalog-platform-summary strong { color: var(--ink); font-size: 13px; font-weight: 680; }
.catalog-platform-summary small { color: var(--muted); font-size: 12px; }
.platform-name { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.missing-context { margin: 0; color: var(--muted); font-size: 12px; font-style: italic; }
.organization-price { display: grid; gap: 4px; min-width: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.organization-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 670; }
.platform-price-values { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 12px; }
.platform-price-values strong { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.catalog-product-identity { display: flex; min-width: 180px; align-items: center; gap: 10px; }
.catalog-product-copy, .catalog-product-identity > span:last-child { display: grid; min-width: 0; gap: 3px; }
.product-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-tint); color: var(--brand-purple); font-size: 12px; font-weight: 750; }
.product-avatar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-actions .icon-button { color: var(--muted); }
.row-actions .icon-button:hover { color: var(--brand-purple); }
.conflict-callout { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--line)); border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: 13px; line-height: 1.5; }
.conflict-callout strong { color: var(--ink); }
.conflict-callout p { margin: 4px 0 7px; color: var(--ink-soft); font-size: 12px; }
.conflict-symbol { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); font-weight: 800; }
.detail-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 2px 0 15px; border-bottom: 1px solid var(--line); }
.detail-identity h3 { margin: 0; color: var(--ink); font-size: 17px; font-weight: 680; }
.detail-identity .product-sub { display: block; margin-top: 3px; }
.detail-footnote { margin: 17px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-section { margin-top: 19px; }
.detail-section > h3 { margin: 0 0 10px; color: var(--ink); font-size: 14px; font-weight: 680; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.detail-list dd { min-width: 0; margin: 0; color: var(--ink-soft); font-size: 13px; overflow-wrap: anywhere; }
.price-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.price-group { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.price-group-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 680; }
.price-group-heading > div { display: grid; gap: 2px; }
.price-group-heading h4 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 680; }
.price-group-heading p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 450; }
.platform-mark { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; background: var(--surface-tint); color: var(--brand-purple); font-size: 12px; font-weight: 750; }
.required-label, .optional-label { display: inline-flex; align-items: center; width: fit-content; padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 650; }
.required-label { background: var(--danger-soft); color: var(--danger); }
.optional-label { background: var(--surface-tint); color: var(--muted); }
.request-boundary { margin: 12px 0; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--info) 28%, var(--line)); border-radius: var(--radius-sm); background: var(--info-soft); color: var(--info); font-size: 13px; line-height: 1.5; }
.file-name-list { display: grid; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.sort-indicator { display: inline-block; min-width: 1em; margin-left: 4px; color: var(--brand-purple); text-align: center; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 238px; }
  .page-content { padding-inline: 25px; }
  .topbar { padding-inline: 25px; }
  .source-items-table { min-width: 1000px; }
  .dashboard-lower { grid-template-columns: minmax(0, 1.4fr) minmax(220px, .8fr); }
  .price-groups { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .login-screen { grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); }
  .login-brand-panel { padding: 32px; }
  .login-brand-copy h1 { font-size: 38px; }
  .dashboard-lower { grid-template-columns: 1fr; }
  .dashboard-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .page-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .page-head-actions { width: 100%; }
  .page-head-actions .button { max-width: 100%; }
}
@media (max-width: 680px) {
  :root { --topbar-height: 58px; }
  .login-screen { display: flex; flex-direction: column; min-height: 100vh; background: var(--canvas); }
  .login-brand-panel { min-height: auto; padding: 18px 20px; }
  .login-brand { width: 126px; height: 82px; padding: 8px 12px; }
  .login-brand-copy { display: none; }
  .login-brand-foot { position: absolute; right: 20px; bottom: 20px; font-size: 12px; }
  .login-main { width: 100%; min-height: auto; flex: 1; padding: 35px 22px 20px; }
  .login-card-brand { display: none; }
  .login-intro h2 { font-size: 27px; }
  .login-bottom { margin-top: 26px; }
  .sidebar { z-index: 40; width: min(300px, 86vw); transform: translateX(-105%); padding: 18px 14px; visibility: hidden; box-shadow: var(--shadow-md); transition: transform var(--motion-medium) var(--ease-out), visibility 0s linear var(--motion-medium); }
  .sidebar.open { transform: translateX(0); visibility: visible; transition: transform var(--motion-medium) var(--ease-out), visibility 0s; }
  :root[data-sidebar-collapsed="true"] .sidebar { width: min(300px, 86vw); }
  .main-area, :root[data-sidebar-collapsed="true"] .main-area { margin-left: 0; }
  .sidebar-collapse { display: none; }
  :root[data-sidebar-collapsed="true"] .brand-copy,
  :root[data-sidebar-collapsed="true"] .workspace-label,
  :root[data-sidebar-collapsed="true"] .nav-label,
  :root[data-sidebar-collapsed="true"] .theme-control-label,
  :root[data-sidebar-collapsed="true"] .profile-meta { display: initial; }
  :root[data-sidebar-collapsed="true"] .brand-copy,
  :root[data-sidebar-collapsed="true"] .profile-meta { display: grid; }
  :root[data-sidebar-collapsed="true"] .workspace-label { display: block; }
  :root[data-sidebar-collapsed="true"] .nav-label { display: inline; }
  :root[data-sidebar-collapsed="true"] .nav-count { display: inline-flex; }
  :root[data-sidebar-collapsed="true"] .sidebar .primary-nav a,
  :root[data-sidebar-collapsed="true"] .sidebar .sidebar-bottom > a,
  :root[data-sidebar-collapsed="true"] .sidebar .theme-control { justify-content: flex-start; gap: 12px; padding-inline: 11px; }
  :root[data-sidebar-collapsed="true"] .sidebar .sidebar-brand-row { justify-content: space-between; }
  :root[data-sidebar-collapsed="true"] .sidebar .brand { justify-content: flex-start; }
  :root[data-sidebar-collapsed="true"] .profile-row { justify-content: flex-start; }
  :root[data-sidebar-collapsed="true"] .primary-nav a[data-tooltip]::after,
  :root[data-sidebar-collapsed="true"] .sidebar-bottom > a[data-tooltip]::after { content: none; }
  .mobile-menu { display: inline-grid; margin-left: -8px; }
  .sidebar-collapse { display: none; }
  body.navigation-open { overflow: hidden; }
  .topbar { justify-content: flex-start; gap: 10px; padding-inline: 16px; }
  .breadcrumbs { flex: 1; gap: 7px; margin: 0; }
  .topbar-actions { gap: 6px; margin-left: auto; }
  .topbar-user, .topbar-divider { display: none; }
  .page-content { padding: 23px 15px 38px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 19px; }
  .page-head h1 { font-size: 25px; }
  .page-head-actions .button { width: 100%; }
  .hero-card { min-height: auto; align-items: flex-start; flex-direction: column; gap: 16px; padding: 22px 20px; }
  .hero-card::after { right: -115px; }
  .hero-copy h2 { font-size: 19px; }
  .hero-note { max-width: none; }
  .attention-panel { grid-template-columns: 36px minmax(0, 1fr); align-items: start; padding: 14px; }
  .attention-actions { grid-column: 1 / -1; }
  .attention-actions .button { width: 100%; }
  .action-grid { grid-template-columns: 1fr; gap: 9px; }
  .action-card { min-height: 132px; padding: 15px; }
  .action-icon { margin-bottom: 9px; }
  .stats-row { grid-template-columns: 1fr; gap: 8px; }
  .dashboard-rail { grid-template-columns: 1fr; }
  .catalog-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-groups { grid-template-columns: 1fr; }
  .detail-list > div { grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: 10px; }
  .stat-card { min-height: 60px; }
  .form-grid, .choice-row, .detail-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .variation-row { grid-template-columns: 1fr; }
  .variation-row h4 { grid-column: auto; }
  .change-row { grid-template-columns: 1fr; gap: 7px; }
  .change-row > strong { padding-top: 5px; }
  .product-picker-row { align-items: flex-start; }
  .product-picker-status { display: none; }
  .panel-head { align-items: flex-start; flex-wrap: wrap; padding: 14px; }
  .panel-body { padding: 14px; }
  .toolbar { align-items: stretch; }
  .search-box { max-width: none; flex-basis: 100%; }
  .toolbar > .button, .toolbar > .filter { flex: 1 1 auto; }
  .table-scroll-hint { display: block; }
  .data-table { min-width: 760px; }
  .data-table th, .data-table td { padding-inline: 10px; }
  .data-table thead th:first-child { position: sticky; z-index: 4; left: 0; background: var(--surface-soft); }
  .data-table tbody td:first-child { position: sticky; z-index: 1; left: 0; background: var(--surface); }
  .data-table tbody tr:hover td:first-child { background: var(--surface-soft); }
  .catalog-pagination { align-items: flex-start; flex-direction: column; }
  .catalog-pagination > div { width: 100%; }
  .catalog-pagination .button { flex: 1; }
  .picker-pagination { flex-wrap: wrap; }
  .picker-pagination span { width: 100%; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: min(92vh, 900px); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-backdrop:has(.modal.large) { align-items: stretch; }
  .modal.large { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-head, .modal-content { padding-right: 17px; padding-left: 17px; }
  .modal-foot { padding-right: 17px; padding-left: 17px; }
  .modal-foot .button { flex: 1; }
  .notification-list { max-height: 56vh; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 9px; }
  .toast-region { top: 66px; right: 12px; }
}

/* Shared catalog editing workspace */
.icon { display: block; width: 18px; height: 18px; flex: 0 0 auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.navigation-group-label { margin: 19px 10px 5px; color: var(--nav-muted); font-size: 11px; font-weight: 760; letter-spacing: .12em; }
.primary-nav .navigation-group-label:first-child { margin-top: 5px; }
.catalog-overview { display: flex; align-items: center; gap: 13px; margin: 0 0 17px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.catalog-overview > div { display: grid; gap: 2px; }
.catalog-overview strong { color: var(--ink); font-size: 14px; }
.catalog-overview span:not(.catalog-platform-mark) { color: var(--muted); font-size: 13px; }
.catalog-platform-mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--surface-tint); color: var(--brand-purple); }
.catalog-platform-mark .icon { width: 20px; height: 20px; }
.catalog-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 13px; }
.catalog-toolbar .search-box { flex: 1 1 270px; }
.catalog-filter-group { display: grid; min-width: 170px; gap: 5px; }
.catalog-filter-group .filter-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.catalog-toolbar .field-help { margin-left: auto; }
.catalog-check-filter { display: inline-flex; align-items: center; min-height: 40px; gap: 7px; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.catalog-check-filter input { width: 17px; height: 17px; }
.catalog-table { min-width: 980px; }
.catalog-table th, .catalog-table td { vertical-align: middle; }
.catalog-table td:first-child { min-width: 0; }
.catalog-table td:nth-child(2) { min-width: 0; }
.catalog-table .cell-value { display: flex; width: 100%; min-height: 35px; align-items: center; justify-content: flex-start; gap: 7px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.catalog-table .cell-value:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.catalog-table .cell-value:focus-visible { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
.editable-cell { position: relative; min-width: 0; }
.editable-cell.is-edited { background: color-mix(in srgb, var(--brand-purple) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-purple) 46%, transparent); }
.editable-cell.is-edited .cell-value { color: var(--brand-purple-strong); font-weight: 700; }
.cell-original { display: block; padding: 0 8px 5px; color: var(--muted); font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.edit-mark { display: inline-flex; color: var(--brand-purple); }
.edit-mark .icon { width: 13px; height: 13px; }
.cell-undo { position: absolute; top: 5px; right: 3px; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); opacity: 0; }
.editable-cell:hover .cell-undo, .editable-cell:focus-within .cell-undo { opacity: 1; }
.cell-undo .icon { width: 14px; height: 14px; }
.cell-editor { display: grid; min-width: 200px; gap: 8px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-raised); box-shadow: var(--shadow-md); animation: dialog-in 120ms var(--ease-out) both; }
.cell-editor-input { width: 100%; min-width: 130px; min-height: 36px; padding: 6px 9px; }
.cell-editor-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-target { display: grid; min-width: 130px; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.editor-target .field-select { min-height: 34px; padding: 4px 7px; font-size: 12px; }
.editor-target-fixed { align-self: center; color: var(--muted); font-size: 12px; }
.cell-editor-actions { display: flex; gap: 6px; }
.cell-editor-actions .button { min-height: 31px; }
.presence-cell { min-width: 0; }
.presence-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.presence-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--quiet); }
.presence-dot.present { background: var(--success); }
.presence-dot.unknown { background: var(--warning); }
.presence-toggle { display: flex; width: max-content; align-items: center; gap: 8px; margin-top: 5px; color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.presence-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; width: 34px; height: 19px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-tint); transition: background-color var(--motion-fast), border-color var(--motion-fast); }
.switch-track::after { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); content: ""; transition: transform var(--motion-fast) var(--ease-out); }
.presence-toggle input:checked + .switch-track { border-color: var(--brand-action); background: var(--brand-action); }
.presence-toggle input:checked + .switch-track::after { transform: translateX(15px); }
.presence-toggle input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; }
.presence-toggle input:disabled + .switch-track { opacity: .45; cursor: not-allowed; }
.requested-presence { display: block; margin-top: 5px; color: var(--brand-purple); font-size: 11px; font-weight: 700; }
.removal-staged > td { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.removal-requested-badge { display: inline-flex; width: max-content; margin: 2px 4px; padding: 2px 6px; border-radius: 4px; background: var(--danger-soft); color: var(--danger); font-size: 11px; font-weight: 680; }
.undo-row { color: var(--danger); }
.conflict-text { display: block; max-width: 190px; color: var(--warning); font-size: 11px; }
.catalog-table .row-actions { min-width: 54px; }
.row-remove .icon, .undo-row .icon { width: 17px; height: 17px; }
.catalog-table tr:hover td { background-color: color-mix(in srgb, var(--surface-tint) 28%, var(--surface)); }
.catalog-table tr.removal-staged:hover td { background-color: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
.catalog-table { width: 100%; min-width: 1340px; table-layout: fixed; }
.catalog-table th, .catalog-table td { padding: 8px 9px; }
.catalog-table th:first-child, .catalog-table td.product-identity-cell { position: sticky; left: 0; z-index: 2; width: 250px; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.catalog-table th:first-child { z-index: 4; }
.catalog-table .catalog-col-product { width: 250px; }
.catalog-table .catalog-col-sku { width: 128px; }
.catalog-table .catalog-col-category { width: 142px; }
.catalog-table .catalog-col-price { width: 148px; }
.catalog-table .catalog-col-price-secondary { width: 108px; }
.catalog-table .catalog-col-status { width: 84px; }
.catalog-table .catalog-col-presence { width: 70px; }
.catalog-table .catalog-col-actions { width: 54px; }
.catalog-table .row-actions { position: sticky; right: 0; z-index: 3; width: 54px; background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.catalog-table td.row-actions { display: table-cell; text-align: center; }
.catalog-table th { height: 44px; padding-block: 7px; white-space: nowrap; }
.catalog-table td { height: 54px; padding-block: 6px; }
.catalog-table td.product-identity-cell { min-width: 0; overflow-wrap: anywhere; }
.product-identity-cell { position: relative; }
.product-identity-copy { display: grid; min-width: 0; gap: 3px; }
.identity-row-action { position: absolute; top: 6px; right: 5px; z-index: 3; display: none; }
.identity-row-action .icon-button { width: 30px; height: 30px; }
.action-label { display: none; }
.catalog-table .sku { display: block; max-width: 100%; overflow: hidden; overflow-wrap: normal; text-overflow: ellipsis; white-space: nowrap; }
.catalog-table .editable-cell { min-width: 0; }
.catalog-table .cell-value { min-height: 34px; padding-inline: 5px; font-size: 12px; }
.catalog-table .cell-value:disabled { cursor: not-allowed; opacity: .76; }
.catalog-table .price-pair { display: grid; gap: 4px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.catalog-table .price-pair > span { display: grid; gap: 1px; white-space: normal; }
.catalog-table .price-pair > span > small { color: var(--muted); font-size: 10px; font-weight: 650; }
.catalog-table .price-discrepancy { background: color-mix(in srgb, var(--warning-soft) 65%, var(--surface)); }
.price-conflict-label { display: block; margin: 1px 5px 4px; color: var(--warning); font-size: 10px; font-weight: 700; }
.catalog-table .presence-cell { min-width: 0; text-align: center; }
.table-scroll-hint { display: block; padding: 8px 12px; font-size: 12px; }
.identity-row-action { display: none; }
.presence-check { display: inline-grid; min-width: 36px; min-height: 36px; place-items: center; cursor: pointer; }
.presence-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-purple); }
.presence-check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.requested-presence { margin-inline: auto; max-width: 100px; font-size: 10px; line-height: 1.25; }
.requested-presence.removal-flag { color: var(--danger); }
.catalog-page-buttons { display: flex; align-items: center; gap: 4px; }
.page-number { display: inline-grid; min-width: 34px; min-height: 34px; place-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.page-number:hover:not(:disabled) { border-color: var(--brand-purple); color: var(--brand-purple); }
.page-number.selected { border-color: var(--brand-purple); background: var(--surface-tint); color: var(--brand-purple-strong); }
.page-number:disabled { cursor: not-allowed; opacity: .45; }
.page-number .icon { width: 15px; height: 15px; }
.pagination-ellipsis { padding-inline: 2px; color: var(--muted); }
.page-size-label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.page-size-select { min-height: 32px; padding-block: 3px; }
.removal-choice-list { display: grid; gap: 8px; margin: 12px 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.removal-choice-list legend { padding-inline: 5px; color: var(--ink); font-size: 13px; font-weight: 650; }
.radio-choice { display: flex; align-items: center; gap: 9px; min-height: 34px; color: var(--ink-soft); font-size: 13px; }
.radio-choice input { width: 17px; height: 17px; accent-color: var(--brand-purple); }
.integration-section > .panel-head { align-items: flex-start; }
.integration-section > .panel-head > div { display: grid; gap: 4px; }
.integration-section > .panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 15px; }
.integration-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.integration-card-head { display: flex; align-items: flex-start; gap: 11px; }
.integration-platform-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--brand-purple); }
.integration-platform-icon .icon { width: 21px; height: 21px; }
.integration-card-head > div { min-width: 0; flex: 1; }
.integration-card-head h2 { margin: 1px 0 4px; color: var(--ink); font-size: 16px; }
.integration-card-head p { max-width: 44ch; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.integration-card-head > .status { flex: 0 0 auto; }
.integration-state { display: grid; gap: 4px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.integration-state p { margin: 0; }
.integration-error { color: var(--danger); }
.integration-controls, .integration-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.integration-controls { padding-top: 12px; border-top: 1px solid var(--line); }
.integration-form-host { margin-top: 12px; padding: 13px; border-radius: 8px; background: var(--surface-soft); }
.integration-credentials { display: grid; gap: 10px; }
.integration-credentials > p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.integration-credentials .field-label { gap: 5px; }
.integration-credentials code { overflow-wrap: anywhere; }
.integration-org-select { display: grid; gap: 10px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 780px) { .integration-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 520px) { .integration-card { padding: 13px; } .integration-card-head { flex-wrap: wrap; } .integration-card-head > .status { margin-left: 51px; } .catalog-pagination { gap: 8px; } .catalog-page-buttons { width: 100%; justify-content: center; } }
@media (max-width: 900px) {
  .catalog-table th:first-child, .catalog-table td.product-identity-cell { left: 0; width: 165px; }
  .catalog-pagination { flex-wrap: wrap; }
  .catalog-page-buttons { flex-wrap: wrap; }
}
.draft-action-bar { position: fixed; z-index: 90; right: max(24px, calc((100vw - 1420px) / 2)); bottom: 20px; left: calc(var(--sidebar-width) + max(24px, (100vw - var(--sidebar-width) - 1420px) / 2)); display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 17px; border: 1px solid color-mix(in srgb, var(--brand-gold) 42%, var(--line-strong)); border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: 0 12px 35px rgb(20 13 26 / 22%); animation: drawer-in 170ms var(--ease-out) both; }
.draft-summary { display: flex; min-width: 0; align-items: center; gap: 12px; }
.draft-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--surface-tint); color: var(--brand-purple); }
.draft-summary > div { display: grid; min-width: 0; gap: 1px; }
.draft-summary strong { color: var(--ink); font-size: 14px; }
.draft-summary span:not(.draft-icon) { color: var(--muted); font-size: 12px; }
.draft-bar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.review-summary-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 17px; }
.review-summary-strip span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.review-product-group { margin: 14px 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.review-product-group > h3 { margin: 0 0 8px; color: var(--ink); font-size: 14px; }
.review-operation { padding: 10px 0; border-top: 1px solid var(--line); }
.review-operation-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-operation-main > div { display: grid; gap: 3px; }
.review-operation-main > div > strong { color: var(--ink); font-size: 13px; }
.review-operation-main > div > span, .review-description { color: var(--muted); font-size: 12px; }
.review-description { margin: 8px 0 0; }
.review-value-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 8px; }
.review-value-pair > span { display: grid; gap: 3px; padding: 8px 10px; border-radius: 7px; background: var(--surface-soft); overflow-wrap: anywhere; }
.review-value-pair small { color: var(--muted); font-size: 11px; }
.review-value-pair strong { color: var(--ink); font-size: 13px; font-weight: 650; }
.review-removal { border-radius: 6px; background: color-mix(in srgb, var(--danger) 6%, var(--surface)); padding: 10px; }
.review-notes { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.attachment-list, .file-name-list { display: grid; gap: 6px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.attachment-list > span, .file-name-list > span { display: flex; align-items: center; gap: 6px; }
.attachment-list .icon, .file-name-list .icon { width: 15px; height: 15px; }
.request-boundary { margin: 0 0 15px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--brand-purple) 28%, var(--line)); border-radius: 7px; background: var(--surface-tint); color: var(--ink-soft); font-size: 13px; }
.request-boundary strong { color: var(--ink); }
.variation-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.variation-row legend { padding: 0 5px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.variation-row .field-label { min-width: 0; }

/* Staged add-product flow */
.add-product-form { display: grid; gap: 2px; }
.add-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.add-type-card { position: relative; display: flex; min-height: 88px; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.add-type-card:hover { border-color: var(--brand-purple); background: var(--surface-soft); }
.add-type-card:has(input:checked) { border-color: var(--brand-purple); background: var(--surface-tint); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-purple) 12%, transparent); }
.add-type-card input { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; accent-color: var(--brand-purple); }
.add-type-card > span { display: grid; gap: 5px; }
.add-type-card strong { color: var(--ink); font-size: 13px; }
.add-type-card small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.add-product-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.add-product-form .field-label { min-width: 0; }
.add-product-form .wide { grid-column: 1 / -1; }
.add-product-form .add-prices { width: 100%; margin-top: 8px; }
.add-platform-prices { padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.add-platform-prices > span:first-child { color: var(--ink); font-size: 12px; font-weight: 700; }
.slug-preview-wrap { display: grid; gap: 6px; }
.slug-preview { display: block; overflow-wrap: anywhere; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--brand-purple); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.attribute-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.attribute-choice-grid .check-card { min-width: 0; }
.attribute-choice-grid .check-card span { min-width: 0; display: grid; gap: 4px; }
.attribute-choice-grid .check-card small { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.4; }
.parent-attribute-picker { margin-top: 10px; padding: 0; border: 0; }
.parent-attribute-picker > legend { margin-bottom: 8px; }
.staged-variation-row { display: grid; gap: 14px; margin: 12px 0; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.staged-variation-row > legend { padding: 0 6px; color: var(--ink); font-size: 13px; font-weight: 700; }
.variation-attribute-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.variation-settings { border-top: 1px solid var(--line); padding-top: 11px; }
.variation-settings summary { color: var(--brand-purple); font-size: 12px; font-weight: 700; cursor: pointer; }
.variation-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 12px; }
.variation-prices h4 { grid-column: 1 / -1; margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }
.stock-toggle { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.stock-toggle input { width: 17px; height: 17px; accent-color: var(--brand-purple); }
.variation-image-label { display: grid; gap: 7px; }
.remove-staged-variation { justify-self: end; }
.add-notes { margin-top: 17px; }
@media (max-width: 700px) {
  .add-type-grid { grid-template-columns: 1fr; }
  .add-product-form .form-grid, .variation-prices { grid-template-columns: 1fr; }
  .add-product-form .wide { grid-column: auto; }
  .variation-prices h4 { grid-column: auto; }
  .staged-variation-row { padding: 12px; }
}
.draft-file-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 7px; }
.draft-file-preview { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.draft-file-preview img { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 5px; object-fit: cover; }
.draft-file-preview .icon { width: 22px; height: 22px; color: var(--brand-purple); }
.submitted-operation-group { margin: 12px 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.submitted-operation-group > header { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.submitted-operation-group > header > div { display: grid; gap: 3px; }
.submitted-operation-group h4 { margin: 0; color: var(--ink); font-size: 14px; }
.submitted-operation-group header span:not(.sku) { color: var(--muted); font-size: 12px; }
.submitted-operation { padding: 10px 0; border-bottom: 1px solid var(--line); }
.submitted-operation:last-child { border-bottom: 0; }
.submitted-operation-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); font-size: 13px; }
.operation-type-badge { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.source-identity-row .product-sub { overflow-wrap: anywhere; }
#draft-bar-root .button .icon { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .draft-action-bar { left: calc(var(--sidebar-width) + 18px); right: 18px; }
}
@media (max-width: 680px) {
  .navigation-group-label { margin-top: 12px; }
  .catalog-overview { align-items: flex-start; padding: 12px; }
  .catalog-toolbar { align-items: stretch; }
  .catalog-filter-group { min-width: calc(50% - 7px); flex: 1 1 145px; }
  .catalog-check-filter { min-height: 36px; }
  .draft-action-bar { right: 10px; bottom: 10px; left: 10px; align-items: stretch; flex-direction: column; gap: 10px; padding: 11px; }
  .draft-summary { align-items: flex-start; }
  .draft-bar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .draft-bar-actions #draft-review { grid-column: 1 / -1; grid-row: 1; }
  .review-value-pair { grid-template-columns: 1fr; }
  .cell-editor { position: relative; z-index: 3; min-width: min(260px, 74vw); }
}
@media (prefers-reduced-motion: reduce) {
  .draft-action-bar, .cell-editor { animation: none; }
}
@media (max-width: 380px) {
  .page-content { padding-inline: 12px; }
  .topbar { padding-inline: 12px; }
  .login-main { padding-inline: 17px; }
  .login-bottom { font-size: 12px; }
  .modal-foot { flex-wrap: wrap; }
  .catalog-snapshot { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Teza operations system: precise surfaces, clear labels, and quiet actions. */
html, body { overflow-x: clip; }
body { font-family: var(--type-data); font-size: 14px; line-height: 1.5; }
h1, h2, h3, h4 { text-wrap: balance; }
h1 { font-size: clamp(25px, 2vw, 30px); line-height: 1.2; letter-spacing: -.035em; }
.page-content { padding-top: clamp(24px, 2.7vw, 36px); }
.page-content > .muted, .page-description, .page-content > p { max-width: 72ch; }
.topbar { background: var(--surface); }
.primary-nav a.active::before, .sidebar-bottom > a.active::before { left: 0; width: 3px; }
:root[data-sidebar-collapsed="true"] .primary-nav a.active::before,
:root[data-sidebar-collapsed="true"] .sidebar-bottom > a.active::before { left: 0; }
.status { min-height: 25px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.button, .icon-button, .page-number { touch-action: manipulation; }
.button { min-height: 40px; border-radius: 7px; font-weight: 650; transition: transform var(--motion-fast) var(--ease-out), background-color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:focus-visible, .icon-button:focus-visible, .page-number:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.icon-button { width: 40px; height: 40px; }
.field, .field-select, .field-text, .login-card input { border-radius: 7px; }
.panel, .catalog-overview, .attention-panel, .catalog-snapshot, .integration-card { box-shadow: none; }
.panel-head { min-height: 54px; }
.panel-body { padding: 18px; }
.panel-head h2 { font-size: 16px; letter-spacing: -.015em; }

.catalog-toolbar { align-items: center; gap: 10px; margin-block: 12px 11px; }
.catalog-toolbar .search-box { flex: 1 1 300px; max-width: 520px; }
.catalog-filter-group { min-width: 155px; gap: 4px; }
.catalog-filter-group .filter-label { font-size: 12px; }
.catalog-table-wrap { position: relative; width: 100%; max-height: min(68vh, 760px); overflow: auto; overscroll-behavior: auto; border-top: 1px solid var(--line); }
.catalog-table { width: 100%; min-width: 1360px; table-layout: fixed; font-size: 13px; }
.catalog-table th, .catalog-table td { min-width: 0; padding: 7px 9px; vertical-align: middle; }
.catalog-table th { height: 44px; color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.catalog-table th:first-child { width: 250px; }
.catalog-table th:nth-child(2) { width: 128px; }
.catalog-table th:nth-child(3) { width: 142px; }
.catalog-table th:nth-child(4) { width: 166px; }
.catalog-table th:nth-child(5), .catalog-table th:nth-child(6), .catalog-table th:nth-child(7) { width: 108px; }
.catalog-table th:nth-child(8), .catalog-table th:nth-child(9) { width: 84px; }
.catalog-table th:nth-child(10), .catalog-table th:nth-child(11) { width: 70px; }
.catalog-table th.row-actions, .catalog-table td.row-actions { width: 54px; min-width: 54px; }
.catalog-table td { height: 54px; line-height: 1.35; }
.catalog-table tbody tr:hover td { background-color: color-mix(in srgb, var(--surface-tint) 38%, var(--surface)); }
.catalog-table tbody tr:hover td.product-identity-cell,
.catalog-table tbody tr:hover td.row-actions { background-color: var(--surface-soft); }
.catalog-table th:first-child, .catalog-table td.product-identity-cell { position: sticky; left: 0; z-index: var(--z-sticky); background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.catalog-table th:first-child { z-index: 7; background: var(--surface-soft); }
.catalog-table th.row-actions, .catalog-table td.row-actions { position: sticky; right: 0; z-index: 6; background: var(--surface); box-shadow: -1px 0 0 var(--line); text-align: center; }
.catalog-table th.row-actions { z-index: 7; background: var(--surface-soft); }
.catalog-table td.product-identity-cell { min-width: 0; padding: 7px 12px; overflow: hidden; }
.catalog-table .product-identity-copy { display: grid; min-width: 0; gap: 2px; }
.catalog-table .product-main { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.3; }
.catalog-table .product-sub { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.catalog-table .sku { display: block; max-width: 100%; overflow: hidden; color: var(--ink-soft); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.catalog-table .editable-cell { min-width: 0; padding: 5px 7px; }
.catalog-table .cell-value { position: relative; display: flex; width: 100%; min-width: 0; min-height: 38px; align-items: center; justify-content: flex-start; gap: 6px; padding: 5px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font-size: 13px; text-align: left; }
.catalog-table .cell-value-content { display: block; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.catalog-table .cell-value:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.catalog-table .cell-edit-cue { position: absolute; top: 50%; right: 5px; display: inline-flex; transform: translateY(-50%); color: var(--brand-purple); opacity: 0; transition: opacity var(--motion-fast); pointer-events: none; }
.catalog-table .cell-edit-cue .icon { width: 14px; height: 14px; }
.catalog-table .cell-value:hover .cell-edit-cue, .catalog-table .cell-value:focus-visible .cell-edit-cue { opacity: .92; }
.catalog-table .cell-value .edit-mark { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); padding: 2px; border-radius: 3px; background: var(--surface-tint); }
.catalog-table .editable-cell.is-edited .cell-edit-cue { display: none; }
.catalog-table .cell-value:disabled { cursor: not-allowed; opacity: .78; }
.catalog-table .price { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.catalog-table .missing-price, .catalog-table .source-missing { font-size: 12px; }
.catalog-table .price-pair { display: grid; gap: 3px; }
.catalog-table .price-pair > span { display: grid; min-width: 0; grid-template-columns: 30px 1fr; align-items: baseline; gap: 4px; white-space: nowrap; }
.catalog-table .price-pair > span > small { color: var(--muted); font-size: 10px; line-height: 1.2; }
.catalog-table .price-pair .price { font-size: 12px; line-height: 1.25; }
.catalog-table .price-discrepancy { background: color-mix(in srgb, var(--warning-soft) 54%, var(--surface)); }
.price-conflict-label { display: block; width: max-content; max-width: 100%; overflow: hidden; margin: 0 5px; color: var(--warning); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.catalog-table .shared-price-cell.is-edited .cell-original { padding-inline: 5px; font-size: 11px; }
.catalog-table .status-cell .cell-value { justify-content: center; }
.catalog-table .status { min-width: 58px; }
.catalog-table .presence-cell { min-width: 0; padding-inline: 4px; text-align: center; }
.catalog-table .presence-check { display: inline-grid; min-width: 40px; min-height: 40px; place-items: center; }
.catalog-table .presence-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-purple); }
.catalog-table .requested-presence { margin: 0; max-width: 100%; font-size: 10px; line-height: 1.2; }
.catalog-table .cell-undo { z-index: 2; width: 30px; height: 30px; }
.catalog-table .cell-original { color: var(--muted); font-size: 11px; }
.catalog-table .removal-staged > td { background: color-mix(in srgb, var(--danger-soft) 65%, var(--surface)); }
.catalog-table .removal-staged > td.product-identity-cell, .catalog-table .removal-staged > td.row-actions { background: color-mix(in srgb, var(--danger-soft) 65%, var(--surface)); }
.catalog-table .row-actions .icon-button { width: 38px; height: 38px; margin-inline: auto; color: var(--danger); }
.catalog-table .row-actions .icon-button .action-label { display: none; }
.sort-button { display: inline-flex; min-height: 32px; align-items: center; gap: 4px; padding: 3px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; white-space: nowrap; }
.sort-button:hover { color: var(--brand-purple); }
.table-scroll-hint { padding: 8px 12px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.catalog-pagination { min-height: 56px; padding: 9px 12px; background: var(--surface); }
.catalog-page-buttons { gap: 4px; }
.catalog-page-buttons .page-number { min-width: 36px; min-height: 36px; }
.draft-action-bar { z-index: var(--z-draft-bar); right: clamp(16px, 2vw, 28px); bottom: max(16px, env(safe-area-inset-bottom)); left: calc(var(--sidebar-width) + clamp(16px, 2vw, 28px)); min-height: 64px; padding: 9px 13px; border-color: var(--line-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 8px 26px rgb(26 16 34 / 18%); }
:root[data-sidebar-collapsed="true"] .draft-action-bar { left: calc(var(--sidebar-compact) + clamp(16px, 2vw, 28px)); }
.draft-summary { gap: 9px; }
.draft-icon { width: 34px; height: 34px; }
.draft-bar-actions { gap: 6px; }
.draft-bar-actions .button { min-height: 38px; }
body:has(#draft-bar-root .draft-action-bar) .page-content { padding-bottom: 128px; }
body:has(#draft-bar-root .draft-action-bar) .catalog-table-wrap { max-height: calc(min(68vh, 760px) - 84px); }
.catalog-editor-portal { position: fixed; z-index: var(--z-popover); top: 0; left: 0; width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; padding: 12px; border-color: var(--line-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 12px 32px rgb(25 15 32 / 24%); }
.catalog-editor-portal .cell-editor-input { min-height: 42px; font-size: 14px; }
.catalog-editor-portal .field-label { gap: 5px; }
.catalog-editor-portal .field-help { margin: 0; font-size: 12px; line-height: 1.45; }
.catalog-editor-portal .editor-target-fixed { justify-self: start; padding: 4px 7px; border-radius: 5px; background: var(--surface-tint); color: var(--brand-purple-strong); font-size: 12px; font-weight: 650; }
.catalog-editor-portal .cell-editor-actions { justify-content: flex-end; padding-top: 4px; }
.catalog-editor-portal .cell-editor-actions .button { min-height: 36px; }
.catalog-pagination select { min-height: 36px; }

@media (max-width: 1100px) {
  .catalog-table-wrap { max-height: 62vh; }
  body:has(#draft-bar-root .draft-action-bar) .catalog-table-wrap { max-height: calc(62vh - 84px); }
  .draft-action-bar { left: calc(var(--sidebar-width) + 14px); right: 14px; }
  :root[data-sidebar-collapsed="true"] .draft-action-bar { left: calc(var(--sidebar-compact) + 14px); }
}
@media (max-width: 780px) {
  .page-content { padding: 22px 18px 48px; }
  .catalog-toolbar { align-items: stretch; }
  .catalog-toolbar .search-box { flex-basis: 100%; max-width: none; }
  .catalog-table-wrap { max-height: 58vh; }
  body:has(#draft-bar-root .draft-action-bar) .catalog-table-wrap { max-height: calc(58vh - 140px); }
  .catalog-pagination { align-items: flex-start; }
  .catalog-pagination > span { line-height: 2.6; }
  body:has(#draft-bar-root .draft-action-bar) .page-content { padding-bottom: 200px; }
  .draft-action-bar { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; min-height: auto; align-items: stretch; flex-direction: column; gap: 8px; padding: 10px; }
  .draft-summary { align-items: center; }
  .draft-summary > div { gap: 0; }
  .draft-summary strong { font-size: 13px; }
  .draft-summary span:not(.draft-icon) { font-size: 12px; }
  .draft-bar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .draft-bar-actions #draft-review { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 520px) {
  .page-content { padding-inline: 14px; }
  .catalog-overview { margin-bottom: 12px; }
  .table-scroll-hint { font-size: 12px; }
  .catalog-table { min-width: 1360px; }
  .catalog-table-wrap { max-height: 54vh; }
  body:has(#draft-bar-root .draft-action-bar) .catalog-table-wrap { max-height: calc(54vh - 140px); }
  .catalog-pagination { gap: 8px; }
  .catalog-page-buttons { width: 100%; overflow-x: auto; justify-content: flex-start; padding-block: 2px; }
  .draft-action-bar { right: 10px; left: 10px; }
  body:has(#draft-bar-root .draft-action-bar) .page-content { padding-bottom: 205px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-editor-portal { animation: none; }
}

/* Catalog columns share the available desktop width, with a scroll region on smaller screens. */
.page-head.compact { align-items: center; flex-direction: row; gap: 12px; margin-bottom: 16px; }
.page-head.compact .page-head-actions { width: auto; }
.catalog-toolbar { align-items: center; margin-block: 0 10px; }
.catalog-toolbar .search-box, .catalog-filter-group .field-select { min-height: 40px; }
.catalog-table { min-width: 910px; }
.catalog-table col.catalog-col-product, .catalog-table th:first-child { width: 21%; }
.catalog-table col.catalog-col-sku, .catalog-table th:nth-child(2) { width: 10%; }
.catalog-table col.catalog-col-category, .catalog-table th:nth-child(3) { width: 7%; }
.catalog-table col.catalog-col-price, .catalog-table th:nth-child(4) { width: 11%; }
.catalog-table col.catalog-col-price-secondary, .catalog-table th:nth-child(n+5):nth-child(-n+7) { width: 8%; }
.catalog-table col.catalog-col-status, .catalog-table th:nth-child(n+8):nth-child(-n+9) { width: 7%; }
.catalog-table col.catalog-col-presence, .catalog-table th:nth-child(n+10):nth-child(-n+11) { width: 4%; }
.catalog-table col.catalog-col-actions { width: 42px; }
.catalog-table th.row-actions, .catalog-table td.row-actions { display: table-cell; width: auto; min-width: 0; }
.catalog-table th, .catalog-table td { padding-inline: 5px; text-align: center; }
.catalog-table th.row-actions, .catalog-table td.row-actions { padding-inline: 0; }
.catalog-table th:first-child, .catalog-table td.product-identity-cell { text-align: start; }
.catalog-table th { height: 38px; white-space: normal; line-height: 1.2; }
.catalog-table thead { position: relative; z-index: 8; transform: translateY(var(--catalog-header-offset, 0px)); }
.catalog-table thead th { top: auto; }
.catalog-table td { height: 42px; padding-block: 3px; }
.catalog-table td.product-identity-cell { padding-inline: 9px; }
.catalog-table .editable-cell { padding: 3px; }
.catalog-table .cell-value { min-height: 30px; padding: 3px 4px; }
.catalog-table .cell-value:disabled { cursor: default; }
.catalog-table .price-pair { gap: 1px; }
.catalog-table .price-pair > span { grid-template-columns: 27px minmax(0, 1fr); column-gap: 3px; }
.catalog-table .price-pair > span .price { text-align: center; }
.catalog-table .price-pair > span { max-width: max-content; margin-inline: auto; }
.catalog-table .price-conflict-label { margin-inline: auto; }
.catalog-table .price-pair > span > small, .price-conflict-label, .catalog-table .requested-presence { font-size: 11px; }
.catalog-table .price { white-space: nowrap; }
.catalog-table .presence-check { min-width: 32px; min-height: 33px; cursor: pointer; }
.catalog-table .presence-check:has(input:enabled:hover) { border-radius: 6px; background: var(--surface-tint); }
.catalog-table .presence-check:has(input:disabled) { cursor: default; }
.catalog-table .presence-cell.is-edited .presence-check { color: var(--brand-purple); }
.catalog-table .presence-check input:indeterminate { accent-color: var(--muted); }
.catalog-table .row-actions .icon-button { width: 34px; height: 34px; }
.table-sort { display: inline-flex; align-items: center; min-height: 30px; gap: 4px; padding: 2px 0; border: 0; background: transparent; font-weight: inherit; text-align: left; }
.table-sort .icon { width: 12px; height: 12px; flex: 0 0 12px; }
.table-sort:hover, th[aria-sort] .table-sort { color: var(--brand-purple-strong); }
.catalog-scroll-note { display: none; }
.form-section-title > div { min-width: 0; }

/* The draft occupies its own row, leaving the entire workspace above it usable. */
.main-area:has(.draft-action-bar) { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
.main-area:has(.draft-action-bar) .topbar, #draft-bar-root { flex: 0 0 auto; }
body:has(#draft-bar-root .draft-action-bar) .page-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding-bottom: 24px; }
#draft-bar-root:not(:empty) { z-index: var(--z-draft-bar); padding: 8px clamp(12px, 2vw, 28px) max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--canvas); }
#draft-bar-root .draft-action-bar { position: static; margin-inline: auto; max-width: 1420px; min-height: 54px; transform: none; box-shadow: none; }
body:has(#draft-bar-root .draft-action-bar) .catalog-table-wrap { max-height: none; }
.catalog-table-wrap { max-height: none; }
.catalog-page-buttons { flex-wrap: wrap; }

@media (max-width: 1279px) {
  .catalog-scroll-note { display: inline; }
}
@media (max-width: 780px) {
  .catalog-toolbar .search-box { flex: 1 1 100%; }
  .catalog-table col.catalog-col-product, .catalog-table th:first-child { width: 155px; }
  .catalog-table-wrap { scroll-padding-inline: 160px 48px; }
  #draft-bar-root .draft-action-bar { gap: 5px; padding: 6px 8px; }
  #draft-bar-root .draft-icon { display: none; }
  #draft-bar-root .draft-bar-actions { display: flex; flex-wrap: wrap; }
  #draft-review { margin-left: auto; }
}
@media (max-width: 520px) {
  .catalog-toolbar .catalog-filter-group { flex: 1 1 auto; min-width: 125px; }
  .modal:has(.add-product-form) .modal-content { padding-block: 14px; }
  .add-product-form .add-type-grid { gap: 7px; }
  .add-product-form .add-type-card { min-height: 0; padding: 10px 12px; }
  #draft-bar-root .draft-summary span:not(.draft-icon) { display: none; }
  #draft-bar-root .draft-bar-actions .button { padding-inline: 7px; font-size: 11px; }
  #draft-bar-root .draft-bar-actions #draft-review .icon { display: none; }
}

.catalog-table .status { min-width: 0; padding-inline: 5px; font-size: 11px; }
.catalog-table .price { font-size: 12px; }
.catalog-table .editable-cell .cell-value { padding-inline: 2px; }
.catalog-table .editable-cell .cell-value { text-align: center; }
.catalog-table .cell-original del, .catalog-table del.cell-original .price { color: var(--muted); text-decoration: line-through; }
.catalog-table .cell-original .price { font-size: 11px; font-weight: 550; }
.catalog-table .cell-value:has(.price) .cell-edit-cue,
.catalog-table .cell-value:has(.status) .cell-edit-cue { display: none; }
.catalog-table .cell-value:disabled:hover { border-color: transparent; background: transparent; }
.catalog-table .sku { white-space: nowrap; text-overflow: ellipsis; }
.catalog-table th:nth-child(3) { white-space: nowrap; }
.catalog-table .cell-original:not(.price-pair) { padding: 0 2px 3px; }
.topbar .breadcrumbs { flex: 1 1 auto; }
.page-head h1[tabindex="-1"]:focus { outline: none; }

.add-wizard-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); list-style: none; }
.add-wizard-progress li { display: flex; align-items: center; gap: 6px; padding: 5px; color: var(--muted); font-size: 12px; line-height: 1.25; }
.add-wizard-progress li > span { display: grid; flex: 0 0 20px; height: 20px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-weight: 700; }
.add-wizard-progress li[aria-current="step"] { color: var(--ink); font-weight: 700; }
.add-wizard-progress li[aria-current="step"] > span { border-color: var(--brand-purple); background: var(--surface-tint); color: var(--brand-purple-strong); }
.add-wizard-progress li[data-completed] > span { color: var(--brand-purple-strong); }
.add-wizard-panel { display: grid; gap: 12px; }
.add-wizard-panel > h3 { margin: 0; color: var(--ink); font-size: 16px; }
.add-wizard-panel > .form-section { margin: 0; }
.add-wizard-panel > fieldset > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.review-remove-button { flex-shrink: 0; color: var(--danger); }
.review-value-pair del { color: var(--muted); font-size: 13px; }
@media (max-width: 520px) {
  .add-wizard-progress li { gap: 4px; padding-inline: 0; }
}
