/* ==========================================================================
   Taksitulot – ulkoasu
   Asfaltti ja kattovalon keltainen. Barlow (tienviittakirjaimisto) tekstille,
   Barlow Condensed numeroille ja otsikoille.
   ========================================================================== */

:root {
  --asfaltti: #1B2230;
  --yo: #232C3D;
  --yo-2: #2E3A50;
  --yo-viiva: #3A4760;
  --kattovalo: #FFC629;
  --kattovalo-tumma: #E8AC00;
  --kattovalo-heijastus: rgba(255, 198, 41, .42);
  --paperi: #EEF1F5;
  --pinta: #FFFFFF;
  --pinta-2: #F6F8FB;
  --viiva: #DDE2EA;
  --viiva-tumma: #C6CDD8;
  --teksti: #1B2230;
  --himmea: #5C687C;
  --himmea-2: #8A94A6;
  --vihrea: #17845A;
  --punainen: #C2362B;

  --r-iso: 18px;
  --r: 11px;
  --r-pieni: 8px;

  --fontti: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fontti-kapea: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;

  --bs-body-font-family: var(--fontti);
  --bs-body-bg: var(--paperi);
  --bs-body-color: var(--teksti);
  --bs-border-color: var(--viiva);
  --bs-secondary-color: var(--himmea);
  --bs-link-color-rgb: 27, 34, 48;
  --bs-link-hover-color-rgb: 27, 34, 48;
  --bs-border-radius: var(--r-pieni);
}

body {
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { text-underline-offset: .18em; }
h1, h2, h3, .kapea { font-family: var(--fontti-kapea); font-weight: 600; letter-spacing: .005em; color: inherit; }
h2 { font-size: 1.45rem; }
:focus-visible { outline: 3px solid var(--kattovalo); outline-offset: 2px; }
.text-secondary { color: var(--himmea) !important; }

/* ---------- Painikkeet ja lomakkeet ---------- */
.btn { --bs-btn-border-radius: var(--r); --bs-btn-font-weight: 600; --bs-btn-padding-y: .55rem; --bs-btn-padding-x: 1.05rem; }
.btn-sm { --bs-btn-border-radius: var(--r-pieni); --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .6rem; }
.btn-taksi {
  --bs-btn-bg: var(--kattovalo); --bs-btn-border-color: var(--kattovalo); --bs-btn-color: var(--asfaltti);
  --bs-btn-hover-bg: var(--kattovalo-tumma); --bs-btn-hover-border-color: var(--kattovalo-tumma); --bs-btn-hover-color: var(--asfaltti);
  --bs-btn-active-bg: var(--kattovalo-tumma); --bs-btn-active-border-color: var(--kattovalo-tumma); --bs-btn-active-color: var(--asfaltti);
  --bs-btn-disabled-bg: var(--kattovalo); --bs-btn-disabled-border-color: var(--kattovalo); --bs-btn-disabled-color: var(--asfaltti);
}
.btn-tumma {
  --bs-btn-bg: var(--asfaltti); --bs-btn-border-color: var(--asfaltti); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--yo-2); --bs-btn-hover-border-color: var(--yo-2); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--yo); --bs-btn-active-color: #fff;
}
.btn-haamu {
  --bs-btn-bg: var(--pinta); --bs-btn-border-color: var(--viiva-tumma); --bs-btn-color: var(--teksti);
  --bs-btn-hover-bg: var(--pinta-2); --bs-btn-hover-border-color: var(--himmea-2); --bs-btn-hover-color: var(--teksti);
  --bs-btn-active-bg: var(--paperi);
}
.btn-vaara { --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-color: var(--punainen); --bs-btn-hover-bg: #FCECEA; --bs-btn-hover-color: var(--punainen); }

.form-label { font-weight: 500; font-size: .92rem; margin-bottom: .3rem; }
.form-control, .form-select {
  border-color: var(--viiva-tumma);
  border-radius: var(--r-pieni);
  padding: .55rem .75rem;
  background-color: var(--pinta);
}
.form-control:focus, .form-select:focus {
  background-color: var(--pinta);
  color: var(--teksti);
  border-color: var(--asfaltti);
  box-shadow: 0 0 0 3px var(--kattovalo-heijastus);
}
.form-control::placeholder { color: var(--himmea-2); }
.form-text { color: var(--himmea); font-size: .85rem; }
.form-check-input:checked { background-color: var(--asfaltti); border-color: var(--asfaltti); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--kattovalo-heijastus); border-color: var(--asfaltti); }

