/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --ink:        #1a1a1a;
  --ink-soft:   #4a4a4a;
  --muted:      #888;
  --bg:         #faf9f7;
  --surface:    #ffffff;
  --brand:      #7c9a7e;
  --brand-dark: #5a7a5c;
  --brand-pale: #eef4ee;
  --accent:     #c8a97e;
  --line:       #e8e3dc;
  --line-soft:  #f0ece6;
  --danger:     #c0392b;
  --danger-pale:#fdecea;
  --warn-pale:  #fff8e1;
  --ok-pale:    #e8f5e9;
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:     0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --font-body:  'Inter', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--ink); }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }
main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 400; font-style: italic;
  color: var(--ink); letter-spacing: 0.02em;
}
.logo-tagline {
  font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
  font-weight: 500;
}
nav {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
}
nav a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--ink-soft); padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
nav a:hover { background: var(--line-soft); color: var(--ink); }
.nav-btn {
  font: 500 13px/1 var(--font-body);
  letter-spacing: 0.04em; cursor: pointer; border: none;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: var(--line-soft); color: var(--ink); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #f0ede6 0%, #e8f0e8 50%, #ede8f0 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(124,154,126,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brand-dark);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 300; font-style: italic;
  line-height: 1.15; color: var(--ink);
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: 1.05rem; color: var(--ink-soft);
  max-width: 520px; margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ── Section headers ──────────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem;
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem; font-weight: 400; font-style: italic;
  color: var(--ink);
}
.section-header a { font-size: 13px; color: var(--brand-dark); font-weight: 500; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* Course card specific */
.course-card {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.course-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.course-card h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 400; line-height: 1.2;
}
.course-card h2 a { color: var(--ink); }
.course-card h2 a:hover { color: var(--brand-dark); }
.course-price {
  font-size: 1.1rem; font-weight: 600; color: var(--brand-dark);
  white-space: nowrap; flex-shrink: 0;
}
.course-card p { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; }
.course-meta {
  display: flex; flex-direction: column; gap: 0.3rem;
  font-size: 0.82rem; color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 0.75rem; margin-top: auto;
}
.course-meta span { display: flex; align-items: center; gap: 0.4rem; }
.course-card .btn { align-self: flex-start; margin-top: 0.25rem; }

/* Dashboard stat cards */
.stat-card { text-align: center; padding: 1.75rem; }
.stat-card .stat-num {
  font-family: var(--font-serif);
  font-size: 2.8rem; font-weight: 300; color: var(--brand-dark);
  line-height: 1;
}
.stat-card .stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.25rem; }

/* Link cards for dashboard */
.btn-card { text-decoration: none; color: var(--ink); display: block; cursor: pointer; }
.btn-card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.25rem; }
.btn-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: 500 13px/1.4 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none; color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: var(--line-soft); border-color: #ccc; color: var(--ink); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--brand); border-color: var(--brand-dark); color: #fff;
}
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.accent {
  background: var(--accent); border-color: #b8976c; color: #fff;
}
.btn.accent:hover { background: #b8976c; color: #fff; }
.btn.danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.lg { padding: 0.7rem 1.5rem; font-size: 14px; border-radius: var(--radius); }
.btn.full-width { width: 100%; justify-content: center; }
button.btn { font: inherit; }

/* ── Tags / Badges ────────────────────────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--line-soft); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.tag.green { background: var(--brand-pale); color: var(--brand-dark); border-color: #c0d4c0; }
.tag.amber { background: #fff8e1; color: #8a6500; border-color: #f0d070; }
.tag.blue  { background: #e8f0fb; color: #2c5282; border-color: #bee3f8; }
.tag.red   { background: var(--danger-pale); color: var(--danger); border-color: #f5c6c2; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table thead th {
  background: var(--line-soft); font-weight: 600;
  padding: 0.65rem 0.9rem; text-align: left;
  border-bottom: 2px solid var(--line); font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft);
}
.table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line-soft); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--line-soft); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-stack { display: flex; flex-direction: column; gap: 1.1rem; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: 15px var(--font-body);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124,154,126,0.15);
}
.field.checkbox { flex-direction: row; align-items: center; gap: 0.6rem; }
.field.checkbox input { width: 16px; height: 16px; flex-shrink: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 0.15rem; }

/* Auth pages */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-card .auth-logo {
  text-align: center; margin-bottom: 2rem;
}
.auth-card .auth-logo span {
  font-family: var(--font-serif);
  font-size: 1.8rem; font-style: italic; color: var(--ink);
}
.auth-card h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.3rem; }
.auth-card .auth-subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.75rem; }
.auth-divider {
  text-align: center; color: var(--muted); font-size: 13px;
  margin: 1.25rem 0; position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--line);
}
.auth-divider span { background: var(--surface); padding: 0 0.75rem; position: relative; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem; margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.alert.error   { background: var(--danger-pale); border-color: #f5c6c2; color: #9b1c1c; }
.alert.warning { background: var(--warn-pale);   border-color: #f0d070; color: #7a5500; }
.alert.success { background: var(--ok-pale);     border-color: #b2dfbc; color: #1a5e20; }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; }
.kv dt { font-weight: 600; font-size: 0.875rem; color: var(--ink-soft); }
.kv dd { font-size: 0.875rem; }
h1 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 300; font-style: italic; margin-bottom: 0.5rem; }
h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; align-items: center; margin-top: 2rem; }

/* Filters */
.filters-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem; align-items: end;
}
.filter-form label { display: grid; gap: 0.3rem; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.filter-form input, .filter-form select {
  padding: 0.5rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: 14px var(--font-body);
  background: var(--surface);
}
.filter-form input:focus, .filter-form select:focus {
  outline: none; border-color: var(--brand);
}

/* Page title row */
.page-title-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap;
}
.page-title-row h1 { margin-bottom: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0;
  margin-top: 4rem;
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-style: italic; color: var(--ink-soft);
}
.site-footer p { font-size: 13px; color: var(--muted); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wrap { padding: 0 1rem; }
  .hero { padding: 2.5rem 1.5rem; }
  .field-row { grid-template-columns: 1fr; }
  .site-header .wrap { gap: 1rem; }
  nav a { padding: 6px 8px; font-size: 12px; }
  .cards { grid-template-columns: 1fr; }
  .page-title-row { flex-direction: column; align-items: flex-start; }
}
