/* AIVideoGen app + admin styles (login, app pages, /admin/) */
:root {
  --bg: #12101b; --panel: #1b1830; --panel2: #241f3d;
  --line: #322c52; --text: #e8e6f0; --dim: #9a93c0;
  --acc: #7c5cff; --acc2: #29d398; --bad: #ff5c7a; --warn: #ffb454;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text); margin: 0;
  font-family: system-ui, "Segoe UI", sans-serif; min-height: 100vh;
}
a { color: var(--acc); text-decoration: none; }
.topbar {
  display: flex; align-items: center; gap: 18px; padding: 10px 22px;
  background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav {
  padding: 7px 13px; border-radius: 8px; color: var(--dim);
  font-size: 14px; white-space: nowrap;
}
.nav:hover { background: var(--panel2); color: var(--text); }
.nav.active { background: var(--acc); color: #fff; }
.spacer { flex: 1; }
.page { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
h1 { font-size: 22px; margin: 4px 0 4px; }
h2 { font-size: 17px; margin: 22px 0 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
p.sub { color: var(--dim); margin: 0 0 22px; font-size: 14px; }
form, .panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
}
label { display: block; font-size: 13px; color: var(--dim); margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: 14px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--acc); }
button, .btn {
  display: inline-block; border: 0; cursor: pointer; font-size: 14px;
  background: var(--acc); color: #fff; padding: 9px 16px; border-radius: 8px;
}
button.ghost, .btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--dim); }
button.danger { background: var(--bad); }
button.small, .btn.small { padding: 4px 10px; font-size: 12.5px; }
button:disabled { opacity: .5; cursor: wait; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.35; }
.card .meta { color: var(--dim); font-size: 12.5px; margin-bottom: 10px; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.msg { padding: 10px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.msg.err { background: #3a1626; color: #ffb3c2; border: 1px solid #6e2440; }
.msg.ok  { background: #14322a; color: #8ef0c6; border: 1px solid #1f5c4a; }
.msg.info { background: #1d1836; color: #b9b1e8; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
tr:hover td { background: rgba(124, 92, 255, .06); }
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.pill.queued    { background: #2b2650; color: #b9b1e8; }
.pill.running   { background: #143a56; color: #7fd0ff; }
.pill.pausing   { background: #4a3414; color: #ffd394; }
.pill.paused    { background: #4a3414; color: #ffb454; }
.pill.completed { background: #14322a; color: #8ef0c6; }
.pill.failed    { background: #3a1626; color: #ffb3c2; }
.pill.cancelled { background: #333;    color: #aaa; }
.filterbar { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.filterbar button.on { outline: 2px solid var(--acc); }
video.output { width: 100%; max-width: 260px; border-radius: 10px; background: #000; }
.auth-wrap { max-width: 400px; margin: 9vh auto; padding: 0 18px; }
.auth-wrap .brand { text-align: center; display: block; font-size: 26px; margin-bottom: 18px; }
details pre {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; white-space: pre-wrap; font-size: 12.5px; color: var(--dim);
}
video.comp { width: 100%; max-width: 240px; border-radius: 10px; background: #000; }
