/* ════════════════════════════════════════════════════════════
   YAPIDO · PANEL DE OBJETIVOS
   Sistema: dark glassmorphism, responsive 1/2/3 columnas
   Breakpoints: mobile ≤767 · tablet 768-1279 · desktop ≥1280
   ════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #06060a;
  color: #f0f0f5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

:root {
  --bg-void:     #06060a;
  --bg-surface:  #0c0c12;
  --bg-card:     rgba(255, 255, 255, 0.03);
  --glass:       rgba(255, 255, 255, 0.04);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-strong: rgba(255, 255, 255, 0.10);

  --text-primary:   #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted:     #6e6e88;
  --text-dim:       #4a4a5e;

  --accent-1: #6c5ce7;
  --accent-2: #00cec9;
  --accent-3: #fd79a8;
  --accent-4: #ffeaa7;
  --accent-success: #00d68f;
  --accent-warning: #ffb547;
  --accent-danger:  #ff5a5f;

  --p-yapido:    #6c5ce7;
  --p-cine:      #fd79a8;
  --p-nimbus:    #ffeaa7;
  --p-finanzas:  #00cec9;
  --p-movilidad: #ff7e5f;
  --p-general:   #c084fc;

  --glow-purple: rgba(108, 92, 231, 0.35);
  --glow-teal:   rgba(0, 206, 201, 0.35);
  --glow-pink:   rgba(253, 121, 168, 0.35);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

::selection { background: var(--accent-1); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ─── Gate (token de acceso) ──────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-void);
  padding: 1.5rem;
}
.gate-card {
  width: 100%; max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
}
.gate-icon { font-size: 3rem; margin-bottom: 1rem; }
.gate-card h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; margin-bottom: 0.5rem; }
.gate-card p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.gate-card input {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--bg-void); border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 1rem; margin-bottom: 1rem;
  text-align: center; letter-spacing: 0.1em;
}
.gate-card input:focus { outline: none; border-color: var(--accent-1); }
.gate-error { color: var(--accent-danger); font-size: 0.85rem; margin-top: 0.5rem; }

/* ─── App layout ──────────────────────────────────────── */
.app {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ─── Topbar ──────────────────────────────────────────── */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(6, 6, 10, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: grid; place-items: center; font-size: 1.3rem;
  box-shadow: 0 4px 16px var(--glow-purple);
}
.brand-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

.topbar-center { display: flex; align-items: center; gap: 0.75rem; justify-content: center; }
.week-nav {
  display: flex; align-items: center; gap: 0.25rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.25rem;
}
.week-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-secondary);
  font-size: 1.4rem; font-weight: 600;
  transition: all 0.2s;
}
.week-btn:hover { background: var(--glass-hover); color: var(--text-primary); }
.week-current {
  padding: 0.5rem 1rem; border-radius: var(--radius-full);
  display: flex; flex-direction: column; align-items: center;
  min-width: 180px;
  transition: all 0.2s;
}
.week-current:hover { background: var(--glass-hover); }
.week-label { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.week-range { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

.topbar-right { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; }
.filter-chips { display: flex; gap: 0.25rem; background: var(--glass); padding: 0.25rem; border-radius: var(--radius-full); border: 1px solid var(--glass-border); }
.chip {
  padding: 0.4rem 0.9rem; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
  transition: all 0.2s;
}
.chip:hover { color: var(--text-primary); }
.chip.active { background: var(--accent-1); color: #fff; }

/* ─── Botones compartidos ─────────────────────────────── */
.btn-primary {
  padding: 0.7rem 1.4rem; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-1), #5a4bd1);
  color: #fff; font-weight: 600; font-size: 0.88rem;
  box-shadow: 0 4px 16px var(--glow-purple);
  transition: all 0.3s var(--ease-out-expo);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--glow-purple); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 0.6rem 1.1rem; border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border-strong);
  color: var(--text-primary); font-weight: 500; font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--glass-hover); border-color: rgba(255, 255, 255, 0.18); }

