@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Mono";
  src: url("../fonts/DejaVuSansMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #070b12;
  --bg-2: #0a101a;
  --surface: #0d1522;
  --surface-2: #111c2c;
  --surface-3: #16243a;
  --text: #e7eef8;
  --muted: #91a1ba;
  --muted-2: #64748b;
  --line: rgba(173, 198, 232, 0.11);
  --line-strong: rgba(173, 198, 232, 0.22);
  --teal: #2dd4bf;
  --blue: #60a5fa;
  --amber: #f5a623;
  --green: #34d399;
  --red: #f87171;
  --violet: #a78bfa;
  --pink: #f472b6;
  --radius: 14px;
  --radius-lg: 20px;
  --mono: "DejaVu Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 15% -10%, rgba(45, 212, 191, 0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(96, 165, 250, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(173, 198, 232, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(173, 198, 232, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
code, pre { font-family: var(--mono); }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.02; letter-spacing: -0.045em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.03em; }
h3 { font-size: 1.08rem; letter-spacing: -0.015em; }
h4 { font-size: 0.95rem; letter-spacing: -0.01em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.bad { color: var(--red) !important; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1460px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 170px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2dd4bf, #0f766e);
  color: #03110f;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.35), 0 10px 30px rgba(45, 212, 191, 0.18);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy b { font-size: 1rem; letter-spacing: -0.01em; }
.brand-copy small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }
.tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.tabs a:hover { color: var(--text); background: rgba(173, 198, 232, 0.07); }
.tabs a.is-active { color: var(--text); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.jump select {
  appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%2391a1ba' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 32px 9px 12px;
  font-size: 0.82rem;
  max-width: 210px;
  cursor: pointer;
}
.jump select:focus { outline: 2px solid rgba(45, 212, 191, 0.4); outline-offset: 2px; }
.clock {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { border-color: rgba(45, 212, 191, 0.45); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, #2dd4bf, #14b8a6); border-color: transparent; color: #04110f; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 11px; font-size: 0.77rem; border-radius: 8px; }
.btn.mini { padding: 5px 9px; font-size: 0.72rem; border-radius: 7px; }
.btn.danger { border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.text-link { color: var(--teal); font-size: 0.84rem; font-weight: 700; white-space: nowrap; }
.text-link:hover { color: #7ff3e6; }

/* notices */
.notice {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
}
.notice b { font-size: 0.9rem; }
.notice ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.notice code { color: var(--text); }
.notice-warn { border-color: rgba(245, 166, 35, 0.36); background: linear-gradient(180deg, rgba(245, 166, 35, 0.10), transparent); }
.notice-danger { border-color: rgba(248, 113, 113, 0.42); background: linear-gradient(180deg, rgba(248, 113, 113, 0.12), transparent); }
.notice-danger b { color: #fecaca; }

.main { flex: 1; padding: 30px 0 60px; }
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.76rem;
}
.footer-state { color: var(--teal); }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 44px;
  align-items: end;
  padding: 40px 0 46px;
}
.hero.compact-hero { padding-bottom: 28px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kicker span {
  width: 22px; height: 1px;
  background: var(--teal);
  display: inline-block;
}
.hero h1 { margin: 14px 0 18px; }
.hero h1 em { color: var(--teal); font-style: normal; }
.lede { color: var(--muted); font-size: 1.02rem; max-width: 720px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 28, 44, 0.9), rgba(13, 21, 34, 0.7));
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.stat b { font-size: 1.8rem; line-height: 1.1; letter-spacing: -0.04em; }
.stat small { color: var(--muted-2); font-size: 0.72rem; }

/* sections */
.section { padding: 26px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.section-head h2 { margin-top: 8px; }
.section-note { color: var(--muted); font-size: 0.83rem; max-width: 470px; text-align: right; }

/* attention */
.attention-list { display: grid; gap: 8px; }
.attention-row {
  display: grid;
  grid-template-columns: auto 190px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--amber));
  border-radius: 11px;
  background: var(--surface);
  font-size: 0.85rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.attention-row:hover { background: var(--surface-2); border-color: var(--line-strong); }
.attention-copy { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-go { color: var(--teal); font-weight: 700; font-size: 0.78rem; }

/* panels and cards */
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 28, 44, 0.72), rgba(10, 16, 26, 0.6));
  border-radius: var(--radius-lg);
  padding: 20px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head p { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.pill.ok { color: var(--green); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }

.split-section { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.timeline li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.timeline li:last-child { border-bottom: 0; }
.timeline li.empty { color: var(--muted); grid-template-columns: 1fr; }
.timeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent, var(--teal));
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.08);
}
.timeline a { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.timeline a span { color: var(--muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline time { color: var(--muted); font-family: var(--mono); font-size: 0.73rem; white-space: nowrap; }
.timeline-in { color: var(--teal); font-size: 0.72rem; white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.steps li > span {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.7rem;
}
.steps b { display: block; font-size: 0.88rem; }
.steps p { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.group { margin-top: 32px; }
.group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.group-head h3 { margin: 6px 0 4px; font-size: 1.15rem; }
.group-head p { color: var(--muted); font-size: 0.82rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.auto-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent, var(--teal));
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 28, 44, 0.78), rgba(10, 16, 26, 0.7));
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.auto-card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--surface-2); }
.auto-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 11px; }
.auto-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, var(--teal)) 16%, var(--surface));
  color: var(--accent, var(--teal));
  border: 1px solid color-mix(in srgb, var(--accent, var(--teal)) 32%, transparent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}
.auto-title h3 { font-size: 1rem; }
.auto-title p { color: var(--muted); font-size: 0.77rem; }
.health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.health i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.health.ok { color: var(--green); border-color: rgba(52, 211, 153, 0.32); background: rgba(52, 211, 153, 0.08); }
.health.running { color: var(--blue); border-color: rgba(96, 165, 250, 0.32); background: rgba(96, 165, 250, 0.08); }
.health.attention { color: var(--amber); border-color: rgba(245, 166, 35, 0.34); background: rgba(245, 166, 35, 0.08); }
.health.failed { color: var(--red); border-color: rgba(248, 113, 113, 0.36); background: rgba(248, 113, 113, 0.08); }
.health.idle { color: var(--muted); }
.auto-schedule { color: var(--muted); font-size: 0.78rem; }
.auto-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auto-stats div { background: rgba(7, 11, 18, 0.45); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.auto-stats b { display: block; font-size: 1.15rem; line-height: 1.1; }
.auto-stats span { color: var(--muted-2); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; }
.auto-next { display: flex; justify-content: space-between; gap: 10px; font-size: 0.77rem; border-top: 1px solid var(--line); padding-top: 10px; }
.auto-next span { color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
.auto-next b { font-weight: 600; color: var(--muted); text-align: right; }
.auto-warn { color: var(--amber); font-size: 0.74rem; }
.auto-open { color: var(--teal); font-size: 0.76rem; font-weight: 700; margin-top: auto; }

/* detail head */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted-2); font-size: 0.78rem; padding: 8px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.detail-title { display: flex; gap: 18px; align-items: flex-start; }
.detail-icon {
  width: 58px; height: 58px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent, var(--teal)) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent, var(--teal)) 36%, transparent);
  color: var(--accent, var(--teal));
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 700;
}
.detail-title h1 { font-size: clamp(1.9rem, 3.4vw, 3rem); margin: 8px 0 10px; }
.detail-title .lede { max-width: 760px; font-size: 0.95rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}
.meta-chip.link { color: var(--teal); }
.meta-chip.link:hover { border-color: rgba(45, 212, 191, 0.4); }

