/* Liikuntakummi - yhteiset tyylit
   ------------------------------------------------- */

:root {
  /* Primary - logon sininen ja sen vaihtelut */
  --blue: #0159c2;
  --blue-dark: #003f8f;
  --blue-darker: #002a66;
  --blue-light: #e8f1fb;
  --blue-soft: #cee0f4;

  /* Lämmin korostusväri vain CTA-painikkeisiin ja huomioihin */
  --orange: #ed8e3c;
  --orange-dark: #c66a1a;

  /* Neutraalit */
  --navy: #051c3a;
  --ink: #142036;
  --muted: #5b6680;
  --line: #dce5f0;
  --bg: #f4f8fc;
  --white: #ffffff;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(5, 41, 100, 0.10);
  --shadow-lg: 0 12px 40px rgba(5, 41, 100, 0.18);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* Layout ---------------------------------------------------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation ----------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex; align-items: center; gap: 14px;
  font-weight: 800; color: var(--ink); font-size: 1.35rem;
  line-height: 1.15;
}
.brand-logo {
  width: 64px; height: 64px; border-radius: 12px;
  object-fit: cover; display: block;
  box-shadow: var(--shadow);
  background: var(--blue);
}
.brand small { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }

.nav-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--ink); font-weight: 500;
}
.nav-links a:hover { background: var(--blue-light); text-decoration: none; }
.nav-links a.active { background: var(--blue); color: #fff; }

.nav-cta {
  background: var(--orange); color: #fff !important; font-weight: 700;
  padding: 10px 18px !important; border-radius: 10px !important;
}
.nav-cta:hover { background: var(--orange-dark); }

/* Hampurilaispainike (näkyy vain mobiilissa) ---------------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background .15s, border-color .15s;
}
.nav-toggle:hover { background: var(--blue-light); border-color: var(--blue-soft); }
.nav-toggle-bar {
  width: 22px; height: 2.5px; background: var(--ink);
  border-radius: 2px;
  transition: transform .22s ease, opacity .15s ease;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Hero ----------------------------------------------------- */
.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(900px 400px at -10% -20%, var(--blue-soft) 0%, transparent 60%),
    radial-gradient(700px 350px at 110% 10%, #ffe1c4 0%, transparent 55%),
    var(--white);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.1; margin: 0 0 16px;
  letter-spacing: -.02em;
}
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-illustration {
  background: var(--white); border-radius: 22px; padding: 12px;
  box-shadow: var(--shadow-lg); position: relative;
  overflow: hidden;
}
.hero-illustration svg { width: 100%; height: auto; }
.hero-illustration img {
  width: 100%; height: auto; display: block; border-radius: 14px;
}
.hero-illustration .photo-caption {
  text-align: center; font-size: .85rem; color: var(--muted);
  margin: 10px 4px 4px; font-style: italic;
}

/* Section image (used on palvelut/yhteystiedot) -- näytetään
   luonnollisessa kuvasuhteessa ilman pystysuuntaista rajaamista.
   Tämä takaa että esim. käsilläseisontakuvassa kädet näkyvät kokonaan. */
.section-image {
  width: 100%; height: auto; display: block;
  border-radius: 18px; box-shadow: var(--shadow); margin: 12px 0 28px;
}
.image-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
}
.image-grid img {
  width: 100%; border-radius: 18px; box-shadow: var(--shadow);
  aspect-ratio: 16 / 11; object-fit: cover;
}
@media (max-width: 820px) {
  .image-grid { grid-template-columns: 1fr; gap: 24px; }
}

.eyebrow {
  display: inline-block; background: var(--blue-light); color: var(--blue-dark);
  padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem;
  margin-bottom: 16px;
}

/* Buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; border: none; cursor: pointer;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(1,89,194,.35); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(240,138,43,.35); }
.btn-orange:hover { background: var(--orange-dark); }
.btn-ghost { background: var(--white); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Sections ------------------------------------------------- */
.section { padding: 64px 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 12px; letter-spacing: -.01em; }
.section-sub { color: var(--muted); margin: 0 0 36px; max-width: 640px; font-size: 1.05rem; }

