@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --font-sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 14px;
  --text-base: 15px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 40px;
  --text-display-workspace: clamp(34px, 4vw, 48px);
  --text-display-hero: clamp(38px, 4.7vw, 58px);
  --text-display-page: clamp(40px, 5vw, 68px);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --leading-tight: 1.1;
  --leading-heading: 1.2;
  --leading-ui: 1.35;
  --leading-body: 1.5;
  --leading-relaxed: 1.6;
  --tracking-tight: -0.04em;
  --tracking-heading: -0.02em;
  --tracking-label: 0.045em;
  --tracking-wide: 0.08em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --control-height-sm: 40px;
  --control-height-md: 44px;
  --control-height-lg: 48px;
  --control-padding-block: var(--space-2);
  --control-padding-inline: var(--space-3);
  --icon-control-size: 44px;
  --card-padding: var(--space-5);
  --panel-padding: var(--space-6);
  --dialog-padding-inline: var(--space-7);
  --section-gap: var(--space-6);
  --page-gutter: clamp(24px, 4vw, 56px);
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 220ms;
  --ease-ui: cubic-bezier(.2, .8, .2, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);

  --color-canvas: #f2f1ec;
  --color-surface-1: #f9f8f4;
  --color-surface-2: #ffffff;
  --color-surface-3: #e9e8e1;
  --color-surface-hover: #e3e2da;
  --color-text: #171813;
  --color-text-muted: #66685f;
  --color-text-subtle: #62655c;
  --color-border: #d5d5cd;
  --color-border-strong: #bfc0b7;
  --color-accent: #f05b36;
  --color-accent-action: #c94323;
  --color-accent-hover: #b53b20;
  --color-accent-soft: #ffe5dc;
  --color-link: #9f3219;
  --color-on-accent: #ffffff;
  --color-success: #276f50;
  --color-success-soft: #dceee4;
  --color-warning: #8b5a11;
  --color-warning-soft: #f7e7c6;
  --color-danger: #b43d44;
  --color-danger-soft: #f8dde0;
  --color-info: #3569a8;

  --bg: var(--color-canvas);
  --surface: var(--color-surface-1);
  --surface-strong: var(--color-surface-2);
  --surface-muted: var(--color-surface-3);
  --surface-hover: var(--color-surface-hover);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --subtle: var(--color-text-subtle);
  --border: var(--color-border);
  --border-strong: var(--color-border-strong);
  --accent: var(--color-accent);
  --accent-action: var(--color-accent-action);
  --accent-action-hover: var(--color-accent-hover);
  --accent-hover: var(--color-accent-hover);
  --accent-soft: var(--color-accent-soft);
  --accent-text: var(--color-link);
  --accent-strong: var(--color-link);
  --accent-button-text: var(--color-on-accent);
  --accent-contrast: var(--color-on-accent);
  --success: var(--color-success);
  --success-soft: var(--color-success-soft);
  --warning: var(--color-warning);
  --warning-soft: var(--color-warning-soft);
  --danger: var(--color-danger);
  --danger-soft: var(--color-danger-soft);
  --sidebar: #11130f;
  --sidebar-soft: #1a1d17;
  --sidebar-border: #2b2e26;
  --sidebar-text: #f4f3ed;
  --sidebar-muted: #969a8e;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-overlay: 0 18px 55px rgba(25, 25, 20, 0.12), 0 2px 8px rgba(25, 25, 20, 0.08);
  --shadow-raised: var(--shadow-overlay);
  --shadow-card: 0 8px 24px rgba(21, 22, 18, 0.07);
  --shadow-panel: 0 16px 42px rgba(21, 22, 18, 0.055);
  --shadow-drawer: -28px 0 70px rgba(7, 8, 6, 0.28);
  --hero-border: #2d3028;
  --hero-block-min-height: 240px;
  --hero-block-padding: 24px;
  --hero-title-size: clamp(36px, 3.8vw, 48px);
  --hero-title-slot-height: 108px;
  --hero-kpi-min-height: 112px;
  --hero-kpi-padding: 12px 14px;
  --hero-kpi-label-height: 2.5em;
  --hero-kpi-value-size: var(--text-2xl);
  --hero-glow-accent-color: var(--color-accent);
  --hero-glow-secondary-color: #5e7d52;
  --hero-glow-accent: color-mix(in srgb, var(--hero-glow-accent-color) 4%, transparent);
  --hero-glow-secondary: color-mix(in srgb, var(--hero-glow-secondary-color) 4%, transparent);
  --hero-base-surface: linear-gradient(135deg, #10120f 0%, #171a14 56%, #211c15 100%);
  --hero-surface-legacy:
    radial-gradient(circle at 76% 18%, rgba(240, 91, 54, 0.2), transparent 27%),
    radial-gradient(circle at 96% 110%, rgba(94, 125, 82, 0.2), transparent 34%),
    var(--hero-base-surface);
  --hero-decor:
    radial-gradient(circle at 18% -8%, var(--hero-glow-accent), transparent 38%) 0 0 / auto auto no-repeat,
    radial-gradient(circle at 88% 112%, var(--hero-glow-secondary), transparent 42%) 0 0 / auto auto no-repeat;
  --hero-surface:
    var(--hero-decor),
    var(--hero-base-surface) 0 0 / auto auto no-repeat;
  --hero-text: #f4f3ed;
  --hero-muted: #a9ada0;
  --hero-kicker: #ff9b82;
  --hero-shadow: 0 22px 58px rgba(17, 19, 15, 0.12);
  --hero-watermark-top: -18px;
  --hero-watermark-right: 24px;
  --hero-watermark-color: rgba(255, 255, 255, .035);
  --hero-watermark-size: clamp(88px, 10vw, 128px);
  --hero-watermark-weight: 900;
  --hero-watermark-tracking: -.075em;
  --component-accent: var(--accent);
  --card-border: var(--border-strong);
  --card-surface: var(--surface-strong);
  --card-surface-accented:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 96%, var(--component-accent) 4%), var(--surface));
  --card-inner-surface: color-mix(in srgb, var(--surface) 78%, transparent);
  --panel-border: var(--border-strong);
  --panel-surface: var(--surface-strong);
  --table-head-surface: var(--surface-muted);
  --dialog-chrome-bg: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  --backdrop-popover: rgba(9, 10, 8, 0.42);
  --backdrop-modal: rgba(10, 11, 9, 0.72);
  --backdrop-blur: blur(4px);
  --focus-color: var(--color-accent);
  --focus-ring: 0 0 0 3px rgba(240, 91, 54, 0.22);
  --focus: var(--focus-ring);
  --focus-outline: 2px solid var(--focus-color);
  --focus-offset: 2px;
  --focus-inset-offset: -2px;
  --focus-error-ring: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
  --control-disabled-action-opacity: .58;
  --control-disabled-field-opacity: .68;
  --state-neutral-bg: var(--surface-muted);
  --state-neutral-text: var(--muted);
  --state-neutral-border: var(--border);
  --state-accent-bg: var(--accent-soft);
  --state-accent-text: var(--accent-text);
  --state-accent-border: color-mix(in srgb, var(--accent) 30%, var(--border));
  --state-success-bg: var(--success-soft);
  --state-success-text: var(--success);
  --state-success-border: color-mix(in srgb, var(--success) 28%, var(--border));
  --state-warning-bg: var(--warning-soft);
  --state-warning-text: var(--warning);
  --state-warning-border: color-mix(in srgb, var(--warning) 28%, var(--border));
  --state-danger-bg: var(--danger-soft);
  --state-danger-text: var(--danger);
  --state-danger-border: color-mix(in srgb, var(--danger) 28%, var(--border));
  --danger-action-hover: color-mix(in srgb, var(--danger) 86%, #000);
  --select-control-bg: var(--surface-strong);
  --select-control-bg-hover: color-mix(in srgb, var(--surface-strong) 82%, var(--surface-hover));
  --select-control-border: var(--border-strong);
  --select-control-arrow: var(--muted);
  --select-control-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171813' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --select-control-divider: var(--border);
  --select-control-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent), 0 1px 2px rgba(17, 19, 15, .045);
}

/* Unified workspace presentation — cards, lists, summary metrics and BD forms. */
.workspace-view-toggle,
.psp-network-view-toggle {
  display: inline-flex;
  min-width: max-content;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.workspace-view-toggle-button,
.psp-network-view-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
}

.workspace-view-toggle-button:hover:not(:disabled),
.psp-network-view-button:hover:not(:disabled) {
  color: var(--text);
}

.workspace-view-toggle-button.is-active,
.workspace-view-toggle-button[aria-pressed="true"],
.psp-network-view-button[aria-pressed="true"] {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .1);
}

.workspace-view-toggle-button:focus-visible,
.psp-network-view-button:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  box-shadow: var(--focus-ring);
}

.workspace-view-toggle-button:disabled,
.psp-network-view-button:disabled {
  opacity: var(--control-disabled-action-opacity);
  cursor: not-allowed;
}

.psp-network-view-toggle {
  align-self: end;
  justify-self: end;
}

.psp-network-list {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.psp-network-list[hidden] {
  display: none;
}

.psp-network-list-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1.05fr) minmax(420px, 2fr) minmax(160px, auto);
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 19px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-surface-accented);
  box-shadow: var(--shadow-card);
}

.psp-network-list-row[hidden] {
  display: none;
}

.psp-network-list-identity {
  min-width: 0;
}

.psp-network-list-identity .eyebrow {
  margin: 0 0 4px;
}

.psp-network-list-identity h4 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psp-network-list-identity > p:last-child {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.psp-network-list-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.psp-network-list-summary .psp-network-card-field {
  min-height: 58px;
  padding: 8px 9px;
}

.psp-network-list-status {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 9px;
}

.psp-network-list-open {
  min-width: 112px;
  min-height: 42px;
}

.psp-reference-form,
.psp-search-priority-form {
  background: var(--surface-strong);
}

.psp-reference-form-field input,
.psp-reference-form-field select,
.psp-search-priority-field input,
.psp-search-priority-field select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding-block: 12px;
  padding-inline: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  line-height: 1.4;
}

.psp-reference-form-field select,
.psp-search-priority-field select {
  padding-inline-end: 44px;
}

.psp-reference-form-field input:focus-visible,
.psp-reference-form-field select:focus-visible,
.psp-search-priority-field input:focus-visible,
.psp-search-priority-field select:focus-visible {
  border-color: var(--focus-color);
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  box-shadow: var(--focus-ring);
}

.psp-search-priority-form {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.psp-search-priority-form-header {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.psp-search-priority-form-header .sheet-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--accent-text);
  font-size: 21px;
}

.psp-search-priority-form-header .eyebrow {
  margin: 0 0 5px;
}

.psp-search-priority-form-header h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: var(--tracking-heading);
}

.psp-search-priority-form-header p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.psp-search-priority-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}

.psp-search-priority-field {
  min-width: 0;
  margin: 0;
}

.psp-search-priority-submit {
  display: flex;
  align-items: end;
}

.psp-search-priority-submit .primary-button {
  width: 100%;
  min-height: 44px;
}

@media (max-width: 1120px) {
  .psp-network-list-row { grid-template-columns: minmax(190px, .8fr) minmax(360px, 1.6fr) minmax(145px, auto); }
  .psp-search-priority-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .psp-network-list-row { grid-template-columns: 1fr; gap: 12px; }
  .psp-network-list-status { grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
  .psp-network-list-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .psp-search-priority-form { padding: 18px; }
  .psp-search-priority-fields { grid-template-columns: 1fr; }
  .psp-search-priority-submit .primary-button { width: 100%; }
  .psp-network-view-toggle { width: 100%; justify-self: stretch; }
  .psp-network-view-button { flex: 1; }
}

@media (max-width: 520px) {
  .psp-search-priority-form-header { grid-template-columns: 1fr; }
  .psp-network-list-summary { grid-template-columns: 1fr; }
  .psp-network-list-status { grid-template-columns: 1fr; }
  .psp-network-list-open { width: 100%; }
}

/* Organization people administration */
.people-admin-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: var(--hero-block-min-height);
  margin-top: 20px;
  padding: var(--hero-block-padding);
  overflow: hidden;
  border: 1px solid var(--hero-border);
  border-radius: var(--radius-lg);
  background: var(--hero-surface);
  color: var(--hero-text);
  box-shadow: var(--hero-shadow);
}
.people-admin-hero > :first-child { display: grid; align-self: stretch; align-content: center; }
.people-admin-hero::after {
  content: "ADMIN";
  position: absolute;
  z-index: -1;
  top: var(--hero-watermark-top);
  right: var(--hero-watermark-right);
  color: var(--hero-watermark-color);
  font-family: var(--font-sans);
  font-size: var(--hero-watermark-size);
  font-weight: var(--hero-watermark-weight);
  letter-spacing: var(--hero-watermark-tracking);
  line-height: 1;
  pointer-events: none;
}
.people-admin-hero h2 { margin: 4px 0 10px; font-size: var(--hero-title-size); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.people-admin-hero p:last-child { max-width: 620px; margin: 0; color: var(--hero-muted); font-size: 15px; }
.people-admin-hero .eyebrow { color: var(--hero-kicker); }
.people-admin-hero .primary-button { position: relative; z-index: 1; flex: 0 0 auto; }
.people-admin-hero--unavailable { min-height: 156px; }
.people-admin-workspace-state { margin-top: 14px; }
.people-admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.people-admin-metrics .schedule-summary-card { border: 0; border-right: 1px solid var(--border); border-radius: 0; }
.people-admin-metrics .schedule-summary-card:last-child { border-right: 0; }
.people-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.72fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.people-admin-toolbar .field { margin: 0; }
.people-result-count { align-self: center; min-width: 72px; color: var(--subtle); font-size: 12px; text-align: right; }
.people-admin-list { display: grid; gap: 10px; margin-top: 12px; }
.people-admin-list-state { margin: 0; }
.people-admin-form-feedback { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: var(--text-sm); }
.people-admin-validation-message {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--state-danger-text);
  background: var(--state-danger-bg);
  color: var(--state-danger-text);
}
.people-admin-form-state { margin: 0; }
.person-admin-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 98px;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-surface);
  box-shadow: var(--shadow-card);
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}
.person-admin-row:hover { border-color: var(--border-strong); background: var(--surface-strong); transform: translateY(-1px); }
.person-admin-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: var(--surface-muted);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
}
.person-admin-avatar.large { width: 58px; height: 58px; border-radius: 18px; font-size: 15px; }
.person-admin-identity { min-width: 0; }
.person-admin-name-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person-admin-name-line h3 { margin: 0; font-size: var(--text-lg); letter-spacing: var(--tracking-heading); }
.person-admin-identity > p { margin: 3px 0 9px; color: var(--muted); }
.person-role-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.person-role-chip {
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-role-chip.is-muted { opacity: 0.55; text-decoration: line-through; }
.person-status { font-size: 10px; letter-spacing: 0.025em; }
.person-status.is-active { background: var(--state-success-bg); color: var(--state-success-text); box-shadow: inset 0 0 0 1px var(--state-success-border); }
.person-status.is-suspended { background: var(--state-warning-bg); color: var(--state-warning-text); box-shadow: inset 0 0 0 1px var(--state-warning-border); }
.person-status.is-inactive { background: var(--state-danger-bg); color: var(--state-danger-text); box-shadow: inset 0 0 0 1px var(--state-danger-border); }
.person-admin-row-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.person-edit-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; }
.person-edit-button svg { display: block; margin: 0; }
.super-admin-chip {
  border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
  background: color-mix(in srgb, var(--warning) 13%, var(--surface));
  color: var(--warning-strong, var(--text));
}
.password-warning { color: var(--warning); font-size: 11px; font-weight: 650; }
.person-open-button { min-width: 100px; }
.person-admin-drawer {
  width: min(740px, 92vw);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-drawer);
}
.person-admin-drawer::backdrop { background: var(--backdrop-modal); backdrop-filter: var(--backdrop-blur); }
.person-drawer-content { display: flex; height: 100%; min-height: 0; flex-direction: column; overflow-y: auto; padding: clamp(22px, 4vw, 38px); }
.person-drawer-header { display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px; gap: 15px; align-items: center; }
.person-drawer-header h2 { margin: 2px 0; font-size: var(--text-display-workspace); letter-spacing: var(--tracking-heading); }
.person-drawer-header p { margin: 0; color: var(--muted); }
.icon-close-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
}
.icon-close-button:hover { background: var(--surface-hover); color: var(--text); }
.person-drawer-status-line { display: flex; align-items: center; gap: 10px; margin: 24px 0 30px; padding: 13px 0; border-block: 1px solid var(--border); }
.quiet-note { color: var(--subtle); font-size: 11px; }
.person-drawer-section { flex: 1; }
.section-title-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title-line h3 { margin: 0; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.section-title-line span { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 11px; }
.person-drawer-assignments { display: grid; gap: 10px; }
.person-assignment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}
.assignment-department-label { margin: 0 0 3px; color: var(--accent-text) !important; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.person-assignment-card h3 { margin: 0; font-size: 16px; }
.person-assignment-card p { margin: 5px 0 0; color: var(--muted); }
.person-assignment-side { display: grid; justify-items: end; align-content: space-between; gap: 12px; }
.person-assignment-actions { display: flex; gap: 6px; }
.person-assignment-actions button { min-height: 38px; padding: 8px 11px; }
.person-assignment-feedback:empty { display: none; }
.people-admin-assignment-feedback:not(:empty) { margin-top: var(--space-3); }
.person-assignment-feedback { grid-column: 1 / -1; }
.person-assignment-feedback:not(:empty) { margin-top: 0; }
.people-admin-assignment-state { border: 1px solid color-mix(in srgb, var(--state-kit-tone) 16%, var(--border)); }
.person-drawer-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.compact-permission-list {
  display: grid;
  gap: 18px;
  max-height: min(52vh, 520px);
  padding: 2px 8px 2px 2px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.admin-permissions-section { margin-top: 22px; }
.admin-permission-dialog { max-height: 90dvh; overflow: hidden; }
.schedule-dialog .admin-permission-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(94vw, 760px);
  max-height: 90dvh;
  min-height: 0;
  padding: 0;
}
.admin-permission-form > .dialog-header { padding: 22px var(--dialog-padding-inline) 18px; }
.admin-permission-scroll {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  padding: 18px var(--dialog-padding-inline) 0;
  overflow: hidden;
}
.admin-permission-dialog .admin-permissions-section {
  display: flex;
  min-height: 0;
  flex-direction: column;
}
.admin-permission-dialog .compact-permission-list {
  min-height: 120px;
  max-height: none;
  flex: 1;
  overflow-y: auto;
}
.admin-permission-footer {
  display: grid;
  gap: 10px;
  padding: 14px var(--dialog-padding-inline) 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-strong);
}
.admin-permission-footer .dialog-actions { margin: 0; }
.admin-permissions-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.admin-permissions-heading h3 { margin: 0; font-size: var(--text-base); letter-spacing: var(--tracking-heading); }
.admin-permission-count {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.admin-permission-presets-section {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface));
}
.admin-permission-presets-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.admin-permission-presets-heading h3 { margin: 0; font-size: var(--text-base); }
.admin-permission-presets-heading span { color: var(--subtle); font-size: var(--text-xs); }
.admin-permission-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-permission-preset {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  transition: border-color 140ms ease-out, background-color 140ms ease-out, color 140ms ease-out, transform 140ms ease-out;
}
.admin-permission-preset:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.admin-permission-preset:active { transform: scale(.98); }
.admin-permission-preset:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.admin-permission-preset.is-applied { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); color: var(--accent-text); }
.admin-permission-presets-hint { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }
.admin-permission-accordion {
  overflow: clip;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}
.admin-permission-accordion[open] { border-color: var(--border-strong); }
.admin-permission-summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-heavy);
  cursor: pointer;
  list-style: none;
}
.admin-permission-summary::-webkit-details-marker { display: none; }
.admin-permission-summary::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 140ms ease-out;
}
.admin-permission-accordion[open] > .admin-permission-summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.admin-permission-summary > span:first-of-type { flex: 1; }
.admin-permission-summary:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); box-shadow: var(--focus-ring); }
.admin-permission-area-count {
  min-width: 42px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.admin-permission-accordion-content { display: grid; gap: 16px; padding: 2px 14px 15px; border-top: 1px solid var(--border); }
.admin-permission-group { margin: 14px 0 0; }
.admin-permission-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-permission-option {
  position: relative;
  min-width: 0;
  padding: 10px 12px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--muted);
  align-items: flex-start;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-wrap: pretty;
  transition-property: border-color, background-color, color, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.admin-permission-main { display: flex; min-width: 0; flex: 1; align-items: flex-start; gap: 9px; cursor: pointer; }
.admin-permission-option.is-incompatible .admin-permission-main,
.admin-permission-option.is-policy-disabled .admin-permission-main { cursor: not-allowed; }
.admin-permission-option:hover { border-color: var(--border-strong); background: var(--surface-hover); color: var(--text); }
.admin-permission-option:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); background: var(--accent-soft); color: var(--text); }
.admin-permission-option.is-incompatible {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--subtle);
  cursor: not-allowed;
  opacity: .62;
}
.admin-permission-option.is-incompatible:hover { border-color: var(--border); background: var(--surface-muted); color: var(--subtle); }
.admin-permission-option.is-incompatible .admin-permission-copy strong { color: var(--muted); }
.admin-permission-option input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }
.admin-permission-option.is-policy-disabled {
  border-style: dashed;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .72;
}
.admin-role-policy-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: var(--text-sm);
}
.super-admin-confirm-dialog { width: min(520px, calc(100vw - 32px)); }
.super-admin-confirm-content { padding: 24px; }
.admin-permission-copy { min-width: 0; display: grid; gap: 3px; flex: 1; overflow-wrap: break-word; }
.admin-permission-copy strong { color: var(--text); font-size: var(--text-sm); }
.admin-permission-copy small { color: var(--muted); font-size: 11px; font-weight: var(--weight-medium); line-height: 1.4; }
.admin-permission-help {
  display: grid;
  width: 19px;
  height: 19px;
  min-height: 19px;
  padding: 0;
  flex: 0 0 19px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--subtle);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  background: var(--surface-strong);
  cursor: help;
}
.admin-permission-help:hover,
.admin-permission-help:focus-visible { border-color: var(--accent); color: var(--accent-text); }
.admin-permission-help:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.admin-permission-tooltip {
  position: absolute;
  right: 8px;
  top: 36px;
  z-index: 8;
  width: min(280px, calc(100% - 16px));
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-overlay);
  font-size: 11px;
  font-style: normal;
  font-weight: var(--weight-medium);
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}
.admin-permission-help:hover + .admin-permission-tooltip,
.admin-permission-help:focus-visible + .admin-permission-tooltip,
.admin-permission-option.is-tooltip-open .admin-permission-tooltip {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .people-admin-toolbar { grid-template-columns: 1fr 1fr; }
  .people-search-field { grid-column: 1 / -1; }
  .people-result-count { grid-column: 2; justify-self: end; }
}

@media (max-width: 760px) {
  .people-admin-hero { align-items: flex-start; flex-direction: column; }
  .people-admin-hero .primary-button { width: 100%; }
  .people-admin-metrics { grid-template-columns: 1fr 1fr; }
  .people-admin-metrics .schedule-summary-card:nth-child(2) { border-right: 0; }
  .people-admin-metrics .schedule-summary-card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .person-admin-row { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; }
  .person-admin-avatar { width: 44px; height: 44px; }
  .person-admin-row-meta { grid-column: 2; justify-items: stretch; }
  .admin-permission-options { grid-template-columns: 1fr; }
  .admin-permission-presets-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .admin-permission-preset { width: 100%; border-radius: var(--radius-sm); text-align: left; }
  .admin-permission-form > .dialog-header,
  .admin-permission-scroll,
  .admin-permission-footer { padding-inline: 17px; }
  .person-open-button { width: 100%; }
  .person-admin-drawer { width: 100vw; border-left: 0; }
}

