/* Globálne štýly. Farby komponentov idú výhradne z témy MudBlazor (CSS premenné --mud-palette-*).
   Jediné pevné farby sú pozadia dokumentu pred načítaním témy (zodpovedajú paletám v AppTheme.cs) a značková
   úvodná obrazovka (indigo ako logo a splash nainštalovanej aplikácie). */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html[data-theme="light"] body { background: #F6F7F9; color: #1F2933; }
html[data-theme="dark"] body { background: #14171C; color: #E3E6EA; }

/* Úvodná obrazovka: značkové indigo (= manifest background_color #1E1B4B), logo s jemným „dýchaním“,
   pod ním skutočný priebeh načítania (Blazor nastavuje --blazor-load-percentage). */
.wt-boot {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-bottom: 8vh;
    background: radial-gradient(circle at 50% 38%, #3730A3 0%, #1E1B4B 62%);
    color: #EEF2FF;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wt-boot-logo {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 18px 40px -12px rgba(10, 8, 40, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: wt-breathe 2.4s ease-in-out infinite;
}

.wt-boot-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }

.wt-boot-progress {
    width: 168px;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(238, 242, 255, 0.16);
}

.wt-boot-progress > span {
    display: block;
    height: 100%;
    min-width: 10%;
    width: var(--blazor-load-percentage, 0%);
    border-radius: inherit;
    background: #C7D2FE;
    transition: width 0.2s ease-out;
}

@keyframes wt-breathe { 50% { transform: translateY(-4px) scale(1.03); } }

/* Bez animácií iba pri voľbe „Vypnúť animácie“ (trieda wt-motion chýba). */
html:not(.wt-motion) .wt-boot-logo { animation: none; }
html:not(.wt-motion) .wt-boot-progress > span { transition: none; }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 12px 16px;
    background: var(--mud-palette-error, #B91C1C);
    color: var(--mud-palette-error-text, #F8FAFC);
    gap: 12px;
}

#blazor-error-ui .reload { color: inherit; font-weight: 600; margin-left: 12px; }
#blazor-error-ui .dismiss { float: right; background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; }

/* Spodná navigácia na mobile (pod 960 px), bočná navigácia na desktope. */
.wt-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: color-mix(in srgb, var(--mud-palette-surface) 90%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--mud-palette-divider);
    padding-bottom: env(safe-area-inset-bottom);
}

.wt-bottom-nav a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    min-height: 56px;
    box-sizing: border-box;
    text-decoration: none;
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
}

.wt-bottom-nav a.active { color: var(--mud-palette-primary); font-weight: 600; }
.wt-bottom-nav a .mud-icon-root { box-sizing: content-box; padding: 2px 16px; border-radius: 999px; transition: background-color .15s ease; }
.wt-bottom-nav a.active .mud-icon-root { background: color-mix(in srgb, var(--mud-palette-primary) 15%, transparent); }

/* Horná lišta: plochá, priesvitná s rozmazaním, oddelená jemnou čiarou. */
.wt-appbar.mud-appbar {
    background-color: color-mix(in srgb, var(--mud-palette-appbar-background) 82%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--mud-palette-divider);
}
.wt-brand { display: inline-flex; align-items: center; gap: 10px; margin-left: 8px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em; }
.wt-brand img { border-radius: 8px; display: block; }
.wt-brand:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 4px; border-radius: 8px; }

/* Bočná navigácia: položky ako zaoblené „pilulky“, aktívna podfarbená primárnou farbou. */
.wt-drawer.mud-drawer { border-right: 1px solid var(--mud-palette-divider); }
.wt-nav { padding: 12px 10px; }
.wt-nav .mud-nav-link { border-radius: 10px; margin: 2px 0; padding: 9px 12px; color: var(--mud-palette-text-secondary); }
.wt-nav .mud-nav-link .mud-nav-link-text { font-weight: 500; }
.wt-nav .mud-nav-link:hover:not(.mud-nav-link-disabled) { background-color: var(--mud-palette-action-default-hover); color: var(--mud-palette-text-primary); }
/* Akcent na 12 % podfarbení: svetlý 5,2:1, tmavý 6,6:1 (WCAG AA). */
.wt-nav .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
}
.wt-nav .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-text { font-weight: 600; }
.wt-nav .mud-nav-link.active .mud-nav-link-icon { color: var(--mud-palette-primary); }

.wt-main-content { padding-bottom: 24px; }

@media (max-width: 959.98px) {
    .wt-bottom-nav { display: flex; }
    .wt-main-content { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    .wt-desktop-only { display: none !important; }
}

@media (min-width: 960px) {
    .wt-mobile-only { display: none !important; }
}

.wt-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(60rem 30rem at 50% -10%, color-mix(in srgb, var(--mud-palette-primary) 14%, transparent), transparent 70%),
        var(--mud-palette-background);
}

.wt-auth-card { width: 100%; max-width: 440px; }
/* Oddeľovač „alebo“ medzi prihlásením e-mailom a demom. */
.wt-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--mud-palette-text-secondary); font-size: .8125rem; }
.wt-or::before, .wt-or::after { content: ""; flex: 1 1 0; border-top: 1px solid var(--mud-palette-divider); }

