:root {
  --bg-primary: #0f172a;
  --bg-secondary: #111827;
  --card-bg: rgba(17, 24, 39, 0.88);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top left, #1e293b, transparent 40%),
              radial-gradient(circle at bottom right, #0f766e, transparent 30%),
              linear-gradient(135deg, #020617, #0f172a);
}
a { color: #93c5fd; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; min-height: 100vh; padding: 24px 18px;
  background: rgba(15, 23, 42, 0.96);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 32px;
  color: var(--text-primary); text-decoration: none; font-weight: 800;
}
.brand-mark {
  display: grid; place-items: center; width: 48px; height: 42px;
  border-radius: 12px; background: linear-gradient(135deg, #38bdf8, #2563eb);
}
.sidebar-menu { display: flex; flex-direction: column; gap: 10px; }
.sidebar-menu a {
  padding: 13px 15px; border-radius: 13px; color: #cbd5e1; text-decoration: none;
}
.sidebar-menu a:hover, .sidebar-menu a.active { background: rgba(37, 99, 235, .20); color: #fff; }
.main-content { flex: 1; min-width: 0; padding: 30px; overflow-x: auto; }
.page-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.page-header h1 { margin: 0; font-size: 30px; letter-spacing: -.6px; }
.page-header p, .muted-text { color: var(--text-secondary); }
.card {
  margin-bottom: 18px; padding: 22px; border: 1px solid rgba(148, 163, 184, .14);
  border-radius: var(--radius); background: rgba(15, 23, 42, .82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-line { min-width: 0; margin-bottom: 16px; }
.form-line.wide { grid-column: 1 / -1; }
.form-line label { display: block; margin-bottom: 8px; color: #dbeafe; font-weight: 700; }
.form-line input, .form-line textarea {
  width: 100%; padding: 12px 13px; border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px; outline: none; background: rgba(2, 6, 23, .48); color: #fff;
}
.form-line input:focus, .form-line textarea:focus { border-color: #38bdf8; box-shadow: 0 0 0 4px rgba(56, 189, 248, .10); }
.form-line textarea { min-height: 105px; resize: vertical; }
.btn-primary-dashboard, .btn-secondary-dashboard {
  display: inline-block; padding: 12px 17px; border: 0; border-radius: 13px;
  font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn-primary-dashboard { color: #fff; background: linear-gradient(135deg, #38bdf8, #2563eb); }
.btn-secondary-dashboard { color: #e2e8f0; background: rgba(148, 163, 184, .12); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border-color); text-align: left; }
th { color: #bfdbfe; font-size: 13px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.actions form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; color: #93c5fd; font: inherit; text-decoration: underline; cursor: pointer; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.alert-error { border: 1px solid rgba(239, 68, 68, .35); background: rgba(127, 29, 29, .24); color: #fecaca; }
.alert-success { border: 1px solid rgba(16, 185, 129, .35); background: rgba(6, 78, 59, .24); color: #a7f3d0; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(100%, 440px); }
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; min-height: auto; }
  .sidebar-menu { flex-direction: row; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-line.wide { grid-column: auto; }
  .main-content { padding: 20px; }
}
