:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-2: #fcf7ef;
  --text: #1e1a16;
  --muted: #6b6159;
  --line: #ddd2c6;
  --line-strong: #c5b6a8;
  --accent: #b85c38;
  --accent-dark: #864024;
  --ok: #12633c;
  --warn: #8f5a00;
  --bad: #a52727;
  --row-hover: #f9f1e7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(233, 176, 120, 0.32), transparent 26%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.ops-body {
  background:
    radial-gradient(circle at top left, rgba(74, 217, 188, 0.12), transparent 22%),
    radial-gradient(circle at top right, rgba(255, 168, 92, 0.14), transparent 28%),
    linear-gradient(180deg, #0f1519 0%, #161f25 100%);
  color: #eef5f6;
}

.auth-intro {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  z-index: 2;
}

.auth-intro.hidden {
  display: none;
}

.auth-intro-panel {
  width: min(560px, 100%);
  padding: 36px 40px;
  border: 1px solid rgba(109, 159, 190, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 25, 33, 0.94), rgba(15, 25, 33, 0.9)),
    radial-gradient(circle at top left, rgba(56, 193, 224, 0.08), transparent 48%);
  box-shadow:
    0 18px 60px rgba(4, 10, 16, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  text-align: center;
}

.auth-intro-panel h1 {
  margin: 6px 0 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.auth-intro-copy {
  margin: 0 auto 20px;
  max-width: 38ch;
  color: rgba(231, 240, 246, 0.72);
  font-size: 0.98rem;
  line-height: 1.6;
}

.auth-inline-form {
  display: grid;
  gap: 14px;
  margin: 0 auto 16px;
  max-width: 360px;
  text-align: left;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(231, 240, 246, 0.76);
}

.auth-field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(109, 159, 190, 0.2);
  background: rgba(8, 17, 24, 0.74);
  color: #eef5f6;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.auth-field input:focus {
  border-color: rgba(91, 199, 225, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 193, 224, 0.16);
  background: rgba(10, 22, 31, 0.88);
}

.auth-field input:disabled {
  opacity: 0.68;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(231, 240, 246, 0.76);
  font-size: 0.88rem;
}

.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #53c6d8;
}

.auth-intro-panel button {
  min-width: 160px;
}

.auth-intro-message {
  margin: 14px 0 0;
  color: rgba(231, 240, 246, 0.72);
  font-size: 0.88rem;
}

.auth-gated .ops-shell,
.auth-gated .showcase-shell,
.auth-gated .svg-shell,
.auth-gated .modal {
  display: none;
}

.ops-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ops-orb,
.ops-grid {
  position: absolute;
}

.ops-orb {
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.5;
}

.ops-orb-a {
  width: 520px;
  height: 520px;
  left: -140px;
  top: -80px;
  background: radial-gradient(circle, rgba(67, 196, 184, 0.28) 0%, rgba(67, 196, 184, 0) 72%);
  animation: driftA 14s ease-in-out infinite alternate;
}

.ops-orb-b {
  width: 560px;
  height: 560px;
  right: -180px;
  top: 110px;
  background: radial-gradient(circle, rgba(255, 145, 71, 0.24) 0%, rgba(255, 145, 71, 0) 70%);
  animation: driftB 16s ease-in-out infinite alternate;
}

.ops-grid {
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 86%);
  opacity: 0.34;
}

.svg-showcase-body {
  background:
    radial-gradient(circle at top left, rgba(74, 217, 188, 0.12), transparent 22%),
    radial-gradient(circle at top right, rgba(255, 168, 92, 0.14), transparent 28%),
    linear-gradient(180deg, #0f1519 0%, #161f25 100%);
  color: #eef5f6;
}

.svg-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px 18px 36px;
}

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

.svg-hero-copy {
  max-width: 760px;
}

.svg-showcase-body .eyebrow {
  color: #7fdad0;
}

.svg-showcase-body .subline {
  color: rgba(238, 245, 246, 0.72);
}

.svg-showcase-body .button-link.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #eef5f6;
  border-color: rgba(255, 255, 255, 0.16);
}

.svg-showcase-body .ghost.active {
  background: rgba(127, 218, 208, 0.18);
  border-color: rgba(127, 218, 208, 0.45);
  color: #eefdf8;
  box-shadow: 0 0 0 1px rgba(127, 218, 208, 0.15) inset, 0 0 28px rgba(127, 218, 208, 0.14);
}

.showcase-mode-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(238, 245, 246, 0.76);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.showcase-stage-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.showcase-control-panel {
  position: relative;
}

.showcase-control-panel summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.showcase-control-panel summary::-webkit-details-marker {
  display: none;
}

.showcase-control-card {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 420px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(127, 218, 208, 0.18);
  background: rgba(9, 16, 22, 0.92);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  z-index: 6;
}

.showcase-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.showcase-speed {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(238, 245, 246, 0.82);
  font-size: 0.92rem;
}

.showcase-speed input[type="range"] {
  width: 160px;
  accent-color: #7fdad0;
}

.showcase-window {
  min-width: 320px;
  justify-content: space-between;
}

.showcase-window input[type="range"] {
  width: 210px;
}

.showcase-visible-controls {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px 10px;
}