.wt-auth-brand { display: flex; justify-content: center; margin-bottom: 16px; }
.wt-auth-brand img { border-radius: 14px; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--mud-palette-primary) 70%, transparent); }
.wt-auth-page .mud-paper { border-radius: 20px; border: 1px solid var(--mud-palette-divider-light); }
html[data-theme="dark"] .wt-auth-page .mud-paper { border-color: var(--mud-palette-divider); }

.wt-code-input input {
    font-size: 1.5rem;
    letter-spacing: 0.4em;
    text-align: center;
    font-family: Consolas, "Courier New", monospace;
}

.wt-footer {
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    padding: 16px 0;
    text-align: center;
}
h1:focus, h1:focus-visible { outline: none; }

/* Náhľad loga na bielom podklade – PDF faktúry je vždy svetlé, logo sa tak zobrazí ako na faktúre. */
.wt-logo-preview { max-height: 80px; max-width: 240px; background: #FFFFFF; padding: 8px; border-radius: 4px; } /* podklad PDF – vždy svetlý */

/* Farebná značka projektu (farba z palety projektov, nie z témy – je čitateľná na oboch podkladoch). */
.wt-color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.wt-color-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.wt-color-swatch[aria-checked="true"] { border-color: var(--mud-palette-text-primary); outline: 2px solid var(--mud-palette-background); outline-offset: -4px; }
.wt-clickable-row { cursor: pointer; }

/* Aktuálna položka v breadcrumbs: MudBlazor ju kreslí farbou „disabled“ (nedostatočný kontrast) – použije sa sekundárny text témy. */
.mud-breadcrumbs .mud-breadcrumb-item.mud-disabled > a,
.mud-breadcrumbs .mud-breadcrumb-item.mud-disabled { color: var(--mud-palette-text-secondary); }

/* Časovač – hlavná akcia aplikácie, výrazný na prvý pohľad.
   Hore pole na nový časovač (popis, projekt, štítky) a Spustiť / Spustiť ďalší časovač; pod ním bežiace časovače
   (čas, Zastaviť, klik = rozbalenie s úpravou). Desktop: lepkavá karta pod hornou lištou. Mobil: plávajúca karta
   nad spodnou navigáciou, bežiace nad poľom (projekt a štítky poľa sa rozbalia šípkou). */
.wt-timer {
    --wt-timer-accent: var(--mud-palette-primary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 12px 20px;
    margin-bottom: 24px;
    position: sticky;
    top: 76px;
    z-index: 5;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--wt-timer-accent) 35%, var(--mud-palette-divider));
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--wt-timer-accent) 9%, transparent), transparent 60%),
        var(--mud-palette-surface);
    box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--wt-timer-accent) 70%, transparent), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color .2s ease, box-shadow .2s ease;
}
/* Medzera medzi hornou lištou a lepkavým časovačom – obsah pod ňou pri posúvaní nepresvitá. */
.wt-timer::before { content: ""; position: absolute; left: -2px; right: -2px; top: -14px; height: 13px; background: var(--mud-palette-background); }
.wt-timer-running { --wt-timer-accent: var(--mud-palette-success); border-width: 2px; padding: 11px 11px 11px 19px; }
.wt-timer-composer { display: flex; align-items: center; gap: 16px; }
.wt-timer-fields { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.wt-timer-description { flex: 1 1 auto; min-width: 0; }
.wt-timer-description .mud-input { font-size: 1.0625rem; }
.wt-timer-description .mud-input-control, .wt-timer-project .mud-input-control { margin-top: 0; }
.wt-timer-meta { flex: 0 1 320px; min-width: 220px; display: flex; align-items: center; gap: 4px; }
.wt-timer-project { flex: 1 1 auto; min-width: 0; }
.wt-timer-tags { flex: 0 0 auto; position: relative; }
.wt-tags-popover { width: min(320px, calc(100vw - 32px)); }
.wt-timer .wt-timer-button { height: 56px; min-width: 148px; padding: 0 24px; border-radius: 999px; font-size: 1.0625rem; white-space: nowrap; }
.wt-timer .wt-timer-button .mud-icon-root { font-size: 1.75rem; }

/* Popis s návrhmi štítkov po napísaní „#“ a pole Štítky s návrhmi */
.wt-description-field, .wt-tag-input { position: relative; min-width: 0; }
.wt-tag-suggestions { min-width: 200px; max-height: 260px; overflow-y: auto; padding: 4px; }
.wt-tag-suggestion { padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--mud-palette-primary); white-space: nowrap; }
.wt-tag-suggestion:hover, .wt-tag-suggestion.wt-active { background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent); }

/* Nastavenia → Štítky: názov a rozsah (všetky projekty / projekt) vedľa seba, na úzkej obrazovke pod sebou */
.wt-tag-name { flex: 1 1 200px; }
.wt-tag-scope { flex: 1 1 220px; }
.wt-tag-add { height: 40px; margin-top: 6px; }
.wt-tag-row + .wt-tag-row { border-top: 1px solid var(--mud-palette-divider); }