@media (max-width: 520px) {
  .people-admin-hero { min-height: var(--hero-block-min-height); padding: var(--hero-block-padding); }
  .people-admin-toolbar { grid-template-columns: 1fr; }
  .people-search-field, .people-result-count { grid-column: auto; }
  .people-result-count { justify-self: start; text-align: left; }
  .person-admin-row { grid-template-columns: 1fr; }
  .person-admin-avatar { display: none; }
  .person-admin-row-meta { grid-column: auto; }
  .person-drawer-content { padding: 20px 17px; }
  .person-drawer-header { grid-template-columns: minmax(0, 1fr) 44px; }
  .person-drawer-header .person-admin-avatar { display: none; }
  .person-assignment-card { grid-template-columns: 1fr; }
  .person-assignment-side { justify-items: start; }
  .person-assignment-actions, .person-assignment-actions button, .person-drawer-actions, .person-drawer-actions button { width: 100%; }
  .person-assignment-actions, .person-drawer-actions { display: grid; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-canvas: #0c0d0b;
  --color-surface-1: #121410;
  --color-surface-2: #181a15;
  --color-surface-3: #20221c;
  --color-surface-hover: #292c24;
  --color-text: #f1f0e9;
  --color-text-muted: #a4a79d;
  --color-text-subtle: #969a90;
  --color-border: #2d3028;
  --color-border-strong: #43473c;
  --color-accent: #ff714d;
  --color-accent-action: #ff714d;
  --color-accent-hover: #ff896b;
  --color-accent-soft: #3c1d14;
  --color-link: #ff9a81;
  --color-on-accent: #17100d;
  --color-success: #75bc96;
  --color-success-soft: #183326;
  --color-warning: #e3ae5d;
  --color-warning-soft: #382a14;
  --color-danger: #ed7c83;
  --color-danger-soft: #3b1a1e;
  --color-info: #83aee8;
  --shadow-overlay: 0 24px 70px rgba(0, 0, 0, 0.42), 0 2px 10px rgba(0, 0, 0, 0.35);
  --focus-color: var(--color-accent);
  --focus-ring: 0 0 0 3px rgba(255, 113, 77, 0.28);
  --hero-glow-accent: color-mix(in srgb, var(--hero-glow-accent-color) 6%, transparent);
  --hero-glow-secondary: color-mix(in srgb, var(--hero-glow-secondary-color) 5.5%, transparent);
  --select-control-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f0e9' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-canvas: #0c0d0b;
    --color-surface-1: #121410;
    --color-surface-2: #181a15;
    --color-surface-3: #20221c;
    --color-surface-hover: #292c24;
    --color-text: #f1f0e9;
    --color-text-muted: #a4a79d;
    --color-text-subtle: #969a90;
    --color-border: #2d3028;
    --color-border-strong: #43473c;
    --color-accent: #ff714d;
    --color-accent-action: #ff714d;
    --color-accent-hover: #ff896b;
    --color-accent-soft: #3c1d14;
    --color-link: #ff9a81;
    --color-on-accent: #17100d;
    --color-success: #75bc96;
    --color-success-soft: #183326;
    --color-warning: #e3ae5d;
    --color-warning-soft: #382a14;
    --color-danger: #ed7c83;
    --color-danger-soft: #3b1a1e;
    --color-info: #83aee8;
    --shadow-overlay: 0 24px 70px rgba(0, 0, 0, 0.42), 0 2px 10px rgba(0, 0, 0, 0.35);
    --focus-color: var(--color-accent);
    --focus-ring: 0 0 0 3px rgba(255, 113, 77, 0.28);
    --hero-glow-accent: color-mix(in srgb, var(--hero-glow-accent-color) 6%, transparent);
    --hero-glow-secondary: color-mix(in srgb, var(--hero-glow-secondary-color) 5.5%, transparent);
    --select-control-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f0e9' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; text-wrap: pretty; }
.ui-icon {
  width: var(--ui-icon-size, 18px);
  height: var(--ui-icon-size, 18px);
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.2em;
  pointer-events: none;
}
.ui-icon--leading { margin-inline-end: 6px; }
.ui-icon--trailing { margin-inline-start: 6px; }

/* V2-5b view entry: navigation state updates immediately; only content presentation moves. */
.ui-view-motion {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--duration-base) var(--ease-ui),
    transform var(--duration-base) var(--ease-ui);
}

.ui-view-motion[data-ui-view-state="from"] {
  opacity: .45;
  transform: translateY(4px);
  transition: none;
}

/* V2-5c Account menu entry: position is resolved before visual motion starts. */
.ui-menu-motion {
  transform-origin: top right;
  opacity: 1;
  transform: none;
  transition:
    opacity var(--duration-fast) var(--ease-ui),
    transform var(--duration-fast) var(--ease-ui);
}

.ui-menu-motion[data-ui-menu-state="from"] {
  opacity: 0;
  transform: translateY(-4px) scale(.985);
  transition: none;
}

/* V2-5a dialog motion: visual state only; native dialog semantics stay intact. */
.ui-dialog-motion {
  --ui-dialog-enter-transform: translateY(8px) scale(.985);
  --ui-dialog-exit-transform: translateY(6px) scale(.99);
  opacity: 1;
  transform: none;
  transition:
    opacity var(--duration-base) var(--ease-ui),
    transform var(--duration-base) var(--ease-ui);
}

.ui-dialog-motion[data-ui-dialog-variant="drawer-right"] {
  --ui-dialog-enter-transform: translateX(16px);
  --ui-dialog-exit-transform: translateX(12px);
}

.ui-dialog-motion[data-ui-dialog-variant="popover"] {
  --ui-dialog-enter-transform: translateY(-6px) scale(.99);
  --ui-dialog-exit-transform: translateY(-4px) scale(.995);
}

.ui-dialog-motion[data-ui-dialog-state="opening"] {
  opacity: 0;
  transform: var(--ui-dialog-enter-transform);
}

.ui-dialog-motion[data-ui-dialog-state="closing"] {
  opacity: 0;
  transform: var(--ui-dialog-exit-transform);
  transition-duration: var(--duration-fast);
  transition-timing-function: var(--ease-exit);
}

.ui-dialog-motion::backdrop {
  opacity: 1;
  transition: opacity var(--duration-base) var(--ease-ui);
}

.ui-dialog-motion[data-ui-dialog-state="opening"]::backdrop,
.ui-dialog-motion[data-ui-dialog-state="closing"]::backdrop {
  opacity: 0;
}

a { overflow-wrap: anywhere; }
button:disabled { cursor: not-allowed; opacity: var(--control-disabled-action-opacity); }
[hidden] { display: none !important; }
:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.table-scroll:focus-visible,
.psp-sheet-dashboard-table-wrap:focus-visible,
.account-sheet-scroll:focus-visible,
.schedule-timeline:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}
h1, h2, h3, h4 { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
p { overflow-wrap: break-word; word-break: normal; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.stat-card strong, .schedule-summary-card strong, .nav-count, td, .day-heading { font-variant-numeric: tabular-nums; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading-screen, .login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background: #11130f;
}
.login-screen::before {
  content: "INTERNAL / OPERATIONS";
  position: absolute;
  left: clamp(24px, 5vw, 76px);
  top: clamp(24px, 7vh, 70px);
  color: #686d5e;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
}
.login-screen::after {
  content: "";
  position: absolute;
  right: -12vw;
  bottom: -30vw;
  width: min(70vw, 800px);
  height: min(70vw, 800px);
  border: clamp(70px, 10vw, 150px) solid var(--accent);
  border-radius: 50%;
  opacity: 0.85;
  pointer-events: none;
}
.loading-card, .login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 490px);
  padding: 38px;
  border: 1px solid #d9d8d0;
  border-radius: var(--radius-lg);
  background: #f8f7f2;
  color: #171813;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.42);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 4px;
  background: var(--accent);
  color: #17110e;
  font-size: var(--text-md);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-heading);
}
.brand-copy strong { display: block; font-size: var(--text-md); letter-spacing: -0.015em; }
.brand-copy span { display: block; margin-top: 1px; color: #777a70; font-size: var(--text-xs); }
.login-card h1 { margin: 46px 0 12px; max-width: 380px; font-size: clamp(34px, 7vw, 52px); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.login-card > p { margin: 0 0 30px; max-width: 400px; color: #686b62; font-size: var(--text-base); }
.demo-notice, .info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #d5d5cd;
  border-bottom: 1px solid #d5d5cd;
  color: #4f514b;
  font-size: var(--text-sm);
}
.demo-notice > span:first-child { color: var(--accent); }

.field { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
.field label, .field-label { color: currentColor; font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: 0.01em; }
select, input[type="search"], input[type="number"], input[type="date"], input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], textarea {
  width: 100%;
  min-height: var(--control-height-md);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  padding: var(--control-padding-block) var(--control-padding-inline);
  transition-property: border-color, background-color, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
select:focus, input:focus, textarea:focus { border-color: var(--accent); }
:is(input, select, textarea):disabled,
:is(input, select, textarea)[aria-disabled="true"] { opacity: var(--control-disabled-field-opacity); }
:is(input, select, textarea)[aria-invalid="true"],
:is(input, select, textarea):user-invalid {
  border-color: var(--state-danger-border);
  background-color: color-mix(in srgb, var(--state-danger-bg) 42%, var(--surface-strong));
}
:is(input, select, textarea)[aria-invalid="true"]:focus-visible,
:is(input, select, textarea):user-invalid:focus-visible {
  outline-color: var(--state-danger-text);
  box-shadow: var(--focus-error-ring);
}
textarea { resize: vertical; }
.login-card select, .login-card input { border-color: #b9bbb1; background: #ffffff; color: #171813; }
.login-form .operation-status { min-height: 18px; margin: 10px 0 -10px; color: #9f2f24; }
.demo-access { margin-top: 24px; padding-top: 18px; border-top: 1px solid #d5d5cd; }
.demo-access summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #4f514b; font-size: var(--text-sm); font-weight: var(--weight-heavy); }
.demo-access > p { margin: 0 0 12px; color: #74776d; font-size: var(--text-xs); }
.demo-login-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.demo-login-form .field { margin: 0; }
.demo-login-form button { white-space: nowrap; }
.field-help { margin: 8px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-body); }
.managed-password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.managed-password-input-wrap { position: relative; min-width: 0; }
.managed-password-input-wrap > input { padding-right: 48px; }
.managed-password-visibility {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}
.managed-password-visibility:hover { background: var(--surface-hover); color: var(--text); }
.managed-password-visibility:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); box-shadow: var(--focus-ring); }
.managed-password-eye-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.managed-password-generate { white-space: nowrap; }
.app-toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  max-width: min(380px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid var(--state-success-border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--state-success-text);
  box-shadow: var(--shadow-popover);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--duration-fast) ease-out, transform var(--duration-fast) ease-out;
}
.app-toast.is-warning { border-color: var(--state-warning-border); color: var(--state-warning-text); }
.app-toast.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .app-toast { transition: none; transform: none; }
}
.login-card .field-help { color: #686b62; }
.primary-button, .secondary-button, .ghost-button, .danger-button {
  min-height: var(--control-height-md);
  border-radius: var(--radius-sm);
  padding: var(--control-padding-block) var(--space-4);
  border: 1px solid transparent;
  font-weight: var(--weight-bold);
  transition-property: transform, background-color, border-color, color;
  transition-duration: 130ms;
  transition-timing-function: ease-out;
}
.primary-button { background: var(--accent-action); color: var(--accent-button-text); }
.primary-button:hover:not(:disabled) { background: var(--accent-action-hover); }
.secondary-button { background: var(--surface-strong); border-color: var(--border); color: var(--text); }
.secondary-button:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-hover); }
.ghost-button { background: transparent; border-color: transparent; color: var(--muted); }
.ghost-button:hover:not(:disabled) { color: var(--text); background: var(--surface-hover); }
.danger-button { border-color: var(--danger); background: var(--danger); color: #fff; }
.danger-button:hover:not(:disabled) { border-color: var(--danger-action-hover); background: var(--danger-action-hover); }
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled), .ghost-button:active:not(:disabled), .danger-button:active:not(:disabled) { transform: scale(0.97); }
.login-card .primary-button { width: 100%; min-height: 48px; margin-top: 22px; }

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  transition-property: grid-template-columns;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 18px;
  border-right: 1px solid var(--sidebar-border);
  background: var(--sidebar);
  color: var(--sidebar-text);
}
.sidebar-header { display: block; min-height: 40px; margin-bottom: 26px; }
.sidebar .brand { min-width: 0; padding: 0 8px; }
.sidebar .brand-mark { box-shadow: none; }
.sidebar .brand-copy span { color: var(--sidebar-muted); }
.sidebar .brand-copy,
.sidebar .nav-label,
.sidebar .department-button strong,
.sidebar .department-button .nav-count,
.sidebar .workspace-nav-copy,
.sidebar .business-section-nav,
.sidebar .sidebar-settings .field,
.sidebar .user-copy,
.sidebar .session-actions {
  transition-property: opacity;
  transition-duration: 105ms;
  transition-timing-function: ease-out;
}
.sidebar.is-concealing .brand-copy,
.sidebar.is-concealing .nav-label,
.sidebar.is-concealing .department-button strong,
.sidebar.is-concealing .department-button .nav-count,
.sidebar.is-concealing .workspace-nav-copy,
.sidebar.is-concealing .business-section-nav,
.sidebar.is-concealing .sidebar-settings .field,
.sidebar.is-concealing .user-copy,
.sidebar.is-concealing .session-actions,
.sidebar.is-revealing .brand-copy,
.sidebar.is-revealing .nav-label,
.sidebar.is-revealing .department-button strong,
.sidebar.is-revealing .department-button .nav-count,
.sidebar.is-revealing .workspace-nav-copy,
.sidebar.is-revealing .business-section-nav,
.sidebar.is-revealing .sidebar-settings .field,
.sidebar.is-revealing .user-copy,
.sidebar.is-revealing .session-actions {
  opacity: 0;
  pointer-events: none;
}
.sidebar-toggle {
  display: grid;
  position: absolute;
  top: 24px;
  right: -16px;
  z-index: 2;
  width: 32px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--sidebar-border);
  border-radius: 999px;
  background: var(--sidebar);
  color: var(--sidebar-muted);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition-property: transform, border-color, background-color, color, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.sidebar-toggle::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; }
.sidebar-toggle:hover {
  border-color: #565b4d;
  background: #23261e;
  color: var(--sidebar-text);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}
.sidebar-toggle:active { transform: scale(.96); }
.sidebar-toggle:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.sidebar-toggle-icon { display: block; font-size: 19px; font-weight: 450; line-height: 1; transform: translateY(-1px); }
.sidebar-toggle-icon .ui-icon { display: block; vertical-align: 0; }
.sidebar-navigation-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 2px 18px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-border) transparent;
}
.sidebar-navigation-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-navigation-scroll::-webkit-scrollbar-thumb { border-radius: 5px; background: var(--sidebar-border); }
.nav-label {
  margin: 8px 10px 9px;
  color: var(--sidebar-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.department-nav { display: grid; gap: 3px; }
.department-button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 45px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
  transition-property: color, background-color, border-color;
  transition-duration: 130ms;
}
.department-button:hover { background: var(--sidebar-soft); color: var(--sidebar-text); }
.department-button[aria-current="page"] { background: #f4f3ed; border-color: #f4f3ed; color: #171813; }
.dept-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--sidebar-border);
  border-radius: 4px;
  color: currentColor;
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
}
.department-button[aria-current="page"] .dept-icon { border-color: #d4d3ca; background: var(--accent); color: #1a120f; }
.department-button strong { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.nav-count { min-width: 20px; color: currentColor; font-size: var(--text-xs); text-align: right; opacity: 0.7; }
.business-sidebar-context {
  display: grid;
  min-height: 0;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--sidebar-border);
}
.business-nav-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 10px 7px;
  color: var(--sidebar-text);
  letter-spacing: 0.13em;
}
.business-nav-label::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.admin-sidebar-context {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sidebar-border);
}
.admin-sidebar-context .nav-label { margin: 0 8px 2px; }
.admin-panel-button {
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--sidebar-border));
  background: color-mix(in srgb, var(--accent) 7%, var(--sidebar));
}
.admin-panel-button:hover,
.admin-panel-button[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--sidebar-border));
  background: color-mix(in srgb, var(--accent) 14%, var(--sidebar-soft));
}
.admin-panel-icon {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--sidebar-border));
  color: color-mix(in srgb, var(--accent) 78%, white);
}
.business-workspace-nav { display: grid; gap: 3px; }
.business-workspace-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 6px 10px 6px 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
  transition: color 130ms ease-out, background-color 130ms ease-out, border-color 130ms ease-out;
}
.business-workspace-button::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}
.business-workspace-button:hover { background: var(--sidebar-soft); color: var(--sidebar-text); }
.business-workspace-button[aria-current="page"] {
  border-color: var(--sidebar-border);
  background: var(--sidebar-soft);
  color: var(--sidebar-text);
}
.business-workspace-button[aria-current="page"]::before { background: var(--accent); }
.workspace-nav-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--sidebar-soft) 78%, transparent);
  color: currentColor;
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: -.03em;
}
.business-workspace-button[aria-current="page"] .workspace-nav-icon {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--sidebar-border));
  color: var(--accent);
}
.workspace-nav-copy { min-width: 0; }
.workspace-nav-copy strong,
.workspace-nav-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-nav-copy strong { font-size: var(--text-sm); font-weight: var(--weight-bold); }
.workspace-nav-copy small { margin-top: 2px; color: var(--sidebar-muted); font-size: var(--text-xs); }
.business-section-nav { display: grid; gap: 2px; padding-left: 10px; }
.business-section-button {
  position: relative;
  min-height: 36px;
  padding: 7px 10px 7px 20px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sidebar-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-align: left;
}
.business-section-button::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sidebar-border);
  transform: translateY(-50%);
}
.business-section-button:hover { background: var(--sidebar-soft); color: var(--sidebar-text); }
.business-section-button[aria-current="page"] { background: var(--sidebar-soft); color: var(--sidebar-text); }
.business-section-button[aria-current="page"]::before { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 17%, transparent); }
.sidebar-settings { display: grid; gap: 14px; padding: 17px 8px 2px; border-top: 1px solid var(--sidebar-border); }
.sidebar-settings .field { margin: 0; }
.sidebar-settings .field label { color: var(--sidebar-muted); }
.sidebar-settings select { min-height: 40px; border-color: var(--sidebar-border); background: var(--sidebar-soft); color: var(--sidebar-text); }
.user-panel { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--sidebar-border); border-radius: 50%; background: var(--sidebar-soft); color: var(--sidebar-text); font-size: var(--text-xs); font-weight: var(--weight-heavy); }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: var(--text-sm); }
.user-copy span { color: var(--sidebar-muted); font-size: var(--text-xs); }
.session-actions { display: grid; grid-template-columns: 1fr; gap: 5px; }
.sidebar .secondary-button { border-color: var(--sidebar-border); background: var(--sidebar-soft); color: var(--sidebar-text); }
.sidebar .secondary-button:hover { border-color: #494d40; background: #23261e; }
.sidebar .ghost-button { color: var(--sidebar-muted); }
.sidebar .ghost-button:hover { background: var(--sidebar-soft); color: var(--sidebar-text); }

@media (min-width: 901px) {
  .app-shell.is-sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar.is-collapsed { align-items: center; padding-inline: 10px; }
  .sidebar.is-collapsed .sidebar-header { display: block; width: 100%; margin-bottom: 22px; }
  .sidebar.is-collapsed .brand { padding: 0; }
  .sidebar.is-collapsed .brand-copy,
  .sidebar.is-collapsed .nav-label,
  .sidebar.is-collapsed .department-button strong,
  .sidebar.is-collapsed .department-button .nav-count,
  .sidebar.is-collapsed .workspace-nav-copy,
  .sidebar.is-collapsed .business-section-nav,
  .sidebar.is-collapsed .sidebar-settings .field,
  .sidebar.is-collapsed .user-copy,
  .sidebar.is-collapsed .session-actions { display: none; }
  .sidebar.is-collapsed .department-nav { width: 100%; justify-items: center; }
  .sidebar.is-collapsed .department-button {
    display: grid;
    width: 44px;
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 7px;
  }
  .sidebar.is-collapsed .sidebar-navigation-scroll { width: 100%; padding-right: 0; }
  .sidebar.is-collapsed .business-sidebar-context { width: 100%; justify-items: center; }
  .sidebar.is-collapsed .admin-sidebar-context { width: 100%; justify-items: center; }
  .sidebar.is-collapsed .business-workspace-nav { width: 100%; justify-items: center; }
  .sidebar.is-collapsed .business-workspace-button {
    width: 44px;
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 5px;
  }
  .sidebar.is-collapsed .business-workspace-button::before { inset: 8px auto 8px -1px; }
  .sidebar.is-collapsed .sidebar-settings { width: 100%; justify-items: center; padding: 16px 0 2px; }
  .sidebar.is-collapsed .user-panel { display: block; }
}

@media (min-width: 901px) and (max-height: 800px) {
  .sidebar { padding-top: 18px; padding-bottom: 12px; }
  .sidebar-header { margin-bottom: 16px; }
  .sidebar-toggle { top: 18px; }
  .sidebar-settings { gap: 8px; padding-top: 10px; }
  .sidebar-settings .user-panel { display: none; }
  .sidebar-settings select { min-height: 36px; }
  .sidebar-settings .secondary-button,
  .sidebar-settings .ghost-button { min-height: 38px; }
}

.main-column { min-width: 0; }
.admin-panel-tabs { margin-bottom: 18px; }
.admin-panel-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: 22px 24px;
}
.admin-panel-context h2 { margin: 2px 0 5px; font-size: 20px; }
.admin-panel-context p:not(.eyebrow) { margin: 0; color: var(--muted); }
.admin-panel-department-picker { margin: 0; }
.activity-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 240px) minmax(180px, 240px) minmax(260px, 1fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
  padding: 18px 20px;
}
.activity-date-presets { display: flex; gap: 8px; align-items: center; }
.activity-date-presets .secondary-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.activity-toolbar .field { margin: 0; }
.activity-privacy-note { margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.5; }
.activity-results { min-width: 0; padding: 0; overflow: hidden; }
.activity-results[aria-busy="true"] { display: grid; gap: 12px; padding: 24px; }
.activity-table-scroll {
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
}
.activity-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.activity-table caption { padding: 18px 20px 12px; color: var(--muted); font-weight: 700; text-align: left; }
.activity-table th,
.activity-table td { padding: 14px 12px; border-top: 1px solid var(--border); vertical-align: top; text-align: left; }
.activity-table thead th { border-top: 0; background: var(--surface-muted); color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.activity-table thead th > span { vertical-align: middle; }
.activity-table tbody tr:hover > * { background: var(--surface-hover); }
.activity-table thead th:first-child,
.activity-table tbody th { position: sticky; left: 0; z-index: 2; min-width: 210px; background: var(--surface); }
.activity-table thead th:first-child { z-index: 3; background: var(--surface-muted); }
.activity-table thead th:last-child,
.activity-table tbody td:last-child { position: sticky; right: 0; z-index: 2; min-width: 132px; background: var(--surface); }
.activity-table thead th:last-child { z-index: 3; background: var(--surface-muted); }
.activity-employee { display: table-cell; }
.activity-employee > span:last-child { display: inline-grid; gap: 3px; vertical-align: middle; }
.activity-employee small { color: var(--muted); font-weight: 500; }
.presence-dot { display: inline-block; width: 9px; height: 9px; margin: 5px 9px 0 0; border-radius: 50%; vertical-align: top; }
.presence-dot.is-online { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent); }
.presence-dot.is-offline { background: var(--border-strong); }
.activity-department-mark {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 22px;
  margin-right: 7px;
  padding-inline: 5px;
  border-radius: 7px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}