/* control layout */
.control-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr); gap: 18px; align-items: start; }
.control-panel { position: relative; }
.control-panel.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px dashed rgba(245, 166, 35, 0.25);
}
.control-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.control-head h3 { margin-top: 6px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.action-tile {
  text-align: left;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 11px;
  padding: 13px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.action-tile:hover { border-color: rgba(45, 212, 191, 0.4); background: var(--surface-2); transform: translateY(-1px); }
.action-tile.primary { border-color: rgba(45, 212, 191, 0.42); background: linear-gradient(180deg, rgba(45, 212, 191, 0.12), rgba(13, 21, 34, 0.6)); }
.action-tile b { font-size: 0.86rem; }
.action-tile small { color: var(--muted); font-size: 0.72rem; line-height: 1.4; }
.service-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.service-row > span { margin-right: 4px; }
.control-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.control-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  background: rgba(7, 11, 18, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.control-form h4 { font-size: 0.9rem; }
.control-split .control-form { margin-top: 0; }
.control-form.inline-form { flex-direction: row; flex-wrap: wrap; align-items: end; }
.control-form.inline-form h4 { width: 100%; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; color: var(--muted); flex: 1; min-width: 150px; }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-size: 0.83rem;
}
.field input:focus, .field select:focus { outline: 2px solid rgba(45, 212, 191, 0.35); outline-offset: 1px; }
.field input[type="datetime-local"] { color-scheme: dark; }
.review-panel {
  margin-top: 14px;
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.08), rgba(7, 11, 18, 0.35));
  border-radius: var(--radius);
  padding: 14px;
}
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-head h4 { margin-top: 3px; }
.review-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; }
.review-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 11, 18, 0.4);
}
.review-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-copy b { font-size: 0.8rem; }
.review-copy span { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.review-copy small { font-size: 0.7rem; line-height: 1.4; }
.review-actions { display: flex; flex-wrap: wrap; gap: 5px; flex: none; }
@media (max-width: 760px) {
  .review-list li { flex-direction: column; }
  .review-actions { width: 100%; }
}
.control-result {
  margin-top: 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  color: #bbf7e4;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.82rem;
}
.control-result.is-error { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); color: #fecaca; }

/* action feedback: labelled steps that spin, then turn green */
.action-feedback {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.06), transparent 45%),
    rgba(7, 11, 18, 0.45);
}
.action-feedback[hidden] { display: none; }
.action-feedback-head { display: flex; align-items: center; gap: 11px; }
.feedback-marker {
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.feedback-marker.is-running { border-color: var(--teal); border-top-color: transparent; animation: feedback-spin 0.8s linear infinite; }
.feedback-marker.is-done { border-color: var(--green); background: rgba(52, 211, 153, 0.16); }
.feedback-marker.is-done::after { content: "\2713"; color: var(--green); }
.feedback-marker.is-error { border-color: var(--red); background: rgba(248, 113, 113, 0.16); }
.feedback-marker.is-error::after { content: "\2715"; color: var(--red); }
.feedback-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feedback-copy b { font-size: 0.93rem; letter-spacing: -0.01em; }
.feedback-copy small { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.feedback-time { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--muted-2); white-space: nowrap; }
.action-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.action-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 11, 18, 0.35);
  transition: border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.action-step[data-state="pending"] { opacity: 0.62; }