.showcase-window-visible {
  min-width: 360px;
  border: 1px solid rgba(127, 218, 208, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.showcase-day-select {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #eef5f6;
  padding: 0 14px;
}

.showcase-timeline {
  position: relative;
  height: 46px;
  margin: 0 18px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.showcase-timeline.is-hidden {
  display: none;
}

.showcase-timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 21px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-point {
  position: absolute;
  top: 14px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  border: 0;
  background: #7fdad0;
  box-shadow: 0 0 0 3px rgba(127, 218, 208, 0.14);
  cursor: pointer;
}

.timeline-point.error {
  background: #ff7a7a;
  box-shadow: 0 0 0 3px rgba(255, 122, 122, 0.14);
}

.timeline-scrubber {
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.svg-stage-card {
  position: relative;
  border: 1px solid rgba(127, 218, 208, 0.16);
  background: linear-gradient(180deg, rgba(15, 21, 25, 0.96) 0%, rgba(21, 30, 36, 0.96) 100%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.svg-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 18px 8px;
}

.svg-meta-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
}

.svg-meta-box strong {
  display: block;
  color: rgba(238, 245, 246, 0.62);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.svg-meta-box span {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1.15rem;
}

.svg-stage {
  display: block;
  width: 100%;
  height: auto;
  min-height: 680px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.svg-stage.is-panning {
  cursor: grabbing;
}

.showcase-zoom-controls {
  position: absolute;
  right: 18px;
  top: 142px;
  z-index: 2;
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 16, 22, 0.72);
  backdrop-filter: blur(10px);
}

.showcase-zoom-button {
  min-width: 52px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
  line-height: 1;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 18px 36px;
}

.ops-shell {
  max-width: 1680px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.ops-topbar {
  margin-bottom: 22px;
}

.go-control {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.go-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: rgba(238, 245, 246, 0.76);
  font-size: 0.78rem;
}

.go-slider-label {
  min-width: 102px;
  color: rgba(238, 245, 246, 0.72);
  font-size: 0.72rem;
  white-space: nowrap;
}

.go-slider input[type="range"] {
  width: 100%;
  accent-color: #7fdad0;
}

.go-slider span {
  min-width: 24px;
  text-align: right;
  color: #eefdf8;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 0.86rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.ops-body .eyebrow {
  color: #7fdad0;
}

h1,
h2,
button {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.95;
}

.subline {
  margin: 10px 0 0;
  max-width: 780px;
  color: var(--muted);
}

.ops-body .subline {
  color: rgba(238, 245, 246, 0.72);
}

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

.ops-controls {
  align-items: flex-start;
  justify-content: flex-end;
}

.nav-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-group-primary {
  margin-right: 2px;
}

.nav-group-secondary {
  margin-left: 2px;
}

button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 0.95rem;
  cursor: pointer;
}

button:not(.secondary):not(.ghost) {
  background: linear-gradient(135deg, var(--accent) 0%, #cf7b47 100%);
  color: white;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 0.95rem;
  text-decoration: none;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "▾";
  margin-left: 8px;
  font-size: 0.82rem;
  opacity: 0.8;
}

.nav-menu[open] summary::after {
  content: "▴";
}

.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(127, 218, 208, 0.18);
  background: linear-gradient(180deg, rgba(15, 21, 25, 0.98) 0%, rgba(21, 30, 36, 0.98) 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  z-index: 5;
}

.nav-menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #eef5f6;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-menu-link:hover {
  background: rgba(127, 218, 208, 0.12);
  color: #f5fcfd;
  transform: translateX(1px);
}

.ops-body .button-link.secondary,
.ops-body .secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #eef5f6;
  border-color: rgba(255, 255, 255, 0.16);
}

.ops-body .ghost {
  background: transparent;
  color: #c7f8ef;
  border-color: rgba(127, 218, 208, 0.3);
}

.ops-body button:not(.secondary):not(.ghost):not(.danger) {
  background: linear-gradient(135deg, #d78952 0%, #f0a667 100%);
  color: #10161b;
  box-shadow: 0 10px 34px rgba(240, 166, 103, 0.2);
}

.ops-body .danger {
  box-shadow: 0 10px 34px rgba(214, 80, 80, 0.18);
}

.hidden {
  display: none !important;
}

.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}

.ghost {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--line-strong);
}

.danger {
  background: linear-gradient(135deg, #b62d2d 0%, #d65050 100%);
  color: white;
}

.status-strip,
.table-section {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
}

.showcase-body {
  background:
    radial-gradient(circle at top left, rgba(97, 182, 173, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(213, 139, 79, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f5ef 0%, #f2ede5 100%);
  overflow-x: hidden;
}

.showcase-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.fx-orb,
.fx-grid,
.fx-lightning {
  position: absolute;
}

.fx-orb {
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0.5;
}

.fx-orb-a {
  width: 460px;
  height: 460px;
  left: -120px;
  top: -60px;
  background: radial-gradient(circle, rgba(67, 196, 184, 0.35) 0%, rgba(67, 196, 184, 0) 72%);
  animation: driftA 12s ease-in-out infinite alternate;
}

.fx-orb-b {
  width: 540px;
  height: 540px;
  right: -160px;
  top: 80px;
  background: radial-gradient(circle, rgba(255, 145, 71, 0.28) 0%, rgba(255, 145, 71, 0) 70%);
  animation: driftB 15s ease-in-out infinite alternate;
}

.fx-grid {
  inset: 0;
  background:
    linear-gradient(rgba(30, 26, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 26, 22, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 85%);
  opacity: 0.4;
}

.fx-lightning {
  width: 240px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 196, 119, 0.9) 40%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 196, 119, 0.9) 60%, transparent 100%);
  opacity: 0;
  filter: blur(0.4px);
}

.fx-lightning-a {
  top: 220px;
  left: -260px;
  animation: boltA 7s linear infinite;
}

.fx-lightning-b {
  top: 62%;
  right: -260px;
  animation: boltB 9s linear infinite;
}

.showcase-shell {
  max-width: 1660px;
  position: relative;
  z-index: 1;
}

.showcase-topbar {
  margin-bottom: 22px;
}

.showcase-hero {
  margin-bottom: 16px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.hero-card {
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(252, 247, 239, 0.96) 100%);
  padding: 16px 18px;
  min-height: 112px;
  box-shadow: 0 16px 40px rgba(54, 33, 21, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-card.success {
  border-color: rgba(18, 99, 60, 0.25);
}

.hero-card.error {
  border-color: rgba(165, 39, 39, 0.22);
}

.hero-card.running {
  border-color: rgba(143, 90, 0, 0.28);
}

.hero-card.energized::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.6) 48%, transparent 72%);
  transform: translateX(-65%) rotate(8deg);
  animation: sweepGlow 3.8s linear infinite;
}

.hero-label {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.hero-value {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
  line-height: 1.05;
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.showcase-panel {
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 251, 245, 0.92);
  box-shadow: 0 18px 48px rgba(54, 33, 21, 0.08);
  position: relative;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(30, 26, 22, 0.08);
}

.panel-header h2,
.run-card-header h3,
.spotlight-story h3 {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
}

.panel-kicker,
.run-card-kicker,
.spotlight-kicker {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.spotlight,
.incidents,
.run-wall {
  padding: 18px;
}

.spotlight-story {
  padding: 18px;
  border: 1px solid rgba(30, 26, 22, 0.08);
  background:
    radial-gradient(circle at right center, rgba(215, 146, 90, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 249, 241, 0.98) 0%, rgba(253, 246, 238, 0.98) 100%);
  position: relative;
  overflow: hidden;
}

.spotlight-story::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 25%;
  height: 120px;
  background: radial-gradient(circle, rgba(96, 192, 180, 0.18) 0%, rgba(96, 192, 180, 0) 68%);
  animation: breatheGlow 5.2s ease-in-out infinite;
}

.spotlight-story p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.spotlight-grid.compact .field {
  background: rgba(252, 247, 239, 0.9);
}

.spotlight-block {
  margin-top: 16px;
}

.spotlight-block h4,
.run-card-block-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.showcase-message-head,
.message-lane-head,
.run-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.showcase-meta-line {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline-step {
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 253, 248, 0.88);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.8rem;
  line-height: 1.15;
  position: relative;
  overflow: hidden;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

button.pipeline-step {
  cursor: pointer;
}

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

.pipeline-step.success {
  border-color: rgba(18, 99, 60, 0.22);
  background: rgba(18, 99, 60, 0.08);
  color: var(--ok);
}

.pipeline-step.error {
  border-color: rgba(165, 39, 39, 0.22);
  background: rgba(165, 39, 39, 0.08);
  color: var(--bad);
}

.pipeline-step.running {
  border-color: rgba(143, 90, 0, 0.24);
  background: rgba(143, 90, 0, 0.1);
  color: var(--warn);
  box-shadow: 0 0 0 3px rgba(143, 90, 0, 0.06);
  animation: stepPulse 1.7s ease-in-out infinite;
}

.pipeline-step.running::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 241, 214, 0.95) 50%, transparent 80%);
  transform: translateX(-110%);
  animation: stepSweep 1.8s linear infinite;
}

.pipeline-step.idle {
  opacity: 0.56;
}

.pipeline-step.changed,
.incident-item.changed {
  animation: changeBurst 950ms ease-out 1;
}

.incident-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(165, 39, 39, 0.16);
  background: rgba(255, 248, 247, 0.98);
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.incident-item + .incident-item {
  margin-top: 10px;
}

.incident-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.incident-run,
.incident-step {
  color: var(--muted);
  font-size: 0.84rem;
}

.incident-item p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.45;
}

.incident-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.7) 50%, transparent 82%);
  transform: translateX(-115%);
}

