/* ProBallers Coaching Finland — design system
   Stadium-night aesthetic: deep emerald greens, bright spring-green accent,
   warm gold highlights, glass cards. Brighter than v1 but still professional. */

@font-face {
  font-family: 'Big Shoulders';
  src: url('/assets/fonts/BigShoulders-Bold.ttf') format('truetype');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Big Shoulders';
  src: url('/assets/fonts/BigShoulders-Regular.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-Regular.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-Bold.ttf') format('truetype');
  font-weight: 700; font-display: swap;
}

:root {
  --bg: #08211a;
  --bg-2: #0c2b21;
  --card: rgba(255, 255, 255, 0.06);
  --card-solid: #0f2e23;
  --line: rgba(255, 255, 255, 0.13);
  --text: #f2fbf6;
  --muted: #9cc0ad;
  --lime: #3ee586;
  --lime-dark: #1fc468;
  --gold: #ffd166;
  --pitch: #12704a;
  --danger: #ff7a7a;
  --ok: #4ade80;
  --radius: 16px;
  --display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --body: 'Outfit', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { /* ambient glow — floodlights over the pitch */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 400px at 85% -5%, rgba(62, 229, 134, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(18, 112, 74, 0.45), transparent 65%),
    radial-gradient(600px 500px at 60% 110%, rgba(18, 112, 74, 0.35), transparent 60%),
    radial-gradient(500px 300px at 30% -10%, rgba(255, 209, 102, 0.06), transparent 60%);
}
main, header, footer { position: relative; z-index: 1; }

h1, h2, h3, .display {
  font-family: var(--display); text-transform: uppercase;
  letter-spacing: 0.02em; line-height: 0.95; margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: 0.04em; }
p { margin: 0 0 1em; }
a { color: var(--lime); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 33, 26, 0.8); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand span {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.brand em { color: var(--lime); font-style: normal; }
/* Auth actions (Admin / My calendar / Log out) stay on ONE compact row — on
   phones the buttons shrink instead of stacking out of the frame. */
#auth-box { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex-shrink: 0; }
@media (max-width: 640px) {
  /* The row may hold up to five controls (CTA + role buttons + logout + FI/EN).
     Let the actions drop onto a controlled second line instead of overflowing
     past the right edge of the screen. */
  .site-header .wrap { flex-wrap: wrap; height: auto; min-height: 52px; padding-top: 6px; padding-bottom: 6px; row-gap: 4px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .brand span { font-size: 0.95rem; letter-spacing: 0.04em; }
  #auth-box { gap: 5px; margin-left: auto; }
  #auth-box .btn { padding: 7px 10px; font-size: 0.74rem; white-space: nowrap; }
  .lang-toggle { padding: 2px; }
  .lang-opt { padding: 3px 7px; font-size: 0.66rem; }
}
@media (max-width: 380px) {
  .brand span em { display: none; } /* just "Proballers" on the smallest screens */
  #auth-box .btn { padding: 6px 8px; font-size: 0.7rem; }
  .lang-opt { padding: 3px 6px; font-size: 0.62rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 700; font-size: 0.95rem;
  border-radius: 999px; padding: 12px 22px; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--lime); color: #10160a;
  box-shadow: 0 0 24px rgba(62, 229, 134, 0.25);
}
.btn-primary:hover { box-shadow: 0 0 38px rgba(62, 229, 134, 0.45); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 107, 107, 0.4); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- language toggle (FI | EN) ---------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  background: rgba(255, 255, 255, 0.04); flex-shrink: 0;
}
.lang-opt {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--body); font-weight: 700; font-size: 0.72rem;
  padding: 4px 9px; border-radius: 999px; letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.lang-opt.on { background: rgba(62, 229, 134, 0.16); color: var(--lime); }
.lang-opt:not(.on):hover { color: var(--text); }

/* ---------- cards / layout ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(8px);
}
.grid { display: grid; gap: 18px; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: rgba(62, 229, 134, 0.12); color: var(--lime);
  border: 1px solid rgba(62, 229, 134, 0.25);
}
.chip.gray { background: rgba(255,255,255,0.06); color: var(--muted); border-color: var(--line); }
.chip-toggle {
  cursor: pointer; user-select: none;
  background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--line);
  padding: 9px 18px; font-size: 0.9rem;
}
.chip-toggle.on {
  background: rgba(62, 229, 134, 0.16); color: var(--lime);
  border-color: var(--lime);
}

/* ---------- sale ribbon ---------- */
.sale-banner {
  background: linear-gradient(90deg, var(--gold), var(--lime) 45%, var(--gold));
  color: #0b2013; text-align: center; font-weight: 700; font-size: 0.92rem;
  padding: 8px 14px; letter-spacing: 0.03em;
}
.price-old { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.price-new { color: var(--lime); font-weight: 700; }

/* ---------- hero carousel ---------- */
.hero { min-height: calc(100vh - 106px); display: flex; align-items: center; overflow: hidden; }
.hero .wrap { width: 100%; }
.carousel { position: relative; }
.slide {
  display: none; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  animation: slideIn 0.7s ease both;
}
.slide.active { display: grid; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.slide .kicker {
  color: var(--lime); font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; font-size: 0.8rem; margin-bottom: 14px;
}
.slide .bio { color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
.slide-photo {
  position: relative; aspect-ratio: 4/4.6; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(62, 229, 134, 0.07);
}
.slide-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.9s ease;
}
.slide-photo img.show { opacity: 1; }
.slide-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.dots { display: flex; gap: 10px; margin-top: 38px; }
.dot {
  width: 34px; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.14);
  border: none; cursor: pointer; padding: 0; position: relative; overflow: hidden;
}
.dot .fill {
  position: absolute; inset: 0; width: 0%; background: var(--lime); border-radius: 99px;
}
.dot.active .fill { animation: dotfill 5s linear forwards; }
@keyframes dotfill { from { width: 0; } to { width: 100%; } }

/* ---------- coach grid ---------- */
.section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.coach-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.coach-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.25s; }
.coach-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.coach-card .photo { aspect-ratio: 4/3.4; overflow: hidden; position: relative; }
.coach-card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coach-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.coach-card .bio { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.coach-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- star ratings & reviews ---------- */
.stars { position: relative; display: inline-block; white-space: nowrap;
  color: rgba(255,255,255,0.16); font-size: 1rem; letter-spacing: 2px; line-height: 1; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap;
  color: #ffc93a; }
.rating-line { display: inline-flex; align-items: center; gap: 8px; }
.reviews-toggle { background: none; border: none; color: var(--lime); cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline; }
.review { padding: 12px 0; border-top: 1px dashed var(--line); }
.review:first-child { border-top: none; }
.review-body { margin: 6px 0 4px; color: var(--text); font-size: 0.94rem; }
.review-form { margin-top: 10px; }
.star-pick { display: inline-flex; flex-direction: row-reverse; gap: 2px; font-size: 1.6rem; }
.star-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-pick label { color: rgba(255,255,255,0.18); cursor: pointer; transition: color .12s; }
.star-pick label:hover, .star-pick label:hover ~ label,
.star-pick input:checked ~ label { color: #ffc93a; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 4vh 16px 6vh;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 20px;
  width: 100%; max-width: 680px; padding: 28px; position: relative;
  animation: slideIn 0.3s ease both;
}
.modal .close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  color: var(--muted); font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.steps { display: flex; gap: 6px; margin: 6px 0 20px; }
.step-pill { height: 4px; flex: 1; border-radius: 99px; background: rgba(255,255,255,0.12); }
.step-pill.done { background: var(--lime); }

/* ---------- booking wizard ---------- */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.date-cell {
  min-width: 74px; padding: 10px 6px; border-radius: 12px; text-align: center;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03); cursor: pointer;
}
.date-cell .dow { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.date-cell .num { font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.date-cell.sel { border-color: var(--lime); background: rgba(62, 229, 134,0.12); }
.date-cell.none { opacity: 0.35; cursor: default; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 14px; }
.slot-btn {
  padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--text); font-weight: 700; cursor: pointer;
}
.slot-btn:hover { border-color: var(--lime); }
.slot-btn.sel { background: var(--lime); color: #101607; border-color: var(--lime); }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-card {
  padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.03); cursor: pointer; transition: border-color 0.15s;
}
.opt-card:hover { border-color: rgba(62, 229, 134,0.5); }
.opt-card.sel { border-color: var(--lime); background: rgba(62, 229, 134,0.09); }
.opt-card .t { font-weight: 700; }
.opt-card .d { color: var(--muted); font-size: 0.85rem; }
.review-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 10px; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], select, textarea, .input {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit;
  background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--line);
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid rgba(62, 229, 134, 0.5); border-color: transparent; }
.form-error { color: var(--danger); font-size: 0.9rem; min-height: 1.3em; margin: 6px 0; }

/* ---------- dashboard shared ---------- */
.dash-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 34px 0 22px; }
.dash-cols { grid-template-columns: 2fr 1fr; align-items: start; }
.stat-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.stat-card .label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.stat-card .value { font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1.1; color: var(--lime); }
.stat-card .sub { color: var(--muted); font-size: 0.8rem; }
.window-pills { display: flex; gap: 6px; }
.window-pills button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 99px; padding: 7px 16px; font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.window-pills button.on { background: var(--lime); color: #101607; border-color: var(--lime); }

table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: left; color: var(--muted); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 10px 10px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
table.data tr:hover td { background: rgba(255,255,255,0.025); }
.status-tag { padding: 3px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 700; }
.status-confirmed { background: rgba(96,165,250,0.15); color: #7fb5fb; }
.status-completed { background: rgba(74,222,128,0.15); color: var(--ok); }
.status-cancelled { background: rgba(255,107,107,0.13); color: var(--danger); }

/* ---------- availability calendar ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-scroll { overflow-x: auto; }
.cal {
  display: grid; grid-template-columns: 64px repeat(7, minmax(96px, 1fr));
  gap: 4px; min-width: 780px;
}
.cal .hd { text-align: center; padding: 8px 2px 10px; }
.cal .hd .dow { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.cal .hd .num { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.cal .hd.today .num { color: var(--lime); }
.cal .hr { font-size: 0.78rem; color: var(--muted); text-align: right; padding: 12px 8px 0 0; }
.cal-cell {
  height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025); cursor: pointer; position: relative;
  transition: background 0.1s, border-color 0.1s;
}
.cal-cell:hover { border-color: rgba(62, 229, 134,0.6); }
.cal-cell.avail { background: rgba(62, 229, 134, 0.22); border-color: rgba(62, 229, 134,0.55); }
.cal-cell.pending-add { background: rgba(62, 229, 134, 0.45); border-color: var(--lime); }
.cal-cell.pending-remove { background: rgba(255,107,107,0.18); border-color: rgba(255,107,107,0.5); }
.cal-cell.booked {
  background: var(--lime); border-color: var(--lime); cursor: default;
}
.cal-cell.booked::after {
  content: attr(data-label); position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700;
  color: #101607; overflow: hidden; padding: 0 4px; white-space: nowrap; text-overflow: ellipsis;
}
.cal-cell.past { opacity: 0.25; cursor: default; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.cal-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }

/* ---------- charts ---------- */
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--card-solid); border: 1px solid var(--lime); color: var(--text);
  border-radius: 12px; padding: 13px 22px; z-index: 200; opacity: 0;
  transition: opacity 0.25s, transform 0.25s; pointer-events: none; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--danger); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0; margin-top: 60px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .slide { grid-template-columns: 1fr; gap: 26px; }
  .slide-photo { aspect-ratio: 4/3; order: -1; }
  .hero { min-height: auto; padding: 34px 0 10px; }
  .section { padding: 56px 0; }
  .opt-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .dash-cols { grid-template-columns: 1fr; }
}

/* ---------- coach profile page ---------- */
.profile-hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; padding: 44px 0 20px; }
.profile-gallery .main {
  aspect-ratio: 4/4.2; border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(62, 229, 134, 0.08);
}
.profile-gallery .main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.profile-thumbs img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; opacity: 0.7; transition: opacity .15s, border-color .15s;
}
.profile-thumbs img.on { border-color: var(--lime); opacity: 1; }
.profile-price { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 8px; }
.coach-card { cursor: pointer; }
@media (max-width: 860px) {
  .profile-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .profile-gallery .main { aspect-ratio: 4/3.2; }
}
