*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --border: #e0e0e0;
  --text: #222222;
  --text-light: #666666;
  --accent: #e07c3a;
  --accent-hover: #c96a2c;
  --green: #2e7d4f;
  --green-light: #e8f5ee;
  --yellow: #c8860a;
  --yellow-light: #fff8e6;
  --red: #c0392b;
  --red-light: #fdeaea;
  --sidebar-w: 220px;
  --topbar-h: 56px;
}

body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 13px; }

/* ── Login ── */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 36px;
  width: 100%; max-width: 380px;
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand h1 { font-size: 18px; font-weight: 600; }
.login-brand p { color: var(--text-light); font-size: 12px; margin-top: 4px; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.form-field input, .form-field select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: inherit; background: var(--surface);
}
.form-field input:focus { outline: none; border-color: var(--accent); }
.form-error { color: var(--red); font-size: 12px; margin-bottom: 10px; min-height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e8e8e8; }
.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.login-alt { text-align: center; margin-top: 20px; font-size: 12px; color: var(--text-light); }
.login-alt a { color: var(--accent); text-decoration: none; }

/* ── App layout ── */
.app { display: flex; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }

/* ── Sidebar ── */
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-brand { padding: 20px 16px 16px; border-bottom: 1px solid var(--border); }
.sidebar-brand h2 { font-size: 14px; font-weight: 600; }
.sidebar-brand span { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-nav { flex: 1; padding: 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: var(--text-light); text-decoration: none; font-size: 13px; font-weight: 500; transition: background 0.15s, color 0.15s; }
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-icon { font-size: 14px; width: 18px; text-align: center; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.sidebar-email { font-size: 11px; color: var(--text-light); margin-bottom: 8px; word-break: break-all; }

/* ── Main ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.topbar h1 { font-size: 15px; font-weight: 600; }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Stats ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.stat-value { font-size: 22px; font-weight: 600; color: var(--text); }
.stat-value.stat-green { color: var(--green); }
.stat-value.stat-yellow { color: var(--yellow); }
.stat-label { font-size: 11px; color: var(--text-light); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 13px; }
.data-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-light); border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-active, .badge-approved { background: var(--green-light); color: var(--green); }
.badge-pending, .badge-draft { background: var(--yellow-light); color: var(--yellow); }
.badge-rejected, .badge-suspended, .badge-archived { background: var(--red-light); color: var(--red); }

/* ── Section header ── */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 14px; font-weight: 600; }

/* ── Profile ── */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.profile-card h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-light); margin-bottom: 14px; }
.profile-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.profile-row:last-child { border-bottom: none; }
.profile-row span:first-child { color: var(--text-light); }
.profile-row span:last-child { font-weight: 500; text-align: right; }

/* ── Misc ── */
.empty { color: var(--text-light); font-size: 13px; padding: 24px 0; }
.empty a { color: var(--accent); text-decoration: none; }
.loading { color: var(--text-light); font-size: 13px; padding: 40px 0; text-align: center; }
.error-msg { color: var(--red); font-size: 13px; margin-bottom: 16px; }
.alert { padding: 12px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.alert-yellow { background: var(--yellow-light); border: 1px solid var(--yellow); color: var(--yellow); }
