:root {
  --bg: #f4f7fb;
  --bg-accent: #edf3ff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --line: rgba(15, 51, 112, 0.09);
  --ink: #1f2937;
  --muted: #6b7280;
  --brand: #1677ff;
  --brand-soft: #0f5dd8;
  --alert: #d14343;
  --pay: #0f9d7a;
  --cost: #f59e0b;
  --shadow: 0 12px 32px rgba(15, 34, 72, 0.08);
  --radius: 22px;
  --radius-sm: 16px;
  --font-ui: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(22, 119, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #f7faff 0%, #f2f6fc 100%);
  font-family: var(--font-ui);
}

.page-shell {
  max-width: 1720px;
  margin: 0 auto;
  padding: 20px 28px 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.98)),
    linear-gradient(180deg, #ffffff, #f6f9ff);
  color: var(--ink);
  box-shadow: var(--shadow);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.hero-shell {
  align-items: stretch;
  flex-direction: column;
}

.top-shell {
  gap: 10px;
  padding-bottom: 14px;
}

.top-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
}

.top-brand-block {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.top-title-row {
  display: grid;
  gap: 4px;
  align-content: center;
}

.top-title-inline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.top-inline-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.top-meta-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 430px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.94);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.top-meta-pill-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-meta-pill strong {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.top-meta-pill-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  align-self: center;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.hero-copy-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.06);
  border: 1px solid rgba(22, 119, 255, 0.12);
  color: #4b5563;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-chip.strong {
  background: rgba(22, 119, 255, 0.12);
  color: var(--brand-soft);
  border-color: rgba(22, 119, 255, 0.18);
}

.customer-center-shell {
  position: relative;
  display: inline-flex;
}

.hero-chip-button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  line-height: 1;
  cursor: default;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.hero-chip-button.is-interactive {
  cursor: pointer;
}

.hero-chip-button.is-interactive:hover,
.hero-chip-button.is-active {
  transform: translateY(-1px);
  background: rgba(22, 119, 255, 0.12);
  border-color: rgba(22, 119, 255, 0.2);
  color: var(--brand-soft);
}

.customer-center-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  width: min(336px, calc(100vw - 40px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(22, 119, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.98)),
    linear-gradient(135deg, rgba(22, 119, 255, 0.06), rgba(15, 93, 216, 0.03));
  box-shadow: 0 14px 30px rgba(15, 34, 72, 0.14);
}

.customer-center-popover-head {
  display: grid;
  gap: 8px;
}

.customer-center-popover-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.customer-center-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.customer-center-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: rgba(22, 43, 65, 0.78);
}

.customer-center-form input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(13, 42, 77, 0.12);
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
}

.customer-center-form input:disabled,
.customer-center-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.customer-center-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(13, 42, 77, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.9), rgba(255, 255, 255, 0.98));
}

.customer-center-bound-section {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.customer-center-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(22, 43, 65, 0.78);
}

.customer-center-bound-list {
  display: grid;
  gap: 8px;
}

.customer-center-bound-button {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(13, 42, 77, 0.1);
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.customer-center-bound-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(22, 119, 255, 0.22);
  box-shadow: 0 12px 28px rgba(15, 34, 72, 0.08);
}

.customer-center-bound-button.is-active {
  border-color: rgba(22, 119, 255, 0.22);
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.customer-center-bound-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.customer-center-bound-top,
.customer-center-bound-meta,
.customer-center-bound-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-center-bound-top strong {
  font-size: 14px;
}

.customer-center-bound-meta,
.customer-center-bound-stats {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.customer-center-bound-empty {
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(13, 42, 77, 0.12);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.76);
}

.customer-center-bound-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--brand-soft);
  font-size: 11px;
  font-weight: 700;
}

.customer-center-bound-badge.subtle {
  background: rgba(88, 104, 126, 0.1);
  color: rgba(48, 72, 98, 0.78);
}

.customer-center-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(13, 42, 77, 0.08);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.hero h1,
.panel h2,
.login-card h1 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: 22px;
  line-height: 1.08;
}

.hero-copy,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: none;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.hero-side {
  display: flex;
  min-width: 300px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 14px;
}

.hero-meta-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(22, 119, 255, 0.04);
  border: 1px solid rgba(22, 119, 255, 0.1);
  backdrop-filter: blur(14px);
}

.hero-meta-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-meta-value {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.hero-meta-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button.compact {
  padding: 6px 11px;
  font-size: 12px;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(22, 119, 255, 0.18);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-soft);
  border: 1px solid rgba(22, 119, 255, 0.12);
}

.button.ghost.danger {
  color: var(--alert);
  border-color: rgba(209, 67, 67, 0.2);
  background: rgba(255, 248, 248, 0.96);
}

.button.full {
  width: 100%;
}

.overview-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(360px, 0.92fr);
  gap: 16px;
  margin-top: 18px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 0;
}

.overview-hero-card {
  padding: 20px 20px 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96)),
    radial-gradient(circle at top right, rgba(22, 119, 255, 0.1), transparent 38%);
  border: 1px solid rgba(22, 119, 255, 0.08);
  box-shadow: var(--shadow);
}

.overview-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.overview-hero-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.overview-hero-copy {
  margin: 8px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.overview-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.overview-hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(280px, 0.9fr);
  gap: 12px;
  margin-top: 14px;
  align-items: stretch;
}

.overview-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.overview-hero-metric {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(22, 119, 255, 0.08);
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.overview-hero-metric.accent {
  background: linear-gradient(180deg, rgba(22, 119, 255, 0.12), rgba(255, 255, 255, 0.96));
}

.overview-hero-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.overview-hero-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.05;
}