/* Feature cards ------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--line); transition: transform .15s, box-shadow .15s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-light); color: var(--blue-dark);
  display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.15rem; }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Service cards ------------------------------------------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  position: relative; transition: transform .15s, box-shadow .15s;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.service-card.featured { border: 2px solid var(--orange); }
.service-card .badge {
  position: absolute; top: -12px; right: 20px;
  background: var(--orange); color: #fff; padding: 4px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
}
.service-card h3 { margin: 0 0 4px; font-size: 1.25rem; }
.service-card .duration { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.service-card .price {
  font-size: 2rem; font-weight: 800; color: var(--blue-dark);
  margin: 6px 0 4px;
}
.service-card .price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.service-card ul { padding-left: 0; list-style: none; margin: 16px 0 22px; }
.service-card ul li {
  padding: 6px 0 6px 28px; position: relative; color: var(--ink); font-size: .95rem;
}
.service-card ul li::before {
  content: "✓"; color: var(--blue); font-weight: 800; position: absolute; left: 0;
}
.service-card .btn { margin-top: auto; }

/* Pricing matrix ------------------------------------------- */
.pricing-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.pricing-table-wrap { overflow-x: auto; }
.pricing-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 1.02rem;
}
.pricing-table th, .pricing-table td {
  padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line);
}
.pricing-table thead th {
  background: var(--blue); color: #fff; font-weight: 700;
  padding: 14px 16px; font-size: 1rem;
}
.pricing-table thead th:first-child {
  border-top-left-radius: 12px; background: var(--blue-dark);
}
.pricing-table thead th:last-child { border-top-right-radius: 12px; }
.pricing-table tbody td:first-child {
  text-align: left; background: #f7faf8;
}
.pricing-table tbody tr:nth-child(even) td { background: #f4f8f5; }
.pricing-table tbody tr:nth-child(even) td:first-child { background: #eef5f1; }
.pricing-table tbody td { font-weight: 600; }
.pricing-table tbody td:not(:first-child) { color: var(--blue-dark); font-size: 1.1rem; }
.age-note { color: var(--orange-dark); font-size: .8rem; font-weight: 500; }

/* Palvelupistekortti (yksi sijainti) ----------------------- */
.location-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; background: var(--blue-light);
  border: 1.5px solid var(--blue-soft); border-radius: 12px;
}
.location-card .location-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 1.4rem;
  flex-shrink: 0;
}
.location-card strong { color: var(--blue-dark); font-size: 1.05rem; }

/* Option cards (varauskalenterin valitsimet) ---------------- */
.option-group {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.option-card {
  padding: 14px 12px; border-radius: 10px; cursor: pointer;
  background: #f3f6f4; border: 2px solid transparent;
  text-align: center; font-weight: 600; font-size: .95rem;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: background .12s, border-color .12s, transform .12s;
}
.option-card:hover { background: var(--blue-light); }
.option-card input { display: none; }
.option-card.selected {
  background: var(--blue); color: #fff;
  border-color: var(--blue-dark);
}
.option-card .sub {
  font-size: .8rem; opacity: .75; font-weight: 500;
}
.option-card.selected .sub { opacity: .9; }
.option-card.disabled {
  opacity: .4; cursor: not-allowed; pointer-events: none;
}

/* Virpiniemi-feature-lista --------------------------------- */
.virpiniemi-features {
  list-style: none; padding: 0; margin: 0;
}
.virpiniemi-features li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.virpiniemi-features li:last-child { border-bottom: none; }
.virpiniemi-features .vf-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--blue-light); color: var(--blue-dark);
  display: grid; place-items: center; font-size: 1.3rem;
  flex-shrink: 0;
}
.virpiniemi-features li strong { color: var(--blue-dark); }

