:root {
  --bg: #10120f;
  --panel: #171a16;
  --panel-2: #1d211b;
  --line: #30362d;
  --text: #f2f0e9;
  --muted: #9ca395;
  --lime: #c8ff3d;
  --lime-dark: #7ca500;
  --orange: #ff7043;
  --red: #ff5a5f;
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px clamp(20px, 4vw, 64px);
  background: rgba(16,18,15,.88); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; background: var(--lime); color: #111; border-radius: 16px 5px 16px 5px; font-weight: 900; letter-spacing: -.08em; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px 3px 10px 3px; font-size: 12px; }
.topbar nav { display: flex; gap: 26px; color: var(--muted); font-size: 13px; }
.topbar nav a:hover { color: var(--text); }
.topbar > button { justify-self: end; }

main { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 80px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .6fr); gap: 60px; align-items: end; padding: 40px 0 66px; }
.hero h1 { margin: 8px 0 20px; max-width: 900px; font-size: clamp(45px, 6vw, 92px); line-height: .94; letter-spacing: -.065em; }
.hero h1 em { color: var(--lime); font-family: Georgia, serif; font-weight: 400; }
.eyebrow { margin: 0 0 5px; color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.lede { max-width: 700px; color: var(--muted); font-size: 18px; }
.muted { color: var(--muted); }
.status-panel { display: flex; gap: 13px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.status-panel strong, .status-panel span { display: block; }
.status-panel span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.status-dot { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 22px var(--lime); }

.metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 34px; }
.metrics article { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.metrics article span, .metrics article strong { display: block; }
.metrics article span { color: var(--muted); font-size: 12px; }
.metrics article strong { margin-top: 12px; font-size: 27px; letter-spacing: -.04em; }
.metrics article.accent { background: var(--lime); color: #111; border-color: var(--lime); }
.metrics article.accent span { color: #3a460d; }

.panel { margin-bottom: 22px; padding: clamp(20px, 3vw, 34px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.section-heading { display: flex; justify-content: space-between; gap: 25px; align-items: center; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.section-heading > p { max-width: 420px; margin: 0; font-size: 13px; }
.two-column { display: grid; grid-template-columns: minmax(360px, .75fr) minmax(500px, 1.25fr); gap: 22px; }

.integration-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.integration { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.integration strong { display: flex; align-items: center; justify-content: space-between; }
.integration span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: #282e24; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.pill.ready { background: rgba(200,255,61,.13); color: var(--lime); }
.pill.review { background: rgba(255,112,67,.13); color: var(--orange); }
.pill.error, .pill.rejected { background: rgba(255,90,95,.13); color: var(--red); }
.pill.approved, .pill.published, .pill.completed { background: rgba(200,255,61,.13); color: var(--lime); }
.pill.processing, .pill.running, .pill.queued { background: rgba(120,185,255,.13); color: #78b9ff; }

form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: #d3d7ce; font-size: 12px; font-weight: 700; }
input, textarea, select { width: 100%; color: var(--text); background: #11140f; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(200,255,61,.08); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dropzone { padding: 16px; border: 1px dashed #46503d; border-radius: 12px; background: #131711; }
.dropzone input { padding: 0; border: 0; background: transparent; }
.dropzone span { color: var(--muted); font-size: 11px; font-weight: 400; }
button { border: 0; border-radius: 10px; padding: 11px 15px; cursor: pointer; font-weight: 800; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
button:hover { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.primary { background: var(--lime); color: #12150d; }
.ghost { color: var(--text); background: #252a23; }
.danger { color: #ffd7d8; background: #4a2526; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.progress { height: 5px; overflow: hidden; background: #0c0e0b; border-radius: 99px; }
.progress span { display: block; width: 40%; height: 100%; background: var(--lime); animation: loading 1.2s ease-in-out infinite alternate; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.form-message, .form-error { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.form-error { color: var(--red); }

.campaign-list { display: grid; gap: 10px; }
.campaign-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 13px; }
.campaign-item h3 { overflow: hidden; margin: 0 0 5px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; }
.campaign-job { margin-top: 8px; color: #b7c2ae; font-size: 11px; }

.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.clip-card { overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); border-radius: 15px; }
.clip-card video { display: block; width: 100%; aspect-ratio: 9/16; max-height: 480px; object-fit: contain; background: #080a07; }
.clip-body { padding: 17px; }
.clip-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.clip-card h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.clip-meta { margin: 10px 0 14px; color: var(--muted); font-size: 11px; }
.clip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.clip-actions .wide { grid-column: 1 / -1; }
.metric-entry { display: flex; gap: 6px; margin-top: 9px; }
.metric-entry input { min-width: 0; padding: 8px; }
.publication-list { display: grid; gap: 5px; margin: 12px 0 0; font-size: 11px; }
.publication-list a { color: var(--lime); }

.event-list { display: grid; }
.event { display: grid; grid-template-columns: 145px 150px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.event time, .event code { color: var(--muted); }
.empty-state { padding: 35px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
footer { padding: 30px; color: #6f766a; text-align: center; font-size: 11px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 400px; padding: 13px 17px; color: #111; background: var(--lime); border-radius: 10px; font-weight: 700; transform: translateY(150%); transition: transform .25s ease; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.toast.show { transform: translateY(0); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 25px; }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 35px 100px rgba(0,0,0,.4); }
.login-card h1 { margin: 16px 0 6px; font-size: 48px; letter-spacing: -.06em; }
.login-card .muted { margin: 0 0 15px; }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .two-column { grid-template-columns: 1fr; }
  .integration-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  main { width: min(100% - 24px, 1480px); padding-top: 20px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-bottom: 38px; }
  .hero h1 { font-size: 48px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .integration-list { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .campaign-item { grid-template-columns: 1fr; }
  .event { grid-template-columns: 1fr; gap: 2px; }
}
