/* ─── Variables, reset, typography, dark theme ─── */
/* Shared design system with IdeaCapture */

:root {
  --bg: #1a1a2e;
  --bg-deep: #12121f;
  --card: #16213e;
  --card-hover: #1a2847;
  --pink: #ff6b9d;
  --pink-dim: #ff6b9d33;
  --pink-glow: #ff6b9d55;
  --hot: #ff3d7f;
  --text: #e0e0e0;
  --dim: #888;
  --dimmer: #555;
  --border: #ffffff0a;
  --tag-bg: #ff6b9d18;
  --tag-border: #ff6b9d30;
  --voice-accent: #9d6bff;
  --success: #6bffa8;
  --warning: #ffb86b;
  --danger: #ff5555;
  --priority-high: #ff5555;
  --priority-medium: #ffb86b;
  --priority-low: #6bffa8;

  /* FOCUS mode colors */
  --mode-personal: #ff6b9d;
  --mode-arebladet: #64b5f6;
  --mode-parception: #b388ff;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
  pointer-events: none;
  z-index: 9999;
}

/* Gradient accent bar at top */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink), var(--voice-accent), var(--pink), transparent);
  z-index: 100;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 #ff3d7f44; }
  50% { box-shadow: 0 0 0 6px #ff3d7f00; }
}

/* ─── Loading ─── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  color: var(--dim);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── Empty state ─── */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--dim);
  animation: fadeUp 0.3s ease both;
}

.empty .icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.4;
}

.empty p { font-size: 0.85rem; }

/* ─── Error state ─── */
.error-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--hot);
}

.error-state p { font-size: 0.85rem; }

/* ─── Auth wall ─── */
.auth-wall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  color: var(--dim);
}

.auth-wall .lock {
  font-size: 3rem;
  opacity: 0.3;
}

.auth-wall p { font-size: 0.9rem; }

/* ─── Section headers ─── */
.section-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin: 1.5rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header .count {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--pink);
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
  html { font-size: 14px; }
  .shell { padding: 0.8rem 1rem 3rem; }
}
