:root {
  color-scheme: dark;
  --bg: #070910;
  --panel: #10131c;
  --panel-2: #151a26;
  --line: #292f3e;
  --text: #f4f6f8;
  --muted: #9da6b7;
  --accent: #53e0c7;
  --accent-2: #7b7cff;
  --danger: #ff6b76;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #17152c 0, var(--bg) 38%); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(7,9,16,.82); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
h1,h2,p { margin-top: 0; } h1 { margin-bottom: 0; font-size: clamp(24px, 3vw, 38px); } h2 { margin-bottom: 8px; }
.eyebrow { margin-bottom: 7px; letter-spacing: .17em; font-size: 12px; font-weight: 800; color: var(--accent); }
main { padding: 34px clamp(20px, 5vw, 72px) 80px; max-width: 1680px; margin: auto; }
.panel { border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(21,26,38,.95), rgba(12,15,23,.96)); box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.hero-panel { padding: 34px; margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.hero-panel h2 { font-size: clamp(28px, 4vw, 52px); max-width: 820px; line-height: 1.04; }
.lede { color: var(--muted); max-width: 780px; font-size: 17px; line-height: 1.6; }
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); } .flow span { border: 1px solid var(--line); background: #0d1119; border-radius: 999px; padding: 10px 14px; color: var(--text); }
.grid { display: grid; grid-template-columns: minmax(420px, .88fr) minmax(520px, 1.12fr); gap: 28px; align-items: start; }
.form-panel,.jobs-panel { padding: 28px; }
.section-heading p { color: var(--muted); margin-bottom: 22px; } .section-heading.row { display: flex; justify-content: space-between; gap: 16px; }
label { display: grid; gap: 8px; margin-bottom: 17px; font-size: 13px; font-weight: 700; color: #dce2ea; }
input,select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #0a0d14; color: var(--text); font: inherit; outline: none; }
input:focus,select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(83,224,199,.12); }
input[type=file] { padding: 10px; } small { color: var(--muted); font-weight: 400; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; } .two-column.compact { grid-template-columns: 1fr 1fr; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; } .checks label { display: flex; align-items: center; margin: 0; } .checks input { width: auto; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 12px; padding: 11px 16px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary { background: linear-gradient(135deg, var(--accent), #3ec0d7); color: #06100e; width: 100%; padding: 15px; }
.secondary { background: #121722; color: var(--text); border-color: var(--line); }
.integration-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pill { border-radius: 999px; border: 1px solid var(--line); padding: 8px 11px; color: var(--muted); font-size: 12px; background: #0c1018; }
.pill.ok { color: var(--accent); border-color: rgba(83,224,199,.4); }
.message { color: var(--muted); margin: 12px 0 0; min-height: 20px; }
.jobs { display: grid; gap: 14px; }
.job { border: 1px solid var(--line); border-radius: 18px; padding: 17px; background: #0b0e15; }
.job-head { display: flex; justify-content: space-between; gap: 14px; } .job h3 { margin: 0 0 5px; font-size: 17px; } .job p { margin: 0; color: var(--muted); font-size: 13px; }
.status { text-transform: uppercase; font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--accent); }
.status.failed { color: var(--danger); }
.progress { height: 8px; background: #1a202d; border-radius: 999px; margin: 14px 0; overflow: hidden; } .progress span { height: 100%; display: block; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.files { display: flex; gap: 8px; flex-wrap: wrap; } .file { color: var(--text); background: #151b27; border: 1px solid var(--line); padding: 7px 10px; border-radius: 9px; font-size: 12px; text-decoration: none; }
.job-actions { margin-top: 12px; display: flex; gap: 8px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px clamp(20px, 5vw, 72px) 0; max-width: 1680px; margin: 0 auto; }
.tabs button { border: 1px solid var(--line); background: #0c1018; color: var(--muted); border-radius: 999px; padding: 10px 14px; cursor: pointer; font-weight: 700; }
.tabs button.active { color: #06100e; background: var(--accent); border-color: transparent; }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .7fr); }
.side-panel { padding: 24px; }
.health-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; color: var(--muted); }
.audit-list { display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.audit-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #0b0e15; font-size: 12px; color: var(--muted); }
.meta-line { opacity: .8; margin-top: 6px !important; }
.button.danger, .pill.danger { background: rgba(255,107,118,.12); color: var(--danger); border-color: rgba(255,107,118,.35); }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.inline-form label { margin: 0; min-width: 180px; }
.profile-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) auto;
  gap: 12px 15px;
  align-items: end;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0e15;
}
.profile-bar label { margin: 0; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-actions .button { width: auto; padding: 11px 14px; white-space: nowrap; }
.profile-message { grid-column: 1 / -1; margin: 0; }
@media (max-width: 900px) {
  .profile-bar { grid-template-columns: 1fr; }
}
.edit-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(83,224,199,.35);
  border-radius: 14px;
  background: rgba(83,224,199,.08);
}
.edit-banner.hidden { display: none; }
.edit-banner strong { display: block; margin-bottom: 4px; }
.edit-banner span { color: var(--muted); font-size: 13px; }
.edit-banner .button { width: auto; }
.templates-editor label { margin-bottom: 22px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #0a0d14; color: var(--text); font: inherit; min-height: 110px; }
.integration-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.integration-cards article { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #0b0e15; }
.hint { color: var(--muted); font-size: 13px; }
@media (max-width: 1050px) { .grid, .dashboard-grid { grid-template-columns: 1fr; } .hero-panel { align-items: flex-start; flex-direction: column; } }
@media (max-width: 700px) { .topbar { align-items: flex-start; flex-direction: column; } .two-column { grid-template-columns: 1fr; } .integration-row { justify-content: flex-start; } }
