:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #06b6d4;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --bg-light: #f4f6fb;
  --sidebar-bg: #1e1b4b;
  --sidebar-hover: #312e81;
  --text-dark: #1f2937;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ---------- Public / Frontend ---------- */
.navbar-brand-logo { font-weight: 700; font-size: 1.4rem; color: var(--primary) !important; }
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 90px 0;
}
.hero-section h1 { font-weight: 800; font-size: 2.6rem; }
.card-feature {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transition: transform .2s ease;
}
.card-feature:hover { transform: translateY(-6px); }

/* ---------- Auth Pages ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}
.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-card h3 { font-weight: 700; margin-bottom: 5px; }
.auth-card .form-control { border-radius: 8px; padding: 10px 14px; }
.btn-primary-custom {
  background: var(--primary);
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  color: #fff;
}
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Dashboard Layout ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: #e0e7ff;
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
  overflow-y: auto;
  transition: all .3s ease;
  z-index: 1000;
}
.sidebar .brand {
  padding: 20px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar .nav-link {
  color: #c7d2fe;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .93rem;
  border-radius: 0;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
  background: var(--sidebar-hover);
  color: #fff;
  border-left: 3px solid var(--secondary);
}
.sidebar .nav-section-title {
  padding: 15px 22px 5px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #818cf8;
}

.main-content { margin-left: 260px; width: calc(100% - 260px); padding: 0; }

.topbar {
  background: #fff;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 900;
}
.topbar .page-title { font-weight: 700; font-size: 1.2rem; }

.content-area { padding: 26px; }

.stat-card {
  border: none;
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.stat-card.blue { background: linear-gradient(135deg,#4f46e5,#6366f1); }
.stat-card.green { background: linear-gradient(135deg,#16a34a,#22c55e); }
.stat-card.orange { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.stat-card.red { background: linear-gradient(135deg,#dc2626,#ef4444); }
.stat-card h2 { font-weight: 800; margin: 5px 0; }
.stat-card small { opacity: .9; }

.card-panel {
  background: #fff;
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.card-panel .card-header {
  background: transparent;
  border-bottom: 1px solid #eef0f6;
  font-weight: 700;
  padding: 18px 20px;
}

.table thead th {
  background: #f8f9fc;
  font-size: .8rem;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 2px solid #eef0f6;
}

.badge-status-active { background: #dcfce7; color: #166534; }
.badge-status-inactive { background: #fee2e2; color: #991b1b; }
.badge-status-pending { background: #fef3c7; color: #92400e; }

@media (max-width: 992px) {
  .sidebar { left: -260px; }
  .sidebar.show { left: 0; }
  .main-content { margin-left: 0; width: 100%; }
}
