:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-text: #cbd5e1;
}

html, body { height: 100%; }
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

/* Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sidebar-nav { padding: 10px 0; flex: 1; }
.sidebar-section { padding: 8px 20px 4px; font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.sidebar a.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 20px; color: var(--sidebar-text);
  text-decoration: none; font-size: 14px;
  border-left: 3px solid transparent;
}
.sidebar a.nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar a.nav-link.active {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--primary);
}
.sidebar a.nav-link i { width: 18px; font-size: 16px; }
.sidebar .badge { margin-left: auto; }

.main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.topbar {
  background: #fff; padding: 10px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; }
.topbar .user-chip {
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.content-wrap { padding: 24px; }

/* Cards / utilities */
.card { border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.card-stat .value { font-size: 28px; font-weight: 700; }
.card-stat .label { color: #64748b; font-size: 13px; }
.card-stat .icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }

/* Tables */
.table thead { background: #f8fafc; }
.table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

.badge-soft-success { background: #d1fae5; color: #065f46; }
.badge-soft-danger  { background: #fee2e2; color: #991b1b; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-info    { background: #dbeafe; color: #1e40af; }
.badge-soft-primary { background: #e0f2fe; color: #075985; }
.badge-soft-secondary { background: #e2e8f0; color: #334155; }

/* Login */
.login-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 20px; padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  width: 100%; max-width: 900px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
}
.login-left h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.login-left .subtitle { color: #64748b; margin-bottom: 24px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.quick-btn {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 12px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; text-decoration: none; color: #1e293b;
  font-size: 13px; font-weight: 500;
  transition: all 0.2s;
}
.quick-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0,0,0,0.07); border-color: var(--primary); color: #1e293b; }
.quick-btn .icon-wrap {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.quick-btn small { display: block; color: #64748b; font-weight: 400; font-size: 11px; }

@media (max-width: 768px) {
  .login-card { grid-template-columns: 1fr; padding: 24px; }
  .sidebar { display: none; }
}

/* Print */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .content-wrap { padding: 0; }
  body { background: #fff; }
}

/* Misc */
.kg-bird {
  width: 80px; height: 80px; border-radius: 20px;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 40px;
}
.gender-male { color: #2563eb; }
.gender-female { color: #db2777; }

.stat-tile {
  padding: 18px 20px; border-radius: 14px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.stat-tile .value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-tile .label { opacity: 0.85; font-size: 13px; }
.stat-tile i { font-size: 36px; opacity: 0.7; }

.bg-grad-1 { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.bg-grad-2 { background: linear-gradient(135deg, #10b981, #047857); }
.bg-grad-3 { background: linear-gradient(135deg, #f59e0b, #b45309); }
.bg-grad-4 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bg-grad-5 { background: linear-gradient(135deg, #ec4899, #be185d); }
.bg-grad-6 { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.kid-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px;
}
