/* ============================================
   FOCUSDESK — SHARED STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800&display=swap');

/* ---- ROOT VARIABLES — Original FocusDesk ---- */
:root {
  --bg: #0f0e0c;
  --bg-card: #18170f;
  --bg-card2: #1f1e15;
  --bg-hover: #252310;
  --accent: #c8f135;
  --accent-dim: rgba(200, 241, 53, 0.12);
  --accent-dim2: rgba(200, 241, 53, 0.06);
  --orange: #ff5c1a;
  --orange-dim: rgba(255, 92, 26, 0.12);
  --red: #ff3b3b;
  --red-dim: rgba(255, 59, 59, 0.12);
  --text: #f0ede8;
  --text-muted: #7a7870;
  --text-soft: #b0ada8;
  --border: #272521;
  --border-light: #1e1d1a;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Cabinet Grotesk', 'Inter', system-ui, sans-serif;
  --sidebar-w: 240px;
  --transition: 0.2s ease;
}

/* ---- LIGHT THEME ---- */
[data-theme="light"] {
  --bg: #faf9f5;
  --bg-card: #ffffff;
  --bg-card2: #f3f1e8;
  --bg-hover: #ece9de;
  --accent: #8fb800;
  --accent-dim: rgba(143, 184, 0, 0.1);
  --accent-dim2: rgba(143, 184, 0, 0.05);
  --orange: #e04a08;
  --orange-dim: rgba(224, 74, 8, 0.1);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.1);
  --text: #1a1812;
  --text-muted: #7a7060;
  --text-soft: #a09880;
  --border: #e2ddd0;
  --border-light: #ede9de;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  outline: none;
  color: inherit;
}
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 700; font-family: var(--font-body); }
p { color: var(--text-muted); }

/* ---- LAYOUT ---- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 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; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0f0e0c;
}
.btn-primary:hover {
  background: #d8ff45;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,241,53,0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-orange {
  background: var(--orange);
  color: #fff;
}
.btn-orange:hover { background: #ff7040; }
.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1.5px solid rgba(255,59,59,0.2);
}
.btn-danger:hover { background: rgba(255,59,59,0.2); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: 8px; }

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}
.card:hover { border-color: #353330; }
.card-sm { padding: 16px; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-accent { border-left: 3px solid var(--accent); }
.card-orange { border-left: 3px solid var(--orange); }

/* ---- FORMS ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-input, .form-select, .form-textarea {
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
.form-select { appearance: none; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-green { background: var(--accent-dim); color: var(--accent); }
.badge-orange { background: var(--orange-dim); color: var(--orange); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-muted { background: rgba(120,118,112,0.15); color: var(--text-muted); }
.badge-blue { background: rgba(96,165,250,0.12); color: #60a5fa; }

/* ---- PROGRESS BAR ---- */
.progress-wrap { background: var(--border); border-radius: 100px; height: 8px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.6s ease;
}
.progress-fill.orange { background: var(--orange); }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }

/* ---- DIVIDER ---- */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ---- SECTION HEADER ---- */
.section-head { margin-bottom: 28px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { font-size: 0.9rem; }

/* ---- NOTIFICATIONS ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 360px;
  z-index: 9999;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow);
}
.toast-accent { border-left: 3px solid var(--accent); }
.toast-warning { border-left: 3px solid var(--orange); }
.toast-error { border-left: 3px solid var(--red); }
.toast h4 { font-size: 0.9rem; margin-bottom: 4px; }
.toast p { font-size: 0.82rem; color: var(--text-muted); }

.warning-banner {
  background: var(--orange-dim);
  border: 1.5px solid rgba(255,92,26,0.3);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.warning-banner .icon { font-size: 1.2rem; }
.warning-banner p { color: var(--orange); font-size: 0.88rem; font-weight: 500; }

/* ---- FOCUS BANNER ---- */
.focus-banner {
  background: var(--accent-dim);
  border-bottom: 1.5px solid rgba(200,241,53,0.15);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}
.focus-banner span { color: var(--accent); }
.focus-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; flex-shrink: 0; }

/* ---- STAR RATING ---- */
.star-rating { display: flex; gap: 6px; }
.star {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--border);
  transition: color var(--transition);
  user-select: none;
}
.star.active, .star:hover { color: var(--accent); }