.btn-ghost {
  padding: 0.5rem 0.9rem; border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 0.8rem; font-weight: 500;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--glass); }
.btn-ghost.block, .btn-secondary.block { display: block; width: 100%; text-align: left; margin-bottom: 0.4rem; }

.btn-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  display: grid; place-items: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.btn-icon:hover { background: var(--glass-hover); color: var(--text-primary); }

.btn-danger {
  padding: 0.5rem 0.9rem; border-radius: var(--radius-md);
  color: var(--accent-danger); background: rgba(255, 90, 95, 0.08);
  font-size: 0.8rem; font-weight: 500;
  transition: all 0.2s;
}
.btn-danger:hover { background: rgba(255, 90, 95, 0.15); }

/* ─── Project tabs (mobile) ──────────────────────────── */
.project-tabs {
  display: none;
  position: sticky; top: 73px; z-index: 40;
  background: rgba(6, 6, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.5rem 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 0.4rem;
}
.project-tabs::-webkit-scrollbar { display: none; }
.project-tabs { display: none; }

@media (max-width: 767px) {
  .project-tabs { display: flex; }
}

.ptab {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.9rem; border-radius: var(--radius-full);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s;
}
.ptab.active {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
}
.ptab .ptab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; opacity: 0.7;
}
.ptab .ptab-count {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.05rem 0.4rem; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 600;
}

/* ─── Layout principal ────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1023px) {
  .layout { grid-template-columns: 240px 1fr; padding: 1.25rem; gap: 1.25rem; }
}
@media (max-width: 767px) {
  .layout { grid-template-columns: 1fr; padding: 1rem; gap: 1rem; padding-bottom: 6rem; }
}

/* ─── Sidebar ─────────────────────────────────────────── */
.sidebar {
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
  padding-right: 4px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

@media (max-width: 767px) { .sidebar { display: none; } }

.sidebar-section {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.sidebar-title {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.project-list { display: flex; flex-direction: column; gap: 0.2rem; }
.proj-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
}
.proj-item:hover { background: var(--glass-hover); color: var(--text-primary); }
.proj-item.active {
  background: rgba(108, 92, 231, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(108, 92, 231, 0.2);
}
.proj-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.proj-name { flex: 1; }
.proj-count {
  font-size: 0.72rem; font-weight: 600;
  background: var(--glass);
  padding: 0.1rem 0.45rem; border-radius: var(--radius-full);
  color: var(--text-muted);
}
.proj-item.active .proj-count { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }

.stats { display: flex; flex-direction: column; gap: 0.4rem; }
.stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-secondary); }
.stat-row strong { color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; }
.progress-bar { height: 6px; background: var(--glass); border-radius: 3px; overflow: hidden; margin-top: 0.5rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); transition: width 0.5s var(--ease-out-expo); width: 0%; }
.stat-pct { text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--accent-2); margin-top: 0.3rem; font-family: 'JetBrains Mono', monospace; }

/* ─── Main ────────────────────────────────────────────── */
.main { min-width: 0; }
.main-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1.5rem; gap: 1rem;
}
.main-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
.main-sub { color: var(--text-secondary); font-size: 0.9rem; }
.main-actions { flex-shrink: 0; }

.projects-grid {
  display: flex; flex-direction: column; gap: 1.5rem;
}

.project-section {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.project-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}
.project-head:hover { background: var(--glass-hover); }
.project-head-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.1rem;
  flex-shrink: 0;
}
.project-head-text { flex: 1; min-width: 0; }
.project-head-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; }
.project-head-sub { font-size: 0.78rem; color: var(--text-muted); }
.project-head-progress {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}
.project-head-toggle {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted); transition: transform 0.3s;
}
.project-section.collapsed .project-head-toggle { transform: rotate(-90deg); }

.goals-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}
@media (max-width: 599px) {
  .goals-list { grid-template-columns: 1fr; padding: 1rem; gap: 0.75rem; }
}
.project-section.collapsed .goals-list { display: none; }

