:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(17, 24, 39, 0.72);
  --panel-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f8fafc;
  --muted: #9aa4b7;
  --soft: #cbd5e1;
  --accent: #ff3d81;
  --accent-2: #7c3aed;
  --accent-3: #22d3ee;
  --danger: #fb7185;
  --ok: #34d399;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(255, 61, 129, 0.16), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(34, 211, 238, 0.22), transparent 26rem),
    radial-gradient(circle at 18% 12%, rgba(124, 58, 237, 0.34), transparent 30rem),
    #07080d;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-panel, .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.055));
  border: 1px solid var(--line);
  box-shadow: 0 28px 90px rgba(0,0,0,0.4);
  backdrop-filter: blur(22px);
}

.hero-panel {
  border-radius: 30px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.logout { justify-self: end; min-height: 40px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(520px, 100%); }

.eyebrow {
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 900;
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(52px, 10vw, 118px);
  line-height: 0.84;
  margin: 0;
  letter-spacing: -0.09em;
  max-width: 820px;
}

h2, h3 { margin: 0; letter-spacing: -0.03em; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

.subtitle {
  color: var(--soft);
  max-width: 780px;
  font-size: 18px;
  line-height: 1.65;
  margin: 20px 0 0;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-pills span, .status-chip {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: var(--soft);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

.status-chip { color: var(--ok); }
.metric { border-radius: 22px; padding: 18px; background: rgba(0,0,0,0.24); border: 1px solid rgba(255,255,255,0.1); }
.metric strong { display: block; font-size: 34px; letter-spacing: -0.05em; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 800; }

.card {
  border-radius: 28px;
  padding: 22px;
}

.submit-card { margin-bottom: 18px; }
.form-head, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }

label { display: block; color: var(--soft); margin-bottom: 9px; font-weight: 900; font-size: 13px; }
.label-note { color: var(--muted); font-weight: 700; }

input[type="url"], input[type="text"], input[type="file"], textarea, select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(4, 7, 13, 0.72);
  color: var(--text);
  border-radius: 18px;
  padding: 16px 17px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(4, 7, 13, 0.9);
}

textarea { min-height: 126px; resize: vertical; margin-bottom: 16px; font-family: inherit; }
select { appearance: none; margin-bottom: 0; }

.control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.advanced-grid { margin-top: 14px; }
.two-col { grid-template-columns: 1fr 1fr; align-items: end; }
.row { display: flex; gap: 12px; }

button, .zip-button {
  border: 0;
  border-radius: 18px;
  padding: 0 22px;
  min-height: 48px;
  font-weight: 950;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(124, 58, 237, 0.24);
}

button.wide { width: 100%; min-height: 56px; margin-top: 12px; }
.wide-lite { width: 100%; }
button.secondary { background: rgba(255,255,255,0.09); box-shadow: none; padding: 10px 14px; }
.danger-button { color: #fecdd3; background: rgba(251, 113, 133, 0.16) !important; }

.check { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-weight: 600; color: var(--muted); }
.inline-check { min-height: 52px; margin: 0; padding: 0 14px; border: 1px solid rgba(255,255,255,0.13); border-radius: 18px; background: rgba(4, 7, 13, 0.5); }
.hook-toggle { margin-top: 14px; }
.check input { accent-color: var(--accent); }
.message { min-height: 22px; color: var(--danger); font-weight: 800; }

.grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 18px; margin-top: 18px; }
.cookies-card { margin-top: 18px; }
.health-card { margin-top: 18px; }
.jobs { display: grid; gap: 11px; }

.job {
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 18px;
  padding: 15px;
  background: rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.job:hover { transform: translateY(-2px); border-color: rgba(34,211,238,0.42); background: rgba(255,255,255,0.075); }
.job-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.job-actions { display: flex; gap: 8px; flex-shrink: 0; }
.tiny { min-height: 34px; border-radius: 12px; padding: 0 11px; font-size: 12px; box-shadow: none; }
.tiny.danger { background: rgba(251, 113, 133, 0.18); color: #fecdd3; }
.tiny.retry-job { background: rgba(52, 211, 153, 0.18); color: #bbf7d0; }
.job-title { min-width: 0; font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { color: var(--muted); font-size: 13px; margin-top: 7px; line-height: 1.45; }
.qa-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.qa { border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 950; border: 1px solid rgba(255,255,255,0.12); }
.qa.ok { color: #bbf7d0; background: rgba(34, 197, 94, 0.14); }
.qa.warn { color: #fed7aa; background: rgba(249, 115, 22, 0.15); }

.bar { height: 8px; background: rgba(255,255,255,0.09); border-radius: 999px; margin-top: 12px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.details.empty { color: var(--muted); min-height: 280px; display: grid; place-items: center; text-align: center; }

.clip {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.preview-card { display: grid; gap: 10px; }
.preview-card img, .clip video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 18px; background: #000; border: 1px solid rgba(255,255,255,0.14); }
.preview-card img { display: none; }

.clip a, .zip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: white;
  text-decoration: none;
  margin-right: 10px;
  margin-top: 12px;
  font-weight: 900;
}

.clip a:not(.zip-button) {
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255,255,255,0.09);
}

.zip-button { padding: 0 18px; margin-bottom: 16px; border-radius: 16px; }
.copybox { width: 100%; min-height: 102px; margin-top: 14px; color: var(--text); }
.logs { white-space: pre-wrap; max-height: 520px; overflow: auto; padding: 14px; border-radius: 16px; background: rgba(0,0,0,0.32); border: 1px solid rgba(255,255,255,0.1); color: var(--soft); font-size: 12px; line-height: 1.55; }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.health-item { padding: 13px; border-radius: 16px; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.18); }
.health-item.bad { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.22); }
.health-item strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.health-item span { display: block; margin-top: 6px; font-weight: 950; }
.mini-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; background: rgba(0,0,0,0.18); }
.mini-editor label { margin: 0; font-size: 11px; }
.mini-editor input, .mini-editor select { margin-top: 6px; padding: 10px 11px; border-radius: 12px; font-size: 13px; }
.mini-editor button { grid-column: 1 / -1; min-height: 42px; }
.check.compact { align-items: center; margin: 0; padding: 8px 0 0; }
.review-box { margin: 16px 0; padding: 14px; border: 1px solid rgba(34,211,238,0.24); border-radius: 18px; background: rgba(34,211,238,0.07); }
.review-row { display: grid; grid-template-columns: 76px 0.7fr 0.7fr 1.5fr auto; gap: 10px; align-items: end; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.review-row:first-of-type { border-top: 0; }
.review-row label { margin: 0; font-size: 11px; }
.review-row input { margin-top: 6px; padding: 10px 11px; border-radius: 12px; font-size: 13px; }
.template-layout { display: grid; grid-template-columns: minmax(260px, 390px) 1fr; gap: 18px; align-items: start; margin-top: 14px; }
.template-preview { display: grid; place-items: center; padding: 16px; border-radius: 20px; background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.1); }
.tpl-phone { --tpl-label-color: #FBBF24; --tpl-label-bg: #111827; --tpl-accent: #2563EB; --tpl-title-color: #FBBF24; --tpl-source-opacity: 0.75; --tpl-brightness: 1; --tpl-label-y: 22px; --tpl-title-display: block; --tpl-title-bottom: 0px; --tpl-sub-display: block; --tpl-sub-bottom: 104px; --tpl-frame-top: 16%; --tpl-frame-width: 89%; --tpl-frame-radius: 8px; position: relative; width: min(310px, 100%); aspect-ratio: 9 / 16; overflow: hidden; border-radius: 22px; border: 3px solid rgba(255,255,255,0.88); background: linear-gradient(180deg, rgba(80,38,18,0.9), rgba(16,24,39,0.9)); filter: brightness(var(--tpl-brightness)); box-shadow: 0 24px 70px rgba(0,0,0,0.42); }
.tpl-phone::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 16% 50%, rgba(255,255,255,0.22), transparent 8%), radial-gradient(circle at 84% 50%, rgba(255,255,255,0.22), transparent 8%), linear-gradient(90deg, rgba(0,0,0,0.36), transparent 18%, transparent 82%, rgba(0,0,0,0.36)); }
.tpl-label { position: absolute; top: var(--tpl-label-y); left: 20px; z-index: 2; color: var(--tpl-label-color); background: var(--tpl-label-bg); border: 1px solid rgba(255,255,255,0.15); border-radius: 7px; padding: 6px 10px; font-size: 15px; font-weight: 950; letter-spacing: 0.02em; }
.tpl-logo { position: absolute; top: 22px; right: 22px; z-index: 4; width: 54px; height: 54px; object-fit: contain; border-radius: 12px; background: rgba(0,0,0,0.24); }
.tpl-source-note { position: absolute; top: 68px; left: 18px; right: 18px; z-index: 2; padding: 9px 12px; border-radius: 16px 16px 0 0; color: white; background: var(--tpl-accent); opacity: var(--tpl-source-opacity); font-size: 11px; font-style: italic; font-weight: 800; }
.tpl-source-frame { position: absolute; top: 104px; left: 42px; right: 42px; height: 190px; z-index: 1; display: grid; place-items: center; color: white; background: color-mix(in srgb, var(--tpl-accent) 62%, #111827); border-left: 3px solid rgba(255,255,255,0.86); border-right: 3px solid rgba(255,255,255,0.86); text-align: center; font-size: 24px; font-weight: 950; letter-spacing: 0.04em; }
.tpl-compositor .tpl-source-frame { top: var(--tpl-frame-top); left: calc((100% - var(--tpl-frame-width)) / 2); right: auto; width: var(--tpl-frame-width); height: 35%; border: 2px solid rgba(255,255,255,0.85); border-radius: var(--tpl-frame-radius); overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,0.38); }
.tpl-brand { position: absolute; top: 293px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.28); font-size: 34px; font-weight: 950; }
.tpl-subtitle { display: var(--tpl-sub-display); position: absolute; left: 40px; right: 40px; bottom: var(--tpl-sub-bottom); z-index: 3; padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.7); background: rgba(0,0,0,0.42); color: white; text-align: center; font-size: 16px; line-height: 1.15; font-weight: 950; }
.tpl-title { display: var(--tpl-title-display); position: absolute; left: 0; right: 0; bottom: var(--tpl-title-bottom); padding: 14px 16px 20px; z-index: 2; border-top: 1px solid rgba(255,255,255,0.16); background: rgba(17,24,39,0.94); color: var(--tpl-title-color); font-size: 22px; font-weight: 950; line-height: 1.15; }
.template-controls .control-grid:first-child { margin-top: 0; }
.template-save-row { align-items: end; }

@media (max-width: 920px) {
  .hero, .grid, .control-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel { grid-template-columns: repeat(2, 1fr); }
  .logout { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 1240px); padding-top: 24px; }
  .hero-panel { grid-template-columns: 1fr; }
  .card { border-radius: 22px; padding: 16px; }
  button { min-height: 52px; }
  .clip { grid-template-columns: 1fr; }
  .preview-card img, .clip video { width: 100%; max-width: 320px; }
  h1 { font-size: clamp(48px, 17vw, 78px); }
}

/* VoltAgent-inspired redesign: void-black, emerald, terminal-native density. */
:root {
  --bg: #020403;
  --panel: rgba(5, 12, 10, 0.9);
  --panel-2: rgba(16, 185, 129, 0.08);
  --line: rgba(52, 211, 153, 0.2);
  --text: #ecfdf5;
  --muted: #78c7a8;
  --soft: #a7f3d0;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-3: #d1fae5;
  --danger: #fb7185;
  --ok: #34d399;
}

body {
  background: radial-gradient(circle at 72% -8%, rgba(16, 185, 129, 0.24), transparent 34rem), radial-gradient(circle at 12% 8%, rgba(5, 150, 105, 0.16), transparent 28rem), linear-gradient(180deg, #020403, #050807 48%, #020403);
}

body::before {
  background-image: linear-gradient(rgba(52,211,153,0.065) 1px, transparent 1px), linear-gradient(90deg, rgba(52,211,153,0.055) 1px, transparent 1px);
  background-size: 38px 38px;
}

.hero-panel, .card {
  background: linear-gradient(180deg, rgba(5, 20, 16, 0.94), rgba(3, 10, 8, 0.84));
  border-color: var(--line);
  box-shadow: 0 28px 90px rgba(0,0,0,0.58), inset 0 1px 0 rgba(167,243,208,0.08);
}

h1 {
  text-transform: uppercase;
  letter-spacing: -0.095em;
  text-shadow: 0 0 44px rgba(16,185,129,0.18);
}

.eyebrow, .status-chip { color: var(--accent-2); }
.hero-pills span, .status-chip { border-color: rgba(52,211,153,0.22); background: rgba(16,185,129,0.08); }
.metric { background: rgba(0,0,0,0.34); border-color: rgba(52,211,153,0.16); }
.metric strong { color: var(--accent-3); }

input[type="url"], input[type="text"], input[type="number"], textarea, select {
  background: rgba(0, 0, 0, 0.38);
  border-color: rgba(52,211,153,0.18);
  border-radius: 12px;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(52, 211, 153, 0.72);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

button, .zip-button {
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 12px;
  color: #02130d;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2) 45%, var(--accent));
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.18);
}

button.secondary {
  background: rgba(16,185,129,0.08);
  color: var(--text);
  border: 1px solid rgba(52,211,153,0.2);
}

.job {
  background: rgba(0,0,0,0.34);
  border-color: rgba(52,211,153,0.16);
  border-radius: 14px;
}

.job:hover {
  border-color: rgba(52,211,153,0.55);
  background: rgba(16,185,129,0.08);
}

.job-title, h2, h3 { color: var(--text); }
.bar { background: rgba(52,211,153,0.09); }
.bar span { background: linear-gradient(90deg, var(--accent), var(--accent-3)); box-shadow: 0 0 24px rgba(52,211,153,0.5); }
.tiny.retry-job { background: rgba(52, 211, 153, 0.18); color: #bbf7d0; }
.tiny.recover-job { background: rgba(209, 250, 229, 0.16); color: #ecfdf5; }
.tiny.logs-job { background: rgba(16, 185, 129, 0.1); color: #a7f3d0; }

.preview-card img, .clip video {
  border-color: rgba(52,211,153,0.18);
  border-radius: 14px;
}

.clip { border-top-color: rgba(52,211,153,0.14); }
.mini-editor, .logs, .health-item { border-color: rgba(52,211,153,0.16); }
.health-item { background: rgba(16,185,129,0.1); }
.health-item.bad { background: rgba(251,113,133,0.12); }
.help-box { margin: 14px 0 16px; border: 1px solid rgba(52,211,153,0.18); border-radius: 16px; background: rgba(0,0,0,0.24); overflow: hidden; }
.help-box summary { cursor: pointer; padding: 14px 16px; color: var(--accent-3); font-weight: 950; }
.help-content { padding: 0 16px 16px; color: var(--soft); line-height: 1.55; }
.help-content h3 { margin: 14px 0 6px; font-size: 15px; color: var(--text); }
.help-content p { margin: 0; color: var(--muted); }
.help-content code { color: var(--accent-3); background: rgba(16,185,129,0.1); border: 1px solid rgba(52,211,153,0.16); border-radius: 6px; padding: 1px 5px; }
.settings-section { margin-top: 14px; border: 1px solid rgba(52,211,153,0.16); border-radius: 18px; background: rgba(0,0,0,0.22); overflow: hidden; }
.settings-section summary { display: flex; justify-content: space-between; gap: 14px; align-items: center; cursor: pointer; padding: 15px 17px; list-style: none; }
.settings-section summary::-webkit-details-marker { display: none; }
.settings-section summary span { color: var(--text); font-weight: 950; }
.settings-section summary small { color: var(--muted); font-weight: 800; }
.settings-section summary::after { content: "+"; color: var(--accent-3); font-weight: 950; font-size: 20px; }
.settings-section[open] summary::after { content: "-"; }
.settings-section > .control-grid, .settings-section > .check, .settings-section > .hook-toggle { margin: 0 16px 16px; }
.settings-section > .control-grid + .control-grid { margin-top: 0; }