/* Bežiace časovače */
.wt-timer-list {
    list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--mud-palette-divider);
    display: flex; flex-direction: column; gap: 4px;
}
.wt-run { border-radius: 12px; background: color-mix(in srgb, var(--mud-palette-success) 6%, transparent); transition: background-color .2s ease; }
.wt-run-open { background: color-mix(in srgb, var(--mud-palette-success) 11%, transparent); }
.wt-run-head { display: flex; align-items: center; gap: 8px; padding: 2px 8px 2px 2px; }
.wt-run-toggle {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px;
    background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.wt-run-toggle:hover { background: color-mix(in srgb, var(--mud-palette-success) 10%, transparent); }
.wt-run-toggle:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 1px; }
.wt-run-dot {
    flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
    background: var(--wt-run-color, var(--mud-palette-success)); animation: wt-pulse 1.6s ease-out infinite;
}
.wt-run-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; }
.wt-run-description { font-weight: 600; }
.wt-run-chevron { flex: 0 0 auto; color: var(--mud-palette-text-secondary); transition: transform .25s ease; }
.wt-run-open .wt-run-chevron { transform: rotate(180deg); }
.wt-run-elapsed { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
/* Jediný bežiaci časovač – veľký čas ako doteraz. */
.wt-timer-list:has(> .wt-run:only-child) .wt-run-elapsed { font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; }
/* Rozbalenie s animáciou výšky (0fr → 1fr). */
.wt-run-details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.wt-run-open .wt-run-details { grid-template-rows: 1fr; }
.wt-run-details-inner { overflow: hidden; min-height: 0; }
.wt-run-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(88px, 0.45fr) minmax(0, 1.3fr) minmax(0, 1.3fr) auto; gap: 8px; padding: 4px 10px 10px; align-items: start; }
.wt-run-fields .mud-input-control { margin-top: 0; }
@keyframes wt-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mud-palette-success) 55%, transparent); }
    70%, 100% { box-shadow: 0 0 0 8px transparent; }
}
html:not(.wt-motion) .wt-run-dot { animation: none; }
html:not(.wt-motion) .wt-timer, html:not(.wt-motion) .wt-run, html:not(.wt-motion) .wt-run-details, html:not(.wt-motion) .wt-run-chevron { transition: none; }

@media (max-width: 959.98px) {
    .wt-timer {
        position: fixed;
        left: 8px;
        right: 8px;
        /* 10 px nad spodnou navigáciou (výška 65 px) – plávajúca karta je od nej vizuálne oddelená. */
        bottom: calc(75px + env(safe-area-inset-bottom));
        top: auto;
        margin: 0;
        padding: 6px 6px 6px 2px;
        gap: 6px;
        z-index: 1150;
        box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.12);
    }
    .wt-timer::before { content: none; }
    .wt-timer-running { padding: 5px 5px 5px 1px; }
    .wt-timer-composer { gap: 6px; }
    .wt-timer-fields { flex: 1 1 0; flex-wrap: wrap; gap: 8px; }
    .wt-timer-meta { display: none; order: 10; flex: 1 1 100%; }
    .wt-timer-expanded .wt-timer-meta { display: flex; }
    .wt-timer-description .mud-input { font-size: 1rem; }
    .wt-timer .wt-timer-button { width: 48px; height: 48px; min-width: 0; padding: 0; font-size: 0; }
    .wt-timer .wt-timer-button .mud-icon-root { font-size: 1.75rem; margin: 0; }
    /* Bez medzery medzi ikonou a skrytým textom – ikona presne na stred kruhu. */
    .wt-timer .wt-timer-button .mud-fab-label { gap: 0; justify-content: center; }
    /* Bežiace nad poľom (pole ostáva pri palci), pri mnohých sa zoznam posúva. */
    .wt-timer-list { order: -1; padding: 0 0 6px 4px; border-top: 0; border-bottom: 1px solid var(--mud-palette-divider); max-height: 45vh; overflow-y: auto; }
    .wt-run-elapsed, .wt-timer-list:has(> .wt-run:only-child) .wt-run-elapsed { font-size: 1.125rem; }
    .wt-run-fields { grid-template-columns: 1fr; }
    .wt-main-content { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
    /* Bežiace časovače – vyššia plávajúca karta nesmie zakryť koniec obsahu. */
    body:has(.wt-timer-has-list) .wt-main-content { padding-bottom: calc(240px + env(safe-area-inset-bottom)); }
}