.activity-department-mark.is-sales { background: color-mix(in srgb, #4f8b68 16%, var(--surface)); color: #3d7354; }
.activity-department-mark.is-bd { background: color-mix(in srgb, #c77b45 16%, var(--surface)); color: #a55f2f; }
.activity-department-mark.is-finance { background: color-mix(in srgb, #557daa 16%, var(--surface)); color: #3f6895; }
.activity-department-mark.is-account { background: color-mix(in srgb, #7762a8 16%, var(--surface)); color: #614c93; }
.activity-department-cell { min-width: 150px; }
.activity-department-cell > strong,
.activity-total-cell > strong { display: block; color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.activity-share-line { display: grid; grid-template-columns: minmax(70px, 1fr) auto; gap: 7px; align-items: center; margin-top: 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.activity-share-progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; background: var(--surface-strong); }
.activity-share-progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-strong); }
.activity-share-progress::-webkit-progress-value { border-radius: 999px; background: var(--activity-color, var(--accent)); }
.activity-share-progress::-moz-progress-bar { border-radius: 999px; background: var(--activity-color, var(--accent)); }
.activity-department-sales .activity-share-progress { --activity-color: #4f8b68; accent-color: #4f8b68; }
.activity-department-bd .activity-share-progress { --activity-color: #c77b45; accent-color: #c77b45; }
.activity-department-finance .activity-share-progress { --activity-color: #557daa; accent-color: #557daa; }
.activity-department-account .activity-share-progress { --activity-color: #7762a8; accent-color: #7762a8; }
.activity-tab-breakdown { display: block; max-width: 190px; margin-top: 7px; color: var(--subtle); line-height: 1.35; }
.activity-total-cell { min-width: 132px; font-variant-numeric: tabular-nums; }
.activity-total-cell span { display: block; margin-top: 7px; color: var(--muted); }

@media (max-width: 900px) {
  .activity-toolbar { grid-template-columns: 1fr 1fr; }
  .activity-privacy-note { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .activity-toolbar { grid-template-columns: 1fr; padding: 16px; }
  .activity-date-presets { display: grid; grid-template-columns: 1fr 1fr; }
  .activity-date-presets .secondary-button { width: 100%; }
  .activity-privacy-note { grid-column: auto; }
  .activity-table thead th:first-child,
  .activity-table tbody th,
  .activity-table thead th:last-child,
  .activity-table tbody td:last-child { position: static; }
  .audit-event-details { grid-template-columns: 1fr; gap: 4px; }
  .audit-event-details dd { margin-bottom: 8px; }
}
.topbar {
  min-height: 62px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px clamp(24px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}
.topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.profile-menu-trigger {
  min-width: 176px;
  min-height: 44px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease-out, background-color 140ms ease-out, transform 140ms ease-out, box-shadow 140ms ease-out;
}
.profile-menu-trigger:hover,
.profile-menu-trigger[aria-expanded="true"] { border-color: var(--border-strong); background: var(--surface-hover); }
.profile-menu-trigger:active { transform: scale(.98); }
.profile-menu-trigger:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.profile-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-muted));
  color: var(--accent-text);
  font-size: 10px;
  font-weight: var(--weight-heavy);
  letter-spacing: .02em;
}
.profile-avatar.is-large { width: 46px; height: 46px; flex-basis: 46px; font-size: 13px; }
.profile-menu-trigger-copy { min-width: 0; }
.profile-menu-trigger-copy strong,
.profile-menu-trigger-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-trigger-copy strong { font-size: var(--text-xs); line-height: 1.25; }
.profile-menu-trigger-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.profile-menu-chevron { color: var(--subtle); font-size: 14px; transition: transform 140ms ease-out; }
.profile-menu-trigger[aria-expanded="true"] .profile-menu-chevron { transform: rotate(180deg); }
.profile-menu-popover {
  position: fixed;
  z-index: 1000;
  width: min(330px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-overlay);
}
.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.profile-menu-identity { min-width: 0; }
.profile-menu-identity strong,
.profile-menu-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-identity strong { font-size: var(--text-base); }
.profile-menu-identity span { margin-top: 3px; color: var(--muted); font-size: var(--text-xs); }
.profile-menu-section { display: grid; gap: 8px; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.profile-menu-label { color: var(--subtle); font-size: 10px; font-weight: var(--weight-heavy); letter-spacing: .09em; text-transform: uppercase; }
.profile-theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.profile-theme-option {
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: var(--weight-bold);
  transition: border-color 130ms ease-out, background-color 130ms ease-out, color 130ms ease-out, transform 130ms ease-out;
}
.profile-theme-option:hover { border-color: var(--border-strong); background: var(--surface-hover); color: var(--text); }
.profile-theme-option:active { transform: scale(.97); }
.profile-theme-option:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); box-shadow: var(--focus-ring); }
.profile-theme-option.is-selected { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); color: var(--accent-text); }
.profile-theme-glyph { font-size: 17px; line-height: 1; }
.profile-menu-actions { display: grid; padding: 6px; }
.profile-menu-action {
  min-height: 44px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-align: left;
}
.profile-menu-action:hover { background: var(--surface-hover); }
.profile-menu-action:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); box-shadow: var(--focus-ring); }
.profile-menu-action.is-danger { color: var(--danger); }
.profile-menu-action-icon { display: grid; width: 26px; place-items: center; color: var(--subtle); font-size: 16px; }
.profile-menu-action.is-danger .profile-menu-action-icon { color: currentColor; }
.profile-settings-dialog { width: min(560px, calc(100vw - 24px)); max-height: min(90dvh, 820px); overflow-y: auto; }
.profile-settings-dialog > form { display: grid; gap: 18px; padding: var(--dialog-padding-inline); }
.profile-settings-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.profile-settings-header > div { min-width: 0; }
.profile-settings-header .icon-button { flex: 0 0 44px; align-self: flex-start; margin: -5px -5px 0 0; }
.profile-settings-identity { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.profile-settings-identity strong,
.profile-settings-identity span { display: block; }
.profile-settings-identity span { margin-top: 3px; color: var(--muted); font-size: var(--text-sm); }
.profile-settings-fields { display: grid; gap: 13px; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-muted); }
.profile-settings-fields legend { padding: 0 6px; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.profile-settings-fields .field { margin: 0; }
.profile-settings-fields input { width: 100%; }
.profile-settings-fields .field-help { margin: 0; }
.profile-settings-feedback { min-height: 0; }
.profile-settings-feedback:empty { display: none; }
.profile-settings-feedback p { margin: 0; }
.profile-settings-success { padding: 11px 13px; border-radius: var(--radius-sm); background: var(--success-soft); color: var(--success); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.profile-settings-dialog .dialog-actions { margin-top: 0; }
.profile-two-factor-content { display: grid; gap: 14px; }
.profile-two-factor-intro { margin: 0; color: var(--muted); line-height: 1.55; }
.profile-two-factor-status { display: flex; align-items: center; gap: 10px; }
.profile-two-factor-status p { margin: 0; }
.profile-two-factor-qr-frame { width: fit-content; margin-inline: auto; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: 0 8px 24px color-mix(in srgb, #111 12%, transparent); }
.profile-two-factor-qr { display: block; width: min(172px, 100%); height: auto; margin-inline: auto; background: #fff; }
.profile-two-factor-code-field { width: min(240px, 100%); margin-inline: auto !important; }
.profile-two-factor-code-field input { min-height: 44px; text-align: center; font-size: var(--text-lg); font-variant-numeric: tabular-nums; letter-spacing: .28em; }
.profile-two-factor-actions { display: flex; justify-content: center; }
.profile-two-factor-actions button { min-width: 190px; min-height: 44px; }
.profile-two-factor-key { display: block; padding: 10px 12px; overflow-wrap: anywhere; border-radius: var(--radius-sm); background: var(--surface); letter-spacing: .08em; }
.login-step-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.employee-delete-dialog { width: min(520px, calc(100vw - 24px)); overflow: hidden; }
.employee-delete-content { display: grid; gap: 20px; padding: clamp(22px, 4vw, 32px); text-align: center; }
.employee-delete-content .dialog-header { display: grid; justify-items: center; }
.employee-delete-content .dialog-header p { max-width: 42ch; }
.employee-delete-content .operation-status:empty { display: none; }
.employee-delete-content .dialog-actions { justify-content: center; margin-top: 0; gap: 10px; }
.employee-delete-content .dialog-actions button { min-width: 150px; }
@media (max-width: 520px) {
  .profile-settings-dialog > form { padding: 20px 17px; }
  .profile-settings-header { gap: 12px; }
  .profile-settings-dialog .dialog-actions button { width: 100%; }
  .profile-two-factor-actions { display: grid; }
  .profile-two-factor-actions button { width: 100%; min-width: 0; }
  .employee-delete-content .dialog-actions { display: grid; }
  .employee-delete-content .dialog-actions button { width: 100%; min-width: 0; }
}
@media (max-width: 1180px) {
  .topbar-actions { gap: 7px; }
  .profile-menu-trigger { min-width: 44px; width: 44px; grid-template-columns: 32px; padding: 5px; }
  .profile-menu-trigger-copy, .profile-menu-chevron { display: none; }
}
.resource-access-slot[hidden] { display: none; }
.resource-access-trigger {
  min-width: 112px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, transform 140ms ease-out;
}
.resource-access-trigger:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-hover); }
.resource-access-trigger:active:not(:disabled) { transform: scale(0.97); }
.resource-access-trigger.is-loading { color: var(--muted); }
.resource-access-trigger.has-error { border-color: color-mix(in srgb, var(--danger) 42%, var(--border)); color: var(--danger); }
.resource-access-avatar-stack { display: inline-flex; align-items: center; padding-left: 7px; }
.resource-access-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border: 2px solid var(--surface-strong);
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--accent-text);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.025em;
}
.resource-access-avatar:nth-child(2) { background: var(--success-soft); color: var(--success); }
.resource-access-avatar:nth-child(3) { background: var(--warning-soft); color: var(--warning); }
.resource-access-avatar-more { background: var(--text); color: var(--bg); }
.resource-access-trigger-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.resource-access-dialog {
  position: fixed;
  inset: 72px 18px auto auto;
  width: min(450px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 90px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-overlay);
}
.resource-access-dialog::backdrop { background: var(--backdrop-popover); backdrop-filter: var(--backdrop-blur); }
.resource-access-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 18px;
  align-items: start;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--dialog-chrome-bg);
}
.resource-access-dialog-header h2 { margin: 0; font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.resource-access-dialog-header p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.resource-access-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 27px;
  line-height: 1;
}
.resource-access-close:hover { border-color: var(--border-strong); color: var(--text); }
.resource-access-dialog-body { padding: 16px; }
.resource-access-dialog input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}
.resource-access-summary { min-height: 18px; margin: 11px 3px 9px; color: var(--muted); font-size: 10px; }
.resource-access-list {
  max-height: min(520px, calc(100dvh - 275px));
  display: grid;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.resource-access-row {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 156px);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: background-color 130ms ease-out, border-color 130ms ease-out, opacity 130ms ease-out;
}
.resource-access-row:hover { border-color: var(--border); background: var(--surface-strong); }
.resource-access-row[aria-busy="true"] { opacity: 0.62; }
.resource-access-identity { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.resource-access-person-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 850;
}
.resource-access-person-copy { min-width: 0; display: grid; gap: 3px; }
.resource-access-person-copy strong,
.resource-access-person-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-access-person-copy strong { font-size: 12px; }
.resource-access-person-copy span { color: var(--muted); font-size: 10px; }
.resource-access-level-control { min-width: 0; }
.resource-access-level-select { width: 100%; min-height: 44px; padding: 8px 34px 8px 10px; font-size: 11px; }
.resource-access-level-pill { justify-self: end; padding: 6px 9px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 9px; font-weight: 800; }
.resource-access-level-pill.is-edit { background: var(--accent-soft); color: var(--accent-text); }
.resource-access-level-pill.is-view { background: var(--success-soft); color: var(--success); }
.resource-access-empty { padding: 34px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.resource-access-live { min-height: 18px; margin: 10px 3px 0; color: var(--success); font-size: 10px; }
.resource-history-slot[hidden] { display: none; }
.resource-history-trigger {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-strong); color: var(--text); font-size: 11px; font-weight: 750;
  white-space: nowrap; transition: background-color 140ms ease-out, border-color 140ms ease-out, transform 140ms ease-out;
}
.resource-history-trigger:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.resource-history-trigger:active { transform: scale(0.97); }
.resource-history-trigger.is-compact { min-height: 34px; padding: 5px 9px; font-size: 10px; }
.resource-history-trigger.is-compact .resource-history-trigger-icon { width: 20px; height: 20px; font-size: 14px; }
.resource-history-trigger-icon {
  width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font-size: 18px; line-height: 1;
}
.resource-history-dialog {
  position: fixed; inset: 72px 18px 18px auto; width: min(920px, calc(100vw - 36px));
  height: calc(100dvh - 90px); max-width: none; max-height: none; margin: 0; padding: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow-overlay);
}
.resource-history-dialog::backdrop { background: var(--backdrop-popover); backdrop-filter: var(--backdrop-blur); }
.resource-history-dialog-header {
  min-height: 116px; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 20px;
  align-items: start; padding: 23px 24px 20px; border-bottom: 1px solid var(--border);
  background: var(--dialog-chrome-bg);
}
.resource-history-dialog-header h2 { margin: 2px 0 7px; font-size: var(--text-3xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.resource-history-dialog-header p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.resource-history-close {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0 0 3px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-strong);
  color: var(--muted); font-size: 27px; line-height: 1;
}
.resource-history-close:hover { border-color: var(--border-strong); color: var(--text); }
.resource-history-toolbar {
  min-height: 66px; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.resource-history-toolbar label { color: var(--muted); font-size: 10px; font-weight: 750; }
.resource-history-toolbar select { min-width: 180px; min-height: 44px; font-size: 11px; }
.resource-history-layout {
  min-height: 0; display: grid;
  grid-template-columns: minmax(255px, 0.82fr) minmax(0, 1.65fr);
}
.resource-history-layout.is-record-history { grid-template-columns: minmax(0, 1fr); }
.resource-history-list.is-record-history { border-right: 0; padding: 16px; }
.resource-history-entry.is-record-entry {
  border-color: var(--border); background: var(--surface-strong); cursor: default;
}
.resource-history-entry.is-record-entry:hover { border-color: var(--border); background: var(--surface-strong); }
.resource-history-list {
  min-width: 0; display: grid; align-content: start; gap: 6px; padding: 12px; overflow-y: auto;
  border-right: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 93%, transparent);
  overscroll-behavior: contain;
}
.resource-history-entry {
  min-width: 0; display: grid; gap: 5px; padding: 12px; border: 1px solid transparent;
  border-radius: var(--radius-sm); background: transparent; color: var(--text); text-align: left;
  transition: border-color 130ms ease-out, background-color 130ms ease-out;
}
.resource-history-entry:hover { border-color: var(--border); background: var(--surface-strong); }
.resource-history-entry.is-selected { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); }
.resource-history-entry-topline { min-width: 0; display: flex; justify-content: space-between; gap: 10px; }
.resource-history-entry-topline strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-history-entry-topline span { color: var(--accent-text); font-size: 9px; font-weight: 850; font-variant-numeric: tabular-nums; }
.resource-history-entry-meta, .resource-history-entry time { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.resource-history-detail { min-width: 0; padding: 22px; overflow-y: auto; overscroll-behavior: contain; }
.resource-history-detail-heading { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.resource-history-detail-heading h3 { margin: 5px 0 6px; font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.resource-history-detail-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.resource-history-kicker { color: var(--accent-text); font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.resource-history-current { align-self: start; padding: 7px 10px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 9px; font-weight: 850; }
.resource-history-changes { display: grid; gap: 8px; padding-block: 18px; }
.resource-history-changes-title { margin: 0 0 3px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.resource-history-change {
  min-width: 0; display: grid; grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr) 22px minmax(0, 1fr);
  gap: 9px; align-items: center; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 10px;
}
.resource-history-change strong, .resource-history-before, .resource-history-after { min-width: 0; overflow-wrap: anywhere; }
.resource-history-before, .resource-history-after { line-height: 1.45; }
.resource-history-before { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.resource-history-after { color: var(--text); }
.resource-history-arrow { color: var(--accent-text); text-align: center; }
.resource-history-detail-footer { padding-top: 16px; border-top: 1px solid var(--border); }
.resource-history-confirm { display: grid; gap: 13px; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--radius-sm); background: var(--accent-soft); }
.resource-history-confirm p, .resource-history-readonly { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.resource-history-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.resource-history-empty { display: grid; min-height: 150px; place-items: center; padding: 24px; color: var(--muted); font-size: 11px; text-align: center; }
.resource-history-empty.is-compact { min-height: 96px; }
.resource-history-status { min-height: 24px; margin: 0; padding: 7px 20px; border-top: 1px solid var(--border); color: var(--success); font-size: 10px; }
.finance-case-actions,
.operations-access-actions,
.account-helpdesk-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.notification-button {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--text);
  transition: background-color 130ms ease-out, border-color 130ms ease-out, transform 130ms ease-out;
}
.notification-button:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.notification-button:active { transform: scale(0.96); }
.notification-glyph { font-size: 22px; line-height: 1; transform: rotate(-18deg); }
.notification-badge { position: absolute; top: -5px; right: -5px; display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border: 2px solid var(--bg); border-radius: 10px; background: var(--accent); color: var(--accent-button-text); font-size: 9px; font-weight: 850; font-variant-numeric: tabular-nums; }
.breadcrumb { min-width: 0; overflow: hidden; color: var(--subtle); font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb strong { color: var(--text); font-weight: var(--weight-semibold); }
.environment-badge { color: var(--success); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-wide); }
.main-content { width: min(1580px, 100%); min-width: 0; max-width: 100%; margin: 0 auto; padding: var(--space-10) var(--page-gutter) calc(var(--space-10) * 2); }
.page-heading { position: relative; display: flex; justify-content: space-between; gap: 36px; align-items: flex-end; min-height: 148px; margin-bottom: 26px; overflow: hidden; border-bottom: 1px solid var(--border-strong); }
.page-heading > div { position: relative; z-index: 1; min-width: 0; max-width: 100%; padding-bottom: 25px; }
.eyebrow { margin: 0 0 9px; color: var(--accent-text); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-wide); line-height: var(--leading-ui); text-transform: uppercase; }
h1 { margin: 0; font-size: var(--text-display-page); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.page-heading .description { max-width: 680px; margin: 13px 0 0; color: var(--muted); font-size: var(--text-md); }
.page-heading.is-workspace-heading { min-height: 98px; margin-bottom: 12px; }
.page-heading.is-workspace-heading > div { padding-bottom: 14px; }
.page-heading.is-workspace-heading h1 { font-size: var(--text-display-workspace); }
.page-heading.is-workspace-heading .eyebrow { margin-bottom: 5px; font-size: var(--text-xs); }
.page-heading.is-workspace-heading .description { margin-top: 7px; font-size: var(--text-sm); }
.page-heading.is-workspace-heading .role-row { margin-top: 8px; }
.page-heading.is-workspace-heading .department-watermark { bottom: -22px; font-size: clamp(84px, 11vw, 130px); }
.page-heading.is-workspace-heading + .tabs { margin-bottom: 14px; }
.department-watermark { position: absolute; right: 0; bottom: -28px; color: transparent; font-size: clamp(100px, 14vw, 190px); font-weight: 900; letter-spacing: -0.09em; line-height: 1; -webkit-text-stroke: 1px var(--border); user-select: none; }
.role-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 15px; }
.role-chip, .scope-chip, .status-chip { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); font-size: 11px; font-weight: 700; }
.role-chip:not(:last-child)::after { content: "/"; margin: 0 8px; color: var(--border-strong); }
.scope-chip { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--border-strong); color: var(--text); }
.status-chip { padding: 3px 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }

.tabs { display: flex; width: 100%; min-width: 0; max-width: 100%; gap: var(--space-6); margin-bottom: var(--space-7); overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-padding-inline: 0 28px; scroll-snap-type: x proximity; scrollbar-width: thin; border-bottom: 1px solid var(--border); }
.tab-button { position: relative; min-height: 46px; flex: 0 0 auto; padding: 0 0 12px; border: 0; background: transparent; color: var(--muted); font-size: var(--text-md); font-weight: var(--weight-semibold); scroll-snap-align: start; white-space: nowrap; }
.tab-button::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.tab-button:hover { color: var(--text); }
.tab-button[aria-current="page"] { color: var(--text); }
.tab-button[aria-current="page"]::after { background: var(--accent); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 26px; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.stat-card { min-height: 106px; padding: 20px 24px; border-right: 1px solid var(--border); background: transparent; }
.stat-card:last-child { border-right: 0; }
.stat-card span { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 10px; font-size: var(--text-3xl); font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--border); }
.module-card { position: relative; min-height: 180px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; column-gap: 16px; padding: 22px; background: var(--surface-strong); transition-property: background-color, transform; transition-duration: 150ms; transition-timing-function: ease-out; }
.module-card:hover:not(.is-locked) { z-index: 1; background: var(--surface); }
.module-icon { grid-row: 1 / span 3; color: var(--accent); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-wide); }
.module-card h2 { grid-column: 2; grid-row: 1; margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.module-card p { grid-column: 2; grid-row: 2; max-width: 440px; margin: 8px 0 20px; color: var(--muted); font-size: var(--text-md); }
.module-card .status-chip { grid-column: 2; grid-row: 3; justify-self: start; align-self: end; border: 0; padding: 0; background: transparent; color: var(--subtle); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; }
.module-card.is-locked { background: color-mix(in srgb, var(--surface) 65%, var(--bg)); }
.module-card.is-locked .module-icon, .module-card.is-locked h2, .module-card.is-locked p { opacity: 0.45; }
.module-card.is-locked .status-chip { color: var(--danger); }
.module-link { position: relative; grid-column: 3; grid-row: 1 / span 3; align-self: center; width: 42px; height: 42px; overflow: hidden; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: transparent; white-space: nowrap; }
.module-link .ui-icon { position: absolute; top: 50%; left: 50%; display: block; color: var(--text); transform: translate(-50%, -50%); }
.module-link:hover { border-color: var(--accent); background: var(--accent); }
.panel, .assignment-card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-strong); }
.panel { padding: var(--panel-padding); margin-top: var(--section-gap); }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.panel-header h2 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.permission-summary { display: flex; flex-wrap: wrap; gap: 0; }
.permission-pill { padding: 6px 10px; border-right: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); }
.permission-pill:first-child { padding-left: 0; }
.permission-pill:last-child { border-right: 0; }
.security-note { margin-top: 20px; border-color: var(--border); color: var(--muted); }

.schedule-page { display: grid; gap: 20px; }
.schedule-toolbar { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 27px 28px; overflow: hidden; border: 1px solid #272a22; border-radius: var(--radius-md); background: #151712; color: #f2f1ea; }
.schedule-toolbar::after { content: ""; position: absolute; top: 0; right: 0; width: 32%; height: 4px; background: var(--accent); }
.schedule-toolbar h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); text-transform: capitalize; }
.schedule-toolbar p:not(.eyebrow) { margin: 8px 0 0; color: #9da194; font-size: var(--text-sm); }
.schedule-toolbar .eyebrow { color: #ff9b82; }
.schedule-hero-actions { position: relative; z-index: 1; display: grid; justify-items: end; gap: 10px; }
.schedule-bulk-trigger { min-width: 188px; }
.period-actions { position: relative; z-index: 1; display: flex; gap: 5px; }
.schedule-toolbar .secondary-button { border-color: #363a30; background: #1f221b; color: #f2f1ea; }
.schedule-toolbar .secondary-button:hover:not(:disabled) { border-color: #5b6051; background: #292c24; }
.period-actions .secondary-button:first-child, .period-actions .secondary-button:last-child { min-width: 44px; padding-inline: 11px; font-size: 17px; }
.schedule-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.schedule-summary-card { min-width: 0; padding: 17px 20px; border-right: 1px solid var(--border); background: transparent; }
.schedule-summary-card:last-child { border-right: 0; }
.schedule-summary-card span, .schedule-summary-card small { display: block; color: var(--muted); font-size: var(--text-xs); }
.schedule-summary-card span { font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.schedule-summary-card strong { display: block; margin: 7px 0 2px; font-size: var(--text-3xl); font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); }
.organization-heading .department-watermark { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -0.08em; }
.summary-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.summary-toolbar h2 { margin: 0; font-size: var(--text-2xl); letter-spacing: var(--tracking-heading); }
.summary-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.summary-toolbar-actions { display: flex; align-items: flex-end; gap: 14px; }
.summary-toolbar .operation-status { max-width: 220px; margin: 0 0 10px; }
.compact-field { margin: 0; }
.compact-field select, .compact-field input { min-width: 128px; }
.organization-metrics { margin-bottom: 22px; }
.summary-table { margin-top: 22px; }
.summary-table th[scope="row"] { color: var(--text); font-family: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 6px 15px; padding: 0 2px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; color: var(--muted); font-size: var(--text-xs); }
.legend-item strong { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 4px; background: var(--slot-bg); color: var(--slot-text); font-size: var(--text-xs); }
.schedule-scroll-hint { display: none; margin: -6px 0 0; color: var(--muted); }
.schedule-timeline { position: relative; width: 100%; max-width: 100%; overflow: clip; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); scrollbar-gutter: stable; overscroll-behavior-inline: contain; }
.schedule-grid { display: grid; width: 100%; min-width: 0; }
.schedule-grid.days-28, .schedule-grid.days-29, .schedule-grid.days-30, .schedule-grid.days-31 { grid-template-columns: clamp(118px, 16%, 190px) repeat(var(--schedule-days), minmax(0, 1fr)); }
.employee-heading, .day-heading, .employee-lane-label, .schedule-slot { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.employee-heading, .day-heading { position: sticky; top: 0; z-index: 4; min-height: 57px; background: #1a1d17; color: #f1f0e9; }
.employee-heading { left: 0; z-index: 6; display: flex; min-width: 0; align-items: center; padding: 10px clamp(8px, 1vw, 15px); overflow: hidden; color: #9da194; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.day-heading { display: grid; min-width: 0; place-items: center; align-content: center; overflow: hidden; line-height: 1.05; }
.day-heading strong { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.day-heading span { max-width: 100%; margin-top: 4px; overflow: hidden; color: #8f9387; font-size: var(--text-xs); text-overflow: clip; text-transform: uppercase; white-space: nowrap; }
.day-heading.is-weekend { background: #211916; }
.day-heading.is-today { box-shadow: inset 0 3px 0 var(--accent); color: #ff9b82; }
.employee-lane-label { position: sticky; left: 0; z-index: 3; display: flex; min-width: 0; min-height: 54px; flex-direction: column; justify-content: center; padding: 7px clamp(7px, 1vw, 14px); overflow: hidden; background: var(--surface-strong); }
.employee-lane-label strong, .employee-lane-label span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-lane-label strong { font-size: var(--text-sm); }
.employee-lane-label span { color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); }
.schedule-slot { position: relative; display: grid; width: auto; min-width: 0; min-height: 54px; padding: 0 1px; place-items: center; overflow: hidden; border-top: 0; border-left: 0; background: color-mix(in srgb, var(--slot-bg) 76%, var(--surface-strong)); color: var(--slot-text); font-size: var(--text-xs); }
.schedule-slot strong { max-width: 100%; overflow: hidden; text-overflow: clip; white-space: nowrap; }
button.schedule-slot { cursor: pointer; transition-property: box-shadow, filter, transform; transition-duration: 100ms; }
button.schedule-slot:hover { z-index: 2; box-shadow: inset 0 0 0 2px currentColor; filter: saturate(1.2); }
button.schedule-slot:active { transform: scale(0.94); }
.schedule-slot.is-weekend { background-image: linear-gradient(color-mix(in srgb, var(--text) 3%, transparent), color-mix(in srgb, var(--text) 3%, transparent)); }
.schedule-slot.is-today { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.slot-note { position: absolute; right: 4px; bottom: 1px; font-size: 12px; }
.is-blue { --slot-bg: #dce5ff; --slot-text: #284d9d; }
.is-violet { --slot-bg: #e9ddf5; --slot-text: #70439a; }
.is-indigo { --slot-bg: #dfe2f6; --slot-text: #4c579c; }
.is-gray { --slot-bg: #e3e5df; --slot-text: #656960; }
.is-sky { --slot-bg: #d7ecf4; --slot-text: #2c718b; }
.is-yellow { --slot-bg: #f6e5b9; --slot-text: #80580c; }
.is-orange { --slot-bg: #f6dcc8; --slot-text: #9b4d1d; }
.is-red { --slot-bg: #f4d8dc; --slot-text: #a13742; }
:root[data-theme="dark"] .is-blue, :root:not([data-theme]) .is-blue { --slot-bg: #172b53; --slot-text: #a9c4ff; }
:root[data-theme="dark"] .is-violet, :root:not([data-theme]) .is-violet { --slot-bg: #31213e; --slot-text: #d4aafa; }
:root[data-theme="dark"] .is-indigo, :root:not([data-theme]) .is-indigo { --slot-bg: #20264d; --slot-text: #aab4ff; }
:root[data-theme="dark"] .is-gray, :root:not([data-theme]) .is-gray { --slot-bg: #252821; --slot-text: #adb1a6; }
:root[data-theme="dark"] .is-sky, :root:not([data-theme]) .is-sky { --slot-bg: #173340; --slot-text: #8ed2e8; }
:root[data-theme="dark"] .is-yellow, :root:not([data-theme]) .is-yellow { --slot-bg: #392c10; --slot-text: #eec46d; }
:root[data-theme="dark"] .is-orange, :root:not([data-theme]) .is-orange { --slot-bg: #3b2516; --slot-text: #f1a26e; }
:root[data-theme="dark"] .is-red, :root:not([data-theme]) .is-red { --slot-bg: #3b1b20; --slot-text: #ef929a; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .is-blue { --slot-bg: #dce5ff; --slot-text: #284d9d; }
  :root:not([data-theme]) .is-violet { --slot-bg: #e9ddf5; --slot-text: #70439a; }
  :root:not([data-theme]) .is-indigo { --slot-bg: #dfe2f6; --slot-text: #4c579c; }
  :root:not([data-theme]) .is-gray { --slot-bg: #e3e5df; --slot-text: #656960; }
  :root:not([data-theme]) .is-sky { --slot-bg: #d7ecf4; --slot-text: #2c718b; }
  :root:not([data-theme]) .is-yellow { --slot-bg: #f6e5b9; --slot-text: #80580c; }
  :root:not([data-theme]) .is-orange { --slot-bg: #f6dcc8; --slot-text: #9b4d1d; }
  :root:not([data-theme]) .is-red { --slot-bg: #f4d8dc; --slot-text: #a13742; }
}
.schedule-policy-section.panel { margin-top: 0; padding: 0; overflow: hidden; }
.schedule-policy-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(115deg, color-mix(in srgb, var(--accent-soft) 42%, var(--surface-strong)), var(--surface-strong) 58%); }
.schedule-policy-heading h3 { margin: 2px 0 0; font-size: clamp(21px, 2vw, 28px); letter-spacing: var(--tracking-heading); }
.schedule-policy-heading p:not(.eyebrow) { max-width: 650px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.schedule-policy-heading .secondary-button { flex: 0 0 auto; }
.schedule-policy-table { border: 0; border-radius: 0; }
.schedule-policy-table table { min-width: 760px; }
.schedule-policy-table caption { padding: 12px 16px; background: var(--surface-muted); color: var(--subtle); font-size: 10px; text-align: left; }
.schedule-policy-table th,
.schedule-policy-table td { padding-block: 13px; vertical-align: middle; }
.schedule-policy-table tbody tr:last-child > * { border-bottom: 0; }
.schedule-workspace-state,
.schedule-members-state,
.schedule-policy-state { width: 100%; }
.schedule-policy-state--page { border-top: 1px solid var(--border); }
.schedule-skeleton { height: 220px; margin-top: 20px; border-radius: var(--radius-sm); background: var(--surface-muted); }

.schedule-dialog { width: min(92vw, 500px); max-width: none; max-height: 90dvh; padding: 0; overflow: auto; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow-overlay); }
.schedule-dialog::backdrop { background: var(--backdrop-modal); backdrop-filter: var(--backdrop-blur); }
.schedule-dialog form { padding: var(--dialog-padding-inline); }
.dialog-header { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { margin: 0; font-size: var(--text-2xl); letter-spacing: var(--tracking-heading); }
.dialog-header p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.schedule-bulk-dialog { width: min(92vw, 650px); }
.schedule-bulk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-5); }
.schedule-bulk-grid .is-wide { grid-column: 1 / -1; }
.schedule-bulk-mode { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.schedule-bulk-mode legend { margin-bottom: 8px; font-size: 12px; font-weight: 750; }
.schedule-bulk-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.schedule-bulk-mode-options label { position: relative; display: grid; min-height: 72px; align-content: center; gap: 3px; padding: 11px 12px 11px 39px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); cursor: pointer; transition: border-color 130ms ease-out, background-color 130ms ease-out, transform 130ms ease-out; }
.schedule-bulk-mode-options label:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.schedule-bulk-mode-options label:active { transform: scale(.98); }
.schedule-bulk-mode-options input { position: absolute; top: 50%; left: 13px; width: 16px; height: 16px; margin: -8px 0 0; accent-color: var(--accent-action); }
.schedule-bulk-mode-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.schedule-bulk-mode-options strong { font-size: 12px; }
.schedule-bulk-mode-options span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.schedule-pattern-field { margin-top: 15px; }
.schedule-pattern-field[hidden], .schedule-mass-calendar[hidden], .schedule-range-grid[hidden] { display: none; }
.schedule-mass-calendar { margin-top: 17px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-muted); }
.schedule-mass-calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.schedule-mass-calendar-header strong, .schedule-mass-calendar-header span { display: block; }
.schedule-mass-calendar-header strong { font-size: 13px; text-transform: capitalize; }
.schedule-mass-calendar-header span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.schedule-mass-presets { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.schedule-mass-presets .ghost-button { min-height: 36px; padding: 6px 9px; font-size: 10px; }
.schedule-mass-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(38px, 1fr)); gap: 5px; }
.schedule-mass-weekday { padding: 3px 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; text-transform: uppercase; }
.schedule-mass-calendar-spacer { min-height: 44px; }
.schedule-mass-day { min-width: 0; min-height: 44px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-strong); color: var(--text); font-size: 12px; font-weight: 700; transition: border-color 120ms ease-out, background-color 120ms ease-out, color 120ms ease-out, transform 120ms ease-out; }
.schedule-mass-day:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-hover); }
.schedule-mass-day:active:not(:disabled) { transform: scale(.94); }
.schedule-mass-day.is-selected { border-color: var(--accent-action); background: var(--accent-action); color: var(--accent-button-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-button-text) 22%, transparent); }
.schedule-mass-day.is-locked { opacity: .38; background: var(--surface-muted); text-decoration: line-through; }
.schedule-bulk-preview { min-height: 42px; margin: 16px 0 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); color: var(--muted); font-size: 12px; }
.schedule-bulk-error[hidden] { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 24px; }
.dialog-error { padding: 11px 12px; border-left: 3px solid var(--danger); background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.operation-status { min-height: 20px; margin: 12px 0 0; color: var(--state-success-text); font-size: 11px; }
.operation-status[role="alert"] { color: var(--state-danger-text); }
.icon-button { min-width: 44px; padding: 0; font-size: 25px; line-height: 1; }
.notification-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-drawer);
}
.notification-drawer[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.notification-drawer::backdrop, .policy-dialog::backdrop { background: var(--backdrop-modal); backdrop-filter: var(--backdrop-blur); }
.drawer-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-header h2 { margin: 0; font-size: var(--text-2xl); letter-spacing: var(--tracking-heading); }
.drawer-header .eyebrow { margin-bottom: 5px; }
.drawer-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px 8px 22px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.notification-list { min-height: 0; overflow: auto; padding: 8px 0 28px; }
.notification-list > .skeleton-line { margin-inline: 22px; }
.notification-item { position: relative; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: start; min-height: 92px; padding: 17px 14px 17px 18px; border-bottom: 1px solid var(--border); }
.notification-item.is-unread { background: color-mix(in srgb, var(--accent-soft) 32%, var(--surface-strong)); }
.notification-marker { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-marker { background: var(--accent); }
.notification-copy h3 { margin: 0; font-size: 13px; }
.notification-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.notification-copy small { display: block; margin-top: 8px; color: var(--subtle); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.notification-read { min-height: 44px; padding: 8px 9px; font-size: 10px; }
.notification-load-more { min-height: 44px; margin: 8px 14px 14px; }
.notification-load-more[hidden] { display: none; }
.compact-empty { padding: 30px 20px; }

.absence-page { display: grid; min-width: 0; gap: 20px; }
.absence-page > * { min-width: 0; }
.absence-toolbar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #272a22;
  border-radius: var(--radius-md);
  background: #151712;
  color: #f2f1ea;
}
.absence-toolbar::after { content: ""; position: absolute; top: 0; right: 0; width: 32%; height: 4px; background: var(--accent); }
.absence-toolbar h2 { margin: 0; font-size: var(--text-display-workspace); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.absence-toolbar p:not(.eyebrow) { margin: 8px 0 0; color: #9da194; font-size: 12px; }
.absence-toolbar .eyebrow { color: #ff9b82; }
.absence-toolbar .primary-button { position: relative; z-index: 1; flex: 0 0 auto; }
.absence-toolbar-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.absence-toolbar-actions .secondary-button { border-color: #363a30; background: #1f221b; color: #f2f1ea; }
.absence-filters { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.filter-button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.filter-button:hover { border-color: var(--border-strong); color: var(--text); }
.filter-button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.absence-list { display: grid; gap: 8px; }
.absence-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-strong); }
.absence-type-mark { display: grid; place-items: start center; padding-top: 22px; border-right: 1px solid var(--border); background: var(--surface); color: var(--accent); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); }
.absence-card-main { min-width: 0; padding: 20px 22px; }
.absence-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.absence-card h3 { margin: 0; font-size: var(--text-lg); letter-spacing: var(--tracking-heading); }
.absence-card-header p { margin: 3px 0 0; color: var(--muted); font-size: var(--text-xs); }
.absence-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 4px; font-size: var(--text-xs); font-weight: var(--weight-bold); }
.absence-status.is-pending { background: var(--state-warning-bg); color: var(--state-warning-text); box-shadow: inset 0 0 0 1px var(--state-warning-border); }
.absence-status.is-approved { background: var(--state-success-bg); color: var(--state-success-text); box-shadow: inset 0 0 0 1px var(--state-success-border); }
.absence-status.is-rejected { background: var(--state-danger-bg); color: var(--state-danger-text); box-shadow: inset 0 0 0 1px var(--state-danger-border); }
.absence-status.is-cancelled { background: var(--state-neutral-bg); color: var(--state-neutral-text); box-shadow: inset 0 0 0 1px var(--state-neutral-border); }
.absence-status.is-cancellation-pending { background: var(--state-warning-bg); color: var(--state-warning-text); box-shadow: inset 0 0 0 1px var(--state-warning-border); }
.absence-status.is-cancellation-rejected { border: 1px solid var(--state-danger-text); background: transparent; color: var(--state-danger-text); }
.absence-period { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 13px; margin-top: 16px; font-variant-numeric: tabular-nums; }
.absence-period strong { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.absence-period span { color: var(--muted); font-size: var(--text-xs); }
.absence-comment, .absence-decision { margin: 14px 0 0; padding: 11px 12px; border-left: 2px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-body); white-space: pre-wrap; }
.absence-decision { border-left-color: var(--accent); }
.absence-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--border); }
.absence-card-footer small { color: var(--subtle); font-family: var(--font-mono); font-size: var(--text-xs); }
.absence-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.absence-actions button { min-height: 44px; padding: 8px 12px; font-size: 11px; }
.danger-action { color: var(--danger); }
.absence-skeleton { height: 260px; margin-top: 20px; border-radius: var(--radius-sm); background: var(--surface-muted); }
.absence-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { color: var(--muted); font-size: var(--text-xs); }
.privacy-note { margin-top: 16px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 11px; }
.absence-dialog .dialog-header p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.advanced-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-strong); }
.advanced-filters select, .advanced-filters input { min-width: 0; }
.filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.filter-result-status { min-height: 18px; margin: -11px 0 -4px; color: var(--subtle); font-family: var(--font-mono); font-size: var(--text-xs); text-align: right; }
.balances-section { overflow: hidden; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); padding: 19px 0 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 2px 14px; }
.section-heading h2 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-legend { color: var(--subtle); font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; }
.balances-table { border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; }
.balances-table table { min-width: 680px; }
.balances-table th[scope="row"] strong, .balances-table th[scope="row"] small, .balance-cell strong, .balance-cell small { display: block; }
.balances-table th[scope="row"] { min-width: 210px; background: var(--surface-strong); color: var(--text); font-family: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; }
.balances-table th[scope="row"] small, .balance-cell small { margin-top: 3px; color: var(--subtle); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.balance-cell { min-width: 140px; font-variant-numeric: tabular-nums; }
.balance-cell strong { font-size: 13px; }
.balance-cell.is-low strong { color: var(--danger); }
.cancellation-state { margin-top: 14px; padding: 12px 13px; border-left: 3px solid var(--warning); background: var(--warning-soft); color: var(--warning); }
.cancellation-state strong { font-size: 11px; }
.cancellation-state p { margin: 4px 0 0; font-size: 11px; }
.warning-note, .cancellation-reason { display: grid; gap: 4px; margin-top: 18px; padding: 12px 13px; border-left: 3px solid var(--warning); background: var(--warning-soft); color: var(--text); font-size: 12px; }
.warning-note span, .cancellation-reason p { margin: 0; color: var(--muted); }
.cancellation-review-actions { flex-wrap: wrap; }

.policy-dialog { width: min(92vw, 820px); max-height: 92vh; padding: 0; overflow: auto; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow-overlay); }
.policy-table th[scope="row"] { color: var(--text); font-family: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; }
.policy-dialog-header { position: sticky; top: 0; z-index: 2; background: var(--dialog-chrome-bg); }
.policy-dialog-content { min-height: 400px; padding: 22px; }
.policy-dialog-content:has(> .schedule-policy-state--editor) { display: grid; }
.schedule-policy-editor-loading { display: grid; gap: var(--space-3); }
.policy-selector-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.policy-selector-row .field { width: min(100%, 360px); }
.version-chip { padding-bottom: 12px; color: var(--subtle); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.policy-editor-body { padding-top: 22px; }
.policy-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.policy-form-heading h3 { margin: 0; font-size: 21px; }
.policy-form-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.policy-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; margin-top: 20px; }
.policy-fields > .field { min-width: 0; margin-top: 0; }
.policy-fields :is(input, select) { width: 100%; min-width: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; color: var(--muted); font-size: 10px; font-weight: 600; }
.inline-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.policy-parts-field .inline-check { min-height: 24px; justify-self: start; margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-ui); white-space: nowrap; }
.policy-parts-field .inline-check input { flex: 0 0 16px; margin: 0; }

.access-toolbar { display: grid; grid-template-columns: minmax(220px, 420px) auto; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.access-toolbar .field { margin: 0; }
.access-toolbar .info-banner { align-self: end; border-top: 0; border-bottom: 0; border-left: 2px solid var(--accent); padding: 10px 13px; background: var(--surface); }
.access-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.access-legend { display: flex; align-items: center; gap: 10px; margin: -8px 0 16px; color: var(--muted); font-size: 11px; }
.assignment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.assignment-card { padding: 22px; transition: border-color 140ms ease-out; }
.assignment-card.is-dirty { border-color: var(--warning); }
.assignment-card.is-inactive { border-style: dashed; opacity: 0.82; }
.assignment-header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 17px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.assignment-header h2 { margin: 0; font-size: var(--text-lg); letter-spacing: var(--tracking-heading); }
.assignment-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.assignment-header .scope-chip { margin: 0; padding: 0; border: 0; color: var(--subtle); }
.permission-group { margin: 18px 0 0; padding: 0; border: 0; }
.permission-group legend { margin-bottom: 8px; color: var(--subtle); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.permission-option { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 8px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); font-size: 11px; }
.permission-option:hover { background: var(--surface); }
.permission-option:has(input:checked) { border-color: var(--border); background: var(--surface); color: var(--text); }
.permission-option input { width: 16px; height: 16px; accent-color: var(--accent); }
.assignment-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.assignment-footer small { color: var(--muted); }
.assignment-footer-buttons, .assignment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.danger-text-button { color: var(--danger); }
.scope-chip.is-danger { color: var(--danger); }
.account-dialog .dialog-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.wide-account-dialog { width: min(94vw, 760px); }
.account-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.account-status-toggle { min-height: 44px; display: flex; align-items: center; gap: 10px; margin-top: 20px; color: var(--text); font-size: 12px; font-weight: 700; }
.account-status-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.split-actions { justify-content: space-between; }
.split-actions > div { display: flex; gap: 7px; }

.workspace-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: var(--hero-block-min-height);
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: var(--hero-block-padding);
  overflow: hidden;
  border: 1px solid var(--hero-border);
  border-radius: var(--radius-lg);
  background: var(--hero-surface);
  color: var(--hero-text);
  box-shadow: var(--hero-shadow);
}
.workspace-hero::before {
  position: absolute;
  z-index: -1;
  top: var(--hero-watermark-top);
  right: var(--hero-watermark-right);
  color: var(--hero-watermark-color);
  font-family: var(--font-sans);
  font-size: var(--hero-watermark-size);
  font-weight: var(--hero-watermark-weight);
  letter-spacing: var(--hero-watermark-tracking);
  line-height: 1;
  content: attr(data-mark);
  pointer-events: none;
  user-select: none;
}
.workspace-hero > * { position: relative; z-index: 1; min-width: 0; max-width: 100%; }
.workspace-hero-copy { min-width: 0; max-width: 100%; display: grid; align-self: stretch; align-content: center; }
.workspace-hero h2 {
  max-width: 880px;
  margin: 4px 0 10px;
  font-size: var(--hero-title-size);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}
.workspace-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--hero-muted);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}
.workspace-hero .eyebrow { color: var(--hero-kicker); }
.workspace-hero-actions,
.workspace-hero > .access-actions {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.workspace-hero .secondary-button {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: #f4f3ed;
}
.workspace-hero .secondary-button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .1);
}
.workspace-hero.schedule-toolbar::after,
.workspace-hero.absence-toolbar::after { content: none; }
.access-hero,
.audit-hero { margin-bottom: 20px; }
.access-hero + .access-toolbar { grid-template-columns: minmax(260px, 520px); }

.psp-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: var(--hero-block-min-height); padding: var(--hero-block-padding); overflow: hidden; border: 1px solid var(--hero-border); border-radius: var(--radius-lg); background: var(--hero-surface); color: var(--hero-text); box-shadow: var(--hero-shadow); }
.psp-hero::before { content: "BD"; position: absolute; top: var(--hero-watermark-top); right: var(--hero-watermark-right); color: var(--hero-watermark-color); font-family: var(--font-sans); font-size: var(--hero-watermark-size); font-weight: var(--hero-watermark-weight); letter-spacing: var(--hero-watermark-tracking); line-height: 1; }
.psp-hero > * { position: relative; z-index: 1; min-width: 0; max-width: 100%; }
.psp-hero > :first-child { display: grid; align-self: stretch; align-content: center; }
.psp-hero h2 { margin: 4px 0 10px; font-size: var(--hero-title-size); line-height: var(--leading-tight); letter-spacing: var(--tracking-heading); }
.psp-hero p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--hero-muted); font-size: var(--text-md); line-height: var(--leading-relaxed); }
.psp-hero .eyebrow { color: var(--hero-kicker); }
@media (min-width: 901px) {
  .workspace-hero-copy h2,
  .psp-hero:is(.is-dashboard-view, .is-network-view) > :first-child > h2,
  .people-admin-hero:not(.people-admin-hero--unavailable) > :first-child > h2 {
    height: var(--hero-title-slot-height);
    display: flex;
    align-items: flex-start;
  }
}
.psp-hero.is-sheet-view { min-height: 154px; padding-block: 28px; }
.psp-hero.is-sheet-view h2 { font-size: var(--text-display-workspace); }
.psp-subnav { display: flex; width: 100%; min-width: 0; max-width: 100%; gap: 3px; margin: 22px 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-padding-inline: 0 28px; scroll-snap-type: x proximity; scrollbar-width: thin; border-bottom: 1px solid var(--border); }
.psp-subnav-button { min-height: 46px; flex: 0 0 auto; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: var(--text-md); font-weight: var(--weight-bold); scroll-snap-align: start; }
.psp-subnav-button:hover { color: var(--text); }
.psp-subnav-button[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }
.psp-content { min-width: 0; max-width: 100%; display: grid; gap: 20px; }
.psp-loading { padding: 28px; }
.psp-network-workspace-state,
.psp-network-list-state,
.psp-network-filter-state,
.psp-preoffers-list-state,
.psp-network-form-state { width: 100%; }
.psp-network-filter-state { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-muted); }
.psp-preoffers-list-state { border-top: 1px solid var(--border); background: var(--surface-muted); }
.psp-network-form-feedback { min-height: 20px; margin: 12px 0 0; color: var(--state-success-text); font-size: 11px; overflow-wrap: break-word; word-break: normal; text-wrap: pretty; }
.psp-network-form-state { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-muted); }
.psp-network-validation-message { margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--state-danger-border); border-radius: var(--radius-md); background: var(--danger-soft); color: var(--danger); font-size: var(--text-sm); line-height: var(--leading-body); overflow-wrap: anywhere; }
.psp-hero.is-dashboard-view { min-height: var(--hero-block-min-height); align-items: center; padding: var(--hero-block-padding); background: var(--hero-surface); }
.psp-hero.is-dashboard-view h2 { margin-block: 4px 8px; font-size: var(--text-display-hero); }
.psp-dashboard-toolbar { min-width: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-dashboard-toolbar-title { min-width: 160px; display: flex; align-items: center; gap: 10px; padding-bottom: 7px; }
.psp-dashboard-toolbar-title strong, .psp-dashboard-toolbar-title small { display: block; }
.psp-dashboard-toolbar-title strong { font-size: var(--text-sm); }
.psp-dashboard-toolbar-title small { margin-top: 2px; color: var(--muted); font-size: var(--text-xs); }
.psp-dashboard-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent); }
.psp-dashboard-filters { width: min(100%, 720px); display: grid; grid-template-columns: minmax(130px, .7fr) minmax(170px, 1fr) minmax(165px, .9fr) auto; align-items: end; gap: 7px; }
.psp-dashboard-filters .field { margin: 0; gap: 4px; }
.psp-dashboard-filters label { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.psp-dashboard-filters select, .psp-dashboard-filters button { min-height: 44px; font-size: var(--text-sm); }
.psp-dashboard-role-focus { position: relative; min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; padding: 22px 25px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border-strong)); border-radius: var(--radius-md); background: radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent-soft) 68%, transparent), transparent 36%), linear-gradient(115deg, color-mix(in srgb, var(--surface-muted) 88%, var(--accent-soft)), var(--surface-strong) 68%); }
.psp-dashboard-role-focus::after { position: absolute; right: -20px; bottom: -53px; color: color-mix(in srgb, var(--text) 3.5%, transparent); font-size: 118px; font-weight: 900; letter-spacing: -.09em; content: "FOCUS"; pointer-events: none; }
.psp-dashboard-role-focus > * { position: relative; z-index: 1; }
.psp-dashboard-role-focus .eyebrow { margin: 0 0 5px; }
.psp-dashboard-role-focus h3 { margin: 0; font-size: clamp(22px, 2.5vw, 31px); letter-spacing: var(--tracking-heading); text-wrap: balance; }
.psp-dashboard-role-focus p:last-child { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: var(--text-md); text-wrap: pretty; }
.psp-dashboard-focus-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.psp-dashboard-focus-meta span { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--surface) 74%, transparent); color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.psp-dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.psp-dashboard-metric { position: relative; min-width: 0; min-height: 154px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto; align-items: start; gap: 0 10px; padding: 18px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: linear-gradient(145deg, var(--surface-strong), color-mix(in srgb, var(--surface) 86%, var(--surface-strong))); color: var(--text); text-align: left; transition-property: transform, border-color, background-color, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.psp-dashboard-metric::after { position: absolute; inset: auto -30px -46px auto; width: 108px; height: 108px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 6%, transparent); content: ''; }
.psp-dashboard-metric:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 34%, var(--border-strong)); box-shadow: 0 14px 32px rgba(0, 0, 0, .12); }
.psp-dashboard-metric:active { transform: scale(.985); }
.psp-dashboard-metric:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-dashboard-metric-icon { grid-row: 1; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--accent-text); font-size: 15px; font-weight: 850; }
.psp-dashboard-metric-label { align-self: center; color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.psp-dashboard-metric strong { grid-column: 1 / -1; align-self: end; margin-top: 17px; font-size: var(--text-3xl); line-height: 1; letter-spacing: var(--tracking-heading); font-variant-numeric: tabular-nums; }
.psp-dashboard-metric small { grid-column: 1 / 3; align-self: end; margin-top: 7px; color: var(--muted); font-size: 11px; }
.psp-dashboard-metric-arrow { grid-column: 3; align-self: end; color: var(--subtle); font-size: 13px; transition: transform 150ms ease-out; }
.psp-dashboard-metric:hover .psp-dashboard-metric-arrow { transform: translate(2px, -2px); }
.psp-dashboard-metric.is-success .psp-dashboard-metric-icon { background: var(--success-soft); color: var(--success); }
.psp-dashboard-metric.is-warning .psp-dashboard-metric-icon { background: var(--warning-soft); color: var(--warning); }
.psp-dashboard-metric.is-danger .psp-dashboard-metric-icon { background: var(--danger-soft); color: var(--danger); }
.psp-dashboard-panel { min-width: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-dashboard-panel-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.psp-dashboard-panel-header .eyebrow { margin: 0 0 4px; }
.psp-dashboard-panel-header h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); text-wrap: balance; }
.psp-dashboard-panel-header > span { color: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.psp-dashboard-panel-header > span.is-danger { color: var(--danger); }
.psp-dashboard-primary-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 10px; }
.psp-dashboard-secondary-grid, .psp-dashboard-bottom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.psp-dashboard-coverage-list { display: grid; }
.psp-dashboard-coverage-row { min-height: 68px; display: grid; grid-template-columns: 48px minmax(180px, 1fr) 84px auto; align-items: center; gap: 12px; padding: 10px 15px; border-bottom: 1px solid var(--border); }
.psp-dashboard-coverage-row:last-child { border-bottom: 0; }
.psp-dashboard-coverage-row:hover { background: var(--surface-hover); }
.psp-dashboard-geo-code { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--accent-text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 850; }
.psp-dashboard-coverage-copy { min-width: 0; }
.psp-dashboard-coverage-copy strong, .psp-dashboard-coverage-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-dashboard-coverage-copy strong { font-size: 12px; }
.psp-dashboard-coverage-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.psp-dashboard-mini-track { height: 3px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: var(--surface-muted); }
.psp-dashboard-mini-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 44%, var(--success))); }
.psp-dashboard-health { text-align: right; }
.psp-dashboard-health strong, .psp-dashboard-health small { display: block; }
.psp-dashboard-health strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.psp-dashboard-health small { margin-top: 2px; color: var(--subtle); font-size: 9px; }
.psp-dashboard-row-action { min-width: 44px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 750; transition-property: border-color, background-color, color, transform; transition-duration: 130ms; transition-timing-function: ease-out; }
.psp-dashboard-row-action:hover { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.psp-dashboard-row-action:active { transform: scale(.96); }
.psp-dashboard-ring-wrap { min-height: 228px; display: grid; grid-template-columns: 142px 1fr; place-content: center; align-items: center; gap: 24px; padding: 24px; }
.psp-dashboard-ring { --dashboard-progress: 0deg; position: relative; width: 142px; height: 142px; display: grid; place-content: center; border-radius: 50%; background: radial-gradient(circle at center, var(--surface-strong) 57%, transparent 58%), conic-gradient(var(--success) var(--dashboard-progress), var(--surface-muted) 0); text-align: center; box-shadow: inset 0 0 0 1px var(--border); }
.psp-dashboard-ring strong, .psp-dashboard-ring span { position: relative; display: block; }
.psp-dashboard-ring strong { font-size: 31px; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.psp-dashboard-ring span { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.psp-dashboard-health-legend { display: grid; gap: 13px; }
.psp-dashboard-health-legend div { display: grid; grid-template-columns: 8px auto 1fr; align-items: center; gap: 7px; }
.psp-dashboard-health-legend span { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); }
.psp-dashboard-health-legend span.is-success { background: var(--success); }
.psp-dashboard-health-legend span.is-warning { background: var(--warning); }
.psp-dashboard-health-legend b { font-size: 15px; font-variant-numeric: tabular-nums; }
.psp-dashboard-health-legend small { color: var(--muted); font-size: 10px; }
.psp-dashboard-panel-action { width: calc(100% - 36px); margin: 0 18px 18px; }
.psp-dashboard-bars { display: grid; gap: 15px; padding: 20px 18px 22px; }
.psp-dashboard-bar-row { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(120px, 1fr) 30px; align-items: center; gap: 12px; }
.psp-dashboard-bar-copy strong, .psp-dashboard-bar-copy span { display: block; }
.psp-dashboard-bar-copy strong { font-size: 11px; }
.psp-dashboard-bar-copy span { margin-top: 2px; color: var(--subtle); font-size: 9px; }
.psp-dashboard-bar-track { height: 8px; overflow: hidden; border-radius: 5px; background: var(--surface-muted); }
.psp-dashboard-bar-fill { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--accent); transition: width 240ms ease-out; }
.psp-dashboard-bar-fill.is-neutral { background: var(--muted); }
.psp-dashboard-bar-fill.is-success { background: var(--success); }
.psp-dashboard-bar-fill.is-warning { background: var(--warning); }
.psp-dashboard-bar-row > b { color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.psp-dashboard-deadline-list, .psp-dashboard-queue-list, .psp-dashboard-signal-list { display: grid; }
.psp-dashboard-deadline-row { min-height: 61px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 15px; border-bottom: 1px solid var(--border); }
.psp-dashboard-deadline-row:last-child { border-bottom: 0; }
.psp-dashboard-deadline-row.is-overdue { background: color-mix(in srgb, var(--danger-soft) 32%, transparent); }
.psp-dashboard-deadline-date { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 780; }
.psp-dashboard-deadline-row.is-overdue .psp-dashboard-deadline-date { color: var(--danger); }
.psp-dashboard-deadline-row strong, .psp-dashboard-deadline-row small { display: block; }
.psp-dashboard-deadline-row strong { font-size: 11px; }
.psp-dashboard-deadline-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.psp-dashboard-queue-row { min-height: 64px; display: grid; grid-template-columns: 8px minmax(0, 1fr) minmax(105px, auto) auto; align-items: center; gap: 11px; padding: 9px 15px; border-bottom: 1px solid var(--border); }
.psp-dashboard-queue-row:last-child { border-bottom: 0; }
.psp-dashboard-queue-row:hover { background: var(--surface-hover); }
.psp-dashboard-queue-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.psp-dashboard-queue-row.is-blocked .psp-dashboard-queue-mark { background: var(--danger); }
.psp-dashboard-queue-row.is-queued .psp-dashboard-queue-mark, .psp-dashboard-queue-row.is-in_progress .psp-dashboard-queue-mark { background: var(--accent); }
.psp-dashboard-queue-row strong, .psp-dashboard-queue-row small { display: block; }
.psp-dashboard-queue-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.psp-dashboard-queue-row small { margin-top: 3px; color: var(--subtle); font-size: 10px; }
.psp-dashboard-queue-state { color: var(--muted); font-size: 10px; text-align: right; }
.psp-dashboard-signal-row { min-height: 64px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 15px; border-bottom: 1px solid var(--border); }
.psp-dashboard-signal-row:last-child { border-bottom: 0; }
.psp-dashboard-signal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.psp-dashboard-signal-row.is-unread .psp-dashboard-signal-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.psp-dashboard-signal-row strong, .psp-dashboard-signal-row small { display: block; }
.psp-dashboard-signal-row strong { font-size: 11px; }
.psp-dashboard-signal-row small { max-width: 480px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.psp-dashboard-signal-row time { color: var(--subtle); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.psp-dashboard-empty { min-height: 154px; display: grid; place-content: center; gap: 5px; padding: 24px; color: var(--muted); text-align: center; }
.psp-dashboard-empty strong { color: var(--text); font-size: 12px; }
.psp-dashboard-empty span { font-size: 10px; }
.psp-sheet-dashboard { --sheet-brand: var(--accent); --sheet-brand-strong: var(--sidebar); --sheet-brand-soft: color-mix(in srgb, var(--accent) 9%, var(--surface-strong)); overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); box-shadow: 0 18px 48px rgba(0, 0, 0, .08); }
.psp-sheet-dashboard-titlebar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 17px; background: linear-gradient(110deg, var(--sheet-brand-strong) 0%, var(--sidebar-soft) 64%, color-mix(in srgb, var(--sheet-brand) 72%, var(--sidebar)) 100%); color: var(--sidebar-text); }
.psp-sheet-dashboard-titlebar span:first-child { display: block; margin-bottom: 2px; color: rgba(255, 255, 255, .64); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.psp-sheet-dashboard-titlebar h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.psp-sheet-dashboard-titlebar .psp-sheet-dashboard-live { margin: 0; color: color-mix(in srgb, var(--accent) 36%, white); font-size: 10px; letter-spacing: .05em; }
.psp-sheet-dashboard-datebar { min-height: 68px; display: grid; grid-template-columns: minmax(145px, 220px) minmax(145px, 220px) 1fr; align-items: end; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--sheet-brand-soft); }
.psp-sheet-dashboard-datebar > p { align-self: center; justify-self: end; margin: 0; color: var(--muted); font-size: 10px; }
.psp-sheet-dashboard-filterbar { display: grid; grid-template-columns: repeat(6, minmax(112px, 1fr)) auto; align-items: end; gap: 7px; padding: 10px 16px 13px; border-bottom: 1px solid var(--border-strong); background: color-mix(in srgb, var(--sheet-brand-soft) 48%, var(--surface-strong)); }
.psp-sheet-dashboard-field { min-width: 0; display: grid; gap: 4px; }
.psp-sheet-dashboard-field label { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-bold); line-height: var(--leading-ui); }
.psp-sheet-dashboard-field input, .psp-sheet-dashboard-field select { min-width: 0; min-height: 40px; padding-inline: 10px; border-color: var(--border); border-radius: 5px; background: var(--surface-strong); font-size: var(--text-sm); }
.psp-sheet-dashboard-field input:focus-visible, .psp-sheet-dashboard-field select:focus-visible { outline: var(--focus-outline); outline-offset: 1px; box-shadow: var(--focus-ring); }
.psp-sheet-dashboard-reset { min-height: 40px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 5px; background: transparent; color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-bold); white-space: nowrap; }
.psp-sheet-dashboard-reset:hover { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.psp-sheet-dashboard-reset:active { transform: scale(.97); }
.psp-sheet-dashboard-transitions { border-bottom: 1px solid var(--border-strong); }
.psp-sheet-dashboard-transitions > h4, .psp-sheet-dashboard-summary > header { margin: 0; background: var(--sheet-brand-soft); }
.psp-sheet-dashboard-transitions > h4 { padding: 7px 16px; color: var(--accent-text); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.psp-sheet-dashboard-transition-row { min-height: 48px; display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: stretch; border-top: 1px solid var(--border); }
.psp-sheet-dashboard-transition-row > strong { display: flex; align-items: center; padding: 10px 16px; border-right: 1px solid var(--border); color: var(--text); font-size: 11px; }
.psp-sheet-dashboard-transition-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 7px 9px; }
.psp-sheet-dashboard-transition-row.is-preoffers { background: color-mix(in srgb, var(--warning-soft) 44%, transparent); }
.psp-sheet-dashboard-link { min-height: 34px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 10px; text-decoration: underline; text-underline-offset: 3px; transition-property: transform, border-color, background-color; transition-duration: 130ms; transition-timing-function: ease-out; }
.psp-sheet-dashboard-link:hover { border-color: color-mix(in srgb, var(--sheet-brand) 58%, var(--border)); background: var(--sheet-brand-soft); }
.psp-sheet-dashboard-link:active { transform: scale(.97); }
.psp-sheet-dashboard-link.is-preoffers { background: color-mix(in srgb, var(--warning-soft) 70%, var(--surface)); }
.psp-sheet-dashboard-summary > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 16px; border-bottom: 1px solid var(--border-strong); }
.psp-sheet-dashboard-summary > header h4 { margin: 0; color: var(--accent-text); font-size: 12px; letter-spacing: .02em; }
.psp-sheet-dashboard-summary > header span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.psp-sheet-dashboard-table-wrap { max-width: 100%; overflow: auto; scrollbar-gutter: stable; overscroll-behavior-inline: contain; }
.psp-sheet-dashboard-table { width: 100%; min-width: 1160px; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.psp-sheet-dashboard-table th, .psp-sheet-dashboard-table td { min-height: 38px; padding: 9px 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.psp-sheet-dashboard-table th:last-child, .psp-sheet-dashboard-table td:last-child { border-right: 0; }
.psp-sheet-dashboard-table tbody tr:last-child td { border-bottom: 0; }
.psp-sheet-dashboard-table thead th { position: sticky; top: 0; z-index: 2; border-color: rgb(255 255 255 / .1); background: var(--sidebar-soft); color: var(--sidebar-text); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); line-height: var(--leading-ui); }
.psp-sheet-dashboard-table thead th:first-child { left: 0; z-index: 4; }
.psp-sheet-dashboard-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-muted) 48%, var(--surface-strong)); }
.psp-sheet-dashboard-table tbody tr:hover td { background: var(--sheet-brand-soft); }
.psp-sheet-dashboard-table tbody td:first-child { position: sticky; left: 0; z-index: 1; min-width: 170px; background: var(--surface-strong); text-align: left; }
.psp-sheet-dashboard-table tbody tr:nth-child(even) td:first-child { background: color-mix(in srgb, var(--surface-muted) 48%, var(--surface-strong)); }
.psp-sheet-dashboard-table tbody tr:hover td:first-child { background: var(--sheet-brand-soft); }
.psp-sheet-dashboard-table td.is-rate { color: var(--text); font-weight: 700; }
.psp-sheet-dashboard-geo-button { min-width: 100%; min-height: 40px; display: flex; align-items: center; gap: 7px; padding: 5px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--text); text-align: left; }
.psp-sheet-dashboard-geo-button:hover { background: color-mix(in srgb, var(--sheet-brand) 10%, transparent); }
.psp-sheet-dashboard-geo-button strong { color: var(--accent-text); font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.psp-sheet-dashboard-geo-button span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.psp-sheet-dashboard-empty { min-height: 190px; display: grid; place-content: center; gap: 5px; padding: 24px; color: var(--muted); text-align: center; }
.psp-sheet-dashboard-empty strong { color: var(--text); font-size: 13px; }
.psp-sheet-dashboard-empty span { font-size: 10px; }
.psp-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-metric { min-width: 0; padding: 24px; border-right: 1px solid var(--border); }
.psp-metric:last-child { border-right: 0; }
.psp-metric span, .psp-metric small { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.psp-metric strong { display: block; margin: 13px 0 7px; font-size: var(--text-4xl); line-height: 1; letter-spacing: var(--tracking-heading); }
.psp-metric small { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-label); text-transform: none; }
.psp-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 20px; }
.psp-spotlight { padding: 34px; background: linear-gradient(145deg, var(--surface-strong), var(--surface)); }
.psp-spotlight h2 { max-width: 520px; margin: 5px 0 12px; font-size: var(--text-3xl); letter-spacing: var(--tracking-heading); }
.psp-spotlight > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.psp-coverage { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.psp-coverage span { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.psp-attention { padding: 24px; }
.psp-attention .panel-header { margin-bottom: 3px; }
.psp-count { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 850; }
.psp-attention-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.psp-attention-row:last-child { border-bottom: 0; }
.psp-attention-row strong, .psp-attention-row span { display: block; }
.psp-attention-row > div > span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.muted-copy { color: var(--muted); }
.psp-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; background: var(--state-neutral-bg); color: var(--state-neutral-text); box-shadow: inset 0 0 0 1px var(--state-neutral-border); font-size: var(--text-xs); font-weight: var(--weight-heavy); white-space: nowrap; }
.psp-status.is-active, .psp-status.is-approved { background: var(--state-success-bg); color: var(--state-success-text); box-shadow: inset 0 0 0 1px var(--state-success-border); }
.psp-status.is-due_diligence, .psp-status.is-under_review, .psp-status.is-testing { background: var(--state-warning-bg); color: var(--state-warning-text); box-shadow: inset 0 0 0 1px var(--state-warning-border); }
.psp-status.is-suspended, .psp-status.is-rejected, .psp-status.is-expired { background: var(--state-danger-bg); color: var(--state-danger-text); box-shadow: inset 0 0 0 1px var(--state-danger-border); }
.psp-reference-status-select { min-width: 142px; min-height: 34px; padding: 6px 34px 6px 10px; border-width: 1px; border-style: solid; border-radius: 999px; font-size: 10px; font-weight: 800; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.psp-reference-status-select.is-active { border-color: var(--state-success-border); background-color: var(--state-success-bg); color: var(--state-success-text); }
.psp-reference-status-select.is-inactive { border-color: var(--state-danger-border); background-color: var(--state-danger-bg); color: var(--state-danger-text); }
.psp-reference-status-select:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-reference-status-select:disabled { cursor: not-allowed; opacity: var(--control-disabled-field-opacity); }
.psp-reference-row.is-inactive td:not(:nth-child(4)) { color: var(--muted); }
.psp-table table { min-width: 920px; }
.psp-table caption { padding: 19px 16px; font-size: 16px; letter-spacing: -.02em; }
.psp-table td { vertical-align: middle; }
.psp-table td strong { display: block; font-size: 12px; }
.psp-subline { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.psp-search-priority-table table { min-width: 1160px; }
.psp-search-priority-table th:last-child,
.psp-search-priority-table td:last-child { min-width: 240px; }
.psp-priority-requester-cell { padding-block: 10px; }
.psp-priority-requesters { display: grid; gap: 7px; }
.psp-priority-requester {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-muted) 68%, transparent);
}
.psp-priority-requester-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
}
.psp-priority-requester-copy { min-width: 0; }
.psp-priority-requester-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--text-sm);
  line-height: var(--leading-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psp-priority-requester-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psp-priority-manual-source {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  white-space: nowrap;
}
.psp-inline-select { min-width: 140px; min-height: 40px; padding: 6px 28px 6px 9px; font-size: var(--text-xs); font-weight: var(--weight-bold); }
.psp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.psp-dialog { width: min(94vw, 880px); }
.psp-dialog input[type="url"] { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-strong); padding: 9px 12px; }
.psp-commercial-dialog { width: min(96vw, 1080px); }
.psp-commercial-dialog .dialog-header p:last-child { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.psp-request-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.psp-request-dialog-header h2 { margin: 6px 0; }
.psp-request-dialog-header p:last-child { margin: 0; color: var(--muted); }
.psp-request-operational-strip,
.request-workflow-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--border);
}
.psp-request-operational-strip > div,
.request-workflow-summary > div {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface-strong);
}
.psp-request-operational-strip span,
.request-workflow-summary dt {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.psp-request-operational-strip strong,
.request-workflow-summary dd {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.request-workflow-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.psp-request-section-title {
  margin: 22px 0 12px;
  font-size: 13px;
  letter-spacing: .02em;
}
.psp-provider-card-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(960px, calc(100vw - 248px));
  max-width: 100vw;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-drawer);
}
.psp-provider-card-dialog::backdrop { background: var(--backdrop-modal); backdrop-filter: var(--backdrop-blur); }
.psp-provider-card-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: 100%; min-width: 0; height: 100%; overflow: hidden; }
.psp-provider-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: start;
  padding: var(--space-7) var(--space-8) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--dialog-chrome-bg);
}
.psp-provider-card-heading { min-width: 0; }
.psp-provider-card-heading .eyebrow { margin-bottom: 9px; color: var(--accent-text); }
.psp-provider-card-heading h2 { margin: 0; font-size: var(--text-display-workspace); letter-spacing: var(--tracking-heading); line-height: var(--leading-tight); text-wrap: balance; }
.psp-provider-card-heading h2:focus { outline: none; box-shadow: none; }
.psp-provider-card-heading h2:focus-visible { border-radius: 5px; outline: var(--focus-outline); outline-offset: 4px; box-shadow: var(--focus-ring); }
.psp-provider-card-heading > p:not(.eyebrow) { max-width: 680px; margin: 10px 0 0; color: var(--muted); font-size: 13px; text-wrap: pretty; }
.psp-provider-card-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.psp-provider-card-header-meta > span:not(.psp-status, .psp-contact-chip) { padding-left: 12px; border-left: 1px solid var(--border); }
.psp-provider-card-header-actions { display: flex; gap: 8px; align-items: center; }
.psp-provider-card-header-actions .primary-button { min-height: 44px; }
.psp-provider-card-nav {
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 9px 34px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  scrollbar-width: none;
}
.psp-provider-card-nav::-webkit-scrollbar { display: none; }
.psp-provider-card-nav button {
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
  transition-property: background-color, color, transform;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.psp-provider-card-nav button:hover { background: var(--surface-hover); color: var(--text); }
.psp-provider-card-nav button:active { transform: scale(.97); }
.psp-provider-card-nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.psp-provider-card-body { min-width: 0; min-height: 0; padding: 30px 34px 52px; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.psp-provider-card-section { scroll-margin-top: 18px; }
.psp-provider-card-section + .psp-provider-card-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.psp-provider-card-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.psp-provider-card-section-heading .eyebrow { margin: 0 0 5px; }
.psp-provider-card-section-heading h3 { margin: 0; font-size: var(--text-2xl); letter-spacing: var(--tracking-heading); text-wrap: balance; }
.psp-provider-section-copy { max-width: 680px; margin: 7px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-body); }
.psp-provider-card-heading-actions { display: flex; align-items: center; gap: 10px; }
.psp-card-updated { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.psp-card-section-count { display: grid; place-items: center; min-width: 34px; height: 34px; padding-inline: 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.psp-provider-card-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--panel-border); border-radius: var(--radius-md); background: var(--panel-surface); }
.psp-card-metric { min-width: 0; padding: 19px 18px; border-right: 1px solid var(--border); }
.psp-card-metric:last-child { border-right: 0; }
.psp-card-metric span, .psp-card-metric small { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.psp-card-metric span { font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.psp-card-metric strong { display: block; margin: 10px 0 5px; font-size: 27px; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.psp-provider-card-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.psp-provider-card-overview-grid.is-source-profile { grid-template-columns: 1fr; }
.psp-provider-card-block { padding: 22px; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--card-surface); }
.psp-provider-card-block h4 { margin: 0 0 18px; font-size: var(--text-md); letter-spacing: var(--tracking-heading); }
.psp-provider-card-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; margin: 0; }
.psp-card-detail { min-width: 0; }
.psp-card-detail dt { margin-bottom: 5px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.psp-card-detail dd { min-width: 0; margin: 0; color: var(--text); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.psp-card-detail a { color: var(--accent-text); font-weight: 680; text-decoration: none; }
.psp-card-detail a:hover { text-decoration: underline; text-underline-offset: 3px; }
.psp-card-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.psp-provider-card-note { margin-top: 12px; padding: 18px 20px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-strong); }
.psp-provider-card-note span { color: var(--subtle); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.psp-provider-card-note p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.psp-provider-method-list { min-width: 0; display: grid; gap: 11px; }
.psp-provider-method-card { min-width: 0; overflow: hidden; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--card-surface); }
.psp-provider-method-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; }
.psp-provider-method-title { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.psp-provider-method-title h4 { margin: 0; font-size: var(--text-base); letter-spacing: var(--tracking-heading); }
.psp-provider-method-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.psp-card-compact-action { min-height: 40px; padding: 8px 12px; font-size: 10px; }
.psp-provider-method-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 11px 20px; border-block: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 9px; }
.psp-provider-terms { display: grid; width: 100%; max-width: 100%; }
.psp-provider-term-card { border-bottom: 1px solid var(--border); }
.psp-provider-term-card:last-child { border-bottom: 0; }
.psp-provider-term-card > summary { display: grid; grid-template-columns: minmax(170px, 1.6fr) minmax(150px, 1.35fr) repeat(2, minmax(90px, 1fr)); gap: 12px; align-items: start; padding: 15px 44px 15px 20px; cursor: pointer; list-style: none; position: relative; }
.psp-provider-term-card > summary::-webkit-details-marker { display: none; }
.psp-provider-term-card > summary::after { content: "+"; position: absolute; top: 17px; right: 20px; color: var(--muted); font-size: 16px; line-height: 1; }
.psp-provider-term-card[open] > summary::after { content: "−"; }
.psp-provider-term-card > summary:hover { background: var(--surface-hover); }
.psp-provider-term-card > summary:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); box-shadow: var(--focus-ring); }
.psp-provider-term-card > summary > div { min-width: 0; }
.psp-provider-term-card > summary > div > span { display: block; margin-bottom: 4px; color: var(--subtle); font-size: 8px; font-weight: 720; letter-spacing: .055em; text-transform: uppercase; }
.psp-provider-term-card > summary > div > strong { display: block; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.psp-provider-term-identity > span { margin-top: 4px; color: var(--muted) !important; font-weight: 500 !important; letter-spacing: 0 !important; text-transform: none !important; }
.psp-provider-term-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; margin: 0; padding: 20px; border-top: 1px solid var(--border); background: var(--surface); }
.psp-provider-card-state { border: 1px dashed var(--panel-border); border-radius: var(--radius-md); background: var(--panel-surface); }
.psp-provider-card-state--section { min-height: 140px; padding: 24px; }
.psp-provider-card-state--inline { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
.psp-provider-card-state--unavailable { min-height: 140px; margin-top: 4px; }
.psp-provider-desired-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.psp-provider-desired-card { min-width: 0; padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); border-radius: var(--radius-md); background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 34%, var(--surface-strong)), var(--surface-strong) 58%); }
.psp-provider-desired-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.psp-provider-desired-card header p { margin: 0 0 5px; color: var(--accent-text); font-size: 9px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.psp-provider-desired-card h4 { margin: 0; font-size: 14px; }
.psp-provider-desired-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.psp-provider-desired-rates .psp-card-metric { padding: 15px; }
.psp-provider-desired-rates .psp-card-metric strong { font-size: 20px; }
.psp-provider-desired-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.psp-provider-preoffer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.psp-provider-preoffer-card { padding: 20px; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--card-surface); }
.psp-provider-preoffer-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.psp-provider-preoffer-card header p { margin: 0 0 5px; color: var(--accent-text); font-size: 9px; }
.psp-provider-preoffer-card h4 { margin: 0; font-size: 14px; }
.psp-provider-preoffer-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; margin-top: 16px; }
.psp-provider-preoffer-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
.psp-provider-history { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.psp-provider-history::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 5px; width: 1px; background: var(--border-strong); }
.psp-provider-history-item { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 15px; padding: 0 0 22px; }
.psp-provider-history-item:last-child { padding-bottom: 0; }
.psp-provider-history-mark { z-index: 1; width: 11px; height: 11px; margin-top: 4px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.psp-provider-history-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.psp-provider-history-title strong { font-size: 12px; }
.psp-provider-history-title span { padding: 3px 6px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 8px; }
.psp-provider-history-item p { margin: 4px 0 2px; color: var(--muted); font-size: 10px; }
.psp-provider-history-item time { color: var(--subtle); font-size: 9px; font-variant-numeric: tabular-nums; }
.psp-provider-card-loading { display: grid; gap: 12px; padding-top: 4px; }
.psp-card-loading-line, .psp-card-loading-panel { display: block; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-muted), var(--surface-hover), var(--surface-muted)); background-size: 240% 100%; animation: psp-card-shimmer 1.2s ease-in-out infinite; }
.psp-card-loading-line { width: 45%; height: 18px; }
.psp-card-loading-line.wide { width: 70%; height: 30px; }
.psp-card-loading-panel { height: 240px; margin-top: 10px; }
@keyframes psp-card-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .psp-provider-card-nav button { transition-duration: 0s; }
  .psp-card-loading-line, .psp-card-loading-panel { animation: none; }
}
.psp-table-action { min-height: 40px; padding: 7px 10px; font-size: 10px; }
.psp-form-section { margin-top: 25px; padding-top: 4px; }
.psp-form-section + .psp-form-section { border-top: 1px solid var(--border); padding-top: 22px; }
.psp-form-section h3 { margin: 0 0 -4px; font-size: var(--text-base); letter-spacing: var(--tracking-heading); }
.psp-kzt-section { position: relative; }
.psp-kzt-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.psp-kzt-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border)); border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.psp-capabilities { display: grid; gap: 18px; }
.psp-capability-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.psp-capability-group legend { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 750; }
.psp-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.psp-capability-option { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: 11px; cursor: pointer; }
.psp-capability-option:hover { border-color: var(--border-strong); background: var(--surface-hover); color: var(--text); }
.psp-capability-option:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); color: var(--accent-text); }
.psp-capability-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.psp-sheet-workspace { min-width: 0; max-width: 100%; }
.psp-sheet-main { min-width: 0; max-width: 100%; display: grid; gap: 10px; }
.psp-sheet-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 13px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-sheet-title { min-width: 180px; display: flex; align-items: center; gap: 10px; }
.psp-sheet-title strong, .psp-sheet-title small { display: block; }
.psp-sheet-title strong { font-size: 13px; }
.psp-sheet-title small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.sheet-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--accent); font-size: 18px; }
.psp-sheet-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .8fr) minmax(125px, .6fr) auto auto; align-items: end; gap: 7px; }
.psp-sheet-filters .field { margin: 0; gap: 4px; }
.psp-sheet-filters .field label { font-size: 9px; color: var(--muted); }
.psp-sheet-filters input, .psp-sheet-filters select { min-height: var(--control-height-sm); padding-block: var(--control-padding-block); font-size: 11px; }
.psp-sheet-filters .ghost-button { min-height: var(--control-height-sm); }
.psp-sheet-count { align-self: center; min-width: 58px; margin: 0; color: var(--muted); font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.psp-method-sheet { max-width: 100%; max-height: min(66vh, 720px); overflow-x: auto; overscroll-behavior-inline: contain; border-radius: 5px; }
.psp-method-sheet table { min-width: 1860px; table-layout: auto; }
.psp-method-sheet caption { height: 1px; padding: 0; overflow: hidden; color: transparent; font-size: 1px; }
.psp-method-sheet th, .psp-method-sheet td { height: 43px; padding: 8px 10px; }
.psp-method-sheet th { z-index: 3; background: var(--surface-muted); box-shadow: inset 0 -1px var(--border-strong); }
.psp-method-sheet th { white-space: nowrap; }
.psp-method-sheet td { font-size: var(--text-sm); line-height: var(--leading-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: normal; }
.psp-method-sheet tbody tr.is-selected td { background: var(--accent-soft); }
.psp-method-sheet tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 var(--accent); }
.psp-method-sheet .psp-row-number { position: sticky; left: 0; z-index: 2; width: 44px; min-width: 44px; background: var(--surface); color: var(--subtle); text-align: center; }
.psp-method-sheet th:first-child { position: sticky; left: 0; z-index: 5; width: 44px; min-width: 44px; }
.psp-method-sheet .psp-sticky-provider { position: sticky; left: 44px; z-index: 2; min-width: 170px; background: var(--surface-strong); box-shadow: 1px 0 var(--border); }
.psp-method-sheet th:nth-child(2) { position: sticky; left: 44px; z-index: 5; min-width: 170px; box-shadow: 1px 0 var(--border-strong); }
.psp-method-sheet tbody tr:hover .psp-row-number, .psp-method-sheet tbody tr:hover .psp-sticky-provider { background: var(--surface-hover); }
.psp-method-sheet tbody tr.is-selected .psp-row-number, .psp-method-sheet tbody tr.is-selected .psp-sticky-provider { background: var(--accent-soft); }
.psp-sheet-edit { min-height: var(--control-height-sm); padding: var(--control-padding-block) var(--control-padding-inline); color: var(--accent-text); font-size: 10px; }
.psp-filter-empty { padding: 26px; border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--muted); text-align: center; }
.psp-method-dialog { width: min(1120px, calc(100vw - 40px)); max-width: 1120px; height: min(880px, calc(100dvh - 36px)); max-height: calc(100dvh - 36px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow-overlay); }
.psp-method-dialog::backdrop { background: var(--backdrop-modal); backdrop-filter: var(--backdrop-blur); }
.psp-sheet-editor-form { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px; }
.psp-sheet-editor-header { position: sticky; z-index: 4; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 -28px; padding: 24px 28px 20px; border-bottom: 1px solid var(--border); background: var(--dialog-chrome-bg); backdrop-filter: blur(14px); }
.psp-sheet-editor-heading { min-width: 0; }
.psp-sheet-editor-header .eyebrow { margin-bottom: 5px; }
.psp-sheet-editor-header h2 { margin: 0; font-size: var(--text-display-workspace); letter-spacing: var(--tracking-heading); text-wrap: balance; }
.psp-sheet-editor-header p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; text-wrap: pretty; }
.psp-method-dialog-close { flex: 0 0 auto; min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.psp-method-dialog-close:hover { border-color: var(--border-strong); background: var(--surface-hover); color: var(--text); }
.psp-method-dialog-close:active { transform: scale(.96); }
.psp-sheet-editor .psp-form-section { margin-top: 26px; }
.psp-sheet-editor .psp-form-section + .psp-form-section { padding-top: 24px; }
.psp-sheet-editor .psp-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.psp-sheet-editor .field { margin-top: var(--space-4); gap: var(--space-2); }
.psp-sheet-editor .field label { font-size: 11px; }
.psp-sheet-editor input, .psp-sheet-editor select, .psp-sheet-editor textarea { min-height: var(--control-height-md); padding: var(--control-padding-block) var(--control-padding-inline); font-size: 12px; }
.psp-sheet-editor .psp-capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.psp-sheet-editor .psp-capability-option { min-height: 44px; padding: 9px 10px; font-size: 11px; }
.psp-sheet-editor-actions { position: sticky; z-index: 4; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 28px -28px 0; padding: 16px 28px; border-top: 1px solid var(--border); background: var(--dialog-chrome-bg); backdrop-filter: blur(14px); }
.psp-sheet-editor-actions button { min-width: 150px; }

.psp-hero.is-network-view { min-height: var(--hero-block-min-height); align-items: center; padding: var(--hero-block-padding); }
.psp-hero.is-network-view h2 { margin-block: 3px 6px; font-size: var(--hero-title-size); }
.psp-hero.is-network-view p:not(.eyebrow) { max-width: 720px; font-size: 11px; }
.psp-hero-actions { display: flex; align-items: center; gap: 8px; }
.psp-hero-actions .secondary-button { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #f4f3ed; }
.psp-network-shell { min-width: 0; max-width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; margin-top: 10px; }
.psp-network-main { min-width: 0; max-width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.psp-geo-rail { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-geo-rail-header { padding: 14px 15px 11px; border-bottom: 1px solid var(--border); }
.psp-geo-rail-header .eyebrow { margin: 0 0 5px; }
.psp-geo-rail-header h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.psp-geo-rail-header > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-body); text-wrap: pretty; }
.psp-geo-list { display: grid; gap: 3px; padding: 6px; }
.psp-geo-button { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 26px; align-items: center; gap: 9px; padding: 7px 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); text-align: left; transition-property: color, background-color, border-color, transform; transition-duration: 140ms; transition-timing-function: ease-out; }
.psp-geo-button:hover { border-color: var(--border); background: var(--surface-hover); color: var(--text); }
.psp-geo-button:active { transform: scale(.985); }
.psp-geo-button.is-selected { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); background: var(--accent-soft); color: var(--text); }
.psp-geo-code { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--accent-text); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); }
.psp-geo-copy { min-width: 0; }
.psp-geo-copy strong, .psp-geo-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-geo-copy strong { color: inherit; font-size: var(--text-sm); }
.psp-geo-copy small { margin-top: 3px; color: var(--subtle); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.psp-geo-active { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--surface-muted); color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-heavy); font-variant-numeric: tabular-nums; }
.psp-geo-button.is-selected .psp-geo-active { background: var(--accent); color: #17120f; }
.psp-network-context { min-width: 0; display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-network-context-title { min-width: 0; display: flex; align-items: center; gap: 14px; }
.psp-network-geo-mark { flex: 0 0 auto; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--accent-text); font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); }
.psp-network-context-title .eyebrow { margin: 0 0 3px; }
.psp-network-context-title h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.psp-network-context-title p:last-child { max-width: 540px; margin: 4px 0 0; color: var(--muted); font-size: var(--text-sm); text-wrap: pretty; }
.psp-network-facts { display: grid; grid-template-columns: repeat(4, minmax(62px, 1fr)); margin: 0; border-left: 1px solid var(--border); }
.psp-network-facts div { min-width: 0; min-height: 88px; display: grid; grid-template-rows: minmax(1.35em, auto) 24px minmax(1.2em, auto); align-content: center; align-items: center; justify-items: center; padding: 2px 10px; border-right: 1px solid var(--border); text-align: center; }
.psp-network-facts div:last-child { border-right: 0; }
.psp-network-facts dt { align-self: end; color: var(--subtle); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; text-wrap: balance; }
.psp-network-facts dd { align-self: center; margin: 0; color: var(--text); font-size: 18px; font-weight: 850; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.psp-network-facts small { display: block; min-height: 1.2em; align-self: start; margin: 0; color: var(--subtle); font-size: 8px; text-wrap: balance; }
.psp-network-currencies { grid-column: 1; max-width: 100%; display: flex; align-self: start; flex-wrap: wrap; gap: 4px; }
.psp-network-currencies span { padding: 4px 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 750; }
.psp-network-currency-button { min-width: 44px; min-height: 44px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; letter-spacing: .025em; transition-property: color, background-color, border-color, transform; transition-duration: 140ms; transition-timing-function: ease-out; }
.psp-network-currency-button:hover { border-color: var(--border-strong); background: var(--surface-hover); color: var(--text); }
.psp-network-currency-button:active { transform: scale(.97); }
.psp-network-currency-button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.psp-network-currency-button:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-network-toolbar { min-width: 0; display: grid; grid-template-columns: 1fr; align-items: stretch; }
.psp-network-filters { width: 100%; grid-template-columns: minmax(170px, 1.35fr) repeat(5, minmax(112px, 1fr)); }
.psp-network-filters .psp-sheet-count { grid-column: 1 / span 3; align-self: center; text-align: left; }
.psp-network-filters > .ghost-button { grid-column: 4; }
.psp-report-download { min-height: 38px; white-space: nowrap; }
.psp-network-filters > .psp-report-download { grid-column: 5; }
.psp-network-filters > .psp-network-view-toggle { grid-column: 6; align-self: end; justify-self: end; }
.psp-network-cards { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.psp-network-card { position: relative; min-width: 0; min-height: 286px; display: flex; flex-direction: column; gap: 14px; padding: 18px; overflow: hidden; border: 1px solid var(--card-border); border-radius: 14px; background: var(--card-surface-accented); box-shadow: var(--shadow-card); transition-property: border-color, box-shadow, transform, background-color; transition-duration: 160ms; transition-timing-function: ease-out; }
.psp-network-card::before { position: absolute; inset: 15px auto 15px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); content: ''; opacity: .9; }
.psp-network-card:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--border-strong)); box-shadow: 0 16px 34px rgba(0, 0, 0, .12); transform: translateY(-2px); }
.psp-network-card:active { transform: translateY(0); }
.psp-network-card[hidden] { display: none; }
.psp-network-card-header { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.psp-network-card-heading { min-width: 0; }
.psp-network-card-heading .eyebrow { margin: 0 0 5px; color: var(--accent-text); }
.psp-network-card-heading h4 { margin: 0; overflow: hidden; color: var(--text); font-size: var(--text-xl); letter-spacing: var(--tracking-heading); line-height: var(--leading-heading); text-overflow: ellipsis; white-space: nowrap; }
.psp-network-card-heading > p:last-child { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.psp-network-card-statuses { flex: 0 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.psp-network-card-summary { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.psp-network-card-summary .psp-network-card-field { min-height: 65px; }
.psp-network-card-target { display: grid; gap: 5px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-radius: 9px; background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface-muted)); }
.psp-network-card-target span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.psp-network-card-target strong { overflow: hidden; color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.psp-network-card-comparison { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.psp-network-card-section { min-width: 0; padding: 17px 20px 19px 22px; }
.psp-network-card-section + .psp-network-card-section { border-left: 1px solid var(--border); }
.psp-network-card-section.is-target { background: color-mix(in srgb, var(--accent-soft) 26%, transparent); }
.psp-network-card-section.is-target.is-empty { background: var(--surface-muted); }
.psp-network-card-section h5 { margin: 0 0 13px; color: var(--text); font-size: 12px; font-weight: 820; letter-spacing: .025em; text-transform: uppercase; }
.psp-network-card-section-heading { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.psp-network-card-section-heading h5 { margin: 0; }
.psp-network-card-section-heading .psp-sheet-edit { min-width: 94px; min-height: 38px; }
.psp-network-card-details { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 0; }
.psp-network-card-field { min-width: 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card-inner-surface); }
.psp-network-card-field.is-wide { grid-column: 1 / -1; }
.psp-network-card-field dt { margin: 0 0 6px; color: var(--subtle); font-size: 8.5px; font-weight: 800; letter-spacing: .055em; line-height: 1.35; text-transform: uppercase; }
.psp-network-card-field dd { min-width: 0; margin: 0; color: var(--text); font-size: 11px; font-weight: 680; line-height: 1.45; overflow-wrap: anywhere; }
.psp-network-card-field.is-rate dd { color: var(--accent-text); font-size: 13px; font-variant-numeric: tabular-nums; }
.psp-network-card-field a { color: var(--accent-strong); text-decoration: none; }
.psp-network-card-field a:hover { text-decoration: underline; }
.psp-network-card-more { border-top: 1px solid var(--border); background: var(--surface-muted); }
.psp-network-card-more > summary { min-height: 46px; display: flex; align-items: center; padding: 11px 20px 11px 22px; color: var(--muted); cursor: pointer; font-size: 10.5px; font-weight: 760; list-style-position: inside; transition-property: color, background-color; transition-duration: 140ms; transition-timing-function: ease-out; }
.psp-network-card-more > summary:hover { background: var(--surface-hover); color: var(--text); }
.psp-network-card-more > summary:focus-visible { outline: var(--focus-outline); outline-offset: -3px; box-shadow: var(--focus-ring); }
.psp-network-card-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.psp-network-card-more-grid .psp-network-card-section:last-child { grid-column: 1 / -1; border-top: 1px solid var(--border); border-left: 0; }
.psp-network-card-actions { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--border); }
.psp-network-card-actions > span { min-width: 0; display: grid; gap: 4px; }
.psp-network-card-actions small { color: var(--muted); font-size: 9px; }
.psp-network-card-actions strong { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.psp-network-card-open { min-width: 132px; min-height: 42px; white-space: nowrap; }
.psp-network-detail-dialog { width: min(980px, calc(100vw - 248px)); }
.psp-network-detail-shell { width: 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.psp-network-detail-header { position: relative; }
.psp-network-detail-header > .icon-close-button { align-self: start; }
.psp-network-detail-body { min-width: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); }
.psp-network-detail-body .psp-network-card-comparison { border-bottom: 1px solid var(--border); }
.psp-network-detail-sections { border-top: 0; }
.psp-network-detail-actions { z-index: 4; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-strong) 96%, transparent); backdrop-filter: blur(14px); }
.psp-network-detail-actions button { min-height: 44px; }
.psp-network-table { --psp-sheet-brand: var(--accent); --psp-sheet-brand-strong: var(--sidebar-soft); max-width: 100%; max-height: min(67vh, 760px); overflow-x: auto; overscroll-behavior-inline: contain; }
.psp-network-table table, .psp-network-table.is-kzt table { min-width: 3820px; table-layout: fixed; }
.psp-network-table th, .psp-network-table td { height: auto; min-height: 54px; padding: 9px 10px; vertical-align: top; }
.psp-network-table td { overflow-wrap: anywhere; white-space: normal; }
.psp-network-table th { height: 58px; border-color: rgb(255 255 255 / .1); background: var(--psp-sheet-brand-strong); color: var(--sidebar-text); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); line-height: var(--leading-ui); text-align: center; white-space: normal; }
.psp-network-table th:first-child, .psp-network-table .psp-network-provider-cell { position: sticky; left: 0; z-index: 5; width: 210px; min-width: 210px; background: var(--surface-strong); box-shadow: 1px 0 var(--border-strong); }
.psp-network-table th:first-child { z-index: 7; background: color-mix(in srgb, var(--psp-sheet-brand) 70%, var(--sidebar)); }
.psp-network-table th:nth-child(2), .psp-network-table td:nth-child(2),
.psp-network-table th:nth-child(3), .psp-network-table td:nth-child(3) { width: 112px; min-width: 112px; }
.psp-network-table th:nth-child(4), .psp-network-table td:nth-child(4),
.psp-network-table th:nth-child(5), .psp-network-table td:nth-child(5),
.psp-network-table th:nth-child(15), .psp-network-table td:nth-child(15) { width: 142px; min-width: 142px; }
.psp-network-table th:nth-child(6), .psp-network-table td:nth-child(6),
.psp-network-table th:nth-child(7), .psp-network-table td:nth-child(7),
.psp-network-table th:nth-child(8), .psp-network-table td:nth-child(8),
.psp-network-table th:nth-child(16), .psp-network-table td:nth-child(16) { width: 104px; min-width: 104px; }
.psp-network-table th:nth-child(9), .psp-network-table td:nth-child(9) { width: 180px; min-width: 180px; }
.psp-network-table th:nth-child(10), .psp-network-table td:nth-child(10),
.psp-network-table th:nth-child(11), .psp-network-table td:nth-child(11) { width: 148px; min-width: 148px; }
.psp-network-table th:nth-child(12), .psp-network-table td:nth-child(12) { width: 76px; min-width: 76px; }
.psp-network-table th:nth-child(13), .psp-network-table td:nth-child(13) { width: 108px; min-width: 108px; }
.psp-network-table th:nth-child(14), .psp-network-table td:nth-child(14) { width: 170px; min-width: 170px; }
.psp-network-table th:nth-child(n+17):nth-child(-n+30),
.psp-network-table td:nth-child(n+17):nth-child(-n+30) { width: 110px; min-width: 110px; }
.psp-network-table th:nth-child(21), .psp-network-table td:nth-child(21) { width: 164px; min-width: 164px; }
.psp-network-table th:nth-child(31), .psp-network-table td:nth-child(31) { width: 230px; min-width: 230px; }
.psp-network-table th:nth-child(32), .psp-network-table td:nth-child(32) { width: 170px; min-width: 170px; }
.psp-network-type-cell strong, .psp-network-method-cell strong { line-height: 1.35; white-space: normal; text-wrap: pretty; }
.psp-provider-target-row td { border-top: 2px solid color-mix(in srgb, var(--accent) 44%, var(--border)); border-bottom-color: color-mix(in srgb, var(--accent) 24%, var(--border)); background: linear-gradient(100deg, color-mix(in srgb, var(--accent-soft) 72%, var(--surface-strong)), var(--surface-strong)); color: var(--text); }
.psp-provider-target-row .psp-network-provider-cell { background: linear-gradient(100deg, color-mix(in srgb, var(--accent-soft) 84%, var(--surface-strong)), var(--surface-strong)); box-shadow: inset 3px 0 var(--accent), 1px 0 var(--border-strong); }
.psp-provider-target-row.is-empty td { background: var(--surface-muted); color: var(--muted); }
.psp-provider-target-row.is-empty .psp-network-provider-cell { background: var(--surface-muted); box-shadow: inset 3px 0 var(--border-strong), 1px 0 var(--border-strong); }
.psp-provider-target-row:hover td { background: color-mix(in srgb, var(--accent-soft) 88%, var(--surface-hover)); }
.psp-provider-target-row.is-empty:hover td { background: var(--surface-hover); }
.psp-provider-target-row + .psp-provider-current-row td { border-top: 0; }
.psp-provider-current-row td { border-bottom-color: var(--border-strong); }
.psp-target-row-label, .psp-current-row-label { display: block; margin-bottom: 5px; font-size: 7px; font-weight: 850; letter-spacing: .075em; line-height: 1.3; text-transform: uppercase; }
.psp-target-row-label { color: var(--accent-text); }
.psp-current-row-label { color: var(--subtle); }
.psp-provider-target-row.has-value .psp-target-rate { color: var(--accent-text); font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; }
.psp-network-provider-name { display: block; line-height: 1.35; }
.psp-network-table tbody tr:hover .psp-network-provider-cell { background: var(--surface-hover); }
.psp-network-table tbody .psp-provider-target-row:hover .psp-network-provider-cell { background: color-mix(in srgb, var(--accent-soft) 88%, var(--surface-hover)); }
.psp-network-table tbody .psp-provider-target-row.is-empty:hover .psp-network-provider-cell { background: var(--surface-hover); }
.psp-network-table tbody tr.is-selected .psp-network-provider-cell { background: var(--accent-soft); }
.psp-network-table td a { color: var(--accent-strong); font-weight: 700; text-decoration: none; }
.psp-network-table td a:hover { text-decoration: underline; }
.psp-source-status { display: inline-flex; max-width: 100%; min-height: 25px; align-items: center; padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-muted); color: var(--text); font-size: var(--text-xs); font-weight: var(--weight-bold); line-height: var(--leading-ui); white-space: normal; }
.psp-source-comment-cell { line-height: 1.45; white-space: normal !important; text-wrap: pretty; }
.psp-source-row-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.psp-source-row-actions select { grid-column: 1 / -1; width: 100%; min-height: 32px; }
.psp-source-row-actions .psp-provider-edit-link, .psp-source-row-actions .psp-sheet-edit { min-width: 0; width: 100%; }
.psp-pipeline-chip { display: inline-flex; max-width: 150px; min-height: 27px; align-items: center; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-muted); color: var(--text); font-size: var(--text-xs); font-weight: var(--weight-bold); line-height: var(--leading-ui); }
.psp-kzt-detail-cell { min-width: 180px; max-width: 240px; }
.psp-kzt-contact-cell { min-width: 210px; }
.psp-kzt-dates-cell { min-width: 135px; }
.psp-kzt-contact-cell a { display: block; width: fit-content; margin-top: 4px; color: var(--accent-strong); font-size: 9px; font-weight: 700; text-decoration: none; }
.psp-kzt-contact-cell a:hover { text-decoration: underline; }
.psp-contact-chip { display: inline-flex; width: fit-content; margin-top: 5px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.psp-provider-row-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; }
.psp-provider-edit-link { min-width: 68px; min-height: 40px; margin: 0; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--accent-strong); font-size: var(--text-xs); font-weight: var(--weight-bold); line-height: var(--leading-ui); text-align: center; white-space: nowrap; transition-property: color, background-color, border-color, transform; transition-duration: 140ms; transition-timing-function: ease-out; }
.psp-provider-edit-link:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.psp-provider-edit-link:active { transform: scale(.97); }
.psp-provider-edit-link:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-provider-edit-link:disabled { border-color: var(--border); background: transparent; color: var(--subtle); cursor: not-allowed; transform: none; }
.psp-version-badge { display: inline-flex; margin-top: 8px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.psp-kzt-detail-cell strong, .psp-kzt-detail-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-kzt-links { min-width: 92px; }
.psp-kzt-links a { display: block; width: fit-content; color: var(--accent-strong); font-size: 10px; font-weight: 700; text-decoration: none; }
.psp-kzt-links a + a { margin-top: 5px; }
.psp-kzt-links a:hover { text-decoration: underline; }
.psp-kzt-links a:focus-visible { border-radius: 3px; outline: var(--focus-outline); outline-offset: 3px; box-shadow: var(--focus-ring); }
.psp-network-provider-cell .psp-inline-select { width: 100%; min-width: 0; min-height: 40px; margin: 0; padding-block: 5px; font-size: var(--text-xs); }
.psp-network-geo-cell strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-text); letter-spacing: .03em; }
.psp-network-preoffers { border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-network-preoffers summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; cursor: pointer; list-style-position: inside; }
.psp-network-preoffers summary:hover { background: var(--surface-hover); }
.psp-network-preoffers summary strong, .psp-network-preoffers summary small { display: block; }
.psp-network-preoffers summary strong { color: var(--text); font-size: 12px; }
.psp-network-preoffers summary small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.psp-preoffer-summary-meta { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.psp-network-preoffers .psp-table { border-width: 1px 0 0; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.psp-target-terms { position: relative; min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border-strong)); border-radius: var(--radius-md); background: var(--surface-strong); box-shadow: 0 18px 44px rgba(0, 0, 0, .14); }
.psp-target-terms::before { position: absolute; z-index: 2; inset: 0 auto auto 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 18%, transparent) 62%, transparent); content: ''; pointer-events: none; }
.psp-target-terms-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; background: radial-gradient(circle at 6% 10%, color-mix(in srgb, var(--accent-soft) 72%, transparent), transparent 38%), linear-gradient(120deg, color-mix(in srgb, var(--surface-muted) 84%, var(--accent-soft)), var(--surface-strong) 65%); }
.psp-target-terms-header .eyebrow { margin: 0 0 5px; }
.psp-target-terms-header h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); text-wrap: balance; }
.psp-target-terms-header p:last-child { max-width: 620px; margin: 6px 0 0; color: var(--muted); font-size: 10px; text-wrap: pretty; }
.psp-target-terms-actions { display: flex; align-items: center; gap: 12px; }
.psp-target-terms-actions > span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psp-compact-filter { min-width: 142px; min-height: 40px; padding: 6px 30px 6px 9px; border-color: var(--border-strong); background-color: color-mix(in srgb, var(--surface) 84%, transparent); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.psp-target-terms .psp-table { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-width: 1px 0 0; border-radius: 0; }
.psp-target-terms .psp-table table { min-width: 2920px; }
.psp-target-terms tbody tr { transition-property: background-color; transition-duration: 140ms; transition-timing-function: ease-out; }
.psp-target-rate { color: var(--accent-text); font-weight: 820; font-variant-numeric: tabular-nums; }
.psp-target-comparison-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-muted) 62%, var(--surface-strong)); }
.psp-target-comparison-summary div { min-height: 66px; display: grid; align-content: center; gap: 3px; padding: 12px 18px; border-right: 1px solid var(--border); }
.psp-target-comparison-summary div:last-child { border-right: 0; }
.psp-target-comparison-summary span { color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.psp-target-comparison-summary strong { font-size: 20px; font-weight: 780; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.psp-target-row.is-meets td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.psp-target-row.is-above td:first-child, .psp-target-row.is-no_offer td:first-child, .psp-target-row.is-incomplete td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.psp-best-offer { min-width: 170px; }
.psp-best-offer strong, .psp-best-offer small { display: block; }
.psp-best-offer > span { color: var(--muted); font-size: 10px; }
.psp-recommendation-action { display: block; margin-top: 7px; color: var(--accent-text); }
.psp-delta { min-width: 86px; font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psp-delta.is-below, .psp-delta.is-equal { color: var(--success); }
.psp-delta.is-above { color: var(--danger); }
.psp-delta.is-empty { color: var(--subtle); font-weight: 500; }
.psp-comparison-chip { display: inline-flex; min-height: 26px; align-items: center; padding: 4px 8px; border: 1px solid var(--state-neutral-border); border-radius: 999px; background: var(--state-neutral-bg); color: var(--state-neutral-text); font-size: var(--text-xs); font-weight: var(--weight-bold); white-space: nowrap; }
.psp-comparison-chip.is-meets { border-color: var(--state-success-border); background: var(--state-success-bg); color: var(--state-success-text); }
.psp-comparison-chip.is-above, .psp-comparison-chip.is-no_offer, .psp-comparison-chip.is-incomplete { border-color: var(--state-warning-border); background: var(--state-warning-bg); color: var(--state-warning-text); }
.psp-best-badge { display: inline-flex; width: fit-content; min-height: 22px; align-items: center; margin-top: 6px; padding: 3px 7px; border: 1px solid var(--state-success-border); border-radius: 999px; background: var(--state-success-bg); color: var(--state-success-text); font-size: 8px; font-weight: 800; white-space: nowrap; }
.psp-kzt-preoffers tbody tr.is-best-match td { background: color-mix(in srgb, var(--success-soft) 48%, transparent); }
.psp-kzt-preoffers tbody tr.is-best-match td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.psp-target-terms-empty { display: grid; gap: 5px; padding: 24px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.psp-target-terms-empty strong { color: var(--text); font-size: 12px; }
.psp-form-section.psp-target-rate-section {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface));
}
@media (max-width: 600px) {
  .psp-form-section.psp-target-rate-section { padding: 16px; }
  .managed-password-control { grid-template-columns: 1fr; }
  .managed-password-generate { width: 100%; }
}
.psp-target-dialog .dialog-header { border-bottom-color: color-mix(in srgb, var(--accent) 28%, var(--border)); }
.psp-kzt-preoffers { min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-kzt-preoffers-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 18px; background: linear-gradient(115deg, color-mix(in srgb, var(--accent-soft) 48%, var(--surface-strong)), var(--surface-strong) 58%); }
.psp-kzt-preoffers-header .eyebrow { margin: 0 0 4px; }
.psp-kzt-preoffers-header h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.psp-kzt-preoffers-header p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.psp-kzt-preoffers-actions { display: flex; align-items: center; gap: 12px; }
.psp-kzt-preoffers-actions > span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psp-kzt-preoffers .psp-table { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-width: 1px 0 0; border-radius: 0; }
.psp-kzt-preoffers .psp-table table { min-width: 3100px; }
.psp-kzt-preoffers .psp-table td, .psp-target-terms .psp-table td { max-width: 250px; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.psp-kzt-preoffers .psp-table th, .psp-target-terms .psp-table th { white-space: nowrap; }
.psp-commercial-rate { color: var(--accent-text); font-weight: 800; font-variant-numeric: tabular-nums; }
.psp-commercial-comment { min-width: 210px; white-space: normal; }
.psp-commercial-edit { width: 100%; min-height: 40px; margin-top: 8px; }
.psp-projection-note { display: block; max-width: 160px; margin-top: 8px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.psp-row-actions { min-width: 158px; }
.psp-row-actions .psp-table-action { display: block; margin-bottom: 7px; }
.psp-shortlist-panel { position: relative; min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-shortlist-panel::before { position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 16%, transparent) 70%, transparent); content: ''; }
.psp-shortlist-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 20px; background: linear-gradient(115deg, color-mix(in srgb, var(--success-soft) 42%, var(--surface-strong)), var(--surface-strong) 62%); }
.psp-shortlist-header .eyebrow { margin: 0 0 4px; }
.psp-shortlist-header h3 { margin: 0; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.psp-shortlist-header p:last-child { max-width: 670px; margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.psp-shortlist-actions { display: flex; align-items: center; gap: 12px; }
.psp-shortlist-actions > span { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psp-shortlist-panel .psp-table { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-width: 1px 0 0; border-radius: 0; }
.psp-shortlist-panel .psp-table table { min-width: 1110px; }
.psp-shortlist-row.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.psp-shortlist-row.is-rejected { opacity: .68; }

.psp-hero.is-import-view { min-height: 170px; align-items: center; padding: 30px 34px; background: radial-gradient(circle at 78% 10%, color-mix(in srgb, var(--warning) 18%, transparent), transparent 30%), linear-gradient(135deg, #10120f 0%, #171914 58%, #211d15 100%); }
.psp-hero.is-import-view h2 { font-size: clamp(38px, 4.5vw, 58px); }
.psp-import-gate { position: relative; min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 28px; overflow: hidden; padding: 24px 26px; border: 1px solid color-mix(in srgb, var(--warning) 24%, var(--border-strong)); border-radius: var(--radius-md); background: linear-gradient(120deg, color-mix(in srgb, var(--warning-soft) 52%, var(--surface-strong)), var(--surface-strong) 64%); }
.psp-import-gate::after { position: absolute; right: -12px; bottom: -48px; color: color-mix(in srgb, var(--text) 3%, transparent); font-size: 106px; font-weight: 900; letter-spacing: -.08em; content: "REVIEW"; pointer-events: none; }
.psp-import-gate > * { position: relative; z-index: 1; }
.psp-import-gate .eyebrow { margin: 0 0 5px; }
.psp-import-gate h3 { margin: 0; font-size: var(--text-2xl); letter-spacing: var(--tracking-heading); }
.psp-import-gate p:last-child { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.psp-import-gate-state { min-width: 160px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--warning) 26%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--surface) 82%, transparent); text-align: right; }
.psp-import-gate-state span, .psp-import-gate-state strong { display: block; }
.psp-import-gate-state span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.psp-import-gate-state strong { margin-top: 5px; color: var(--warning); font-size: 12px; }
.psp-import-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.psp-import-metric { min-height: 124px; display: grid; align-content: space-between; padding: 16px 17px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: linear-gradient(145deg, var(--surface-strong), var(--surface)); color: var(--text); text-align: left; transition: transform 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out; }
.psp-import-metric:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 30%, var(--border-strong)); box-shadow: 0 13px 28px rgba(0, 0, 0, .12); }
.psp-import-metric:active { transform: scale(.985); }
.psp-import-metric:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-import-metric[aria-pressed="true"] { border-color: color-mix(in srgb, currentColor 38%, var(--border-strong)); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent); }
.psp-import-metric span, .psp-import-metric small { color: var(--muted); font-size: 10px; }
.psp-import-metric span { font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.psp-import-metric strong { margin-block: 12px 6px; font-size: 31px; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.psp-import-metric.is-blocked { color: var(--danger); }
.psp-import-metric.is-warning { color: var(--warning); }
.psp-import-metric.is-ready { color: var(--success); }
.psp-import-metric.is-excluded { color: var(--muted); }
.psp-import-filters { display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(125px, .7fr)) auto; align-items: end; gap: 8px; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-import-filters .field { margin: 0; gap: 4px; }
.psp-import-filters label { color: var(--muted); font-size: 9px; }
.psp-import-filters input, .psp-import-filters select, .psp-import-filters button { min-height: 40px; font-size: 10px; }
.psp-import-table { overflow-x: auto; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-import-table table { min-width: 980px; }
.psp-import-table caption { border-bottom: 1px solid var(--border); font-size: 14px; }
.psp-import-table td { vertical-align: middle; }
.psp-import-table td strong { display: block; font-size: 11px; }
.psp-import-table-issues { display: flex; flex-wrap: wrap; gap: 4px; }
.psp-import-table-issues span, .psp-import-issue-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 700; }
.psp-import-status { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.psp-import-status.is-blocked { background: var(--state-danger-bg); color: var(--state-danger-text); box-shadow: inset 0 0 0 1px var(--state-danger-border); }
.psp-import-status.is-warning { background: var(--state-warning-bg); color: var(--state-warning-text); box-shadow: inset 0 0 0 1px var(--state-warning-border); }
.psp-import-status.is-ready { background: var(--state-success-bg); color: var(--state-success-text); box-shadow: inset 0 0 0 1px var(--state-success-border); }
.psp-import-status.is-excluded { background: var(--state-neutral-bg); color: var(--state-neutral-text); box-shadow: inset 0 0 0 1px var(--state-neutral-border); }
.psp-import-row-action { min-height: 36px; padding: 7px 10px; font-size: 10px; }
.psp-import-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font-size: 10px; }
.psp-import-pagination button { min-height: 36px; }
.psp-import-empty { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-import-dialog { width: min(94vw, 900px); }
.psp-import-dialog form { padding: 28px; }
.psp-import-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.psp-import-issue-panel, .psp-import-correction-section { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.psp-import-issue-panel h3, .psp-import-correction-section h3 { margin: 0 0 12px; font-size: 13px; }
.psp-import-issue-list { display: flex; flex-wrap: wrap; gap: 5px; }
.psp-import-issue-chip { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 24%, var(--border)); }
.psp-import-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.psp-import-edit-grid .field { margin: 0; }
.psp-import-edit-grid input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.psp-import-no-fields { display: grid; gap: 5px; margin-block: 20px; padding: 17px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: 11px; }
.psp-import-no-fields strong { color: var(--text); }
.psp-import-dialog-actions { flex-wrap: wrap; }
.psp-materialization-preview { position: relative; display: grid; gap: 14px; padding: 20px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--danger) 22%, var(--border-strong)); border-radius: var(--radius-md); background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--danger-soft) 64%, transparent), transparent 34%), linear-gradient(145deg, var(--surface-strong), var(--surface)); }
.psp-materialization-preview.is-ready { border-color: color-mix(in srgb, var(--success) 24%, var(--border-strong)); background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--success-soft) 68%, transparent), transparent 34%), linear-gradient(145deg, var(--surface-strong), var(--surface)); }
.psp-materialization-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.psp-materialization-header h3 { margin: 2px 0 6px; font-size: var(--text-xl); letter-spacing: var(--tracking-heading); }
.psp-materialization-header p:last-child { max-width: 700px; margin: 0; color: var(--muted); font-size: 11px; }
.psp-materialization-state { flex: 0 0 auto; min-width: 154px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: color-mix(in srgb, var(--surface-strong) 86%, transparent); }
.psp-materialization-state span, .psp-materialization-state strong { display: block; }
.psp-materialization-state span { color: var(--muted); font-size: 9px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.psp-materialization-state strong { margin-top: 4px; color: var(--danger); font-size: 11px; }
.psp-materialization-preview.is-ready .psp-materialization-state strong { color: var(--success); }
.psp-materialization-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.psp-materialization-stat { min-height: 78px; display: grid; align-content: space-between; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-strong) 90%, transparent); }
.psp-materialization-stat span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.psp-materialization-stat strong { font-size: 24px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.psp-materialization-stat.is-match strong { color: var(--accent); }
.psp-materialization-stat.is-create strong { color: var(--success); }
.psp-materialization-stat.is-update strong, .psp-materialization-stat.is-duplicate strong { color: var(--warning); }
.psp-materialization-stat.is-conflict strong { color: var(--danger); }
.psp-materialization-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 8px; }
.psp-materialization-panel { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-strong) 92%, transparent); }
.psp-materialization-panel h4 { margin: 0 0 10px; font-size: var(--text-xs); letter-spacing: var(--tracking-heading); }
.psp-materialization-entity-table { border: 0; background: transparent; }
.psp-materialization-entity-table table { min-width: 720px; }
.psp-materialization-entity-table th, .psp-materialization-entity-table td { padding: 8px 9px; font-size: 9px; font-variant-numeric: tabular-nums; }
.psp-materialization-entity-table tbody th { color: var(--text); font-weight: 720; text-align: left; }
.psp-materialization-reasons { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.psp-materialization-reasons li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 9px; }
.psp-materialization-reasons li:last-child { border-bottom: 0; }
.psp-materialization-reasons strong { min-width: 28px; color: var(--text); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.psp-materialization-gates { display: grid; gap: 5px; margin-bottom: 8px; }
.psp-materialization-gates p { margin: 0; padding: 8px 9px; border: 1px solid color-mix(in srgb, var(--warning) 24%, var(--border)); border-radius: 6px; background: var(--warning-soft); color: var(--warning); font-size: 9px; line-height: 1.45; }
.psp-materialization-clear { margin: 0; color: var(--success); font-size: 10px; }
.psp-materialization-references { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.psp-materialization-reference { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-strong) 90%, transparent); }
.psp-materialization-reference span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.psp-materialization-reference strong { font-size: 10px; text-align: right; }
.psp-materialization-reference small { grid-column: 1 / -1; overflow: hidden; color: var(--warning); font-size: 9px; line-height: 1.5; text-overflow: ellipsis; }
.psp-materialization-samples { border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-strong) 92%, transparent); }
.psp-materialization-samples summary { padding: 12px 14px; color: var(--text); font-size: 10px; font-weight: 730; cursor: pointer; }
.psp-materialization-samples summary:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-materialization-samples .table-wrap { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.psp-materialization-samples table { min-width: 820px; }
.psp-materialization-samples caption { font-size: 9px; }
.psp-materialization-samples td { vertical-align: top; }
.psp-materialization-sample-reasons { display: flex; flex-wrap: wrap; gap: 4px; }
.psp-materialization-sample-reasons span { padding: 3px 6px; border: 1px solid color-mix(in srgb, var(--danger) 18%, var(--border)); border-radius: 5px; background: var(--danger-soft); color: var(--danger); font-size: 8px; }
.psp-materialization-footnote { margin: 0; color: var(--muted); font-size: 9px; text-align: right; }

.psp-pinned-status { position: sticky; z-index: 8; top: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 11px 12px 11px 16px; border: 1px solid color-mix(in srgb, var(--danger) 20%, var(--border-strong)); border-radius: 12px; background: color-mix(in srgb, var(--surface-strong) 91%, transparent); box-shadow: 0 14px 36px rgba(0, 0, 0, .14); backdrop-filter: blur(18px) saturate(125%); }
.psp-pinned-status.is-ready { border-color: color-mix(in srgb, var(--success) 30%, var(--border-strong)); }
.psp-pinned-status.is-applied { border-color: color-mix(in srgb, var(--accent) 36%, var(--border-strong)); background: linear-gradient(120deg, color-mix(in srgb, var(--accent-soft) 34%, var(--surface-strong)), color-mix(in srgb, var(--surface-strong) 94%, transparent)); }
.psp-pinned-copy { min-width: 0; display: flex; align-items: center; gap: 12px; }
.psp-pinned-copy > div { min-width: 0; }
.psp-pinned-copy .eyebrow { margin: 0 0 2px; }
.psp-pinned-copy strong, .psp-pinned-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-pinned-copy strong { font-size: 13px; letter-spacing: -.015em; }
.psp-pinned-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.psp-pinned-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 999px; background: var(--danger); box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 12%, transparent); }
.psp-pinned-status.is-ready .psp-pinned-dot { background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 12%, transparent); }
.psp-pinned-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.psp-pinned-actions button { min-height: 42px; padding-inline: 13px; }
.psp-pinned-actions .primary-button { min-height: 44px; }
.psp-apply-dialog { width: min(94vw, 660px); max-height: min(92vh, 820px); }
.psp-apply-dialog form { padding: 30px; }
.psp-apply-header p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.psp-apply-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 12px; background: color-mix(in srgb, var(--surface) 84%, transparent); }
.psp-apply-summary div { min-width: 0; padding: 15px 14px; border-right: 1px solid var(--border); }
.psp-apply-summary div:last-child { border-right: 0; }
.psp-apply-summary span, .psp-apply-summary strong { display: block; }
.psp-apply-summary span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.psp-apply-summary strong { margin-top: 5px; font-size: 22px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.psp-apply-entities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 16px 0 0; padding: 0; list-style: none; }
.psp-apply-entities li { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 1px; border-bottom: 1px solid var(--border); font-size: 9px; }
.psp-apply-entities span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.psp-apply-entities strong { flex: 0 0 auto; font-size: 9px; font-variant-numeric: tabular-nums; }
.psp-apply-warning { display: grid; gap: 5px; margin-top: 18px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--warning) 26%, var(--border)); border-radius: 9px; background: var(--warning-soft); }
.psp-apply-warning strong { color: var(--warning); font-size: 10px; }
.psp-apply-warning span { color: var(--muted); font-size: 9px; line-height: 1.55; }
.psp-apply-confirm { min-height: 48px; display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 9px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text); font-size: 10px; line-height: 1.5; cursor: pointer; }
.psp-apply-confirm:has(input:focus-visible) { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.psp-apply-confirm input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 0; accent-color: var(--accent); }
.psp-apply-status { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.psp-apply-status[role="alert"] { color: var(--danger); }
.psp-apply-actions button { min-height: 46px; }
.psp-preview-details { scroll-margin-top: 150px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }
.psp-preview-details > summary { min-height: 48px; display: flex; align-items: center; padding: 12px 16px; color: var(--text); font-size: 11px; font-weight: 750; cursor: pointer; }
.psp-preview-details > summary:focus-visible { outline: var(--focus-outline); outline-offset: 3px; box-shadow: var(--focus-ring); }
.psp-preview-details .psp-materialization-preview { border: 0; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: none; }

.psp-import-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.psp-import-metric { min-height: 64px; grid-template-columns: 1fr auto; align-items: center; align-content: center; gap: 1px 12px; padding: 10px 13px; border-radius: 9px; box-shadow: none; }
.psp-import-metric:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, .08); }
.psp-import-metric strong { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 22px; }
.psp-import-metric small { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psp-import-row-action, .psp-import-pagination button, .psp-import-filters input, .psp-import-filters select, .psp-import-filters button { min-height: 44px; }

.psp-mapping-drawer { width: min(640px, 100vw); max-width: none; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; margin: 0 0 0 auto; padding: 0; overflow: hidden; border: 0; border-left: 1px solid var(--border-strong); border-radius: 0; background: var(--surface-strong); color: var(--text); box-shadow: var(--shadow-drawer); }
.psp-mapping-drawer::backdrop { background: var(--backdrop-modal); backdrop-filter: var(--backdrop-blur); }
.psp-mapping-header { min-height: 108px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; border-bottom: 1px solid var(--border); background: var(--dialog-chrome-bg); }
.psp-mapping-header h2 { margin: 3px 0 5px; font-size: var(--text-2xl); letter-spacing: var(--tracking-heading); }
.psp-mapping-header p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.psp-mapping-header button { min-height: 44px; }
.psp-mapping-tools { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; padding: 14px 26px; border-bottom: 1px solid var(--border); }
.psp-mapping-tools .field { margin: 0; }
.psp-mapping-tools input[type="search"] { min-height: 44px; }
.psp-mapping-toggle { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; cursor: pointer; }
.psp-mapping-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.psp-mapping-list { height: auto; min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 12px 26px 36px; overscroll-behavior: contain; }
.psp-mapping-section { display: grid; gap: 7px; padding-block: 10px 18px; }
.psp-mapping-section + .psp-mapping-section { border-top: 1px solid var(--border); }
.psp-mapping-section > header { display: flex; align-items: center; justify-content: space-between; padding: 4px 1px 8px; }
.psp-mapping-section h3 { margin: 0; font-size: var(--text-md); letter-spacing: var(--tracking-heading); }
.psp-mapping-section > header span { min-width: 28px; padding: 3px 7px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 9px; text-align: center; }
.psp-mapping-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(190px, 1.2fr) auto; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.psp-mapping-row.is-resolved { border-color: color-mix(in srgb, var(--success) 22%, var(--border)); }
.psp-mapping-source { min-width: 0; align-self: center; }
.psp-mapping-source strong, .psp-mapping-source span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-mapping-source strong { font-size: 11px; }
.psp-mapping-source span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.psp-mapping-row .field { margin: 0; }
.psp-mapping-row select, .psp-mapping-row button { min-height: 42px; }
.psp-mapping-row-status { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--muted); font-size: 8px; }
.psp-mapping-method { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); overflow: hidden; }
.psp-mapping-method.is-resolved { border-color: color-mix(in srgb, var(--success) 22%, var(--border)); }
.psp-mapping-method > summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; cursor: pointer; list-style: none; }
.psp-mapping-method > summary::-webkit-details-marker { display: none; }
.psp-mapping-method > summary:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); box-shadow: var(--focus-ring); }
.psp-mapping-method > summary strong, .psp-mapping-method > summary small { display: block; }
.psp-mapping-method > summary strong { font-size: 11px; }
.psp-mapping-method > summary small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.psp-mapping-state { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 8px; font-weight: 760; }
.psp-mapping-state.is-resolved { background: var(--success-soft); color: var(--success); }
.psp-mapping-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-strong) 84%, transparent); }
.psp-mapping-editor .field { margin: 0; }
.psp-mapping-editor input, .psp-mapping-editor select, .psp-mapping-editor button { min-height: 44px; }
.psp-mapping-editor button, .psp-mapping-editor .psp-mapping-row-status { grid-column: 1 / -1; }
.psp-mapping-empty { margin: 0; padding: 18px; border: 1px dashed var(--border-strong); border-radius: 9px; color: var(--muted); font-size: 10px; text-align: center; }