.overview-hero-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.overview-foot-stat {
  padding: 12px 14px;
  border-radius: 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(22, 119, 255, 0.08), transparent 44%);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.overview-foot-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.overview-foot-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.overview-kpi-strip {
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-rail {
  display: grid;
  gap: 16px;
}

.system-card {
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: rgba(255, 249, 240, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.system-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.system-card-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-card-value {
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.system-card-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.system-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.system-stat {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.system-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.system-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
}

.system-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 59, 47, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.system-pill.warn {
  background: rgba(202, 111, 30, 0.12);
  color: #9a5515;
}

.system-pill.danger {
  background: rgba(142, 43, 43, 0.12);
  color: var(--alert);
}

.kpi-card,
.panel,
.login-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 16px 18px;
  border-radius: 18px;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.kpi-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.board-grid {
  display: block;
  margin-top: 14px;
}

.panel {
  margin-top: 18px;
  padding: 22px 22px 18px;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head-compact {
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

.panel-head-compact > :first-child {
  flex: 0 1 auto;
  min-width: 0;
}

.head-control-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 10px;
  min-width: 0;
  flex: 1 1 720px;
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel h2 {
  font-size: 24px;
}

.panel h3 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.meta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.meta-block.compact {
  min-width: 180px;
}

.meta-block.single-line {
  min-width: 0;
}

.alert-stream {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 100%;
  min-width: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}

.alert-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.alert-focus-grid {
  display: grid;
  grid-template-columns: minmax(400px, 0.84fr) minmax(0, 1.16fr);
  gap: 16px;
  align-items: start;
}

.alert-summary-shell,
.alert-stream-shell {
  min-width: 0;
  min-height: 100%;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at top right, rgba(22, 119, 255, 0.04), transparent 48%);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.alert-summary-shell {
  display: flex;
  flex-direction: column;
}

.alert-stream-shell {
  display: flex;
  flex-direction: column;
  max-height: 760px;
  overflow: hidden;
}

.alert-section-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  min-height: 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alert-summary-card {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(77, 57, 36, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(249, 241, 228, 0.88));
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.alert-summary-card.spotlight {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 14px 16px;
  background:
    radial-gradient(circle at top right, rgba(247, 216, 168, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(255, 251, 244, 0.98), rgba(246, 236, 220, 0.96));
}

.alert-summary-card.spotlight.calm {
  background:
    radial-gradient(circle at top right, rgba(20, 59, 47, 0.08), transparent 36%),
    linear-gradient(145deg, rgba(255, 251, 244, 0.98), rgba(243, 236, 226, 0.96));
}

.alert-summary-card.hot {
  background: linear-gradient(135deg, rgba(142, 43, 43, 0.1), rgba(255, 245, 241, 0.96));
  border-color: rgba(142, 43, 43, 0.18);
}

.alert-summary-card.stat {
  min-height: 108px;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.summary-value.compact {
  font-size: 28px;
  line-height: 1.18;
}

.summary-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.summary-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 59, 47, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.summary-chip.subtle {
  background: rgba(107, 100, 92, 0.1);
  color: #5b554e;
}

.summary-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.summary-metric-row div {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.summary-metric-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-metric-row strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  color: var(--ink);
}

.alert-stream.empty,
.detail-panel.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px dashed rgba(31, 27, 24, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.alert-item {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(77, 57, 36, 0.09);
  box-shadow: 0 10px 24px rgba(70, 41, 12, 0.06);
  height: 100%;
}

.alert-item.is-pending {
  border-color: rgba(142, 43, 43, 0.18);
  background: linear-gradient(180deg, rgba(255, 249, 245, 0.92), rgba(255, 255, 255, 0.82));
}

.alert-topline,
.alert-title-row,
.alert-badges {
  display: flex;
  align-items: center;
}

.alert-topline,
.alert-title-row {
  justify-content: space-between;
  gap: 14px;
}

.alert-badges {
  flex-wrap: wrap;
  gap: 8px;
}

.alert-kind,
.alert-metric,
.alert-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.alert-kind {
  background: rgba(20, 59, 47, 0.08);
  color: var(--brand);
}

.alert-metric {
  background: rgba(202, 111, 30, 0.1);
  color: #935115;
}

.alert-status.pending {
  background: rgba(142, 43, 43, 0.12);
  color: var(--alert);
}

.alert-status.sent {
  background: rgba(11, 125, 101, 0.12);
  color: var(--pay);
}

.alert-time {
  color: var(--muted);
  font-size: 13px;
}

.alert-item h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.alert-rule {
  color: var(--muted);
  font-size: 13px;
}

.alert-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.alert-metrics.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alert-metrics div {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: rgba(247, 241, 231, 0.82);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.alert-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.alert-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  color: var(--ink);
}

.alert-footline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.alert-message {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(77, 57, 36, 0.12);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.alert-panel {
  margin-top: 0;
}

.overview-alert-head {
  align-items: flex-end;
}

.overview-alert-head > :first-child {
  display: grid;
  gap: 4px;
}

.overview-alert-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.overview-alert-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.overview-alert-meta-item {
  min-width: 86px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid rgba(22, 119, 255, 0.08);
  display: grid;
  gap: 4px;
}

.overview-alert-meta-item.is-wide {
  min-width: 168px;
}

.overview-alert-meta-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overview-alert-meta-item strong {
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-inline {
  width: 100%;
  min-width: 0;
}

.toolbar-inline-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 180px);
  gap: 8px 10px;
  align-items: center;
  flex: 1 1 720px;
  min-width: 0;
}

.toolbar-inline-triple {
  grid-template-columns: minmax(0, 1fr) minmax(148px, 180px) auto;
}

.toolbar-inline-material {
  grid-template-columns: minmax(0, 1fr) minmax(336px, 430px);
}

.toolbar-inline-plan {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}

.toolbar-inline-comment {
  grid-template-columns: minmax(0, 1fr) minmax(560px, 760px);
  align-items: center;
}

.toolbar-inline-comment .range-filter-group {
  align-self: center;
}

.toolbar-secondary {
  width: auto;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.toolbar.wide {
  min-width: 0;
  justify-content: flex-end;
}

.toolbar.wide .range-filter-group {
  margin-right: auto;
  flex: 1 1 420px;
}

.range-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.toolbar-inline-primary .range-filter-group {
  grid-column: 1;
  flex-wrap: wrap;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.rank-grid,
.rank-stack {
  display: grid;
  gap: 18px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-panel {
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.rank-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rank-search {
  flex: 0 1 200px;
  max-width: 200px;
}

.rank-table-shell {
  max-height: clamp(460px, calc(100vh - 320px), 700px);
}

.inline-feedback[data-tone="success"] {
  color: #157347;
}

.inline-feedback[data-tone="warn"] {
  color: #b26a00;
}

.inline-feedback[data-tone="neutral"] {
  color: var(--muted);
}

.range-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(20, 59, 47, 0.08);
  border: 1px solid rgba(77, 57, 36, 0.1);
  flex-shrink: 0;
}

.range-button {
  border: 0;
  min-width: 36px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.range-button:hover {
  transform: translateY(-1px);
}

.range-button.active {
  background: var(--brand);
  color: #f8f3ea;
  box-shadow: 0 10px 18px rgba(20, 59, 47, 0.18);
}

.section-range-meta {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-input,
.date-input,
.select-input,
.rule-form input,
.rule-form select,
.ownership-form-grid textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  color: var(--ink);
}

.toolbar > .search-input,
.toolbar.wide > .search-input {
  flex: 0 1 288px;
  min-width: 240px;
  width: auto;
}

.toolbar-inline-primary > .search-input {
  grid-column: 2;
  width: 100%;
  min-width: 240px;
  max-width: none;
  justify-self: end;
}

.toolbar-search-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  justify-self: end;
}

.toolbar-search-actions > .search-input {
  flex: 1 1 auto;
  min-width: 248px;
}

.toolbar-search-actions > .select-input {
  flex: 0 0 156px;
  min-width: 156px;
  width: auto;
}

.toolbar-search-actions > .button {
  flex: 0 0 auto;
}

.toolbar-inline-material .toolbar-search-actions {
  justify-self: stretch;
  max-width: 430px;
}

.toolbar-inline-material .toolbar-search-actions > .search-input {
  min-width: 0;
}

.toolbar-inline-plan .toolbar-search-actions {
  justify-self: stretch;
  max-width: 520px;
}

.toolbar-inline-plan .toolbar-search-actions > .search-input {
  min-width: 0;
}

.toolbar-inline-comment .toolbar-search-actions {
  justify-self: stretch;
  align-self: center;
  max-width: 760px;
  flex-wrap: nowrap;
  row-gap: 0;
  align-content: center;
}

.toolbar-inline-comment .toolbar-search-actions > .search-input {
  flex: 1 1 auto;
  min-width: 240px;
}

.toolbar-inline-comment .toolbar-search-actions > .select-input {
  flex: 0 0 220px;
  min-width: 220px;
}

.toolbar-inline-comment .toolbar-search-actions > .button {
  margin-left: 0;
  white-space: nowrap;
}

.toolbar-inline-triple > .select-input,
.toolbar-inline-triple > .button {
  grid-column: 3;
  justify-self: end;
}

.toolbar > .select-input,
.toolbar.wide > .select-input {
  flex: 0 0 156px;
  width: auto;
}

.date-range-inline {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex-wrap: wrap;
}

.toolbar-inline-primary .date-range-inline {
  flex-wrap: nowrap;
}

.custom-date-inline {
  gap: 0;
  max-width: 100%;
  padding: 3px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(77, 57, 36, 0.1);
}

.custom-date-toggle {
  min-width: 54px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.custom-date-toggle:hover {
  transform: translateY(-1px);
}

.custom-date-fields {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}

.custom-date-inline.active {
  background: rgba(22, 119, 255, 0.08);
  border-color: rgba(22, 119, 255, 0.18);
}

.custom-date-inline.active .custom-date-toggle,
.custom-date-inline.expanded .custom-date-toggle {
  background: rgba(22, 119, 255, 0.12);
  color: var(--brand);
}

.custom-date-inline.active .custom-date-fields,
.custom-date-inline.expanded .custom-date-fields,
.custom-date-inline:focus-within .custom-date-fields {
  max-width: 360px;
  margin-left: 6px;
  opacity: 1;
  pointer-events: auto;
}

.date-input {
  width: 132px;
  min-width: 132px;
  padding-right: 8px;
  font-size: 14px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.date-input::-webkit-datetime-edit {
  padding: 0;
}

.date-input::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.date-input::-webkit-calendar-picker-indicator {
  margin-left: 4px;
}

.date-range-sep {
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.date-apply-button {
  min-width: 46px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.date-apply-button:hover {
  transform: translateY(-1px);
  background: rgba(22, 119, 255, 0.16);
}

.table-shell {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.table-shell.tall {
  min-height: clamp(520px, calc(100vh - 360px), 700px);
  max-height: clamp(640px, calc(100vh - 250px), 900px);
}

.account-table-shell {
  min-height: clamp(560px, calc(100vh - 320px), 760px);
  max-height: clamp(760px, calc(100vh - 220px), 960px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.data-table.compact {
  min-width: 800px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-strong);
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(77, 57, 36, 0.08);
  font-size: 13px;
  vertical-align: top;
}

.data-table tbody tr {
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: rgba(20, 59, 47, 0.05);
}

.data-table tbody tr.active-row {
  background: rgba(20, 59, 47, 0.08);
}

.comment-table {
  min-width: 1960px;
  table-layout: fixed;
}

.comment-table thead th {
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: none;
}

.comment-table tbody td:nth-child(2),
.comment-table tbody td:nth-child(3),
.comment-table tbody td:nth-child(4),
.comment-table tbody td:nth-child(5),
.comment-table tbody td:nth-child(8),
.comment-table tbody td:nth-child(9),
.comment-table tbody td:nth-child(11),
.comment-table tbody td:nth-child(12) {
  white-space: nowrap;
}

.comment-table tbody td:nth-child(3),
.comment-table tbody td:nth-child(4),
.comment-table tbody td:nth-child(5),
.comment-table tbody td:nth-child(8),
.comment-table tbody td:nth-child(9),
.comment-table tbody td:nth-child(11),
.comment-table tbody td:nth-child(12) {
  text-align: center;
}

.comment-table tbody td:nth-child(14) {
  white-space: nowrap;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.table-pager-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.table-pager-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.table-page-button.is-active {
  background: var(--brand);
  color: #f8f3ea;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(20, 59, 47, 0.18);
}

.table-pager-ellipsis {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.th-sort::after {
  content: attr(data-sort-hint);
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  color: #9f9385;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.rank-index-cell {
  color: var(--muted);
  font-weight: 700;
}

.upload-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.positive {
  color: var(--pay);
}

.negative {
  color: var(--alert);
}

.detail-panel {
  margin-top: 16px;
  min-height: 160px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(77, 57, 36, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 242, 234, 0.9)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 36px rgba(77, 57, 36, 0.08);
  display: grid;
  gap: 14px;
}

.detail-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.decision-panel .detail-panel {
  margin-top: 0;
}

.decision-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.detail-view-layout {
  margin-top: 10px;
}

.upload-stack,
.access-stack {
  display: grid;
  gap: 14px;
  align-items: start;
}

.access-stack {
  grid-template-columns: minmax(0, 1fr);
}

.access-panel-head {
  margin-bottom: 16px;
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.access-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.access-overview-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(18, 42, 67, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95)),
    linear-gradient(135deg, rgba(22, 119, 255, 0.04), rgba(15, 93, 216, 0.02));
  box-shadow: 0 14px 34px rgba(18, 42, 67, 0.06);
}

.access-overview-card.is-accent {
  border-color: rgba(22, 119, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(22, 119, 255, 0.08), rgba(15, 93, 216, 0.03));
}

.access-overview-card.is-highlight {
  border-color: rgba(20, 59, 47, 0.14);
  background:
    linear-gradient(180deg, rgba(246, 252, 249, 0.98), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(20, 59, 47, 0.08), rgba(22, 119, 255, 0.02));
}

.access-overview-card.is-muted {
  opacity: 0.84;
}

.access-overview-label,
.section-kicker {
  color: rgba(48, 72, 98, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.access-overview-value {
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.access-overview-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.access-card-head {
  align-items: flex-start;
  gap: 10px;
}

.access-card-head h3 {
  margin-top: 2px;
}

.runtime-config-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(22, 119, 255, 0.08), rgba(15, 93, 216, 0.03));
}

.runtime-config-preview-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.runtime-config-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.runtime-config-preview-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(22, 119, 255, 0.1);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
}

.runtime-config-preview-item .mono {
  color: var(--muted);
}

.access-user-table-shell {
  min-height: clamp(220px, calc(100vh - 620px), 320px);
}

.access-panel {
  padding: 18px 18px 16px;
}

.access-panel-head {
  margin-bottom: 12px;
}

.access-panel .meta-block.compact.single-line span {
  font-size: 12px;
}

.access-panel .access-overview-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.access-panel .access-overview-card {
  min-height: 104px;
  gap: 6px;
  padding: 13px 14px;
  border-radius: 18px;
}

.access-panel .access-layout {
  gap: 12px;
}

.access-panel .access-config-card,
.access-panel .access-list-card,
.access-panel .access-editor-card,
.access-panel .ownership-card {
  padding: 12px;
  border-radius: 16px;
}

.access-panel .subpanel-head {
  margin-bottom: 8px;
}

.access-panel .access-card-head {
  gap: 8px;
}

.access-panel .access-card-head h3 {
  margin-top: 0;
  font-size: 15px;
}

.access-panel .ownership-form-grid.access-form-grid {
  gap: 12px;
}

.access-panel .access-form-main-grid {
  gap: 10px 12px;
}

.access-panel .ownership-form-grid .access-form-keyword-field textarea {
  min-height: 96px;
}

.access-panel .access-form-rail {
  gap: 8px;
  padding: 10px;
}

.access-panel .access-option-list {
  gap: 6px;
}

.access-panel .access-toggle-card {
  min-height: 54px;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
}

.access-panel .access-toggle-card-compact {
  min-height: 34px;
  padding: 7px 9px;
}

.access-panel .ownership-form-actions.access-button-stack {
  gap: 6px;
}

.access-panel .access-action-button {
  min-width: 108px;
  min-height: 32px;
  padding: 0 12px !important;
}

.access-panel .access-user-table-shell {
  min-height: clamp(210px, calc(100vh - 660px), 300px);
}

.access-panel .access-user-cell {
  gap: 10px;
}

.access-panel .access-user-copy {
  gap: 3px;
}

.access-panel .access-user-name {
  font-size: 13px;
}

.access-panel .access-user-subline,
.access-panel .access-user-note {
  font-size: 11px;
}

.access-panel .access-user-tags {
  gap: 5px;
  margin-bottom: 6px;
}

.access-panel .access-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.access-panel .scope-controls {
  gap: 10px;
  margin: 10px 0 8px;
  padding: 12px;
  border-radius: 14px;
}

.access-panel .scope-checklist {
  gap: 10px;
  max-height: 420px;
  padding: 3px;
}

.decision-main,
.decision-side {
  min-width: 0;
}

.decision-side {
  display: grid;
  gap: 12px;
}

.detail-stage {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 16px;
}

.detail-panel.empty {
  min-height: 220px;
  padding: 20px;
}

.detail-empty-state {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  max-width: 280px;
  margin: 0 auto;
}

.detail-empty-state strong {
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
}

.detail-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.detail-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-shell-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(20, 59, 47, 0.08);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-shell-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-family: var(--font-ui);
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(77, 57, 36, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-actions:empty {
  display: none;
}

.detail-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-highlight {
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(77, 57, 36, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.detail-highlight .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.detail-highlight .value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.detail-grid-section {
  display: grid;
  gap: 10px;
}

.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-section-title::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(77, 57, 36, 0.16), rgba(77, 57, 36, 0));
}

.detail-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-block-head h4 {
  margin: 0;
  font-size: 17px;
  font-family: var(--font-ui);
}

.detail-block-head span {
  color: var(--muted);
  font-size: 12px;
}

.detail-stats-plan {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-stat {
  padding: 12px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.detail-stat-wide {
  grid-column: 1 / -1;
}

.detail-stat .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.detail-stat .value {
  font-size: 22px;
  font-weight: 800;
}

.detail-stat .value.compact {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}

.detail-note-card {
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(20, 59, 47, 0.12);
  background: linear-gradient(180deg, rgba(245, 249, 246, 0.92), rgba(255, 255, 255, 0.82));
}

.detail-note-card .label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-note-card .value {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 600;
}

.detail-note-card .value.compact {
  font-size: 14px;
}

.detail-sub {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cell-primary {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.cell-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.cell-subline-stack {
  display: grid;
  gap: 4px;
}

.cell-subitem {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.material-preview-trigger {
  position: relative;
  display: block;
  width: 112px;
  height: 64px;
  padding: 0;
  border: 1px solid rgba(77, 57, 36, 0.14);
  border-radius: 14px;
  background: #0d1520;
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.material-preview-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 59, 47, 0.26);
  box-shadow: 0 12px 20px rgba(20, 59, 47, 0.16);
}

.material-preview-trigger:focus-visible {
  outline: 2px solid rgba(20, 59, 47, 0.4);
  outline-offset: 2px;
}

.material-preview-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d1520;
}

.material-preview-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(13, 21, 32, 0.78);
  color: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.material-preview-trigger.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(20, 59, 47, 0.12), rgba(13, 21, 32, 0.92));
}

.material-preview-trigger.is-fallback .material-preview-badge {
  position: static;
  background: rgba(255, 255, 255, 0.14);
}

.material-preview-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(107, 100, 92, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.asset-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.asset-mini-card {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.asset-mini-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.asset-mini-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
}

.asset-group {
  margin-top: 16px;
}

.asset-group:first-of-type {
  margin-top: 0;
}

.asset-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.asset-group-head h4 {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-ui);
}

.asset-group-head span {
  color: var(--muted);
  font-size: 12px;
}

.asset-list {
  display: grid;
  gap: 10px;
}

.asset-item {
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(77, 57, 36, 0.08);
}

.asset-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-item-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.asset-item-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.asset-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta-row > .pill,
.detail-meta-row > .status-stack {
  flex: 0 0 auto;
}

.mini-chart {
  border-radius: 20px;
  overflow: hidden;
  min-height: 180px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 232, 215, 0.78));
}

.mini-chart svg {
  display: block;
  width: 100%;
  height: 200px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(20, 59, 47, 0.09);
  color: var(--brand);
}

.status-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.status-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.status-pill.live {
  background: rgba(11, 125, 101, 0.12);
  color: var(--pay);
}

.status-pill.paused {
  background: rgba(202, 111, 30, 0.12);
  color: #a55a14;
}

.status-pill.system {
  background: rgba(142, 43, 43, 0.12);
  color: var(--alert);
}

.status-pill.deleted {
  background: rgba(107, 100, 92, 0.12);
  color: #5b554e;
}

.status-pill.neutral {
  background: rgba(20, 59, 47, 0.09);
  color: var(--brand);
}

.marketing-goal-pill {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
}

.plan-source-pill {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
}

.marketing-goal-pill.product {
  background: rgba(20, 59, 47, 0.1);
  color: var(--brand);
}

.marketing-goal-pill.live-room {
  background: rgba(11, 125, 101, 0.12);
  color: var(--pay);
}

.marketing-goal-pill.neutral {
  background: rgba(107, 100, 92, 0.12);
  color: #5b554e;
}

.signal-panel {
  padding-bottom: 16px;
}

.signal-panel-head {
  margin-bottom: 10px;
}

.signal-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.signal-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.signal-summary-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-summary-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.signal-summary-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.signal-console {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.92fr);
  gap: 14px;
  align-items: start;
}

.signal-config-card {
  padding: 12px 12px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.signal-rule-card,
.signal-notify-card {
  display: grid;
  gap: 12px;
}

.signal-rule-list-card {
  grid-column: 1 / -1;
}

.signal-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.signal-config-head > div:first-child {
  display: grid;
  gap: 4px;
}

.signal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.signal-config-head h3 {
  margin: 0;
  font-size: 20px;
}

.signal-config-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.signal-form-hint {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(22, 119, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.signal-form-hint[data-tone="success"] {
  background: rgba(21, 115, 71, 0.08);
  color: #157347;
}

.signal-form-hint[data-tone="warn"] {
  background: rgba(178, 106, 0, 0.09);
  color: #b26a00;
}

.signal-form-hint.compact {
  padding: 8px 10px;
}

.signal-template-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-template-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 119, 255, 0.14);
  background: rgba(248, 251, 255, 0.96);
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.signal-template-button:hover {
  background: rgba(22, 119, 255, 0.08);
}

.signal-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.signal-editor-main,
.signal-editor-rail,
.signal-notify-main,
.signal-notify-rail {
  min-width: 0;
}

.signal-editor-main {
  display: grid;
  gap: 10px;
}

.signal-editor-rail {
  display: grid;
  gap: 10px;
  align-content: start;
}

.signal-notify-layout {
  display: grid;
  gap: 12px;
}

.signal-notify-main,
.signal-notify-rail {
  display: grid;
  gap: 10px;
}

.signal-compact-form {
  display: grid;
  gap: 12px;
}

.signal-rule-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at top right, rgba(22, 119, 255, 0.08), transparent 44%);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.signal-rule-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.signal-rule-preview-head > div {
  display: grid;
  gap: 4px;
}

.signal-rule-preview-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-rule-preview-head strong {
  font-size: 18px;
  line-height: 1.3;
}

.signal-rule-preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.signal-rule-preview-badge.on {
  background: rgba(11, 125, 101, 0.12);
  color: var(--pay);
}

.signal-rule-preview-badge.off {
  background: rgba(142, 43, 43, 0.12);
  color: var(--alert);
}

.signal-rule-preview-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.signal-rule-preview-item {
  display: grid;
  gap: 6px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.signal-rule-preview-item span {
  color: var(--muted);
  font-size: 12px;
}

.signal-rule-preview-item strong {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.signal-form-row {
  display: grid;
  gap: 12px;
}

.signal-form-row-notify {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.signal-form-row-main {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(240px, 1.2fr);
}

.signal-form-row-aux {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.signal-compact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.signal-compact-form input,
.signal-compact-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  background: #ffffff;
  font: inherit;
  color: var(--ink);
}

.signal-compact-form input:focus,
.signal-compact-form select:focus {
  outline: none;
  border-color: rgba(22, 119, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.08);
}

.wide-field {
  grid-column: 1 / -1;
}

.toggle-chip {
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(22, 119, 255, 0.1);
  background: #ffffff;
}

.toggle-chip input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.notify-inline-status {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.notify-inline-status[data-tone="success"] {
  background: rgba(11, 125, 101, 0.08);
  border-color: rgba(11, 125, 101, 0.16);
}

.notify-inline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notify-inline-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.notify-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.notify-status-badge.on {
  background: rgba(11, 125, 101, 0.12);
  color: var(--pay);
}

.notify-status-badge.off {
  background: rgba(142, 43, 43, 0.12);
  color: var(--alert);
}

.signal-channel-guide {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.86);
  border: 1px solid rgba(22, 119, 255, 0.08);
}

.signal-channel-guide-head {
  display: grid;
  gap: 4px;
}

.signal-channel-guide-head strong {
  font-size: 14px;
  line-height: 1.4;
}

.signal-channel-guide-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.signal-channel-guide-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.signal-guide-pill {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(22, 119, 255, 0.1);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  min-width: 0;
  white-space: normal;
}

.signal-list-tools {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.signal-inline-field {
  display: grid;
  gap: 6px;
  min-width: 132px;
  color: var(--muted);
  font-size: 12px;
}

.signal-inline-field-search {
  min-width: 260px;
}

.signal-notify-card .wide-field {
  grid-column: 1 / -1;
}

.signal-inline-field input,
.signal-inline-field select {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.signal-inline-field input:focus,
.signal-inline-field select:focus {
  outline: none;
  border-color: rgba(22, 119, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.08);
}

.data-table.compact tbody tr.is-editing {
  background:
    linear-gradient(180deg, rgba(22, 119, 255, 0.06), rgba(255, 255, 255, 0.82));
}

.data-table.compact tbody tr.is-editing td {
  border-top-color: rgba(22, 119, 255, 0.14);
  border-bottom-color: rgba(22, 119, 255, 0.1);
}

.hidden {
  display: none !important;
}

.top-nav-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 119, 255, 0.08);
}

.worktop-bar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  flex: 1 1 auto;
  min-width: 0;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.view-tab {
  height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #5c6777;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.view-tab:hover {
  color: var(--brand);
  background: rgba(22, 119, 255, 0.04);
}

.view-tab.active {
  color: var(--brand);
  background: rgba(22, 119, 255, 0.1);
  border-color: rgba(22, 119, 255, 0.14);
}

.worktop-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.page-shell {
  padding: 20px 24px 40px;
}

body.role-operator .page-shell {
  max-width: 1720px;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 1900px) {
  body.role-operator .page-shell {
    transform: translateX(-12px);
  }
}

.view-section {
  display: none;
  margin-top: 18px;
}

.view-section.is-active {
  display: block;
}

.view-section > .panel,
.view-section > .overview-shell {
  margin-top: 0;
}

.hero {
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
}

.hero h1 {
  font-size: 24px;
  line-height: 1.04;
}

.hero-side {
  min-width: 0;
}

.hero-meta-card {
  padding: 12px 14px;
  border-radius: 14px;
}

.hero-meta-value {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.2;
}

.hero-meta-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
}

.hero h1 {
  font-size: 25px;
}

.hero-copy {
  max-width: 500px;
  font-size: 12px;
  line-height: 1.45;
}

.hero-copy-block {
  gap: 6px;
}

.hero-chip-row {
  gap: 6px;
}

.hero-chip {
  padding: 4px 9px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.hero-side {
  min-width: 248px;
}

.hero-meta-card {
  padding: 12px 14px;
  border-radius: 14px;
}

.hero-meta-value {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.2;
}

.hero-meta-sub {
  margin-top: 4px;
  font-size: 12px;
}

.hero-actions {
  gap: 8px;
}

.hero-actions .button {
  padding: 7px 12px;
  font-size: 12px;
}

.hero-meta-card,
.system-card,
.panel,
.rank-panel,
.signal-card,
.signal-overview-card,
.alert-summary-shell,
.alert-stream-shell,
.detail-panel,
.alert-item,
.alert-summary-card,
.asset-mini-card,
.asset-item,
.detail-stat,
.table-shell,
.rank-panel,
.kpi-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(22, 119, 255, 0.08);
  box-shadow: 0 10px 24px rgba(17, 73, 150, 0.06);
}

.system-card,
.signal-card,
.alert-summary-card,
.alert-summary-card.spotlight,
.alert-summary-card.spotlight.calm,
.alert-summary-card.hot {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96)),
    radial-gradient(circle at top right, rgba(22, 119, 255, 0.08), transparent 38%);
}

.panel,
.rank-panel,
.signal-card {
  padding: 20px;
  border-radius: 20px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-kicker,
.hero-meta-label,
.system-card-label,
.summary-label,
.signal-overview-label {
  color: #768396;
}

.search-input,
.date-input,
.select-input,
.notify-form input,
.notify-form select,
.rule-form input,
.rule-form select {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  background: #ffffff;
}

.search-input:focus,
.date-input:focus,
.select-input:focus,
.notify-form input:focus,
.notify-form select:focus,
.rule-form input:focus,
.rule-form select:focus {
  outline: none;
  border-color: rgba(22, 119, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.08);
}

.range-switch {
  padding: 3px;
  background: rgba(22, 119, 255, 0.06);
  border: 1px solid rgba(22, 119, 255, 0.1);
}

.range-button {
  min-width: 44px;
  height: 32px;
}

.range-button.active {
  color: #ffffff;
  background: linear-gradient(180deg, #1677ff, #0f66df);
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.2);
}

.data-table thead th {
  background: #f8fbff;
  color: #6f7d90;
}

.data-table tbody td {
  border-bottom: 1px solid rgba(22, 119, 255, 0.08);
}

.data-table tbody tr:hover {
  background: rgba(22, 119, 255, 0.05);
}

.data-table tbody tr.active-row {
  background: rgba(22, 119, 255, 0.08);
}

.pill,
.summary-chip.subtle {
  background: rgba(22, 119, 255, 0.08);
  color: var(--brand);
}

.system-pill.warn,
.alert-metric,
.status-pill.paused {
  background: rgba(245, 158, 11, 0.12);
  color: #b76a00;
}

.system-pill.danger,
.alert-status.pending,
.status-pill.system {
  background: rgba(209, 67, 67, 0.12);
  color: var(--alert);
}

.status-pill.live,
.notify-status-badge.on {
  background: rgba(15, 157, 122, 0.12);
  color: var(--pay);
}

.notify-status-badge.off {
  background: rgba(209, 67, 67, 0.12);
  color: var(--alert);
}

.status-pill.deleted,
.marketing-goal-pill.neutral {
  background: rgba(111, 125, 144, 0.12);
  color: #607086;
}

.plan-source-pill.neutral {
  background: rgba(111, 125, 144, 0.12);
  color: #607086;
}

.marketing-goal-pill.product {
  background: rgba(22, 119, 255, 0.1);
  color: var(--brand);
}

.plan-source-pill.uni {
  background: rgba(22, 119, 255, 0.1);
  color: var(--brand);
}

.marketing-goal-pill.live-room {
  background: rgba(15, 157, 122, 0.12);
  color: var(--pay);
}

.plan-source-pill.standard {
  background: rgba(15, 157, 122, 0.12);
  color: var(--pay);
}

.detail-panel.empty,
.alert-stream.empty {
  min-height: 132px;
  background: rgba(248, 251, 255, 0.92);
  border-color: rgba(22, 119, 255, 0.14);
}

.notify-inline-copy,
.system-card-copy,
.summary-sub,
.meta-block,
.alert-message,
.alert-footline,
.asset-group-head span,
.asset-item-meta,
.section-range-meta,
.worktop-meta {
  color: #738195;
}

.button.primary {
  background: linear-gradient(180deg, #1677ff, #0f66df);
  box-shadow: 0 12px 24px rgba(22, 119, 255, 0.2);
}

.button.ghost {
  background: #ffffff;
  color: var(--brand);
  border-color: rgba(22, 119, 255, 0.12);
}

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 20%, rgba(20, 59, 47, 0.12), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(202, 111, 30, 0.16), transparent 18%),
    linear-gradient(180deg, #f6f0e5 0%, #efe5d5 100%);
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 440px);
  gap: 24px;
  align-items: stretch;
}

.login-intro {
  padding: 38px 40px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255, 223, 169, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(20, 59, 47, 0.98), rgba(37, 71, 55, 0.96));
  color: #f8f3ea;
  box-shadow: 0 26px 56px rgba(42, 30, 15, 0.16);
}

.login-kicker,
.login-card-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-kicker {
  color: rgba(248, 243, 234, 0.72);
}

.login-intro h1 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.login-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: rgba(248, 243, 234, 0.8);
  font-size: 17px;
  line-height: 1.7;
}

.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.login-highlight {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.login-highlight strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.login-highlight span {
  display: block;
  margin-top: 8px;
  color: rgba(248, 243, 234, 0.72);
  font-size: 13px;
}

.login-notes {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-notes li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(248, 243, 234, 0.84);
  font-size: 15px;
}

.login-notes li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f7d8a8;
}

.login-card {
  width: 100%;
  padding: 34px 34px 30px;
  border-radius: 32px;
  background: rgba(255, 251, 245, 0.92);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.06;
}

.login-card-kicker {
  color: var(--muted);
}

.login-card-copy,
.login-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.login-card-copy {
  margin: 12px 0 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.login-input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(77, 57, 36, 0.14);
  background: rgba(255, 255, 255, 0.94);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-input::placeholder {
  color: #9f9385;
}

.login-input:focus {
  outline: none;
  border-color: rgba(20, 59, 47, 0.36);
  box-shadow: 0 0 0 4px rgba(20, 59, 47, 0.08);
}

.login-submit {
  margin-top: 6px;
  padding: 16px 20px;
  font-size: 16px;
}

.login-help {
  margin: 18px 0 0;
}

.public-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef4ff 0%, #f7f9fd 48%, #edf2fb 100%);
  color: var(--ink);
}

.public-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px 28px;
}

.public-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.public-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.public-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(22, 119, 255, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 73, 150, 0.06);
}

.public-summary-card span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-summary-card strong {
  font-size: 24px;
  line-height: 1.15;
}

.public-summary-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.public-header-copy h1 {
  margin: 8px 0 4px;
  font-size: 30px;
  line-height: 1.05;
}

.public-header-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.public-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-panel {
  padding: 14px 16px 16px;
}

.public-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-sort-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-range-meta {
  margin: 8px 0 10px;
}

.empty-cell {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1260px) {
  .top-headline {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .top-inline-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .top-nav-row {
    flex-direction: column;
    align-items: stretch;
  }

  .overview-shell,
  .workspace-grid,
  .decision-layout {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-hero-head {
    flex-direction: column;
  }

  .overview-hero-pills {
    justify-content: flex-start;
  }

  .overview-hero-stage {
    grid-template-columns: 1fr;
  }

  .overview-hero-metrics,
  .overview-hero-foot,
  .overview-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-grid,
  .alert-focus-grid,
  .rank-grid,
  .signal-console,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .alert-summary,
  .alert-stream,
  .alert-metrics,
  .detail-stats-plan,
  .detail-highlight-grid,
  .detail-metric-grid {
    grid-template-columns: 1fr;
  }

  .signal-form-row-notify,
  .signal-form-row-main,
  .signal-form-row-aux {
    grid-template-columns: 1fr;
  }

  .signal-rule-preview-body {
    grid-template-columns: 1fr;
  }

  .signal-list-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .signal-inline-field,
  .signal-inline-field-search {
    width: 100%;
    min-width: 0;
  }

  .summary-metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-section-head {
    margin-bottom: 10px;
  }

  .alert-stream-shell {
    max-height: none;
  }

  .alert-stream {
    overflow: visible;
    padding-right: 0;
  }

  .overview-alert-head {
    align-items: flex-start;
  }

  .overview-alert-meta {
    justify-content: flex-start;
  }

  .toolbar.wide {
    min-width: 0;
    width: 100%;
  }

  .toolbar,
  .toolbar.wide {
    flex-wrap: wrap;
  }

  .toolbar-inline-primary {
    grid-template-columns: 1fr;
  }

  .toolbar-inline-primary .range-filter-group,
  .toolbar-inline-primary .date-range-inline {
    flex-wrap: wrap;
  }

  .custom-date-inline {
    width: 100%;
    border-radius: 18px;
  }

  .custom-date-toggle {
    width: 100%;
  }

  .custom-date-fields {
    width: 100%;
    flex-wrap: wrap;
  }

  .custom-date-inline.active .custom-date-fields,
  .custom-date-inline.expanded .custom-date-fields,
  .custom-date-inline:focus-within .custom-date-fields {
    max-width: 100%;
    margin-top: 6px;
    margin-left: 0;
  }

  .toolbar > .search-input,
  .toolbar.wide > .search-input,
  .toolbar-inline-primary > .search-input,
  .toolbar-search-actions,
  .toolbar-search-actions > .search-input,
  .toolbar-search-actions > .select-input,
  .toolbar > .select-input,
  .toolbar.wide > .select-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .toolbar-inline-primary > .search-input {
    grid-column: 1;
  }

  .toolbar-search-actions {
    grid-column: 1;
    flex-wrap: wrap;
  }

  .range-filter-group {
    width: 100%;
  }

  .date-range-inline {
    width: 100%;
  }

  .date-input {
    flex: 1 1 156px;
    width: auto;
    min-width: 0;
  }

  .rank-search {
    max-width: none;
  }

  .signal-config-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .public-header,
  .public-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 16px 16px 32px;
  }

  body.role-operator .page-shell {
    max-width: none;
    padding-left: 16px;
    padding-right: 16px;
    transform: none;
  }

  .scope-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .ownership-inline-actions {
    width: 100%;
  }

  .ownership-inline-actions .access-action-button,
  .access-action-button {
    min-width: 0;
  }

  .access-overview-grid {
    grid-template-columns: 1fr;
  }

  .view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-summary-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    padding: 14px;
  }

  .top-title-inline {
    align-items: flex-start;
    gap: 6px;
  }

  .top-inline-meta {
    flex-direction: column;
    gap: 8px;
  }

  .top-meta-pill,
  .top-actions {
    width: 100%;
  }

  .hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .login-body {
    padding: 18px;
  }

  .public-shell {
    padding: 16px;
  }

  .public-summary-strip {
    grid-template-columns: 1fr;
  }

  .login-intro,
  .login-card {
    padding: 26px 22px;
  }

  .login-intro h1,
  .login-card h2 {
    font-size: 30px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-hero-card {
    padding: 16px;
    border-radius: 18px;
  }

  .overview-hero-head h2 {
    font-size: 26px;
  }

  .overview-hero-metrics,
  .overview-hero-foot,
  .overview-kpi-strip {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .system-stat-grid,
  .asset-card-grid,
  .detail-stats,
  .detail-stats-plan,
  .detail-highlight-grid,
  .detail-metric-grid {
    grid-template-columns: 1fr;
  }

  .signal-form-row-notify,
  .signal-form-row-main,
  .signal-form-row-aux {
    grid-template-columns: 1fr;
  }

  .detail-stage {
    position: static;
  }

  .detail-shell-head {
    flex-direction: column;
  }

  .detail-actions {
    justify-content: flex-start;
  }
}

.subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.subpanel-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.narrow-top {
  margin-top: 18px;
}

.compact-inline {
  margin: 0;
}

.readonly-banner {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  background: rgba(245, 158, 11, 0.08);
  color: #8a5500;
  font-size: 13px;
  line-height: 1.5;
}

.ownership-step-note {
  display: none;
}

.ownership-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ownership-layout,
.upload-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.72fr);
  gap: 14px;
  align-items: start;
}

.ownership-list-card,
.ownership-editor-card,
.access-list-card,
.access-editor-card,
.upload-card,
.ownership-card {
  border: 1px solid rgba(13, 42, 77, 0.08);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 14px 14px 13px;
  box-shadow: 0 12px 34px rgba(18, 42, 67, 0.06);
}

.ownership-editor-card,
.access-editor-card,
.upload-card {
  display: grid;
  gap: 12px;
}

.access-editor-card {
  align-content: start;
}

.access-list-card,
.access-editor-card {
  max-width: 100%;
}

.access-config-card {
  display: grid;
  gap: 14px;
}

.ownership-form-grid.access-form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.access-form-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.access-form-main-grid > label {
  min-width: 0;
}

.access-form-keyword-field {
  display: grid;
  gap: 8px;
}

.ownership-form-grid .access-form-keyword-field textarea {
  min-height: 110px;
}

.access-form-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(13, 42, 77, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.9), rgba(255, 255, 255, 0.98));
}

.access-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.access-toggle-card {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.access-toggle-card input {
  margin: 4px 0 0;
}

.access-toggle-card-compact {
  min-height: 38px;
  padding: 8px 10px;
}

.access-toggle-card-compact .access-toggle-copy {
  gap: 2px;
}

.access-toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.access-toggle-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.access-toggle-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.ownership-form-actions.access-button-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  width: 100%;
}

.access-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 34px;
  padding: 0 14px !important;
  white-space: nowrap;
}

.access-button-stack .access-action-button,
.scope-toolbar-actions .access-action-button {
  width: 100%;
}

.ownership-actions-end .access-action-button {
  width: min(100%, 168px);
}

.upload-target-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-target-search-form {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: end;
}

.upload-target-search-scope,
.upload-target-search-keyword {
  min-width: 0;
}

.upload-target-search-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.upload-target-search-button {
  min-width: 116px;
  align-self: end;
}

.upload-form-grid {
  display: grid;
  gap: 12px;
}

.upload-file-picker input[type="file"] {
  min-height: 44px;
  padding: 10px 12px;
}

.check-col {
  width: 54px;
  text-align: center;
}

.ownership-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ownership-form-grid label,
.ownership-inline-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: rgba(22, 43, 65, 0.78);
}

.ownership-form-grid input,
.ownership-form-grid select,
.ownership-form-grid textarea,
.ownership-inline-form input,
.ownership-inline-form select {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(13, 42, 77, 0.12);
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
}

.ownership-form-grid .toggle-chip input,
.ownership-inline-form .toggle-chip input {
  width: auto;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ownership-form-grid .access-toggle-card input,
.ownership-inline-form .access-toggle-card input {
  margin: 4px 0 0;
}

.ownership-form-grid textarea {
  min-height: 88px;
  resize: vertical;
  padding: 10px 12px;
  font-family: inherit;
  line-height: 1.45;
}

.ownership-form-grid input:disabled,
.ownership-form-grid select:disabled,
.ownership-inline-form input:disabled,
.ownership-inline-form select:disabled,
.ownership-form-grid button:disabled,
.ownership-inline-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ownership-form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.ownership-inline-form.access-keyword-form {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr) 148px;
  align-items: stretch;
}

.ownership-inline-form.simple-inline-form,
.ownership-inline-form.access-material-search-form {
  grid-template-columns: minmax(0, 1fr);
}

.ownership-actions-end {
  justify-content: flex-end;
  margin-top: 12px;
}

.ownership-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ownership-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.scope-controls {
  display: grid;
  gap: 12px;
  margin: 12px 0 10px;
  padding: 14px;
  border: 1px solid rgba(13, 42, 77, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 250, 254, 0.96), rgba(255, 255, 255, 0.98));
}

.scope-toolbar {
  display: grid;
  gap: 10px;
}

.scope-toolbar > .search-input {
  min-width: 0;
}

.scope-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: min(100%, 152px);
}

.scope-selection-summary {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.access-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.access-user-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.access-user-name {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.access-user-subline {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.access-user-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.access-user-note {
  color: rgba(31, 41, 55, 0.78);
  font-size: 12px;
  line-height: 1.5;
}

.access-user-note.strong {
  color: var(--ink);
  font-weight: 700;
}

.access-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #12354d;
  background: rgba(22, 119, 255, 0.12);
  border: 1px solid rgba(22, 119, 255, 0.12);
  flex-shrink: 0;
}

.access-user-avatar.large {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 18px;
}

.access-user-avatar.role-admin,
.pill.role-admin {
  background: rgba(20, 59, 47, 0.12);
  color: #143b2f;
}

.access-user-avatar.role-supervisor,
.pill.role-supervisor {
  background: rgba(22, 119, 255, 0.12);
  color: #0f5dd8;
}

.access-user-avatar.role-operator,
.pill.role-operator {
  background: rgba(245, 158, 11, 0.14);
  color: #9a5b00;
}

.scope-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 460px;
  overflow: auto;
  padding: 4px;
  border: 1px solid rgba(13, 42, 77, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.92), rgba(255, 255, 255, 0.96));
}

.scope-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 42, 77, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.scope-check:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 119, 255, 0.24);
  box-shadow: 0 12px 28px rgba(13, 42, 77, 0.08);
}

.scope-check.is-selected {
  border-color: rgba(22, 119, 255, 0.32);
  background: linear-gradient(180deg, rgba(240, 247, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 32px rgba(22, 119, 255, 0.1);
}

.scope-check input {
  margin: 4px 0 0;
}

.scope-check-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.scope-check-name {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.scope-check-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-check-id {
  color: rgba(48, 72, 98, 0.72);
}

.scope-check-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(107, 100, 92, 0.1);
  color: #5b554e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.scope-check.is-selected .scope-check-state {
  background: rgba(22, 119, 255, 0.12);
  color: var(--brand-soft);
}

.scope-empty {
  grid-column: 1 / -1;
  min-height: 112px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.inline-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.comment-action-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.comment-action-buttons .button {
  width: 100%;
  justify-content: center;
}

.comment-cell-copy {
  max-width: 360px;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 23, 39, 0.46);
  backdrop-filter: blur(2px);
}

.preview-dialog {
  position: relative;
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(12, 31, 56, 0.22);
  border: 1px solid rgba(15, 45, 79, 0.12);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(12, 31, 56, 0.08);
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.95), rgba(255, 255, 255, 0.98));
}

.preview-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.preview-body {
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: auto;
}

.comment-reply-dialog {
  width: min(640px, calc(100vw - 48px));
}

.comment-reply-body {
  gap: 14px;
}

.comment-reply-field {
  display: grid;
  gap: 8px;
}

.comment-reply-field > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.comment-reply-field textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.comment-reply-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.relation-detail-dialog {
  width: min(720px, calc(100vw - 80px));
}

.relation-detail-body {
  align-content: start;
  gap: 14px;
  padding: 16px 18px 18px;
}

.relation-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.relation-trigger:hover,
.relation-trigger:focus-visible {
  color: var(--brand-strong, #1559c1);
}

.relation-trigger:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.24);
  outline-offset: 4px;
  border-radius: 6px;
}

.relation-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 28px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 45, 79, 0.16);
  background: rgba(247, 250, 255, 0.88);
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.relation-list {
  display: grid;
  gap: 12px;
}

.relation-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 45, 79, 0.1);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.relation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.relation-card-head .pill {
  flex-shrink: 0;
}

.relation-card-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.relation-card-metric {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 45, 79, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.relation-card-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.relation-card-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 16px;
}

.preview-media-shell {
  display: grid;
  min-height: 320px;
  border-radius: 16px;
  background: #0d1520;
  overflow: hidden;
}

.preview-media-stage {
  display: grid;
  place-items: center;
  min-height: 320px;
}

.preview-video,
.preview-cover {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #0d1520;
}

.preview-empty {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  padding: 32px;
}

.preview-curve-panel {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(9, 18, 28, 0.92), rgba(13, 21, 32, 0.98));
  color: rgba(233, 242, 255, 0.92);
}

.preview-curve-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preview-curve-title {
  display: grid;
  gap: 4px;
}

.preview-curve-title strong {
  font-size: 14px;
  color: #fff;
}

.preview-curve-title span,
.preview-curve-note,
.preview-curve-empty span,
.preview-curve-loading-copy span {
  font-size: 12px;
  color: rgba(233, 242, 255, 0.72);
}

.preview-curve-badge,
.preview-curve-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.preview-curve-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.preview-curve-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-curve-chip.lose {
  background: rgba(255, 133, 92, 0.16);
  color: #ffb29a;
}

.preview-curve-chip.click {
  background: rgba(88, 214, 184, 0.16);
  color: #9cead5;
}

.preview-curve-chip.peak {
  background: rgba(142, 195, 255, 0.14);
  color: #b6d7ff;
}

.preview-curve-stage {
  display: grid;
  gap: 6px;
}

.preview-curve-svg {
  display: block;
  width: 100%;
  height: 148px;
}

.preview-curve-grid {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
}

.preview-curve-grid.faint {
  stroke-opacity: 0.56;
}

.preview-curve-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-curve-line.lose {
  stroke: #ff855c;
}

.preview-curve-line.click {
  stroke: #58d6b8;
}

.preview-curve-area {
  opacity: 1;
}

.preview-curve-peak {
  fill: #ff855c;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
}

.preview-curve-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: rgba(233, 242, 255, 0.58);
}

.preview-curve-empty {
  display: grid;
  gap: 6px;
  padding: 2px 0;
}

.preview-curve-empty strong,
.preview-curve-loading-copy strong {
  font-size: 13px;
  color: #fff;
}

.preview-curve-loading {
  display: grid;
  gap: 10px;
}

.preview-curve-loading-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88, 214, 184, 0.18), rgba(255, 133, 92, 0.48), rgba(88, 214, 184, 0.18));
  background-size: 200% 100%;
  animation: previewCurvePulse 1.6s linear infinite;
}

