:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  --bg: #0b0d12;
  --panel: #141822;
  --panel-2: #191e2a;
  --line: #293043;
  --text: #f3f5f8;
  --muted: #9ca6b7;
  --cyan: #2af0db;
  --pink: #ff315e;
  --danger: #ff536f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% -10%, rgba(42,240,219,.12), transparent 35%),
    radial-gradient(circle at 85% 5%, rgba(255,49,94,.12), transparent 30%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.topbar {
  min-height: 76px;
  padding: 16px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(11,13,18,.84);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { font-size: 18px; font-weight: 800; }
.subtitle, .muted { color: var(--muted); }
.subtitle { font-size: 13px; margin-top: 3px; }
.page { width: min(1180px, calc(100% - 32px)); margin: 28px auto 70px; }
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 42px); }
.hero p { margin: 0; color: var(--muted); line-height: 1.8; }
.badge {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel {
  background: linear-gradient(180deg, rgba(25,30,42,.98), rgba(20,24,34,.98));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
}
.panel h2, .panel h3 { margin-top: 0; }
.stack { display: grid; gap: 15px; }
.stack.compact { margin-top: 14px; }
label { display: grid; gap: 8px; font-weight: 650; }
input, textarea {
  width: 100%;
  color: var(--text);
  background: #0f131b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--cyan); }
.button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.button.primary { background: var(--cyan); color: #06100f; }
.button.accent { background: var(--pink); color: white; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button.danger { background: rgba(255,83,111,.15); color: #ff8da0; border: 1px solid rgba(255,83,111,.35); }
.alert {
  padding: 13px 15px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.alert.success { background: rgba(42,240,219,.08); border-color: rgba(42,240,219,.35); }
.alert.error { background: rgba(255,83,111,.1); border-color: rgba(255,83,111,.35); }
.login-shell { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.login-panel { width: min(430px, 100%); text-align: center; }
.icon {
  width: 68px; height: 68px; border-radius: 20px;
  display: grid; place-items: center; margin: 0 auto 18px;
  font-size: 30px; font-weight: 900; color: #080a0d;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
}
.accounts { margin-top: 28px; }
.account-card { margin-bottom: 18px; }
.account-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}
.account-head h3 { margin-bottom: 5px; font-size: 23px; }
.status {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #232938;
  border: 1px solid var(--line);
}
.status.running { color: var(--cyan); border-color: rgba(42,240,219,.35); }
.status.docker-error { color: var(--danger); }
.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  color: var(--muted);
  margin: 18px 0;
}
.commands { display: grid; gap: 14px; }
.commands > div { display: grid; gap: 7px; }
.code {
  direction: ltr;
  text-align: left;
  display: block;
  overflow-x: auto;
  padding: 12px 13px;
  border-radius: 10px;
  background: #090c11;
  border: 1px solid #242b3b;
  color: #d7dfeb;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.danger-zone {
  margin-top: 18px;
  color: var(--muted);
}
.danger-zone summary { cursor: pointer; }
.empty { color: var(--muted); text-align: center; padding: 40px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: right; }
th { color: var(--muted); font-size: 13px; }
@media (max-width: 780px) {
  .grid.two { grid-template-columns: 1fr; }
  .hero, .account-head { align-items: stretch; flex-direction: column; }
  .topbar { padding-inline: 16px; }
  .page { width: min(100% - 20px, 1180px); }
}


.quick-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: -6px 0 22px;
  padding-bottom: 4px;
}
.quick-nav a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
}
.publish-panel, .jobs-panel { margin-bottom: 24px; }
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.section-title h2 { margin-bottom: 5px; }
.file-drop {
  border: 2px dashed #39435b;
  border-radius: 18px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  background: rgba(42,240,219,.035);
}
.file-drop input {
  margin-top: 16px;
  background: transparent;
}
.file-title { font-size: 18px; font-weight: 850; }
.account-picker {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.account-picker legend { padding: 0 8px; font-weight: 800; }
.picker-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.account-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.check-card, .toggle-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #10141d;
  cursor: pointer;
}
.check-card input, .toggle-card input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.check-card span, .toggle-card span {
  display: grid;
  gap: 3px;
}
.check-card small, .toggle-card small { color: var(--muted); }
.button.small { padding: 8px 11px; font-size: 13px; }
.button.large { padding-block: 16px; font-size: 17px; }
.job-list { display: grid; gap: 12px; }
.job-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  background: #10141d;
}
.job-main, .job-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}
.job-title { font-weight: 850; overflow-wrap: anywhere; }
.job-details { color: var(--muted); margin-top: 13px; justify-content: flex-start; }
.job-status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid var(--line);
  background: #242a39;
}
.job-status.queued { color: #ffd36b; }
.job-status.running { color: var(--cyan); }
.job-status.submitted { color: #7dff9f; border-color: rgba(125,255,159,.35); }
.job-status.manual_required, .job-status.failed { color: #ff8da0; border-color: rgba(255,83,111,.35); }
.job-status.cancelled { color: var(--muted); }
.caption-preview, .job-message {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #0a0d13;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.job-message {
  color: #ffc1cb;
  border: 1px solid rgba(255,83,111,.22);
  max-height: 150px;
  overflow: auto;
}
@media (max-width: 780px) {
  .account-checks { grid-template-columns: 1fr; }
  .section-title { flex-direction: column; }
  .publish-panel, .jobs-panel { padding: 16px; }
  .file-drop { padding: 20px 12px; }
  .job-main { align-items: flex-start; }
}
