/* --- Original <style> block #1 --- */
body {
            background-color: #f3f4f6;
        }

        /* Glassmorphism */
        .glass {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        /* Tab button logic styling */
        .tab-button {
            padding: 0.5rem 1rem;
            font-weight: 600;
            color: rgb(75 85 99);
            border-radius: 0.5rem;
            transition: all 300ms;
            border: 2px solid transparent;
        }

        .tab-button:hover {
            color: #00b04f;
            background-color: rgb(240 253 244);
        }

        .tab-button.active {
            background-color: #00b04f;
            color: white;
            box-shadow: 0 10px 15px -3px rgb(16 185 129 / 0.2), 0 4px 6px -4px rgb(16 185 129 / 0.2);
            border-color: rgba(0, 176, 79, 0.05);
        }

        .tab-button.active:hover {
            background-color: #00634b;
            color: white;
        }

        /* Helper for role hiding */
        .hidden-by-role {
            display: none !important;
        }

        .disabled-by-role {
            color: #9ca3af;
            /* gray-400 */
            pointer-events: none;
            background-color: #f9fafb;
            /* gray-50 */
            cursor: not-allowed;
        }

        /* Scrollbar styling for chat history */
        #chat-history-container::-webkit-scrollbar {
            width: 6px;
        }

        #chat-history-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 8px;
        }

        #chat-history-container::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 8px;
        }

        #chat-history-container::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }

        /* Loading animation */
        .fade-in {
            animation: fadeIn 0.4s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Styly pro Rich Content v historii (převzato a upraveno z embed.js) */
        .rich-content-wrapper {
            background-color: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 0.75rem;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            width: 100%;
        }

        .rich-content-wrapper img {
            max-width: 100%;
            height: auto;
            border-radius: 0.5rem;
            border: 1px solid #e5e7eb;
        }

        .sk-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.375rem 0.75rem;
            border-radius: 9999px;
            border: 1px solid #4ade80;
            color: #00b04f;
            font-size: 0.8125rem;
            background: rgba(0, 176, 79, 0.05);
            cursor: text;
            /* No action in admin */
        }

        .sk-chips-container {
            display: flex;
            flex-wrap: wrap;
            gap: 0.375rem;
            margin-top: 0.25rem;
        }

        .sk-button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.625rem;
            background: #00b04f;
            color: white;
            font-weight: 600;
            border-radius: 0.5rem;
            text-decoration: none;
            margin-top: 0.25rem;
        }

        .sk-accordion {
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 0.5rem;
            padding: 0.125rem;
        }

        .sk-accordion summary {
            padding: 0.625rem;
            cursor: pointer;
            font-weight: bold;
            outline: none;
            color: #374151;
        }

        .sk-accordion p {
            padding: 0.625rem;
            font-size: 0.8125rem;
            color: #4b5563;
            border-top: 1px solid #e5e7eb;
            margin: 0;
        }

        .sk-description-title { font-weight: bold; color: #059669; font-size: 0.9375rem; padding: 0.5rem 0.75rem; }
        .sk-info-card { border: 1px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; background: #f9fafb; margin-bottom: 0.25rem; }
        .sk-info-content { padding: 0.5rem 0.75rem; }
        .sk-info-title { font-weight: bold; color: #374151; font-size: 0.875rem; }
        .sk-info-subtitle { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
        .sk-list { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; }
        .sk-list-title { padding: 0.5rem 0.75rem; background: #f3f4f6; border-bottom: 1px solid #e5e7eb; font-weight: bold; color: #374151; }
        .sk-list-item { padding: 0.5rem 0.75rem; border-bottom: 1px solid #e5e7eb; }
        .sk-list-item:last-child { border-bottom: none; }
        .sk-list-item-title { font-size: 0.875rem; color: #374151; font-weight: 500; }
        .sk-list-item-sub { font-size: 0.75rem; color: #6b7280; }

        /* Modal Animation */
        .modal-enter {
            transition: opacity 300ms ease-out, transform 300ms ease-out;
        }

        .modal-enter-from {
            opacity: 0;
            transform: scale(0.95);
        }

        .modal-enter-to {
            opacity: 1;
            transform: scale(1);
        }

        .modal-leave {
            transition: opacity 200ms ease-in, transform 200ms ease-in;
        }

        .modal-leave-from {
            opacity: 1;
            transform: scale(1);
        }

        .modal-leave-to {
            opacity: 0;
            transform: scale(0.95);
        }

        /* Recurrence day chips */
        .rec-day-label { cursor: pointer; }
        .rec-day-label input { display: none; }
        .rec-day-chip { display: inline-block; padding: 4px 10px; font-size: 0.75rem; font-weight: 600; border: 1px solid #d1d5db; border-radius: 0.5rem; color: #6b7280; transition: all 0.15s; }
        .rec-day-label input:checked + .rec-day-chip { background: #00b04f; color: white; border-color: #00b04f; }

        /* Role dropdown */
        .role-dropdown-content {
            display: none;
            position: absolute;
            background-color: #f1f1f1;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            z-index: 1;
            border-radius: 0.5rem;
            overflow: hidden;
        }

        .role-dropdown-content a {
            color: black;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
        }

        .role-dropdown-content a:hover {
            background-color: #ddd;
        }

        /* Upravené styly pro menu */
        .nav-item {
            position: relative;
        }

        /* Tlačítka v menu (horní úroveň) */
        .nav-btn {
            display: flex;
            align-items: center;
            padding: 0.75rem 1rem;
            font-weight: 600;
            color: rgb(75 85 99);
            border-radius: 0.5rem;
            transition: all 200ms;
            white-space: nowrap;
            cursor: pointer;
            font-size: 0.9rem;
        }

        .nav-btn:hover,
        .nav-item:hover>.nav-btn {
            color: #00b04f;
            background-color: rgb(240 253 244);
        }

        .nav-btn.active {
            background-color: #00b04f;
            color: white;
            box-shadow: 0 4px 6px -1px rgb(0 176 79 / 0.2);
        }

        .nav-btn.active:hover {
            background-color: #00634b;
            color: white;
        }

        /* Dropdown kontejner */
        .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 0.25rem;
            background-color: white;
            border: 1px solid #e5e7eb;
            border-radius: 0.75rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            min-width: 200px;
            z-index: 50;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
            padding: 0.5rem;
        }

        /* Zobrazení dropdownu při hoveru na rodiče (.nav-item).
           Pouze přímý potomek (>) — jinak by se nested submenu (Insights)
           otevřelo automaticky při otevření Provoz dropdownu. Nested se
           řídí vlastním pravidlem .dropdown-submenu:hover níže. */
        .nav-item:hover > .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        /* Položky uvnitř dropdownu */
        .dropdown-item {
            display: block;
            width: 100%;
            text-align: left;
            padding: 0.5rem 0.75rem;
            font-size: 0.85rem;
            color: #4b5563;
            border-radius: 0.5rem;
            transition: all 150ms;
            margin-bottom: 2px;
        }

        .dropdown-item:hover {
            background-color: rgb(240 253 244);
            color: #00b04f;
            padding-left: 1rem;
            /* Efekt posunu */
        }

        .dropdown-item.active {
            background-color: rgba(0, 176, 79, 0.1);
            color: #00b04f;
            font-weight: 600;
        }

        /* Šipka u dropdownu */
        .chevron-icon {
            margin-left: 0.5rem;
            font-size: 0.7rem;
            transition: transform 200ms;
        }

        .nav-item:hover .chevron-icon {
            transform: rotate(180deg);
        }

        /* Nested submenu — dropdown uvnitř dropdownu (např. Provoz → Insights).
           Submenu se otevírá doprava při hover/focus na .submenu-trigger.
           Bez extra JS — vše je hover/focus-within. */
        .dropdown-submenu {
            position: relative;
        }

        .dropdown-submenu > .submenu-trigger {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            width: 100%;
            cursor: pointer;
        }

        .dropdown-submenu .submenu-chevron {
            font-size: 0.7rem;
            margin-left: auto;
            transition: transform 200ms;
            color: #9ca3af;
        }

        .dropdown-submenu:hover .submenu-chevron,
        .dropdown-submenu:focus-within .submenu-chevron {
            transform: translateX(2px);
            color: #00b04f;
        }

        .dropdown-menu.nested {
            position: absolute;
            top: 0;
            left: 100%;
            margin-top: 0;
            margin-left: 0.25rem;
        }

        .dropdown-submenu:hover > .dropdown-menu.nested,
        .dropdown-submenu:focus-within > .dropdown-menu.nested {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        /* Když všechny .feature-gated položky uvnitř nested submenu jsou
           skryté (žádný feature flag aktivní), schováme i celý submenu
           trigger — jinak by uživatel viděl prázdné "Insights ▶" které nikam
           nevede. Řešíme přes :has() (dostupné v moderních prohlížečích). */
        .dropdown-submenu:not(:has(.dropdown-item:not(.hidden))) {
            display: none;
        }

        /* Celkový scrollbar pro stránku a kontejnery */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            /* gray-300 */
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
            /* gray-400 */
        }

        /* Firefox podpora pro tenký scrollbar */
        * {
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 transparent;
        }

        /* Sticky header pro tabulky */
        thead th {
            position: sticky;
            top: 0;
            background-color: #f9fafb;
            /* gray-50 */
            z-index: 10;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            /* Jemný stín pod hlavičkou */
        }

        /* Pro zalamování dlouhých slov v chatu a hodnoceních */
        .break-word {
            word-break: break-word;
        }

/* ========== BLOCK SEPARATOR ========== */

/* --- Original <style> block #2 --- */
.highlight {
                                        background-color: #fef08a;
                                        /* yellow-200 */
                                        border-radius: 3px;
                                        box-shadow: 0 0 0 2px #fef08a;
                                    }

                                    .highlight-active {
                                        background-color: #facc15;
                                        /* yellow-400 */
                                    }

/* ========== BLOCK SEPARATOR ========== */

/* --- Original <style> block #3 --- */
details>summary {
                                        list-style: none;
                                    }

                                    details>summary::-webkit-details-marker {
                                        display: none;
                                    }

                                    details[open]>summary i.fa-chevron-down {
                                        transform: rotate(180deg);
                                    }