.action-step[data-state="running"] {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.08);
  opacity: 1;
}
.action-step[data-state="done"] {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
  opacity: 1;
}
.action-step[data-state="error"] {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.08);
  opacity: 1;
}
.step-marker {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-family: var(--mono);
  color: var(--muted);
}
.action-step[data-state="running"] .step-marker { border-color: var(--teal); border-top-color: transparent; animation: feedback-spin 0.8s linear infinite; }
.action-step[data-state="running"] .step-number { display: none; }
.action-step[data-state="done"] .step-marker { border-color: var(--green); background: rgba(52, 211, 153, 0.16); }
.action-step[data-state="done"] .step-marker::after { content: "\2713"; color: var(--green); font-size: 0.72rem; font-weight: 700; }
.action-step[data-state="done"] .step-number { display: none; }
.action-step[data-state="error"] .step-marker { border-color: var(--red); background: rgba(248, 113, 113, 0.16); }
.action-step[data-state="error"] .step-marker::after { content: "\2715"; color: var(--red); font-size: 0.72rem; font-weight: 700; }
.action-step[data-state="error"] .step-number { display: none; }
.step-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step-label { font-size: 0.83rem; font-weight: 600; line-height: 1.35; }
.step-note { font-size: 0.71rem; color: var(--muted-2); line-height: 1.35; }
.action-step[data-state="running"] .step-label { color: var(--teal); }
.action-step[data-state="done"] .step-label { color: var(--green); }
.action-step[data-state="error"] .step-label { color: var(--red); }
.action-feedback-result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.4);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.action-feedback-result.is-ok { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); color: #bbf7e4; }
.action-feedback-result.is-error { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); color: #fecaca; }
.action-feedback-actions { display: flex; gap: 8px; margin-top: 10px; }
.action-feedback-actions .btn[hidden] { display: none; }
@keyframes feedback-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .feedback-marker.is-running,
  .action-step[data-state="running"] .step-marker { animation: none; }
}

