:root {
  --primary:   #3B82F6;
  --secondary: #1E40AF;
  --bg:        #F9FAFB;
  --surface:   #FFFFFF;
  --text:      #111827;
  --muted:     #6B7280;
  --border:    #E5E7EB;
  --radius:    6px;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ── Layout ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .logo {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--primary);
}

.site-header nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-header nav a:hover { color: var(--text); }

.site-main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Flash messages ── */
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.flash--success { background: #D1FAE5; color: #065F46; }
.flash--error   { background: #FEE2E2; color: #991B1B; }
.flash--info    { background: #DBEAFE; color: #1E40AF; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .35rem; }
.form-group input {
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  background: var(--surface);
}
.form-group input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: .55rem 1.25rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn--primary  { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--secondary); }
.btn--block    { display: block; width: 100%; text-align: center; }
.btn--sm       { padding: .35rem .8rem; font-size: .85rem; }

/* ── Auth pages ── */
.auth-wrapper {
  max-width: 420px;
  margin: 3rem auto;
}
.auth-wrapper h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.auth-footer { margin-top: 1rem; font-size: .875rem; text-align: center; color: var(--muted); }
.auth-footer a { color: var(--primary); text-decoration: none; }

/* ── Dashboard ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.stat-card { text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: .85rem; color: var(--muted); margin-top: .25rem; }

/* ── Feedback buttons ── */
.feedback-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .25rem .5rem;
  font-size: .85rem;
  cursor: pointer;
  opacity: .6;
  transition: opacity .15s, background .15s;
}
.feedback-btn:hover { opacity: 1; }
.feedback-btn--up.active  { background: #D1FAE5; border-color: #10B981; opacity: 1; }
.feedback-btn--down.active { background: #FEE2E2; border-color: #EF4444; opacity: 1; }