/* Zoznam záznamov času */
.wt-entry-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--mud-palette-divider); flex-wrap: wrap; }
.wt-entry-row:last-child { border-bottom: none; }
.wt-entry-main { flex: 1 1 260px; min-width: 0; cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; }
.wt-entry-main:hover .wt-entry-description { text-decoration: underline; text-decoration-color: var(--mud-palette-text-disabled); }
.wt-entry-main:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.wt-entry-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.wt-entry-noproject { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; color: var(--mud-palette-warning-darken); }
.wt-entry-tag { font-size: .8125rem; color: var(--mud-palette-primary); white-space: nowrap; }
/* Zámerne súbežný záznam – jemný pruh vľavo (bežal popri inej práci). */
.wt-entry-time { display: flex; flex-direction: column; align-items: flex-end; min-width: 92px; margin-left: auto; }
.wt-entry-times { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wt-entry-duration { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.wt-period-select { flex: 0 1 220px; min-width: 160px; }
.wt-date-filter { flex: 0 1 170px; min-width: 140px; }
.wt-group-header { display: flex; align-items: baseline; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
.wt-group-total { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Stav synchronizácie v hornej lište; na úzkej obrazovke iba ikona a počet neodoslaných zmien. */
.wt-sync-status { text-transform: none; white-space: nowrap; }
@media (max-width: 599.98px) {
    .wt-sync-status .wt-sync-text { display: none; }
}

/* Lišta „Je dostupná nová verzia“ – vždy navrchu, kým sa stránka neobnoví. */
.wt-update-bar {
    position: fixed;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    border-radius: 8px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    max-width: calc(100vw - 32px);
}

/* Faktúry: čísla zarovnané doprava, riadok položky v editore. */
.wt-num { text-align: right !important; white-space: nowrap; }

.wt-invoice-item {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 110px 80px 140px auto 130px auto;
    gap: 8px;
    align-items: start;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.wt-invoice-item.wt-no-vat { grid-template-columns: minmax(200px, 1fr) 110px 80px 140px 130px auto; }

.wt-invoice-item .wt-item-amount { padding-top: 16px; text-align: right; font-weight: 600; white-space: nowrap; }

@media (max-width: 959.98px) {
    .wt-invoice-item, .wt-invoice-item.wt-no-vat { grid-template-columns: 1fr 1fr; }
    .wt-invoice-item .wt-item-description { grid-column: 1 / -1; }
    .wt-invoice-item .wt-item-amount { padding-top: 8px; text-align: left; }
}


/* Import: tlačidlo výberu súboru s ovládateľným (skrytým len vizuálne) vstupom. */
.wt-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wt-file-button { cursor: pointer; position: relative; }
.wt-file-button:focus-within { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }

/* Grafy (štatistiky, prehľad) – farby výhradne z témy, hodnoty aj v tabuľke pod grafom. */
.wt-chart { margin: 0; }
/* Pri málo stĺpcoch (napr. roky) najviac 96 px na stĺpec, zarovnané na stred. */
.wt-chart-bars { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 180px; border-bottom: 1px solid var(--mud-palette-lines-default); padding-top: 4px; }
.wt-chart-group { flex: 1 1 0; min-width: 0; max-width: 96px; height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.wt-chart-bar { flex: 1 1 0; min-width: 2px; background: var(--mud-palette-primary); border-radius: 3px 3px 0 0; position: relative; overflow: hidden; }
/* Zvýraznené časti stĺpca (fakturácia: čaká na úhradu, po splatnosti) – vrch stĺpca. */
.wt-chart-seg { position: absolute; left: 0; right: 0; display: block; }
.wt-seg-warn, .wt-legend-swatch.wt-seg-warn { background: var(--mud-palette-warning); }
.wt-seg-alert, .wt-legend-swatch.wt-seg-alert { background: var(--mud-palette-error); }
.wt-chart-footer { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.wt-chart-footer a { color: inherit; text-decoration: none; }
.wt-chart-footer a:hover { text-decoration: underline; }
.wt-chart-footer .wt-legend-swatch { margin-right: 6px; vertical-align: -1px; }
.wt-chart-bar.wt-series-2 { background: var(--mud-palette-secondary); }
.wt-chart-labels { display: flex; justify-content: center; gap: 3px; margin-top: 4px; }
.wt-chart-labels > span { flex: 1 1 0; min-width: 0; max-width: 96px; overflow: hidden; white-space: nowrap; text-align: center; font-size: 0.7rem; }
.wt-legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 0.8rem; }
.wt-legend-swatch { width: 12px; height: 12px; border-radius: 2px; background: var(--mud-palette-primary); display: inline-block; }
.wt-legend-swatch.wt-series-2 { background: var(--mud-palette-secondary); }
.wt-chart-summary { font-size: 0.85rem; margin-bottom: 8px; }
.wt-chart-column { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.wt-chart-column > .wt-chart-bar { flex: 0 0 auto; }
.wt-chart-value { font-size: 0.7rem; line-height: 1.2; margin-bottom: 2px; text-align: center; white-space: nowrap; color: var(--mud-palette-text-secondary); font-variant-numeric: tabular-nums; }
/* Rozpracované obdobie (aktuálny mesiac) – svetlejší stĺpec, aby nízka hodnota nemýlila. */
.wt-chart-bar-partial, .wt-legend-swatch.wt-chart-bar-partial { opacity: 0.45; }
.wt-chart-average { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--mud-palette-text-secondary); pointer-events: none; }
.wt-chart-average-label { position: absolute; right: 0; bottom: 2px; padding: 0 4px; font-size: 0.7rem; color: var(--mud-palette-text-secondary); background: var(--mud-palette-surface); border-radius: 3px; }
@media (max-width: 599px) { .wt-chart-value { display: none; } }
.wt-share-track { height: 10px; border-radius: 5px; background: var(--mud-palette-action-disabled-background); overflow: hidden; min-width: 60px; }
.wt-share-fill { height: 100%; background: var(--mud-palette-primary); border-radius: 5px; }
.wt-heatmap { display: grid; grid-template-columns: 2.5rem repeat(24, minmax(10px, 1fr)); gap: 2px; align-items: center; font-size: 0.7rem; }
.wt-heat-cell { aspect-ratio: 1; border-radius: 2px; background: var(--mud-palette-primary); }
.wt-heat-empty { aspect-ratio: 1; border-radius: 2px; background: var(--mud-palette-action-disabled-background); }
.wt-kpi-value { font-variant-numeric: tabular-nums; }

/* Karty ukazovateľov: ikona v podfarbenom kruhu (odtieň podľa významu), výrazná hodnota. */
.wt-stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.wt-stat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.wt-stat-label { color: var(--mud-palette-text-secondary); font-weight: 500; }
.wt-stat .wt-kpi-value { font-size: 1.625rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.wt-stat-icon {
    --wt-tone: var(--mud-palette-primary);
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 34px; height: 34px; border-radius: 10px;
    color: var(--wt-tone);
    background: color-mix(in srgb, var(--wt-tone) 14%, transparent);
}
.wt-tone-secondary .wt-stat-icon, .wt-stat-icon.wt-tone-secondary { --wt-tone: var(--mud-palette-secondary); }
.wt-tone-info .wt-stat-icon, .wt-stat-icon.wt-tone-info { --wt-tone: var(--mud-palette-info); }
.wt-tone-success .wt-stat-icon, .wt-stat-icon.wt-tone-success { --wt-tone: var(--mud-palette-success); }
.wt-tone-warning .wt-stat-icon, .wt-stat-icon.wt-tone-warning { --wt-tone: var(--mud-palette-warning); }
.wt-tone-error .wt-stat-icon, .wt-stat-icon.wt-tone-error { --wt-tone: var(--mud-palette-error); }
.wt-tone-default .wt-stat-icon { --wt-tone: var(--mud-palette-text-secondary); }
@media (max-width: 599.98px) {
    .wt-stat { padding: 12px; }
    .wt-stat-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
    .wt-stat-icon { width: 28px; height: 28px; border-radius: 8px; }
    .wt-stat-label { font-size: .8125rem; line-height: 1.3; }
    .wt-stat .wt-kpi-value { font-size: 1.25rem; }
}

/* Segmentový prepínač (napr. Mesiace / Štvrťroky / Roky): podklad v jemnej sivej, zvolená položka ako „karta“. */
.mud-toggle-group.wt-segmented {
    grid-template-columns: none !important;
    grid-auto-flow: column;
    gap: 2px; padding: 3px; border: none; border-radius: 10px;
    background: var(--mud-palette-action-default-hover);
}
.wt-segmented .mud-toggle-item {
    border: none !important; border-radius: 8px !important; padding: 3px 12px; min-width: 0;
    background: transparent; color: var(--mud-palette-text-secondary); box-shadow: none;
}
.wt-segmented .mud-toggle-item:hover { background: var(--mud-palette-action-default-hover); color: var(--mud-palette-text-primary); }
.wt-segmented .mud-toggle-item.mud-toggle-item-selected {
    background: var(--mud-palette-surface); color: var(--mud-palette-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .wt-segmented .mud-toggle-item.mud-toggle-item-selected { background: var(--mud-palette-background-gray); }

/* Pruh demo účtu: kedy sa zmaže, ukončenie dema. */
.wt-demo-banner {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 4px 4px 12px; margin-bottom: 16px; border-radius: 12px;
    background: color-mix(in srgb, var(--mud-palette-info) 10%, var(--mud-palette-surface));
    border: 1px solid color-mix(in srgb, var(--mud-palette-info) 35%, var(--mud-palette-divider));
    font-size: .875rem;
}
.wt-demo-banner > .mud-icon-root { color: var(--mud-palette-info); }
.wt-demo-banner > span { min-width: 0; }
.wt-demo-banner > .mud-button-root { flex: 0 0 auto; white-space: nowrap; }

/* Hlavička stránky: nadpis a podnadpis s odstupom od obsahu. */
.wt-page-header { margin-bottom: 20px; }
.wt-page-header h1 { margin-bottom: 2px; }
.wt-table-scroll { overflow-x: auto; }
/* Posúvať sa má obal tabuľky (dosiahnuteľný klávesnicou), nie vnútorný kontajner MudBlazor. */
.wt-table-scroll .mud-table-container { overflow: visible; }
.wt-table-scroll:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }

/* Prístupnosť: odkaz „Preskočiť na obsah“ – viditeľný iba pri fokuse klávesnicou. */
.wt-skip-link { position: absolute; left: -10000px; top: 8px; z-index: 3000; padding: 8px 16px; border-radius: 4px;
    background: var(--mud-palette-surface); color: var(--mud-palette-primary); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.wt-skip-link:focus { left: 8px; }
.wt-main:focus { outline: none; }

/* Mobil: filtre zbalené pod tlačidlom (desktop ich zobrazuje vždy). */
@media (max-width: 959.98px) {
    .wt-collapsible:not(.wt-open) { display: none; }
}
@media (min-width: 960px) {
    .wt-mobile-only { display: none !important; }
}

/* Čísla v tabuľkách: vpravo a tabuľkové číslice (rovnaká šírka) – stĺpce sa dajú porovnávať pohľadom. */
.mud-table-root, .mud-simple-table table, .wt-kpi-value, .wt-num { font-variant-numeric: tabular-nums; }

/* Tmavý režim: vyvýšené prvky (ponuky, výbery, dialógy) o stupeň svetlejšie než karty – odlíšenie jasom. */
html[data-theme="dark"] .mud-popover,
html[data-theme="dark"] .mud-dialog { background-color: var(--mud-palette-background-gray); }

/* Plochy sa odlišujú jasom a jemným okrajom: vo svetlom režime aj mäkký tieň, v tmavom bez tieňa (nie je vidieť). */
.mud-paper.mud-elevation-1 { border: 1px solid var(--mud-palette-divider-light); }
html[data-theme="light"] .mud-paper.mud-elevation-1 { box-shadow: 0 1px 2px rgba(31, 41, 51, 0.04), 0 4px 16px -8px rgba(31, 41, 51, 0.10); }
html[data-theme="dark"] .mud-paper.mud-elevation-1 { box-shadow: none; border-color: var(--mud-palette-divider); }

/* Mapa účtov v Správe (vlastná SVG mapa, farby z témy). */
.wt-map-svg { width: 100%; height: auto; aspect-ratio: 2 / 1; display: block; border-radius: 6px; }
.wt-map-sea { fill: var(--mud-palette-background); }
/* Hrúbky čiar nastavuje komponent podľa priblíženia (jednotky mapy). */
.wt-map-land { fill: var(--mud-palette-lines-default); stroke: var(--mud-palette-divider); }
.wt-map-marker { fill: var(--mud-palette-primary); fill-opacity: 0.8; stroke: var(--mud-palette-surface); cursor: pointer; outline: none; }
.wt-map-marker:hover, .wt-map-marker:focus-visible { fill-opacity: 1; stroke: var(--mud-palette-text-primary); }
.wt-map-marker-selected { fill: var(--mud-palette-secondary); fill-opacity: 1; stroke: var(--mud-palette-text-primary); }
.wt-row-selected td { background: var(--mud-palette-action-default-hover); }

.wt-share-value { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Pomocník: text tém z resx (odseky, zoznamy, tabuľka, klávesy). */
.wt-help-body { line-height: 1.6; }
.wt-help-body p, .wt-help-body ul, .wt-help-body table { margin: 0 0 .75rem; }
.wt-help-body ul { padding-left: 1.25rem; }
.wt-help-body li { margin-bottom: .25rem; }
.wt-help-body h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 .5rem; }
.wt-help-body code { background: var(--mud-palette-action-default-hover); border-radius: 4px; padding: 0 .3em; font-size: .875em; }
.wt-help-body kbd { border: 1px solid var(--mud-palette-lines-default); border-bottom-width: 2px; border-radius: 4px; padding: 0 .35em; font-size: .8125em; font-family: inherit; }
.wt-help-body table { border-collapse: collapse; max-width: 100%; }
.wt-help-body th, .wt-help-body td { border-bottom: 1px solid var(--mud-palette-lines-default); padding: .35rem .75rem .35rem 0; text-align: left; vertical-align: top; }
.wt-help-body th { font-weight: 600; }
.wt-help-section { scroll-margin-top: 180px; } /* pod lištou a lepkavým časovačom */

/* Skryté čiastky (prepínač v lište, PrivacyService): sumy a sadzby sa rozmažú, pruhy grafov ostanú. .wt-money = text,
   .wt-money-input = pole formulára (rozmaže sa iba hodnota, nie popis). */
.wt-money, .wt-money-input input { transition: filter .15s ease; }
html[data-hide-amounts] .wt-money,
html[data-hide-amounts] .wt-money-input input { filter: blur(6px); user-select: none; }
html[data-hide-amounts] .wt-money-chart .wt-chart-value,
html[data-hide-amounts] .wt-money-chart .wt-chart-average-label,
html[data-hide-amounts] .wt-money-chart .wt-chart-summary { filter: blur(6px); user-select: none; }
@media print { html[data-hide-amounts] .wt-money { filter: blur(4px); } }

/* Zbaľovanie dní v zozname Čas: hlavička dňa je tlačidlo (dátum s šípkou), súčet ostáva vpravo. */
.wt-day-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin: 0; border: 0; background: none;
    color: inherit; font: inherit; cursor: pointer; border-radius: 6px; text-align: left; }
.wt-day-toggle:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.wt-day-toggle .mud-icon-root { color: var(--mud-palette-text-secondary); }
.wt-days-toggle-all { margin-left: 4px; }

/* Animácie ovládania – pod triedou wt-motion na <html> (MotionService: predvolene zapnuté, „Vypnúť animácie“ v menu Vzhľad;
   E2E testy ich majú predvolene vypnuté). Iba transform a opacity; fill-mode backwards, aby po animácii fungovali hover transformácie. */
@keyframes wt-page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wt-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes wt-slide-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes wt-pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.12); } 100% { transform: none; } }
@keyframes wt-grow-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes wt-grow-y { from { transform: scaleY(0); } to { transform: none; } }

.wt-day-open .wt-day-chevron { transform: rotate(180deg); }
.wt-motion .wt-day-chevron { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }

/* Vstup stránky; dni, riadky záznamov a karty prehľadu sa vynárajú postupne za sebou. */
.wt-motion .wt-page { animation: wt-page-in .4s cubic-bezier(.2, .8, .2, 1) backwards; }
.wt-motion [data-testid=day-group], .wt-motion .wt-stat { animation: wt-fade-up .45s cubic-bezier(.2, .8, .2, 1) backwards; }
.wt-motion .wt-entry-row { animation: wt-fade-up .38s cubic-bezier(.2, .8, .2, 1) backwards; }
.wt-motion .wt-entry-row:nth-child(3) { animation-delay: 40ms; }
.wt-motion .wt-entry-row:nth-child(4) { animation-delay: 80ms; }
.wt-motion .wt-entry-row:nth-child(5) { animation-delay: 120ms; }
.wt-motion .wt-entry-row:nth-child(6) { animation-delay: 160ms; }
.wt-motion .wt-entry-row:nth-child(7) { animation-delay: 200ms; }
.wt-motion .wt-entry-row:nth-child(8) { animation-delay: 240ms; }
.wt-motion .wt-entry-row:nth-child(9) { animation-delay: 280ms; }
.wt-motion .wt-entry-row:nth-child(10) { animation-delay: 320ms; }
.wt-motion .wt-entry-row:nth-child(11) { animation-delay: 360ms; }
.wt-motion [data-testid=day-group]:nth-child(2) { animation-delay: 60ms; }
.wt-motion [data-testid=day-group]:nth-child(3) { animation-delay: 120ms; }
.wt-motion [data-testid=day-group]:nth-child(4) { animation-delay: 180ms; }
.wt-motion [data-testid=day-group]:nth-child(5) { animation-delay: 240ms; }
.wt-motion [data-testid=day-group]:nth-child(6) { animation-delay: 300ms; }
.wt-motion [data-testid=day-group]:nth-child(7) { animation-delay: 360ms; }
.wt-motion [data-testid=day-group]:nth-child(8) { animation-delay: 420ms; }
.wt-motion .mud-grid-item:nth-child(1) > .wt-stat { animation-delay: 0ms; }
.wt-motion .mud-grid-item:nth-child(2) > .wt-stat { animation-delay: 70ms; }
.wt-motion .mud-grid-item:nth-child(3) > .wt-stat { animation-delay: 140ms; }
.wt-motion .mud-grid-item:nth-child(4) > .wt-stat { animation-delay: 210ms; }
.wt-motion .wt-run { animation: wt-slide-in .4s cubic-bezier(.2, .8, .2, 1) backwards; }
.wt-motion .wt-help-section { animation: wt-fade-up .45s cubic-bezier(.2, .8, .2, 1) backwards; }

/* Čipy štítkov pri pridaní „poskočia“. */
.wt-motion .wt-tag-picker .mud-chip { animation: wt-pop .35s cubic-bezier(.2, .8, .2, 1) backwards; }

/* Grafy: pruhy a stĺpce narastú pri zobrazení. */
.wt-motion .wt-share-fill { transform-origin: left center; animation: wt-grow-x .8s cubic-bezier(.2, .8, .2, 1) .1s backwards; }
.wt-motion .wt-chart-bar { transform-origin: center bottom; animation: wt-grow-y .7s cubic-bezier(.2, .8, .2, 1) .1s backwards; }
.wt-motion .mud-progress-linear .mud-progress-linear-bar { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }

/* Karty a riadky reagujú na myš: karta sa zdvihne, riadok záznamu sa jemne posunie. */
.wt-motion .wt-stat, .wt-motion [data-testid=day-group] { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.wt-motion .wt-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45); }
.wt-motion .wt-entry-row { transition: background-color .2s ease, transform .2s ease; }
.wt-motion .wt-entry-row:hover { transform: translateX(3px); }

/* Tlačidlá: stlačenie, hlavné akcie sa pri prejdení myšou zdvihnú. */
.wt-motion .mud-button-root:not(:disabled):not(.mud-disabled) { transition: transform .15s ease, background-color .15s ease, box-shadow .2s ease; }
.wt-motion .mud-button-root:not(:disabled):not(.mud-disabled):active { transform: scale(.94); }
.wt-motion .wt-timer .wt-timer-button:not(:disabled):hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--mud-palette-primary) 70%, transparent); }
.wt-motion .wt-timer .wt-timer-button:not(:disabled):active { transform: scale(.94); }
.wt-motion .wt-run-stop:not(:disabled):hover, .wt-motion .wt-run-delete:not(:disabled):hover { transform: scale(1.15); }

/* Navigácia: plynulé pozadie, ikona sa pri prejdení myšou posunie. */
.wt-motion .wt-nav .mud-nav-link, .wt-motion .wt-day-toggle { transition: background-color .2s ease, color .2s ease; }
.wt-motion .wt-nav .mud-nav-link .mud-nav-link-icon { transition: transform .2s ease; }
.wt-motion .wt-nav .mud-nav-link:hover .mud-nav-link-icon { transform: translateX(3px) scale(1.08); }

/* Posledné záznamy na prehľade: riadok je odkaz na úpravu v zozname Čas. */
.wt-recent-row:hover { background-color: var(--mud-palette-action-default-hover); }
.wt-recent-link { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.wt-recent-link:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; border-radius: 6px; }
.wt-recent-row:last-child { border-bottom: 0; }

/* Faktúra: upraviteľná suma položky a polia v náhľade faktúry z času. */
.wt-invoice-item .wt-item-amount-field input { text-align: right; font-weight: 600; }
.wt-fromtime-num { min-width: 90px; margin-left: auto; }
.wt-fromtime-num input { text-align: right; }
.wt-fromtime-items .wt-fromtime-description { border-bottom: 0 !important; padding-bottom: 0 !important; }
.wt-fromtime-items tbody + tbody tr:first-child td { border-top: 1px solid var(--mud-palette-divider); }
.wt-fromtime-items .wt-fromtime-actions { width: 40px; padding-left: 0 !important; padding-right: 0 !important; text-align: right; }

/* Zoskupené rovnaké záznamy: počet pred popisom, rozbalené záznamy odsadené, šípka sa otáča. */
.wt-stack-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; margin-right: 8px;
    border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: 1px;
    color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 16%, transparent); }
