/*
 * SOFON Teploty – společná vrstva vzhledu
 * Režimy: auto / light / dark. Řídí public/assets/js/theme.js.
 */

:root {
    --chart-text: #dff8ff;
    --chart-muted: #b9cbd6;
    --chart-grid: rgba(255, 255, 255, 0.06);
    --chart-grid-strong: rgba(255, 255, 255, 0.08);
    --chart-moving-min: #d5fff8;
    --chart-moving-max: #9bc7ff;
}

/* =========================================================
   PŘEPÍNAČ VZHLEDU
   ========================================================= */

.theme-switcher {
    position: relative;
    flex: 0 0 auto;
    /* Musí zůstat pod aplikačními modály (.modal má z-index: 50). */
    z-index: 40;
}

.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid var(--line, var(--border, rgba(255,255,255,.18)));
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text, #f4fbff);
    box-shadow: none;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.theme-toggle:hover,
.theme-switcher.is-open .theme-toggle {
    border-color: rgba(61, 214, 182, .46);
    background: rgba(61, 214, 182, .10);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible,
.theme-menu button:focus-visible {
    outline: 3px solid rgba(69, 167, 255, .28);
    outline-offset: 2px;
}

.theme-toggle-icon {
    display: block;
    font-size: 1.14rem;
    font-weight: 850;
    line-height: 1;
}

.theme-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    display: none;
    width: 214px;
    padding: 7px;
    border: 1px solid var(--line, var(--border, rgba(255,255,255,.16)));
    border-radius: 15px;
    background: rgba(7, 28, 40, .98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.theme-switcher.is-open .theme-menu {
    display: grid;
    gap: 3px;
}

.theme-menu button {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--text, #f4fbff);
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

.theme-menu button:hover {
    background: rgba(255, 255, 255, .06);
}

.theme-menu button.is-active {
    border-color: rgba(61, 214, 182, .28);
    background: rgba(61, 214, 182, .10);
}

.theme-option-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    font-size: .92rem;
}

.theme-option-copy {
    display: grid;
    min-width: 0;
}

.theme-option-copy strong {
    font-size: .76rem;
    line-height: 1.2;
}

.theme-option-copy small {
    margin-top: 2px;
    color: var(--muted, #b9cbd6);
    font-size: .62rem;
    font-weight: 600;
    line-height: 1.3;
}

.theme-option-check {
    color: var(--accent, var(--primary, #3dd6b6));
    font-size: .82rem;
    font-weight: 900;
    opacity: 0;
}

.theme-menu button.is-active .theme-option-check {
    opacity: 1;
}

/* Landing navigation needs the switch to behave as a normal nav item. */
.landing-navigation .theme-switcher {
    margin-inline: 4px 2px;
}

.landing-navigation .theme-toggle {
    width: 39px;
    height: 39px;
    min-width: 39px;
    min-height: 39px;
    border-color: var(--border);
    background: rgba(255, 255, 255, .04);
}

/* =========================================================
   SVĚTLÉ TÉMA – SPOLEČNÉ PROMĚNNÉ
   ========================================================= */

html[data-theme="light"] {
    --bg: #eef6fa;
    --bg-soft: #e6f1f6;
    --panel: rgba(255, 255, 255, .78);
    --panel-strong: rgba(255, 255, 255, .96);
    --glass: rgba(255, 255, 255, .72);
    --line: rgba(39, 72, 87, .16);
    --border: rgba(39, 82, 99, .15);
    --border-active: rgba(10, 151, 137, .38);
    --text: #18343f;
    --muted: #58727e;
    --soft: #758d97;
    --primary: #0d9d8e;
    --primary-dark: #087c70;
    --accent: #0d9d8e;
    --accent2: #287fca;
    --blue: #287fca;
    --success: #16865a;
    --danger: #d74758;
    --warning: #ad7110;
    --ok: #16865a;
    --shadow: 0 24px 70px rgba(42, 73, 88, .14);
    --chart-text: #294955;
    --chart-muted: #617984;
    --chart-grid: rgba(47, 79, 94, .10);
    --chart-grid-strong: rgba(47, 79, 94, .13);
    --chart-moving-min: #087f73;
    --chart-moving-max: #2c70b8;
}

html[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, .70);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(45, 78, 91, .06);
}

html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-switcher.is-open .theme-toggle {
    border-color: rgba(13, 157, 142, .34);
    background: rgba(13, 157, 142, .08);
}

html[data-theme="light"] .theme-menu {
    border-color: rgba(39, 72, 87, .16);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 48px rgba(42, 73, 88, .18);
}

html[data-theme="light"] .theme-menu button {
    color: var(--text);
}

html[data-theme="light"] .theme-menu button:hover {
    background: rgba(37, 99, 135, .06);
}

html[data-theme="light"] .theme-menu button.is-active {
    border-color: rgba(13, 157, 142, .22);
    background: rgba(13, 157, 142, .09);
}

html[data-theme="light"] .theme-option-icon {
    background: rgba(40, 100, 130, .07);
}

/* =========================================================
   SVĚTLÉ TÉMA – VEŘEJNÁ TITULNÍ STRÁNKA
   ========================================================= */

html[data-theme="light"] body.landing-page {
    background:
        radial-gradient(circle at 12% 4%, rgba(15, 175, 179, .12), transparent 31%),
        radial-gradient(circle at 87% 18%, rgba(38, 104, 222, .10), transparent 33%),
        radial-gradient(circle at 48% 82%, rgba(14, 116, 144, .07), transparent 39%),
        linear-gradient(145deg, #f7fbfd, #eef6fa 46%, #e8f2f7);
    color: var(--text);
}

html[data-theme="light"] body.landing-page::before {
    background-image:
        linear-gradient(rgba(39, 82, 99, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(39, 82, 99, .035) 1px, transparent 1px);
}

html[data-theme="light"] .landing-ambient {
    opacity: .14;
}

html[data-theme="light"] .landing-thermometer,
html[data-theme="light"] .landing-thermometer::before {
    border-color: rgba(10, 120, 130, .09);
}

html[data-theme="light"] .landing-topbar {
    border-color: rgba(39, 82, 99, .14);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 14px 40px rgba(48, 79, 92, .10);
}

html[data-theme="light"] .landing-topbar.is-scrolled {
    border-color: rgba(13, 157, 142, .22);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 44px rgba(48, 79, 92, .14);
}

html[data-theme="light"] .landing-navigation > a:hover {
    background: rgba(37, 99, 135, .06);
}

html[data-theme="light"] .landing-navigation .landing-navigation-cta,
html[data-theme="light"] .landing-button-primary {
    color: #06272d;
}

html[data-theme="light"] .landing-nav-toggle,
html[data-theme="light"] .landing-navigation .theme-toggle {
    background: rgba(255, 255, 255, .64);
}

html[data-theme="light"] .landing-hero-lead {
    color: #526e7a;
}

html[data-theme="light"] .landing-button-secondary {
    border-color: rgba(39, 82, 99, .15);
    background: rgba(255, 255, 255, .62);
}

html[data-theme="light"] .landing-button-secondary:hover {
    border-color: rgba(13, 157, 142, .30);
    background: rgba(13, 157, 142, .07);
}

html[data-theme="light"] .landing-hero-points b {
    background: rgba(13, 157, 142, .10);
}

html[data-theme="light"] .landing-preview {
    border-color: rgba(39, 82, 99, .15);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(242, 248, 251, .94));
    box-shadow:
        0 34px 80px rgba(46, 78, 91, .18),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

html[data-theme="light"] .landing-preview-room,
html[data-theme="light"] .landing-preview-values article {
    border-color: rgba(39, 82, 99, .11);
    background: rgba(255, 255, 255, .66);
}

html[data-theme="light"] .landing-preview-chart {
    border-color: rgba(39, 82, 99, .11);
    background: linear-gradient(to bottom, rgba(255,255,255,.62), rgba(237,246,249,.40));
}

html[data-theme="light"] .landing-preview-grid {
    background-image:
        linear-gradient(rgba(47, 79, 94, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 79, 94, .055) 1px, transparent 1px);
}

html[data-theme="light"] .landing-chart-secondary {
    stroke: #3075bd;
}

html[data-theme="light"] .landing-summary {
    background: rgba(255, 255, 255, .62);
}

html[data-theme="light"] .landing-section-alt {
    border-color: rgba(39, 82, 99, .09);
    background: linear-gradient(180deg, rgba(218, 237, 244, .55), rgba(244, 249, 251, .28));
}

html[data-theme="light"] .landing-features article {
    background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(240,247,250,.88));
    box-shadow: 0 16px 44px rgba(48, 79, 92, .08);
}

html[data-theme="light"] .landing-features article:hover {
    box-shadow: 0 24px 58px rgba(48, 79, 92, .13);
}

html[data-theme="light"] .landing-feature-icon,
html[data-theme="light"] .landing-security-icon {
    background: rgba(13, 157, 142, .09);
}

html[data-theme="light"] .landing-use-cases article {
    background: rgba(255, 255, 255, .67);
}

html[data-theme="light"] .landing-use-cases article > span {
    background: linear-gradient(145deg, rgba(13,157,142,.10), rgba(40,127,202,.08));
}

html[data-theme="light"] .landing-steps article {
    border-top-color: rgba(13, 157, 142, .25);
    background: linear-gradient(180deg, rgba(13,157,142,.055), transparent);
}

html[data-theme="light"] .landing-security {
    border-color: rgba(13, 157, 142, .20);
    background: linear-gradient(135deg, rgba(13,157,142,.075), rgba(40,127,202,.055));
}

html[data-theme="light"] .landing-final {
    border-color: rgba(39, 82, 99, .10);
    background:
        radial-gradient(circle at 15% 50%, rgba(13,157,142,.09), transparent 34%),
        radial-gradient(circle at 90% 20%, rgba(40,127,202,.09), transparent 34%),
        rgba(234, 244, 248, .72);
}

@media (max-width: 860px) {
    html[data-theme="light"] .landing-navigation {
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 20px 52px rgba(48, 79, 92, .18);
    }

    .landing-navigation .theme-switcher {
        margin: 4px 0 2px;
    }

    .landing-navigation .theme-toggle {
        width: 100%;
        height: 43px;
    }

    .landing-navigation .theme-menu {
        top: calc(100% + 6px);
        right: 0;
        left: 0;
        width: auto;
    }
}

/* =========================================================
   SVĚTLÉ TÉMA – PŘIHLÁŠENÁ APLIKACE
   ========================================================= */

html[data-theme="light"] body.app-page {
    background:
        radial-gradient(circle at 7% 0%, rgba(45, 212, 191, .11), transparent 31%),
        radial-gradient(circle at 95% 72%, rgba(52, 120, 246, .10), transparent 34%),
        linear-gradient(135deg, #f6fbfd, #edf5f8 45%, #e7f0f5);
    color: var(--text);
}

html[data-theme="light"] .ambient {
    opacity: .17;
}

html[data-theme="light"] .thermometer {
    border-color: rgba(47, 79, 94, .12);
}

html[data-theme="light"] .thermometer::after {
    background: rgba(215, 71, 88, .12);
}

html[data-theme="light"] .glass {
    background: rgba(255, 255, 255, .70);
    border-color: var(--line);
}

html[data-theme="light"] .brand img {
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 6px 18px rgba(48, 79, 92, .06);
}

html[data-theme="light"] .user-pill,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .secondary,
html[data-theme="light"] .text-btn {
    background: rgba(255, 255, 255, .64);
    border-color: var(--line);
    color: var(--text);
}

html[data-theme="light"] .icon-btn:hover,
html[data-theme="light"] .secondary:hover,
html[data-theme="light"] .text-btn:hover {
    background: rgba(40, 127, 202, .07);
}

html[data-theme="light"] .logout {
    border-color: rgba(215, 71, 88, .19);
    background: rgba(215, 71, 88, .08);
    color: #a72f40;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    border-color: var(--line);
    background: rgba(255, 255, 255, .76);
    color: var(--text);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #8297a0;
}

html[data-theme="light"] th,
html[data-theme="light"] td {
    border-bottom-color: rgba(47, 79, 94, .10);
}

html[data-theme="light"] th {
    color: #31515d;
}

html[data-theme="light"] .modal {
    background: rgba(31, 50, 59, .38);
}

html[data-theme="light"] .modal-card {
    background: #f9fcfd;
    border-color: rgba(39, 72, 87, .16);
    box-shadow: 0 26px 80px rgba(35, 66, 79, .22);
}

html[data-theme="light"] .modal-close {
    background: rgba(40, 82, 100, .08);
    color: var(--text);
}

html[data-theme="light"] .help-grid section,
html[data-theme="light"] .info-box,
html[data-theme="light"] .export-formats label,
html[data-theme="light"] .help-sections section,
html[data-theme="light"] .permissions-grid section,
html[data-theme="light"] .management-permissions,
html[data-theme="light"] .weekday-selector span {
    border-color: rgba(39, 72, 87, .10);
    background: rgba(43, 91, 112, .045);
}

html[data-theme="light"] .help-toc,
html[data-theme="light"] .management-table th {
    background: #f9fcfd;
}

html[data-theme="light"] .help-toc a {
    background: rgba(43, 91, 112, .055);
}

html[data-theme="light"] .help-sections h3 {
    color: #244652;
}

html[data-theme="light"] .management-chip {
    border-color: rgba(13, 157, 142, .20);
    background: rgba(13, 157, 142, .08);
    color: #0a7166;
}

html[data-theme="light"] .weekday-selector input:checked + span {
    border-color: rgba(13, 157, 142, .52);
    background: rgba(13, 157, 142, .12);
    color: #0a7166;
}

html[data-theme="light"] .room-filter-buttons::before,
html[data-theme="light"] .entry-room-device-content small,
html[data-theme="light"] .primary-entry-actions-copy > span:last-child {
    color: #627f8b;
}

html[data-theme="light"] .room-filter-button,
html[data-theme="light"] .chart-type-option {
    border-color: rgba(39, 72, 87, .16);
    background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(235,244,248,.62));
}

html[data-theme="light"] .room-filter-button:hover,
html[data-theme="light"] .chart-type-option:hover {
    background: linear-gradient(145deg, rgba(40,127,202,.10), rgba(255,255,255,.72));
}

html[data-theme="light"] .room-filter-button.active,
html[data-theme="light"] .room-filter-button[aria-pressed="true"],
html[data-theme="light"] .chart-type-option.active,
html[data-theme="light"] .chart-type-option[aria-pressed="true"] {
    border-color: rgba(40, 127, 202, .46);
    background: linear-gradient(145deg, rgba(40,127,202,.13), rgba(13,157,142,.07));
    color: #1f5065;
}

html[data-theme="light"] .chart-type-icon {
    color: #547b8d;
}

html[data-theme="light"] .chart-type-option:hover .chart-type-icon,
html[data-theme="light"] .chart-type-option.active .chart-type-icon,
html[data-theme="light"] .chart-type-option[aria-pressed="true"] .chart-type-icon {
    color: #287fca;
}

html[data-theme="light"] .entry-room-device-info {
    border-color: rgba(40, 127, 202, .20);
    background: linear-gradient(145deg, rgba(40,127,202,.08), rgba(255,255,255,.58));
}

html[data-theme="light"] .entry-room-device-icon {
    background: rgba(40, 127, 202, .10);
    color: #287fca;
}

html[data-theme="light"] .primary-entry-actions {
    border-color: rgba(40, 127, 202, .20);
    background:
        linear-gradient(135deg, rgba(34,211,238,.08), rgba(59,130,246,.06)),
        rgba(255,255,255,.56);
    box-shadow: 0 14px 36px rgba(48, 79, 92, .07);
}

html[data-theme="light"] .primary-entry-actions-copy > strong {
    color: #214652;
}

/* Diagnostika */
html[data-theme="light"] .diagnostics-summary-card,
html[data-theme="light"] .diagnostics-room-card,
html[data-theme="light"] .diagnostics-room-meta > div,
html[data-theme="light"] .diagnostics-section,
html[data-theme="light"] .diagnostics-item {
    background-color: rgba(255, 255, 255, .60);
}

html[data-theme="light"] .diagnostics-room-toggle:hover {
    background: rgba(40, 100, 130, .045);
}

html[data-theme="light"] .diagnostics-section-count,
html[data-theme="light"] .diagnostics-summary-icon {
    background: rgba(47, 79, 94, .07);
}

/* Pokročilé statistiky */
html[data-theme="light"] .advanced-stats-launch {
    border-color: rgba(40, 127, 202, .18);
    background:
        linear-gradient(135deg, rgba(73,142,255,.08), rgba(63,224,205,.06)),
        rgba(255,255,255,.52);
}

html[data-theme="light"] .advanced-stats-launch-copy p,
html[data-theme="light"] .as-header p,
html[data-theme="light"] .as-panel-heading p,
html[data-theme="light"] .as-field > span,
html[data-theme="light"] .as-room-label {
    color: #647f8b;
}

html[data-theme="light"] .as-header,
html[data-theme="light"] .as-filter-bar,
html[data-theme="light"] .as-tabs,
html[data-theme="light"] .as-footer {
    border-color: rgba(39, 72, 87, .10);
}

html[data-theme="light"] .as-filter-bar {
    background: rgba(232, 242, 247, .58);
}

html[data-theme="light"] .as-field input,
html[data-theme="light"] .as-field select {
    border-color: rgba(39, 72, 87, .14);
    background: rgba(255, 255, 255, .82);
    color: var(--text);
}

html[data-theme="light"] .as-room-chip,
html[data-theme="light"] .as-period-button,
html[data-theme="light"] .as-tab {
    border-color: rgba(39, 72, 87, .13);
    background: rgba(45, 86, 103, .045);
    color: #58727e;
}

html[data-theme="light"] .as-room-chip:hover,
html[data-theme="light"] .as-period-button:hover,
html[data-theme="light"] .as-tab:hover {
    color: #214652;
}

html[data-theme="light"] .as-room-chip.active,
html[data-theme="light"] .as-period-button.active,
html[data-theme="light"] .as-tab.active {
    color: #18504f;
}

html[data-theme="light"] .as-kpi,
html[data-theme="light"] .as-detail-card,
html[data-theme="light"] .as-chart-card,
html[data-theme="light"] .as-table-card,
html[data-theme="light"] .as-heatmap-card,
html[data-theme="light"] .as-settings-card,
html[data-theme="light"] .as-disclaimer {
    border-color: rgba(39, 72, 87, .11);
    background: rgba(255, 255, 255, .60);
}

html[data-theme="light"] .as-table th,
html[data-theme="light"] .as-table td {
    border-color: rgba(39, 72, 87, .08);
}

html[data-theme="light"] .as-table th {
    color: #58727e;
}

html[data-theme="light"] .as-footer {
    background: rgba(236, 245, 248, .72);
}

/* Historie rozvrhů */
html[data-theme="light"] .schedule-history-wrap,
html[data-theme="light"] .schedule-history-item,
html[data-theme="light"] .schedule-history-empty {
    border-color: rgba(39, 72, 87, .11);
    background: rgba(255, 255, 255, .52);
}

html[data-theme="light"] .schedule-history-item.selected {
    border-color: rgba(13, 157, 142, .28);
    background: rgba(13, 157, 142, .07);
}

html[data-theme="light"] .schedule-history-state.current {
    color: #087a63;
}

html[data-theme="light"] .schedule-history-state.future {
    color: #2b67a8;
}

html[data-theme="light"] .schedule-history-state.history {
    background: rgba(47, 79, 94, .07);
}

/* Smazání záznamu – červené akcenty zachovat, ale zesvětlit plochy. */
html[data-theme="light"] .delete-record-launch {
    border-color: rgba(196, 58, 75, .28);
    background: linear-gradient(135deg, rgba(215,71,88,.10), rgba(183,48,68,.08));
    color: #a92f41;
}

html[data-theme="light"] .delete-record-launch strong {
    color: #9f2f3f;
}

html[data-theme="light"] .delete-record-launch small {
    color: #8d6570;
}

html[data-theme="light"] .delete-record-warning {
    border-color: rgba(196, 58, 75, .20);
    background: linear-gradient(135deg, rgba(215,71,88,.075), rgba(183,48,68,.055));
}

html[data-theme="light"] .delete-record-warning strong {
    color: #9f2f3f;
}

html[data-theme="light"] .delete-record-warning small {
    color: #806670;
}

html[data-theme="light"] .delete-record-table-wrap {
    border-color: rgba(39, 72, 87, .11);
    background: rgba(255, 255, 255, .50);
}

html[data-theme="light"] .delete-record-table th {
    background: rgba(240, 247, 250, .98);
    color: #58727e;
}

html[data-theme="light"] .delete-record-table td,
html[data-theme="light"] .delete-record-table th {
    border-bottom-color: rgba(39, 72, 87, .08);
}

html[data-theme="light"] .delete-record-table tbody tr:hover {
    background: rgba(40, 100, 130, .035);
}

html[data-theme="light"] .delete-record-status.inside {
    color: #087a63;
}

html[data-theme="light"] .delete-record-status.outside {
    color: #b53b4b;
}

html[data-theme="light"] .delete-record-confirm-layer {
    background: rgba(49, 58, 64, .46);
}

html[data-theme="light"] .delete-record-confirm-card {
    border-color: rgba(196, 58, 75, .24);
    background: linear-gradient(145deg, rgba(255,250,251,.99), rgba(250,245,247,.99));
    box-shadow: 0 28px 80px rgba(62, 56, 61, .24);
}

html[data-theme="light"] .delete-record-confirm-card h3,
html[data-theme="light"] .delete-record-confirm-details dd {
    color: #4b3038;
}

html[data-theme="light"] .delete-record-confirm-card > p,
html[data-theme="light"] .delete-record-confirm-details dt,
html[data-theme="light"] .delete-record-confirm-warning span {
    color: #806a71;
}

html[data-theme="light"] .delete-record-confirm-details > div {
    border-color: rgba(74, 59, 65, .09);
    background: rgba(109, 79, 90, .035);
}

html[data-theme="light"] .delete-record-confirm-warning strong {
    color: #a92f41;
}

@media (max-width: 620px) {
    .app-page .theme-switcher {
        order: -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle,
    .theme-menu,
    .theme-menu button {
        transition: none !important;
    }
}

/* =========================================================
   DOPLŇKOVÉ KONTRASTY MODULŮ VE SVĚTLÉM REŽIMU
   ========================================================= */

html[data-theme="light"] .danger-button {
    border-color: rgba(190, 55, 72, .24);
    background: rgba(215, 71, 88, .08);
    color: #aa3344;
}

html[data-theme="light"] .alert-banner {
    border-color: rgba(173, 113, 16, .24);
    background: rgba(245, 158, 11, .09);
}

html[data-theme="light"] .alert-banner.danger {
    border-color: rgba(215, 71, 88, .25);
    background: rgba(215, 71, 88, .08);
}

html[data-theme="light"] .status.ok {
    background: rgba(22, 134, 90, .10);
    color: #0f7550;
}

html[data-theme="light"] .status.bad {
    background: rgba(215, 71, 88, .10);
    color: #b33648;
}

html[data-theme="light"] .trend.up {
    color: #b84539;
}

html[data-theme="light"] .trend.down {
    color: #0f7b64;
}

html[data-theme="light"] .as-kpi small,
html[data-theme="light"] .as-detail-card small,
html[data-theme="light"] .as-kpi span,
html[data-theme="light"] .as-detail-card span,
html[data-theme="light"] .as-detail-card em,
html[data-theme="light"] .as-status,
html[data-theme="light"] .as-disclaimer {
    color: #657f8b;
}

html[data-theme="light"] .as-score {
    background: rgba(47, 79, 94, .07);
}

html[data-theme="light"] .as-score.good,
html[data-theme="light"] .as-risk.low,
html[data-theme="light"] .as-status.ok {
    color: #0f7b55;
}

html[data-theme="light"] .as-score.warn,
html[data-theme="light"] .as-risk.elevated {
    color: #9a6410;
}

html[data-theme="light"] .as-score.bad,
html[data-theme="light"] .as-risk.high,
html[data-theme="light"] .as-status.error {
    color: #b23b4b;
}

html[data-theme="light"] .as-heat-cell {
    background: rgba(47, 79, 94, .09);
}

html[data-theme="light"] .schedule-history-state.current {
    background: rgba(22, 134, 90, .09);
}

html[data-theme="light"] .schedule-history-state.future {
    background: rgba(40, 127, 202, .09);
}

html[data-theme="light"] .schedule-period-delete {
    border-color: rgba(190, 55, 72, .28);
    background: linear-gradient(135deg, rgba(215,71,88,.12), rgba(183,48,68,.09));
    color: #a72f40;
}

html[data-theme="light"] .schedule-period-delete:hover:not(:disabled) {
    border-color: rgba(190, 55, 72, .42);
    background: linear-gradient(135deg, rgba(215,71,88,.17), rgba(183,48,68,.13));
}

html[data-theme="light"] .delete-record-permission.allowed,
html[data-theme="light"] .delete-record-message.success {
    color: #0f7653;
}

html[data-theme="light"] .delete-record-permission.denied,
html[data-theme="light"] .delete-record-message.error {
    color: #b23b4b;
}

html[data-theme="light"] .delete-record-loading,
html[data-theme="light"] .delete-record-empty {
    border-color: rgba(39, 72, 87, .14);
}

html[data-theme="light"] .delete-record-confirm-symbol {
    color: #b33a4c;
}

/* =========================================================
   PHASE01D – SJEDNOCENÍ POLÍ FILTRŮ PŘEHLEDU ZÁZNAMŮ
   Měsíc / Rok / Od / Do mají stejnou geometrii v obou tématech.
   ========================================================= */
#monthFilter,
#yearFilter,
#fromDate,
#toDate {
    width: 100%;
    height: 58px;
    min-height: 58px;
    padding: 0 15px;
    border-radius: 14px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.2;
}

#monthFilter,
#yearFilter {
    padding-right: 40px;
}

@media (max-width: 720px) {
    #monthFilter,
    #yearFilter,
    #fromDate,
    #toDate {
        height: 54px;
        min-height: 54px;
    }
}