/* ---- SCORE PILLS (kept for backward compat, hidden) ---- */
.score-grid { display: none; }
.score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  min-width: 72px;
}
.score-pill .label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 2px; }
.score-pill .value { font-size: 1.1rem; font-weight: 800; color: var(--accent); }
.score-pill .total { font-size: 0.95rem; font-weight: 800; color: var(--accent); }

/* ---- CHECKBOX ---- */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 0;
}
.checkbox-wrap input[type="checkbox"] {
  width: 18px; height: 18px;
  appearance: none;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card2);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
}
.checkbox-wrap input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-wrap input[type="checkbox"]:checked::after {
  content: '✓';
  display: block;
  text-align: center;
  font-size: 12px;
  color: #0f0e0c;
  font-weight: 900;
  line-height: 14px;
}
.checkbox-wrap .check-label { font-size: 0.9rem; }
.checkbox-wrap.checked .check-label { text-decoration: line-through; color: var(--text-muted); }

/* ---- RANGE INPUT ---- */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}
.range-wrap { position: relative; }
.range-value {
  position: absolute;
  right: 0; top: -4px;
  font-size: 0.85rem; font-weight: 800;
  color: var(--accent);
}

/* ============================================
   NAVIGATION (LANDING + AUTH)
   ============================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--text-muted); transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ============================================
   LANDING PAGE
   ============================================ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,241,53,0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.8rem; color: var(--text-muted); }
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hero-stat .num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; color: var(--accent); }
.hero-stat .lbl { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* Features */
.features { padding: 80px 0; }
.features-header { text-align: center; margin-bottom: 56px; }
.features-header h2 em { font-style: italic; color: var(--accent); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover { border-color: rgba(200,241,53,0.3); transform: translateY(-2px); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.feature-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; line-height: 1.6; }

/* Pricing */
.pricing { padding: 80px 0; }
.pricing-header { text-align: center; margin-bottom: 56px; }
.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.pricing-two { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
.pricing-two .pricing-card { display: flex; flex-direction: column; }
.cross-feature { opacity: 0.45; }
.cross-feature .cross { color: var(--text-muted) !important; }
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: all var(--transition);
}
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(200,241,53,0.05), var(--bg-card));
}
.pricing-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #0f0e0c;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.1em;
}
.pricing-name { font-size: 0.8rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.pricing-price { margin-bottom: 24px; }
.pricing-price .amount { font-family: var(--font-head); font-size: 2.8rem; font-weight: 700; color: var(--text); }
.pricing-price .period { font-size: 0.85rem; color: var(--text-muted); }
.pricing-divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.pricing-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.pricing-feature { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.pricing-feature .check { color: var(--accent); font-weight: 700; }
.pricing-feature .cross { color: var(--text-muted); }

/* CTA Section */
.cta-section {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer p { font-size: 0.82rem; }

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-brand {
  background: linear-gradient(160deg, #151410, #0f0e0c);
  border-right: 1px solid var(--border);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-brand-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.auth-brand h2 { margin-bottom: 16px; line-height: 1.3; }
.auth-brand h2 em { color: var(--accent); font-style: italic; }
.auth-brand p { font-size: 0.95rem; line-height: 1.7; }
.auth-testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 40px;
}
.auth-testimonial p { font-size: 0.88rem; line-height: 1.6; color: var(--text); }
.auth-testimonial .author { font-size: 0.8rem; color: var(--text-muted); margin-top: 10px; }
.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
}
.auth-form-wrap { width: 100%; max-width: 400px; }
.auth-tabs { display: flex; background: var(--bg-card); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 32px; }
.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.auth-tab.active { background: var(--accent); color: #0f0e0c; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 8px 0;
  color: var(--text-muted); font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo .dot { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(200,241,53,0.15);
  font-weight: 700;
}
.sidebar-item .icon { font-size: 1.1rem; width: 20px; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: var(--orange-dim);
  color: var(--orange);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 100px;
}

/* ── Sidebar Pinned Projects ── */
.sidebar-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0 2px;
}
.sidebar-pin-item {
  gap: 10px;
  font-size: 0.83rem;
  padding: 8px 12px;
}
.sidebar-pin-item:hover { color: var(--accent); }
.pin-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(200,241,53,0.5);
}
.sidebar-pin-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Pin Button (on project panel) ── */
.pin-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.pin-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.pin-btn.pinned {
  border-color: rgba(200,241,53,0.3);
  background: var(--accent-dim);
  color: var(--accent);
}
.pin-btn .pin-icon { font-size: 0.82rem; }

/* ── Panel highlight flash on jump ── */
@keyframes panelHighlight {
  0%   { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,241,53,0.15); }
  100% { border-color: var(--border); box-shadow: none; }
}
.panel-highlight {
  animation: panelHighlight 1.2s ease forwards;
}
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  position: relative;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--bg-hover); }
.user-menu-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
  transform: rotate(180deg);
}
.user-menu-arrow.open { transform: rotate(0deg); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: var(--accent);
  flex-shrink: 0;
}
.user-info .name { font-size: 0.85rem; font-weight: 700; }
.user-info .plan { font-size: 0.72rem; color: var(--text-muted); }

