/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a12;
  --bg-card: #13131f;
  --bg-card-hover: #1a1a2e;
  --bg-input: #1a1a2e;
  --border: #2a2a3e;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.15);
  --accent-blue: #60a5fa;
  --accent-blue-dim: rgba(96, 165, 250, 0.15);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.15);
  --warning: #fbbf24;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-height: 72px;
  --header-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* ========== HEADER ========== */
#app-header, header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  height: var(--header-height);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.header-date {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ========== MAIN CONTENT ========== */
#main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
}

.view { display: none; padding: 16px 20px; animation: fadeIn 0.2s ease; }
.view.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

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

.view-header h2 { font-size: 20px; font-weight: 600; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary { background: var(--accent); color: #0a0a12; }
.btn-primary:hover { background: #6ee7a0; }
.btn-secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger-dim); color: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-icon {
  background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer; padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.btn-icon:hover { background: var(--bg-card-hover); }
.btn-back {
  background: none; border: none; color: var(--accent);
  font-size: 16px; font-weight: 600; cursor: pointer;
  padding: 0 0 12px; font-family: inherit;
}

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.card:active { transform: scale(0.98); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; font-family: 'JetBrains Mono', monospace;
}
.badge-green { background: var(--accent-dim); color: var(--accent); }
.badge-blue { background: var(--accent-blue-dim); color: var(--accent-blue); }
.badge-red { background: var(--danger-dim); color: var(--danger); }
.badge-yellow { background: rgba(251, 191, 36, 0.15); color: var(--warning); }

/* ========== TODAY VIEW ========== */
.today-list { padding-bottom: 16px; }

.timing-group { margin-bottom: 20px; }
.timing-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 8px;
  padding-left: 2px;
}

.today-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  margin-bottom: 8px; transition: all 0.3s ease;
}
.today-item.taken {
  opacity: 0.4; border-color: var(--accent);
  background: rgba(74, 222, 128, 0.05);
}

.check-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); background: none;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; color: transparent;
}
.check-btn:hover { border-color: var(--accent); }
.check-btn.checked {
  background: var(--accent); border-color: var(--accent); color: #0a0a12;
}

.today-item-info { flex: 1; }
.today-item-name { font-size: 14px; font-weight: 600; }
.today-item-detail { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.progress-ring-container {
  display: flex; align-items: center; gap: 8px;
}
.progress-text { font-size: 22px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* ========== CALENDAR ========== */
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.calendar-header h2 { font-size: 18px; font-weight: 600; }

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin-bottom: 16px;
}
.cal-day-label {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--text-muted); padding: 4px 0;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease; position: relative;
}
.cal-day:hover { background: var(--bg-card-hover); }
.cal-day.empty { cursor: default; }
.cal-day.today { border: 2px solid var(--accent); font-weight: 700; }
.cal-day.selected { background: var(--accent); color: #0a0a12; font-weight: 700; }
.cal-day.perfect { background: var(--accent-dim); color: var(--accent); }
.cal-day.partial { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.cal-day.missed { background: var(--danger-dim); color: var(--danger); }
.cal-day.scheduled { background: var(--accent-blue-dim); color: var(--accent-blue); }
.cal-day.off-cycle { color: var(--text-muted); }

.calendar-detail { min-height: 100px; }
.cal-detail-date { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

/* ========== SUPPLEMENT LIST ========== */
.supplement-card { display: flex; align-items: center; gap: 12px; }
.supp-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.supp-info { flex: 1; }

/* ========== SUPPLEMENT DETAIL ========== */
.detail-section { margin-bottom: 24px; }
.detail-section-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 10px;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.detail-label { font-size: 13px; color: var(--text-secondary); }
.detail-value { font-size: 14px; font-weight: 500; text-align: right; }

.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
}
.stat-value { font-size: 24px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.mini-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mini-cal-day {
  aspect-ratio: 1; border-radius: 4px; display: flex;
  align-items: center; justify-content: center; font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
}

.modification-log { max-height: 200px; overflow-y: auto; }
.mod-entry {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.mod-date { color: var(--text-muted); font-size: 11px; font-family: 'JetBrains Mono', monospace; }

/* ========== METRICS ========== */
.metric-card { padding: 14px 16px; }
.metric-chart-container {
  width: 100%; height: 200px;
  margin-top: 12px; position: relative;
}
.metric-chart-container canvas { width: 100% !important; height: 100% !important; }

/* ========== FORMS / MODAL ========== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 100;
}
.modal-overlay.active { display: block; }

.modal {
  display: none; position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 500px;
  background: var(--bg-card); border-radius: 20px 20px 0 0;
  z-index: 101; max-height: 85vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s ease;
}
.modal.active { display: block; }

@keyframes slideUp { from { transform: translateX(-50%) translateY(100%); } to { transform: translateX(-50%) translateY(0); } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { font-size: 28px; color: var(--text-muted); }

.modal-body { padding: 16px 20px 32px; }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 14px;
  transition: border-color 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-select { appearance: none; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.form-actions {
  display: flex; gap: 10px; margin-top: 20px;
}
.form-actions .btn { flex: 1; justify-content: center; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-option {
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 20px; font-size: 13px;
  cursor: pointer; transition: all 0.15s ease;
  background: var(--bg-input);
}
.checkbox-option.selected {
  border-color: var(--accent); background: var(--accent-dim); color: var(--accent);
}

/* ========== BOTTOM NAV ========== */
#bottom-nav {
  display: flex; justify-content: space-around;
  padding: 8px 0 calc(8px + var(--safe-bottom));
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  padding: 6px 12px; border-radius: var(--radius-sm);
  transition: all 0.15s ease; font-family: inherit;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn span { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
.nav-btn.active { color: var(--accent); }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 16px; font-size: 15px; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ========== UTILITY ========== */
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.hidden { display: none !important; }

/* ========== HOME PAGE ========== */
.home-greeting {
  padding: 20px 0 24px;
}
.home-greeting-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.home-greeting-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.home-section { margin-bottom: 28px; }

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.home-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.home-section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* Reminders */
.home-reminder-done {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.home-reminder-group { margin-bottom: 14px; }

.home-reminder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 6px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
}
.home-reminder-item:hover { background: var(--bg-card-hover); border-color: var(--warning); }

.home-reminder-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
}
.home-reminder-info { flex: 1; }
.home-reminder-name { font-size: 14px; font-weight: 600; display: block; }
.home-reminder-dose { font-size: 12px; color: var(--text-muted); }

/* Nav grid */
.home-nav-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
}
.home-nav-card:hover { background: var(--bg-card-hover); transform: translateX(2px); }
.home-nav-card:active { transform: scale(0.98); }

.home-nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-nav-info { flex: 1; }
.home-nav-name { display: block; font-size: 15px; font-weight: 600; }
.home-nav-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.home-nav-arrow { color: var(--text-muted); flex-shrink: 0; }

/* ========== HEADER HOME BUTTON ========== */
.header-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px 4px 0;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}
.header-home-btn:hover { color: var(--accent); }

/* ========== FITNESS PAGE ========== */
#fitness-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  overflow-x: auto;
}
.fitness-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.fitness-tab.active {
  background: rgba(251,191,36,0.15);
  color: var(--warning);
}

.fitness-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 2px;
}