/* daily plan */
.plan-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-block .panel-head { margin-bottom: 8px; }
.plan-block h4 { margin-top: 5px; font-size: 1rem; }
.plan-form { margin-top: 10px; }
.plan-fields {
  display: grid;
  grid-template-columns: 150px 180px minmax(220px, 1fr);
  gap: 10px;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.plan-progress { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 0.74rem; }
.plan-progress .progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.plan-progress .progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}
@media (max-width: 980px) {
  .plan-fields { grid-template-columns: 1fr 1fr; }
  .plan-fields .wide { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .plan-fields { grid-template-columns: 1fr; }
  .plan-fields .wide { grid-column: auto; }
}

/* facts */
.facts { display: grid; gap: 0; margin: 0; }
.facts > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted-2); }
.facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.facts dd small { display: block; color: var(--muted-2); font-size: 0.72rem; }
.facts-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.facts-links a { color: var(--teal); font-size: 0.8rem; font-weight: 700; }

/* schedule */
.schedule-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr); gap: 18px; align-items: start; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 0.72rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-day {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px;
  background: rgba(7, 11, 18, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.calendar-day:hover { border-color: var(--line-strong); background: var(--surface-2); }
.calendar-day.is-blank { border: 0; background: transparent; }
.calendar-day.is-past { opacity: 0.55; }
.calendar-day.is-today { border-color: rgba(45, 212, 191, 0.55); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.18); }
.calendar-day.is-selected { background: var(--surface-3); border-color: var(--teal); }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.day-number { font-family: var(--mono); font-size: 0.75rem; }
.today-label { color: var(--teal); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em; }
.day-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--muted-2); }
.dot.video { background: var(--blue); }
.dot.question { background: var(--violet); }
.dot.card { background: var(--amber); }
.dot.text { background: var(--teal); }
.dot.image { background: var(--pink); }
.dot.reel { background: var(--violet); }
.dot.published { background: var(--green); }
.dot.scheduled { background: var(--blue); }
.dot.queued { background: var(--muted-2); }
.dot.failed { background: var(--red); }
.dot.review { background: var(--amber); }
.day-count { color: var(--muted-2); font-size: 0.64rem; text-align: right; }
.calendar-foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; color: var(--muted-2); font-size: 0.7rem; }
.calendar-foot span { display: inline-flex; align-items: center; gap: 5px; }

