
:root {
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #18181b;
  --muted: #6b7280;
  --border: #e4e4e7;
  --accent: #cc2200;
  --accent-dark: #991b1b;
  --dark: #18181b;
  --ok: #15803d;
  --warn: #b45309;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: #18181b; }
.login-card { width: 100%; max-width: 380px; background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.35); }
.login-card h1 { margin: 0 0 6px; font-size: 20px; }
.login-card p { margin: 0 0 18px; color: var(--muted); }

/* App Shell */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--dark); color: #fff; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 3px solid var(--accent); }
.topbar-brand { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-pill { background: #27272a; border: 1px solid #3f3f46; padding: 4px 10px; border-radius: 999px; font-size: 12px; color: #e4e4e7; }

.shell { display: flex; min-height: calc(100vh - 50px); }
.nav-sidebar { width: 220px; background: #fff; border-right: 1px solid var(--border); padding: 12px 8px; flex-shrink: 0; }
.nav-btn { width: 100%; text-align: left; background: transparent; border: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #3f3f46; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.nav-btn:hover { background: #f4f4f5; }
.nav-btn.active { background: #fef2f2; color: var(--accent); }
.content { flex: 1; padding: 18px; max-width: 1280px; padding-bottom: 84px; }

/* Components */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.card h2, .card h3 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--accent); }
.stat-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }

label { display: block; font-size: 12px; font-weight: 600; color: #3f3f46; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d4d4d8; border-radius: 7px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #fca5a5; border-color: var(--accent); }

.btn { padding: 8px 13px; border-radius: 7px; border: 1px solid #d4d4d8; background: #fff; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: #f4f4f5; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: #27272a; color: #fff; border-color: #27272a; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #f4f4f5; color: #3f3f46; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-green { background: #dcfce7; color: #15803d; }

.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: #fafafa; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tab-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.tab-btn.active { background: #18181b; color: #fff; }

.setlist-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; margin-bottom: 6px; background: #fff; }
.setlist-item.is-snippet { margin-left: 22px; background: #fafafa; border-style: dashed; }
.encore-sep { background: #fef2f2; color: var(--accent); font-weight: 700; padding: 5px 10px; border-radius: 6px; margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; }
.preview-box { background: #fafafa; border: 1px solid var(--border); padding: 12px; border-radius: 8px; font-family: Verdana, sans-serif; font-size: 13px; line-height: 1.6; }

.toast { position: fixed; top: 62px; right: 16px; z-index: 90; background: #18181b; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.25); font-weight: 600; }

/* Mobile Bottom Nav */
.bottom-nav { display: none; }
@media (max-width: 820px) {
  .nav-sidebar { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px !important; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--border); justify-content: space-around; padding: 6px 2px;
  }
  .bottom-nav button {
    flex: 1; background: none; border: none; padding: 6px 2px; font-size: 11px; font-weight: 700;
    color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  }
  .bottom-nav button.active { color: var(--accent); }
}