/* ---------- Yläpalkki ---------- */
.ylapalkki { background: var(--asfaltti); color: #fff; position: sticky; top: 0; z-index: 1030; }
.ylapalkki-sisus { display: flex; align-items: center; gap: 2rem; height: 62px; }
.merkki { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.merkki:hover { color: #fff; }
.kupu-pieni {
  display: inline-block;
  background: var(--kattovalo);
  color: var(--asfaltti);
  font: 700 .74rem/1 var(--fontti-kapea);
  letter-spacing: .14em;
  padding: .42rem .7rem .36rem .78rem;
  clip-path: polygon(11% 0, 89% 0, 100% 100%, 0 100%);
  border-radius: 6px 6px 2px 2px;
}
.paanav { gap: .25rem; }
.paanav a {
  color: #AEB8C9;
  text-decoration: none;
  font-weight: 500;
  padding: .45rem .8rem;
  border-radius: var(--r-pieni);
}
.paanav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.paanav a.aktiivinen { color: #fff; box-shadow: inset 0 -2px 0 var(--kattovalo); border-radius: 0; }

.profiilinappi {
  display: flex; align-items: center; gap: .55rem;
  background: transparent; border: 0; color: #fff;
  padding: .3rem .5rem .3rem .3rem; border-radius: 999px; font-weight: 500;
}
.profiilinappi:hover { background: rgba(255, 255, 255, .07); }
.kayttajavalikko { min-width: 16rem; padding: .4rem; border-color: var(--viiva); border-radius: var(--r); box-shadow: 0 16px 40px rgba(27, 34, 48, .16); }
.kayttajavalikko-paa { display: flex; gap: .7rem; align-items: center; padding: .6rem .6rem .8rem; border-bottom: 1px solid var(--viiva); margin-bottom: .35rem; }
.kayttajavalikko .dropdown-item { border-radius: var(--r-pieni); padding: .5rem .6rem; display: flex; gap: .6rem; align-items: center; }
.dropdown-item:active { background: var(--asfaltti); }

/* Mobiilin alapalkki */
.alanav {
  position: fixed; inset: auto 0 0 0; z-index: 1030;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--asfaltti);
  padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--yo-viiva);
}
.alanav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: #97A2B5; text-decoration: none; font-size: .72rem; font-weight: 500; padding: .3rem 0; }
.alanav i { font-size: 1.3rem; line-height: 1; }
.alanav a.aktiivinen { color: var(--kattovalo); }
@media (max-width: 767.98px) { body.kirjautunut .sivu { padding-bottom: 5.5rem; } }

/* ---------- Avatarit ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; background: var(--paperi); }
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; }
.avatar-md { width: 44px; height: 44px; font-size: .95rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.2rem; }
.avatar-kirjaimet {
  background: hsl(var(--h) 38% 88%);
  color: hsl(var(--h) 45% 26%);
  font-family: var(--fontti-kapea); font-weight: 700; letter-spacing: .03em;
}
.ylapalkki .avatar { box-shadow: 0 0 0 2px var(--yo-2); }

/* ---------- Sivun yläosa ---------- */
.hero { background: var(--asfaltti); color: #fff; padding: 2.25rem 0 2.5rem; position: relative; }
.hero::after {
  /* Taksin ruutunauha */
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: repeating-conic-gradient(var(--asfaltti) 0 25%, var(--kattovalo) 0 50%) 0 0 / 12px 12px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); line-height: 1; margin: 0; color: #fff; }
.hero-ala { color: #A3AEC0; margin: .5rem 0 0; }
.hero a:not(.btn) { color: #fff; }
.sivu-runko { padding-top: 2.75rem; padding-bottom: 2.5rem; }

.nuolinappi {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; color: #fff; border: 1px solid var(--yo-viiva); text-decoration: none;
}
.nuolinappi:hover { background: var(--yo-2); color: #fff; }
.hero .form-control { background: var(--yo); border-color: var(--yo-viiva); color: #fff; color-scheme: dark; }
.hero .form-control:focus { background: var(--yo); color: #fff; border-color: var(--kattovalo); }
.hero .btn-haamu { --bs-btn-bg: transparent; --bs-btn-border-color: var(--yo-viiva); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--yo-2); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--yo-viiva); }

/* ---------- Paneelit ---------- */
.paneeli { background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r-iso); }
.paneeli-sisus { padding: 1.5rem; }
.paneeli-otsikko { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--viiva); }
.paneeli-otsikko h2 { margin: 0; font-size: 1.35rem; }
.paneeli h2 { margin-bottom: .35rem; }
.paneeli > .table-responsive { border-radius: 0 0 var(--r-iso) var(--r-iso); }
@media (max-width: 575.98px) { .paneeli-sisus { padding: 1.15rem; } .paneeli-otsikko { padding: 1rem 1.15rem; } }

.taulu { --bs-table-bg: transparent; margin: 0; }
.taulu > thead > tr > th { font-size: .82rem; font-weight: 600; color: var(--himmea); background: var(--pinta-2); padding: .65rem .75rem; border-bottom-color: var(--viiva); white-space: nowrap; }
.taulu > tbody > tr > td, .taulu > tbody > tr > th, .taulu > tfoot > tr > * { padding: .75rem; border-color: var(--viiva); vertical-align: middle; }
.taulu > tbody > tr:last-child > * { border-bottom: 0; }
.taulu .ensimmainen { padding-left: 1.5rem; }
.taulu .viimeinen { padding-right: 1.5rem; }

.tila { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; padding: .18rem .6rem; border-radius: 999px; }
.tila::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tila-ok { background: #E3F4EC; color: var(--vihrea); }
.tila-avoin { background: #FFF4D1; color: #8A6100; }
.tila-pois { background: #ECEFF3; color: var(--himmea); }
.tila-vaara { background: #FCE8E6; color: var(--punainen); }
.rooli { font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--paperi); color: var(--himmea); }
.rooli-admin { background: var(--asfaltti); color: var(--kattovalo); }

/* ---------- Ilmoitukset ---------- */
.ilmoitukset { position: fixed; top: 74px; right: 1rem; z-index: 1080; display: grid; gap: .5rem; width: min(400px, calc(100vw - 2rem)); }
body.vieras .ilmoitukset { top: 1rem; }
.ilmoitus {
  display: flex; align-items: flex-start; gap: .7rem;
  background: var(--asfaltti); color: #fff; border-radius: var(--r);
  padding: .8rem .8rem .8rem 1rem; box-shadow: 0 14px 34px rgba(27, 34, 48, .28);
  animation: ilmoitus-sisaan .25s ease-out;
}
.ilmoitus > i { font-size: 1.1rem; margin-top: .05rem; }
.ilmoitus span { flex: 1; }
.ilmoitus-success > i { color: #5DD39E; }
.ilmoitus-danger > i { color: #FF8A80; }
.ilmoitus-warning > i, .ilmoitus-info > i { color: var(--kattovalo); }
.ilmoitus-sulje { background: none; border: 0; color: #8D98AB; padding: 0 .2rem; line-height: 1; }
.ilmoitus-sulje:hover { color: #fff; }
.ilmoitus.poistuu { opacity: 0; transform: translateY(-6px); transition: .2s; }
@keyframes ilmoitus-sisaan { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 767.98px) { .ilmoitukset { top: auto; bottom: 5.25rem; right: 1rem; } body.vieras .ilmoitukset { top: 1rem; bottom: auto; } }

/* ==========================================================================
   Kirjautuminen, rekisteröityminen, asennus
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-taide {
  background: radial-gradient(60% 45% at 50% 38%, rgba(255, 198, 41, .13), transparent 70%), var(--asfaltti);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem; color: #fff; position: relative; overflow: hidden;
}
.auth-taide::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px;
  background: repeating-conic-gradient(var(--asfaltti) 0 25%, var(--kattovalo) 0 50%) 0 0 / 16px 16px;
}
.kupu-kehys { filter: drop-shadow(0 0 34px rgba(255, 198, 41, .55)); animation: syty 1.4s ease-out both; }
.kattokupu {
  width: 270px; height: 96px;
  display: grid; place-items: center;
  background: linear-gradient(#FFDC6E, var(--kattovalo) 55%, #EDB212);
  clip-path: polygon(9% 0, 91% 0, 100% 100%, 0 100%);
  border-radius: 14px 14px 0 0;
  color: var(--asfaltti);
  font: 700 3.5rem/1 var(--fontti-kapea);
  letter-spacing: .16em; text-indent: .16em;
}
.kupu-jalka { width: 300px; height: 12px; background: #0E131C; border-radius: 3px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.auth-iskulause { max-width: 22rem; text-align: center; color: #A9B3C4; margin: 2.5rem 0 0; font-size: 1.05rem; line-height: 1.55; }
@keyframes syty {
  0% { opacity: .15; filter: drop-shadow(0 0 0 transparent); }
  18% { opacity: 1; }
  24% { opacity: .35; }
  34% { opacity: 1; }
  100% { opacity: 1; }
}
.auth-lomake { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; background: var(--pinta); }
.auth-sisus { width: 100%; max-width: 380px; }
.auth-sisus h1 { font-size: 2.3rem; margin: 0 0 .35rem; }
.auth-sisus .johdanto { color: var(--himmea); margin-bottom: 1.75rem; }
.auth-sisus .form-control { padding: .7rem .85rem; }
.auth-sisus .btn { padding-top: .75rem; padding-bottom: .75rem; }
.auth-virhe { display: flex; gap: .6rem; background: #FCECEA; color: #8F2219; border-radius: var(--r-pieni); padding: .7rem .85rem; margin-bottom: 1.25rem; font-size: .95rem; }
.auth-alaviite { color: var(--himmea); font-size: .9rem; margin-top: 1.5rem; }
@media (max-width: 899.98px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-taide { padding: 2.25rem 1.5rem 2.75rem; }
  .kattokupu { width: 170px; height: 60px; font-size: 2.2rem; }
  .kupu-jalka { width: 190px; height: 8px; }
  .auth-iskulause { display: none; }
  .auth-lomake { align-items: flex-start; padding-top: 2.25rem; }
}

/* ==========================================================================
   Vuosinäkymä
   ========================================================================== */
.vuosi-otsikko { display: flex; align-items: center; gap: .75rem; }
.vuosi-tulot { margin-top: 1.75rem; }
.vuosi-tulot .tarra { color: #A3AEC0; font-size: .95rem; }
.vuosi-tulot .luku { font: 600 clamp(3rem, 7vw, 4.4rem)/1 var(--fontti-kapea); color: var(--kattovalo); letter-spacing: .005em; }
.vuosi-sivuluvut { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1rem; color: #A3AEC0; font-size: .95rem; }
.vuosi-sivuluvut strong { color: #fff; font-weight: 600; }

.pylvaat { display: grid; grid-template-columns: repeat(12, 1fr); gap: .45rem; align-items: end; height: 220px; }
.pylvas { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; text-decoration: none; color: #8B97AB; gap: .4rem; }
.pylvas-arvo { font: 600 .82rem/1 var(--fontti-kapea); color: #D5DBE6; white-space: nowrap; }
.pylvas-palkki { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: var(--kattovalo); min-height: 4px; }
.pylvas.tyhja .pylvas-palkki { background: var(--yo-2); }
.pylvas-kk { font-size: .78rem; }
.pylvas.nyt .pylvas-kk { color: #fff; font-weight: 600; }
.pylvas.nyt .pylvas-palkki { box-shadow: 0 0 0 2px var(--asfaltti), 0 0 0 4px #fff; }
.pylvas:hover .pylvas-palkki { background: #FFDB70; }
.pylvas.tyhja:hover .pylvas-palkki { background: var(--yo-viiva); }
.pylvas:hover .pylvas-kk { color: #fff; }
@media (max-width: 767.98px) {
  .pylvaat { height: 150px; gap: .25rem; margin-top: 2rem; }
  .pylvas-arvo { display: none; }
  .pylvas-kk { font-size: .68rem; }
}

.kirjanpito > tbody > tr { cursor: pointer; }
.kirjanpito > tbody > tr:hover > * { background: var(--pinta-2); }
.kirjanpito .kk-nimi { font-weight: 600; text-decoration: none; color: var(--teksti); }
.kirjanpito tr.nyt > :first-child { box-shadow: inset 4px 0 0 var(--kattovalo); }
.kirjanpito tr.tyhja { color: var(--himmea-2); }
.kirjanpito tr.tyhja .kk-nimi { color: var(--himmea); font-weight: 500; }
.kirjanpito .tulot { font-weight: 700; }
.kirjanpito tfoot > tr > * { background: var(--pinta-2); font-weight: 700; border-top: 1px solid var(--viiva); }
.raha { text-align: right; white-space: nowrap; }

/* ==========================================================================
   Kuukausinäkymä: mittari, kuitti ja kirjaustaulukko
   ========================================================================== */
.kk-nav { display: flex; align-items: center; gap: .75rem; }
.kk-nav h1 { min-width: 0; }
.kk-valinnat { display: flex; gap: .5rem; margin-top: 1.25rem; flex-wrap: wrap; }
.kk-valinnat .form-control { width: auto; }
.kk-tila { color: #A3AEC0; margin-top: 1.25rem; font-size: .95rem; }

.mittari {
  background: var(--yo);
  border: 1px solid var(--yo-viiva);
  border-radius: var(--r-iso);
  padding: 1.25rem 1.5rem 1.4rem;
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  container-type: inline-size;
}
.mittari-paa { display: flex; justify-content: space-between; align-items: center; color: #A3AEC0; font-size: .95rem; }
.mittari-valo { width: 9px; height: 9px; border-radius: 50%; background: var(--kattovalo); box-shadow: 0 0 10px var(--kattovalo); }
.mittari-luku {
  font: 600 clamp(2.4rem, 6.5vw, 4.6rem)/1 var(--fontti-kapea);
  font-size: min(4.6rem, 19cqi);
  color: var(--kattovalo);
  text-shadow: 0 0 28px rgba(255, 198, 41, .28);
  margin-top: 1rem;
  white-space: nowrap;
}
.mittari-ala { color: #A3AEC0; font-size: .92rem; margin-top: .6rem; }
.mittari-ala strong { color: #fff; font-weight: 600; }

.kuitti {
  background: var(--pinta); color: var(--teksti);
  border-radius: var(--r) var(--r) 0 0;
  padding: 1.1rem 1.25rem .9rem;
  position: relative; margin-bottom: 12px;
  font-size: .95rem;
}
.kuitti::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background:
    linear-gradient(135deg, var(--pinta) 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(225deg, var(--pinta) 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
}
.kuitti-otsikko { font-family: var(--fontti-kapea); font-weight: 600; font-size: 1.1rem; display: flex; justify-content: space-between; border-bottom: 1px dashed var(--viiva-tumma); padding-bottom: .5rem; margin-bottom: .45rem; }
.kuitti-otsikko span:last-child { color: var(--himmea); font-weight: 500; font-family: var(--fontti); font-size: .85rem; align-self: end; }
.kuitti-rivi { display: flex; justify-content: space-between; gap: 1rem; padding: .17rem 0; }
.kuitti-rivi span:first-child { color: var(--himmea); }
.kuitti-rivi.valisumma { border-top: 1px dashed var(--viiva-tumma); margin-top: .3rem; padding-top: .45rem; font-weight: 700; }
.kuitti-rivi.valisumma span:first-child, .kuitti-rivi.loppusumma span:first-child { color: var(--teksti); }
.kuitti-rivi.loppusumma { border-top: 2px solid var(--teksti); margin-top: .35rem; padding-top: .45rem; font-weight: 700; font-size: 1.05rem; }

.kirjaus { table-layout: fixed; }
.kirjaus col.pv { width: 8.5rem; }
.kirjaus > tbody > tr > * { padding: .3rem .5rem; border-bottom: 1px solid #EDF0F4; }
.kirjaus > tbody > tr > .paiva { padding-left: 1.5rem; }
.kirjaus > tbody > tr > td:last-child { padding-right: 1.5rem; }
.kirjaus > thead > tr > th:first-child { padding-left: 1.5rem; }
.kirjaus > thead > tr > th:last-child { padding-right: 1.5rem; }
.kirjaus > thead > tr > th:not(:first-child) { text-align: right; padding-right: 1.25rem; }
.kirjaus > thead > tr > th:last-child { padding-right: 2.25rem; }
.paiva { white-space: nowrap; }
.paiva .vp { display: inline-block; width: 1.9rem; color: var(--himmea); font-weight: 500; text-transform: capitalize; }
.paiva .pvm { font-weight: 600; }
tr.vkl .paiva .vp, tr.vkl .paiva .pvm { color: var(--himmea); }
tr.vkl > * { background: #FAFBFC; }
tr.tanaan .pvm { background: var(--kattovalo); color: var(--asfaltti) !important; border-radius: 999px; padding: .1rem .5rem; margin-left: -.5rem; }
tr.viikko > th {
  background: var(--pinta-2); padding: .55rem 1.5rem .45rem !important;
  border-top: 1px solid var(--viiva); border-bottom: 1px solid var(--viiva) !important;
  font-weight: 600; font-size: .88rem; color: var(--himmea);
}
tr.viikko .viikko-sisus { display: flex; justify-content: space-between; }
tr.viikko .viikko-summa { font-weight: 500; }
tr.viikko .viikko-summa strong { color: var(--teksti); font-weight: 700; }
.solu {
  width: 100%;
  text-align: right;
  border: 1px solid transparent;
  background: var(--pinta-2);
  border-radius: var(--r-pieni);
  padding: .48rem .7rem;
  font: inherit;
  color: var(--teksti);
  transition: background-color .12s, border-color .12s;
}
.solu::placeholder { color: #B4BCC9; }
.solu:hover { border-color: var(--viiva-tumma); }
.solu:focus { outline: none; background: var(--pinta); border-color: var(--asfaltti); box-shadow: 0 0 0 3px var(--kattovalo-heijastus); }
.solu:not(:placeholder-shown) { background: var(--pinta); border-color: var(--viiva); font-weight: 600; }
.kirjaus > tfoot > tr > * { background: var(--asfaltti); color: #fff; padding: .85rem .5rem; border: 0; font-weight: 600; }
.kirjaus > tfoot > tr > td { text-align: right; padding-right: 1.25rem; font-family: var(--fontti-kapea); font-size: 1.15rem; }
.kirjaus > tfoot > tr > td:last-child { padding-right: 2.25rem; }
.kirjaus > tfoot > tr > th { padding-left: 1.5rem; }

.tallennus {
  position: sticky; bottom: 1rem; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--asfaltti); color: #fff;
  border-radius: var(--r-iso);
  padding: .55rem .55rem .55rem 1.25rem;
  margin-top: 1.25rem;
  box-shadow: 0 14px 34px rgba(27, 34, 48, .3);
}
.tallennus-tila { display: flex; align-items: center; gap: .55rem; color: #A3AEC0; font-size: .95rem; }
.tallennus-tila::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5DD39E; }
.tallennus.muutettu .tallennus-tila { color: #fff; }
.tallennus.muutettu .tallennus-tila::before { background: var(--kattovalo); box-shadow: 0 0 8px var(--kattovalo); }
.vinkki { color: #7D899C; font-size: .85rem; }

@media (max-width: 767.98px) {
  .tallennus { bottom: 5.25rem; }
  .kirjaus col.pv { width: 4.4rem; }
  .kirjaus > tbody > tr > * { padding: .25rem .2rem; }
  .kirjaus > tbody > tr > .paiva { padding-left: .8rem; font-size: .9rem; }
  .kirjaus > tbody > tr > td:last-child { padding-right: .8rem; }
  .kirjaus > thead > tr > th { font-size: .78rem; padding: .55rem .35rem !important; }
  .kirjaus > thead > tr > th:first-child { padding-left: .8rem !important; }
  .kirjaus > thead > tr > th:last-child { padding-right: 1.2rem !important; }
  .paiva .vp { width: 1.45rem; }
  .solu { padding: .45rem .4rem; font-size: 16px; }
  tr.viikko > th { padding: .5rem .8rem .4rem !important; }
  .kirjaus > tfoot > tr > * { padding: .75rem .35rem; }
  .kirjaus > tfoot > tr > th { padding-left: .8rem; }
  .kirjaus > tfoot > tr > td { font-size: .95rem; padding-right: .5rem; }
  .kirjaus > tfoot > tr > td:last-child { padding-right: 1.2rem; }
  .mittari { padding: 1.1rem 1.2rem 1.2rem; }
}

/* ==========================================================================
   Ylläpito
   ========================================================================== */
.valilehdet { display: flex; gap: .35rem; margin-top: 1.75rem; flex-wrap: wrap; }
.valilehdet a {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #AEB8C9; text-decoration: none; font-weight: 500;
  padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--yo-viiva);
}
.valilehdet a:hover { color: #fff; background: var(--yo); }
.valilehdet a.aktiivinen { background: var(--kattovalo); border-color: var(--kattovalo); color: var(--asfaltti); font-weight: 600; }
.valilehdet .maara { font-size: .78rem; font-weight: 700; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 0 .45rem; }
.valilehdet a.aktiivinen .maara { background: rgba(27, 34, 48, .14); }
.henkilo { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.henkilo-nimi { font-weight: 600; }
.henkilo-tieto { font-size: .86rem; color: var(--himmea); overflow: hidden; text-overflow: ellipsis; }
.uusi-linkki { background: #FFF8DF; border: 1px solid #F3D987; border-radius: var(--r-iso); padding: 1.15rem 1.25rem; margin-bottom: 1.5rem; }
.vinkkilista p { margin-bottom: .75rem; }
.vinkkilista p:last-child { margin-bottom: 0; }
.vinkkilista code { color: var(--teksti); background: var(--paperi); padding: .05rem .35rem; border-radius: 5px; }

/* ==========================================================================
   Profiili
   ========================================================================== */
.profiili-hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.profiili-hero .avatar-xl { box-shadow: 0 0 0 4px var(--asfaltti), 0 0 0 6px var(--kattovalo); }
.profiili-hero .tunnus { color: #A3AEC0; margin-top: .4rem; display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.profiili-luvut { display: flex; gap: 2.5rem; margin-left: auto; }
.profiili-luvut .tarra { color: #A3AEC0; font-size: .9rem; }
.profiili-luvut .luku { font: 600 2rem/1.1 var(--fontti-kapea); color: #fff; }
.profiili-luvut .luku.keltainen { color: var(--kattovalo); }
@media (max-width: 767.98px) { .profiili-luvut { margin-left: 0; width: 100%; gap: 2rem; } .profiili-hero .avatar-xl { width: 84px; height: 84px; } }

.kuvanvalinta { display: flex; align-items: center; gap: 1.25rem; padding: 1rem; border: 1px dashed var(--viiva-tumma); border-radius: var(--r); background: var(--pinta-2); margin-bottom: 1.5rem; transition: border-color .15s, background-color .15s; }
.kuvanvalinta.raahaus { border-color: var(--asfaltti); background: #FFF8DF; }
.kuvanvalinta .avatar-lg { width: 76px; height: 76px; }
.kuvanvalinta-teksti { flex: 1; min-width: 0; }
.kuvanvalinta-teksti .form-text { margin-top: .2rem; }
.lukittu { background: var(--pinta-2) !important; color: var(--himmea); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 575.98px) {
  .kuvanvalinta { flex-wrap: wrap; gap: .9rem 1rem; }
  .kuvanvalinta .avatar-lg { width: 64px; height: 64px; }
  .kuvanvalinta-teksti { flex: 1 1 160px; }
  .kuvanvalinta label.btn { width: 100%; }
}

/* ==========================================================================
   Tuonti
   ========================================================================== */
.pudotus {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 260px; padding: 2rem 1.5rem; text-align: center; cursor: pointer;
  border: 2px dashed var(--viiva-tumma); border-radius: var(--r-iso); background: var(--pinta-2);
  transition: border-color .15s, background-color .15s;
}
.pudotus i { font-size: 2.6rem; color: var(--asfaltti); margin-bottom: .4rem; }
.pudotus-otsikko { font: 600 1.5rem/1.2 var(--fontti-kapea); }
.pudotus-ala { color: var(--himmea); }
.pudotus:hover { border-color: var(--himmea-2); }
.pudotus.raahaus { border-color: var(--asfaltti); background: #FFF8DF; }
.pudotus.ladataan { pointer-events: none; opacity: .7; }
.esimerkkitaulu { font-size: .85rem; margin: .25rem 0 1rem; }
.esimerkkitaulu th { font-weight: 600; color: var(--himmea); background: var(--pinta-2); white-space: nowrap; }
.esimerkkitaulu td, .esimerkkitaulu th { padding: .35rem .5rem; }
.tiedostonimi { display: flex; gap: .5rem; align-items: center; font-weight: 600; word-break: break-all; padding: .6rem .75rem; border-radius: var(--r-pieni); background: var(--pinta-2); }
.tuonti-yhteenveto { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; background: var(--asfaltti); color: #fff; border-radius: var(--r-iso); padding: 1.1rem 1.5rem; margin-bottom: 1rem; }
.tuonti-yhteenveto .tarra { color: #A3AEC0; font-size: .9rem; }
.tuonti-yhteenveto .luku { font: 600 2.2rem/1.1 var(--fontti-kapea); color: var(--kattovalo); }
.tuonti-yhteenveto .luku.pieni { font-size: 1.45rem; color: #fff; padding-top: .45rem; }
.huomio { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--r); background: #FFF6DA; color: #6B4D00; margin-bottom: 1rem; }
.huomio-vaara { background: #FCECEA; color: #8F2219; }
.huomio i { margin-top: .1rem; }
.esikatselu { max-height: 560px; overflow-y: auto; }
.esikatselu thead th { position: sticky; top: 0; z-index: 1; }
.taulu tr.ohitetaan > * { color: var(--himmea-2); }
legend.form-label { font-size: .92rem; }

/* Tuonnin vahvistusikkuna ja selkeämpi tuontipainike */
.tuonti-paanappi { margin-left: auto; align-self: center; padding: .7rem 1.25rem; }
@media (max-width: 575.98px) { .tuonti-paanappi { width: 100%; margin-left: 0; } }
.huomio-ohje { background: var(--pinta); color: var(--teksti); border: 1px solid var(--viiva); border-left: 4px solid var(--kattovalo); }
.huomio-ohje i { color: var(--kattovalo-tumma); }

.valmis-ikkuna {
  position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 2rem); overflow: auto;
  width: min(440px, calc(100vw - 2rem)); padding: 0; border: 0; border-radius: var(--r-iso);
  background: var(--pinta); color: var(--teksti);
  box-shadow: 0 30px 80px rgba(27, 34, 48, .35);
  z-index: 1090;
}
.valmis-ikkuna[open] { animation: valmis-sisaan .28s cubic-bezier(.2, .9, .3, 1.2); }
.valmis-ikkuna::backdrop { background: rgba(27, 34, 48, .6); }
@keyframes valmis-sisaan { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.valmis-paa { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem 1.5rem 1.1rem; background: var(--asfaltti); color: #fff; position: relative; }
.valmis-paa::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: repeating-conic-gradient(var(--asfaltti) 0 25%, var(--kattovalo) 0 50%) 0 0 / 8px 8px;
}
.valmis-paa h2 { font-size: 1.7rem; margin: 0 0 .2rem; color: #fff; }
.valmis-paa p { margin: 0; color: #B8C1D1; }
.valmis-merkki { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--kattovalo); color: var(--asfaltti); font-size: 1.6rem; box-shadow: 0 0 22px rgba(255, 198, 41, .45); }
.valmis-kuitti { padding: 1.5rem 1.5rem .5rem; }
.valmis-kuukaudet { display: flex; flex-wrap: wrap; gap: .45rem; padding: .75rem 1.5rem 0; }
.valmis-kuukaudet a { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--viiva-tumma); text-decoration: none; color: var(--teksti); font-weight: 500; font-size: .92rem; }
.valmis-kuukaudet a:hover { border-color: var(--asfaltti); background: var(--pinta-2); }
.valmis-kuukaudet span { color: var(--himmea); font-weight: 400; }
.valmis-napit { display: flex; justify-content: flex-end; padding: 1.25rem 1.5rem 1.5rem; margin: 0; }
.valmis-napit .btn { min-width: 8rem; }

/* Tuontihistoria ja vahvistusikkuna */
.btn-punainen { --bs-btn-bg: var(--punainen); --bs-btn-border-color: var(--punainen); --bs-btn-color: #fff; --bs-btn-hover-bg: #A82C22; --bs-btn-hover-border-color: #A82C22; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #8F2219; --bs-btn-active-color: #fff; }
.historia-napit { display: inline-flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.valmis-napit { gap: .75rem; align-items: center; flex-wrap: wrap; }
.valmis-napit form { margin: 0; }
.vahvistus-ikkuna { width: min(420px, calc(100vw - 2rem)); }
.vahvistus-sisus { padding: 1.75rem 1.5rem .25rem; }
.vahvistus-sisus h2 { font-size: 1.55rem; margin: .9rem 0 .4rem; word-break: break-word; }
.vahvistus-sisus p { color: var(--himmea); margin: 0; }
.vahvistus-merkki { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #FCE8E6; color: var(--punainen); font-size: 1.35rem; }
@media (max-width: 575.98px) { .historia-napit { justify-content: flex-start; } }

/* PDF-raportin valinta */
.raporttivalinta h2 { margin-top: .9rem; }
.raportti-kuvake { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--asfaltti); color: var(--kattovalo); font-size: 1.35rem; }

/* ==========================================================================
   Ajopäiväkirja
   ========================================================================== */
.ajo-luvut { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--yo-viiva); border: 1px solid var(--yo-viiva); border-radius: var(--r-iso); overflow: hidden; }
.ajo-luvut > div { background: var(--yo); padding: 1rem 1.15rem; }
.ajo-luvut .tarra { color: #A3AEC0; font-size: .88rem; }
.ajo-luvut .luku { font: 600 clamp(1.45rem, 3vw, 2.1rem)/1.15 var(--fontti-kapea); color: #fff; white-space: nowrap; }
.ajo-luvut .luku.keltainen { color: var(--kattovalo); }
@media (max-width: 575.98px) { .ajo-luvut { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.vuorolomake { position: sticky; top: 78px; }
@media (max-width: 991.98px) { .vuorolomake { position: static; } }
.laskettu { font-size: .9rem; color: var(--himmea); padding: .45rem .7rem; border-radius: var(--r-pieni); background: var(--pinta-2); }
.laskettu.ok { color: var(--teksti); font-weight: 600; background: #FFF6DA; }
.laskettu.virhe { color: var(--punainen); background: #FCECEA; }
.invalid-feedback { font-size: .85rem; }

.vuorolista { list-style: none; margin: 0; padding: 0; }
.vuoro { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto auto; gap: .35rem 1rem; align-items: center; padding: .85rem 1.5rem; border-bottom: 1px solid #EDF0F4; }
.vuoro.muokattava { background: #FFF8DF; box-shadow: inset 4px 0 0 var(--kattovalo); }
.vuoro-pvm { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.4rem; height: 3.4rem; border-radius: 12px; background: var(--asfaltti); color: #fff; line-height: 1; }
.vuoro-pvm.vkl { background: var(--yo-2); }
.vuoro-vp { font-size: .72rem; color: #A3AEC0; text-transform: capitalize; margin-bottom: .2rem; }
.vuoro-nro { font: 600 1.45rem/1 var(--fontti-kapea); }
.vuoro-aika { font-weight: 600; display: flex; flex-wrap: wrap; gap: .25rem .7rem; align-items: baseline; }
.vuoro-kesto { font-family: var(--fontti-kapea); font-size: 1.1rem; font-weight: 600; background: #FFF6DA; padding: 0 .45rem; border-radius: 6px; }
.yo-merkki { font-size: .7rem; font-weight: 700; color: var(--himmea); vertical-align: super; }
.vuoro-auto { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; font-size: .92rem; margin-top: .2rem; }
.rekkari { font-family: var(--fontti-kapea); font-weight: 700; letter-spacing: .06em; font-size: .85rem; padding: .02rem .45rem; border: 1.5px solid var(--asfaltti); border-radius: 4px; background: #fff; }
.aukko { font-size: .8rem; color: #8A6100; background: #FFF4D1; border-radius: 999px; padding: .05rem .5rem; }
.vuoro-huom { font-size: .88rem; color: var(--himmea); margin-top: .2rem; }
.vuoro-km { font: 600 1.25rem/1 var(--fontti-kapea); white-space: nowrap; text-align: right; }
.vuoro-toiminnot { display: flex; gap: .3rem; }
.vuoro-yhteensa { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding: .9rem 1.5rem; background: var(--asfaltti); color: #fff; border-radius: 0 0 var(--r-iso) var(--r-iso); }
.vuoro-yhteensa strong { font-family: var(--fontti-kapea); font-size: 1.2rem; }
.tyhja-tila { text-align: center; color: var(--himmea); padding: 3rem 1.5rem; }
.tyhja-tila i { font-size: 2.2rem; display: block; margin-bottom: .6rem; color: var(--viiva-tumma); }
@media (max-width: 575.98px) {
  .vuoro { grid-template-columns: 3rem minmax(0, 1fr) auto; padding: .8rem 1rem; gap: .3rem .8rem; }
  .vuoro-pvm { width: 3rem; height: 3rem; }
  .vuoro-toiminnot { grid-column: 2 / -1; }
  .vuoro-km { font-size: 1.1rem; }
  .vuoro-yhteensa { padding: .85rem 1rem; }
}
.ajo-luvut > div { container-type: inline-size; min-width: 0; }
.ajo-luvut .luku { font-size: min(2.1rem, 19cqi); }

/* Käynnissä oleva vuoro */
.kaynnissa {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem 2rem; align-items: center;
  background: var(--asfaltti); color: #fff; border-radius: var(--r-iso); padding: 1.35rem 1.5rem; margin-bottom: 1.5rem;
  box-shadow: inset 0 0 0 1px var(--yo-viiva);
}
.kaynnissa-tila { display: flex; gap: 1rem; align-items: flex-start; }
.kaynnissa-valo { flex: none; width: 14px; height: 14px; margin-top: .5rem; border-radius: 50%; background: #5DD39E; box-shadow: 0 0 0 4px rgba(93, 211, 158, .18); animation: sykke 2s ease-in-out infinite; }
.kaynnissa-valo.tauolla { background: var(--kattovalo); box-shadow: 0 0 0 4px rgba(255, 198, 41, .2); }
@keyframes sykke { 50% { box-shadow: 0 0 0 9px rgba(93, 211, 158, 0); } }
.kaynnissa-otsikko { font: 600 1.6rem/1.15 var(--fontti-kapea); }
.kaynnissa-ala { color: #A3AEC0; margin-top: .3rem; }
.kaynnissa-varoitus { margin-top: .6rem; color: var(--kattovalo); font-weight: 600; }
.kaynnissa-luvut { display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.vuoro-paivatulot { font: 600 1.35rem/1.2 var(--fontti-kapea); }
.vuoro-painike { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 575.98px) {
  .kaynnissa-napit .vuoro-painike, .aloita-palkki .vuoro-painike { flex: 1 0 100%; }
}
.kaynnissa-luvut .tarra { color: #A3AEC0; font-size: .88rem; }
.kaynnissa-luvut .luku { font: 600 2.1rem/1.1 var(--fontti-kapea); white-space: nowrap; }
.kaynnissa-luvut .luku.keltainen { color: var(--kattovalo); }
.kaynnissa-napit { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; padding-top: 1.1rem; border-top: 1px solid var(--yo-viiva); }
.kaynnissa-napit form { margin: 0; }
.btn-valkoinen { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: var(--asfaltti); --bs-btn-hover-bg: #E9EDF3; --bs-btn-hover-border-color: #E9EDF3; --bs-btn-hover-color: var(--asfaltti); --bs-btn-active-bg: #DCE1E9; }
.btn-haamu-tumma { --bs-btn-bg: transparent; --bs-btn-border-color: var(--yo-viiva); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--yo-2); --bs-btn-hover-border-color: var(--yo-viiva); --bs-btn-hover-color: #fff; }
.rekkari-tumma { color: #fff; background: transparent; border-color: #A3AEC0; }
@media (max-width: 767.98px) {
  .kaynnissa { grid-template-columns: 1fr; padding: 1.15rem; }
  .kaynnissa-napit .btn, .kaynnissa-napit form { flex: 1 1 auto; }
  .kaynnissa-napit form .btn { width: 100%; }
}
.aloita-palkki { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; background: var(--pinta); border: 1px dashed var(--viiva-tumma); border-radius: var(--r-iso); padding: .8rem .8rem .8rem 1.25rem; margin-bottom: 1.5rem; color: var(--himmea); }

/* Taukorivit */
.tauot { display: grid; gap: .5rem; }
.tauot:empty { display: none; }
.tauko-rivi { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: .4rem; align-items: center; }
.tauko-rivi.virheellinen .form-control { border-color: var(--punainen); }
.tauko-viiva { color: var(--himmea); }
.vanha-tauko { font-size: .88rem; color: #6B4D00; background: #FFF6DA; border-radius: var(--r-pieni); padding: .45rem .7rem; margin-bottom: .5rem; }
.vuoro-tauot { font-size: .88rem; color: var(--himmea); margin-top: .2rem; display: flex; gap: .4rem; align-items: baseline; }
.vuoro.on-kaynnissa { background: #F2FBF6; box-shadow: inset 4px 0 0 #5DD39E; }

/* Sivuston nimi ja kuvaus yläpalkissa */
.merkki-teksti { display: flex; flex-direction: column; line-height: 1.15; }
.merkki-kuvaus { font-size: .74rem; font-weight: 400; color: #8D98AB; }
.nimi-esikatselu { display: flex; align-items: center; gap: .65rem; background: var(--asfaltti); color: #fff; border-radius: var(--r); padding: 1rem 1.1rem; font-weight: 600; }

/* ==========================================================================
   Etusivu
   ========================================================================== */
.hero-etusivu h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); }
.etusivu-luvut { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 575.98px) { .etusivu-luvut { grid-template-columns: 1fr 1fr; } .etusivu-luvut > div:first-child { grid-column: 1 / -1; } }
.kuitti-reunus { border: 1px solid var(--viiva); background: var(--pinta-2); border-radius: var(--r); margin-bottom: 0; }
.kuitti-reunus::after { display: none; }
.pienotsikko { font-size: .85rem; font-weight: 600; color: var(--himmea); margin-bottom: .5rem; }
.iso-luku { font: 600 2.2rem/1.1 var(--fontti-kapea); }

.paivapylvaat { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; align-items: end; height: 130px; border-bottom: 1px solid var(--viiva-tumma); }
.paivapylvas { display: flex; align-items: flex-end; height: 100%; border-radius: 3px 3px 0 0; }
.paivapylvas span { display: block; width: 100%; background: var(--kattovalo); border-radius: 3px 3px 0 0; }
.paivapylvas.vkl { background: #F3F5F8; }
.paivapylvas.tuleva { opacity: .45; }
.paivapylvas.tanaan { box-shadow: 0 0 0 1.5px var(--asfaltti); background: #FFF8DF; }
.paivapylvas:hover span { background: var(--kattovalo-tumma); }
.paivapylvaat-akseli { display: flex; justify-content: space-between; font-size: .75rem; color: var(--himmea-2); margin-top: .3rem; }
.kk-tilastot, .minitilastot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding-top: 1.1rem; }
.minitilastot { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; }
.kk-tilastot > div, .minitilastot > div { display: flex; flex-direction: column; min-width: 0; }
.kk-tilastot span, .minitilastot span { font-size: .8rem; color: var(--himmea); }
.kk-tilastot strong, .minitilastot strong { font: 600 1.3rem/1.2 var(--fontti-kapea); white-space: nowrap; }
.minitilastot > div { background: var(--pinta-2); border-radius: var(--r-pieni); padding: .6rem .75rem; }

.minipylvaat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 96px; }
.minipylvas { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; text-decoration: none; gap: .25rem; }
.minipylvas-palkki { width: 100%; border-radius: 3px 3px 1px 1px; background: var(--asfaltti); }
.minipylvas.nyt .minipylvas-palkki { background: var(--kattovalo); }
.minipylvas-kk { font-size: .7rem; color: var(--himmea); text-transform: uppercase; }
.minipylvas.nyt .minipylvas-kk { color: var(--teksti); font-weight: 700; }

.tapahtumat { list-style: none; margin: 0; padding: 0; }
.tapahtumat li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: .75rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid #EDF0F4; }
.tapahtumat li:last-child { border-bottom: 0; }
.tapahtuma-pvm { font-weight: 600; color: var(--teksti); text-decoration: none; white-space: nowrap; }
.tapahtuma-teksti { color: var(--himmea); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tapahtumat strong { font-family: var(--fontti-kapea); font-size: 1.1rem; white-space: nowrap; }

.pikatoiminnot { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.pikatoiminnot a, .pikatoiminnot button { display: flex; width: 100%; text-align: left; font: inherit; gap: .8rem; align-items: center; padding: .9rem 1rem; background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r); text-decoration: none; color: var(--teksti); }
.pikatoiminnot a:hover, .pikatoiminnot button:hover { border-color: var(--asfaltti); }
.pikatoiminnot i { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--asfaltti); color: var(--kattovalo); font-size: 1.1rem; }
.pikatoiminnot span { display: flex; flex-direction: column; font-size: .82rem; color: var(--himmea); line-height: 1.3; min-width: 0; }
.pikatoiminnot strong { color: var(--teksti); font-size: .95rem; }

.aloitus { border-color: var(--kattovalo); border-width: 2px; }
.aloitus-askeleet { list-style: none; counter-reset: askel; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; }
.aloitus-askeleet li { counter-increment: askel; }
.aloitus-askeleet a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1rem 1rem 1rem 3.2rem; position: relative; background: var(--pinta-2); border-radius: var(--r); text-decoration: none; color: var(--teksti); }
.aloitus-askeleet a::before { content: counter(askel); position: absolute; left: 1rem; top: 1rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--kattovalo); font-weight: 700; font-size: .85rem; }
.aloitus-askeleet span { color: var(--himmea); font-size: .88rem; }

/* Profiili: laitteet */
.laitelista { list-style: none; margin: 0; padding: 0; }
.laitelista li { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--viiva); }
.laitelista li:last-child { border-bottom: 0; }
.laitelista i { font-size: 1.3rem; color: var(--himmea); }
.laite-tiedot { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.laite-tiedot span:not(.tila) { font-size: .85rem; color: var(--himmea); }

/* Teemapainike ja asennusohje */
.teemanappi { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: transparent; border: 1px solid var(--yo-viiva); color: #D5DBE6; font-size: 1.05rem; }
.teemanappi:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.asennus-kuvake { width: 56px; height: 56px; border-radius: 14px; }
.asennus-askeleet { margin: .75rem 0 0; padding-left: 1.2rem; color: var(--himmea); }
.asennus-askeleet li { margin-bottom: .4rem; }
.asennus-askeleet strong { color: var(--teksti); }

/* ==========================================================================
   Tumma yötila
   ========================================================================== */
html[data-bs-theme="dark"] {
  --paperi: #0E131C;
  --pinta: #171E2C;
  --pinta-2: #1E2738;
  --viiva: #2A3446;
  --viiva-tumma: #3A4760;
  --teksti: #E6EAF1;
  --himmea: #A0AABB;
  --himmea-2: #7A869B;
  --kattovalo-heijastus: rgba(255, 198, 41, .3);
  --bs-body-bg: var(--paperi);
  --bs-body-color: var(--teksti);
  --bs-border-color: var(--viiva);
  --bs-secondary-color: var(--himmea);
  --bs-link-color-rgb: 230, 234, 241;
  --bs-link-hover-color-rgb: 255, 255, 255;
  --bs-tertiary-bg: var(--pinta-2);
  color-scheme: dark;
}
html[data-bs-theme="dark"] body { background: var(--paperi); }
html[data-bs-theme="dark"] .hero { background: #151B27; }
html[data-bs-theme="dark"] .ylapalkki, html[data-bs-theme="dark"] .alanav { background: #121823; }
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .input-group-text { background-color: var(--pinta-2); border-color: var(--viiva-tumma); color: var(--teksti); }
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus { background-color: var(--pinta); border-color: var(--kattovalo); }
html[data-bs-theme="dark"] .form-control::placeholder { color: #5E6A80; }
html[data-bs-theme="dark"] .form-check-input { background-color: var(--pinta-2); border-color: var(--viiva-tumma); }
html[data-bs-theme="dark"] .form-check-input:checked { background-color: #5C6B85; border-color: #5C6B85; }
html[data-bs-theme="dark"] .lukittu { background: var(--pinta-2) !important; }
html[data-bs-theme="dark"] .btn-tumma { --bs-btn-bg: #2B364B; --bs-btn-border-color: #3A4760; --bs-btn-hover-bg: #364359; --bs-btn-hover-border-color: #46546E; --bs-btn-active-bg: #2B364B; }
html[data-bs-theme="dark"] .btn-vaara { --bs-btn-color: #FF8A80; --bs-btn-hover-bg: rgba(194, 54, 43, .2); --bs-btn-hover-color: #FFADA5; }
html[data-bs-theme="dark"] .text-danger { color: #FF8A80 !important; }
html[data-bs-theme="dark"] .kayttajavalikko { background: var(--pinta); border-color: var(--viiva); }
html[data-bs-theme="dark"] .dropdown-item { color: var(--teksti); }
html[data-bs-theme="dark"] .dropdown-item:hover { background: var(--pinta-2); }

/* Kuukausikirjaus */
html[data-bs-theme="dark"] .solu::placeholder { color: #4E5A70; }
html[data-bs-theme="dark"] tr.vkl > * { background: #131A26; }
html[data-bs-theme="dark"] .kirjaus > tbody > tr > *,
html[data-bs-theme="dark"] .vuoro,
html[data-bs-theme="dark"] .tapahtumat li { border-color: var(--viiva) !important; }
html[data-bs-theme="dark"] .kuitti { background: #222C3F; }
html[data-bs-theme="dark"] .kuitti::after { background:
    linear-gradient(135deg, #222C3F 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(225deg, #222C3F 50%, transparent 50%) 0 0 / 14px 10px repeat-x; }
html[data-bs-theme="dark"] .kuitti-reunus { background: var(--pinta-2); }
html[data-bs-theme="dark"] .kuitti-rivi.loppusumma { border-top-color: var(--teksti); }
html[data-bs-theme="dark"] .mittari { background: #1B2333; }

/* Huomiot, tilat ja merkit */
html[data-bs-theme="dark"] .laskettu.ok,
html[data-bs-theme="dark"] .huomio,
html[data-bs-theme="dark"] .vanha-tauko,
html[data-bs-theme="dark"] .aukko,
html[data-bs-theme="dark"] .tila-avoin,
html[data-bs-theme="dark"] .vuoro-kesto { background: rgba(255, 198, 41, .13); color: #F4D57E; }
html[data-bs-theme="dark"] .laskettu.ok { color: var(--teksti); }
html[data-bs-theme="dark"] .laskettu.virhe,
html[data-bs-theme="dark"] .huomio-vaara,
html[data-bs-theme="dark"] .auth-virhe,
html[data-bs-theme="dark"] .tila-vaara { background: rgba(194, 54, 43, .2); color: #FFADA5; }
html[data-bs-theme="dark"] .huomio-ohje { background: var(--pinta); color: var(--teksti); }
html[data-bs-theme="dark"] .tila-ok { background: rgba(23, 132, 90, .25); color: #79E3B0; }
html[data-bs-theme="dark"] .tila-pois { background: rgba(255, 255, 255, .08); color: var(--himmea); }
html[data-bs-theme="dark"] .vahvistus-merkki { background: rgba(194, 54, 43, .2); color: #FF8A80; }
html[data-bs-theme="dark"] .uusi-linkki { background: rgba(255, 198, 41, .08); border-color: #5C4A16; }
html[data-bs-theme="dark"] .rekkari { background: var(--pinta-2); border-color: var(--teksti); color: var(--teksti); }
html[data-bs-theme="dark"] .vuoro.muokattava { background: rgba(255, 198, 41, .07); }
html[data-bs-theme="dark"] .vuoro.on-kaynnissa { background: rgba(93, 211, 158, .07); }
html[data-bs-theme="dark"] .vuoro-pvm { box-shadow: inset 0 0 0 1px var(--viiva-tumma); }
html[data-bs-theme="dark"] .pudotus.raahaus,
html[data-bs-theme="dark"] .kuvanvalinta.raahaus { background: rgba(255, 198, 41, .08); }

/* Etusivu ja kaaviot */
html[data-bs-theme="dark"] .paivapylvas.vkl { background: rgba(255, 255, 255, .035); }
html[data-bs-theme="dark"] .paivapylvas.tanaan { background: rgba(255, 198, 41, .1); box-shadow: 0 0 0 1.5px var(--teksti); }
html[data-bs-theme="dark"] .minipylvas-palkki { background: #4A5770; }
html[data-bs-theme="dark"] .minipylvas.nyt .minipylvas-palkki { background: var(--kattovalo); }
html[data-bs-theme="dark"] .pikatoiminnot i,
html[data-bs-theme="dark"] .raportti-kuvake { background: #263045; }
html[data-bs-theme="dark"] .pikatoiminnot button:hover, html[data-bs-theme="dark"] .pikatoiminnot a:hover { border-color: var(--viiva-tumma); }
html[data-bs-theme="dark"] .aloitus { border-color: #8A6A10; }
html[data-bs-theme="dark"] .ilmoitus { background: #222C3F; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
html[data-bs-theme="dark"] .valmis-ikkuna { box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
html[data-bs-theme="dark"] .valmis-ikkuna::backdrop { background: rgba(5, 8, 14, .75); }

/* Muistutus puuttuvista ajotuloista */
.muistutuspalkki { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .85rem 1.1rem; border-radius: var(--r); background: #FFF6DA; border: 1px solid #F1D27A; }
.muistutuspalkki > i { font-size: 1.3rem; color: #8A6300; }
.muistutuspalkki > div:nth-child(2) { display: flex; flex-direction: column; flex: 1 1 220px; line-height: 1.35; }
.muistutuspalkki > div:nth-child(2) span { font-size: .88rem; color: var(--himmea); }
.muistutus-paivat { display: flex; flex-wrap: wrap; gap: .4rem; }
html[data-bs-theme="dark"] .muistutuspalkki { background: rgba(255, 198, 41, .1); border-color: #5C4A16; }
html[data-bs-theme="dark"] .muistutuspalkki > i { color: var(--kattovalo); }

/* Kuukausitavoite */
.tavoite { padding: .8rem .9rem; border: 1px solid var(--viiva); border-radius: var(--r); background: var(--pinta); }
.tavoite-paa { display: flex; justify-content: space-between; font-size: .88rem; color: var(--himmea); margin-bottom: .45rem; }
.tavoite-paa strong { color: var(--teksti); font-variant-numeric: tabular-nums; }
.tavoite-palkki { position: relative; height: 12px; border-radius: 99px; background: var(--pinta-2); overflow: visible; }
.tavoite-palkki span { display: block; height: 100%; border-radius: 99px; background: var(--kattovalo); min-width: 4px; transition: width .4s; }
.tavoite-palkki i { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--teksti); opacity: .45; border-radius: 1px; }
.tavoite-teksti { margin-top: .55rem; font-size: .85rem; color: var(--himmea); line-height: 1.4; }
.tavoite-teksti strong { color: var(--teksti); }
.tavoite.saavutettu .tavoite-palkki span { background: var(--vihrea, #17845A); }
.tavoite.saavutettu .tavoite-teksti { color: var(--vihrea, #17845A); font-weight: 600; }
.tavoite-lisaa { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--himmea); text-decoration: none; }
.tavoite-lisaa:hover { color: var(--teksti); }
html[data-bs-theme="dark"] .tavoite.saavutettu .tavoite-palkki span { background: #3FBF86; }
html[data-bs-theme="dark"] .tavoite.saavutettu .tavoite-teksti { color: #79E3B0; }

.ohjelista { list-style: none; padding: 0; margin: 0 0 1rem; }
.ohjelista li { position: relative; padding-left: 1.4rem; margin-bottom: .7rem; font-size: .92rem; color: var(--himmea); line-height: 1.45; }
.ohjelista li::before { content: ""; position: absolute; left: 0; top: .5em; width: .55rem; height: .55rem; border-radius: 2px; background: var(--kattovalo); }
.ohjelista strong { color: var(--teksti); }

/* ==========================================================================
   Tilastot
   ========================================================================== */
.muutos { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.muutos.nousu { color: var(--vihrea); }
.muutos.lasku { color: var(--punainen); }
.hero .muutos.nousu { color: #5DD39E; }
.hero .muutos.lasku { color: #FF8A80; }
html[data-bs-theme="dark"] .muutos.nousu { color: #5DD39E; }
html[data-bs-theme="dark"] .muutos.lasku { color: #FF8A80; }

.ennatykset { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.ennatys { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center; padding: 1rem 1.1rem; background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r); }
.ennatys i { grid-row: span 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--asfaltti); color: var(--kattovalo); font-size: 1.15rem; }
.ennatys span { font-size: .8rem; color: var(--himmea); }
.ennatys strong { font-size: 1.15rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ennatys small { font-size: .8rem; color: var(--himmea); }
html[data-bs-theme="dark"] .ennatys i { background: #263045; }

.vp-selite { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--himmea); margin-bottom: .9rem; }
.vp-selite span { display: inline-flex; align-items: center; gap: .35rem; }
.vp-merkki { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.vp-merkki.ka { background: var(--kattovalo); }
.vp-merkki.th { background: var(--asfaltti); }
.vp-merkki.ed { background: var(--viiva-tumma); }
html[data-bs-theme="dark"] .vp-merkki.th { background: #8FA3C7; }

.vp-lista { display: flex; flex-direction: column; gap: .55rem; }
.vp-rivi { display: grid; grid-template-columns: 7.2rem 1fr; gap: .75rem; align-items: center; padding: .35rem .5rem; margin: 0 -.5rem; border-radius: var(--r-pieni); }
.vp-rivi.paras { background: var(--pinta-2); }
.vp-nimi { display: flex; flex-direction: column; line-height: 1.2; }
.vp-nimi strong { font-size: .92rem; }
.vp-nimi span { font-size: .75rem; color: var(--himmea); }
.vp-palkit { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vp-palkki { display: grid; grid-template-columns: 1fr 5.2rem; align-items: center; gap: .5rem; height: 16px; }
.vp-palkki b { display: block; height: 100%; }
.vp-palkki span { display: block; height: 100%; border-radius: 3px; }
.vp-palkki.ka span { background: var(--kattovalo); }
.vp-palkki.th { height: 11px; }
.vp-palkki.th span { background: var(--asfaltti); }
.vp-palkki em { font-style: normal; font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--himmea); white-space: nowrap; }
.vp-palkki.ka em { color: var(--teksti); font-weight: 600; }
html[data-bs-theme="dark"] .vp-palkki.th span { background: #8FA3C7; }
@media (max-width: 400px) { .vp-rivi { grid-template-columns: 5.6rem 1fr; } }

.vertailu-pylvaat { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; height: 170px; align-items: end; }
.vertailu-pylvaat a { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; padding-bottom: 1.3rem; text-decoration: none; }
.vertailu-pylvaat span { width: 45%; max-width: 14px; border-radius: 3px 3px 0 0; }
.vertailu-pylvaat .vp-nyt { background: var(--kattovalo); }
.vertailu-pylvaat .vp-ed { background: var(--viiva-tumma); }
.vertailu-pylvaat small { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: .72rem; color: var(--himmea); text-transform: uppercase; }
.vertailu-pylvaat a:hover .vp-nyt { filter: brightness(.92); }
.vertailu-taulu td, .vertailu-taulu th { padding: .5rem .6rem !important; font-size: .9rem; }
.vertailu-taulu tfoot th { border-top: 2px solid var(--teksti); border-bottom: 0; }

/* Puhelimen ilmoitukset */
.push-tila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: .9rem 1rem; border: 1px solid var(--viiva); border-radius: var(--r); background: var(--pinta-2); }
.push-rivi { display: flex; gap: .75rem; align-items: flex-start; flex: 1 1 240px; }
.push-rivi > i { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--asfaltti); color: var(--kattovalo); font-size: 1.05rem; }
.push-rivi > div { display: flex; flex-direction: column; line-height: 1.35; }
.push-rivi span { font-size: .86rem; color: var(--himmea); }
.push-napit { display: flex; flex-wrap: wrap; gap: .4rem; }
.push-tila.kaytossa .push-rivi > i { background: var(--vihrea); color: #fff; }
.push-tila.estetty .push-rivi > i { background: var(--punainen); color: #fff; }
html[data-bs-theme="dark"] .push-rivi > i { background: #263045; }
html[data-bs-theme="dark"] .push-tila.kaytossa .push-rivi > i { background: #17845A; }

.ilmoitustaulu { border: 1px solid var(--viiva); border-radius: var(--r); overflow: hidden; }
.ilmoitus-otsikot, .ilmoitus-rivi { display: grid; grid-template-columns: 1fr 3rem 3rem; align-items: center; }
.ilmoitus-otsikot { background: var(--pinta-2); font-size: .8rem; font-weight: 600; color: var(--himmea); padding: .5rem .9rem; }
.ilmoitus-otsikot > span:not(:first-child), .ilmoitus-rivi > div:not(:first-child) { text-align: center; }
.ilmoitus-rivi { padding: .65rem .9rem; border-top: 1px solid var(--viiva); }
.ilmoitus-rivi > div:first-child { display: flex; flex-direction: column; line-height: 1.3; padding-right: .5rem; }
.ilmoitus-rivi strong { font-size: .92rem; }
.ilmoitus-rivi span:not(.tila) { font-size: .8rem; color: var(--himmea); }
.ilmoitus-rivi .form-check-input { width: 1.25rem; height: 1.25rem; margin: 0; cursor: pointer; }

/* ==========================================================================
   Kotinäyttösovellus (iPhone/Android): sisältö ei saa jäädä tilarivin,
   kameran loven tai alareunan eleviivan alle.
   ========================================================================== */
:root {
  --turva-yla: env(safe-area-inset-top, 0px);
  --turva-ala: env(safe-area-inset-bottom, 0px);
  --turva-vasen: env(safe-area-inset-left, 0px);
  --turva-oikea: env(safe-area-inset-right, 0px);
}
/* Yläpalkki jatkuu tilarivin taakse kiinteänä värinä, ja logo ja kuva alkavat sen alapuolelta */
.ylapalkki { padding-top: var(--turva-yla); padding-left: var(--turva-vasen); padding-right: var(--turva-oikea); }
@media (min-width: 768px) { .ilmoitukset { top: calc(74px + var(--turva-yla)); } }
@media (max-width: 767.98px) { .ilmoitukset { top: auto; bottom: calc(5.25rem + var(--turva-ala)); } }
body.vieras .ilmoitukset { top: calc(1rem + var(--turva-yla)); bottom: auto; }
/* Ilmoitusten säiliö ei koskaan saa estää alla olevien painikkeiden painamista, vain itse ilmoitukset ovat painettavia */
.ilmoitukset { pointer-events: none; }
.ilmoitukset > * { pointer-events: auto; }
.vuorolomake { top: calc(78px + var(--turva-yla)); }
.alanav { padding-left: calc(.25rem + var(--turva-vasen)); padding-right: calc(.25rem + var(--turva-oikea)); }
@media (max-width: 767.98px) { body.kirjautunut .sivu { padding-bottom: calc(5.5rem + var(--turva-ala)); } }
.valmis-ikkuna { max-height: calc(100dvh - 2rem - var(--turva-yla) - var(--turva-ala)); }
/* Kirjautumissivut */
.auth { min-height: 100dvh; }
@media (max-width: 991.98px) {
  .auth-taide { padding-top: calc(2.25rem + var(--turva-yla)) !important; }
}
.auth-lomake { padding-bottom: calc(3rem + var(--turva-ala)); }
/* Leveät taulukot ja pitkät tekstit eivät venytä sivua sivusuunnassa */
html, body { overflow-x: clip; }
.sivu, .container { min-width: 0; }
img, svg, video { max-width: 100%; }
/* iOS: päivämääräkenttä vasemmalle kuten muut kentät, eikä se kasva kenttää korkeammaksi */
input[type="date"].form-control { -webkit-appearance: none; appearance: none; text-align: left; min-height: calc(1.5em + .75rem + 2px); }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }

/* ==========================================================================
   Palkkalaskelmat
   ========================================================================== */
.luku.punainen { color: #FF8A80; }
.jaksonapit { display: flex; flex-wrap: wrap; gap: .4rem; }
.jakson-tiedot { font-size: .88rem; color: var(--himmea); min-height: 1.3em; }
.jakson-tiedot.tyhja { color: var(--punainen); }
.vertailurivi { padding: .7rem 0; border-top: 1px solid var(--viiva); }
.vertailurivi:first-child { border-top: 0; padding-top: .2rem; }
.vertailurivi .form-label { margin-bottom: .3rem; }
.vertailu-kentat { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kentta oma" "kentta ero"; column-gap: .9rem; align-items: center; }
.vertailu-kentat > input { grid-area: kentta; }
.vertailu-oma { grid-area: oma; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.vertailu-oma span { font-size: .7rem; color: var(--himmea); }
.vertailu-oma strong { font-size: .92rem; font-variant-numeric: tabular-nums; }
.vertailu-ero { grid-area: ero; text-align: right; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 1.1em; }
.vertailurivi.poikkeaa input { border-color: var(--punainen); box-shadow: 0 0 0 3px rgba(194, 54, 43, .12); }
.ero { font-weight: 700; font-variant-numeric: tabular-nums; }
.ero-ok { color: var(--vihrea); }
.ero-poikkeaa { color: var(--punainen); }
.vertailu-tulos { display: flex; gap: .55rem; align-items: center; padding: .65rem .85rem; border-radius: var(--r-pieni); font-weight: 600; font-size: .92rem; }
.vertailu-tulos.ok { background: #E3F4EC; color: var(--vihrea); }
.vertailu-tulos.virhe { background: #FCECEA; color: var(--punainen); }
.palkkakortti.poikkeaa { border-color: rgba(194, 54, 43, .45); box-shadow: inset 4px 0 0 var(--punainen); }
.vertailutaulu th[scope="row"] { font-weight: 500; }
.vertailutaulu tr.rivi-poikkeaa > * { background: rgba(194, 54, 43, .07); }
.vertailutaulu tr.rivi-poikkeaa th { color: var(--punainen); font-weight: 700; }
.vertailutaulu tr.rivi-info > * { color: var(--himmea); font-size: .88rem; }
.vertailutaulu td, .vertailutaulu th { padding: .6rem .5rem !important; }
.jakson-paivat summary, .kertyma-osio summary, .kertyma-lomake summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--himmea); }
.jakson-paivat summary:hover, .kertyma-osio summary:hover, .kertyma-lomake summary:hover { color: var(--teksti); }
.pikatoiminnot .pikatoiminto-poikkeaa i { background: var(--punainen); color: #fff; }
.pikatoiminnot .pikatoiminto-poikkeaa span span { color: var(--punainen); font-weight: 600; }
html[data-bs-theme="dark"] .ero-ok, html[data-bs-theme="dark"] .vertailu-tulos.ok { color: #79E3B0; }
html[data-bs-theme="dark"] .ero-poikkeaa, html[data-bs-theme="dark"] .vertailutaulu tr.rivi-poikkeaa th, html[data-bs-theme="dark"] .jakson-tiedot.tyhja { color: #FF8A80; }
html[data-bs-theme="dark"] .vertailu-tulos.ok { background: rgba(23, 132, 90, .2); }
html[data-bs-theme="dark"] .vertailu-tulos.virhe { background: rgba(194, 54, 43, .2); color: #FFADA5; }
html[data-bs-theme="dark"] .vertailutaulu tr.rivi-poikkeaa > * { background: rgba(194, 54, 43, .14); }
html[data-bs-theme="dark"] .pikatoiminnot .pikatoiminto-poikkeaa span span { color: #FF8A80; }
/* Puhelimella vertailutaulukko pinotaan: rivin nimi ylös, summat kolmeen sarakkeeseen sen alle */
@media (max-width: 575.98px) {
  .vertailutaulu thead { display: none; }
  .vertailutaulu, .vertailutaulu tbody { display: block; }
  .vertailutaulu tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: .5rem; padding: .55rem .6rem; border-bottom: 1px solid var(--viiva); }
  .vertailutaulu tr:last-child { border-bottom: 0; }
  .vertailutaulu tr > * { padding: 0 !important; border: 0 !important; background: none !important; }
  .vertailutaulu tr.rivi-poikkeaa { background: rgba(194, 54, 43, .07); }
  .vertailutaulu th[scope="row"] { grid-column: 1 / -1; margin-bottom: .2rem; }
  .vertailutaulu td { display: flex; flex-direction: column; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .vertailutaulu td::before { content: attr(data-otsikko); font-size: .7rem; color: var(--himmea); font-weight: 400; }
  .vertailutaulu td:last-child { text-align: right; align-items: flex-end; }
  .palkkakortti .paneeli-otsikko { flex-wrap: wrap; gap: .5rem; }
  html[data-bs-theme="dark"] .vertailutaulu tr.rivi-poikkeaa { background: rgba(194, 54, 43, .14); }
}

/* PDF-tuonti */
.pdf-tuonti-rivi { display: flex; gap: .8rem; align-items: flex-start; }
.pdf-tuonti-rivi > i { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--asfaltti); color: var(--kattovalo); font-size: 1.2rem; }
.pdf-tuonti-rivi > div { display: flex; flex-direction: column; line-height: 1.35; }
.pdf-tuonti-rivi span { font-size: .86rem; color: var(--himmea); }
.tuonti-tulos.ok { border-color: #F1D27A; background: #FFF9E6; }
.tuonti-tulos.ok > .paneeli-sisus > div > i { color: #8A6300; }
.tuonti-tulos.tyhja { border-color: rgba(194, 54, 43, .35); }
.tuonti-tulos.tyhja > .paneeli-sisus > div > i { color: var(--punainen); }
.tuonti-rivit { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; }
.tuonti-rivit li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .5rem; }
.tuonti-rivit code { color: var(--teksti); background: var(--pinta-2); padding: .05rem .3rem; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-bs-theme="dark"] .pdf-tuonti-rivi > i { background: #263045; }
html[data-bs-theme="dark"] .tuonti-tulos.ok { background: rgba(255, 198, 41, .08); border-color: #5C4A16; }
html[data-bs-theme="dark"] .tuonti-tulos.ok > .paneeli-sisus > div > i { color: var(--kattovalo); }

/* ==========================================================================
   Kassaraporttien kuvat
   ========================================================================== */
.kuvanappi { display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border: 1px dashed var(--viiva-tumma); border-radius: var(--r-pieni); color: var(--himmea); cursor: pointer; font-size: .92rem; }
.kuvanappi:hover { border-color: var(--asfaltti); color: var(--teksti); }
.kuvanappi i { font-size: 1.15rem; }
.kuva-esikatselu { display: flex; flex-wrap: wrap; gap: .4rem; }
.kuva-esikatselu:empty { display: none; }
.kuva-esikatselu img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--viiva); }
.kuvalataus-alue { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 1.6rem 1rem; border: 2px dashed var(--viiva-tumma); border-radius: var(--r); cursor: pointer; }
.kuvalataus-alue:hover { border-color: var(--asfaltti); background: var(--pinta-2); }
.kuvalataus-alue i { font-size: 2rem; color: var(--himmea); }
.kuvalataus-alue span { font-size: .86rem; color: var(--himmea); max-width: 26rem; }
.kuvalataus .kuva-esikatselu { margin-top: .9rem; }
.kuvat-otsikko { font-size: clamp(1.6rem, 6vw, 2.6rem); }
.kuvaruudukko { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.kuvakortti { margin: 0; background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r); overflow: hidden; }
.kuvakortti img { display: block; width: 100%; height: 200px; object-fit: cover; background: var(--pinta-2); }
.kuvakortti figcaption { display: flex; justify-content: space-between; align-items: center; padding: .35rem .35rem .35rem .65rem; font-size: .8rem; color: var(--himmea); }
.kuvat-paiva { font-size: 1.05rem; display: flex; gap: .6rem; align-items: baseline; margin: 0 0 .6rem; }
.kuvat-paiva a { color: var(--teksti); }
.kuvat-paiva span { font-size: .85rem; color: var(--himmea); font-weight: 400; }
.kuvakatselu { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 92dvh; overflow: visible; }
.kuvakatselu::backdrop { background: rgba(8, 11, 17, .88); }
.kuvakatselu img { display: block; max-width: 96vw; max-height: 92dvh; object-fit: contain; border-radius: 8px; }
.kuvakatselu-sulje { position: absolute; top: -.5rem; right: -.5rem; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #111; box-shadow: 0 4px 14px rgba(0,0,0,.4); z-index: 1; }
.kuvamerkki { display: inline-flex; align-items: center; gap: 1px; margin-left: .35rem; color: var(--viiva-tumma); text-decoration: none; font-size: .9rem; vertical-align: middle; }
.kuvamerkki:hover { color: var(--teksti); }
.kuvamerkki.on { color: var(--kattovalo-tumma, #B88A00); }
.kuvamerkki small { font-size: .65rem; font-weight: 700; }
html[data-bs-theme="dark"] .kuvamerkki.on { color: var(--kattovalo); }

/* ==========================================================================
   Kaksivaiheinen tunnistautuminen
   ========================================================================== */
.koodikentta { font-size: 1.6rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; padding: .6rem; }
.koodikentta-pieni { max-width: 11rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.varakoodi-ohje summary { cursor: pointer; color: var(--himmea); font-weight: 600; }
.totp-askeleet { padding-left: 1.2rem; margin: 0; }
.totp-askeleet > li { margin-bottom: 1.1rem; color: var(--himmea); }
.totp-askeleet > li > strong { color: var(--teksti); }
.totp-qr svg { display: block; width: 200px; max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--viiva); }
.totp-avain { cursor: pointer; font-size: .9rem; word-break: break-all; }
.varakoodit-laatikko { padding: 1rem 1.1rem; border-radius: var(--r); background: #FFF6DA; border: 1px solid #F1D27A; }
.varakoodit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.5rem; padding-left: 1.4rem; margin: .5rem 0 1rem; }
.varakoodit code { font-size: 1rem; color: var(--teksti); background: none; letter-spacing: .05em; }
html[data-bs-theme="dark"] .varakoodit-laatikko { background: rgba(255, 198, 41, .1); border-color: #5C4A16; }
@media print {
  body:has(.varakoodit-laatikko) * { visibility: hidden; }
  .varakoodit-laatikko, .varakoodit-laatikko * { visibility: visible; }
  .varakoodit-laatikko { position: absolute; inset: 0 auto auto 0; background: #fff; border: 0; }
  .varakoodit-laatikko button { display: none; }
}
.auth-ok { display: flex; gap: .6rem; background: #E3F4EC; color: #0F5E3F; border-radius: var(--r-pieni); padding: .7rem .85rem; margin-bottom: 1.25rem; font-size: .95rem; }
html[data-bs-theme="dark"] .auth-ok { background: rgba(23, 132, 90, .2); color: #79E3B0; }
.kv-valinnat { display: grid; gap: .6rem; }
.kv-valinta { margin: 0; }
.kv-valinta button { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; width: 100%; text-align: left; padding: .9rem 1rem; background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r); color: var(--teksti); font: inherit; }
.kv-valinta button:hover:not(:disabled) { border-color: var(--asfaltti); }
.kv-valinta button:disabled { opacity: .6; cursor: not-allowed; }
.kv-valinta i, .kv-tapa > i { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--asfaltti); color: var(--kattovalo); font-size: 1.1rem; flex: none; }
.kv-valinta strong { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kv-valinta span:not(.tila), .kv-tapa span { font-size: .85rem; color: var(--himmea); line-height: 1.35; }
.kv-tapa { display: flex; gap: .8rem; align-items: flex-start; }
.kv-tapa > div { display: flex; flex-direction: column; }
html[data-bs-theme="dark"] .kv-valinta i, html[data-bs-theme="dark"] .kv-tapa > i { background: #263045; }
@media (hover: hover) { .kv-valinta button:not(:disabled) { cursor: pointer; } }

/* Ulosottoasetukset */
.ulosotto-asetukset { padding: .8rem .9rem; border: 1px solid var(--viiva); border-radius: var(--r-pieni); background: var(--pinta-2); }
.vapaakuukaudet { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .3rem; }
.vapaakk { position: relative; cursor: pointer; }
.vapaakk input { position: absolute; opacity: 0; }
.vapaakk span { display: block; text-align: center; padding: .3rem 0; font-size: .78rem; border: 1px solid var(--viiva-tumma); border-radius: 6px; background: var(--pinta); color: var(--himmea); }
.vapaakk input:checked + span { background: var(--asfaltti); color: var(--kattovalo); border-color: var(--asfaltti); font-weight: 700; }
.vapaakk input:focus-visible + span { box-shadow: 0 0 0 3px var(--kattovalo-heijastus); }
.kuitti-rivi small { font-size: .72rem; color: var(--himmea-2); }
html[data-bs-theme="dark"] .vapaakk input:checked + span { background: #3A4760; border-color: #3A4760; }
.tuonti-tasmays.ok { color: var(--vihrea); font-weight: 600; }
.tuonti-varoitukset { list-style: none; padding: 0; display: grid; gap: .3rem; }
.tuonti-varoitukset li { display: flex; gap: .4rem; color: #8A4B00; }
.tuonti-varoitukset i { flex: none; margin-top: .15rem; color: #C77700; }
html[data-bs-theme="dark"] .tuonti-tasmays.ok { color: #79E3B0; }
html[data-bs-theme="dark"] .tuonti-varoitukset li { color: #F4C27E; }

/* Verokortin tuloraja */
.tulorajapalkki { display: flex; align-items: center; gap: .8rem 1rem; padding: .85rem 1.1rem; border-radius: var(--r); background: var(--pinta); border: 1px solid var(--viiva); }
.tulorajapalkki > i { font-size: 1.35rem; color: var(--himmea); }
.tulorajapalkki > div { display: flex; flex-direction: column; line-height: 1.35; }
.tulorajapalkki span { font-size: .88rem; color: var(--himmea); }
.tulorajapalkki.ylitetty { border-color: #F1D27A; background: #FFF6DA; }
.tulorajapalkki.ylitetty > i { color: #8A6300; }
.tuloraja-mittari { height: 8px; border-radius: 99px; background: var(--pinta-2); margin-top: .5rem; overflow: hidden; }
.tuloraja-mittari span { display: block; height: 100%; background: var(--kattovalo); border-radius: 99px; }
.tulorajapalkki.ylitetty .tuloraja-mittari span { background: var(--punainen); }
html[data-bs-theme="dark"] .tulorajapalkki.ylitetty { background: rgba(255, 198, 41, .1); border-color: #5C4A16; }
html[data-bs-theme="dark"] .tulorajapalkki.ylitetty > i { color: var(--kattovalo); }

/* ==========================================================================
   Vuosikalenteri
   ========================================================================== */
.vuosikalenteri { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem 1.25rem; }
.minikuu { display: block; text-decoration: none; color: inherit; border-radius: var(--r-pieni); padding: .35rem; margin: -.35rem; }
.minikuu:hover { background: var(--pinta-2); }
.minikuu-otsikko { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .35rem; font-size: .9rem; }
.minikuu-otsikko span { font-size: .78rem; color: var(--himmea); font-variant-numeric: tabular-nums; }
.minikuu-ruudukko { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.minikuu-ruudukko b { font-size: .62rem; font-weight: 600; color: var(--himmea-2); text-align: center; text-transform: uppercase; }
.minikuu-ruudukko span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; font-size: .62rem; color: transparent; font-variant-numeric: tabular-nums; }
.minikuu-ruudukko span.tyhja { visibility: hidden; }
.minikuu:hover .minikuu-ruudukko span:not(.tyhja) { color: rgba(27, 34, 48, .55); }
.t0, .kalenteri-selite .t0 { background: var(--pinta-2); }
.t1 { background: #FFF0C2; }
.t2 { background: #FFDD73; }
.t3 { background: #FFC629; }
.t4 { background: #D99B00; }
.minikuu-ruudukko span.tuleva { opacity: .45; }
.minikuu-ruudukko span.tanaan { box-shadow: 0 0 0 2px var(--teksti); }
.kalenteri-selite { display: flex; align-items: center; gap: 3px; font-size: .75rem; color: var(--himmea); }
.kalenteri-selite i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.kalenteri-selite span { margin: 0 .3rem; }
html[data-bs-theme="dark"] .t1 { background: #3D3519; }
html[data-bs-theme="dark"] .t2 { background: #7A6420; }
html[data-bs-theme="dark"] .t3 { background: #C99A1A; }
html[data-bs-theme="dark"] .t4 { background: #FFC629; }
html[data-bs-theme="dark"] .minikuu:hover .minikuu-ruudukko span:not(.tyhja) { color: rgba(255, 255, 255, .6); }
@media (max-width: 575.98px) { .vuosikalenteri { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .9rem; } .kalenteri-selite span { display: none; } }

/* ==========================================================================
   Vuoden kalenteri
   ========================================================================== */
:root { --kp-0: #EDF0F4; --kp-1: #FFF1C4; --kp-2: #FFE08A; --kp-3: #FFC629; --kp-4: #E8A200; --kp-5: #A86F00; }
html[data-bs-theme="dark"] { --kp-0: #1E2738; --kp-1: #3B3520; --kp-2: #6B5718; --kp-3: #A88312; --kp-4: #E0AE1C; --kp-5: #FFD65C; }
.kalenterivuosi { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.kalenterikk { background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r); padding: .8rem .85rem .9rem; }
.kalenterikk header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.kalenterikk header a { font-weight: 700; color: var(--teksti); text-decoration: none; }
.kalenterikk header a:hover { text-decoration: underline; }
.kalenterikk header span { font-size: .8rem; color: var(--himmea); font-variant-numeric: tabular-nums; }
.kalenteriruudukko { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.vp-otsikko { font-size: .66rem; text-align: center; color: var(--himmea-2); text-transform: uppercase; padding-bottom: 2px; }
.kp { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 5px; font-size: .72rem; font-variant-numeric: tabular-nums;
      background: var(--kp-0); color: var(--himmea); text-decoration: none; }
a.kp:hover { outline: 2px solid var(--teksti); outline-offset: -2px; }
.kp.tyhja { background: transparent; }
.kp.tuleva { background: transparent; color: var(--himmea-2); box-shadow: inset 0 0 0 1px var(--viiva); }
.kp.taso-1 { background: var(--kp-1); color: #5C4A16; }
.kp.taso-2 { background: var(--kp-2); color: #4A3A0A; }
.kp.taso-3 { background: var(--kp-3); color: var(--asfaltti); font-weight: 600; }
.kp.taso-4 { background: var(--kp-4); color: #1B2230; font-weight: 700; }
.kp.taso-5 { background: var(--kp-5); color: #fff; font-weight: 700; }
html[data-bs-theme="dark"] .kp.taso-1, html[data-bs-theme="dark"] .kp.taso-2 { color: #F4E3B0; }
html[data-bs-theme="dark"] .kp.taso-4, html[data-bs-theme="dark"] .kp.taso-5 { color: #1B2230; }
.kp.vuoro-ilman { background: transparent; box-shadow: inset 0 0 0 2px var(--punainen); color: var(--punainen); font-weight: 600; }
.kp.tanaan { outline: 2px solid var(--teksti); outline-offset: -2px; }
.kp i { position: absolute; top: 1px; right: 2px; font-size: .5rem; opacity: .75; }
.kalenteri-selitys { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .8rem; color: var(--himmea); }
.kalenteri-selitys .kp { width: 16px; height: 16px; aspect-ratio: auto; display: inline-block; }
.kalenteri-kuvamerkki { font-size: .75rem; }

/* Yhteyspalkki: ei verkkoa / kirjauksia jonossa */
.yhteyspalkki { position: sticky; top: calc(62px + var(--turva-yla, 0px)); z-index: 1025; display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; background: #3A2F12; color: #FFE7A3; font-size: .88rem; }
.yhteyspalkki[hidden] { display: none; }
.yhteyspalkki > i { font-size: 1.1rem; color: var(--kattovalo); }
.yhteyspalkki > span { flex: 1; }
.yhteyspalkki.jonossa { background: #13324A; color: #CFE6FF; }

/* Veroyhteenveto: tulostettaessa vain sisältö */
@media print {
  .ei-tulosteessa, header, .yhteyspalkki, footer, .alanav, .ilmoitukset, nav { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .hero { background: #fff !important; color: #000 !important; padding: 0 0 .5rem !important; }
  .hero * { color: #000 !important; }
  .paneeli { break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc !important; }
  details:not([open]) > :not(summary) { display: none; }
}

/* Kuukauden ennuste */
.ennuste { padding: .9rem 1rem; border: 1px dashed var(--viiva-tumma); border-radius: var(--r); background: var(--pinta-2); }
.ennuste-otsikko { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--himmea); }
.ennuste-luku { font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin-top: .15rem; }
.ennuste-valli { font-size: .82rem; color: var(--himmea); }
.ennuste-rivit { margin-top: .6rem; font-size: .92rem; }
.ennuste-rivit > div { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.ennuste-rivit > div span:first-child { color: var(--himmea); }
.ennuste-tavoite { margin-top: .55rem; font-size: .88rem; font-weight: 600; }
.ennuste-ok { color: #0F7A52; }
.ennuste-alle { color: #B25E00; }
html[data-bs-theme="dark"] .ennuste-ok { color: #79E3B0; }
html[data-bs-theme="dark"] .ennuste-alle { color: #FFB866; }
.ennuste-selite { margin-top: .6rem; font-size: .78rem; color: var(--himmea); line-height: 1.4; }

/* Kassaraportin luku kuvasta */
.ocr-tulos { padding: .85rem .95rem; border: 1px solid var(--viiva-tumma); border-radius: var(--r); background: var(--pinta-2); }
.ocr-tila { font-size: .9rem; color: var(--himmea); }
.ocr-otsikko { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--himmea); margin-bottom: .4rem; }
.ocr-rivi { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--viiva); }
.ocr-rivi:last-child { border-bottom: 0; }
.ocr-napit { display: inline-flex; gap: .25rem; flex: none; }
.ocr-napit .btn { --bs-btn-padding-x: .45rem; --bs-btn-padding-y: .1rem; --bs-btn-font-size: .75rem; }
.ocr-kaikki { max-height: 16rem; overflow: auto; margin-top: .4rem; }
.ocr-teksti { white-space: pre-wrap; max-height: 12rem; overflow: auto; margin: .4rem 0 0; padding: .5rem; background: var(--pinta); border-radius: 8px; }
.ocr-asetettu { box-shadow: 0 0 0 .25rem rgba(255, 198, 41, .55) !important; transition: box-shadow .3s; }
.vero-taulu th[scope="row"] { white-space: normal; overflow-wrap: anywhere; font-weight: 500; }
.vero-taulu tr.fw-semibold th[scope="row"] { font-weight: 700; }
.vero-taulu td.raha { white-space: nowrap; }
@media (max-width: 575.98px) { .vero-taulu th, .vero-taulu td { padding-left: .4rem; padding-right: .4rem; font-size: .9rem; } }

/* Vuoron laskuri, vertailu ja pikakuvakkeet */
.vuorolaskuri > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.vuorolaskuri > summary::-webkit-details-marker { display: none; }
.vuorolaskuri > summary h2 { margin: 0; }
.vuorolaskuri[open] > summary { border-bottom: 1px solid var(--viiva); }
.vl-tulos > div { margin-bottom: .35rem; }
.vl-aika { font-size: 1.05rem; }
.vl-ok { color: #0F7A52; font-size: 1.05rem; }
.vl-varoitus { color: #B25E00; font-size: .9rem; }
html[data-bs-theme="dark"] .vl-ok { color: #79E3B0; }
html[data-bs-theme="dark"] .vl-varoitus { color: #FFB866; }
.vuosivertailu-rivi { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; font-size: .86rem; padding: .5rem .75rem; border-radius: var(--r-pieni); background: var(--pinta-2); }
.vuosivertailu-rivi > span { color: var(--himmea); }
.pikakuvake-korostus { animation: pikakuvake-hehku 2.5s ease-out; }
@keyframes pikakuvake-hehku { 0%, 40% { box-shadow: 0 0 0 .35rem rgba(255, 198, 41, .6); } 100% { box-shadow: 0 0 0 0 rgba(255, 198, 41, 0); } }
@media (max-width: 400px) { .vero-taulu th, .vero-taulu td { font-size: .8rem; padding-left: .3rem; padding-right: .3rem; } }

/* Vapaapäivät */
.kp.vapaa { background: transparent; color: var(--himmea); box-shadow: inset 0 0 0 1px var(--viiva); background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(120,130,150,.22) 4px 6px); }
.kp.vapaa-loma { box-shadow: inset 0 0 0 1.5px #3B9AE1; background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(59,154,225,.28) 4px 6px); }
.kp.vapaa-sairas { box-shadow: inset 0 0 0 1.5px #A66BD9; background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(166,107,217,.28) 4px 6px); }
.vapaalista { display: grid; gap: .4rem; }
.vapaarivi { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border: 1px solid var(--viiva); border-radius: 10px; }
.vapaarivi .vapaa-teksti { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; font-size: .9rem; }
.vapaa-merkki { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--kp-0); color: var(--himmea); flex: none; }
.vapaa-merkki.vapaa-loma { color: #3B9AE1; }
.vapaa-merkki.vapaa-sairas { color: #A66BD9; }
.muistutus-paiva { display: inline-flex; gap: .25rem; margin: 0 .25rem .25rem 0; }

/* Terveystarkastus */
.terveys-lista { display: grid; gap: .75rem; }
.terveys-rivi { display: flex; gap: .85rem; padding: .85rem 1rem; border: 1px solid var(--viiva); border-radius: 12px; }
.terveys-ikoni { font-size: 1.35rem; line-height: 1.2; flex: none; }
.terveys-ok .terveys-ikoni { color: #2E9E5B; }
.terveys-varoitus .terveys-ikoni { color: #E8A200; }
.terveys-virhe { border-color: var(--punainen); }
.terveys-virhe .terveys-ikoni { color: var(--punainen); }
.terveys-ei .terveys-ikoni { color: var(--himmea); }
.terveys-nimi { font-weight: 700; }
.terveys-tila { font-weight: 500; font-size: .75rem; color: var(--himmea); margin-left: .35rem; }
.terveys-yhteenveto { margin-top: .1rem; }
.terveys-tieto { font-size: .82rem; color: var(--himmea); margin-top: .1rem; overflow-wrap: anywhere; }
.terveys-ohje { font-size: .85rem; margin-top: .4rem; padding: .45rem .65rem; background: var(--kp-0); border-radius: 8px; }
.maara.maara-varoitus { background: var(--punainen); color: #fff; }
.muistutus-vika i.bi-heart-pulse { color: var(--punainen); }

/* Erätuonti */
.era-kortti.era-pois { opacity: .6; }
.era-valinta { display: flex; gap: .7rem; align-items: flex-start; margin: 0; cursor: pointer; }
.era-valinta input { margin-top: .3rem; width: 1.25rem; height: 1.25rem; flex: none; }
.era-merkit { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.era-ruudukko { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.era-ruudukko.era-summat { grid-template-columns: repeat(3, 1fr); }
.era-ruudukko .form-label { font-size: .75rem; margin-bottom: .15rem; color: var(--himmea); }
.era-vertailu { font-size: .88rem; padding: .55rem .75rem; border-radius: 10px; background: var(--kp-0); }
.era-vertailu.poikkeaa { background: rgba(220, 53, 69, .1); }
.era-toiminnot { display: flex; flex-wrap: wrap; gap: .5rem; position: sticky; bottom: 4.5rem; padding: .6rem; background: var(--pinta); border: 1px solid var(--viiva); border-radius: 14px; }
@media (max-width: 480px) { .era-ruudukko { grid-template-columns: repeat(2, 1fr); } }

/* Vuosikohtaiset asetukset */
.vuosivalinta { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Ero-selitin */
.eroselitin .syy { padding: .75rem .9rem; border: 1px solid var(--viiva, #dfe3ea); border-radius: .6rem; margin-top: .6rem; }
.eroselitin .syy-paa { border-color: var(--taksi, #f5b301); background: rgba(245, 179, 1, .08); }
.eroselitin .syy-otsikko { margin-bottom: .25rem; }

/* ==========================================================================
   Kuvaajat (SVG), lomakertymä, vuoron lopetus ja etusivun asettelu
   ========================================================================== */
.kuvaaja { display: block; width: 100%; height: auto; overflow: visible; }
.kv-ruudukko { stroke: var(--viiva); stroke-width: 1; }
.kv-teksti { fill: var(--himmea); font-size: 11px; font-family: var(--fontti); }
.kv-arvo { fill: var(--teksti); font-size: 11px; font-weight: 600; font-family: var(--fontti); }
.kv-viiva { fill: none; stroke: var(--kattovalo-tumma); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.kv-alue { fill: var(--kattovalo); fill-opacity: .16; stroke: none; }
.kv-ka { fill: none; stroke: var(--teksti); stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; opacity: .75; }
.kv-vertailu { stroke: var(--himmea); stroke-width: 1.5; stroke-dasharray: 6 4; }
.kv-piste { fill: var(--pinta); stroke: var(--kattovalo-tumma); stroke-width: 2; }
.kv-piste.kesken { stroke-dasharray: 2 2; fill: var(--kattovalo); }
.kv-piste:hover { fill: var(--kattovalo); }
.kv-pylvas { fill: var(--viiva-tumma); }
.kv-pylvas.korostettu { fill: var(--kattovalo); }
.kv-pylvas:hover { fill: var(--kattovalo-tumma); }
html[data-bs-theme="dark"] .kv-pylvas { fill: #4A5B7C; }
html[data-bs-theme="dark"] .kv-pylvas.korostettu { fill: var(--kattovalo); }
.vp-merkki.kv-ka-merkki { background: transparent; border-top: 2px dashed var(--teksti); border-radius: 0; height: 0; width: 14px; opacity: .75; }
.vp-merkki.kv-vertailu-merkki { background: transparent; border-top: 2px dashed var(--himmea); border-radius: 0; height: 0; width: 14px; }
.kv-alaotsikko { font-family: var(--fontti-kapea); font-size: 1rem; font-weight: 600; margin: .4rem 0 .4rem; color: var(--himmea); text-transform: uppercase; letter-spacing: .04em; }

.laskelma > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--viiva); }
.laskelma > div:last-child { border-bottom: 0; }
.laskelma > div span { color: var(--himmea); }
.laskelma > div strong { white-space: nowrap; font-variant-numeric: tabular-nums; }

.yhteenveto-ruudut { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .yhteenveto-ruudut { grid-template-columns: repeat(4, 1fr); } }
.yhteenveto-ruudut > div { background: var(--pinta-2); border-radius: var(--r); padding: .8rem .9rem; display: flex; flex-direction: column; }
.yhteenveto-ruudut span { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--himmea); font-weight: 600; }
.yhteenveto-ruudut strong { font-family: var(--fontti-kapea); font-size: 1.7rem; line-height: 1.15; margin-top: .15rem; }
.yhteenveto-ruudut small { color: var(--himmea); font-size: .78rem; min-height: 1.1em; }

.asettelu-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.asettelu-rivi { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--viiva); border-radius: var(--r); background: var(--pinta); }
.asettelu-valinta { display: flex; align-items: flex-start; gap: .7rem; margin: 0; cursor: pointer; flex: 1; min-width: 0; }
.asettelu-valinta .form-check-input { margin-top: .3rem; flex: none; width: 1.2rem; height: 1.2rem; }
.asettelu-valinta small { display: block; color: var(--himmea); font-size: .8rem; }
.asettelu-napit { display: flex; gap: .3rem; flex: none; }

/* ==========================================================================
   Käyttökokemuksen uudistus: vuoropainike, näppäimistö, hierarkia, mittariteema, haku, Lisää
   ========================================================================== */

/* Kelluva vuoropainike (vain puhelimella) */
.fab-alue { position: fixed; right: calc(1rem + var(--turva-oikea)); bottom: calc(4.6rem + var(--turva-ala)); z-index: 1040; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.fab-nappi { width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 0; background: var(--kattovalo); color: var(--asfaltti); font-size: 1.7rem; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(27, 34, 48, .35), 0 0 0 3px rgba(255, 198, 41, .25); transition: transform .15s; }
.fab-nappi:active { transform: scale(.93); }
.fab-nappi.kaynnissa { background: var(--punainen); color: #fff; box-shadow: 0 8px 22px rgba(27, 34, 48, .35), 0 0 0 3px rgba(194, 54, 43, .3); }
.fab-nappi.tauolla { background: var(--asfaltti); color: var(--kattovalo); box-shadow: 0 8px 22px rgba(27, 34, 48, .35), 0 0 0 3px rgba(255, 198, 41, .35); }
.fab-alue.auki .fab-nappi { transform: rotate(8deg); }
.fab-valikko { background: var(--pinta); border: 1px solid var(--viiva); border-radius: var(--r-iso); box-shadow: 0 16px 40px rgba(27, 34, 48, .28); padding: .5rem; min-width: 15rem; display: grid; gap: .35rem; }
.fab-valikko[hidden] { display: none; }
.fab-tila { display: flex; align-items: center; gap: .55rem; padding: .35rem .6rem; font-size: .85rem; color: var(--himmea); }
.fab-valikko form { margin: 0; }
.fab-toiminto { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .75rem .8rem; border: 0; border-radius: var(--r); background: var(--pinta-2); color: var(--teksti); font: 600 1rem var(--fontti); text-decoration: none; text-align: left; }
.fab-toiminto i { font-size: 1.25rem; }
.fab-toiminto.fab-lopeta { background: var(--punainen); color: #fff; }
body.nappaimisto-auki .fab-alue { display: none !important; }

/* Oma numeronäppäimistö */
.nappaimisto { position: fixed; inset: auto 0 0 0; z-index: 1080; background: var(--pinta); border-top: 1px solid var(--viiva-tumma); box-shadow: 0 -12px 32px rgba(27, 34, 48, .25); padding: .6rem .7rem calc(.7rem + var(--turva-ala)); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.nappaimisto[hidden] { display: none; }
.nappaimisto-paa { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.nappaimisto-nimi { font: 600 1.05rem var(--fontti-kapea); letter-spacing: .03em; text-transform: uppercase; color: var(--himmea); }
.nappaimisto-vaihda { border: 0; background: none; color: var(--himmea); font-size: .78rem; text-decoration: underline; padding: .25rem; }
.nappaimisto-pikasummat { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-bottom: .45rem; }
.nappaimisto-pikasummat button { border: 1px solid var(--kattovalo-tumma); background: rgba(255, 198, 41, .14); color: var(--teksti); border-radius: var(--r); padding: .55rem 0; font: 700 1.05rem var(--fontti); }
.nappaimisto-ruudukko { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.nappaimisto-ruudukko button { border: 0; border-radius: var(--r); background: var(--pinta-2); color: var(--teksti); font: 600 1.55rem var(--fontti-kapea); padding: .8rem 0; min-height: 3.3rem; }
.nappaimisto-ruudukko button:active, .nappaimisto-pikasummat button:active { filter: brightness(.88); transform: scale(.97); }
.nappaimisto-ruudukko .toiminto { background: var(--asfaltti); color: #fff; font-size: 1.05rem; font-family: var(--fontti); }
.nappaimisto-ruudukko .valmis { background: var(--kattovalo); color: var(--asfaltti); }
body.nappaimisto-auki .sivu { padding-bottom: 20rem; }
body.nappaimisto-auki .alanav { visibility: hidden; }
.vain-kosketus { display: none; }
@media (pointer: coarse) { .vain-kosketus { display: block; } }

/* Selitteet i-painikkeen takana */
.info-nappi { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: none; color: var(--himmea); font-size: .8rem; padding: .15rem 0; margin-top: .6rem; }
.info-nappi i { font-size: 1rem; }
.info-nappi[aria-expanded="true"] { color: var(--teksti); }
.info-nappi[aria-expanded="true"] + p { margin-top: .25rem; }

/* Visuaalinen hierarkia: kuukauden tulot isona, muut pienempinä */
@media (min-width: 768px) { .etusivu-luvut { grid-template-columns: 1.7fr 1fr 1fr; } }
.etusivu-luvut > div:first-child .luku { font-size: clamp(2.3rem, 7vw, 3.5rem); line-height: 1.05; }
.etusivu-luvut > div:not(:first-child) .luku { font-size: clamp(1.15rem, 2.6vw, 1.6rem); color: #D6DCE7; }
.etusivu-luvut > div:not(:first-child) { opacity: .92; }
@media (max-width: 575.98px) { .etusivu-luvut { grid-template-columns: 1fr 1fr; } .etusivu-luvut > div:first-child { grid-column: 1 / -1; } }

/* Taksamittarin ulkoasu (oletuksena päällä, vaihdettavissa etusivun asetuksista) */
body.mittari-teema .etusivu-luvut > div:first-child { background: #090D14; box-shadow: inset 0 0 0 1px #2B3548, inset 0 12px 28px rgba(0, 0, 0, .55); position: relative; }
body.mittari-teema .etusivu-luvut > div:first-child .tarra { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; display: flex; align-items: center; gap: .5rem; }
body.mittari-teema .etusivu-luvut > div:first-child .tarra::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kattovalo); box-shadow: 0 0 10px var(--kattovalo); animation: mittarivalo 2.4s ease-in-out infinite; }
body.mittari-teema .etusivu-luvut > div:first-child .luku { color: var(--kattovalo); font-variant-numeric: tabular-nums; letter-spacing: .05em; text-shadow: 0 0 6px rgba(255, 198, 41, .55), 0 0 22px rgba(255, 198, 41, .25); }
body.mittari-teema .etusivu-luvut > div:first-child::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
@keyframes mittarivalo { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { body.mittari-teema .etusivu-luvut > div:first-child .tarra::before { animation: none; } }

/* Etusivun "muut kortit" vuoron aikana */
.muut-kortit > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .85rem 1rem; border: 1px dashed var(--viiva-tumma); border-radius: var(--r); color: var(--himmea); font-weight: 600; }
.muut-kortit > summary::-webkit-details-marker { display: none; }
.muut-kortit > summary span { font-weight: 400; font-size: .85rem; margin-left: auto; }
.muut-kortit[open] > summary i { transform: rotate(180deg); }
.muut-kortit-sisus { padding-top: 1.25rem; }

/* Haku ja Lisää-sivu */
.haku-lomake { position: relative; max-width: 40rem; }
.haku-lomake i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #A3AEC0; pointer-events: none; }
.haku-lomake .form-control { padding: .85rem 1rem .85rem 2.75rem; font-size: 1.05rem; border-radius: var(--r-iso); }
.ryhma-otsikko { font: 600 1.15rem var(--fontti-kapea); letter-spacing: .06em; text-transform: uppercase; color: var(--himmea); margin: 0 0 .75rem; }
kbd { background: var(--pinta-2); color: var(--teksti); border: 1px solid var(--viiva-tumma); border-radius: 5px; padding: .05rem .4rem; font-size: .85em; }


/* ===== Värit, kuljettajatila, aloitusopas, mittarianimaatio ===== */
html[data-aksentti="sininen"] { --kattovalo: #4DA3FF; --kattovalo-tumma: #2B86E6; --kattovalo-heijastus: rgba(77, 163, 255, .42); }
html[data-aksentti="vihrea"] { --kattovalo: #3DDC84; --kattovalo-tumma: #22B866; --kattovalo-heijastus: rgba(61, 220, 132, .42); }
.aksentti-valinta { display: flex; flex-wrap: wrap; gap: .5rem; }
.aksentti-valinta label { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; border: 2px solid var(--viiva); border-radius: 999px; cursor: pointer; background: var(--pinta); }
.aksentti-valinta input { position: absolute; opacity: 0; pointer-events: none; }
.aksentti-valinta label:has(input:checked) { border-color: var(--teksti); font-weight: 600; }
.aksentti-valinta label:has(input:focus-visible) { outline: 3px solid var(--teksti); outline-offset: 2px; }
.aksentti-pallo { width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #FFC629; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.aksentti-sininen .aksentti-pallo { background: #4DA3FF; }
.aksentti-vihrea .aksentti-pallo { background: #3DDC84; }
.teemanappi.paalla { background: var(--kattovalo); color: var(--asfaltti); border-color: var(--kattovalo); }

.aloitus-palkki { height: 8px; border-radius: 999px; background: var(--pinta-2); overflow: hidden; margin-top: 1rem; }
.aloitus-palkki span { display: block; height: 100%; background: var(--kattovalo); border-radius: 999px; transition: width .6s ease; }
.aloitus-askeleet li.tehty a { opacity: .6; }
.aloitus-askeleet li.tehty a::before { content: "✓"; background: var(--kattovalo); }
.aloitus-askeleet li.tehty strong { text-decoration: line-through; }

.tyhja-tila { text-align: center; padding: 2.5rem 1rem; color: var(--himmea); }
.tyhja-tila > i { font-size: 2.6rem; color: var(--kattovalo-tumma); display: block; margin-bottom: .5rem; }
.tyhja-tila h2 { font-size: 1.2rem; color: var(--teksti); margin-bottom: .35rem; }
.tyhja-tila p { max-width: 30rem; margin: 0 auto 1rem; }

[data-mittari].laskee { font-variant-numeric: tabular-nums; }
@keyframes mittari-pulssi { 0% { text-shadow: 0 0 0 transparent; } 40% { text-shadow: 0 0 18px var(--kattovalo); } 100% { text-shadow: 0 0 0 transparent; } }
[data-mittari].laskee { animation: mittari-pulssi 1.1s ease-out; }
@media (prefers-reduced-motion: reduce) { [data-mittari].laskee { animation: none; } .aloitus-palkki span { transition: none; } }

/* Kuljettajatila: isot kosketuskohteet, vain olennainen */
.kuljettaja-otsikko { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-weight: 600; font-size: 1.1rem; }
.kuljettaja-pikalinkit { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.5rem; }
body.kuljettajatila .hero .etusivu-luvut, body.kuljettajatila .hero .hero-ala { display: none; }
body.kuljettajatila .hero { padding-block: 1rem; }
body.kuljettajatila .btn:not(.btn-sm), body.kuljettajatila .kaynnissa-napit .btn, .kuljettaja-pikalinkit .btn { min-height: 64px; font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: .5rem; }
body.kuljettajatila .kaynnissa-napit { display: grid; grid-template-columns: 1fr; gap: .75rem; }
body.kuljettajatila .kaynnissa-napit form { width: 100%; }
body.kuljettajatila .kaynnissa-napit .btn { width: 100%; }
body.kuljettajatila .kaynnissa-luvut .luku { font-size: clamp(2.6rem, 14vw, 4rem); }
body.kuljettajatila .paanav, body.kuljettajatila #hakuNappi { display: none !important; }
