:root {
  color-scheme: dark;
  --bg: #020b1f;
  --ink: #f8fbff;
  --muted: #a7b4ca;
  --soft: #74839d;
  --line: rgba(130, 178, 255, .22);
  --line-strong: rgba(125, 211, 252, .38);
  --panel: rgba(8, 28, 66, .62);
  --panel-soft: rgba(12, 38, 78, .44);
  --panel-strong: rgba(16, 50, 96, .78);
  --accent: #2ea8ff;
  --accent-2: #22d3ee;
  --violet: #8b5cf6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --glass-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(46, 168, 255, .22), transparent 31%),
    radial-gradient(circle at 78% 18%, rgba(139, 92, 246, .18), transparent 28%),
    radial-gradient(circle at 74% 88%, rgba(34, 211, 238, .12), transparent 32%),
    linear-gradient(135deg, #020714 0%, #031936 46%, #070b24 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 211, 252, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .82), transparent 90%);
}

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

button {
  border: 1px solid rgba(125, 211, 252, .34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 144, 255, .98), rgba(28, 102, 219, .96));
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 12px 26px rgba(46, 168, 255, .24);
}

button:hover { filter: brightness(1.07); }
button:disabled { opacity: .42; cursor: not-allowed; filter: none; }

.secondary-button,
.subtle-button,
.icon-button {
  background: rgba(13, 36, 76, .72);
  border-color: rgba(125, 211, 252, .24);
  color: #e8f3ff;
  box-shadow: none;
}

.subtle-button {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}

.danger-button {
  background: rgba(80, 19, 38, .55);
  border-color: rgba(248, 113, 113, .5);
  color: #ffb4b4;
  box-shadow: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 92px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(180deg, rgba(0, 149, 255, .22), rgba(7, 23, 58, .58));
  border-right: 1px solid rgba(125, 211, 252, .24);
  box-shadow: 12px 0 42px rgba(0, 183, 255, .14);
  backdrop-filter: blur(24px) saturate(150%);
}

.brand {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(37, 99, 235, .92), rgba(34, 211, 238, .78));
  border: 1px solid rgba(255, 255, 255, .34);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 18px 40px rgba(46, 168, 255, .22);
}

.rail-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 9px 6px;
  color: rgba(231, 242, 255, .72);
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.1;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #dff7ff;
  font-weight: 850;
}

.nav-item.active {
  color: #fff;
  background: rgba(46, 168, 255, .22);
  border-color: rgba(125, 211, 252, .5);
  box-shadow: inset 0 0 22px rgba(34, 211, 238, .16), 0 14px 26px rgba(0, 145, 255, .16);
}

.nav-item.disabled { color: rgba(218, 237, 255, .54); }

.logout-form { margin-top: auto; }
.logout-form button {
  width: 100%;
  padding: 9px 4px;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .76);
  box-shadow: none;
}

.main {
  margin-left: 92px;
  min-height: 100vh;
  padding: 18px 18px 28px;
  position: relative;
}

.ops-shell {
  max-width: 1820px;
  margin: 0 auto;
}

.ops-header {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}

.ops-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0;
}

.ops-header p {
  margin: 7px 0 0;
  color: var(--muted);
}

.health-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.health-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 9px;
  background: rgba(7, 24, 55, .56);
  color: #e8f3ff;
  font-size: 13px;
  backdrop-filter: blur(18px);
  box-shadow: none;
}

.health-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(34, 197, 94, .8);
}

.health-chip.bad::before { background: var(--red); box-shadow: 0 0 14px rgba(239, 68, 68, .75); }
.health-chip.warn::before { background: var(--amber); box-shadow: 0 0 14px rgba(245, 158, 11, .75); }
.health-chip:hover {
  filter: none;
  border-color: rgba(125, 211, 252, .48);
  background: rgba(13, 41, 86, .72);
}

.live-status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 9px;
  background: rgba(7, 24, 55, .4);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.live-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(34, 197, 94, .65);
}

.live-status.syncing::before {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, .75);
}

.live-status.error::before {
  background: var(--red);
  box-shadow: 0 0 12px rgba(239, 68, 68, .75);
}

.icon-button:disabled {
  cursor: wait;
  opacity: .68;
}

.glass-card {
  min-width: 0;
  background: linear-gradient(180deg, rgba(11, 35, 78, .72), rgba(5, 23, 55, .54));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(22px) saturate(140%);
}

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

.section-title h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.lifecycle-card {
  padding: 18px 22px;
  margin-bottom: 14px;
}

