/* ===========================
   SKYGUARD - Design System
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --bg-dark: #0a0e17;
  --bg-card: #0f1520;
  --bg-panel: #131a27;
  --border: rgba(99, 179, 237, 0.12);
  --border-hover: rgba(99, 179, 237, 0.3);
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --accent-glow: rgba(56, 189, 248, 0.35);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --text-primary: #e8f0fe;
  --text-secondary: #7c93b4;
  --text-muted: #3d5068;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 40px rgba(56, 189, 248, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* ---- LAYOUT ---- */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0; left: 0;
  z-index: 100;
  transition: var(--transition);
}

.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  background: var(--bg-dark);
}

/* ---- LOGO ---- */
.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 52px; height: 44px;
  background: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---- NAV ---- */
.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 12px 6px;
  font-family: var(--font-display);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  font-size: 17px;
  width: 20px;
  min-width: 20px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- SIDEBAR BOTTOM ---- */
.sidebar-bottom {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--bg-panel);
  cursor: pointer;
  transition: var(--transition);
}

.user-chip:hover { background: var(--accent-dim); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ---- TOP BAR ---- */
.topbar {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.topbar-badge {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 17px;
  transition: var(--transition);
}

.topbar-badge:hover { border-color: var(--accent); color: var(--accent); }

.badge-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
}

/* ---- PAGE CONTENT ---- */
.page { padding: 32px; }
.page-header { margin-bottom: 28px; }
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.page-subtitle { color: var(--text-secondary); font-size: 14px; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-accent); }

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.07;
  transform: translate(20px, -20px);
}

.stat-card.co2::after { background: var(--accent); }
.stat-card.tvoc::after { background: var(--success); }
.stat-card.devices::after { background: var(--warning); }
.stat-card.alerts::after { background: var(--danger); }

.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  line-height: 1;
  margin-bottom: 14px;
}

.stat-card.co2 .stat-icon { background: var(--accent-dim); }
.stat-card.tvoc .stat-icon { background: rgba(52,211,153,0.12); }
.stat-card.devices .stat-icon { background: rgba(251,191,36,0.12); }
.stat-card.alerts .stat-icon { background: rgba(248,113,113,0.12); }

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-unit { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 6px;
}

.stat-trend.up { background: rgba(52,211,153,0.12); color: var(--success); }
.stat-trend.down { background: rgba(248,113,113,0.12); color: var(--danger); }

/* ---- AQI GAUGE ---- */
.aqi-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
}

.gauge-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0%, var(--accent) 65%, var(--bg-panel) 65%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.gauge-inner {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-val { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--accent); line-height: 1; }
.gauge-unit { font-size: 9px; color: var(--text-muted); }

/* ---- QUALITY BAR ---- */
.quality-bar-wrap { margin-top: 8px; }
.quality-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.quality-bar-track { height: 6px; background: var(--bg-panel); border-radius: 3px; overflow: hidden; }
.quality-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.quality-bar-fill.good { background: linear-gradient(90deg, var(--success), #86efac); }
.quality-bar-fill.moderate { background: linear-gradient(90deg, var(--warning), #fde68a); }
.quality-bar-fill.poor { background: linear-gradient(90deg, var(--danger), #fca5a5); }

/* ---- STATUS BADGE ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.status-badge.online { background: rgba(52,211,153,0.12); color: var(--success); }
.status-badge.offline { background: rgba(248,113,113,0.12); color: var(--danger); }
.status-badge.warning { background: rgba(251,191,36,0.12); color: var(--warning); }
.status-badge.admin { background: var(--accent-dim); color: var(--accent); }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }

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

thead tr {
  border-bottom: 1px solid var(--border);
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-family: var(--font-display);
}

tbody tr {
  border-bottom: 1px solid rgba(99,179,237,0.06);
  transition: var(--transition);
}

tbody tr:hover { background: rgba(56,189,248,0.04); }

tbody td {
  padding: 13px 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

tbody td:first-child { color: var(--text-primary); font-weight: 500; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-body);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0e17;
  font-weight: 600;
}

.btn-primary:hover {
  background: #7dd3fc;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.2);
  color: var(--danger);
}

.btn-danger:hover { background: rgba(248,113,113,0.2); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}

.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
option { background: var(--bg-panel); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 500px;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}

.modal-close:hover { border-color: var(--danger); color: var(--danger); }

/* ---- GRIDS ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ---- DEVICE CARD ---- */
.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.device-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}

.device-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

.device-card:hover::before { opacity: 1; }

.device-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.device-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.device-location { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.device-readings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.reading-box {
  background: var(--bg-panel);
  border-radius: 9px;
  padding: 12px;
}

.reading-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }

.reading-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-top: 3px;
}

.reading-value.co2 { color: var(--accent); }
.reading-value.tvoc { color: var(--success); }
.reading-unit { font-size: 11px; color: var(--text-muted); margin-left: 2px; font-weight: 400; }

/* ---- ALERTS ---- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.alert.info { background: var(--accent-dim); border: 1px solid rgba(56,189,248,0.2); color: var(--accent); }
.alert.success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: var(--success); }
.alert.warning { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.2); color: var(--warning); }
.alert.danger { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.2); color: var(--danger); }

/* ---- CHART PLACEHOLDER ---- */
.chart-area {
  height: 200px;
  background: var(--bg-panel);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 8px 8px;
  gap: 4px;
}

/* ---- LIVE INDICATOR ---- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}

/* ---- MQTT STATUS ---- */
.mqtt-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---- TOAST ---- */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
  min-width: 260px;
  box-shadow: var(--shadow);
}

@keyframes toast-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(56,189,248,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(14,165,233,0.06) 0%, transparent 60%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 40px;
  width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

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

.login-logo-icon {
  width: 72px; height: 72px;
  background: #fff;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 0 40px var(--accent-glow);
  overflow: hidden;
}
.login-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.login-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ---- LANDING PAGE ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 70% 50%, rgba(56,189,248,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 15% 30%, rgba(14,165,233,0.05) 0%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title span { color: var(--accent); }

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
}

.hero-device-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), var(--shadow-accent);
}

.floating-chip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---- RESPONSIVE ---- */
/* ---- HAMBURGER BUTTON ---- */
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- SIDEBAR OVERLAY (mobile) ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-260px); z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 80px 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .page { padding: 20px; }
  .hamburger-btn { display: flex; }
}

/* ---- ANIMATIONS ---- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fade-up 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ---- MISC ---- */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.font-display { font-family: var(--font-display); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.hidden { display: none !important; }

/* ---- PROFILE ---- */
.profile-banner {
  height: 120px;
  background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(14,165,233,0.1));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}

.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 26px;
  font-family: var(--font-display);
  border: 4px solid var(--bg-card);
  position: absolute;
  bottom: -36px;
  left: 24px;
}

.profile-info { padding: 50px 24px 24px; }
.profile-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.profile-email { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