.wt-entry-stack .wt-entry-main { cursor: pointer; }
.wt-entry-in-stack { padding-left: 40px; background: color-mix(in srgb, var(--mud-palette-action-default-hover) 60%, transparent); }
.wt-stack-chevron { color: var(--mud-palette-text-secondary); }
.wt-stack-chevron-open .mud-icon-root, .mud-icon-root.wt-stack-chevron-open { transform: rotate(180deg); }
.wt-motion .wt-stack-chevron .mud-icon-root, .wt-motion .mud-icon-root.wt-stack-chevron { transition: transform .25s ease; }
.wt-stack-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }

/* AI asistent: rozhovor (otázky vpravo, odpovede vľavo), karty návrhov. */
.wt-chat { display: flex; flex-direction: column; gap: 12px; }
.wt-chat-row { display: flex; align-items: flex-start; gap: 8px; }
.wt-chat-row-user { justify-content: flex-end; }
.wt-chat-avatar { margin-top: 8px; flex: 0 0 auto; }
.wt-chat-answer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; max-width: min(720px, 100%); flex: 1 1 auto; }
.wt-chat-bubble { padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: min(720px, 100%); }
.wt-chat-user { background: var(--mud-palette-primary); color: var(--mud-palette-primary-text); border-bottom-right-radius: 4px; }
.wt-chat-bot { background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); border: 1px solid var(--mud-palette-lines-default); border-bottom-left-radius: 4px; }
.wt-chat-proposal { width: 100%; max-width: 480px; border-left: 3px solid var(--mud-palette-primary); }
.wt-chat-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.wt-chat-progress { width: 160px; }
/* Desktop: pole otázky ostáva viditeľné pri dlhom rozhovore. Mobil: bežne pod rozhovorom – spodok obrazovky patrí
   plávajúcemu časovaču a navigácii. */
.wt-chat-input { position: sticky; bottom: 8px; z-index: 1; }
@media (max-width: 959.98px) {
    .wt-chat-input { position: static; }
}
.wt-motion .wt-chat-row { animation: wt-chat-in .2s ease-out; }
@keyframes wt-chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Osobné výdavky: riadky výdavkov a pravidelných platieb, farebná bodka kategórie, tabuľka náhľadu výpisu, karty sporenia. */
.wt-finance-filter { min-width: 180px; max-width: 280px; }
.wt-month-label { min-width: 11rem; text-align: center; text-transform: capitalize; }
.wt-finance-day { margin-bottom: 12px; }
.wt-finance-day-head { border-bottom: 1px solid var(--mud-palette-divider); }
.wt-finance-day-head .mud-typography::first-letter { text-transform: uppercase; }
.wt-finance-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-bottom: 1px solid var(--mud-palette-divider-light); }
.wt-finance-row:last-child { border-bottom: none; }
.wt-finance-row-main { min-width: 0; }
.wt-finance-merchant { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-finance-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; vertical-align: middle; }
.wt-finance-history + .wt-finance-history { border-top: 1px solid var(--mud-palette-divider-light); }
.wt-statement-table td { vertical-align: middle; }
.wt-statement-category { min-width: 12rem; }
.wt-row-muted td { color: var(--mud-palette-text-disabled); }
.wt-savings-selected { outline: 2px solid var(--mud-palette-primary); }
