:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --sidebar: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  --ink: #1f1f23;
  --muted: #868995;
  --accent: #315efb;
  --accent-strong: #2148d8;
  --accent-deep: #1638b8;
  --accent-soft: rgba(49, 94, 251, 0.08);
  --accent-line: rgba(49, 94, 251, 0.18);
  --line: rgba(22, 28, 45, 0.08);
  --success: #21a366;
  --danger: #db4d5d;
  --shadow: 0 10px 30px rgba(23, 31, 56, 0.06);
  --shadow-strong: 0 18px 44px rgba(23, 31, 56, 0.08);
  --heading-font: "Avenir Next", "PingFang SC", "Segoe UI", sans-serif;
  --body-font: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(49, 94, 251, 0.05), transparent 24%),
    linear-gradient(180deg, #fafbfc 0%, #f5f6f8 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background: none;
}

body::after {
  background: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(22, 28, 45, 0.1);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 26, 45, 0.02);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(49, 94, 251, 0.42);
  box-shadow: 0 0 0 4px rgba(49, 94, 251, 0.1);
}

textarea {
  resize: vertical;
}

a {
  color: inherit;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: transparent;
}

.sidebar {
  padding: 32px 24px;
  background: var(--sidebar);
  color: var(--ink);
  border-right: 1px solid rgba(22, 28, 45, 0.06);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.sidebar::before,
.sidebar::after {
  display: none;
}

.sidebar::before {
  width: 200px;
  height: 200px;
  top: -60px;
  right: -70px;
  background: radial-gradient(circle, rgba(46, 230, 255, 0.28), transparent 70%);
}

.sidebar::after {
  width: 160px;
  height: 160px;
  bottom: 60px;
  left: -90px;
  background: radial-gradient(circle, rgba(20, 104, 255, 0.22), transparent 72%);
}

.brand h1 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.1;
  font-family: var(--heading-font);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.nav {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.nav-item {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  transform: none;
  background: rgba(49, 94, 251, 0.08);
  border-color: rgba(49, 94, 251, 0.12);
  color: var(--accent-deep);
  box-shadow: none;
}

.main {
  padding: 28px;
  background: transparent;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 1));
  border: 1px solid rgba(22, 28, 45, 0.06);
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(49, 94, 251, 0.12), transparent 68%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.hero h2 {
  margin: 8px 0 10px;
  max-width: 720px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  color: #1f1f23;
  font-family: var(--heading-font);
  letter-spacing: -0.03em;
}

.hero-copy {
  margin: 0;
  max-width: 660px;
  color: #616572;
  font-size: 16px;
  line-height: 1.6;
}

.hero .eyebrow {
  color: #6f7482;
}

.hero-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 260px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(22, 28, 45, 0.08);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(23, 31, 56, 0.05);
}

.hero-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #67ffe4;
  box-shadow:
    0 0 0 10px rgba(103, 255, 228, 0.12),
    0 0 18px rgba(103, 255, 228, 0.55);
}

.status-banner {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 8px 22px rgba(23, 31, 56, 0.05);
}

.status-banner[data-tone="success"] {
  color: var(--success);
  background: rgba(33, 163, 102, 0.08);
  border-color: rgba(33, 163, 102, 0.14);
}