/* ─── Goal card ───────────────────────────────────────── */
.goal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all 0.3s var(--ease-out-expo);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.goal:hover { border-color: var(--glass-border-strong); transform: translateY(-2px); }
.goal.completed {
  background: rgba(0, 214, 143, 0.04);
  border-color: rgba(0, 214, 143, 0.18);
}
.goal.completed .goal-title { text-decoration: line-through; opacity: 0.7; }

.goal-priority {
  position: absolute; top: 0; right: 0;
  width: 4px; height: 100%;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.goal-priority.low { background: var(--text-muted); }
.goal-priority.medium { background: var(--accent-warning); }
.goal-priority.high { background: var(--accent-3); }
.goal-priority.critical { background: var(--accent-danger); }

.goal-head { display: flex; align-items: flex-start; gap: 0.5rem; padding-right: 0.75rem; }
.goal-status {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--glass-border-strong);
  display: grid; place-items: center;
  flex-shrink: 0; margin-top: 1px;
  transition: all 0.2s;
  background: transparent;
}
.goal-status:hover { border-color: var(--accent-1); }
.goal.completed .goal-status {
  background: var(--accent-success);
  border-color: var(--accent-success);
  color: #06060a;
}

.goal-body { flex: 1; min-width: 0; }
.goal-title { font-weight: 600; font-size: 0.95rem; line-height: 1.35; margin-bottom: 0.3rem; }
.goal-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

.goal-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  font-size: 0.72rem; color: var(--text-muted);
}
.goal-tag {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 0.15rem 0.55rem; border-radius: var(--radius-full);
  font-weight: 500;
}
.goal-effort, .goal-type {
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.goal-effort::before { content: '⏱'; }
.goal-type::before { content: '🏷'; }

.goal-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 0.5rem;
  border-top: 1px solid var(--glass-border);
  gap: 0.5rem;
}
.goal-foot-left { display: flex; gap: 0.3rem; }
.goal-foot-right { display: flex; gap: 0.3rem; }
.goal-action {
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent-2);
  background: rgba(0, 206, 201, 0.08);
  padding: 0.4rem 0.7rem; border-radius: var(--radius-md);
  transition: all 0.2s;
}
.goal-action:hover { background: rgba(0, 206, 201, 0.18); }
.goal-action.done { color: var(--accent-success); background: rgba(0, 214, 143, 0.1); }

.goal-edit {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted); transition: all 0.2s;
  background: transparent;
}
.goal-edit:hover { background: var(--glass-hover); color: var(--text-primary); }