.table-scroll { overflow-x: auto; border: 1px solid var(--panel-border); border-radius: var(--radius-md); background: var(--panel-surface); scrollbar-gutter: stable; overscroll-behavior-inline: contain; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
caption { padding: 17px; text-align: left; font-weight: 700; }
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--table-head-surface); color: var(--subtle); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); line-height: var(--leading-ui); overflow-wrap: normal; word-break: normal; hyphens: auto; text-transform: uppercase; }
td { font-size: var(--text-md); line-height: var(--leading-body); overflow-wrap: break-word; word-break: normal; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.audit-detail { max-width: 480px; color: var(--muted); }
.audit-entity-button {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--accent-text);
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.audit-entity-button:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.audit-entity-button:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.audit-event-dialog { width: min(560px, calc(100vw - 24px)); }
.audit-event-content { display: grid; gap: 18px; padding: var(--dialog-padding-inline); }
.audit-event-details { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.audit-event-details dt { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.audit-event-details dd { min-width: 0; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--text); }
.error-panel { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); background: var(--danger-soft); }
.error-panel h2 { color: var(--danger); }
.skeleton-line { height: 11px; margin-top: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--surface-muted), var(--surface-hover), var(--surface-muted)); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton-line.short { width: 58%; }

@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .ui-dialog-motion,
  .ui-dialog-motion[data-ui-dialog-state="opening"],
  .ui-dialog-motion[data-ui-dialog-state="closing"] {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
  .ui-dialog-motion::backdrop,
  .ui-dialog-motion[data-ui-dialog-state="opening"]::backdrop,
  .ui-dialog-motion[data-ui-dialog-state="closing"]::backdrop {
    opacity: 1;
    transition: none !important;
  }
  .ui-view-motion,
  .ui-view-motion[data-ui-view-state="from"] {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
  .ui-menu-motion,
  .ui-menu-motion[data-ui-menu-state="from"] {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}

@media (max-width: 1120px) {
  .psp-materialization-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .psp-materialization-grid { grid-template-columns: 1fr; }
  .assignment-grid { grid-template-columns: 1fr; }
  .schedule-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-summary-card:nth-child(2) { border-right: 0; }
  .schedule-summary-card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .advanced-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-actions { justify-content: stretch; }
  .filter-actions button { flex: 1; }
  .policy-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-metric:nth-child(2) { border-right: 0; }
  .psp-metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .psp-split { grid-template-columns: 1fr; }
  .psp-sheet-toolbar { align-items: stretch; flex-direction: column; }
  .psp-sheet-filters { grid-template-columns: minmax(180px, 1fr) minmax(150px, .8fr) minmax(125px, .6fr) auto auto; }
  .psp-sheet-editor .psp-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-network-context { grid-template-columns: 1fr; }
  .psp-network-facts { border-left: 0; }
  .psp-network-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .psp-network-filters .psp-sheet-count { grid-column: 1; }
  .psp-network-filters > .ghost-button { grid-column: 2; }
  .psp-network-filters > .psp-report-download { grid-column: 3; }
  .psp-network-filters > .psp-network-view-toggle { grid-column: 1 / -1; justify-self: end; }
  .psp-network-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-network-card-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-dashboard-primary-grid { grid-template-columns: 1fr; }
  .psp-dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .psp-dashboard-filters { width: 100%; }
  .psp-sheet-dashboard-filterbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .psp-sheet-dashboard-reset { width: 100%; }
  .psp-import-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-import-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .psp-import-filters .field:first-child { grid-column: span 2; }
}

@media (max-width: 900px) {
  :root {
    --hero-block-min-height: 220px;
    --hero-block-padding: 20px;
    --hero-title-size: clamp(32px, 9vw, 42px);
    --hero-watermark-top: 10px;
    --hero-watermark-right: -10px;
    --hero-watermark-size: 92px;
  }
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; padding: 14px; border-right: 0; border-bottom: 1px solid var(--sidebar-border); }
  .sidebar-header { grid-template-columns: 1fr; margin-bottom: 14px; }
  .sidebar .brand { padding: 0 4px; }
  .sidebar-toggle { display: none; }
  .nav-label { margin-left: 4px; }
  .department-nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .department-button { flex: 0 0 auto; width: auto; grid-template-columns: 28px auto; min-height: 44px; scroll-snap-align: start; }
  .department-button .nav-count { display: none; }
  .sidebar-navigation-scroll { overflow: visible; padding: 0; }
  .business-sidebar-context { margin-top: 8px; padding-top: 9px; }
  .business-sidebar-context .business-section-nav { display: none; }
  .business-workspace-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 7px; scroll-snap-type: x proximity; }
  .business-workspace-button { flex: 0 0 auto; width: auto; min-width: 142px; scroll-snap-align: start; }
  .sidebar-spacer { display: none; }
  .sidebar-settings { grid-template-columns: 1fr 1fr; margin-top: 4px; padding: 13px 4px 0; }
  .user-panel { display: none; }
  .session-actions { align-items: end; }
  .topbar { min-height: 54px; padding: 9px 18px; }
  .main-content { padding: 27px 18px 58px; }
  .page-heading { min-height: 126px; }
  .page-heading > div { padding-bottom: 20px; }
  .page-heading .description { max-width: 86%; }
  .department-watermark { right: -8px; bottom: -10px; font-size: 94px; }
  h1 { font-size: 46px; }
  .tabs { gap: 20px; margin-bottom: 24px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 78px; padding: 14px 2px; border-right: 0; border-bottom: 1px solid var(--border); }
  .stat-card:last-child { border-bottom: 0; }
  .stat-card strong { margin-top: 3px; font-size: 23px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 155px; }
  .access-toolbar { grid-template-columns: 1fr; }
  .access-actions { justify-content: flex-start; }
  .permission-options { grid-template-columns: 1fr; }
  .psp-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-sheet-filters { grid-template-columns: 1fr 1fr; }
  .psp-sheet-filters .field:first-child { grid-column: 1 / -1; }
  .psp-sheet-count { text-align: left; }
  .psp-hero.is-network-view { display: grid; min-height: var(--hero-block-min-height); }
  .psp-hero.is-dashboard-view { display: grid; min-height: var(--hero-block-min-height); }
  .psp-hero-actions { width: 100%; }
  .psp-hero-actions button { flex: 1; }
  .psp-network-shell { grid-template-columns: 1fr; }
  .psp-pinned-status { top: 62px; align-items: stretch; flex-direction: column; }
  .psp-pinned-actions { flex-wrap: wrap; }
  .psp-pinned-actions button { flex: 1; }
  .psp-geo-rail { position: relative; top: auto; max-height: none; overflow: hidden; }
  .psp-geo-rail-header { padding-bottom: 12px; }
  .psp-geo-rail-header > p:last-child { max-width: 520px; }
  .psp-geo-list { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .psp-geo-button { flex: 0 0 190px; scroll-snap-align: start; }
  .psp-network-filters { grid-template-columns: 1fr 1fr; }
  .psp-network-filters .field:first-child { grid-column: 1 / -1; }
  .psp-network-filters > .psp-report-download { grid-column: 1 / -1; }
  .psp-network-filters > .psp-network-view-toggle { grid-column: 1 / -1; justify-self: end; }
  .psp-network-card-comparison { grid-template-columns: 1fr; }
  .psp-network-card-section + .psp-network-card-section { border-top: 1px solid var(--border); border-left: 0; }
  .psp-network-card-more-grid { grid-template-columns: 1fr; }
  .psp-network-card-more-grid .psp-network-card-section:last-child { grid-column: auto; }
  .psp-kzt-preoffers-header { align-items: flex-start; flex-direction: column; }
  .psp-kzt-preoffers-actions { width: 100%; justify-content: space-between; }
  .psp-target-terms-header, .psp-shortlist-header { align-items: flex-start; flex-direction: column; }
  .psp-target-terms-actions, .psp-shortlist-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; }
  .psp-target-comparison-summary { grid-template-columns: 1fr 1fr; }
  .psp-target-comparison-summary div:nth-child(2) { border-right: 0; }
  .psp-target-comparison-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .psp-dashboard-role-focus { align-items: flex-start; flex-direction: column; }
  .psp-dashboard-focus-meta { justify-content: flex-start; }
  .psp-dashboard-filters { grid-template-columns: 1fr 1fr; }
  .psp-dashboard-filters .field:nth-child(3) { grid-column: 1 / -1; }
  .psp-dashboard-secondary-grid, .psp-dashboard-bottom-grid { grid-template-columns: 1fr; }
  .psp-sheet-dashboard-datebar { grid-template-columns: 1fr 1fr; }
  .psp-sheet-dashboard-datebar > p { grid-column: 1 / -1; justify-self: start; }
  .psp-sheet-dashboard-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-network-table th:first-child, .psp-network-table .psp-network-provider-cell { position: static; }
  .psp-import-gate { display: grid; }
  .psp-import-gate-state { width: 100%; text-align: left; }
  .psp-import-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-import-filters .field:first-child { grid-column: 1 / -1; }
  .psp-import-dialog-header { display: grid; }
  .psp-materialization-header { display: grid; }
  .psp-materialization-state { width: 100%; }
  .psp-materialization-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-request-operational-strip,
  .request-workflow-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-toolbar { display: grid; align-items: start; padding: 23px; }
  .schedule-hero-actions { width: 100%; justify-items: stretch; }
  .schedule-bulk-trigger { width: 100%; }
  .absence-toolbar { display: grid; align-items: start; padding: 23px; }
  .absence-toolbar-actions { width: 100%; justify-content: stretch; }
  .absence-toolbar-actions button { flex: 1; }
  .advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
  .summary-toolbar { align-items: flex-start; }
  .period-actions { width: 100%; }
  .period-actions .secondary-button:nth-child(2) { flex: 1; }
  .schedule-grid.days-28, .schedule-grid.days-29, .schedule-grid.days-30, .schedule-grid.days-31 { grid-template-columns: minmax(88px, 18%) repeat(var(--schedule-days), minmax(0, 1fr)); }
  .day-heading span { display: none; }
  .schedule-slot { min-height: 52px; }
  .slot-note { display: none; }
  .schedule-policy-heading { align-items: stretch; flex-direction: column; padding: 19px; }
  .schedule-policy-heading .secondary-button { width: 100%; }

  .sidebar-navigation-scroll > .department-nav,
  .tabs,
  .sales-view-nav,
  .psp-subnav,
  .finance-queue-tabs {
    padding-right: 28px;
    scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .sidebar-toggle,
  .sidebar .brand-copy,
  .sidebar .nav-label,
  .sidebar .department-button strong,
  .sidebar .department-button .nav-count,
  .sidebar .sidebar-settings .field,
  .sidebar .user-copy,
  .sidebar .session-actions,
  .resource-access-trigger,
  .resource-history-trigger,
  .resource-history-entry,
  .resource-access-row { transition-duration: 0ms; }
}

@media (min-width: 901px) and (max-width: 1120px) and (pointer: fine) {
  .schedule-timeline {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }
  .schedule-grid.days-28,
  .schedule-grid.days-29,
  .schedule-grid.days-30,
  .schedule-grid.days-31 {
    width: max-content;
    min-width: max-content;
    grid-template-columns: 140px repeat(var(--schedule-days), 24px);
  }
  .employee-heading,
  .employee-lane-label { width: 140px; min-width: 140px; }
  .day-heading,
  .schedule-slot { width: 24px; min-width: 24px; }
}

@media (min-width: 901px) and (max-width: 1120px) and (pointer: coarse) {
  .schedule-timeline {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }
  .schedule-grid.days-28,
  .schedule-grid.days-29,
  .schedule-grid.days-30,
  .schedule-grid.days-31 {
    width: max-content;
    min-width: max-content;
    grid-template-columns: 140px repeat(var(--schedule-days), 44px);
  }
  .employee-heading,
  .employee-lane-label { width: 140px; min-width: 140px; }
  .day-heading,
  .schedule-slot { width: 44px; min-width: 44px; }
}

@media (max-width: 460px) {
  .login-screen { padding: 14px; }
  .login-screen::before { top: 20px; left: 20px; }
  .login-screen::after { right: -44vw; bottom: -18vw; }
  .login-card { padding: 28px 24px; }
  .login-card h1 { margin-top: 38px; font-size: 40px; }
  .demo-login-form, .account-form-grid { grid-template-columns: 1fr; }
  .demo-login-form button, .access-actions button { width: 100%; }
  .sidebar { padding: 10px; }
  .sidebar-header { min-height: 36px; margin-bottom: 8px; }
  .sidebar-header .brand-copy span { display: none; }
  .sidebar-navigation-scroll { display: grid; gap: 6px; }
  .sidebar-navigation-scroll > .nav-label,
  .admin-sidebar-context .nav-label { display: none; }
  .admin-sidebar-context { margin-top: 0; padding-top: 0; border-top: 0; }
  .department-nav { padding-bottom: 4px; }
  .sidebar-settings {
    grid-template-columns: minmax(132px, 1fr) auto;
    align-items: end;
    gap: 8px;
    margin-top: 2px;
    padding: 8px 0 0;
  }
  .sidebar-settings .field label { margin-bottom: 3px; font-size: 10px; }
  .sidebar-settings select { min-height: 40px; }
  .session-actions { display: flex; gap: 4px; }
  .session-actions button { min-height: 40px; padding-inline: 10px; white-space: nowrap; }
  .topbar .environment-badge { display: none; }
  .topbar { position: sticky; top: 0; z-index: 18; background: var(--bg); }
  .resource-access-trigger { min-width: 44px; padding-inline: 7px; }
  .resource-history-trigger { width: 44px; padding-inline: 7px; }
  .resource-history-trigger-label { display: none; }
  .resource-access-trigger-label, .resource-access-trigger-count { display: none; }
  .resource-access-avatar-stack .resource-access-avatar:nth-child(n + 3) { display: none; }
  .resource-access-dialog {
    inset: auto 0 0;
    width: 100vw;
    max-height: 82dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .resource-access-list { max-height: calc(82dvh - 230px); }
  .resource-access-row { grid-template-columns: 1fr; }
  .resource-access-level-pill { justify-self: start; margin-left: 48px; }
  .resource-history-dialog {
    inset: 10px;
    width: auto;
    height: calc(100dvh - 20px);
    max-height: none;
  }
  .resource-history-dialog-header { min-height: 102px; padding: 18px; }
  .resource-history-dialog-header h2 { font-size: 25px; }
  .resource-history-toolbar { justify-content: stretch; }
  .resource-history-toolbar select { flex: 1 1 auto; min-width: 0; }
  .resource-history-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(160px, 38%) minmax(0, 1fr);
  }
  .resource-history-list { border-right: 0; border-bottom: 1px solid var(--border); }
  .resource-history-detail { padding: 16px; }
  .resource-history-change { grid-template-columns: 1fr 20px 1fr; }
  .resource-history-change strong { grid-column: 1 / -1; }
  .schedule-page { gap: 14px; }
  .schedule-grid.days-28, .schedule-grid.days-29, .schedule-grid.days-30, .schedule-grid.days-31 { grid-template-columns: minmax(68px, 22%) repeat(var(--schedule-days), minmax(0, 1fr)); }
  .employee-heading { padding-inline: 6px; font-size: 6px; letter-spacing: 0.03em; }
  .employee-lane-label { padding-inline: 6px; }
  .employee-lane-label strong { font-size: 9px; }
  .employee-lane-label span { display: none; }
  .day-heading strong, .schedule-slot { font-size: 6px; }
  .schedule-slot { min-height: 44px; padding: 0; }
  .notification-drawer { width: 100vw; border-left: 0; }
  .advanced-filters { grid-template-columns: 1fr; }
  .filter-actions { grid-column: auto; }
  .summary-toolbar { display: grid; }
  .summary-toolbar-actions { align-items: flex-start; justify-content: space-between; }
  .summary-toolbar .operation-status { margin-top: 25px; }
  .organization-heading .description { max-width: 75%; }
  .assignment-header, .assignment-footer, .panel-header { display: block; }
  .assignment-footer-buttons, .assignment-actions { width: 100%; display: grid; grid-template-columns: 1fr; margin-top: 12px; }
  .assignment-footer-buttons button, .assignment-actions button { width: 100%; }
  .split-actions, .split-actions > div { display: grid; grid-template-columns: 1fr; width: 100%; }
  .schedule-summary { grid-template-columns: 1fr 1fr; }
  .schedule-summary-card { padding: 13px; }
  .schedule-summary-card strong { font-size: 22px; }
  .schedule-dialog form { padding: 21px; }
  .psp-method-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .psp-method-dialog .psp-sheet-editor-form { padding: 0 18px; }
  .psp-method-dialog .psp-sheet-editor-header { margin-inline: -18px; padding: 20px 18px 17px; }
  .psp-method-dialog .psp-sheet-editor-actions { display: grid; grid-template-columns: 1fr; margin-inline: -18px; padding: 14px 18px max(18px, env(safe-area-inset-bottom)); }
  .psp-method-dialog .psp-sheet-editor-actions button { width: 100%; min-width: 0; }
  .schedule-bulk-grid { grid-template-columns: 1fr; }
  .schedule-bulk-grid .is-wide { grid-column: auto; }
  .schedule-bulk-mode-options { grid-template-columns: 1fr; }
  .schedule-bulk-mode-options label { min-height: 58px; }
  .schedule-mass-calendar { padding: 10px; }
  .schedule-mass-calendar-header { align-items: flex-start; flex-direction: column; }
  .schedule-mass-presets { width: 100%; justify-content: flex-start; }
  .schedule-mass-calendar-grid { grid-template-columns: repeat(7, minmax(34px, 1fr)); gap: 3px; }
  .psp-hero { min-height: var(--hero-block-min-height); display: grid; align-items: end; padding: var(--hero-block-padding); }
  .psp-hero .primary-button { width: 100%; }
  .psp-metrics, .psp-form-grid { grid-template-columns: 1fr; }
  .psp-capability-grid { grid-template-columns: 1fr; }
  .psp-sheet-filters, .psp-sheet-editor .psp-form-grid { grid-template-columns: 1fr; }
  .psp-sheet-filters .field:first-child { grid-column: auto; }
  .psp-sheet-editor .psp-capability-grid { grid-template-columns: 1fr; }
  .psp-hero-actions { display: grid; grid-template-columns: 1fr; }
  .psp-hero.is-dashboard-view { min-height: var(--hero-block-min-height); padding: var(--hero-block-padding); }
  .psp-dashboard-toolbar-title { padding-bottom: 0; }
  .psp-dashboard-filters { grid-template-columns: 1fr; }
  .psp-dashboard-filters .field:nth-child(3) { grid-column: auto; }
  .psp-dashboard-filters button { width: 100%; }
  .psp-dashboard-role-focus { padding: 21px; }
  .psp-dashboard-role-focus::after { right: -12px; font-size: 82px; }
  .psp-dashboard-metrics { grid-template-columns: 1fr; }
  .psp-dashboard-metric { min-height: 142px; }
  .psp-dashboard-coverage-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 9px; }
  .psp-dashboard-health { display: none; }
  .psp-dashboard-coverage-row .psp-dashboard-row-action { grid-column: 3; }
  .psp-dashboard-ring-wrap { grid-template-columns: 1fr; justify-items: center; }
  .psp-dashboard-health-legend { width: min(100%, 220px); }
  .psp-dashboard-bar-row { grid-template-columns: minmax(105px, .8fr) minmax(80px, 1fr) 26px; gap: 8px; }
  .psp-dashboard-queue-row { grid-template-columns: 7px minmax(0, 1fr) auto; }
  .psp-dashboard-queue-state { grid-column: 2 / -1; text-align: left; }
  .psp-sheet-dashboard-titlebar { align-items: flex-start; flex-direction: column; gap: 7px; }
  .psp-sheet-dashboard-datebar, .psp-sheet-dashboard-filterbar { grid-template-columns: 1fr; }
  .psp-sheet-dashboard-datebar > p { grid-column: auto; }
  .psp-sheet-dashboard-transition-row { grid-template-columns: 1fr; }
  .psp-sheet-dashboard-transition-row > strong { border-right: 0; border-bottom: 1px solid var(--border); }
  .psp-sheet-dashboard-transition-row > div { padding: 8px; }
  .psp-sheet-dashboard-summary > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .psp-network-context { padding: 17px; }
  .psp-network-context-title { align-items: flex-start; }
  .psp-network-geo-mark { width: 48px; height: 48px; }
  .psp-network-context-title h3 { font-size: 21px; }
  .psp-network-facts { grid-template-columns: 1fr 1fr; }
  .psp-network-facts div { padding: 8px 10px; border-bottom: 1px solid var(--border); }
  .psp-network-facts div:nth-child(2) { border-right: 0; }
  .psp-network-facts div:nth-last-child(-n+2) { border-bottom: 0; }
  .psp-network-filters { grid-template-columns: 1fr; }
  .psp-network-filters .field:first-child { grid-column: auto; }
  .psp-network-filters .psp-sheet-count,
  .psp-network-filters > .ghost-button,
  .psp-network-filters > .psp-report-download { grid-column: auto; }
  .psp-network-preoffers summary { display: grid; }
  .psp-preoffer-summary-meta { padding-left: 15px; }
  .psp-target-terms-header, .psp-kzt-preoffers-header { display: grid; }
  .psp-target-terms-actions, .psp-kzt-preoffers-actions { justify-content: space-between; }
  .psp-target-terms-actions .secondary-button, .psp-kzt-preoffers-actions .secondary-button { min-height: 42px; }
  .psp-metric { border-right: 0; border-bottom: 1px solid var(--border); }
  .psp-metric:last-child { border-bottom: 0; }
  .psp-import-metrics, .psp-import-filters, .psp-import-edit-grid { grid-template-columns: 1fr; }
  .psp-import-filters .field:first-child { grid-column: auto; }
  .psp-import-filters button { width: 100%; }
  .psp-import-dialog form { padding: 20px; }
  .psp-import-dialog-actions { display: grid; }
  .psp-import-dialog-actions button { width: 100%; }
  .psp-pinned-status { position: relative; top: auto; padding: 14px; }
  .psp-pinned-copy small { white-space: normal; }
  .psp-pinned-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .psp-pinned-actions button:last-child { grid-column: 1 / -1; }
  .psp-apply-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .psp-apply-dialog form { min-height: 100dvh; display: flex; flex-direction: column; padding: 22px 18px; }
  .psp-apply-summary { grid-template-columns: 1fr 1fr; }
  .psp-apply-summary div:nth-child(2) { border-right: 0; }
  .psp-apply-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .psp-apply-entities { grid-template-columns: 1fr; }
  .psp-apply-actions { position: sticky; bottom: 0; margin-top: auto; padding: 14px 0 22px; background: linear-gradient(transparent, var(--surface-strong) 22%); }
  .psp-apply-actions button { flex: 1; }
  .psp-mapping-drawer { width: 100vw; border-left: 0; }
  .psp-mapping-header { padding: 20px 18px 16px; }
  .psp-mapping-tools { grid-template-columns: 1fr; padding: 13px 18px; }
  .psp-mapping-list { height: auto; padding: 10px 18px 28px; }
  .psp-mapping-row, .psp-mapping-editor { grid-template-columns: 1fr; }
  .psp-mapping-row-status, .psp-mapping-editor button, .psp-mapping-editor .psp-mapping-row-status { grid-column: auto; }
  .psp-materialization-preview { padding: 16px; }
  .psp-materialization-stats, .psp-materialization-references { grid-template-columns: 1fr; }
  .psp-materialization-footnote { text-align: left; }
  .absence-card { grid-template-columns: 42px minmax(0, 1fr); }
  .absence-card-main { padding: 17px 15px; }
  .absence-card-header, .absence-card-footer { display: grid; }
  .absence-status { justify-self: start; }
  .absence-actions { justify-content: flex-start; }
  .absence-date-fields { grid-template-columns: 1fr; gap: 0; }
  .absence-actions button { flex: 1 1 100%; }
  .section-heading { align-items: flex-start; }
  .policy-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .policy-dialog-content { padding: 18px; }
  .policy-selector-row, .policy-form-heading { display: grid; }
  .version-chip { padding: 0; }
  .policy-fields { grid-template-columns: 1fr; }
  .cancellation-review-actions { display: grid; }
  .cancellation-review-actions button { width: 100%; }
}

