/* assets/css/app.css - Ikigai Planner Premium Styles */

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

:root {
  --bg-primary: #020817;
  --bg-secondary: #0d1829;
  --bg-card: #0f1b2d;
  --bg-elevated: #162035;
  --border: #1e3048;
  --border-light: #243650;
  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.12);
  --emerald: #10b981;
  --emerald-dim: rgba(16,185,129,0.12);
  --blue: #3b82f6;
  --blue-dim: rgba(59,130,246,0.12);
  --rose: #f43f5e;
  --rose-dim: rgba(244,63,94,0.12);
  --violet: #8b5cf6;
  --violet-dim: rgba(139,92,246,0.12);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

html { height: 100%; font-size: 16px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── TYPOGRAPHY ────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; }
.label-sm { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); }

/* ─── LAYOUT ────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  transition: transform 0.3s ease;
  z-index: 100;
}
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.topbar {
  height: 64px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* ─── SIDEBAR LOGO ──────────────────────────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 2rem;
}
.sidebar-logo img { width: 36px; height: 36px; object-fit: contain; }
.sidebar-logo-text .app-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.sidebar-logo-text .app-tagline { font-size: 0.65rem; color: var(--amber); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; }

/* ─── NAV ITEMS ─────────────────────────────────────── */
.nav-section-label { padding: 0 0.75rem; margin-bottom: 0.5rem; margin-top: 1rem; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item.active { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.nav-item .nav-icon { width: 18px; flex-shrink: 0; }
.nav-item .nav-badge { margin-left: auto; background: var(--rose); color: #fff; font-size: 0.65rem; padding: 0.1rem 0.45rem; border-radius: 10px; font-weight: 700; }

/* ─── SIDEBAR FOOTER ────────────────────────────────── */
.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.user-chip:hover { background: var(--bg-elevated); }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}
.user-info .user-name { font-size: 0.85rem; font-weight: 600; }
.user-info .user-level { font-size: 0.7rem; color: var(--amber); font-family: var(--font-mono); }

/* ─── TOPBAR ────────────────────────────────────────── */
.topbar-title { font-size: 1.125rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  position: relative;
}
.icon-btn:hover { border-color: var(--amber); color: var(--amber); }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--rose); border-radius: 50%; border: 2px solid var(--bg-secondary); }
.mobile-menu-btn { display: none; }

/* ─── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header { margin-bottom: 1.25rem; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.25rem; }
.card-subtitle { font-size: 0.8rem; color: var(--text-secondary); }
.card-glow-amber { box-shadow: 0 0 60px rgba(245,158,11,0.06); }
.card-glow-emerald { box-shadow: 0 0 60px rgba(16,185,129,0.06); }

/* ─── GRID LAYOUTS ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* ─── STAT CARDS ────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.35rem; }
.stat-change { font-size: 0.7rem; font-family: var(--font-mono); margin-top: 0.5rem; }
.stat-change.up { color: var(--emerald); }
.stat-change.down { color: var(--rose); }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: var(--amber); color: #000; }
.btn-primary:hover { background: #fbbf24; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,158,11,0.3); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); }
.btn-danger { background: var(--rose-dim); color: var(--rose); border: 1px solid rgba(244,63,94,0.2); }
.btn-danger:hover { background: rgba(244,63,94,0.2); }
.btn-emerald { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.2); }
.btn-emerald:hover { background: rgba(16,185,129,0.2); }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.775rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ─── FORMS ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error { color: var(--rose); font-size: 0.775rem; margin-top: 0.35rem; }
.form-hint { color: var(--text-muted); font-size: 0.775rem; margin-top: 0.35rem; }

/* ─── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.badge-amber { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.badge-emerald { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.2); }
.badge-rose { background: var(--rose-dim); color: var(--rose); border: 1px solid rgba(244,63,94,0.2); }
.badge-violet { background: var(--violet-dim); color: var(--violet); border: 1px solid rgba(139,92,246,0.2); }
.badge-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.badge-muted { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }

/* ─── TASK ITEMS ────────────────────────────────────── */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  margin-bottom: 0.625rem;
}
.task-item:hover { border-color: var(--border-light); }
.task-item.done { opacity: 0.55; }
.task-checkbox {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  margin-top: 2px;
  background: transparent;
}
.task-checkbox.checked { background: var(--emerald); border-color: var(--emerald); }
.task-checkbox.ichiba { border-color: var(--amber); }
.task-checkbox.ichiba.checked { background: var(--amber); border-color: var(--amber); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 0.9rem; font-weight: 500; word-break: break-word; }
.task-title.done-text { text-decoration: line-through; color: var(--text-muted); }
.task-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; flex-wrap: wrap; }
.task-actions { display: flex; gap: 0.35rem; opacity: 0; transition: opacity var(--transition); flex-shrink: 0; }
.task-item:hover .task-actions { opacity: 1; }