/* User menu popup */
.user-menu-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  z-index: 200;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  animation: slideUpFade 0.15s ease;
}
@keyframes slideUpFade {
  from { opacity:0; transform: translateY(8px); }
  to   { opacity:1; transform: translateY(0); }
}
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text);
}
.user-menu-item:hover { background: var(--bg-hover); }
.user-menu-item.danger { color: #ff5c5c; }
.user-menu-item.danger:hover { background: rgba(255,92,92,0.08); }
.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Profile modal avatar row */
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.profile-avatar-big {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: var(--accent);
  flex-shrink: 0;
}

/* Settings styles */
.settings-section { margin-bottom: 24px; }
.settings-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-title { font-size: 0.88rem; font-weight: 600; }
.settings-row-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* Theme selector */
.theme-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}
.theme-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-card2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.theme-option:hover { border-color: var(--accent); color: var(--text); }
.theme-option.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.theme-preview {
  width: 100%;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px;
}
.light-preview { background: #faf9f5; border: 1px solid #e2ddd0; }
.light-preview .tp-bar { height: 6px; background: #8fb800; border-radius: 3px; width: 60%; }
.light-preview .tp-card { height: 7px; background: #e2ddd0; border-radius: 3px; }
.dark-preview { background: #0f0e0c; border: 1px solid #272521; }
.dark-preview .tp-bar { height: 6px; background: #c8f135; border-radius: 3px; width: 60%; }
.dark-preview .tp-card { height: 7px; background: #272521; border-radius: 3px; }
.system-preview {
  background: linear-gradient(135deg, #faf9f5 50%, #0f0e0c 50%);
  border: 1px solid #888;
  position: relative;
}
.system-preview .tp-bar { height: 6px; background: linear-gradient(90deg, #8fb800 50%, #c8f135 50%); border-radius: 3px; width: 60%; }
.system-preview .tp-card { height: 7px; background: linear-gradient(90deg, #e2ddd0 50%, #272521 50%); border-radius: 3px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

/* Modal footer */
.fb-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* FB Modal base */
.fb-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.fb-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  animation: fadeInUp 0.2s ease;
  overflow: hidden;
}
.fb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.fb-modal-header h3 { margin: 0; font-size: 1.05rem; }
.fb-modal-close {
  background: none; border: none;
  color: var(--text-muted); font-size: 1rem;
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: background 0.15s;
}
.fb-modal-close:hover { background: var(--bg-hover); color: var(--text); }
.fb-modal-body {
  padding: 20px 24px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Dashboard main */
.dashboard-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.dashboard-focus {
  background: rgba(200,241,53,0.06);
  border-bottom: 1px solid rgba(200,241,53,0.12);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  font-weight: 600;
}
.dashboard-focus .project-name { color: var(--accent); }
.dashboard-content { padding: 32px 28px; flex: 1; }

/* Dashboard section */
.dash-section { animation: fadeInUp 0.3s ease; }

/* ============================================
   SECTION 1 — IDEA PARKING LOT
   ============================================ */
.idea-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
}
.idea-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
}
.idea-card:hover { border-color: #353330; transform: translateY(-2px); box-shadow: var(--shadow); }
.idea-card.active-idea {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(200,241,53,0.04), var(--bg-card));
}
.idea-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.idea-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.idea-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 8px; }
.idea-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.idea-actions .btn-sm { padding: 5px 10px; font-size: 0.76rem; }
/* ---- IDEA STATUS TAG ---- */
.idea-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---- IDEA META ROW (created + deadline) ---- */
.idea-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.idea-deadline {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}
.idea-deadline.muted {
  color: var(--text-muted);
  font-weight: 400;
}

/* ---- IDEA FOOTER ---- */
.idea-footer { display: flex; align-items: center; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; gap: 8px; }

/* ============================================
   SECTION 2 — ACTIVE PROJECT
   ============================================ */
/* Projects overview grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.project-overview-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.project-overview-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.project-overview-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.project-overview-card:hover::before { transform: scaleX(1); }
.project-overview-card.selected { border-color: var(--accent); background: var(--accent-dim); }
.project-overview-card.selected::before { transform: scaleX(1); }
.poc-name { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.poc-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poc-stats { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.poc-stat { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.poc-stat strong { color: var(--text); }
.poc-progress-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.poc-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
.poc-footer { display: flex; justify-content: space-between; align-items: center; }
.poc-pct { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.poc-action { font-size: 0.75rem; color: var(--text-muted); }

/* Project detail header */
.project-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.active-project-hero {
  background: linear-gradient(135deg, rgba(200,241,53,0.06), rgba(200,241,53,0.02));
  border: 1px solid rgba(200,241,53,0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
}
.project-title { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: 8px; }
.project-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.project-stat { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.project-stat strong { color: var(--text); }
.project-progress { margin-top: 16px; }
.project-motivation {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.milestone-item:last-child { border-bottom: none; }
.milestone-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
}
.milestone-check.done { background: var(--accent); border-color: var(--accent); }
.milestone-check.done::after { content: '✓'; font-size: 11px; color: #0f0e0c; font-weight: 900; }
.milestone-info { flex: 1; }
.milestone-title { font-size: 0.9rem; font-weight: 600; }
.milestone-due { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all var(--transition);
}
.task-item.done { opacity: 0.5; }
.task-item.done .task-title { text-decoration: line-through; }
.task-title { flex: 1; font-size: 0.88rem; }
.task-priority { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.priority-high { background: var(--red-dim); color: var(--red); }
.priority-medium { background: var(--orange-dim); color: var(--orange); }
.priority-low { background: var(--accent-dim); color: var(--accent); }
.task-time { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================
   SECTION 2 — MULTI-PROJECT PANELS
   ============================================ */
/* ── Project Panel Shell ── */
.project-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.project-panel:hover { border-color: rgba(200,241,53,0.2); }

/* ── Clickable Header ── */
.pp-clickable {
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.pp-clickable:hover { background: rgba(200,241,53,0.04); }

.project-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  flex-wrap: wrap;
}
.project-panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.project-panel-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.panel-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Stats + Progress (always visible) ── */
.project-panel-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 24px 12px;
}
.pp-stat {
  font-size: 0.81rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.pp-stat strong { color: var(--text); }

.project-panel .progress-wrap {
  margin: 0 24px 0;
  border-radius: 0;
}

/* ── Collapsible Body ── */
.project-panel-body {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border-light);
  margin-top: 12px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
  max-height: 2000px;
  opacity: 1;
}
.panel-collapsed .project-panel-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-color: transparent;
  margin-top: 0;
}

.motivation-msg {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}

/* ── Notes Card ── */
.notes-card {
  margin-top: 20px;
  grid-column: 1 / -1;
}
.note-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.6;
}
.note-item {
  padding: 14px 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.note-item:hover { border-color: var(--border); }
.note-item:last-child { margin-bottom: 0; }
.note-content {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}
.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.note-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.note-item:hover .note-footer button { opacity: 1 !important; }

/* ── Empty hint text ── */
.empty-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 12px 0;
  margin: 0;
  font-style: italic;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .project-panel-header { padding: 16px 18px 12px; }
  .project-panel-stats { padding: 0 18px 10px; gap: 12px; }
  .project-panel .progress-wrap { margin: 0 18px 0; }
  .project-panel-body { padding: 16px 18px 20px; }
  .project-panel-name { font-size: 1.15rem; }
}

/* ============================================
   SECTION 3 — DAILY ROUTINE
   ============================================ */
.routine-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.timeline-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.timeline-header { margin-bottom: 20px; }
.timeline-body { position: relative; }
.time-row {
  display: flex;
  align-items: flex-start;
  min-height: 52px;
  position: relative;
  border-top: 1px solid var(--border-light);
}
.time-row:last-child { border-bottom: 1px solid var(--border-light); }
.time-label { width: 44px; font-size: 0.72rem; color: var(--text-muted); padding-top: 6px; flex-shrink: 0; }
.time-content { flex: 1; padding: 4px 0 4px 8px; min-height: 52px; position: relative; }
.time-block-chip {
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.time-block-chip .delete-block {
  opacity: 0;
  transition: opacity var(--transition);
  font-size: 0.7rem;
  padding: 2px 4px;
}
.time-block-chip:hover .delete-block { opacity: 1; }

.current-time-indicator {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--red);
  z-index: 10;
  pointer-events: none;
}
.current-time-indicator::before {
  content: '';
  position: absolute;
  left: 44px;
  top: -4px;
  width: 10px; height: 10px;
  background: var(--red);
  border-radius: 50%;
}

.current-block-card {
  background: linear-gradient(135deg, rgba(200,241,53,0.08), rgba(200,241,53,0.03));
  border: 1.5px solid rgba(200,241,53,0.25);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.current-block-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }
.current-block-name { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.current-block-time { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ── Timeline Drop Zones ── */
.time-row {
  transition: background 0.15s ease;
}
.time-row.drop-target {
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.time-row.drop-target .time-label {
  color: var(--accent);
  font-weight: 700;
}
.time-drop-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0;
  padding: 2px 6px;
  pointer-events: none;
  transition: opacity 0.15s;
}
.time-row.drop-target .time-drop-hint {
  opacity: 1;
  color: var(--accent);
}

/* ── Preset Buttons ── */
.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}
.preset-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Category colors */
.cat-work { background: rgba(200,241,53,0.15); color: var(--accent); }
.cat-chasepay { background: rgba(255,92,26,0.15); color: var(--orange); }
.cat-client { background: rgba(96,165,250,0.15); color: #60a5fa; }
.cat-break { background: rgba(120,118,112,0.15); color: var(--text-muted); }
.cat-personal { background: rgba(167,139,250,0.15); color: #a78bfa; }

/* ============================================
   SECTION 4 — DAILY CHECK-IN
   ============================================ */
.checkin-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.streak-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--accent-dim);
  border: 1px solid rgba(200,241,53,0.2);
  border-radius: var(--radius);
  padding: 12px 20px;
  min-width: 100px;
}
.streak-num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--accent); }
.streak-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); opacity: 0.7; }
/* Two-col layout for morning + evening side by side */
.checkin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .checkin-two-col { grid-template-columns: 1fr; }
}

.checkin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: opacity 0.3s ease;
}
.checkin-card-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.checkin-done-msg {
  background: var(--accent-dim);
  border: 1px solid rgba(200,241,53,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}

.mit-inputs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.mit-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: border-color var(--transition);
}
.mit-input-wrap:focus-within { border-color: var(--accent); }
.mit-num { font-size: 0.85rem; font-weight: 800; color: var(--accent); width: 20px; flex-shrink: 0; }
.mit-input-wrap input { flex: 1; font-size: 0.9rem; }

/* Emoji day rating */
.emoji-rating {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.emoji-btn {
  font-size: 1.8rem;
  background: var(--bg-card2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1;
  font-family: inherit;
}
.emoji-btn:hover {
  transform: scale(1.15);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.emoji-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(200,241,53,0.2);
}

.day-rating { margin-bottom: 24px; }
.day-rating h4 { margin-bottom: 12px; font-size: 0.88rem; }

/* ============================================
   SECTION 5 — WEEKLY REVIEW
   ============================================ */
.review-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card .num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.stat-card .num.orange { color: var(--orange); }
.stat-card .lbl { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ai-insight {
  background: linear-gradient(135deg, rgba(200,241,53,0.07), rgba(200,241,53,0.02));
  border: 1.5px solid rgba(200,241,53,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
}
.ai-insight-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 800; margin-bottom: 10px; }
.ai-insight-text { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.6; font-style: italic; }
.ai-insight-question { margin-top: 12px; font-size: 0.88rem; color: var(--text-muted); }
.next-week-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h4 { font-size: 1rem; margin-bottom: 8px; color: var(--text-muted); font-family: var(--font-body); }
.empty-state p { font-size: 0.85rem; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.fade-in { animation: fadeIn 0.4s ease; }
.slide-up { animation: fadeInUp 0.4s ease; }

/* Loader */
.loader {
  width: 20px; height: 20px;
  border: 2px solid rgba(200,241,53,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  animation: fadeInUp 0.25s ease;
}
.modal h3 { margin-bottom: 12px; }
.modal p { font-size: 0.9rem; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ============================================
   DAILY TO-DO
   ============================================ */
/* Todo add row */
.todo-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.todo-add-row .form-input:first-child { flex: 1; min-width: 0; }
.todo-add-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.todo-date-pick { width: 140px; padding: 8px 10px; font-size: 0.83rem; }

/* Day navigator */
.todo-day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.todo-nav-btn {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.todo-nav-btn:hover { background: var(--accent); border-color: var(--accent); color: #0f0e0c; }
.todo-day-center { text-align: center; }
.todo-day-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-head);
}
.todo-day-date { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* Quick jump pills */
.todo-quick-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.todo-pill {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.todo-pill:hover { border-color: var(--accent); color: var(--accent); }
.todo-pill.active { background: var(--accent); border-color: var(--accent); color: #0f0e0c; }

/* Stats bar */
.todo-stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.todo-stats-bar:empty { display: none; }
.todo-stat-item { display: flex; align-items: center; gap: 5px; }
.todo-stat-item strong { color: var(--text); }

/* Keep old tab styles for all-view pill */
.todo-tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.todo-tab:hover { border-color: var(--accent); color: var(--accent); }
.todo-tab.active { background: var(--accent); border-color: var(--accent); color: #0f0e0c; }

/* Todo item */
.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 0.15s, opacity 0.2s, transform 0.15s, box-shadow 0.15s;
  cursor: default;
}
.todo-item:hover { border-color: var(--accent); }
.todo-item.done { opacity: 0.55; }

/* ── Drag handle ── */
.todo-drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1.15rem;
  opacity: 0.25;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
  transition: opacity 0.15s;
  padding: 2px 0;
}
.todo-item:hover .todo-drag-handle { opacity: 0.6; }
.todo-item:active .todo-drag-handle { cursor: grabbing; }

/* ── Drag states ── */
.todo-item.dragging {
  opacity: 0.3;
  border-style: dashed;
  border-color: var(--accent);
  transform: scale(0.98);
}
.todo-item.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(200,241,53,0.15);
}

/* ── Idea Card Drag & Drop ── */
.idea-drag-handle {
  position: absolute;
  top: 10px;
  left: 10px;
  color: var(--text-muted);
  cursor: grab;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1;
  user-select: none;
  z-index: 2;
}
.idea-card:hover .idea-drag-handle { opacity: 0.5; }
.idea-card:active .idea-drag-handle { cursor: grabbing; }

.idea-card.dragging {
  opacity: 0.3;
  border-style: dashed;
  border-color: var(--accent);
  transform: scale(0.96);
}
.idea-card.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 6px 20px rgba(200,241,53,0.18);
  transform: scale(1.02);
}

/* ── Project Panel Drag & Drop ── */
.project-drag-handle {
  color: var(--text-muted);
  cursor: grab;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.2s;
  user-select: none;
  padding: 0 6px 0 2px;
  flex-shrink: 0;
}
.project-panel:hover .project-drag-handle { opacity: 0.5; }
.project-panel:active .project-drag-handle { cursor: grabbing; }

.project-panel.dragging {
  opacity: 0.35;
  border-style: dashed;
  border-color: var(--accent);
  transform: scale(0.99);
}
.project-panel.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(200,241,53,0.15);
  transform: translateY(-4px);
}

/* While a panel is being dragged, freeze all inner content so
   child elements can't steal dragenter/dragleave events */
body.panel-dragging .project-panel-body,
body.panel-dragging .project-panel-stats,
body.panel-dragging .project-panel-header > *:not(.project-drag-handle) {
  pointer-events: none;
}

/* While an idea card is being dragged, freeze card internals */
body.idea-dragging .idea-card > *:not(.idea-drag-handle) {
  pointer-events: none;
}

/* Circle checkbox */
.todo-circle {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
}
.todo-circle:hover { border-color: var(--accent); }
.todo-circle.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.todo-circle.checked::after {
  content: '✓';
  font-size: 0.7rem;
  font-weight: 900;
  color: #0f0e0c;
}

/* Todo text */
.todo-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}
.todo-text.done-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.todo-edit-input {
  flex: 1;
  background: var(--bg-card2);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}
.todo-date-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.todo-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.todo-item:hover .todo-actions { opacity: 1; }
.todo-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.todo-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.todo-action-btn.del:hover { border-color: #ff5c5c; color: #ff5c5c; }

/* Empty state */
.todo-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.todo-empty .emoji { font-size: 2.5rem; margin-bottom: 12px; }
.todo-empty p { font-size: 0.88rem; }

/* Date group header */
.todo-date-group {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 20px 0 10px;
}
.todo-date-group:first-child { margin-top: 0; }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-cards { grid-template-columns: 1fr; max-width: 360px; }
  .pricing-two { grid-template-columns: 1fr; max-width: 360px; }
  .review-stats { grid-template-columns: repeat(2, 1fr); }
  .routine-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .dashboard-main { margin-left: 0; }
  .mobile-menu-btn { display: flex !important; }
  .hero { padding: 60px 0 48px; }
  .nav-links { display: none; }
  .hero-stats { gap: 24px; }

  .projects-grid { grid-template-columns: 1fr; }
  .project-detail-header { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Todo mobile fixes */
  .todo-add-row { flex-direction: column; align-items: stretch; }
  .todo-add-row .form-input:first-child { width: 100%; }
  .todo-add-meta { width: 100%; }
  .todo-date-pick { flex: 1; width: auto; }
  .todo-stats-bar { flex-wrap: wrap; gap: 8px; }
}
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
}

/* ============================================
   GOALS → TASKS STRUCTURE
   ============================================ */

.goals-section {
  margin-bottom: 20px;
}
.goals-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.goals-section-title {
  font-size: 0.92rem;
  font-weight: 700;
}

/* Goal card */
.goal-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.goal-card:hover { border-color: var(--accent); }
.goal-card.goal-done { opacity: 0.65; }

/* Goal header (clickable row) */
.goal-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  background: var(--bg-card2);
  user-select: none;
  transition: background 0.15s;
}
.goal-card-header:hover { background: var(--bg-hover); }

/* Check circle */
.goal-check-circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #0f0e0c;
  transition: all 0.18s;
  cursor: pointer;
  user-select: none;
}
.goal-check-circle:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: scale(1.12);
}
.goal-check-circle.done {
  background: var(--accent);
  border-color: var(--accent);
}
.goal-check-circle.done:hover {
  background: var(--accent);
  opacity: 0.75;
}
[data-theme="light"] .goal-check-circle.done { color: #0f0e0c; }

/* Goal info */
.goal-card-info { flex: 1; min-width: 0; }
.goal-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-card-name.done { text-decoration: line-through; opacity: 0.5; }
.goal-card-meta { font-size: 0.71rem; color: var(--text-muted); margin-top: 2px; }

/* Mini progress */
.goal-mini-progress {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.goal-mini-bar {
  width: 54px; height: 4px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.goal-mini-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.3s ease;
}

.goal-chevron {
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Goal tasks body */
.goal-card-tasks {
  padding: 4px 14px 12px 44px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

/* Task row inside goal */
.goal-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.83rem;
}
.goal-task-item:last-of-type { border-bottom: none; }
.goal-task-item.done .goal-task-label {
  text-decoration: line-through;
  opacity: 0.42;
}

.goal-task-cb {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.goal-task-label { flex: 1; min-width: 0; }

/* Add task inline row */
.goal-add-task-row {
  display: flex; align-items: center; gap: 6px;
  padding-top: 8px;
  margin-top: 2px;
}
.goal-task-input {
  flex: 1;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
}
.goal-task-input:focus { border-color: var(--accent); outline: none; }
.goal-task-input::placeholder { color: var(--text-muted); }

.goal-task-priority-sel {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 0.72rem;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-add-goal-task {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.15s;
}
.btn-add-goal-task:hover {
  background: var(--accent);
  color: #0f0e0c;
}

/* Unassigned Tasks (legacy tasks without a goal) */
.unassigned-tasks-section {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.unassigned-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card2);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}
.unassigned-tasks-header:hover { background: var(--bg-hover); color: var(--text); }
.unassigned-tasks-body {
  padding: 4px 14px 8px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}