@media (max-width: 980px) {
  .psp-provider-card-overview-grid { grid-template-columns: 1fr; }
  .psp-provider-card-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-card-metric:nth-child(2) { border-right: 0; }
  .psp-card-metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .psp-provider-preoffer-list { grid-template-columns: 1fr; }
  .psp-provider-desired-list { grid-template-columns: 1fr; }
  .psp-provider-term-card > summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-provider-term-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .psp-request-dialog-header { display: grid; }
  .psp-request-operational-strip,
  .request-workflow-summary { grid-template-columns: 1fr; }
  .psp-provider-card-dialog { width: 100vw; border-left: 0; }
  .psp-network-cards { grid-template-columns: 1fr; }
  .psp-network-detail-header > .icon-close-button { position: absolute; top: 17px; right: 17px; background: var(--surface-strong); }
  .psp-network-detail-header .psp-provider-card-heading { padding-right: 52px; }
  .psp-network-detail-actions { display: grid; grid-template-columns: 1fr; padding: 12px 18px 18px; }
  .psp-network-detail-actions button { width: 100%; }
  .psp-provider-card-header { grid-template-columns: 1fr; gap: 18px; padding: 25px 22px 20px; }
  .psp-provider-card-header-actions { width: 100%; }
  .psp-provider-card-header-actions .primary-button { flex: 1; }
  .psp-provider-card-header-actions .icon-close-button { position: absolute; top: 17px; right: 17px; background: var(--surface-strong); }
  .psp-provider-card-heading { padding-right: 44px; }
  .psp-provider-card-heading h2 { font-size: 31px; }
  .psp-provider-card-nav { padding-inline: 18px; }
  .psp-provider-card-body { padding: 24px 20px 44px; }
  .psp-provider-card-section + .psp-provider-card-section { margin-top: 38px; padding-top: 32px; }
  .psp-provider-card-section-heading { align-items: flex-start; }
  .psp-provider-card-heading-actions { width: 100%; justify-content: space-between; }
  .psp-card-updated { white-space: normal; text-align: right; }
  .psp-provider-card-details { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .psp-provider-card-header { padding-inline: 18px; }
  .psp-provider-card-heading h2 { font-size: 27px; }
  .psp-provider-card-header-meta > span:not(.psp-status, .psp-contact-chip) { width: 100%; padding: 5px 0 0; border-left: 0; }
  .psp-provider-card-body { padding-inline: 16px; }
  .psp-provider-card-metrics { grid-template-columns: 1fr 1fr; }
  .psp-card-metric { padding: 16px 14px; }
  .psp-card-metric strong { font-size: 24px; }
  .psp-provider-card-block { padding: 18px; }
  .psp-provider-card-details, .psp-provider-preoffer-terms { grid-template-columns: 1fr; }
  .psp-provider-method-header { grid-template-columns: 1fr; }
  .psp-provider-method-header .psp-card-compact-action { width: 100%; }
  .psp-provider-term-card > summary { grid-template-columns: 1fr; }
  .psp-provider-term-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .psp-provider-term-details { grid-template-columns: 1fr; }
}

.psp-reference-form {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 2vw, 30px);
}