.lifecycle-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lifecycle-steps::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 24px;
  height: 3px;
  background: linear-gradient(90deg, rgba(139, 92, 246, .95), rgba(46, 168, 255, .55), rgba(255, 255, 255, .2));
  border-radius: 999px;
}

.lifecycle-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: rgba(25, 52, 96, .86);
  border: 2px solid rgba(255, 255, 255, .26);
  color: #c9d8ee;
  font-size: 20px;
  font-weight: 850;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.lifecycle-step.active .step-number {
  background: radial-gradient(circle at 30% 20%, #dbeafe, #6d5dfc 42%, #1d4ed8 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, .78);
  box-shadow: 0 0 34px rgba(139, 92, 246, .65);
}

.lifecycle-step strong {
  color: #eef7ff;
  font-size: 13px;
}

.lifecycle-step small {
  color: var(--muted);
  font-size: 12px;
}

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

.primary-board {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.right-board {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.schedule-board,
.services-board,
.flags-card,
.audit-card,
.automation-card {
  padding: 18px;
}

.selected-event-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 12px;
  background: rgba(4, 17, 42, .28);
}

.selected-event-bar #selectedEventSummary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.selection-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.summary-kicker,
.agenda-overline {
  color: #8fe8ff;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.selected-event-bar strong {
  color: #eef7ff;
  font-size: 13px;
}

.selected-event-bar small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.summary-live-detail {
  color: #bfe8ff !important;
}

.selected-event-bar .action-row {
  margin: 0;
  justify-content: flex-start;
}

.selected-event-bar .action-row button {
  flex: 1 1 124px;
  min-width: 0;
  max-width: 170px;
  padding: 8px 10px;
  font-size: 12px;
  white-space: normal;
}

.active-rollback-strip {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  grid-template-areas:
    "icon copy actions"
    "icon stat actions";
  gap: 10px 18px;
  align-items: center;
  margin: 16px 0 14px;
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, .42);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(5, 78, 91, .38), rgba(9, 34, 76, .52));
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .08);
}

.active-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .12);
  color: #75f3ad;
  font-size: 28px;
  font-weight: 900;
}

.active-rollback-copy {
  grid-area: copy;
  min-width: 0;
}

.active-rollback-copy strong {
  color: #eef7ff;
  font-size: 18px;
  line-height: 1.15;
}