@keyframes previewCurvePulse {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.preview-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.preview-stat {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(13, 42, 77, 0.1);
  background: rgba(247, 250, 255, 0.95);
}

.preview-stat span {
  font-size: 12px;
  color: rgba(39, 58, 80, 0.72);
}

.preview-stat strong {
  font-size: 14px;
  color: var(--text);
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1500px) {
  .signal-console {
    grid-template-columns: 1fr;
  }

  .signal-notify-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.86fr);
    align-items: start;
  }
}

@media (max-width: 1180px) {
  .signal-console,
  .ownership-layout,
  .access-layout,
  .upload-layout,
  .ownership-dual-grid {
    grid-template-columns: 1fr;
  }

  .access-form-main-grid,
  .access-form-rail,
  .access-option-list {
    grid-template-columns: 1fr;
  }

  .ownership-inline-form.access-keyword-form {
    grid-template-columns: 1fr;
  }

  .ownership-form-grid,
  .ownership-inline-form,
  .signal-editor-layout,
  .signal-notify-layout,
  .signal-form-row-main,
  .signal-form-row-aux {
    grid-template-columns: 1fr;
  }

  .upload-target-search-form,
  .upload-target-search-main {
    grid-template-columns: 1fr;
  }

  .upload-target-search-button {
    width: 100%;
    min-width: 0;
  }

  .scope-toolbar {
    align-items: stretch;
  }

  .scope-toolbar > .search-input {
    min-width: 0;
  }

  .scope-toolbar-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .scope-toolbar-actions > .access-action-button {
    min-width: 0;
  }

  .scope-checklist {
    grid-template-columns: 1fr;
  }

  .scope-check-meta {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .access-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-dialog {
    width: min(100vw - 24px, 920px);
    margin: 12px auto;
    max-height: calc(100vh - 24px);
  }
}
