/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f1117; color: #e0e0e0; min-height: 100vh; }

/* ── Utilities ────────────────────────────────────────────────── */
.hidden { display: none !important; }
.error { color: #ff6b6b; font-size: 0.85rem; margin-top: 8px; }
.btn-primary { background: #f97316; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 0.95rem; font-weight: 600; width: 100%; margin-top: 8px; }
.btn-primary:hover { background: #ea6c0a; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; border-radius: 4px; border: none; cursor: pointer; font-weight: 600; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-success { background: #22c55e; color: #fff; }
.btn-secondary { background: #3f3f46; color: #e0e0e0; }

/* ── Login ────────────────────────────────────────────────────── */
#login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #1c1f26; padding: 40px; border-radius: 12px; width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.login-box h1 { font-size: 1.5rem; color: #f97316; margin-bottom: 4px; }
.login-box .subtitle { color: #6b7280; margin-bottom: 24px; font-size: 0.9rem; }
.login-box input { width: 100%; padding: 10px 12px; background: #0f1117; border: 1px solid #3f3f46; border-radius: 6px; color: #e0e0e0; font-size: 0.95rem; margin-bottom: 12px; }
.login-box input:focus { outline: none; border-color: #f97316; }

/* ── Layout ───────────────────────────────────────────────────── */
#main-screen { display: flex; min-height: 100vh; }
#sidebar { width: 220px; background: #1c1f26; display: flex; flex-direction: column; flex-shrink: 0; }
.nav-header { padding: 20px 16px; font-size: 1.1rem; font-weight: 700; color: #f97316; border-bottom: 1px solid #2d2f36; }
#sidebar ul { list-style: none; padding: 12px 0; flex: 1; }
#sidebar ul li a { display: block; padding: 10px 16px; color: #9ca3af; text-decoration: none; font-size: 0.9rem; border-radius: 6px; margin: 2px 8px; }
#sidebar ul li a:hover, #sidebar ul li a.active { background: #2d2f36; color: #f97316; }
.nav-footer { padding: 16px; border-top: 1px solid #2d2f36; }
.nav-footer button { width: 100%; background: #2d2f36; color: #9ca3af; border: none; padding: 8px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.nav-footer button:hover { background: #3f3f46; }
#content { flex: 1; padding: 28px; overflow-y: auto; }

/* ── Cards / Panels ───────────────────────────────────────────── */
.card { background: #1c1f26; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card h3 { font-size: 1rem; color: #f97316; margin-bottom: 12px; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat { background: #1c1f26; border-radius: 10px; padding: 20px 24px; flex: 1; min-width: 140px; }
.stat .value { font-size: 2rem; font-weight: 700; color: #f97316; }
.stat .label { font-size: 0.8rem; color: #6b7280; margin-top: 4px; }

/* ── Table ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 10px 12px; color: #6b7280; border-bottom: 1px solid #2d2f36; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
td { padding: 10px 12px; border-bottom: 1px solid #2d2f36; color: #d1d5db; }
tr:hover td { background: #252830; }

/* ── Forms (modal / inline) ───────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.8rem; color: #9ca3af; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 10px; background: #0f1117;
  border: 1px solid #3f3f46; border-radius: 6px; color: #e0e0e0; font-size: 0.9rem;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #f97316; }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #1c1f26; border-radius: 12px; padding: 28px; width: 440px; max-width: 95vw; }
.modal h2 { font-size: 1.1rem; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Badge ────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-active { background: #14532d; color: #4ade80; }
.badge-draft { background: #1e3a5f; color: #60a5fa; }
.badge-archived { background: #2d2f36; color: #6b7280; }
.badge-yes { background: #14532d; color: #4ade80; }
.badge-no { background: #450a0a; color: #f87171; }
.badge-pending { background: #2d2f36; color: #9ca3af; }

/* ── Page headings ────────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h2 { font-size: 1.3rem; }

/* ── Join page ────────────────────────────────────────────────── */
.join-container { max-width: 480px; margin: 40px auto; padding: 0 16px; }
.join-header { text-align: center; margin-bottom: 28px; }
.join-header h1 { font-size: 1.5rem; color: #f97316; }
.join-header p { color: #6b7280; margin-top: 6px; }
.success-box, .error-box { background: #1c1f26; border-radius: 12px; padding: 32px; text-align: center; }
.success-box h2 { color: #4ade80; margin-bottom: 10px; }
.error-box h2 { color: #f87171; margin-bottom: 10px; }
#register-form { background: #1c1f26; border-radius: 12px; padding: 24px; }