.status-banner[data-tone="error"] {
  color: var(--danger);
  background: rgba(219, 77, 93, 0.08);
  border-color: rgba(219, 77, 93, 0.14);
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast-message {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(22, 28, 45, 0.08);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(23, 31, 56, 0.08);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-message[data-tone="success"] {
  border-color: rgba(51, 215, 165, 0.28);
  color: #237e54;
}

.toast-message[data-tone="error"] {
  border-color: rgba(255, 123, 135, 0.28);
  color: #b53b4a;
}

.toast-message.leaving {
  opacity: 0;
  transform: translateY(10px);
}

.task-center {
  margin-top: 28px;
}

.operator-hidden,
.legacy-page,
.legacy-page.active {
  display: none !important;
}

.page {
  display: none;
  margin-top: 28px;
  scroll-margin-top: 24px;
  animation: rise 220ms ease;
}

.page.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header h3 {
  margin: 6px 0 0;
  font-size: 30px;
  font-family: var(--heading-font);
  letter-spacing: -0.02em;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.card-grid.metrics {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.card-grid.metrics.small {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.card-grid.metrics.compact-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

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

.metric-card,
.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.panel::before {
  content: none;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: -36px;
  right: -26px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(49, 94, 251, 0.08), transparent 72%);
  pointer-events: none;
}

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

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  font-family: var(--heading-font);
  letter-spacing: -0.03em;
  color: #1f1f23;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.dashboard-grid.operator-layout {
  grid-template-columns: 1.15fr 0.85fr;
}

.dashboard-grid.single-panel {
  grid-template-columns: 1fr;
}

.dashboard-grid.stack-top {
  align-items: start;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}

.split-layout > .panel:last-child {
  position: sticky;
  top: 24px;
}

#page-targets .split-layout > .panel:last-child {
  position: static;
  top: auto;
}

#page-targets .split-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: stretch;
}

.reminder-panel {
  margin: 16px 0;
}

.reminder-summary-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.reminder-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 160px)) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.reminder-stat {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(22, 28, 45, 0.08);
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 31, 56, 0.04);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.reminder-stat:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(49, 94, 251, 0.16);
  box-shadow: 0 10px 20px rgba(23, 31, 56, 0.06);
}

.reminder-stat:disabled {
  cursor: default;
  opacity: 0.68;
}

.reminder-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.reminder-stat strong {
  font-size: 26px;
  line-height: 1;
  color: #1f1f23;
}

.reminder-peek {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.inline-chip.tone-overdue {
  background: rgba(219, 77, 93, 0.08);
  border-color: rgba(219, 77, 93, 0.14);
  color: #b53b4a;
}

.inline-chip.tone-today {
  background: rgba(255, 183, 77, 0.12);
  border-color: rgba(255, 183, 77, 0.18);
  color: #b56b19;
}

.inline-chip.tone-upcoming {
  background: rgba(49, 94, 251, 0.08);
  border-color: rgba(49, 94, 251, 0.14);
  color: #315efb;
}

#page-targets .split-layout > .panel {
  height: clamp(680px, calc(100vh - 210px), 860px);
}

#page-targets .queue-panel,
#page-targets .detail-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-scroll-shell,
.detail-scroll-shell {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding-right: 4px;
}

.table-scroll-shell {
  margin-right: -4px;
}

.table-scroll-shell table {
  min-width: 100%;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h4 {
  margin: 0;
  font-size: 18px;
}

.panel-header span {
  color: var(--muted);
  font-size: 13px;
}

.panel-lead {
  margin: -2px 0 14px;
  font-size: 13px;
}

.operator-progress-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: #ffffff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
}

.operator-progress-card[data-tone="success"] {
  border-color: rgba(33, 163, 102, 0.14);
  background: #ffffff;
}

.operator-progress-card[data-tone="running"] {
  border-color: rgba(49, 94, 251, 0.14);
}

.operator-progress-card[data-tone="error"] {
  border-color: rgba(219, 77, 93, 0.14);
  background: #ffffff;
}

.operator-progress-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.operator-progress-heading {
  display: flex;
  gap: 14px;
  align-items: center;
}

.operator-progress-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent-deep);
  border: 1px solid rgba(49, 94, 251, 0.14);
  background: rgba(49, 94, 251, 0.08);
}

.operator-progress-card[data-tone="success"] .operator-progress-icon {
  color: #1c8d58;
  border-color: rgba(33, 163, 102, 0.18);
  background: rgba(33, 163, 102, 0.08);
}

.operator-progress-card[data-tone="error"] .operator-progress-icon {
  color: #c54b5a;
  border-color: rgba(219, 77, 93, 0.18);
  background: rgba(219, 77, 93, 0.08);
}

