/* Vegas Legends Workspace - dark neon Vegas theme */
:root {
  --bg: #0b0714;
  --bg-2: #130b22;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #efeaff;
  --muted: #9d93b8;
  --gold: #f5c518;
  --purple: #a855f7;
  --pink: #ec4899;
  --green: #22c55e;
  --red: #ef4444;
  --glow-p: 0 0 24px rgba(168, 85, 247, 0.35);
  --glow-g: 0 0 24px rgba(245, 197, 24, 0.25);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(168, 85, 247, 0.12), transparent 60%),
    radial-gradient(900px 400px at 10% 110%, rgba(236, 72, 153, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---- splash / login ---- */
.boot-splash, .auth-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; gap: 14px; padding: 24px;
}
.splash-logo { font-size: 64px; filter: drop-shadow(var(--glow-g)); }
.splash-title { font-size: 28px; font-weight: 700; letter-spacing: 1px; }
.splash-title span { color: var(--gold); text-shadow: var(--glow-g); }
.splash-sub { color: var(--muted); font-size: 14px; }

.auth-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; width: 100%; max-width: 380px; backdrop-filter: blur(12px);
  box-shadow: var(--glow-p);
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; letter-spacing: 0.5px; text-transform: uppercase; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05); color: var(--text); font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--purple), var(--pink));
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--glow-p); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.gold { background: linear-gradient(135deg, #f5c518, #d97706); color: #1a1200; }
.btn.gold:hover { box-shadow: var(--glow-g); }
.btn.ghost { background: var(--panel-2); border: 1px solid var(--border); }
.btn.small { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn.wide { width: 100%; margin-top: 22px; }

/* ---- app layout ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; border-bottom: 1px solid var(--border);
  background: rgba(11, 7, 20, 0.7); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand .logo { font-size: 22px; filter: drop-shadow(var(--glow-g)); }
.brand span { color: var(--gold); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.user-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.page-title h2 { font-size: 22px; }
.page-title .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.tabs { display: flex; gap: 6px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.tab { padding: 10px 18px; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); text-shadow: var(--glow-g); }

/* ---- droplet cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(8px); transition: border-color 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.card:hover { border-color: rgba(168, 85, 247, 0.4); box-shadow: var(--glow-p); }
.card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card .icon { font-size: 30px; }
.card h3 { font-size: 16px; }
.card .meta { font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700; letter-spacing: 0.5px; }
.badge.running { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge.stopped { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.badge.starting { background: rgba(245, 197, 24, 0.15); color: var(--gold); }
.badge.error { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge.admin { background: rgba(245, 197, 24, 0.15); color: var(--gold); }
.badge.locked { background: rgba(236, 72, 153, 0.15); color: var(--pink); }

.card .row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.card .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.spec-chip { background: var(--panel-2); border-radius: 6px; padding: 2px 8px; font-size: 11px; }

/* ---- stats bars ---- */
.meter { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 4px; }
.meter > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--purple), var(--pink)); transition: width 0.4s; }
.meter.gold > div { background: linear-gradient(90deg, #f5c518, #d97706); }

/* ---- tables ---- */
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 12px 16px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- modal ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 2, 10, 0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: var(--glow-p); }
.modal h3 { margin-bottom: 18px; font-size: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---- stream view ---- */
.stream-view { display: flex; flex-direction: column; height: 100vh; }
.stream-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: rgba(11, 7, 20, 0.85); border-bottom: 1px solid var(--border); }
.stream-bar .left { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.stream-body { flex: 1; position: relative; background: #000; }
.stream-body canvas, .stream-body > div > canvas { width: 100%; height: 100%; display: block; }

.lock-overlay {
  position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: rgba(11, 7, 20, 0.92); backdrop-filter: blur(8px);
}
.lock-overlay .lock-icon { font-size: 54px; }
.lock-overlay p { color: var(--muted); font-size: 14px; }
.lock-overlay input { max-width: 200px; text-align: center; font-size: 22px; letter-spacing: 8px; }

/* ---- toasts ---- */
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { padding: 12px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; color: #fff; background: var(--bg-2); border: 1px solid var(--border); box-shadow: var(--glow-p); animation: slidein 0.25s ease; }
.toast.success { border-color: rgba(34, 197, 94, 0.5); }
.toast.error { border-color: rgba(239, 68, 68, 0.5); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- misc ---- */
.docker-banner { padding: 10px 18px; background: rgba(245, 197, 24, 0.1); border: 1px solid rgba(245, 197, 24, 0.3); color: var(--gold); border-radius: 10px; font-size: 13px; margin-bottom: 18px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 14px; }
.empty .big { font-size: 42px; margin-bottom: 12px; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 10px; }
.qr-wrap img { border-radius: 10px; width: 180px; height: 180px; background: #fff; padding: 8px; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.hidden { display: none !important; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }