html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===== Sateenkaari-teema (data-bs-theme="rainbow") ===== */
:root {
    --tc-rainbow: linear-gradient(90deg, #e8352a, #f5841f, #f7d038, #7ac143, #1fb6c1, #3b5bdb, #8b3bbd);
}

html[data-bs-theme="rainbow"] body {
    background: linear-gradient(135deg, #fff5f5, #fffdf0, #f0fff4, #f0fbff, #f7f0ff);
    background-attachment: fixed;
}

/* Yläpalkki sateenkaarena (voittaa scoped-tyylin korkeammalla spesifisyydellä) */
html[data-bs-theme="rainbow"] .tc-topbar {
    background: var(--tc-rainbow) !important;
}

/* Korttien yläreunaan ohut sateenkaariraita */
html[data-bs-theme="rainbow"] .card {
    border-top: 3px solid transparent;
    border-image: var(--tc-rainbow) 1;
}

/* Pääpainikkeet sateenkaarisävyllä */
html[data-bs-theme="rainbow"] .btn-primary {
    background: var(--tc-rainbow);
    border: none;
}

/* Otsikot sateenkaariväreillä */
html[data-bs-theme="rainbow"] h1,
html[data-bs-theme="rainbow"] .card-header.bg-primary {
    background: var(--tc-rainbow) !important;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Sininen otsikkopalkki (esim. Käyttäjän tiedot) sateenkaarena, teksti valkoisena */
html[data-bs-theme="rainbow"] .card-header.bg-primary {
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: #fff !important;
}

/* ===== Kesä-teema (data-bs-theme="kesa") ===== */
html[data-bs-theme="kesa"] body {
    background: linear-gradient(135deg, #eafff0, #fff9e6, #e6f7ff);
    background-attachment: fixed;
}

html[data-bs-theme="kesa"] .tc-topbar {
    background: linear-gradient(90deg, #1fb6c1, #4eb3ff) !important;
}

html[data-bs-theme="kesa"] .btn-primary {
    background: #ff9f1c;
    border-color: #ff9f1c;
}

html[data-bs-theme="kesa"] .card-header.bg-primary {
    background: linear-gradient(90deg, #1fb6c1, #4eb3ff) !important;
}

/* ===== Joulu-teema (data-bs-theme="joulu") ===== */
html[data-bs-theme="joulu"] body {
    background: linear-gradient(135deg, #f3fbf4, #ffffff, #fdeceb);
    background-attachment: fixed;
}

html[data-bs-theme="joulu"] .tc-topbar {
    background: linear-gradient(90deg, #146c43, #b3001b) !important;
}

html[data-bs-theme="joulu"] .btn-primary {
    background: #b3001b;
    border-color: #b3001b;
}

html[data-bs-theme="joulu"] .btn-primary:hover {
    background: #8f0016;
    border-color: #8f0016;
}

html[data-bs-theme="joulu"] .card-header.bg-primary {
    background: linear-gradient(90deg, #146c43, #b3001b) !important;
}

/* Kultainen aksentti korttien yläreunaan. */
html[data-bs-theme="joulu"] .card {
    border-top: 3px solid #c9a227;
}

/* ===== Kesäbanneri + animaatiot (etusivu) ===== */
.tc-kesa-banner {
    position: relative;
    height: 140px;
    border-radius: 0.75rem;
    overflow: hidden;
    /* Syksytaivas: harmahtavan sininen ylhäällä, utuinen alhaalla. */
    background: linear-gradient(180deg, #5b7f9e 0%, #90aec4 55%, #d8e4ea 100%);
    box-shadow: inset 0 -12px 24px rgba(255, 255, 255, 0.25);
}

/* Leijuvat syyslehdet: pienet CSS-lehdet (ei kuvia) kelluvat ylhäältä
   vinosti alas ja pyörivät samalla. Väri, koko, reitti, nopeus ja
   negatiivinen viive vaihtelevat lehdittäin, joten banneri on heti
   "täynnä" lehtiä eivätkä ne liiku rivissä. */
.tc-lehti {
    position: absolute;
    top: -14%;
    width: 13px;
    height: 13px;
    pointer-events: none;
    background: var(--tc-lehti-vari, #d9822b);
    /* Lehden muoto: kärki ylhäällä vasemmalla, pyöreä alaosa. */
    border-radius: 0 100% 0 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    animation: tc-lehti-leijuu 13s linear infinite;
}

    /* Lehtiruoti keskellä tummempana viivana. */
    .tc-lehti::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(135deg, transparent 46%, rgba(0, 0, 0, 0.22) 50%, transparent 54%);
    }

/* Lehtimuodot clip-pathilla. Perusmuoto (.tc-lehti) on yleinen soikea lehti;
   nämä luokat antavat puulajikohtaisen siluetin. */
.tc-lehti-vaahtera {
    border-radius: 0;
    clip-path: polygon(50% 0%, 61% 18%, 79% 12%, 72% 30%, 92% 28%, 78% 44%, 100% 50%, 80% 60%,
                       92% 76%, 72% 72%, 62% 92%, 52% 76%, 52% 100%, 48% 100%, 48% 76%, 38% 92%,
                       28% 72%, 8% 76%, 20% 60%, 0% 50%, 22% 44%, 8% 28%, 28% 30%, 21% 12%, 39% 18%);
}

/* Koivu: kolmiomainen, kärkevä lehti. */
.tc-lehti-koivu {
    border-radius: 0;
    clip-path: polygon(50% 0%, 72% 20%, 88% 48%, 66% 84%, 52% 100%, 48% 100%, 34% 84%, 12% 48%, 28% 20%);
}

/* Haapa: lähes pyöreä lehti. */
.tc-lehti-haapa {
    border-radius: 50%;
    clip-path: none;
}

/* Tammi: liuskainen lehti. */
.tc-lehti-tammi {
    border-radius: 0;
    clip-path: polygon(50% 0%, 66% 10%, 60% 22%, 76% 24%, 66% 38%, 84% 42%, 70% 54%, 88% 62%,
                       68% 72%, 78% 88%, 56% 88%, 52% 100%, 48% 100%, 44% 88%, 22% 88%, 32% 72%,
                       12% 62%, 30% 54%, 16% 42%, 34% 38%, 24% 24%, 40% 22%, 34% 10%);
}

/* Pihlaja: kapea, soikea lehdykkä. */
.tc-lehti-pihlaja {
    border-radius: 0;
    clip-path: ellipse(24% 50% at 50% 50%);
}

/* Jäynä: yksi palmunlehti suomalaisten syyslehtien seassa. Viuhkamainen
   siluetti ja trooppinen vihreä – huomaa se, joka jaksaa katsoa tarkkaan. */
.tc-lehti-palmu {
    border-radius: 0;
    clip-path: polygon(50% 100%, 10% 20%, 18% 30%, 22% 12%, 30% 26%, 38% 6%, 44% 22%, 50% 0%,
                       56% 22%, 62% 6%, 70% 26%, 78% 12%, 82% 30%, 90% 20%);
}

.tc-lehti-1  { --tc-lehti-vari: #8a5a2b; left: 91%; width: 20px; height: 20px; animation-duration: 12.3s; animation-delay: -3.7s; }
.tc-lehti-2  { --tc-lehti-vari: #d95f18; left: 82%; width: 17px; height: 17px; animation-duration: 13.6s; animation-delay: -7.4s; }
.tc-lehti-3  { --tc-lehti-vari: #e07b20; left: 73%; width: 14px; height: 14px; animation-duration: 14.9s; animation-delay: -11.1s; }
.tc-lehti-4  { --tc-lehti-vari: #7d2b3a; left: 64%; width: 21px; height: 21px; animation-duration: 16.2s; animation-delay: -14.8s; }
.tc-lehti-5  { --tc-lehti-vari: #b8860b; left: 55%; width: 18px; height: 18px; animation-duration: 17.5s; animation-delay: -2.5s; }
.tc-lehti-6  { --tc-lehti-vari: #e8b830; left: 46%; width: 15px; height: 15px; animation-duration: 11.8s; animation-delay: -6.2s; }
.tc-lehti-7  { --tc-lehti-vari: #9aa63b; left: 37%; width: 22px; height: 22px; animation-duration: 13.1s; animation-delay: -9.9s; }
.tc-lehti-8  { --tc-lehti-vari: #c0392b; left: 28%; width: 19px; height: 19px; animation-duration: 14.4s; animation-delay: -13.6s; }
.tc-lehti-9  { --tc-lehti-vari: #8a5a2b; left: 19%; width: 16px; height: 16px; animation-duration: 15.7s; animation-delay: -1.3s; }
.tc-lehti-10 { --tc-lehti-vari: #d95f18; left: 10%; width: 13px; height: 13px; animation-duration: 17.0s; animation-delay: -5.0s; }
.tc-lehti-11 { --tc-lehti-vari: #e07b20; left: 1%; width: 20px; height: 20px; animation-duration: 11.3s; animation-delay: -8.7s; }
.tc-lehti-12 { --tc-lehti-vari: #7d2b3a; left: 92%; width: 17px; height: 17px; animation-duration: 12.6s; animation-delay: -12.4s; }
.tc-lehti-13 { --tc-lehti-vari: #b8860b; left: 83%; width: 14px; height: 14px; animation-duration: 13.9s; animation-delay: -0.1s; }
.tc-lehti-14 { --tc-lehti-vari: #e8b830; left: 74%; width: 21px; height: 21px; animation-duration: 15.2s; animation-delay: -3.8s; }
.tc-lehti-15 { --tc-lehti-vari: #9aa63b; left: 65%; width: 18px; height: 18px; animation-duration: 16.5s; animation-delay: -7.5s; }
.tc-lehti-16 { --tc-lehti-vari: #c0392b; left: 56%; width: 15px; height: 15px; animation-duration: 17.8s; animation-delay: -11.2s; }
.tc-lehti-17 { --tc-lehti-vari: #8a5a2b; left: 47%; width: 22px; height: 22px; animation-duration: 12.1s; animation-delay: -14.9s; }
.tc-lehti-18 { --tc-lehti-vari: #d95f18; left: 38%; width: 19px; height: 19px; animation-duration: 13.4s; animation-delay: -2.6s; }
.tc-lehti-19 { --tc-lehti-vari: #e07b20; left: 29%; width: 16px; height: 16px; animation-duration: 14.7s; animation-delay: -6.3s; }
.tc-lehti-20 { --tc-lehti-vari: #7d2b3a; left: 20%; width: 13px; height: 13px; animation-duration: 16.0s; animation-delay: -10.0s; }
.tc-lehti-21 { --tc-lehti-vari: #b8860b; left: 11%; width: 20px; height: 20px; animation-duration: 17.3s; animation-delay: -13.7s; }
.tc-lehti-22 { --tc-lehti-vari: #e8b830; left: 2%; width: 17px; height: 17px; animation-duration: 11.6s; animation-delay: -1.4s; }
.tc-lehti-23 { --tc-lehti-vari: #3fa34d; left: 47%; width: 21px; height: 21px; animation-duration: 18.5s; animation-delay: -16.2s; }

@keyframes tc-lehti-leijuu {
    0%   { transform: translate(0, -20px) rotate(0deg);        opacity: 0; }
    10%  { opacity: 1; }
    25%  { transform: translate(-40px, 40px) rotate(90deg); }
    50%  { transform: translate(-90px, 80px) rotate(200deg); }
    75%  { transform: translate(-140px, 110px) rotate(300deg); }
    90%  { opacity: 1; }
    100% { transform: translate(-200px, 170px) rotate(420deg); opacity: 0; }
}

.tc-kesa-teksti {
    position: absolute;
    left: 1.25rem;
    bottom: 0.9rem;
    font-weight: 800;
    font-size: 1.4rem;
    /* Tumman oranssi syksyn sävy; vaalea varjo erottaa tekstin taivaasta. */
    color: #b5510a;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.75);
}

.tc-kesa-piilota {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    opacity: 0.85;
}

    .tc-kesa-piilota:hover {
        opacity: 1;
    }

.tc-kesa-popup {
    z-index: 2000;
}

.tc-kesa-popup-backdrop {
    z-index: 1990;
}

/* ⚠ VÄLIAIKAINEN: kirjautumisen jälkeinen beta-tiedote (ks. Home.razor). */
.tc-tervetuloa-popup {
    z-index: 2000;
}

.tc-tervetuloa-popup-backdrop {
    z-index: 1990;
}

/* Käyttäjävalikon Tiedotteet-popup renderöityy pudotusvalikon sisään, joten
   sen on noustava valikon ja yläpalkin yläpuolelle. */
.tc-tiedote-popup {
    z-index: 2000;
}

.tc-tiedote-popup-backdrop {
    z-index: 1990;
}

.tc-under-construction-modal {
    z-index: 2000;
}

.tc-under-construction-backdrop {
    z-index: 1990;
}

.tc-under-construction-modal .modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.tc-under-construction-image {
    display: block;
    width: auto;
    max-width: min(100%, 22rem);
    max-height: 14rem;
    border-radius: 1.25rem;
    box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.16);
    clip-path: inset(0 round 1.25rem);
    object-fit: contain;
}

.content > .mb-4:first-child:has(> button.btn-sm.btn-outline-secondary) {
    display: none;
}

/* Hakuosumien korostus ilman Bootstrapin oletustäytettä, joka näyttää
   ylimääräiseltä välilyönniltä osuman ympärillä. */
mark {
    padding: 0;
}
/* Aurinko: hehku + sykkivä koko */
.tc-sun {
    position: absolute;
    top: 26px;
    right: 70px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, #fff6a8, #ffd21a 60%, #ffb300);
    box-shadow: 0 0 34px 10px rgba(255, 210, 26, 0.7);
    animation: tc-sun-pulse 3s ease-in-out infinite;
}

/* Pyörivät säteet auringon ympärillä */
.tc-sun::before {
    content: "";
    position: absolute;
    inset: -24px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 214, 40, 0.75) 0deg 6deg, transparent 6deg 30deg);
    -webkit-mask: radial-gradient(circle, transparent 35px, #000 36px);
    mask: radial-gradient(circle, transparent 35px, #000 36px);
    animation: tc-sun-spin 20s linear infinite;
}

@keyframes tc-sun-spin {
    to { transform: rotate(360deg); }
}

@keyframes tc-sun-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes tc-ajelehdus {
    from { left: -90px; }
    to { left: 100%; }
}

/* Lilli ajelehtii lehtien seassa vasemmalta oikealle ja keinahtelee pystysuunnassa kuin tuulessa. */
.tc-lilli {
    position: absolute;
    top: 16px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    will-change: transform, left;
    animation:
        tc-ajelehdus 32s linear infinite,
        tc-lilli-leiju 4s ease-in-out infinite;
    animation-delay: -6s, 0s;
}

@keyframes tc-lilli-leiju {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-14px) rotate(6deg); }
}

/* Kunnioitetaan käyttäjän liike-eston asetusta */
@media (prefers-reduced-motion: reduce) {
    .tc-sun, .tc-sun::before, .tc-lilli, .tc-lehti {
        animation: none;
    }
}

/* Raportin suora tulostus: piilotetaan kaikki muu paitsi raporttitaulukko.
   .raportti-tulostus = tulostettava sisältö, .raportti-toiminnot = napit (pois). */
@media print {
    body * {
        visibility: hidden;
    }

    .raportti-tulostus,
    .raportti-tulostus * {
        visibility: visible;
    }

    .raportti-tulostus {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        overflow: visible;
    }

    /* Näytä vain tulostuksessa esiin tuleva otsikko. */
    .raportti-tulostusotsikko {
        display: block !important;
    }

    /* Napit ja toimintopalkki eivät kuulu tulosteeseen. */
    .raportti-toiminnot {
        display: none !important;
    }
}

/* Globaali navigointi-indikaattori (yläreunan etenemispalkki).
   Näkyy heti navigointilinkkiä klikatessa ja piilotetaan kun sivu on latautunut.
   Antaa käyttäjälle palautteen erityisesti hitaalla palvelimella. */
.tc-navi-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2000;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
    overflow: hidden;
}

.tc-navi-bar.aktiivinen {
    opacity: 1;
}

.tc-navi-bar.aktiivinen::before {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 40%;
    left: -40%;
    background: linear-gradient(90deg, transparent, #0d6efd, #20c997, transparent);
    animation: tc-navi-liuku 1.1s linear infinite;
}

@keyframes tc-navi-liuku {
    0%   { left: -40%; }
    100% { left: 100%; }
}

/* Pidempään (yli 3 s) kestävä lataus: selkeämpi keskitetty odota-ilmoitus,
   jonka navi.js näyttää lisäämällä luokan "nakyvissa". */
.tc-navi-odota {
    position: fixed;
    inset: 0;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
}

.tc-navi-odota.nakyvissa {
    opacity: 1;
    visibility: visible;
}

.tc-navi-odota-laatikko {
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    border-radius: .75rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .3);
    text-align: center;
    max-width: 22rem;
}

.tc-navi-spinner {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto .75rem;
    border: .3rem solid rgba(13, 110, 253, .25);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: tc-navi-pyori .8s linear infinite;
}

@keyframes tc-navi-pyori {
    to { transform: rotate(360deg); }
}

.tc-navi-odota-teksti {
    font-weight: 600;
    font-size: 1.05rem;
}

.tc-navi-odota-vihje {
    font-size: .85rem;
    opacity: .75;
    margin-top: .25rem;
}

@media (prefers-reduced-motion: reduce) {
    .tc-navi-spinner { animation-duration: 2s; }
}

/* Lomakeotsikoiden yhtenäinen tyyli koko sovelluksessa: pieni, tekstin perusväri
   (sama kuin valintaruutujen teksteissä), tiiviisti kentän yläpuolella. */
.form-label {
    font-size: .9rem;
    font-weight: 500;
    color: var(--bs-body-color);
    margin-bottom: 0;
}

/* Osiolaatikko: reunustettu kenttäryhmä, jolla taustavärjätty otsikkopalkki.
   Käytetään lomakkeiden osioihin koko sovelluksessa (esim. asiakaskortin
   Jakelupoikkeukset- ja Markkinointitiedot-välilehdet). */
.tc-osio {
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

.tc-osio-otsikko {
    font-size: .875em;
    font-weight: 600;
    padding: .25rem .5rem;
    background-color: var(--bs-secondary-bg);
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
}

.tc-osio-ohje {
    font-size: .875em;
    color: var(--bs-secondary-color);
    padding: .5rem .5rem 0;
}

.tc-osio-sisalto {
    padding: .5rem;
}

/* Listojen vieritysalue: vierityspalkit (erityisesti vaakasuuntainen) selvästi
   näkyvissä, ei selaimen ohutta oletuspalkkia (esim. asiakaslista jaetussa
   näkymässä). */
.tc-vieritys::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.tc-vieritys::-webkit-scrollbar-thumb {
    background-color: rgba(var(--bs-secondary-rgb), .55);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.tc-vieritys::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--bs-secondary-rgb), .85);
}

.tc-vieritys::-webkit-scrollbar-track {
    background-color: var(--bs-tertiary-bg);
}

/* Listan yläreunan vaakavierityspalkki: kapea alue, jossa näkyy vain palkki.
   Synkronoidaan varsinaiseen vieritysalueeseen js/ylavieritys.js-moduulilla. */
.tc-ylavieritys {
    overflow-x: auto;
    overflow-y: hidden;
    height: 14px;
}

/* Leveä modaali: skaalautuu käytettävissä olevaan tilaan (esim. asiakashaku).
   Kapealla näytöllä Bootstrapin oletusmarginaalit, leveällä lähes koko ruutu.
   Täyttää tilan myös pystysuunnassa (modal-dialog-scrollable vierittää sisällön). */
.tc-modal-leve {
    max-width: min(96vw, 100rem);
    height: calc(100vh - 3.5rem);
}

.tc-modal-leve .modal-content {
    height: 100%;
}

/* Tiiviit syöttökentät lomakkeilla, joissa on tc-otsikot-3 (esim. asiakaskortti):
   normaali ylä-/alapadding, tiivis vasen ja oikea reuna. */
.tc-otsikot-3 .form-control,
.tc-otsikot-3 .form-select {
    padding: .19rem .35rem;
}

/* Hohtava painike: sykkivä hohtoreunus, jolla väliaikainen tai erityisen
   huomion vaativa toiminto nostetaan esiin (esim. etusivun testipainike). */
.tc-hohto-nappi {
    animation: tc-hohto 1.6s ease-in-out infinite;
}

@keyframes tc-hohto {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(255, 193, 7, .55); }
    50%      { box-shadow: 0 0 22px 8px rgba(255, 193, 7, .95); }
}

@media (prefers-reduced-motion: reduce) {
    .tc-hohto-nappi { animation-duration: 4s; }
}

/* Hupinurkan biorytmi-info: sama kerrostus kuin muissa omissa popupeissa. */
.bio-info-popup {
    z-index: 2000;
}

.bio-info-backdrop {
    z-index: 1990;
}

/* Virheilmoitussivu (VirheRaja, Error.razor): kapea keskitetty laatikko.
   Käyttäjälle näytetään vain yleisilmoitus – tekniset tiedot menevät
   ylläpidon sähköpostiin. */
.tc-virhesivu {
    max-width: 560px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.tc-virhesivu-napit {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}

.tc-virhesivu-viite {
    margin: 1rem 0 0;
    font-size: .875em;
    color: var(--bs-secondary-color);
}

/* Tunnusluvun infoikoni etusivun korteissa (LukuInfo): pieni "i" kortin
   oikeassa yläkulmassa, josta aukeaa selitelaatikko luvun sisällöstä. */
.tc-luku-info {
    position: absolute;
    top: .35rem;
    right: .5rem;
    z-index: 2;
}

.tc-luku-info > summary {
    list-style: none;
    cursor: pointer;
    color: var(--bs-secondary-color);
    line-height: 1;
}

.tc-luku-info > summary::-webkit-details-marker {
    display: none;
}

.tc-luku-info > summary:hover,
.tc-luku-info[open] > summary {
    color: var(--bs-primary);
}

.tc-luku-selite {
    position: absolute;
    top: 1.5rem;
    right: 0;
    width: 17rem;
    max-width: 70vw;
    padding: .5rem .625rem;
    font-size: .8125rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