.psp-reference-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.psp-reference-heading h3 { margin: 4px 0 8px; }
.psp-reference-heading p:last-child { margin: 0; color: var(--muted); max-width: 760px; }

@media (max-width: 760px) {
  .psp-reference-heading { flex-direction: column; }
  .psp-reference-heading .secondary-button { width: 100%; }
}
/* Account Management Tracker */
.account-tracker-hero {
  margin-bottom: 12px;
}

.psp-hero.account-tracker-hero::before {
  content: "ACCOUNT";
}

.operations-access-hero::before { content: "OPERATIONS"; }

.psp-hero.account-tracker-hero h2 {
  max-width: 900px;
  text-wrap: balance;
}

.psp-hero.account-tracker-hero p:not(.eyebrow) {
  max-width: 760px;
  text-wrap: pretty;
}

.account-sheet-panel h3 { margin: 4px 0 6px; }

.account-hero-actions {
  display: grid;
  min-width: 220px;
  flex: 0 0 auto;
  justify-items: stretch;
  gap: 9px;
}

.account-hero-primary {
  min-height: 48px;
  padding-inline: 18px;
  white-space: nowrap;
}

.account-tracker-nav { margin-bottom: 16px; }
.account-tracker-content { min-width: 0; }

.account-tracker-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 260px) auto auto;
  align-items: end;
  gap: var(--space-3);
  margin-bottom: 14px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.account-merchant-toolbar {
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 260px) auto;
}