.operator-progress-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}

.operator-progress-title-row strong {
  font-size: 22px;
  font-family: var(--heading-font);
}

.operator-progress-status {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(22, 28, 45, 0.08);
  background: #ffffff;
  color: var(--accent-deep);
}

.operator-progress-summary {
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  color: #1f1f23;
}

.operator-progress-card[data-tone="success"] .operator-progress-summary {
  color: #1c8d58;
}

.operator-progress-card[data-tone="error"] .operator-progress-summary {
  color: #c54b5a;
}

.operator-progress-bar-block {
  display: grid;
  gap: 10px;
}

.operator-progress-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.operator-progress-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.operator-progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #31d7a5, #5ce0c8);
  box-shadow: 0 0 18px rgba(49, 215, 165, 0.28);
  transition: width 240ms ease;
}

.operator-progress-card[data-tone="running"] .operator-progress-bar-fill {
  background: linear-gradient(90deg, #33d2ff, #3d8cff);
  box-shadow: 0 0 18px rgba(61, 140, 255, 0.24);
}

.operator-progress-card[data-tone="error"] .operator-progress-bar-fill {
  background: linear-gradient(90deg, #ff8f9b, #ff6b81);
  box-shadow: 0 0 18px rgba(255, 107, 129, 0.22);
}

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

.operator-step-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(22, 28, 45, 0.06);
}

.operator-step-item strong,
.operator-step-item span {
  display: block;
}

.operator-step-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.operator-step-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent-deep);
  border: 1px solid rgba(49, 94, 251, 0.12);
  background: rgba(49, 94, 251, 0.08);
}

.operator-step-item[data-state="success"] {
  border-color: rgba(51, 215, 165, 0.18);
  background: rgba(51, 215, 165, 0.08);
}

.operator-step-item[data-state="success"] .operator-step-icon {
  color: #e3fff1;
  border-color: rgba(51, 215, 165, 0.24);
  background: rgba(51, 215, 165, 0.18);
}

.operator-step-item[data-state="running"] {
  border-color: rgba(61, 140, 255, 0.22);
  background: rgba(61, 140, 255, 0.09);
}

.operator-step-item[data-state="running"] .operator-step-icon {
  color: #eaf6ff;
  border-color: rgba(61, 140, 255, 0.28);
  background: rgba(61, 140, 255, 0.18);
}

.operator-step-item[data-state="failed"] {
  border-color: rgba(255, 123, 135, 0.2);
  background: rgba(255, 123, 135, 0.08);
}

.operator-step-item[data-state="failed"] .operator-step-icon {
  color: #ffe7ea;
  border-color: rgba(255, 123, 135, 0.28);
  background: rgba(255, 123, 135, 0.16);
}

.operator-progress-final {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: #ffffff;
  display: grid;
  gap: 16px;
}

.panel-header.compact {
  margin-bottom: 0;
}

.metric-card.compact {
  min-height: 110px;
}

.detail-callout {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: #ffffff;
}

.reason-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.social-account-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.social-account-list a {
  color: var(--accent-deep);
  text-decoration: none;
}

.social-account-list a:hover {
  text-decoration: underline;
}

.inline-status {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(22, 28, 45, 0.08);
  background: #fff;
  color: var(--muted);
}

.inline-status[data-tone="success"] {
  border-color: rgba(33, 163, 102, 0.16);
  color: #237e54;
}

.inline-status[data-tone="error"] {
  border-color: rgba(219, 77, 93, 0.16);
  color: #b53b4a;
}

.funnel-list,
.activity-list,
.plain-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.funnel-list li,
.activity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13px;
  border: 1px solid rgba(49, 94, 251, 0.12);
}

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

.button-row > select {
  width: auto;
  min-width: 160px;
}

.button-row.compact {
  gap: 8px;
}