.incident-item.changed::after {
  animation: incidentSweep 900ms ease-out 1;
}

.run-wall {
  display: grid;
  gap: 16px;
}

.run-card {
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 253, 248, 0.98);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.run-card.running {
  box-shadow: 0 0 0 3px rgba(143, 90, 0, 0.05);
}

.run-card.live::before,
.message-lane.live::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(255, 196, 110, 0.1), rgba(255, 196, 110, 0.95), rgba(96, 192, 180, 0.95), rgba(96, 192, 180, 0.08));
  box-shadow: 0 0 18px rgba(96, 192, 180, 0.4);
  animation: liveRail 1.9s linear infinite;
}

.run-card-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.run-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: end;
  color: var(--muted);
  font-size: 0.9rem;
}

.run-card-block {
  margin-top: 14px;
}

.message-stream {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.message-lane {
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.96) 0%, rgba(255, 253, 248, 0.96) 100%);
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.message-lane.success {
  border-left: 4px solid rgba(18, 99, 60, 0.6);
}

.message-lane.running {
  border-left: 4px solid rgba(143, 90, 0, 0.65);
}

.message-lane.error {
  border-left: 4px solid rgba(165, 39, 39, 0.72);
}

.message-lane-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: end;
  color: var(--muted);
  font-size: 0.84rem;
}

.message-lane-summary {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes driftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(70px, 35px, 0) scale(1.08); }
}

@keyframes driftB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-60px, 55px, 0) scale(1.1); }
}

@keyframes boltA {
  0%, 72%, 100% { transform: translateX(0) skewX(-35deg); opacity: 0; }
  73% { opacity: 0.1; }
  75% { transform: translateX(40vw) skewX(-35deg); opacity: 0.9; }
  78% { opacity: 0; }
}

@keyframes boltB {
  0%, 66%, 100% { transform: translateX(0) skewX(35deg); opacity: 0; }
  67% { opacity: 0.08; }
  69% { transform: translateX(-44vw) skewX(35deg); opacity: 0.85; }
  72% { opacity: 0; }
}

@keyframes sweepGlow {
  from { transform: translateX(-75%) rotate(8deg); }
  to { transform: translateX(75%) rotate(8deg); }
}

@keyframes breatheGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.42; }
  50% { transform: scale(1.08); opacity: 0.78; }
}

@keyframes stepPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 3px rgba(143, 90, 0, 0.06), 0 0 0 0 rgba(255, 196, 110, 0.0); }
  50% { transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(143, 90, 0, 0.08), 0 0 28px 2px rgba(255, 196, 110, 0.24); }
}

@keyframes stepSweep {
  from { transform: translateX(-115%); }
  to { transform: translateX(115%); }
}

@keyframes changeBurst {
  0% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(96, 192, 180, 0.42); }
  35% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(96, 192, 180, 0.08); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(96, 192, 180, 0); }
}

@keyframes incidentSweep {
  from { transform: translateX(-115%); opacity: 0; }
  25% { opacity: 1; }
  to { transform: translateX(115%); opacity: 0; }
}

@keyframes liveRail {
  from { filter: brightness(0.95); transform: translateY(-18%); }
  to { filter: brightness(1.2); transform: translateY(18%); }
}

@keyframes messageLivePulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(91, 228, 156, 0.42);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(91, 228, 156, 0);
  }
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(91, 228, 156, 0);
  }
}

.status-strip {
  padding: 10px 12px;
  margin-bottom: 16px;
}

.ops-attention-strip {
  margin-bottom: 16px;
}

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

.attention-card {
  border: 1px solid rgba(127, 218, 208, 0.12);
  padding: 14px 16px;
  min-height: 112px;
  background: linear-gradient(180deg, rgba(12, 18, 24, 0.96) 0%, rgba(17, 26, 32, 0.96) 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.attention-card strong {
  display: block;
  margin-bottom: 8px;
  color: rgba(238, 245, 246, 0.62);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.attention-card span {
  display: block;
  color: #eef5f6;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1.24rem;
  line-height: 1.05;
}

.attention-card p {
  margin: 8px 0 0;
  color: rgba(238, 245, 246, 0.72);
  font-size: 0.84rem;
  line-height: 1.35;
}

.attention-card.warn {
  border-color: rgba(255, 196, 110, 0.22);
}

.attention-card.running {
  border-color: rgba(127, 218, 208, 0.24);
}

.attention-card.error {
  border-color: rgba(255, 122, 122, 0.26);
}

.attention-card.success {
  border-color: rgba(73, 208, 157, 0.22);
}

.ops-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.42fr);
  gap: 16px;
  align-items: start;
}

.ops-panel {
  border: 1px solid rgba(127, 218, 208, 0.14);
  background: linear-gradient(180deg, rgba(15, 21, 25, 0.96) 0%, rgba(21, 30, 36, 0.96) 100%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24);
  min-height: 760px;
}

.ops-mail-list-panel,
.ops-mail-detail-panel {
  position: relative;
  overflow: hidden;
}

.message-list {
  display: grid;
  gap: 10px;
  padding: 16px;
  max-height: none;
  overflow: visible;
}

.message-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 16px 16px;
}

.message-pagination-summary,
.message-pagination-page,
.message-pagination-size span {
  font-size: 0.74rem;
  color: rgba(238, 245, 246, 0.68);
}

.message-pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.message-pagination-size select {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #eef5f6;
  padding: 0 10px;
  font: inherit;
}

.message-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.message-pagination-nav .ghost {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.message-list-item {
  width: 100%;
  text-align: left;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right top, rgba(127, 218, 208, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.04);
  color: #eef5f6;
  padding: 15px 16px;
  display: grid;
  gap: 9px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.message-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 218, 208, 0.24);
  background:
    radial-gradient(circle at right top, rgba(127, 218, 208, 0.11), transparent 44%),
    rgba(255, 255, 255, 0.06);
}