.account-tracker-toolbar .field { margin: 0; }
.account-tracker-toolbar .field label { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.account-tracker-count { align-self: center; color: var(--muted); font-size: var(--text-md); font-weight: var(--weight-bold); }

.account-sheet-panel {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel-surface);
}

.account-sheet-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.account-sheet-panel > header > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.account-sheet-scroll { overflow: auto; max-width: 100%; max-height: min(68vh, 760px); scrollbar-gutter: stable; overscroll-behavior-inline: contain; }
.account-sheet-scroll.has-account-state { container-type: inline-size; }

.account-sheet-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-md);
}

.account-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  min-width: 132px;
  max-width: 220px;
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  background: var(--table-head-surface);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  line-height: var(--leading-ui);
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.account-sheet-table td {
  min-width: 132px;
  max-width: 300px;
  padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}

.account-sheet-table th:nth-child(1), .account-sheet-table td:nth-child(1) { min-width: 150px; }
.account-sheet-table th:nth-child(3), .account-sheet-table td:nth-child(3) {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 210px;
  background: var(--surface);
  box-shadow: 1px 0 var(--border);
  font-weight: 800;
}
.account-sheet-table th:nth-child(3) { z-index: 5; background: var(--table-head-surface); }

.account-helpdesk-table th:nth-child(1), .account-helpdesk-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 180px;
  background: var(--surface);
  font-weight: 800;
}
.account-helpdesk-table th:nth-child(1) { z-index: 5; background: var(--table-head-surface); }
.account-helpdesk-table th:nth-child(3), .account-helpdesk-table td:nth-child(3) { position: static; font-weight: inherit; }