/* ─── HABIT CARD ────────────────────────────────────── */
.habit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 0.875rem;
  transition: all var(--transition);
}
.habit-card:hover { border-color: var(--border-light); }
.habit-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.875rem; }
.habit-name { font-size: 1rem; font-weight: 600; }
.habit-streak { display: flex; align-items: center; gap: 0.35rem; font-family: var(--font-mono); font-size: 0.8rem; }
.habit-dots { display: flex; gap: 0.375rem; }
.habit-dot {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.habit-dot.done { background: var(--emerald-dim); border-color: rgba(16,185,129,0.4); color: var(--emerald); }
.habit-dot.today-dot { border-color: var(--amber); }
.habit-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.habit-btn {
  flex: 1; padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-align: center;
}
.habit-btn.active { background: var(--emerald-dim); color: var(--emerald); border-color: rgba(16,185,129,0.3); }
.habit-btn.full { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.3); }

/* ─── FOCUS TIMER ───────────────────────────────────── */
.timer-ring { position: relative; display: inline-block; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring .track { fill: none; stroke: var(--bg-elevated); stroke-width: 8; }
.timer-ring .progress { fill: none; stroke: var(--amber); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-display {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.timer-time { font-size: 3.5rem; font-weight: 700; font-family: var(--font-mono); line-height: 1; }
.timer-phase { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.25rem; }

/* ─── MODALS ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(2,8,23,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.2s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.modal-close:hover { border-color: var(--rose); color: var(--rose); }

/* ─── NOTIFICATIONS ─────────────────────────────────── */
.notif-panel {
  position: fixed; top: 64px; right: 0;
  width: 360px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.notif-panel.open { transform: translateX(0); }
.notif-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-item { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.notif-item:hover { background: var(--bg-elevated); }
.notif-item.unread { border-left: 3px solid var(--amber); }
.notif-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.notif-message { font-size: 0.8rem; color: var(--text-secondary); }
.notif-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.35rem; font-family: var(--font-mono); }

/* ─── PROGRESS / XP ─────────────────────────────────── */
.xp-bar { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.xp-fill { height: 100%; background: linear-gradient(90deg, var(--amber), var(--rose)); border-radius: 3px; transition: width 0.5s ease; }
.level-ring { position: relative; display: inline-block; }

/* ─── EISENHOWER MATRIX ──────────────────────────────── */
.matrix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.matrix-quadrant {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 180px;
}
.matrix-quadrant.ui { border-top: 3px solid var(--rose); }
.matrix-quadrant.in { border-top: 3px solid var(--amber); }
.matrix-quadrant.un { border-top: 3px solid var(--blue); }
.matrix-quadrant.nn { border-top: 3px solid var(--text-muted); }
.quadrant-label { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.quadrant-label.ui { color: var(--rose); }
.quadrant-label.in { color: var(--amber); }
.quadrant-label.un { color: var(--blue); }
.quadrant-label.nn { color: var(--text-muted); }

/* ─── TIME THIEF ─────────────────────────────────────── */
.thief-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.625rem;
  transition: all var(--transition);
}
.thief-card.blocked { opacity: 0.5; }
.thief-icon { font-size: 1.5rem; }
.thief-info { flex: 1; }
.thief-name { font-size: 0.9rem; font-weight: 600; }
.thief-time { font-size: 0.75rem; color: var(--rose); font-family: var(--font-mono); }

/* ─── TOGGLE ─────────────────────────────────────────── */
.toggle { position: relative; width: 44px; height: 24px; cursor: pointer; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition);
}
.toggle input:checked + .toggle-track { background: var(--emerald); border-color: var(--emerald); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* ─── ALERT / TOAST ─────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; pointer-events: none; }
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  white-space: nowrap;
}
.toast.success { border-color: rgba(16,185,129,0.4); color: var(--emerald); }
.toast.error { border-color: rgba(244,63,94,0.4); color: var(--rose); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-12px); } }

/* ─── REVIEW / JOURNAL ─────────────────────────────── */
.mood-picker { display: flex; gap: 0.75rem; }
.mood-btn { width: 48px; height: 48px; border-radius: var(--radius); background: var(--bg-elevated); border: 1px solid var(--border); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.mood-btn.selected { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); transform: scale(1.1); }

/* ─── ADMIN TABLE ───────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.data-table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.data-table tr:hover td { background: var(--bg-elevated); }
.data-table tr:last-child td { border-bottom: none; }

/* ─── SEARCH ─────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap .search-icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-input { padding-left: 2.5rem; }

/* ─── LANDING PAGE ──────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5vw;
  border-bottom: 1px solid var(--border);
  background: rgba(2,8,23,0.8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hero-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.hero-logo img { width: 40px; height: 40px; object-fit: contain; }
.hero-logo span { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.hero-nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.orb-1 { width: 600px; height: 600px; background: rgba(245,158,11,0.06); top: -200px; left: -200px; }
.orb-2 { width: 500px; height: 500px; background: rgba(16,185,129,0.05); bottom: -200px; right: -100px; }
.orb-3 { width: 400px; height: 400px; background: rgba(139,92,246,0.04); top: 50%; left: 50%; transform: translate(-50%,-50%); }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--amber-dim); border: 1px solid rgba(245,158,11,0.25); color: var(--amber); padding: 0.35rem 1rem; border-radius: 2rem; font-size: 0.8rem; font-weight: 600; margin-bottom: 2rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.hero-heading .highlight { background: linear-gradient(135deg, var(--amber), var(--rose)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--text-secondary); max-width: 560px; margin: 0 auto 2.5rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 5rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 60%, rgba(245,158,11,0.03)); pointer-events: none; }
.feature-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.principles-section { padding: 5rem 5vw; background: var(--bg-secondary); }
.principles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; max-width: 1200px; margin: 2rem auto 0; }
.principle-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.principle-num { font-size: 1.5rem; font-weight: 800; color: var(--amber); font-family: var(--font-mono); opacity: 0.6; margin-bottom: 0.5rem; }
.principle-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; }
.principle-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.cta-section { padding: 5rem 2rem; text-align: center; }
.footer { padding: 2rem 5vw; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-text { font-size: 0.8rem; color: var(--text-muted); }

/* ─── AUTH PAGES ─────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 2rem; }
.auth-logo img { width: 48px; height: 48px; object-fit: contain; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.35rem; }
.auth-sub { font-size: 0.875rem; color: var(--text-secondary); text-align: center; margin-bottom: 2rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.auth-footer { text-align: center; font-size: 0.875rem; color: var(--text-secondary); margin-top: 1.5rem; }
.auth-footer a { color: var(--amber); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.alert { padding: 0.875rem 1rem; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 1.25rem; }
.alert-error { background: var(--rose-dim); border: 1px solid rgba(244,63,94,0.25); color: #fca5a5; }
.alert-success { background: var(--emerald-dim); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }

/* ─── ONBOARDING ─────────────────────────────────────── */
.onboard-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: radial-gradient(ellipse at 20% 50%, rgba(245,158,11,0.06) 0%, transparent 60%), radial-gradient(ellipse at 80% 50%, rgba(16,185,129,0.04) 0%, transparent 60%), var(--bg-primary); }
.onboard-card { max-width: 580px; width: 100%; }
.onboard-step { display: none; }
.onboard-step.active { display: block; animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.onboard-prog { display: flex; gap: 0.5rem; margin-bottom: 2.5rem; }
.onboard-prog-dot { flex: 1; height: 3px; background: var(--border); border-radius: 2px; transition: background 0.3s; }
.onboard-prog-dot.active { background: var(--amber); }
.onboard-prog-dot.done { background: var(--emerald); }

/* ─── TABS (MOBILE NAV) ──────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
}
.mobile-nav-inner { display: flex; justify-content: space-around; }
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 0.65rem; font-weight: 600;
  cursor: pointer; transition: color var(--transition);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-family: var(--font-mono);
}
.mobile-nav-btn.active { color: var(--amber); }
.mobile-nav-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── STATS ─────────────────────────────────────────── */
.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--bg-elevated); border: 1px solid var(--border); cursor: default; transition: all var(--transition); }
.heat-cell.l1 { background: rgba(16,185,129,0.2); border-color: rgba(16,185,129,0.3); }
.heat-cell.l2 { background: rgba(16,185,129,0.4); border-color: rgba(16,185,129,0.5); }
.heat-cell.l3 { background: rgba(16,185,129,0.65); border-color: rgba(16,185,129,0.7); }
.heat-cell.l4 { background: rgba(16,185,129,0.9); border-color: var(--emerald); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.section-title { font-size: 1.25rem; font-weight: 600; }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.animate-pulse { animation: pulse 2s ease infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); z-index: 300; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 299; }
  .sidebar-overlay.open { display: block; }
  .mobile-menu-btn { display: flex; }
  .mobile-nav { display: block; }
  .content-area { padding: 1.25rem; padding-bottom: 6rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-features { grid-template-columns: 1fr; padding: 3rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .matrix-grid { grid-template-columns: 1fr; }
  .notif-panel { width: 100%; top: 64px; border-radius: 0; }
}
@media (min-width: 769px) {
  .mobile-nav { display: none; }
}
