:root {
  --ink: #1f2430;
  --muted: #6b7280;
  --paper: #fdfaf4;
  --card: #ffffff;
  --border: #e7e1d3;
  --accent: #b8722f;
  --accent-dark: #935a22;
  --ok-bg: #eaf6ec; --ok-ink: #1e6b34;
  --err-bg: #fdecea; --err-ink: #a1291a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand span { color: var(--accent); }
.site-header nav { display: flex; gap: 18px; align-items: center; }
.site-header nav a { color: var(--ink); font-weight: 500; }
.btn-primary-sm, .btn-ghost {
  padding: 8px 16px; border-radius: 8px; font-weight: 600; text-decoration: none !important;
}
.btn-primary-sm { background: var(--accent); color: #fff !important; }
.btn-primary-sm:hover { background: var(--accent-dark); }
.btn-ghost { border: 1px solid var(--border); color: var(--ink) !important; }

.flash { padding: 12px 0; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }

main { min-height: 60vh; }

.hero { padding: 70px 0 50px; text-align: center; }
.hero h1 { font-size: 2.4rem; margin: 0 0 14px; }
.hero p.tagline { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; }
.btn-primary, .btn-secondary { padding: 13px 26px; border-radius: 10px; font-weight: 700; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { border: 1px solid var(--border); color: var(--ink) !important; background: #fff; }

.section { padding: 40px 0; }
.section h2 { text-align: center; margin-bottom: 26px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.review-card .stars { color: #d9a441; letter-spacing: 2px; margin-bottom: 8px; }
.review-card p.text { margin: 0 0 10px; }
.review-card .who { color: var(--muted); font-size: .9rem; }
.reviews-empty { text-align: center; color: var(--muted); padding: 30px; }
.reviews-empty .big-stars { color: #d9a441; font-size: 1.6rem; letter-spacing: 4px; }

.auth-form { max-width: 400px; margin: 50px auto; }
.auth-form h1 { text-align: center; margin-bottom: 22px; font-size: 1.6rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem;
  background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 90px; }
.auth-form .btn-primary { width: 100%; border: none; cursor: pointer; }
.auth-form .switch { text-align: center; margin-top: 16px; color: var(--muted); }

.panel-wrap { padding: 30px 0 60px; }
.panel-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.panel-tabs a { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.panel-tabs a.active { color: var(--accent-dark); border-color: var(--accent); }

.financials { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.financials .stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.financials .stat .num { font-size: 1.6rem; font-weight: 700; color: var(--accent-dark); }
.financials .stat .label { color: var(--muted); font-size: .85rem; margin-top: 4px; }

.session-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.session-row:last-child { border-bottom: none; }
.session-row .date { font-weight: 600; }
.session-row .meta { color: var(--muted); font-size: .9rem; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.badge-completed { background: #eaf6ec; color: #1e6b34; }
.badge-scheduled { background: #eaf2fb; color: #1a5aa8; }
.badge-cancelled { background: #fdecea; color: #a1291a; }
.badge-confirmed { background: #fff4e2; color: #9a6300; }
.feedback-note { background: #faf6ec; border: 1px dashed var(--border); border-radius: 8px; padding: 10px 14px; margin-top: 8px; font-size: .92rem; }

.chat-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; height: 420px; overflow-y: auto; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: .95rem; }
.msg-student { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.msg-teacher { align-self: flex-start; background: #f1efe8; color: var(--ink); border-bottom-left-radius: 3px; }
.msg time { display: block; font-size: .72rem; opacity: .7; margin-top: 4px; }
.chat-form { display: flex; gap: 10px; }
.chat-form textarea { flex: 1; min-height: 46px; max-height: 120px; }
.chat-form button { padding: 0 22px; border: none; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 700; cursor: pointer; }

.empty-note { color: var(--muted); text-align: center; padding: 30px 0; }
.star-input { display: flex; gap: 6px; font-size: 1.6rem; margin-bottom: 4px; }
.star-input label { cursor: pointer; color: #d5cfc0; }
.star-input input { display: none; }
.star-input input:checked ~ label,
.star-input label:hover, .star-input label:hover ~ label { color: #d9a441; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; padding: 24px 0; margin-top: 40px; text-align: center; }