.active-rollback-copy small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.active-rollback-stat {
  grid-area: stat;
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.active-rollback-stat span {
  color: var(--muted);
  font-size: 12px;
}

.active-rollback-stat strong {
  color: #eef7ff;
  font-size: 20px;
}

.active-rollback-strip .action-row {
  grid-area: actions;
  margin: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.active-rollback-strip .action-row button {
  min-width: 122px;
  max-width: 176px;
  white-space: normal;
}

.active-rollback-strip .action-row button:first-child {
  min-width: 168px;
  max-width: 200px;
}

.flag-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 27px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, .22);
  background: rgba(255, 255, 255, .08);
  color: #dcecff;
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.status-pill.active,
.flag-pill.true { color: #74f2b0; border-color: rgba(34, 197, 94, .36); background: rgba(34, 197, 94, .12); }
.status-pill.scheduled { color: #8bd6ff; border-color: rgba(46, 168, 255, .42); background: rgba(46, 168, 255, .12); }
.status-pill.draft { color: #52f3e9; border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .1); }
.status-pill.cancelled,
.flag-pill.false { color: #ff9fa7; border-color: rgba(239, 68, 68, .42); background: rgba(239, 68, 68, .12); }
.status-pill.completed { color: #7cf0a9; border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .12); }
.status-pill.neutral { color: var(--muted); }
.status-pill.warning { color: #ffd67a; border-color: rgba(245, 158, 11, .42); background: rgba(245, 158, 11, .1); }

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.schedule-composer,
.automation-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 12px;
  background: rgba(3, 14, 36, .28);
}

.schedule-composer label,
.automation-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-composer label:first-child,
.automation-form label:last-of-type { grid-column: span 2; }

input, select, textarea {
  width: 100%;
  min-height: 39px;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(5, 20, 48, .62);
  color: #f7fbff;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(46, 168, 255, .7);
  box-shadow: 0 0 0 3px rgba(46, 168, 255, .14);
}

.hidden { display: none !important; }

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(320px, .44fr) minmax(520px, .56fr);
  gap: 14px;
  align-items: stretch;
}

.schedule-layout-single {
  grid-template-columns: minmax(360px, .92fr) minmax(320px, .78fr);
  align-items: start;
}

.mini-calendar,
.schedule-panel {
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 12px;
  background: rgba(4, 17, 42, .22);
}

.mini-calendar {
  padding: 12px;
}

.schedule-calendar-panel {
  padding: 16px;
}

.schedule-column {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.schedule-panel {
  padding: 12px;
}

.schedule-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.schedule-panel-title h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.2;
}

.schedule-panel-title span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-toolbar strong {
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 10px;
}

.calendar-cell {
  position: relative;
  min-height: 50px;
  border: 0;
  border-right: 1px solid rgba(125, 211, 252, .1);
  border-bottom: 1px solid rgba(125, 211, 252, .1);
  border-radius: 0;
  background: rgba(4, 17, 42, .24);
  box-shadow: none;
  color: #eaf5ff;
  font-weight: 650;
  padding: 6px;
}

.calendar-cell[data-date]:hover {
  background: rgba(46, 168, 255, .14);
  color: #fff;
}
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-weekday {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(7, 26, 60, .5);
}
.calendar-cell.muted { color: rgba(167, 180, 202, .48); }
.calendar-cell.today { background: rgba(46, 168, 255, .18); }
.calendar-cell.past-date:not(.today) { color: rgba(167, 180, 202, .5); }
.calendar-cell.selected { outline: 2px solid rgba(46, 168, 255, .82); outline-offset: -2px; }
.event-dots {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 6px;
  display: flex;
  gap: 3px;
  justify-content: center;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}
.dot.draft { background: var(--accent-2); }
.dot.cancelled { background: var(--red); }
.dot.active { background: var(--green); }
.dot.completed { background: #a3e635; }
.dot.scheduled { background: var(--violet); }

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-hint {
  margin-left: auto;
}

.agenda-list {
  display: grid;
  gap: 9px;
  align-content: start;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.agenda-item {
  display: grid;
  width: 100%;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 11px;
  border: 1px solid rgba(125, 211, 252, .16);
  border-left: 4px solid var(--violet);
  border-radius: 10px;
  background: rgba(5, 21, 52, .42);
  color: #eaf5ff;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.agenda-item:hover {
  border-color: rgba(125, 211, 252, .34);
  background: rgba(9, 34, 76, .62);
  transform: translateY(-1px);
  filter: none;
}
.agenda-item:focus-visible {
  outline: 2px solid rgba(46, 168, 255, .86);
  outline-offset: 2px;
}
.agenda-item:not([data-event]) {
  grid-template-columns: minmax(0, 1fr);
  cursor: default;
}
.agenda-item:not([data-event]):hover {
  border-color: rgba(125, 211, 252, .16);
  background: rgba(5, 21, 52, .42);
  transform: none;
}
.agenda-item.selected {
  border-color: rgba(46, 168, 255, .74);
  background: linear-gradient(180deg, rgba(21, 72, 145, .58), rgba(9, 34, 76, .64));
  box-shadow: inset 0 0 0 1px rgba(46, 168, 255, .34), 0 14px 34px rgba(0, 0, 0, .2);
}
.agenda-item.selected .agenda-date {
  background: rgba(46, 168, 255, .24);
  color: #f8fbff;
}
.agenda-item.draft { border-left-color: var(--accent-2); }
.agenda-item.cancelled { border-left-color: var(--red); }
.agenda-item.active { border-left-color: var(--green); }
.agenda-item.completed { border-left-color: #a3e635; }
.agenda-date {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 10px;
  background: rgba(46, 168, 255, .12);
  color: #c8ebff;
  text-align: center;
  font-weight: 850;
}
.agenda-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.agenda-copy strong {
  display: block;
  overflow-wrap: anywhere;
}
.agenda-copy span { display: block; color: var(--muted); font-size: 12px; }
.agenda-copy .status-pill {
  margin-top: 2px;
}

.agenda-empty {
  min-height: 108px;
  align-items: center;
}

.agenda-empty .agenda-copy {
  width: 100%;
  max-width: 360px;
}

.past-activity-list {
  max-height: 404px;
  overflow-y: auto;
  padding-right: 4px;
}

.past-table {
  display: grid;
}

.past-table-head,
.past-row {
  display: grid;
  grid-template-columns: minmax(96px, .85fr) minmax(120px, 1.2fr) minmax(104px, .74fr) minmax(50px, .36fr);
  gap: 12px;
  align-items: center;
}

.past-table-head {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(125, 211, 252, .16);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.past-row {
  min-height: 64px;
  padding: 10px;
  border-bottom: 1px solid rgba(125, 211, 252, .1);
  color: rgba(232, 243, 255, .82);
}

.past-row:last-child {
  border-bottom: 0;
}

.past-row strong,
.past-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.past-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.past-row.completed {
  background: rgba(34, 197, 94, .035);
}

.past-row.cancelled {
  background: rgba(239, 68, 68, .035);
}

.past-empty {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, .12);
  border-radius: 10px;
  background: rgba(5, 21, 52, .36);
}

.past-empty span {
  color: var(--muted);
  font-size: 12px;
}

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

.service-lane {
  min-height: 210px;
  padding: 8px;
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 12px;
  background: rgba(4, 17, 42, .28);
}

.lane-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #d9f1ff;
  font-weight: 800;
  font-size: 13px;
}
.lane-heading span {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--muted);
}

.service-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 10px;
  background: rgba(11, 35, 78, .45);
}
.service-card strong { font-size: 13px; }
.service-card span,
.service-card small {
  color: var(--muted);
  font-size: 12px;
}
.service-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.board-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(125, 211, 252, .16);
  color: var(--muted);
  font-size: 12px;
}

.flag-controls {
  display: grid;
  gap: 14px;
}
.flag-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(125, 211, 252, .12);
}
.flag-row:last-child { border-bottom: 0; }
.flag-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.flag-value {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
}
.flag-value.true { color: #74f2b0; }
.flag-value.false { color: #ff9fa7; }
.toggle {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  padding: 3px;
  background: rgba(239, 68, 68, .18);
  border: 1px solid rgba(239, 68, 68, .34);
}
.toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform .18s ease;
}
.toggle.true {
  background: rgba(34, 197, 94, .2);
  border-color: rgba(34, 197, 94, .38);
}
.toggle.true::after { transform: translateX(22px); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.filter-chip {
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border-color: rgba(125, 211, 252, .16);
  box-shadow: none;
  font-size: 12px;
}
.filter-chip.active {
  color: #fff;
  background: rgba(139, 92, 246, .34);
  border-color: rgba(139, 92, 246, .52);
}

.automation-queue {
  display: grid;
  gap: 10px;
}
.audit-stream {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.audit-table {
  display: grid;
  min-width: 0;
}

.audit-table-head,
.audit-row {
  display: grid;
  grid-template-columns: minmax(84px, .8fr) minmax(68px, .65fr) minmax(108px, 1fr) minmax(82px, .8fr);
  gap: 7px;
  align-items: start;
}

.audit-table-head {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(125, 211, 252, .16);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.audit-row {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(125, 211, 252, .1);
}

.audit-row:last-child {
  border-bottom: 0;
}

.audit-row strong,
.job-row strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.audit-row span,
.audit-row small,
.job-row span,
.job-row small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.audit-row small {
  display: block;
  margin-top: 3px;
}

.audit-empty {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, .12);
  border-radius: 10px;
  background: rgba(4, 17, 42, .28);
}

.audit-empty span {
  color: var(--muted);
  font-size: 12px;
}

.job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 10px;
  background: rgba(4, 17, 42, .28);
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.job-actions .status-pill {
  margin-right: auto;
}

.compact {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.automation-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}
.automation-form label { grid-column: auto; }
.automation-form .automation-title,
.automation-form .occurrence-days,
.automation-form .automation-form-actions { grid-column: 1 / -1; }

.automation-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.occurrence-days {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 10px;
  background: rgba(4, 17, 42, .28);
}

.occurrence-days legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.occurrence-days label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: #dcecff;
}

.occurrence-days input {
  width: auto;
  min-height: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 8, 24, .72);
  backdrop-filter: blur(14px);
}

#confirmModal {
  z-index: 30;
}

.modal-panel {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11, 35, 78, .94), rgba(5, 23, 55, .9));
  box-shadow: var(--glass-shadow);
}

.modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.modal-form label:first-child {
  grid-column: span 2;
}

.modal-form button {
  grid-column: auto;
}

.api-panel {
  width: min(760px, 100%);
}

.schedule-editor-panel {
  width: min(980px, 100%);
}

.schedule-editor-grid {
  display: grid;
  grid-template-columns: minmax(260px, .45fr) minmax(360px, .55fr);
  gap: 16px;
  margin-top: 14px;
}

.date-schedule-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 12px;
  background: rgba(4, 17, 42, .28);
}