.message-list-item.active {
  border-color: rgba(127, 218, 208, 0.38);
  background:
    radial-gradient(circle at right top, rgba(127, 218, 208, 0.14), transparent 44%),
    rgba(127, 218, 208, 0.08);
  box-shadow:
    0 0 0 1px rgba(127, 218, 208, 0.08) inset,
    0 18px 48px rgba(0, 0, 0, 0.18);
}

.message-list-item.success {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.message-list-item.error {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.message-list-item.running {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.message-list-item.active.success {
  border-left: 4px solid rgba(73, 208, 157, 0.72);
}

.message-list-item.active.error {
  border-left: 4px solid rgba(217, 74, 74, 0.78);
}

.message-list-item.active.running {
  border-left: 4px solid rgba(255, 179, 71, 0.84);
}

.message-list-top,
.email-step-head,
.message-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.message-list-run,
.message-detail-kicker {
  color: rgba(238, 245, 246, 0.62);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.message-list-item strong,
.message-detail-header h3 {
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  line-height: 1.12;
}

.message-list-item strong {
  font-size: 1.04rem;
}

.message-list-meta,
.message-list-time,
.message-list-step,
.email-step-meta,
.message-detail-header p {
  color: rgba(238, 245, 246, 0.72);
}

.message-list-meta,
.message-list-time,
.email-step-meta {
  font-size: 0.86rem;
}

.message-list-step {
  font-size: 0.92rem;
  line-height: 1.42;
}

.message-list-sender {
  color: #f4fbfc;
  font-size: 0.9rem;
  font-weight: 600;
}

.message-list-preview {
  color: rgba(238, 245, 246, 0.8);
  font-size: 0.9rem;
  line-height: 1.45;
}

.message-list-preview.rendered {
  max-height: 78px;
  overflow: hidden;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 10px;
  color: rgba(238, 245, 246, 0.82);
}

.message-list-preview.rendered * {
  font-size: 0.79rem !important;
  line-height: 1.4 !important;
}

.message-list-preview.rendered > *:first-child {
  margin-top: 0;
}

.message-list-preview.rendered > *:last-child {
  margin-bottom: 0;
}

.message-detail {
  padding: 16px;
}

.message-detail-header {
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right center, rgba(215, 146, 90, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.message-detail-header h3 {
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  color: #f5fcfd;
}

.message-detail-header p {
  margin: 8px 0 0;
  font-size: 0.96rem;
}

.message-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-body .content-block h4,
.ops-body .field-label,
.ops-body .summary-box strong,
.ops-body .meta-box strong,
.ops-body .io-panel h3,
.ops-body .mini-card-title {
  color: rgba(238, 245, 246, 0.66);
}

.ops-body .content-block h4 {
  margin-bottom: 10px;
}

.ops-body .field,
.ops-body .summary-box,
.ops-body .meta-box,
.ops-body .io-panel,
.ops-body .mini-card,
.ops-body .text-block {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #eef5f6;
}

.ops-body .field-value,
.ops-body .summary-box p,
.ops-body .text-block,
.ops-body .field-nested-row strong,
.ops-body .field-nested-row span,
.ops-body .detail-list li,
.ops-body .empty-panel,
.ops-body .detail-empty {
  color: #eef5f6;
}

.ops-body .field-nested-row {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.ops-body .io-panel h3 {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.email-step-list {
  display: grid;
  gap: 4px;
}

.email-step-row {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #eef5f6;
  padding: 9px 12px;
  display: grid;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.email-step-row.compact {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.email-step-row:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 218, 208, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.email-step-row.success {
  border-left: 4px solid rgba(73, 208, 157, 0.7);
}

.email-step-row.error {
  border-left: 4px solid rgba(217, 74, 74, 0.78);
}

.email-step-row.running {
  border-left: 4px solid rgba(255, 179, 71, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.08) inset;
}

.email-step-row[disabled] {
  cursor: default;
  opacity: 0.92;
}

.email-step-row.is-static:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.email-step-symbol {
  font-size: 1rem;
  line-height: 1;
}

.email-step-name {
  min-width: 0;
  color: #f4fbfc;
  font-size: 0.92rem;
  line-height: 1.25;
}

.email-step-state,
.email-step-time {
  color: rgba(238, 245, 246, 0.62);
  font-size: 0.8rem;
  white-space: nowrap;
}

.email-step-row p {
  margin: 0;
  color: rgba(238, 245, 246, 0.82);
  line-height: 1.5;
}

.ops-status-strip,
.ops-table-section {
  border: 1px solid rgba(127, 218, 208, 0.14);
  background: linear-gradient(180deg, rgba(15, 21, 25, 0.96) 0%, rgba(21, 30, 36, 0.96) 100%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24);
}

.status-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.status-item {
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--surface);
}

.ops-body .status-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  min-height: 88px;
}

.status-item strong {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.ops-body .status-item strong {
  color: rgba(238, 245, 246, 0.62);
  margin-bottom: 8px;
}

.ops-body .status-item span {
  display: block;
  color: #f4fbfc;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1.12rem;
  line-height: 1.18;
  word-break: break-word;
}

.ops-body .status-item.running {
  border-color: rgba(255, 179, 71, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.08) inset;
}

.ops-body .status-item.success {
  border-color: rgba(73, 208, 157, 0.28);
  box-shadow: 0 0 0 1px rgba(73, 208, 157, 0.08) inset;
}

.ops-body .status-item.warn {
  border-color: rgba(255, 196, 110, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 196, 110, 0.08) inset;
}

.ops-body .status-item.error {
  border-color: rgba(217, 74, 74, 0.3);
  box-shadow: 0 0 0 1px rgba(217, 74, 74, 0.08) inset;
}

.ops-body .status-item.idle span,
.ops-body .status-item.mono span {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 0.96rem;
  color: rgba(238, 245, 246, 0.84);
}

.ops-body .status-item.warn span {
  color: #ffd69a;
}

.table-header,
.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 14px 16px 10px;
}

.ops-body .table-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-header h2,
.detail-header h2 {
  margin: 0;
}

.table-header p,
.detail-header p {
  margin: 0;
  color: var(--muted);
}

.ops-body .table-header h2,
.ops-body .table-header p {
  color: #eef5f6;
}

.ops-body .table-header p {
  color: rgba(238, 245, 246, 0.68);
}

.table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
}

.ops-body .table-wrap {
  border-top-color: rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead {
  background: var(--surface-2);
}

.ops-body thead {
  background: rgba(255, 255, 255, 0.04);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.ops-body th,
.ops-body td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(6),
td:nth-child(6) {
  white-space: normal;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: var(--row-hover);
}

tbody tr.active {
  background: #f6e9da;
}

.ops-body tbody tr {
  transition: background 180ms ease, transform 180ms ease;
}

.ops-body tbody tr:hover {
  background: rgba(127, 218, 208, 0.07);
}

.ops-body tbody tr.active {
  background: rgba(127, 218, 208, 0.12);
}

.ops-body th {
  color: rgba(238, 245, 246, 0.6);
}

.ops-body td {
  color: #eef5f6;
}

.table-subject {
  max-width: 360px;
  line-height: 1.35;
}

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

.step-cell strong {
  color: #c8f7ee;
  font-size: 0.88rem;
}

.step-cell span {
  color: rgba(238, 245, 246, 0.74);
}

.table-summary {
  max-width: 420px;
  color: rgba(238, 245, 246, 0.82);
  line-height: 1.35;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge.success {
  color: var(--ok);
  background: rgba(18, 99, 60, 0.1);
}

.badge.error {
  color: var(--bad);
  background: rgba(165, 39, 39, 0.1);
}

.badge.running {
  color: var(--warn);
  background: rgba(143, 90, 0, 0.12);
}

.detail-empty,
.detail-pane {
  padding: 16px;
}

.detail-empty {
  color: var(--muted);
}

.detail-pane.hidden {
  display: none;
}

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

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 22, 0.42);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  max-width: min(1320px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(255, 249, 242, 0.98) 100%);
  box-shadow: 0 22px 70px rgba(54, 33, 21, 0.22);
  color: #1e1a16;
}

.modal-panel-email {
  max-width: min(1320px, calc(100vw - 40px));
}

.modal-panel-email {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(80, 167, 203, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(16, 25, 31, 0.985) 0%, rgba(12, 18, 24, 0.99) 100%);
  box-shadow: 0 28px 72px rgba(3, 9, 13, 0.52);
  color: #eef5f6;
}

.modal-panel-email .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right center, rgba(80, 167, 203, 0.1), transparent 38%),
    rgba(13, 21, 27, 0.96);
}

.modal-panel-email .modal-header h2,
.modal-panel-email .modal-eyebrow {
  color: #eef5f6;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 251, 245, 0.96);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.modal-header h2 {
  margin: 0;
  color: #1e1a16;
}

.modal-eyebrow {
  margin-bottom: 6px;
}

.modal-close {
  flex: 0 0 auto;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.modal-panel .detail-empty,
.modal-panel .empty-panel {
  color: #6b6159;
}

.detail-summary {
  margin-bottom: 14px;
}

.email-modal-content {
  display: grid;
  gap: 16px;
  padding: 16px 18px 18px;
}

.modal-panel-email .message-detail-header {
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at right center, rgba(80, 167, 203, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.modal-panel-email .message-detail-header h3 {
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
}

.modal-panel-email .message-detail-header p {
  color: rgba(238, 245, 246, 0.72);
}

.detail-top-grid-modal {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.9fr);
}

.modal-panel-email .content-block-flow {
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right center, rgba(80, 167, 203, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(27, 40, 50, 0.92) 0%, rgba(23, 34, 43, 0.92) 100%);
}

.modal-panel-email .content-block-flow h4 {
  color: rgba(238, 245, 246, 0.72);
}

.reply-assistant-block {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right top, rgba(80, 167, 203, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(27, 40, 50, 0.92) 0%, rgba(23, 34, 43, 0.92) 100%);
}

.reply-assistant-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reply-assistant-header h4 {
  margin: 0 0 4px;
}

.reply-assistant-header p {
  margin: 0;
  color: rgba(238, 245, 246, 0.68);
  line-height: 1.45;
}

.reply-notes-field {
  display: grid;
  gap: 7px;
}

.reply-notes-field span {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(238, 245, 246, 0.68);
}

.reply-notes-field textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #eef5f6;
  font: inherit;
}

.reply-notes-field textarea::placeholder {
  color: rgba(238, 245, 246, 0.38);
}

.reply-assistant-status {
  font-size: 0.88rem;
  color: rgba(238, 245, 246, 0.72);
  padding: 10px 12px;
  border: 1px solid rgba(127, 218, 208, 0.16);
  background: rgba(127, 218, 208, 0.05);
}

.reply-assistant-status.error {
  color: #9f2d1f;
  border-color: rgba(255, 122, 122, 0.18);
  background: rgba(255, 122, 122, 0.08);
}

.reply-strategy-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.reply-strategy-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(27, 40, 50, 0.9) 0%, rgba(23, 34, 43, 0.9) 100%);
  padding: 13px 14px 12px;
  color: #eef5f6;
  position: relative;
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.reply-strategy-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(127, 218, 208, 0.92) 0%, rgba(78, 207, 212, 0.42) 100%);
}

.reply-strategy-card.active {
  border-color: rgba(69, 133, 194, 0.55);
  box-shadow: inset 0 0 0 1px rgba(69, 133, 194, 0.28), 0 12px 28px rgba(3, 9, 13, 0.22);
  transform: translateY(-1px);
}

.reply-strategy-card:hover:not(:disabled) {
  border-color: rgba(127, 218, 208, 0.24);
  background: linear-gradient(180deg, rgba(31, 45, 56, 0.96) 0%, rgba(25, 36, 45, 0.96) 100%);
  transform: translateY(-1px);
}

.reply-strategy-card:disabled {
  opacity: 0.72;
  cursor: wait;
}

.reply-strategy-card strong {
  font-size: 0.92rem;
}

.reply-strategy-card p {
  margin: 6px 0 0;
  color: rgba(238, 245, 246, 0.76);
  line-height: 1.5;
}

.reply-strategy-card ul {
  margin: 8px 0 0;
  padding-left: 17px;
  color: rgba(238, 245, 246, 0.76);
}

.reply-strategy-card li + li {
  margin-top: 4px;
}

.reply-strategy-card li::marker {
  color: rgba(127, 218, 208, 0.92);
}

.reply-strategy-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-left: 8px;
}

.reply-strategy-tone {
  color: rgba(238, 245, 246, 0.64);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(127, 218, 208, 0.16);
  background: rgba(127, 218, 208, 0.06);
}

.reply-draft-block {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.reply-draft-subject,
.reply-draft-preview {
  color: rgba(238, 245, 246, 0.76);
  line-height: 1.5;
}

.reply-draft-preview {
  margin-top: 6px;
}

.reply-draft-body {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(80, 167, 203, 0.06), transparent 26%),
    rgba(255, 255, 255, 0.035);
  white-space: pre-wrap;
  line-height: 1.65;
}

.summary-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf2 0%, var(--surface) 100%);
  padding: 14px 16px;
}

.summary-box strong {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.summary-box p {
  margin: 0;
  line-height: 1.5;
}

.meta-box {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 12px;
}

.meta-box strong {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

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

.io-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
}

.io-panel h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 1rem;
}

.io-content {
  padding: 14px;
}

.empty-panel {
  color: var(--muted);
  line-height: 1.5;
}

.content-block + .content-block {
  margin-top: 14px;
}

.content-block h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.field {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 10px 12px;
  min-width: 0;
}

.field-label {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.field-value {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.link-field .field-value a {
  color: #4ecfd4;
  text-decoration: none;
  font-weight: 600;
  display: inline;
  line-height: inherit;
}

.link-field .field-value a:hover {
  text-decoration: underline;
}

.link-field .field-value {
  padding: 0;
}

.detail-overview-grid .link-field {
  padding: 8px 12px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  min-height: 0;
  align-self: start;
}

.detail-overview-grid .link-field .field-label {
  margin-bottom: 2px;
}

.detail-overview-grid .link-field .field-value {
  line-height: 1.25;
  padding: 0;
  display: inline-flex;
  align-items: center;
  min-height: 0;
}

.detail-overview-grid .link-field .field-value a {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

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

.field-nested {
  display: grid;
  gap: 6px;
}

.field-nested-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 6px;
  border-top: 1px solid rgba(197, 182, 168, 0.45);
}

.field-nested-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.field-nested-row strong,
.field-nested-row span {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.text-block {
  border: 1px solid var(--line);
  background: #fffaf5;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.rendered-html-block {
  border: 1px solid var(--line);
  background: #fffaf5;
  padding: 12px;
  color: var(--text);
  line-height: 1.6;
  overflow: auto;
}

.modal-panel-email .field,
.modal-panel-email .summary-box,
.modal-panel-email .meta-box,
.modal-panel-email .mini-card,
.modal-panel-email .text-block,
.modal-panel-email .rendered-html-block,
.modal-panel-email .io-panel,
.modal-panel-email .detail-overview-grid .link-field,
.modal-panel-email .operator-note {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: #eef5f6;
  box-shadow: none;
}

.modal-panel-email .field-label,
.modal-panel-email .content-block h4,
.modal-panel-email .summary-box strong,
.modal-panel-email .meta-box strong,
.modal-panel-email .io-panel h3 {
  color: rgba(238, 245, 246, 0.68);
  font-size: 0.67rem;
}

.modal-panel-email .field-value,
.modal-panel-email .text-block,
.modal-panel-email .rendered-html-block,
.modal-panel-email .summary-box p,
.modal-panel-email .detail-list li,
.modal-panel-email .empty-panel {
  color: #eef5f6;
  font-size: 0.76rem;
}

.modal-panel-email .reply-assistant-block {
  box-shadow: 0 14px 30px rgba(3, 9, 13, 0.16);
}

.modal-panel-email .email-preview-block .rendered-html-block {
  min-height: 220px;
  background: rgba(255, 255, 255, 0.03);
}

.modal-panel-email .rendered-html-block th,
.modal-panel-email .rendered-html-block td {
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-panel-email .link-field .field-value a {
  color: #4ecfd4;
}

.modal-panel-email .email-step-row {
  background: linear-gradient(180deg, rgba(27, 40, 50, 0.9) 0%, rgba(23, 34, 43, 0.9) 100%) !important;
  border-color: rgba(255, 255, 255, 0.07);
}

.modal-panel-email .email-step-row:hover {
  background: linear-gradient(180deg, rgba(31, 45, 56, 0.96) 0%, rgba(25, 36, 45, 0.96) 100%) !important;
}

.modal-panel-email .email-step-row.success,
.modal-panel-email .email-step-row.error,
.modal-panel-email .email-step-row.running {
  background: linear-gradient(180deg, rgba(27, 40, 50, 0.9) 0%, rgba(23, 34, 43, 0.9) 100%) !important;
}

.modal-panel-email .email-step-name {
  font-size: 0.76rem;
}

.modal-panel-email .email-step-state,
.modal-panel-email .email-step-time,
.modal-panel-email .badge {
  font-size: 0.68rem;
}

.rendered-html-block > *:first-child {
  margin-top: 0;
}

.rendered-html-block > *:last-child {
  margin-bottom: 0;
}

.rendered-html-block a {
  color: #4ecfd4;
}

.rendered-html-block table {
  width: 100%;
  border-collapse: collapse;
}

.rendered-html-block th,
.rendered-html-block td {
  border: 1px solid rgba(197, 182, 168, 0.45);
  padding: 6px 8px;
  text-align: left;
}

.blocked-image {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.12);
  color: #cda35f;
  font-size: 0.78rem;
  font-weight: 600;
}

.modal-panel:not(.modal-panel-email) .summary-box,
.modal-panel:not(.modal-panel-email) .meta-box,
.modal-panel:not(.modal-panel-email) .field,
.modal-panel:not(.modal-panel-email) .io-panel,
.modal-panel:not(.modal-panel-email) .mini-card,
.modal-panel:not(.modal-panel-email) .text-block,
.modal-panel:not(.modal-panel-email) .rendered-html-block {
  color: #1e1a16;
  background: #fffaf5;
  border-color: #ddd2c6;
}

.modal-panel:not(.modal-panel-email) .summary-box strong,
.modal-panel:not(.modal-panel-email) .meta-box strong,
.modal-panel:not(.modal-panel-email) .field-label,
.modal-panel:not(.modal-panel-email) .content-block h4,
.modal-panel:not(.modal-panel-email) .io-panel h3 {
  color: #6b6159;
}

.modal-panel:not(.modal-panel-email) .field-value,
.modal-panel:not(.modal-panel-email) .summary-box p,
.modal-panel:not(.modal-panel-email) .text-block,
.modal-panel:not(.modal-panel-email) .rendered-html-block,
.modal-panel:not(.modal-panel-email) .detail-list li,
.modal-panel:not(.modal-panel-email) .field-nested-row strong,
.modal-panel:not(.modal-panel-email) .field-nested-row span,
.modal-panel:not(.modal-panel-email) .mini-card-title {
  color: #1e1a16;
}

.modal-panel:not(.modal-panel-email) .rendered-html-block a {
  color: #0d7f87;
}

.modal-panel:not(.modal-panel-email) .rendered-html-block th,
.modal-panel:not(.modal-panel-email) .rendered-html-block td,
.modal-panel:not(.modal-panel-email) .field-nested-row,
.modal-panel:not(.modal-panel-email) .io-panel h3,
.modal-panel:not(.modal-panel-email) .modal-header {
  border-color: #ddd2c6;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
}

.detail-list li + li {
  margin-top: 6px;
}

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

.mini-card {
  border: 1px solid var(--line);
  background: #fffaf4;
  padding: 12px;
}

.mini-card-title {
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.mini-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

/* Main dashboard redesign */
.ops-dashboard {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ops-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(18, 25, 31, 0.98) 0%, rgba(17, 23, 29, 0.98) 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.ops-sidebar-brand h2 {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 0.98rem;
  line-height: 1.1;
  color: #f3fbfc;
}

.ops-sidebar-brand p:last-child,
.ops-sidebar-card p {
  margin: 8px 0 0;
  color: rgba(238, 245, 246, 0.68);
  font-size: 0.76rem;
  line-height: 1.55;
}

.ops-sidebar-nav {
  display: grid;
  gap: 6px;
}

.ops-nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(238, 245, 246, 0.76);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.ops-nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f3fbfc;
  transform: translateX(1px);
}

.ops-nav-link.active {
  background: rgba(127, 218, 208, 0.12);
  color: #f3fbfc;
  box-shadow: 0 0 0 1px rgba(127, 218, 208, 0.08) inset;
}

.ops-sidebar-card {
  padding: 14px 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
}

.ops-sidebar-card strong {
  color: #f3fbfc;
  font-size: 0.82rem;
}

.ops-sidebar-card-label {
  margin: 0;
  color: rgba(238, 245, 246, 0.5);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
}

.performance-summary {
  display: grid;
  gap: 10px;
}

.performance-summary p {
  margin: 0;
}

.performance-row {
  display: grid;
  gap: 3px;
}

.performance-row strong {
  font-size: 0.79rem;
}

.performance-row span {
  color: rgba(238, 245, 246, 0.76);
  font-size: 0.74rem;
  line-height: 1.4;
}

.ops-main {
  min-width: 0;
}

.ops-header-panel {
  padding: 14px 18px 16px;
  border: 1px solid rgba(127, 218, 208, 0.1);
  background: linear-gradient(180deg, rgba(17, 24, 30, 0.96) 0%, rgba(20, 28, 34, 0.96) 100%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
}

.ops-search-bar {
  margin: 0 0 14px;
}

.search-input {
  display: grid;
  gap: 6px;
}

.filter-menu {
  position: relative;
}

.filter-menu[open] .filter-toggle,
.filter-toggle.is-active {
  color: #79b8ff;
  border-color: rgba(121, 184, 255, 0.45);
  background: rgba(58, 124, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(121, 184, 255, 0.12) inset, 0 0 18px rgba(58, 124, 255, 0.14);
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(238, 245, 246, 0.7);
  cursor: pointer;
  list-style: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.filter-toggle::-webkit-details-marker {
  display: none;
}

.filter-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.filter-icon svg {
  width: 16px;
  height: 16px;
}

.filter-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  min-width: 260px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 21, 25, 0.98) 0%, rgba(21, 30, 36, 0.98) 100%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.filter-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #eef5f6;
  font-size: 0.82rem;
}

.filter-reset-button {
  min-height: auto;
  padding: 4px 8px;
  font-size: 0.74rem;
}

.filter-option-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  color: rgba(238, 245, 246, 0.84);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.02);
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.filter-option input {
  accent-color: #79b8ff;
}

.filter-empty {
  color: rgba(238, 245, 246, 0.56);
  font-size: 0.76rem;
  padding: 6px 4px;
}

.search-input span {
  color: rgba(238, 245, 246, 0.62);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-input input {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 24, 30, 0.96) 0%, rgba(20, 28, 34, 0.96) 100%);
  color: #eef5f6;
  padding: 0 14px;
  font: inherit;
  font-size: 0.8rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.search-input input::placeholder {
  color: rgba(238, 245, 246, 0.42);
}

.search-input input:focus {
  outline: none;
  border-color: rgba(127, 218, 208, 0.34);
  box-shadow: 0 0 0 1px rgba(127, 218, 208, 0.12), 0 10px 28px rgba(0, 0, 0, 0.14);
}

.ops-title-block {
  max-width: 660px;
}

.ops-topbar {
  margin-bottom: 18px;
}

.ops-shell h1 {
  font-size: clamp(1.45rem, 1.85vw, 1.9rem);
  line-height: 1.02;
}

.ops-shell .subline {
  font-size: 0.83rem;
  line-height: 1.55;
}

.ops-shell button,
.ops-shell .button-link {
  padding: 9px 14px;
  font-size: 0.78rem;
}

.ops-controls {
  justify-content: flex-end;
}

.ops-shell .status-strip {
  margin-bottom: 18px;
}

.ops-shell .status-items {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.ops-shell .ops-body .status-item,
.ops-shell .status-item {
  min-height: 74px;
}

.ops-shell .ops-body .status-item span,
.ops-shell .status-item span {
  font-size: 0.88rem;
}

.ops-shell .status-item.metric span {
  font-size: 0.98rem;
}

.ops-shell .ops-workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.ops-shell .ops-panel {
  min-height: 720px;
  background: linear-gradient(180deg, rgba(17, 24, 30, 0.97) 0%, rgba(21, 29, 35, 0.97) 100%);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.2);
}

.panel-header-compact {
  padding: 14px 16px 11px;
}

.panel-header-compact h2 {
  font-size: 0.95rem;
}

.panel-header-compact p {
  font-size: 0.75rem;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(238, 245, 246, 0.82);
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.toggle-chip input {
  margin: 0;
  accent-color: #7fdad0;
}

.ops-shell .message-list {
  display: block;
}

.ops-shell .message-pagination {
  padding-top: 4px;
}

.ops-shell .message-detail-kicker,
.message-table-head,
.message-table-time,
.message-table-category,
.message-table-status,
.message-table-step,
.message-table-sender {
  font-size: 0.62rem;
}

.ops-shell .message-detail-kicker,
.ops-shell .message-detail-kicker {
  font-size: 0.62rem;
  color: rgba(238, 245, 246, 0.72);
}

.ops-shell .message-list-meta,
.ops-shell .message-list-time,
.ops-shell .message-list-step,
.ops-shell .email-step-meta,
.ops-shell .message-detail-header p {
  font-size: 0.67rem;
  color: rgba(238, 245, 246, 0.78);
}

.ops-shell .message-list-step {
  color: rgba(238, 245, 246, 0.56);
}

.message-list-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.message-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8cf0c0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5be49c;
  box-shadow: 0 0 0 0 rgba(91, 228, 156, 0.45);
  animation: messageLivePulse 1.6s ease-out infinite;
}

.inbox-feed-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.message-table {
  display: grid;
  gap: 0;
}

.message-table-head,
.message-table-row {
  display: grid;
  grid-template-columns: 190px minmax(260px, 1.8fr) minmax(160px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(180px, 1.1fr);
  align-items: center;
  gap: 12px;
}

.message-table-head {
  padding: 10px 14px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(238, 245, 246, 0.58);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-table-body {
  display: grid;
}

.message-table-row {
  width: 100%;
  padding: 9px 14px;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-width: 1px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035) !important;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.message-table-row:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08);
}

.message-table-row.active {
  background: linear-gradient(180deg, rgba(31, 43, 49, 0.96) 0%, rgba(27, 37, 43, 0.96) 100%) !important;
  box-shadow: inset 3px 0 0 rgba(127, 218, 208, 0.9);
}

.message-table-subject,
.message-table-sender,
.message-table-category,
.message-table-status,
.message-table-step,
.message-table-time {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-table-subject {
  font-size: 0.74rem;
  color: #f7fbfc;
}

.message-table-time {
  color: rgba(238, 245, 246, 0.66);
}

.message-table-sender {
  color: rgba(244, 251, 252, 0.92);
}

.message-table-step {
  color: rgba(238, 245, 246, 0.6);
}

.ops-shell .message-detail {
  padding: 16px;
}

.ops-shell .message-detail-header {
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at right center, rgba(80, 167, 203, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.ops-shell .content-block-flow {
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right center, rgba(80, 167, 203, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(27, 40, 50, 0.92) 0%, rgba(23, 34, 43, 0.92) 100%);
}

.ops-shell .content-block-flow h4 {
  color: rgba(238, 245, 246, 0.72);
}

.ops-shell .email-step-row {
  background: linear-gradient(180deg, rgba(27, 40, 50, 0.9) 0%, rgba(23, 34, 43, 0.9) 100%) !important;
  border-color: rgba(255, 255, 255, 0.07);
}

.ops-shell .email-step-row:hover {
  background: linear-gradient(180deg, rgba(31, 45, 56, 0.96) 0%, rgba(25, 36, 45, 0.96) 100%) !important;
}

.ops-shell .email-step-row.success,
.ops-shell .email-step-row.error,
.ops-shell .email-step-row.running {
  background: linear-gradient(180deg, rgba(27, 40, 50, 0.9) 0%, rgba(23, 34, 43, 0.9) 100%) !important;
}

.ops-shell .message-detail-header h3 {
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
}

.content-block-operator {
  margin-top: 14px;
}

.operator-note {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  color: rgba(238, 245, 246, 0.86);
  line-height: 1.45;
}

.operator-note.warn {
  border-color: rgba(255, 196, 110, 0.24);
  background: rgba(255, 196, 110, 0.08);
}

.operator-note.error {
  border-color: rgba(255, 122, 122, 0.26);
  background: rgba(255, 122, 122, 0.08);
}

.operator-note.success {
  border-color: rgba(73, 208, 157, 0.22);
  background: rgba(73, 208, 157, 0.07);
}

.operator-note.neutral {
  border-color: rgba(127, 218, 208, 0.16);
}

.detail-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-overview-grid .content-block {
  grid-column: 1 / -1;
}

.detail-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.86fr);
  gap: 16px;
  align-items: start;
}

.detail-bottom-grid {
  margin-top: 16px;
}

.detail-column {
  min-width: 0;
}

.ops-shell .field,
.ops-shell .summary-box,
.ops-shell .meta-box,
.ops-shell .mini-card,
.ops-shell .text-block,
.ops-shell .rendered-html-block,
.ops-shell .io-panel {
  background: rgba(255, 255, 255, 0.035);
}

.ops-shell .field-label,
.ops-shell .content-block h4,
.ops-shell .summary-box strong,
.ops-shell .meta-box strong,
.ops-shell .io-panel h3 {
  font-size: 0.67rem;
}

.ops-shell .field-value,
.ops-shell .text-block,
.ops-shell .rendered-html-block,
.ops-shell .summary-box p,
.ops-shell .detail-list li {
  font-size: 0.76rem;
}

.ops-shell .email-preview-block .rendered-html-block {
  min-height: 220px;
  background: rgba(255, 255, 255, 0.03);
}

.ops-shell .rendered-html-block {
  color: #eef5f6;
}

.ops-shell .rendered-html-block th,
.ops-shell .rendered-html-block td {
  border-color: rgba(255, 255, 255, 0.08);
}

.ops-shell .email-step-name {
  font-size: 0.76rem;
}

.ops-shell .email-step-state,
.ops-shell .email-step-time {
  font-size: 0.68rem;
}

.ops-shell .badge {
  font-size: 0.66rem;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credentials-panel {
  display: grid;
  gap: 10px;
}

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

.credential-card {
  border: 1px solid rgba(140, 170, 190, 0.16);
  border-radius: 16px;
  background: rgba(8, 18, 26, 0.54);
  overflow: hidden;
}

.credential-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px 12px;
  list-style: none;
}

.credential-card summary::-webkit-details-marker {
  display: none;
}

.credential-state {
  font-size: 0.7rem;
  color: #9eb4c0;
}

.credential-state.configured {
  color: #66d7a3;
}

.credential-state.missing {
  color: #f4b26b;
}

.credential-form {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.credential-form label {
  display: grid;
  gap: 4px;
  font-size: 0.72rem;
  color: #9eb4c0;
}

.credential-form input {
  border-radius: 12px;
  border: 1px solid rgba(130, 160, 178, 0.18);
  background: rgba(6, 16, 24, 0.9);
  color: #eef5f6;
  padding: 8px 10px;
  font: inherit;
}

.credential-form-actions {
  display: flex;
  gap: 8px;
}

.user-admin-panel {
  display: grid;
  gap: 10px;
}

.user-admin-list {
  display: grid;
  gap: 8px;
}

.user-admin-row {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(140, 170, 190, 0.16);
  border-radius: 14px;
  background: rgba(8, 18, 26, 0.54);
  padding: 10px 12px;
}

.user-admin-meta {
  display: grid;
  gap: 2px;
}

.user-admin-meta strong {
  font-size: 0.8rem;
}

.user-admin-meta span,
.user-admin-role span {
  font-size: 0.7rem;
  color: #9eb4c0;
}

.user-admin-role {
  display: grid;
  gap: 4px;
}

.user-admin-role select {
  border-radius: 12px;
  border: 1px solid rgba(130, 160, 178, 0.18);
  background: rgba(6, 16, 24, 0.9);
  color: #eef5f6;
  padding: 8px 10px;
  font: inherit;
}

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

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

  .ops-sidebar {
    position: static;
  }

  .topbar,
  .table-header,
  .modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    width: 100%;
  }

  .controls button {
    flex: 1 1 180px;
  }

  .nav-group,
  .nav-menu {
    width: 100%;
  }

  .nav-group button,
  .nav-menu summary {
    width: 100%;
  }

  .nav-menu-panel {
    position: static;
    margin-top: 8px;
  }

  .io-grid {
    grid-template-columns: 1fr;
  }

  .ops-workspace {
    grid-template-columns: 1fr;
  }

  .detail-top-grid {
    grid-template-columns: 1fr;
  }

  .ops-panel {
    min-height: auto;
  }

  .message-list {
    max-height: none;
  }

  .modal-panel {
    max-width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    margin: 6px;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-control-card {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }

  .showcase-message-head,
  .message-lane-head,
  .run-card-header,
  .message-detail-header,
  .email-step-head,
  .message-list-top {
    flex-direction: column;
  }

  .email-step-row.compact {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .email-step-state,
  .email-step-time {
    grid-column: 2;
  }

  .run-card-metrics,
  .message-lane-side {
    justify-content: start;
    align-items: start;
  }
}