/* Galleria (toimintakuvat) --------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.gallery-tile {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.gallery-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery-tile:hover img { transform: scale(1.05); }
.gallery-tile .caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(5,28,58,0) 0%, rgba(5,28,58,0.85) 100%);
  color: #fff;
  padding: 32px 16px 14px;
  font-size: .92rem; font-weight: 600;
  letter-spacing: .01em;
}
@media (max-width: 920px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery-tile { aspect-ratio: 4 / 3; }
}

/* Yrittäjä-kortti ------------------------------------------ */
.bio-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--line);
  display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start;
}
.bio-card img {
  width: 100%; border-radius: 14px;
  aspect-ratio: 3 / 4; object-fit: cover;
  /* Bias rajaus yläosaan jotta pää näkyy kokonaan */
  object-position: center 18%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--orange) 100%);
}
.bio-card h3 { margin: 0 0 4px; font-size: 1.4rem; }
.bio-card .role { color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.bio-card .credentials {
  list-style: none; padding: 0; margin: 12px 0 0;
}
.bio-card .credentials li {
  padding: 6px 0 6px 28px; position: relative; font-size: .95rem;
}
.bio-card .credentials li::before {
  content: "✓"; color: var(--blue); font-weight: 800;
  position: absolute; left: 0;
}

@media (max-width: 700px) {
  .bio-card { grid-template-columns: 1fr; }
  .bio-card img { max-width: 260px; margin: 0 auto; }
}

/* Steps ---------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step {
  background: var(--white); border-radius: var(--radius); padding: 22px;
  text-align: center; border: 1px solid var(--line); position: relative;
}
.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--orange); color: #fff; font-weight: 800;
  display: grid; place-items: center; margin: 0 auto 14px;
}
.step h4 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }

/* CTA banner ---------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; padding: 48px 36px; border-radius: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { margin: 0 0 6px; color: #fff; font-size: 1.7rem; }
.cta-banner p { margin: 0; opacity: .9; }

/* Forms ---------------------------------------------------- */
.form-card {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem;
}
.form-row .hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.form-row .required { color: var(--orange-dark); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); font-size: 1rem; background: #fff;
  font-family: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(1,89,194,.15);
}
.form-row textarea { min-height: 100px; resize: vertical; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; background: var(--blue-light); border-radius: 10px;
  margin-bottom: 10px;
}
.checkbox-row input { margin-top: 4px; }
.checkbox-row label { margin: 0; font-weight: 500; font-size: .95rem; cursor: pointer; }

/* Booking calendar --------------------------------------- */
.booking-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.cal-card { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }

.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cal-nav-btn {
  background: var(--blue-light); color: var(--blue-dark); border: none;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  font-size: 1.2rem; font-weight: 700;
}
.cal-nav-btn:hover { background: var(--blue); color: #fff; }
.cal-month-label { font-weight: 700; font-size: 1.1rem; text-transform: capitalize; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-grid .dow {
  text-align: center; font-weight: 700; font-size: .8rem; color: var(--muted);
  padding: 8px 0; text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; cursor: pointer;
  background: #f3f6f4; border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: background .12s;
  border: 2px solid transparent;
}
.cal-day:hover:not(.disabled):not(.empty) { background: var(--blue-light); }
.cal-day.selected { background: var(--blue); color: #fff; }
.cal-day.disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.today { border-color: var(--orange); }

.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.time-slot {
  padding: 10px; text-align: center; background: #f3f6f4; border-radius: 8px;
  cursor: pointer; font-weight: 600; font-size: .92rem;
  border: 2px solid transparent;
}
.time-slot:hover { background: var(--blue-light); }
.time-slot.selected { background: var(--blue); color: #fff; border-color: var(--blue-dark); }
.time-slot.taken { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.booking-summary { position: sticky; top: 90px; }
.summary-line {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: .95rem;
}
.summary-line:last-child { border-bottom: none; }
.summary-line strong { font-size: 1.05rem; }
.summary-line .label { color: var(--muted); }

/* Contract --------------------------------------------------- */
.contract-page { background: var(--white); padding: 0; }
.contract-doc {
  background: var(--white); padding: 48px;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); max-width: 820px; margin: 0 auto;
}
.contract-doc h1 { font-size: 1.8rem; margin: 0 0 4px; }
.contract-doc h2 { font-size: 1.15rem; margin: 24px 0 6px; color: var(--blue-dark); }
.contract-doc p { margin: 0 0 10px; }
.contract-doc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.contract-doc table td {
  padding: 8px 12px; border: 1px solid var(--line); vertical-align: top;
}
.contract-doc table td:first-child { background: #f7faf8; font-weight: 600; width: 40%; }

.signature-area {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px;
}
.sig-block { padding: 16px; border: 1.5px dashed var(--line); border-radius: 10px; }
.sig-block h3 { margin: 0 0 6px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sig-canvas {
  width: 100%; height: 140px; background: #fafbfa;
  border: 1px solid var(--line); border-radius: 8px; cursor: crosshair;
  display: block;
}
.sig-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: .85rem; }
.sig-clear { background: none; border: none; color: var(--orange-dark); cursor: pointer; font-weight: 600; }

.actions-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; flex-wrap: wrap; }

/* Hallintasivu (login + admin) ----------------------------- */
.login-card {
  background: var(--white); border-radius: 18px;
  padding: 48px 36px; box-shadow: var(--shadow-lg);
  text-align: center; max-width: 480px; margin: 0 auto;
  border: 1px solid var(--line);
}
.login-card .login-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--blue-light); color: var(--blue-dark);
  display: grid; place-items: center; font-size: 2rem;
  margin: 0 auto 18px;
}
.login-card h1 { margin: 0 0 12px; font-size: 1.8rem; }
.login-card p { color: var(--muted); margin: 0 0 26px; }
.google-g {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #4285F4; font-weight: 800;
  font-family: Arial, sans-serif; font-size: .95rem;
  margin-right: 4px;
}

.admin-user-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 18px;
  margin-bottom: 24px; box-shadow: var(--shadow);
}
.admin-user-bar img {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-light); object-fit: cover; flex-shrink: 0;
}
.admin-user-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.admin-user-info strong { font-size: 1rem; }
.admin-user-info span { font-size: .85rem; color: var(--muted); word-break: break-all; }

/* Hallintasivu --------------------------------------------- */
.admin-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 20px 0 28px;
}
.stat-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-num {
  font-size: 2rem; font-weight: 800; color: var(--blue-dark);
  line-height: 1.1; margin-bottom: 4px;
}
.stat-label { color: var(--muted); font-size: .9rem; font-weight: 500; }

.admin-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  align-items: start;
}

/* Päivän statuspisteet kalenterissa */
.cal-day.d-booked::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); position: absolute; bottom: 4px;
}
.cal-day.d-blocked::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange-dark); position: absolute; bottom: 4px;
}
.cal-day.d-partial::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); position: absolute; bottom: 4px;
}
.cal-day { position: relative; }