.date-schedule-panel h3 {
  margin: 0;
  font-size: 16px;
}

.date-schedule-panel p {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(125, 211, 252, .14);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.date-schedule-card,
.date-schedule-empty {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 12px;
  background: rgba(5, 21, 52, .44);
}

.date-schedule-card strong,
.date-schedule-empty strong {
  overflow-wrap: anywhere;
  color: #eef7ff;
}

.date-schedule-card small,
.date-schedule-empty span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.date-schedule-card.active {
  border-color: rgba(34, 197, 94, .36);
}

.date-schedule-card.scheduled {
  border-color: rgba(139, 92, 246, .36);
}

.schedule-editor-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  margin: 0;
  padding: 16px;
}

.schedule-editor-form label:first-of-type {
  grid-column: 1 / -1;
}

.schedule-form-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(150px, auto);
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.schedule-form-actions button {
  min-width: 0;
  white-space: normal;
}

.readiness-panel {
  width: min(1160px, 100%);
}

.health-panel {
  width: min(620px, 100%);
}

.settings-panel {
  width: min(620px, 100%);
}

.confirm-panel {
  width: min(520px, 100%);
}

.confirm-copy {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.confirm-copy p {
  margin: 0;
  color: #edf7ff;
  line-height: 1.45;
}

.confirm-copy pre {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 10px;
  background: rgba(4, 17, 42, .4);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.health-details {
  display: grid;
  gap: 9px;
}

.health-detail-row {
  display: grid;
  grid-template-columns: minmax(140px, .6fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 10px;
  background: rgba(4, 17, 42, .28);
}

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

.health-detail-row strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.api-url-block {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

.api-url-block label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.api-url-block label:first-child,
.api-url-block label:nth-child(3),
.api-url-block label:nth-child(4),
.api-url-block button {
  grid-column: span 2;
}

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

.settings-form label,
.settings-readback {
  display: grid;
  gap: 6px;
}

.settings-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settings-readback {
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, .14);
  border-radius: 10px;
  background: rgba(4, 17, 42, .28);
}

.settings-readback span {
  color: var(--muted);
  font-size: 12px;
}

.settings-readback strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.settings-form button {
  justify-self: start;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 260px;
  max-width: 430px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 20, 48, .9);
  border: 1px solid rgba(125, 211, 252, .28);
  color: #f8fbff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .18s ease;
  backdrop-filter: blur(16px);
}
.toast.show { opacity: 1; transform: translateY(0); }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 16% 12%, rgba(46, 168, 255, .22), transparent 31%),
    radial-gradient(circle at 78% 18%, rgba(139, 92, 246, .18), transparent 28%),
    linear-gradient(135deg, #020714 0%, #031936 46%, #070b24 100%);
}
.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(140%);
}
.login-brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.login-brand .brand-mark { width: 46px; height: 46px; }
.login-brand div {
  display: grid;
  gap: 2px;
}
.login-brand span:not(.brand-mark) {
  color: var(--muted);
  font-size: 13px;
}
.login-panel h1 { margin: 0; font-size: 28px; }
.login-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.login-panel button { width: 100%; }
.error { margin: 0; color: #ffb4b4; }
output {
  display: block;
  overflow-wrap: anywhere;
  color: #9be7ff;
  font-weight: 750;
}

.page-header {
  min-height: calc(100vh - 46px);
  display: grid;
  place-items: center;
  text-align: center;
}
.page-header > div {
  width: min(620px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(140%);
}
.page-header h1 {
  margin: 6px 0 10px;
  font-size: 34px;
}
.page-header p {
  margin: 0;
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 850;
  color: #9be7ff !important;
}

@media (max-width: 1320px) {
  .ops-grid { grid-template-columns: 1fr; }
  .right-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .active-rollback-strip {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "icon copy"
      "icon stat"
      "actions actions";
  }
  .active-rollback-strip .action-row { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .rail-nav { display: flex; }
  .nav-item { min-width: 82px; }
  .logout-form { margin: 0 0 0 auto; }
  .main { margin-left: 0; padding: 14px; }
  .ops-header { align-items: flex-start; display: grid; }
  .lifecycle-steps,
  .selected-event-bar,
  .selected-event-bar #selectedEventSummary,
  .schedule-layout,
  .active-rollback-strip,
  .schedule-editor-grid,
  .right-board,
  .service-lanes,
  .schedule-composer,
  .schedule-form-actions {
    grid-template-columns: 1fr;
  }
  .active-rollback-strip {
    grid-template-areas:
      "icon"
      "copy"
      "stat"
      "actions";
  }
  .active-rollback-strip .action-row {
    flex-wrap: wrap;
  }
  .lifecycle-steps::before { display: none; }
  .schedule-composer label:first-child { grid-column: auto; }
  .modal-form label:first-child,
  .api-url-block label:first-child,
  .api-url-block label:nth-child(3),
  .api-url-block label:nth-child(4),
  .api-url-block button {
    grid-column: auto;
  }
  .api-url-block {
    grid-template-columns: 1fr;
  }
}
