:root {
    --bg: #f7f9fc;
    --card: #ffffff;
    --line: #d8e0ea;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #0f172a;
    --primary-soft: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --warning-bg: #fff7ed;
    --warning-line: #fdba74;
    --success-bg: #ecfdf5;
    --success-line: #86efac;
    --error-bg: #fef2f2;
    --error-line: #fca5a5;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; }
select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; background: #fff; }
.page { max-width: 1200px; margin: 0 auto; padding: 32px 16px 48px; }
.page.narrow { max-width: 560px; }
.hero, .topbar { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 24px; }
.hero h1, .topbar h1 { margin: 0 0 8px; }
.hero p, .topbar p { margin: 0; color: var(--muted); }
.stats, .dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; }
.stats.stats-3 { grid-template-columns: repeat(3, minmax(140px, 1fr)); width: min(640px, 100%); }
.stat-card, .mini-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.stat-card span, .mini-card strong { display: block; color: var(--muted); font-size: 14px; }
.stat-card strong { display: block; margin-top: 6px; font-size: 24px; }
.dashboard-grid { margin-bottom: 24px; }
.grid.two { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
.grid.two.inner-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-layout { align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.form-grid, .stack { display: grid; gap: 16px; }
.gap-sm { gap: 10px; }
.gap-md { gap: 16px; }
label span { display: block; margin-bottom: 8px; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; background: #fff; }
textarea { resize: vertical; }
.checkline { display: flex; gap: 10px; align-items: center; }
.checkline input { width: auto; }
.checkline span { margin-bottom: 0; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 11px 16px; text-decoration: none; border: none; cursor: pointer; font-size: 15px; font-weight: 600; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--primary-soft); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.notice { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.notice.warning { background: var(--warning-bg); border-color: var(--warning-line); }
.notice.success { background: var(--success-bg); border-color: var(--success-line); }
.notice.error { background: var(--error-bg); border-color: var(--error-line); }
.toolbar, .inline-actions, .search-form, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar { justify-content: space-between; margin-bottom: 16px; }
.search-form input { min-width: 260px; }
.user-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; }
.user-header { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.user-header h3 { margin: 0 0 4px; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #e2e8f0; color: #334155; }
.details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; font-size: 14px; }
.notes-box, .log-entry { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.scrollable { max-height: 560px; overflow: auto; }
@media (max-width: 900px) {
  .grid.two, .hero, .topbar { grid-template-columns: 1fr; display: grid; }
  .stats, .grid.two.inner-grid, .details-grid, .dashboard-grid, .stats.stats-3 { grid-template-columns: 1fr; width: 100%; }
  .search-form input { min-width: 100%; }
}
