/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3345;
  --text: #e1e4ed;
  --text-dim: #8b90a0;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --green: #00b894;
  --orange: #fdcb6e;
  --red: #e17055;
  --blue: #74b9ff;
  --radius: 10px;
  --radius-sm: 6px;
}

[data-theme="light"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface2: #edeef2;
  --border: #d8dae0;
  --text: #1a1d27;
  --text-dim: #6b7080;
  --accent: #6c5ce7;
  --accent-light: #5a4bd1;
  --green: #00a884;
  --orange: #e69c00;
  --red: #d04a33;
  --blue: #3a8fd6;
}

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

button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Tooltip ── */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 100;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state .icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ── Auth Layout ── */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,92,231,0.12) 0%, transparent 60%);
}
.auth-container .card { width: 100%; max-width: 420px; }

/* ── Login Card ── */
.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
}
.login-logo {
  margin-bottom: 24px;
}
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 36px;
  line-height: 1.5;
}
.login-actions {
  margin-bottom: 32px;
}
.login-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  border-radius: var(--radius);
  justify-content: center;
}
.login-footer {
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .cycle-form-columns { grid-template-columns: 1fr; }
  .score-input-group { grid-template-columns: 1fr 1fr; }
  .score-breakdown { grid-template-columns: 1fr 1fr; }
  .score-buttons { grid-template-columns: repeat(5, 1fr); }
}
