:root {
  --bg: #0a0a0c;
  --bg-soft: #131316;
  --panel: #19191d;
  --panel-border: #2c2c31;
  --text: #f2f2f3;
  --text-dim: #93939a;
  --accent: #ffcc00;
  --accent2: #c7c7ce;
  --accent-ink: #17170f;
  --accent-grad: linear-gradient(135deg, #ffe066, #ffb200);
  --success: #22c55e;
  --warn: #ff8a00;
  --danger: #ef4444;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; background: var(--bg-soft); border-right: 1px solid var(--panel-border);
  display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 22px; }
.brand-logo { height: 36px; width: auto; display: block; }
.brand-text { font-weight: 700; font-size: 16px; }
.brand-text span { color: var(--accent); }
nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
}
nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
nav a:hover { background: rgba(255, 204, 0, 0.1); color: var(--text); }
nav a.active { background: var(--accent-grad); color: var(--accent-ink); font-weight: 700; }
.sidebar-footer { border-top: 1px solid var(--panel-border); padding-top: 14px; margin-top: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent-ink);
}
.admin-name { font-size: 13px; font-weight: 600; }
.status-line { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 5px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.logout-link { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 13px; color: var(--text-dim); }
.logout-link:hover { color: var(--danger); }
.logout-link svg { width: 16px; height: 16px; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 28px;
  border-bottom: 1px solid var(--panel-border); background: var(--bg-soft);
}
.topbar-left h1 { margin: 0; font-size: 19px; }
.topbar-left p { margin: 2px 0 0; font-size: 13px; color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--accent-ink);
}
.menu-toggle { display: none; background: none; border: none; color: var(--text); padding: 6px; margin-right: 8px; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }
.sidebar-overlay { display: none; }
.content-inner { padding: 24px 28px; flex: 1; }
.app-footer { padding: 18px 28px; font-size: 12px; color: var(--text-dim); text-align: center; }

/* Panels & forms */
.panel {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.panel h2 { margin: 0 0 14px; font-size: 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 180px; margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--panel-border); border-radius: 9px;
  padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-grad); color: var(--accent-ink);
  border: none; padding: 10px 18px; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--bg-soft); border: 1px solid var(--panel-border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--panel-border); }
th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-aktif, .badge-paid { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-nonaktif, .badge-cancelled { background: rgba(148, 148, 168, 0.15); color: var(--text-dim); }
.badge-unpaid, .badge-overdue { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-dp_paid { background: rgba(245, 158, 11, 0.15); color: var(--warn); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: rgba(34, 197, 94, 0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.alert-error { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px; }
.stat-card .num { font-size: 26px; font-weight: 800; margin: 4px 0; }
.stat-card .label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; }

/* Public schedule page */
.public-header {
  padding: 60px 24px 40px; text-align: center; background: radial-gradient(ellipse at top, rgba(255,204,0,0.16), transparent 60%);
}
.public-header .brand-logo { margin: 0 auto 18px; height: 72px; }
.public-header h1 { margin: 0 0 8px; font-size: 30px; }
.public-header p { color: var(--text-dim); margin: 0; max-width: 480px; margin-inline: auto; }
.public-wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 60px; }
.day-block { margin-bottom: 28px; }
.day-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--panel-border);
}
.show-card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px; display: flex; gap: 16px; align-items: flex-start;
}
.show-time {
  flex-shrink: 0; width: 96px; font-weight: 700; font-size: 14px; color: var(--accent2);
}
.show-info h3 { margin: 0 0 4px; font-size: 16px; }
.show-info .penyiar { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.show-info .genre { display: inline-block; font-size: 11px; background: rgba(199,199,206,0.14); color: var(--accent2); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.show-info p.desc { font-size: 13px; color: var(--text-dim); margin: 6px 0 0; }
.show-info a.stream-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent); font-size: 13px; font-weight: 600; }
.empty-state { text-align: center; color: var(--text-dim); padding: 60px 20px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 34px; width: 100%; max-width: 360px; }
.login-card .brand { justify-content: center; padding-bottom: 24px; }

/* Invoice print */
.invoice-box { max-width: 720px; margin: 0 auto; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 36px; }
.invoice-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.invoice-meta { text-align: right; font-size: 13px; color: var(--text-dim); }
.invoice-meta strong { color: var(--text); font-size: 16px; }
.invoice-parties { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.invoice-parties .col { font-size: 13px; }
.invoice-parties .col-label { color: var(--text-dim); text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; margin-bottom: 4px; }
.invoice-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.invoice-table th, .invoice-table td { padding: 10px 0; border-bottom: 1px solid var(--panel-border); font-size: 13px; text-align: left; }
.invoice-table .amount-col { text-align: right; }
.invoice-total-row td { font-weight: 800; font-size: 15px; border-bottom: none; padding-top: 14px; }
.print-actions { text-align: center; margin: 22px 0; }
@media print {
  .sidebar, .topbar, .print-actions, .app-footer { display: none !important; }
  body { background: #fff; color: #000; }
  .invoice-box { border: none; box-shadow: none; }
}

/* Responsive */
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: -260px; top: 0; z-index: 40; transition: left 0.2s ease; box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 30; }
  .sidebar-overlay.show { display: block; }
  .menu-toggle { display: inline-flex; }
  .content-inner { padding: 18px 16px; }
  .topbar { padding: 14px 16px; }
  .show-card { flex-direction: column; }
  .show-time { width: auto; }
}