.account-requested-table th:nth-child(1), .account-requested-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 190px;
  background: var(--surface);
  font-weight: 800;
}
.account-requested-table th:nth-child(1) { z-index: 5; background: var(--table-head-surface); }
.account-requested-table th:nth-child(3), .account-requested-table td:nth-child(3) { position: static; font-weight: inherit; }

.account-actions-heading,
.account-actions-cell {
  width: 60px;
  min-width: 60px !important;
  max-width: 60px !important;
  padding: 8px !important;
  text-align: center !important;
}

.account-helpdesk-table .account-actions-heading,
.account-helpdesk-table .account-actions-cell {
  width: 112px;
  min-width: 112px !important;
  max-width: 112px !important;
}

.account-helpdesk-table .account-actions-cell .compact-button {
  width: 100%;
  min-width: 0;
  padding-inline: 10px;
  white-space: nowrap;
}

.account-actions-heading {
  position: sticky !important;
  right: 0;
  z-index: 6 !important;
  font-size: 18px;
  letter-spacing: 2px;
}

.account-actions-cell {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: -1px 0 var(--border);
  vertical-align: middle;
}

.account-row-menu-trigger {
  display: inline-grid;
  width: var(--icon-control-size);
  height: var(--icon-control-size);
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition-property: color, background-color, border-color, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.account-row-menu-trigger:hover,
.account-row-menu-trigger[aria-expanded="true"] {
  border-color: var(--border);
  background: var(--surface-muted);
}

.account-row-menu-trigger:active { transform: scale(.96); }
.account-row-menu-trigger:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); box-shadow: var(--focus-ring); }
.account-row-menu-trigger:disabled { opacity: var(--control-disabled-action-opacity); cursor: not-allowed; }

.account-row-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  width: max-content;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(15 17 14 / 18%), 0 4px 12px rgb(15 17 14 / 8%);
}

.account-row-menu-item {
  min-height: 44px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-align: left;
  cursor: pointer;
  transition-property: background-color, color;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}

.account-row-menu-item:hover:not(:disabled) { background: var(--surface-muted); }
.account-row-menu-item:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-inset-offset); background: var(--surface-muted); }
.account-row-menu-item:disabled { opacity: var(--control-disabled-action-opacity); cursor: not-allowed; }
.account-state-cell { padding: 34px !important; text-align: left; }
.account-state-cell > .state-kit {
  position: sticky;
  left: max(34px, calc(50cqw - 310px));
  width: 620px;
  max-width: calc(100cqw - 68px);
  min-height: 120px;
  margin-left: max(0px, calc(50cqw - 344px));
}
.account-requested-state { border: 1px solid var(--panel-border); border-radius: var(--radius-panel); background: var(--panel-surface); }
.account-tracker-form .operation-status:has(> .account-form-state) { color: inherit; }
.account-tracker-form .account-form-state { width: 100%; }

.account-tracker-dialog { width: min(1080px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; }
.account-tracker-dialog-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 19px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  backdrop-filter: blur(14px);
}
.account-tracker-dialog-header h2 { margin: 3px 0 7px; font-size: var(--text-display-workspace); letter-spacing: var(--tracking-heading); text-wrap: balance; }
.account-tracker-dialog .account-tracker-form { display: grid; gap: 18px; padding: 24px 28px 28px; }
.account-tracker-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.account-tracker-form .field { align-content: start; margin: 0; }
.account-tracker-form .field label { min-height: 34px; display: flex; align-items: flex-end; }
.account-tracker-form textarea { resize: vertical; }
.account-tracker-dialog .dialog-actions {
  position: sticky;
  z-index: 2;
  bottom: 0;
  margin-inline: -2px;
  padding: 14px 2px 2px;
  background: linear-gradient(transparent, var(--surface-strong) 24%);
}
.account-method-seed { padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.account-method-seed legend { padding: 0 8px; font-weight: 800; }

@media (max-width: 980px) {
  .account-tracker-toolbar { grid-template-columns: 1fr 1fr; }
  .account-tracker-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .account-row-menu-trigger,
  .account-row-menu-item { transition-duration: 0ms; }
}

@media (max-width: 640px) {
  .psp-hero.account-tracker-hero { min-height: var(--hero-block-min-height); align-items: end; padding: var(--hero-block-padding); }
  .account-hero-actions { width: 100%; min-width: 0; }
  .account-hero-primary { width: 100%; }
  .account-tracker-toolbar, .account-tracker-form-grid { grid-template-columns: 1fr; }
  .account-tracker-toolbar .primary-button { width: 100%; }
  .account-tracker-dialog-header { padding: 20px; }
  .account-tracker-dialog .account-tracker-form { padding: 20px; }
  .account-tracker-dialog .dialog-actions { margin-block: 0; }
}

@media (max-width: 900px) {
  .account-sheet-panel { overflow: visible; border: 0; background: transparent; }
  .account-sheet-panel > header {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }
  .account-sheet-scroll { max-height: none; overflow: visible; }
  .account-sheet-table { display: block; width: 100%; min-width: 0; }
  .account-sheet-table caption,
  .account-sheet-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .account-sheet-table tbody { display: grid; gap: 12px; margin-top: 12px; }
  .account-sheet-table tr {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-strong);
    box-shadow: 0 10px 28px rgba(20, 22, 18, .06);
  }
  .account-sheet-table td,
  .account-sheet-table td:nth-child(1),
  .account-sheet-table td:nth-child(3),
  .account-helpdesk-table td:nth-child(1),
  .account-requested-table td:nth-child(1) {
    position: static;
    z-index: auto;
    display: block;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 11px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    box-shadow: none;
    font-weight: 400;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
  }
  .account-sheet-table td::before {
    display: block;
    margin-bottom: 6px;
    color: var(--subtle);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .035em;
    text-transform: uppercase;
    content: attr(data-label);
  }
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(3),
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(4),
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(11),
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(12),
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(27),
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(29),
  .account-helpdesk-table td:nth-child(1),
  .account-helpdesk-table td:nth-child(3),
  .account-helpdesk-table td:nth-child(4),
  .account-helpdesk-table td:nth-child(9),
  .account-helpdesk-table td:nth-child(10),
  .account-helpdesk-table td:nth-child(13),
  .account-state-cell,
  .account-actions-cell {
    grid-column: 1 / -1;
  }
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(10) {
    overflow-wrap: break-word;
  }
  .account-sheet-table td:last-child { border-bottom: 0; }
  .account-actions-cell {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 10px 14px !important;
    text-align: right !important;
  }
  .account-helpdesk-table .account-actions-cell {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .account-actions-cell::before { display: none; }
  .account-row-menu-trigger { width: 100%; border-color: var(--border); background: var(--surface); }
  .account-state-cell { display: block !important; }
  .account-state-cell::before { display: none !important; }
  .account-state-cell > .state-kit {
    position: static;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
}

.psp-requested-view-toggle {
  flex: 0 0 auto;
}
.psp-requested-methods-state,
.psp-requested-method-form-state { width: 100%; }
.psp-requested-method-feedback {
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}
.psp-requested-method-form-state {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}
.psp-requested-method-validation-message {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--state-danger-border);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  overflow-wrap: anywhere;
}
.psp-requested-methods-list {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--panel-surface);
}
.psp-requested-method-list-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(200px, .9fr) minmax(390px, 1.8fr) minmax(150px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-surface-accented);
  box-shadow: var(--shadow-card);
}
.psp-requested-method-list-identity { min-width: 0; }
.psp-requested-method-list-identity .eyebrow { margin: 0 0 4px; }
.psp-requested-method-list-identity h4 {
  margin: 0; overflow: hidden; color: var(--text); font-size: 16px;
  letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap;
}
.psp-requested-method-list-identity p:last-child {
  margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 11px;
  text-overflow: ellipsis; white-space: nowrap;
}
.psp-requested-method-list-summary {
  min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0;
}
.psp-requested-method-list-field {
  min-width: 0; min-height: 58px; padding: 8px 9px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted);
}
.psp-requested-method-list-field dt {
  margin: 0 0 5px; color: var(--subtle); font-size: var(--text-xs); font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label); line-height: var(--leading-ui); text-transform: uppercase;
}
.psp-requested-method-list-field dd {
  margin: 0; color: var(--text); font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: var(--leading-body); overflow-wrap: anywhere;
}
.psp-requested-method-list-actions {
  min-width: 0; display: grid; justify-items: end; gap: 8px;
}
.psp-requested-method-list-open { min-width: 112px; min-height: 42px; }

@media (max-width: 1120px) {
  .psp-requested-method-list-row { grid-template-columns: minmax(180px, .8fr) minmax(340px, 1.5fr) minmax(140px, auto); }
}
@media (max-width: 900px) {
  .psp-requested-method-list-row { grid-template-columns: 1fr; }
  .psp-requested-method-list-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psp-requested-method-list-actions { grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
}
@media (max-width: 760px) {
  .psp-requested-view-toggle { width: 100%; }
  .psp-requested-view-button { flex: 1; }
}
@media (max-width: 520px) {
  .psp-requested-methods-list { padding: 10px; }
  .psp-requested-method-list-summary,
  .psp-requested-method-list-actions { grid-template-columns: 1fr; }
  .psp-requested-method-list-open { width: 100%; }
}

.psp-commercial-dialog .dialog-actions {
  position: sticky;
  z-index: 2;
  bottom: 0;
  margin-inline: -2px;
  padding: 14px 2px 2px;
  background: linear-gradient(transparent, var(--surface-strong) 24%);
}

@media (max-width: 900px) {
  .main-content { padding-inline: clamp(16px, 4vw, 28px); }

  .workspace-hero {
    display: grid;
    min-height: var(--hero-block-min-height);
    align-items: end;
    padding: 24px;
  }
  .workspace-hero-actions,
  .workspace-hero > .access-actions { width: 100%; justify-content: stretch; }
  .workspace-hero-actions button,
  .workspace-hero > .access-actions button { flex: 1; }

  .schedule-scroll-hint { display: block; }
  .schedule-timeline { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .schedule-grid.days-28,
  .schedule-grid.days-29,
  .schedule-grid.days-30,
  .schedule-grid.days-31 {
    width: max-content;
    min-width: max-content;
    grid-template-columns: 140px repeat(var(--schedule-days), 44px);
  }
  .employee-heading,
  .employee-lane-label { width: 140px; min-width: 140px; }
  .employee-heading { padding-inline: 12px; font-size: 10px; }
  .employee-lane-label { padding-inline: 12px; }
  .employee-lane-label strong { font-size: 12px; }
  .employee-lane-label span { display: block; font-size: 10px; }
  .day-heading { width: 44px; min-width: 44px; min-height: 52px; scroll-snap-align: start; }
  .day-heading strong { font-size: 12px; }
  .day-heading span { display: block; margin-top: 2px; font-size: 9px; }
  .schedule-slot { width: 44px; min-width: 44px; min-height: 52px; padding: 2px; font-size: 11px; }

  .psp-provider-card-dialog { width: 100vw; border-left: 0; }
  .psp-network-table th:first-child,
  .psp-network-table .psp-network-provider-cell {
    position: sticky;
    left: 0;
    z-index: 5;
  }
  .psp-network-table th:first-child { z-index: 7; }
  .psp-table-action,
  .psp-provider-edit-link,
  .psp-sheet-edit,
  .psp-commercial-edit,
  .psp-inline-select,
  .psp-compact-filter { min-height: 44px; }
}

@media (max-width: 520px) {
  :root {
    --hero-watermark-top: 12px;
    --hero-watermark-right: -12px;
    --hero-watermark-size: 72px;
  }
  body { font-size: 15px; }
  h1 { font-size: 42px; }
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(5)::before,
  .account-sheet-table:not(.account-helpdesk-table) td:nth-child(6)::before { min-height: 2.7em; }
  .account-actions-cell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    text-align: left !important;
  }
  .account-actions-cell::before {
    display: block !important;
    min-height: 0;
    margin-bottom: 0;
  }
  .account-actions-cell .account-row-menu-trigger {
    width: var(--icon-control-size);
    justify-self: end;
  }
  .page-heading .description,
  .organization-heading .description { max-width: 100%; }
  .workspace-hero { min-height: var(--hero-block-min-height); padding: var(--hero-block-padding); }
  .workspace-hero h2 { font-size: var(--hero-title-size); }
  .workspace-hero-actions,
  .workspace-hero > .access-actions { display: grid; grid-template-columns: 1fr; }
  .workspace-hero-actions button,
  .workspace-hero > .access-actions button { width: 100%; }
  .psp-network-card { min-height: 0; padding: 16px; }
  .psp-network-card-header { display: flex; padding: 0; }
  .psp-network-card-summary { grid-template-columns: 1fr 1fr; }
  .psp-network-card-section { padding: 15px 16px 17px 18px; }
  .psp-network-card-details { grid-template-columns: 1fr; }
  .psp-network-card-more > summary { padding-inline: 18px; }
  .psp-network-card-actions { grid-template-columns: 1fr; padding: 12px 0 0; }
  .psp-network-card-open { width: 100%; }
  .account-sheet-table td,
  .account-sheet-table td:nth-child(1),
  .account-sheet-table td:nth-child(3),
  .account-helpdesk-table td:nth-child(1),
  .account-requested-table td:nth-child(1) {
    padding-inline: 12px;
  }
  .account-tracker-dialog { width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .account-tracker-dialog .dialog-actions,
  .psp-commercial-dialog .dialog-actions { bottom: 0; padding-bottom: 20px; }
}

/* Unified select controls */
body select {
  max-width: 100%;
  overflow: hidden;
  border-color: var(--select-control-border);
  border-radius: 10px;
  background-color: var(--select-control-bg);
  box-shadow: var(--select-control-shadow);
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition-property: border-color, background-color, box-shadow, color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

body select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding-inline: 13px 46px;
  background-image:
    var(--select-control-chevron-image),
    linear-gradient(var(--select-control-divider), var(--select-control-divider));
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 38px) 50%;
  background-repeat: no-repeat;
  background-size: 16px 16px, 1px 22px;
  cursor: pointer;
}

body select:not([multiple]):not(:disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border-strong));
  background-color: var(--select-control-bg-hover);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent), 0 3px 10px rgba(17, 19, 15, .07);
}

body select:not([multiple]):not(:disabled):active { background-color: var(--surface-hover); }

body select:focus,
body select:focus-visible {
  border-color: var(--accent);
  background-color: var(--select-control-bg);
  box-shadow: var(--focus-ring), var(--select-control-shadow);
}

body select:disabled,
body select[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--control-disabled-field-opacity);
  box-shadow: none;
}

body select option,
body select optgroup {
  background-color: var(--surface-strong);
  color: var(--text);
  font-weight: 540;
}

body select optgroup { font-weight: 760; }

body .login-card select {
  --select-control-bg: #ffffff;
  --select-control-bg-hover: #f3f2ed;
  --select-control-border: #b9bbb1;
  --select-control-arrow: #55584f;
  --select-control-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171813' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --select-control-divider: #d5d5cd;
  color: #171813;
}

body .login-card select option,
body .login-card select optgroup {
  background-color: #ffffff;
  color: #171813;
}

body .sidebar select {
  --select-control-bg: var(--sidebar-soft);
  --select-control-bg-hover: color-mix(in srgb, var(--sidebar-soft) 86%, #ffffff);
  --select-control-border: var(--sidebar-border);
  --select-control-arrow: var(--sidebar-muted);
  --select-control-chevron-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f3ed' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --select-control-divider: var(--sidebar-border);
  --select-control-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  min-height: 40px;
}

body .psp-inline-select,
body .psp-source-row-actions select,
body .psp-network-provider-cell .psp-inline-select {
  border-radius: 8px;
  min-height: 40px;
  padding-right: 42px;
  background-position:
    calc(100% - 16px) calc(50% - 1px),
    calc(100% - 11px) calc(50% - 1px),
    calc(100% - 34px) 50%;
}

@media (max-width: 900px) {
  body .psp-inline-select,
  body .psp-source-row-actions select,
  body .psp-network-provider-cell .psp-inline-select { min-height: 44px; }
  .admin-panel-context { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
}

@media (forced-colors: active) {
  body select:not([multiple]) {
    appearance: auto;
    -webkit-appearance: menulist;
    padding-right: 12px;
    background-image: none;
  }
}

/* Audit journal filters */
.audit-workspace { display: grid; gap: 14px; }
.audit-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) repeat(4, minmax(135px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 3%, transparent);
}
.audit-filters .field { min-width: 0; margin: 0; gap: 5px; }
.audit-filters .field label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.audit-filters input,
.audit-filters select,
.audit-filters button { min-height: 44px; }
.audit-search-field { grid-column: span 2; }
.audit-filter-actions {
  grid-column: span 2;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.audit-filter-actions button { flex: 0 0 auto; }
.audit-filter-status {
  min-width: 0;
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.audit-results { min-width: 0; }
.audit-table caption { font-variant-numeric: tabular-nums; }
.audit-time { min-width: 160px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.audit-outcome { white-space: nowrap; }
.audit-outcome.is-success { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); background: var(--success-soft); color: var(--success); }
.audit-outcome.is-denied,
.audit-outcome.is-failure { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.admin-audit-workspace-state,
.admin-audit-filter-state { width: 100%; }
.admin-audit-filter-state { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); }

@media (max-width: 1120px) {
  .audit-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audit-filter-actions { grid-column: span 2; }
}

@media (max-width: 760px) {
  .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-actions { grid-column: 1 / -1; justify-content: space-between; }
}

@media (max-width: 460px) {
  .audit-filters { grid-template-columns: 1fr; padding: 13px; }
  .audit-search-field,
  .audit-filter-actions { grid-column: auto; }
  .audit-filter-actions { align-items: stretch; flex-direction: column; }
  .audit-filter-actions button { width: 100%; }
  .audit-filter-status { order: 2; text-align: left; }
}

/* BD Dashboard: aggregate-only analytics with semantic table fallbacks. */
.bd-dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}
.bd-dashboard-toolbar p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.bd-dashboard-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}
.bd-dashboard-filter-field { display: grid; min-width: 0; gap: 6px; }
.bd-dashboard-filter-field > span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.bd-dashboard-filter-field select { width: 100%; min-height: var(--control-height); }
.bd-dashboard-filter-actions { display: flex; align-items: center; gap: 8px; }
.bd-dashboard-filter-actions button { min-height: var(--control-height); }
.bd-dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bd-dashboard-kpi {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
}
.bd-dashboard-kpi strong {
  font-size: var(--text-3xl);
  line-height: 1;
  letter-spacing: var(--tracking-heading);
  font-variant-numeric: tabular-nums;
}
.bd-dashboard-kpi span { color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.bd-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 12px; }
.bd-dashboard-chart,
.bd-dashboard-panel {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}
.bd-dashboard-chart figcaption h4,
.bd-dashboard-panel h4 { margin: 0; font-size: var(--text-lg); }
.bd-dashboard-chart figcaption p,
.bd-dashboard-panel > header p,
.bd-dashboard-panel.is-redacted p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-sm); }
.bd-dashboard-canvas { height: 280px; margin-top: 14px; }
.bd-dashboard-chart-empty {
  min-height: 168px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
  text-align: center;
}
.bd-dashboard-chart-empty-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--subtle);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}
.bd-dashboard-chart-empty p { max-width: 32ch; margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.bd-dashboard-chart.is-empty .bd-dashboard-table-details { margin-top: 10px; }
.bd-dashboard-table-details { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.bd-dashboard-table-details summary { min-height: 44px; display: flex; align-items: center; color: var(--accent-text); cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.bd-dashboard-table-scroll { max-width: 100%; overflow-x: auto; }
.bd-dashboard-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.bd-dashboard-table caption { padding: 8px 0; color: var(--muted); text-align: left; }
.bd-dashboard-table th,
.bd-dashboard-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; font-variant-numeric: tabular-nums; }
.bd-dashboard-table th { color: var(--muted); font-size: var(--text-xs); text-transform: uppercase; }
.bd-dashboard-sla { display: grid; gap: 10px; margin: 18px 0 0; }
.bd-dashboard-sla > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border-radius: 8px; background: var(--surface); }
.bd-dashboard-sla dt { color: var(--muted); font-size: var(--text-sm); }
.bd-dashboard-sla dd { margin: 0; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.bd-dashboard-commercial { min-height: 118px; }
.bd-dashboard-commercial.is-redacted { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 18px; }
.bd-dashboard-commercial.is-redacted strong { grid-row: 1 / 3; grid-column: 2; color: var(--muted); font-size: var(--text-3xl); }
.bd-dashboard-footer { display: flex; justify-content: flex-end; }

@media (max-width: 1120px) {
  .bd-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .bd-dashboard-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-dashboard-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 460px) {
  .bd-dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .bd-dashboard-toolbar button { width: 100%; }
  .bd-dashboard-filters { grid-template-columns: 1fr; }
  .bd-dashboard-filter-actions { grid-column: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .bd-dashboard-filter-actions button { width: 100%; }
  .bd-dashboard-kpis { grid-template-columns: 1fr; }
  .bd-dashboard-kpi { min-height: 92px; }
  .bd-dashboard-chart,
  .bd-dashboard-panel { padding: 14px; }
  .bd-dashboard-canvas { height: 250px; }
  .bd-dashboard-chart-empty { min-height: 148px; padding: 16px; }
  .bd-dashboard-commercial.is-redacted { grid-template-columns: 1fr; }
  .bd-dashboard-commercial.is-redacted strong { grid-row: auto; grid-column: auto; }
  .bd-dashboard-footer button { width: 100%; }
}