.fitness-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.weight-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.weight-input {
  font-size: 28px !important;
  font-weight: 700 !important;
  font-family: 'JetBrains Mono', monospace !important;
  padding-right: 52px !important;
  letter-spacing: -0.5px;
}
.weight-unit {
  position: absolute;
  right: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

/* Today entries */
.weight-entry-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.weight-entry-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1;
}
.weight-entry-value {
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--warning);
}
.weight-entry-unit {
  font-size: 13px;
  color: var(--text-muted);
}
.weight-entry-meta {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* History */
.weight-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.weight-history-date {
  font-size: 14px;
  font-weight: 600;
  display: block;
}
.weight-history-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.weight-history-value {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--warning);
}

/* ===== WEIGHT CALENDAR ===== */
/* view-calendar has no inline padding — let .view CSS handle it, no double padding */
#view-calendar { padding: 16px 20px; }
#view-graph { padding: 16px 20px; }

.weight-cal-day {
  aspect-ratio: unset !important;
  height: 54px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px;
  padding: 4px 2px;
}
.cal-day-num {
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}
.cal-weight-mini {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--warning);
  line-height: 1;
  font-weight: 600;
}
.cal-day.has-weight {
  background: rgba(251,191,36,0.12);
  color: var(--warning);
}
.cal-day.has-weight .cal-day-num { color: var(--warning); }
.cal-day.has-weight:hover { background: rgba(251,191,36,0.22); }

.cal-log-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

/* ===== GRAPH TAB ===== */
.graph-periods {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.graph-period-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.graph-period-btn.active {
  border-color: var(--warning);
  background: rgba(251,191,36,0.15);
  color: var(--warning);
}

.graph-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.graph-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 6px;
  text-align: center;
}
.graph-stat-value {
  display: block;
  font-size: 17px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--warning);
  line-height: 1.2;
}
.graph-stat-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.graph-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.graph-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.graph-legend-swatch {
  width: 20px;
  height: 2px;
  display: inline-block;
  border-radius: 1px;
}

/* ========== DB SETUP / FORM ERRORS ========== */
.db-setup-card {
  background: var(--bg-card);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 20px;
}
.db-setup-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 10px;
}
.db-setup-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}
.db-setup-sql {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  white-space: pre;
  overflow-x: auto;
  display: block;
  margin-bottom: 10px;
  line-height: 1.6;
}
.db-setup-error {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 16px;
  word-break: break-all;
}
.form-save-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
  line-height: 1.4;
}

/* ========== IMPORTANCE BADGES ========== */
.badge-critical { background: rgba(248,113,113,0.2); color: #f87171; }
.badge-high     { background: rgba(251,146,60,0.2);  color: #fb923c; }
.badge-low      { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ========== REMINDERS PAGE ========== */
#reminders-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.reminders-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.reminders-tab.active {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

/* Due-item row in Active view */
.reminder-due-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}
.reminder-due-item.reminder-done {
  opacity: 0.45;
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.05);
}
.reminder-check-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: transparent;
}
.reminder-check-btn:hover { border-color: var(--accent); }
.reminder-check-btn.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a12;
}
.reminder-item-info { flex: 1; cursor: pointer; }
.reminder-item-name { font-size: 14px; font-weight: 600; }
.reminder-item-detail { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.reminder-time-tag {
  display: inline-block;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
}

/* Calendar special states for reminders */
.cal-day.reminder-in-window {
  background: rgba(251, 191, 36, 0.2);
  color: var(--warning);
}
.cal-day.reminder-due {
  background: rgba(251, 191, 36, 0.2);
  color: var(--warning);
  border: 2px solid var(--warning);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 26px;
  transition: 0.2s;
}
.toggle-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background: var(--accent);
}

/* ========== NETWORKING PAGE ========== */
#net-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
.net-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.net-tab.active {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.net-contact-card { cursor: pointer; }
.net-contact-card:hover { background: var(--bg-card-hover); border-color: #a78bfa; }

.net-log-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.net-log-row:last-child { border-bottom: none; }

/* ========== STUB PAGES ========== */
.stub-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.stub-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.stub-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}
.stub-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
  margin-bottom: 24px;
}