.goal-completion-info {
  background: rgba(0, 214, 143, 0.06);
  border: 1px solid rgba(0, 214, 143, 0.15);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.7rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.goal-completion-info strong { color: var(--accent-success); }
.goal-completion-info .gci-row { display: flex; justify-content: space-between; gap: 0.5rem; }

/* ─── Empty state ─────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 1.5rem;
  background: var(--glass);
  border: 1px dashed var(--glass-border-strong);
  border-radius: var(--radius-xl);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ─── Bottom nav (mobile) ─────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: rgba(6, 6, 10, 0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--glass-border);
  padding: 0.5rem;
  justify-content: space-around;
  align-items: center;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
@media (max-width: 767px) {
  .bottom-nav { display: flex; }
}
.bnav {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0.4rem 0.2rem;
  font-size: 0.7rem; font-weight: 500; color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.bnav span { font-size: 1.1rem; }
.bnav small { font-size: 0.65rem; }
.bnav.active { color: var(--accent-2); }
.bnav-add {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff; margin: 0 0.5rem; border-radius: var(--radius-full);
  width: 48px; height: 48px; flex: 0 0 48px;
  box-shadow: 0 4px 16px var(--glow-purple);
}
.bnav-add span { font-size: 1.5rem; font-weight: 300; }
.bnav-add.active { color: #fff; }

/* ─── Modals ──────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh; max-height: 90dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s var(--ease-spring);
}
.feedback-card { border-color: rgba(0, 214, 143, 0.3); }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}
.modal-head h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── Forms ───────────────────────────────────────────── */
.form-row { margin-bottom: 1rem; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-row label {
  display: block; font-size: 0.78rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 0.4rem;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row input[type="url"],
.form-row input[type="date"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
  width: 100%; padding: 0.65rem 0.9rem;
  background: var(--bg-void);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none; border-color: var(--accent-1);
}
.form-row textarea { resize: vertical; min-height: 70px; }
.form-row small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-row small code { font-family: 'JetBrains Mono', monospace; background: var(--glass); padding: 0.1rem 0.3rem; border-radius: 3px; font-size: 0.7rem; }

.completion-prompt {
  display: flex; gap: 1rem;
  background: rgba(255, 181, 71, 0.08);
  border: 1px solid rgba(255, 181, 71, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}
.complete-icon { font-size: 1.5rem; flex-shrink: 0; }
.completion-prompt strong { display: block; font-size: 0.95rem; margin-bottom: 0.3rem; }
.completion-prompt p { font-size: 0.82rem; color: var(--text-secondary); }
.complete-sub { font-size: 0.75rem !important; color: var(--text-muted) !important; margin-top: 0.3rem; }

.completion-fields { margin-top: 0.5rem; }
.completion-fields .form-row:first-child { padding-top: 0.75rem; border-top: 1px solid var(--glass-border); }
.completion-fields .form-row label { color: var(--accent-2); }

/* ─── Feedback modal ──────────────────────────────────── */
.feedback-summary { display: flex; flex-direction: column; gap: 0.75rem; }
.feedback-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}
.feedback-row .fr-key { color: var(--text-muted); font-size: 0.78rem; }
.feedback-row .fr-val { color: var(--text-primary); font-weight: 500; text-align: right; max-width: 60%; }

.feedback-insight {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(0, 206, 201, 0.08));
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}
.feedback-insight strong { color: var(--accent-2); }
.feedback-insight ul { margin: 0.5rem 0 0 1rem; color: var(--text-secondary); }
.feedback-insight li { margin-bottom: 0.2rem; }

.feedback-streak {
  text-align: center; padding: 1rem 0;
  font-family: 'Space Grotesk', sans-serif;
}
.feedback-streak .fs-num {
  font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.feedback-streak .fs-label { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Toast ───────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease-spring);
  max-width: 90vw;
}
.toast.success { border-color: rgba(0, 214, 143, 0.3); color: var(--accent-success); }
.toast.error { border-color: rgba(255, 90, 95, 0.3); color: var(--accent-danger); }
.toast.info { border-color: rgba(0, 206, 201, 0.3); color: var(--accent-2); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive refinements ──────────────────────────── */
@media (max-width: 1023px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-center { grid-column: 1 / -1; grid-row: 2; order: 3; padding-top: 0.5rem; }
  .topbar-right .filter-chips { display: none; }
}
@media (max-width: 767px) {
  .topbar { grid-template-columns: 1fr auto; padding: 0.75rem 1rem; }
  .brand-sub { display: none; }
  .week-current { min-width: 140px; padding: 0.4rem 0.7rem; }
  .week-label { font-size: 0.75rem; }
  .week-range { font-size: 0.65rem; }
  .topbar-center { padding-top: 0; }
  .topbar-right { gap: 0.4rem; }
  #btnSettings { display: none; }

  .main-title { font-size: 1.4rem; }
  .main-header { flex-direction: column; align-items: stretch; }
  .main-actions { display: none; }

  .form-row.two { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92dvh; }
  .feedback-card { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}
@media (max-width: 380px) {
  .week-nav { transform: scale(0.92); transform-origin: center; }
}

/* ─── Scrollbar (global) ──────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--glass-border-strong); }

/* ─── Focus visible (a11y) ────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