.form-actions-sticky {
  position: sticky;
  bottom: -22px;
  z-index: 2;
  justify-content: flex-end;
  margin: 8px -22px -22px;
  padding: 18px 22px 22px;
  background: linear-gradient(180deg, rgba(247, 248, 250, 0), rgba(247, 248, 250, 0.92) 28%, rgba(247, 248, 250, 0.98));
  border-top: 1px solid rgba(22, 28, 45, 0.06);
}

.form-actions-sticky .primary-button {
  min-width: 148px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(22, 28, 45, 0.1);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  color: #2d3140;
  box-shadow: 0 4px 14px rgba(23, 31, 56, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.primary-button,
.table-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, #456eff 0%, #315efb 100%);
  box-shadow: 0 12px 24px rgba(49, 94, 251, 0.22);
}

.table-button {
  padding: 8px 14px;
  font-size: 13px;
}

.ghost-button:hover,
.primary-button:hover,
.table-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.ghost-button:hover {
  border-color: rgba(49, 94, 251, 0.2);
  box-shadow: 0 8px 18px rgba(23, 31, 56, 0.08);
}

.primary-button:hover,
.table-button:hover {
  box-shadow: 0 16px 28px rgba(49, 94, 251, 0.28);
}

.link-button {
  text-decoration: none;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(22, 28, 45, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(23, 31, 56, 0.04);
}

.segment-button {
  border: 0;
  background: transparent;
  color: #7a8091;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.segment-button:hover {
  background: rgba(49, 94, 251, 0.06);
  color: #2d3140;
}

.segment-button.active {
  background: rgba(49, 94, 251, 0.1);
  color: #315efb;
  box-shadow: inset 0 0 0 1px rgba(49, 94, 251, 0.14);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-bar {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.2fr)
    minmax(92px, 108px)
    minmax(140px, 1fr)
    minmax(108px, 132px)
    minmax(88px, 96px)
    auto
    auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(22, 28, 45, 0.05);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(23, 31, 56, 0.03);
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}

.check-inline input {
  width: auto;
}

.filter-bar select,
.filter-bar .ghost-button {
  min-height: 44px;
  border-radius: 14px;
}

.filter-bar .ghost-button {
  padding-inline: 16px;
}

.push-down {
  margin-top: 28px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.stack-form.embedded-actions {
  align-content: end;
}

.stack-form span {
  color: var(--muted);
  font-size: 13px;
}

.location-picker-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: linear-gradient(180deg, #ffffff, #fcfcfd);
  box-shadow: 0 8px 20px rgba(23, 31, 56, 0.04);
}

.location-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.location-picker-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1.15fr;
  gap: 12px;
}

.location-picker-grid label {
  display: grid;
  gap: 8px;
}

.compact-copy {
  margin: 0;
}

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

.detail-actions-grid .ghost-button {
  width: 100%;
  min-height: 40px;
}

.detail-actions-grid .ghost-button[aria-disabled="true"] {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

.detail-actions-meta {
  margin: 10px 0 4px;
  font-size: 12px;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: 20px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: linear-gradient(180deg, #ffffff, #fcfcfd);
  box-shadow: 0 8px 20px rgba(23, 31, 56, 0.04);
}

.detail-hero-title {
  display: block;
  max-width: 620px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #1f1f23;
}

.detail-hero-copy {
  margin-top: 10px;
  max-width: 520px;
}

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

.detail-hero-chip {
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(23, 31, 56, 0.04);
}

.detail-hero-chip strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1;
  color: #1f1f23;
}

.detail-hero-score {
  background: rgba(49, 94, 251, 0.06);
  border-color: rgba(49, 94, 251, 0.1);
}

.detail-hero-score strong {
  color: var(--accent-deep);
}

.detail-empty-state {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: 18px;
  border: 1px solid rgba(22, 28, 45, 0.06);
  background: linear-gradient(180deg, #ffffff, #fcfcfd);
  box-shadow: 0 8px 20px rgba(23, 31, 56, 0.04);
}

.detail-empty-state strong {
  font-size: 18px;
  color: #1f1f23;
}

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

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(22, 28, 45, 0.06);
}

.detail-summary > div {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fbfbfc;
}

.detail-contact-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px 12px;
}

.detail-contact-summary > div {
  background: transparent;
  border: 1px solid rgba(22, 28, 45, 0.05);
  padding: 8px 10px;
}

.detail-contact-summary strong {
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
}

.detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-text {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.task-detail-block,
.task-log-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mono-block {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #eaf7ff;
  background: linear-gradient(135deg, #050a12, #0d1827);
  white-space: pre-wrap;
  word-break: break-word;
}

.task-log-block pre {
  max-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.08);
  color: #315efb;
  font-size: 12px;
  border: 1px solid rgba(49, 94, 251, 0.12);
}

.muted-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.preflight-box {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.preflight-box[data-ready="unknown"] {
  background: rgba(8, 43, 52, 0.04);
}

.preflight-box[data-ready="true"] {
  background: rgba(35, 120, 93, 0.08);
}

.preflight-box[data-ready="false"] {
  background: rgba(154, 63, 43, 0.08);
}

.preflight-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preflight-check {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink);
  background: rgba(49, 94, 251, 0.08);
}

.preflight-check[data-severity="warning"] {
  background: rgba(219, 106, 46, 0.12);
  color: #8d461d;
}

.preflight-check[data-severity="error"] {
  background: rgba(154, 63, 43, 0.12);
  color: var(--danger);
}

.panel-divider {
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

th,
td {
  padding: 16px 14px;
  border-bottom: 0;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

tbody tr {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

tbody tr:hover {
  transform: translateY(-1px);
}

tbody tr.selected-row {
  transform: translateY(-1px);
}

.target-row td {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(23, 31, 56, 0.04);
}

.target-row td:first-child {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.target-row td:last-child {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.target-row.selected-row td {
  background: linear-gradient(135deg, rgba(49, 94, 251, 0.06), rgba(255, 255, 255, 0.96));
  box-shadow:
    0 10px 24px rgba(23, 31, 56, 0.06),
    inset 0 0 0 1px rgba(49, 94, 251, 0.12);
}

.list-cell,
.score-stack,
.status-stack,
.list-stack {
  display: grid;
  gap: 4px;
}

.list-title {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  color: #1f1f23;
}

.list-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.contact-line {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.contact-line a {
  color: var(--accent-deep);
  text-decoration: none;
}

.contact-line a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.score-value {
  font-family: var(--heading-font);
  font-size: 24px;
  line-height: 1;
  color: #1f1f23;
}

.inline-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.08);
  border: 1px solid rgba(49, 94, 251, 0.1);
  color: #315efb;
  font-size: 12px;
}

.queue-panel table thead th {
  padding-top: 0;
  padding-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.profile-step-list li strong {
  max-width: 58%;
  text-align: right;
  color: var(--muted);
  line-height: 1.4;
}

pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  border-radius: 16px;
  background: #f7f8fa;
  color: #2d3140;
  border: 1px solid rgba(22, 28, 45, 0.06);
}

code {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .card-grid.metrics,
  .card-grid.metrics.small,
  .card-grid.metrics.compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .card-grid.two-up,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .split-layout > .panel:last-child {
    position: static;
  }

  #page-targets .split-layout > .panel {
    height: auto;
  }

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

  .table-scroll-shell,
  .detail-scroll-shell {
    overflow: visible;
    padding-right: 0;
  }

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

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 12px;
  }

  .card-grid.metrics.compact-metrics {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 18px;
  }

  .hero {
    flex-direction: column;
  }

  .filter-bar,
  .form-grid,
  .location-picker-grid,
  .checkbox-grid,
  .detail-summary,
  .detail-actions-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    flex-direction: column;
  }

  .detail-hero-metrics {
    justify-content: flex-start;
  }

  .form-actions-sticky {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
    border-top: 0;
    backdrop-filter: none;
  }

  .push-down {
    margin-top: 0;
  }

  .toast-stack {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }
}