.cal-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 14px; font-size: .85rem; color: var(--muted);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cal-legend .dot-free { background: #e3eaef; }
.cal-legend .dot-partial { background: var(--orange); }
.cal-legend .dot-blocked { background: var(--orange-dark); }
.cal-legend .dot-booked { background: var(--blue); }
.cal-legend .dot-partial-customer { background: var(--orange); }
.cal-legend .dot-full { background: #b6c0cc; border: 2px solid #8693a3; box-sizing: border-box; }

/* Asiakaskalenterin päivän tilan indikaattorit */
.cal-day.d-partial-customer::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); position: absolute; bottom: 4px;
}
.cal-day.d-full {
  background: #ebeef2 !important; color: #8693a3 !important;
  text-decoration: line-through;
}
.cal-day.d-full:hover { background: #ebeef2 !important; }

/* Päivän kellonajat hallinnassa */
.admin-slots {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  margin-top: 12px;
}
.admin-slot {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 10px;
  background: #f3f6f9; border: 1.5px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s;
  font-weight: 600;
}
.admin-slot strong { font-size: 1.05rem; }
.admin-slot small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.admin-slot .slot-label {
  margin-left: auto; font-size: .9rem; font-weight: 500; color: var(--muted);
}
.admin-slot.status-free { background: #eef7f0; border-color: #cbe6d4; }
.admin-slot.status-free:hover { background: #d4e9dc; }
.admin-slot.status-free .slot-label { color: #2f8f4f; }
.admin-slot.status-blocked {
  background: #fff0e0; border-color: #f3c896; color: var(--orange-dark);
}
.admin-slot.status-blocked:hover { background: #fbdfbf; }
.admin-slot.status-blocked .slot-label { color: var(--orange-dark); }
.admin-slot.status-booked {
  background: var(--blue-light); border-color: var(--blue-soft); cursor: default;
}
.admin-slot.status-booked .slot-label { color: var(--blue-dark); }

.btn-sm { padding: 8px 14px; font-size: .9rem; }

/* Varauskortit hallinnassa */
.booking-card {
  display: grid; grid-template-columns: 200px 1fr 180px; gap: 20px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; margin-bottom: 12px;
  box-shadow: var(--shadow);
  align-items: start;
}
.booking-date { font-weight: 700; color: var(--blue-dark); }
.booking-time { color: var(--muted); margin-top: 2px; }
.booking-customer { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.booking-meta { color: var(--muted); font-size: .92rem; margin-top: 4px; line-height: 1.5; }
.booking-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.booking-id {
  font-size: .75rem; color: var(--muted); font-family: monospace;
  background: #f3f6f9; padding: 3px 8px; border-radius: 6px;
}

@media (max-width: 820px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
  .booking-card { grid-template-columns: 1fr; }
  .booking-actions { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Footer ------------------------------------------------- */
.site-footer {
  background: var(--navy); color: #d4dde8; padding: 48px 0 24px; margin-top: 64px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.footer-grid a { color: #d4dde8; display: block; padding: 4px 0; }
.footer-grid a:hover { color: var(--orange); text-decoration: none; }
.footer-bottom {
  text-align: center; padding-top: 24px; margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; opacity: .7;
}

/* Alerts & toasts ---------------------------------------- */
.alert {
  padding: 14px 18px; border-radius: 10px; margin: 16px 0;
  font-weight: 500; border-left: 4px solid;
}
.alert-info { background: var(--blue-light); border-left-color: var(--blue); color: var(--blue-dark); }
.alert-success { background: #e1f5e8; border-left-color: #2f8f4f; color: #1f6c3a; }
.alert-warning { background: #fff4e0; border-left-color: var(--orange); color: var(--orange-dark); }

/* Print styles for contract ----------------------------- */
@media print {
  .site-header, .site-footer, .actions-row, .no-print { display: none !important; }
  body { background: #fff; }
  .contract-doc { box-shadow: none; border: none; padding: 0; max-width: 100%; }
  .container { padding: 0; }
}

/* Responsive ---------------------------------------------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .booking-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .signature-area { grid-template-columns: 1fr; }
  .contract-doc { padding: 24px; }
}

/* Mobiilivalikko otetaan käyttöön kun yläpalkki alkaa ruuhkautua */
@media (max-width: 820px) {
  .nav { position: relative; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 60;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 1rem;
  }
  .nav-links a.nav-cta {
    margin-top: 6px;
    text-align: center;
  }
  /* Pienennetään logoa ja brändiä tabletilla */
  .brand { font-size: 1.2rem; gap: 12px; }
  .brand-logo { width: 56px; height: 56px; }
  .brand small { font-size: .72rem; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  /* Pienille näytöille kompaktimpi brändi */
  .brand { font-size: 1.1rem; gap: 10px; }
  .brand-logo { width: 48px; height: 48px; border-radius: 10px; }
  .brand small { display: none; }
}
