/* Roostr app — dark theme matching roostrmusic.com */
:root {
  --bg: #0d0f14;
  --panel: #161a22;
  --panel-2: #1d222d;
  --line: #2a303d;
  --text: #eef1f6;
  --muted: #9aa5b5;
  --accent: #ffb020;
  --accent-2: #ff7847;
  --good: #3ddc84;
  --bad: #ff5d5d;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
.hidden { display: none !important; }

.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 20px; font-weight: 800; color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 600;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: #14100a; background: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-email { color: var(--muted); font-size: 13px; }
.badge {
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--line);
}
.badge.pro { background: var(--accent); color: #14100a; border-color: var(--accent); }

.container { width: min(1080px, 100%); margin: 0 auto; padding: 28px 20px 48px; flex: 1; }
.footer {
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
  padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

h1 { font-size: 28px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 28px 0 10px; }
.sub { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: none; }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 9px 16px; border-radius: 9px; font-weight: 700; cursor: pointer; font-size: 14px;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #14100a; }
.btn-primary:hover { background: #ffc14d; }
.btn-danger { color: var(--bad); }
.btn-ghost { background: transparent; }
.btn-small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }

form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input, select, textarea {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font-size: 14px; width: 100%;
}
.field { margin-bottom: 12px; min-width: 160px; }
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-wrap .card { padding: 28px; }

.alert-flag { color: var(--accent-2); font-weight: 800; }
.vel-pos { color: var(--good); font-weight: 700; }
.vel-neg { color: var(--bad); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.usage-bar { background: var(--bg); border-radius: 999px; height: 10px; overflow: hidden; margin: 6px 0 14px; }
.usage-bar > div { background: var(--accent); height: 100%; }
.usage-bar.full > div { background: var(--bad); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 10px; z-index: 50; max-width: min(560px, 92vw);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 14px;
}
.toast.error { border-color: var(--bad); }

.pill {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
details.snapshot-history { margin-top: 8px; }
details.snapshot-history summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