.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 560px; overflow: auto; }
.day-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.day-list li.empty { display: block; color: var(--muted); }
.day-time { display: flex; flex-direction: column; gap: 2px; }
.day-time span { color: var(--muted-2); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; }
.day-time b { font-family: var(--mono); font-size: 0.76rem; }
.day-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.day-body p { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.day-links { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted-2); font-size: 0.71rem; }
.day-links a { color: var(--teal); }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}
.badge.video { color: #bfdbfe; background: rgba(96, 165, 250, 0.15); }
.badge.question { color: #ddd6fe; background: rgba(167, 139, 250, 0.15); }
.badge.card { color: #fde68a; background: rgba(245, 166, 35, 0.15); }
.badge.text { color: #bbf7e4; background: rgba(45, 212, 191, 0.14); }
.badge.image { color: #fbcfe8; background: rgba(244, 114, 182, 0.14); }
.status { font-size: 0.68rem; font-weight: 700; color: var(--muted); }
.status.published { color: var(--green); }
.status.scheduled { color: var(--blue); }
.status.queued { color: var(--muted); }
.status.failed { color: var(--red); }
.status.review { color: var(--amber); }

/* tables */
.table-panel { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th {
  text-align: left;
  padding: 9px 10px;
  color: var(--muted-2);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.data-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: rgba(173, 198, 232, 0.03); }
.data-table td.empty { color: var(--muted); text-align: center; padding: 22px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; }
.mix { display: grid; gap: 11px; }
.mix-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 0.82rem; }
.mix-row span { color: var(--muted); }
.mix-row b { font-family: var(--mono); font-size: 0.78rem; }
.mix-row .bar { grid-column: 1 / -1; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.mix-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--blue)); border-radius: inherit; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.activity li { display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; }
.activity li.empty { display: block; color: var(--muted); }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-top: 6px; }
.activity b { font-size: 0.8rem; display: block; }
.activity p { color: var(--muted); font-size: 0.75rem; }
.activity time { color: var(--muted-2); font-size: 0.7rem; white-space: nowrap; }

/* stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; margin-bottom: 18px; }
.stat-strip div { border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 13px; }
.stat-strip span { color: var(--muted-2); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; display: block; }
.stat-strip b { font-size: 1.15rem; }

/* paths and runbook */
.paths-layout { align-items: start; }
.path-list { display: grid; gap: 7px; }
.path-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.77rem; }
.path-row > span { color: var(--muted-2); }
.path-row code { color: var(--muted); overflow-wrap: anywhere; font-size: 0.76rem; }
.callout, .note-box, .override-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(7, 11, 18, 0.35);
  font-size: 0.8rem;
}
.callout ul, .note-box ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); }
.callout.danger { border-color: rgba(248, 113, 113, 0.36); }
.override-box span { color: var(--muted-2); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.override-box pre { margin: 6px 0 0; color: var(--muted); white-space: pre-wrap; font-size: 0.74rem; }
.commands { display: grid; gap: 8px; }
.command-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(7, 11, 18, 0.35); }
.command-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.command-head span { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.command-card > code { display: block; color: #bbf7e4; font-size: 0.73rem; overflow-wrap: anywhere; }
.command-card p { color: var(--muted); font-size: 0.74rem; margin-top: 5px; }
.log {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}
.worker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.worker-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 11px; background: rgba(7, 11, 18, 0.35); }
.worker-grid span { display: block; color: var(--muted-2); font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.08em; }
.worker-grid b { font-size: 1.02rem; }

/* modal and toast */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 11, 0.72);
  backdrop-filter: blur(7px);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  width: min(430px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
}
.modal-card h2 { margin: 8px 0 10px; }
.modal-card p { color: var(--muted); font-size: 0.86rem; margin-bottom: 16px; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-card form { display: grid; gap: 12px; }
.form-error { color: var(--red); font-size: 0.8rem; }
.key-row { display: flex; gap: 6px; align-items: center; }
.key-row input { flex: 1; min-width: 0; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.check-row input { margin-top: 2px; accent-color: var(--teal); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--muted-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.hint { color: var(--muted-2); font-size: 0.76rem; line-height: 1.45; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: min(420px, calc(100% - 44px));
  padding: 12px 15px;
  border-radius: 11px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: #0c201b;
  color: #bbf7e4;
  font-size: 0.83rem;
  box-shadow: var(--shadow);
}
.toast.is-error { border-color: rgba(248, 113, 113, 0.42); background: #2a1214; color: #fecaca; }
.toast[hidden] { display: none; }

/* responsive */
@media (max-width: 1120px) {
  .topbar { grid-template-columns: auto 1fr; }
  .topbar-right { grid-column: 1 / -1; justify-content: flex-end; }
  .tabs { order: 2; }
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .control-layout, .schedule-layout, .split-section { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .detail-meta { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .app-shell { width: calc(100% - 24px); }
  .topbar { gap: 10px; padding: 12px 0; }
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .clock { display: none; }
  .jump select { max-width: 160px; }
  .hero { padding: 26px 0 30px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head, .group-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-note { text-align: left; }
  .attention-row { grid-template-columns: auto 1fr auto; }
  .attention-copy { grid-column: 1 / -1; white-space: normal; }
  .detail-title { flex-direction: column; gap: 12px; }
  .detail-icon { width: 46px; height: 46px; }
  .facts > div { grid-template-columns: 105px minmax(0, 1fr); }
  .path-row { grid-template-columns: 1fr; gap: 3px; }
  .path-row .btn { justify-self: start; }
  .calendar-day { min-height: 58px; padding: 5px; }
  .day-count { display: none; }
  .timeline li { grid-template-columns: auto 1fr; }
  .timeline time, .timeline-in { grid-column: 2; }
  .footer { flex-direction: column; gap: 6px; }
  .modal-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Campaign review cards */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 18px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.review-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--surface-3);
}
.review-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.review-caption {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  margin: 0;
}
