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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f3f4f6;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #2563eb;
  --white: #ffffff;
  --radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Auth ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  padding: 40px 36px;
  width: 380px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.auth-logo p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: var(--primary);
}

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.alert {
  padding: 11px 13px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* ── Dashboard layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 0;
  bottom: 0;
}

.sidebar-logo {
  padding: 0 20px 24px;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}

.sidebar nav a {
  display: block;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.1s, color 0.1s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border-left-color: var(--sidebar-active);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
}

.sidebar-footer button {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 13px;
  cursor: pointer;
}

.main {
  margin-left: 220px;
  flex: 1;
  padding: 32px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ── Cards / Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.stat-card .value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Table ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-blocked { background: #fef2f2; color: var(--danger); }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn-approve { background: #dcfce7; color: #166534; }
.btn-approve:hover { background: #bbf7d0; }
.btn-block { background: #fef2f2; color: var(--danger); }
.btn-block:hover { background: #fecaca; }

.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}
