@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Corporate Identity Colors */
    --color-magenta: #e6007e;
    --color-purple: #6e648c;
    --color-petroleum: #40909f;
    --color-dark-blue: #457baf;
    --color-light-blue: #63b9e9;
    --color-green: #b9bd5c;
    --color-orange: #eea85a;
    --color-yellow: #ffd962;
    --color-grey-1: #4a4a49;
    --color-grey-2: #6b6a6a;
    --color-grey-3: #7c7c7b;
    --color-grey-4: #a4a3a3;
    --color-grey-5: #d0d0d0;
    --color-grey-6: #ededed;
    --color-white: #ffffff;

    /* Dynamic Theme Variables (overridden in header.php) */
    --color-primary: var(--color-petroleum);
    --color-primary-dark: #357a87;
    --color-primary-soft: rgba(64, 144, 159, 0.05);
    --color-primary-glow: rgba(64, 144, 159, 0.15);

    /* Typography Unification */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-family: var(--font-primary);
    --bs-font-sans-serif: var(--font-primary);
}

*,
*::before,
*::after {
    font-family: inherit;
}

body {
    min-height: 100vh;
    background-color: #fcfcfc;
    margin: 0;
    padding: 0;
    color: var(--color-grey-1);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Wrapper */
.app-sidebar {
    width: 280px;
    background: var(--color-primary);
    color: var(--color-white);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    border-right: none;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

/* Main Content Adjustment */
header,
main,
footer {
    margin-left: 280px;
    width: auto;
    transition: margin-left 0.3s ease;
}

/* Specific main content push if index.php uses a specific main */
header .container,
main .container,
footer .container {
    max-width: 100% !important;
    padding-left: 5rem !important;
    padding-right: 5rem !important;
}

/* Top mobile bar */
.mobile-top-bar {
    display: none;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1040;
}

/* Sidebar Navigation Items */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0rem 1.5rem 0.2rem 1.5rem;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    border-left: 4px solid transparent;
}

.sidebar-link i {
    font-size: 1.15rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: #fff;
    transform: scale(1.1);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.sidebar-link.active {
    background: rgba(0, 0, 0, 0.15);
    color: #fff !important;
    font-weight: 600;
    border-left-color: var(--color-yellow);
}

.sidebar-heading {
    padding: 0.5rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-yellow);
    font-weight: 700;
}

.sidebar-logo-box {
    padding-left: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-right: 3rem;
}

/* User Profile in Sidebar */
.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

/* Profile Chip */
.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.profile-card .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Language Dropdown in Dark Sidebar */
.app-sidebar .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.app-sidebar .btn-outline-danger {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    transition: all 0.2s;
}

.app-sidebar .btn-outline-danger:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #fff !important;
    color: #fff !important;
}

/* Premium Tile Cards */
.tile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: 1px solid var(--color-grey-5);
    border-radius: 1.25rem;
    background: var(--color-grey-6);
    /* Light grey card on white bg */
    padding: 2.5rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tile-card:hover {
    transform: translateY(-5px);
    background: var(--color-white);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: var(--color-magenta);
}

.tile-title {
    color: var(--color-grey-1);
}

.tile-desc {
    color: var(--color-grey-3);
}

.icon-stack i {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.tile-card:hover .icon-stack i {
    transform: scale(1.1);
}

/* Section Blocks */
.section-block h2 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: #6b7280;
}

/* Responsive adjustments */
@media (max-width: 1199.98px) {
    body {
        flex-direction: column;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    header,
    main,
    footer {
        margin-left: 0;
    }

    .mobile-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1045;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

mark {
    background-color: yellow;
    padding: 0;
    margin: 0;
}

/* MENU */
/* Navbar vždy nad obsahem stránky */
nav.navbar {
    position: relative;
    z-index: 1080;
    /* výš než běžný obsah */
}

/* WIZARD STEP NAVIGATION CONSOLIDATED */
.wizard-step-link {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    color: #6c757d;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
    font-weight: 600;
}

.wizard-step-link i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    margin-right: 1rem;
    font-size: 0.9rem;
    font-style: normal;
}

.wizard-step-link.active {
    color: var(--color-magenta);
    background: rgba(230, 0, 126, 0.02);
    border-right: 3px solid var(--color-magenta);
}

.wizard-step-link.active i {
    background: var(--color-magenta);
    color: #fff;
}

.wizard-step-link.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.wizard-step-link:hover:not(.active):not(.disabled) {
    background: #f8f9fa;
    color: #343a40;
}

/* Pro jistotu i menu samotné */
.navbar .dropdown-menu {
    z-index: 1090;
}

/* Card styles */
.card-body {
    padding: 1.3rem;
}

.text-headline,
.text-headline a {
    font-weight: bold;
    text-align: left;
    padding: 10px 0;
    color: rgb(226, 0, 116);
}

.label-wrap {
    text-wrap: wrap;
    display: flex;
}

h3.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-magenta);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h3.section-title-detail {
    font-size: 1.25rem;
    color: var(--color-grey-1);
    font-weight: 700;
    border-bottom: 2px solid var(--color-grey-6);
    padding-bottom: 0.5rem;
}

h4 {
    font-size: 1em;
}

h5 {
    font-size: 1em;
}

.text-bold {
    font-weight: bold;
}

.text-size-small {
    font-size: 0.875em;
}

.text-size-xsmall {
    font-size: 0.75em;
}

.text-color-magenta {
    color: rgb(226, 0, 116) !important;
}

.text-color-petroleum {
    color: rgb(64, 144, 159) !important;
}

.nav-link:hover,
.dropdown-item:hover {
    color: rgb(226, 0, 116) !important;
}

.kategorie-popis {
    color: #888;
}

h4.obor-title {
    font-size: 1.1em;
    color: #666;
}

.d-none {
    display: none !important;
}

/* FORMS */
#form-calc .form-control,
#form-char .form-control,
#form-char-b .form-control,
#form-koef .form-control,
#form-vaha .form-control {
    width: 80px;
    padding: 0.5rem 1rem 0.5rem 1rem;
    text-align: center;
}

.form-check-input-red {
    margin-left: 5px !important;
}

.form-check-input-red:checked {
    background-color: darkred !important;
    border-color: darkred !important;
    color: darkred !important;
}

.form-check-input-red::selection {
    background-color: rgba(139, 0, 0, 0.1) !important;
    color: darkred !important;
}

.form-check-input-red:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(139, 0, 0, 0.25);
}

.form-check-input-bigger {
    height: 20px;
    width: 20px;

}

.form-check-label-bigger {
    padding: 3px 0px 0px 3px;
}

.dragging {
    opacity: 0.5;
    border: 2px dashed #999;
    background-color: darkred;
}

.argument-drop-target {
    background-color: #a94442 !important;
    border: 2px dashed #a94442;
}

.argument-list {
    transition: background-color 0.3s ease, border 0.3s ease;
}

/* DRAG AND DROP – náhled položky a cílové listy */
.argument-item.drag-over {
    border: 2px dashed #0d6efd;
    background-color: #e6f0ff;
}

.argument-list.drag-target {
    border: 2px dashed #0d6efd;
    border-radius: 8px;
    background-color: #f8fbff;
    padding: 8px;
}

/* Globální drop marker – náhled pozice vložení */
.drop-marker {
    height: 12px;
    border-top: 2px solid #60a5fa;
    margin: 4px 0;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Argument detail - Toggle */
.argument-toggle:hover {
    color: #0d6efd;
}

/* Argumenty - Background colors */
.bg-arg-filter {
    background-color: #fff9ed;
    /* velmi světlá oranžová */
}

.bg-arg-free {
    background-color: #f3fcf6;
    /* velmi světlá zelená */
}

/* MODAL */
.modal-dialog {
    max-width: 40%;
}

/* Button sizes */
.btn-xs {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Brandované outline primary */
.btn-outline-primary {
    --bs-btn-color: rgb(226, 0, 116);
    --bs-btn-border-color: rgb(226, 0, 116);
    --bs-btn-hover-color: white;
    --bs-btn-hover-bg: rgb(226, 0, 116);
    --bs-btn-hover-border-color: rgb(226, 0, 116);
    --bs-btn-focus-shadow-rgb: 10, 191, 83;
    --bs-btn-active-color: white;
    --bs-btn-active-bg: rgb(226, 0, 116);
    --bs-btn-active-border-color: rgb(226, 0, 116);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: rgb(226, 0, 116);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: rgb(226, 0, 116);
    --bs-gradient: none;
}

/* Button Toggle Collapse */
.btn-toggle-collapse .when-expanded {
    display: none;
}

.btn-toggle-collapse.collapsed .when-collapsed {
    display: inline;
}

.btn-toggle-collapse.collapsed .when-expanded {
    display: none;
}

.btn-toggle-collapse:not(.collapsed) .when-collapsed {
    display: none;
}

.btn-toggle-collapse:not(.collapsed) .when-expanded {
    display: inline;
}

/**************************
 ***     LOGIN PAGE     ***
 **************************/
.vh-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.password-toggle {
    cursor: pointer;
}

/**************************
 ***     INDEX PAGE     ***
 **************************/
.tile-card {
    display: block;
    text-decoration: none !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
    height: 100%;
    aspect-ratio: 1 / 1;
}

.tile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.icon-stack {
    position: relative;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0 auto .75rem auto;
    line-height: 1;
}

.icon-stack i {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.25rem;
    transition: opacity .15s ease;
}

.icon-gray {
    color: #6b7280;
    opacity: 1;
}

.icon-magenta {
    opacity: 0;
}

.tile-card:hover .icon-gray {
    opacity: 0;
}

.tile-card:hover .icon-magenta {
    opacity: 1;
}

.tile-title {
    position: relative;
    height: 1.4em;
    font-weight: 700;
    margin-bottom: .25rem;
    text-align: center;
}

.tile-title .title-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s ease;
    white-space: nowrap;
}

.tile-title .title-gray {
    color: #6b7280;
    opacity: 1;
}

.tile-title .title-magenta {
    opacity: 0;
}

.tile-card:hover .tile-title .title-gray {
    opacity: 0;
}

.tile-card:hover .tile-title .title-magenta {
    opacity: 1;
}

.tile-desc {
    color: #6b7280;
    font-size: .95rem;
    margin: 0;
    text-align: center;
}

.section-block {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* --- EDITACE O/Č (strom) --- */
:root {
    --inactive-tint: rgba(220, 53, 69, 0.02);
    --inactive-border: rgba(220, 53, 69, 0.25);
}

li.draggable[data-active="0"]>.item-row {
    opacity: .55;
}

li.draggable[data-active="0"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

/* Kaskáda INACTIVE pro charakteristiky (typ → char → kat) */
li.draggable[data-entity="typ"][data-active="0"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="typ"][data-active="0"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

li.draggable[data-entity="typ"][data-active="0"] .node-children li.draggable[data-entity="char"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="typ"][data-active="0"] .node-children li.draggable[data-entity="char"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

li.draggable[data-entity="typ"][data-active="0"] .node-children li.draggable[data-entity="char"] .node-children li.draggable[data-entity="kat"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="typ"][data-active="0"] .node-children li.draggable[data-entity="char"] .node-children li.draggable[data-entity="kat"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

li.draggable[data-entity="char"][data-active="0"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="char"][data-active="0"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

li.draggable[data-entity="char"][data-active="0"] .node-children li.draggable[data-entity="kat"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="char"][data-active="0"] .node-children li.draggable[data-entity="kat"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

.tree-wrap {
    padding: 24px;
}

.toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.sortable-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sortable-list>.draggable {
    margin: 6px 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.item-row .title {
    font-weight: 600;
}

.item-row .meta {
    color: #6b7280;
    font-size: 12px;
}

.item-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.node-children {
    padding: 8px 12px 12px 24px;
}

.toggle {
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.badge-obor,
.badge-kod {
    background: #ecfeff;
    color: #075985;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 12px;
}

.small-help {
    color: #6b7280;
    font-size: 12px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

ul.sortable-list[data-entity="cin"]:empty {
    min-height: 72px;
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

ul.sortable-list[data-entity="cin"].drag-over {
    outline: 2px dashed #60a5fa;
    outline-offset: 4px;
}

.draggable.dragging {
    opacity: .5;
}

.item-row.obor-drop-target {
    box-shadow: inset 0 0 0 2px #60a5fa;
    border-radius: 10px;
}

.item-row.inactive {
    opacity: .4;
}

.item-row.inactive {
    opacity: .55;
}

li.draggable[data-entity="obor"][data-active="0"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="obor"][data-active="0"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

li.draggable[data-entity="obor"][data-active="0"] .node-children li.draggable[data-entity="cin"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="obor"][data-active="0"] .node-children li.draggable[data-entity="cin"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

li.draggable[data-entity="cin"][data-active="0"]>.item-row {
    opacity: .55;
}

li.draggable[data-entity="cin"][data-active="0"] {
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

/* Ikony uvnitř btnů nemají chytat click */
.item-actions .btn .bi,
.toggle .bi {
    pointer-events: none;
}

/* ARGUMENTY.PHP */
.argument-list.is-empty {
    min-height: 72px;
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.argument-list .argument-item.inactive {
    opacity: .55;
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

.argument-list .argument-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.badge-arg-limit {
    display: inline-block;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1px 6px;
    font-size: 11px;
}

.argument-item .arg-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111;
}

.argument-item.active {
    background: #fff;
}

.arg-chip {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #374151;
}

.arg-chip--limited {
    /*border-color: #dbeafe;
    background: #eff6ff;*/
    border-color: #f7b5ae;
    background-color: #f7b5ae;
    color: #1e3a8a;
}

/* Prázdná kategorie (fallback – stejně používáme .is-empty z JS) */
.argument-list:empty {
    min-height: 72px;
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.argument-list.drag-over {
    outline: 2px dashed #60a5fa;
    outline-offset: 4px;
}

.argument-detail {
    font-size: 0.8em;
    color: #444;
}


/* Button Toggle Collapse */
.btn-toggle-collapse .when-expanded,
.btn-toggle-collapse .when-collapsed {
    display: none;
}

.btn-toggle-collapse[aria-expanded="false"] .when-collapsed {
    display: inline;
}

.btn-toggle-collapse[aria-expanded="true"] .when-expanded {
    display: inline;
}

.text {
    font-weight: bold;
}



/* FORM - produkt_cinnost_form.php */
/* --- Výběrové panely --- */
.filter-panel {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    padding: 16px;
}

.checkbox-grid .form-check {
    margin-bottom: .35rem;
}

.checkbox-grid .form-check-input {
    cursor: pointer;
}

.checkbox-grid .form-check-label {
    cursor: pointer;
}

.btn-white {
    background: #fff;
    border: 1px solid #e5e7eb;
}


/* PRODUKTOVÉ LISTY */
/* Grid rozložení pro seznam podkladů */
ul.sortable-list[data-entity="list"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding-left: 0;
}

ul.sortable-list[data-entity="list"]>li.draggable {
    list-style: none;
}

/* Dlaždice */
.list-tile {
    /*border: 1px solid #ddd;*/
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    background: #f8f9fa;
    /*box-shadow: 0 1px 0 rgba(0, 0, 0, .02);*/
}

.list-tile.is-default {
    background: #eaffea;
    /*border-color: 1px #20c997;*/
    /*opacity: .8;*/
}

.list-tile.is-inactive {
    opacity: .55;
    /*background-color: rgba(10, 191, 83, 0.1);*/
    background: var(--inactive-tint);
    border-color: var(--inactive-border);
}

.list-tile .thumb {
    height: 180px;
    background: #f8f9fa;
    padding: 20px 0px 20px 0px;
    /*border-bottom: 1px solid #eee;*/
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-tile .thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.list-tile .tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    align-items: center;
    justify-content: center;
    /*border-bottom: 1px solid #eee;*/
}

.list-tile .tile-body {
    padding: 10px;
    text-align: center;
    justify-content: center;
    min-height: 70px;
}

.list-tile .tile-body h6 {
    margin: 2px 0 2px 0;
}


.list-tile.is-default .thumb {
    background: #eaffea;
    /* i horní náhled */
    /*border-bottom-color: #20c997;*/
    /* oddělovač pod náhledem */
}

.list-tile .tile-actions {
    background-color: rgb(225, 225, 225);
}

.list-tile.list-tile.is-default .tile-actions {
    background-color: rgba(10, 191, 83, 0.2);
}

.list-tile button {
    background-color: rgb(250, 250, 250);

}

.list-tile.is-default button:hover {
    background-color: #51596C;

}

.list-tile.list-tile.is-default button.default {
    background-color: rgba(10, 191, 83, 0.8);
    color: #FFF;
    border-color: rgba(10, 191, 83, 0.8);
}

.list-tile.list-tile.is-default button {
    background-color: rgba(10, 191, 83, 0.2);
    border-color: rgba(10, 191, 83, 0.8)
}

.list-tile.is-default button:hover {
    background-color: rgba(10, 191, 83, 0.8)
}

.list-tile.list-tile.is-default button[disabled] {
    background-color: rgba(10, 191, 83, 0.02);
    border-color: rgba(10, 191, 83, 0.8);
    opacity: 0.2;
}

.list-tile .badge {
    padding: 0px 5px 0px 5px;
    border-radius: 0px;
    /*font-size: 0.7em;*/
}



/* MODAL VÝBĚR BARVY */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.color-swatches .swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: var(--sw);
    cursor: pointer;
    padding: 0;
    outline: none;
}

.color-swatches .swatch:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .1);
}

.form-control-color {
    padding: 0 .5rem;
    min-width: 3.5rem;
}

/* --- Premium Detail UI Additions --- */

.detail-header-card {
    /* Base class for larger settings cards */
    border: none;
    border-radius: 1.25rem;
    padding: 2rem;
}

.search-field-premium {
    border: 2px solid var(--color-grey-6);
    border-radius: 1rem;
    transition: all 0.3s ease;
    background: var(--color-white);
    padding: 1rem 1.5rem;
}

.search-field-premium:focus-within {
    border-color: var(--color-magenta);
    box-shadow: 0 0 0 4px rgba(230, 0, 126, 0.1);
}

.char-card-premium {
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--color-white);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.char-card-premium:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.char-card-header {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fdfdfd;
    border-bottom: 1px solid var(--color-grey-6);
}

.vaha-accent {
    border-top: 5px solid var(--color-primary) !important;
}

.koef-accent {
    border-top: 5px solid var(--color-magenta) !important;
}

.accent-badge {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    padding: 0.4em 0.8em;
    border-radius: 2rem;
}

.matched-item {
    background: rgba(185, 189, 92, 0.05);
    /* light green tint from --color-green */
    border: 1px solid rgba(185, 189, 92, 0.15);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.matched-item:hover {
    background: rgba(185, 189, 92, 0.12);
}

.premium-accordion .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 1.25rem !important;
    background: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.premium-accordion .accordion-button {
    padding: 1.5rem;
    background: var(--color-white);
    font-weight: 700;
    color: var(--color-grey-1);
    box-shadow: none !important;
}

.premium-accordion .accordion-button:not(.collapsed) {
    background: var(--color-primary);
    color: #fff;
}

.premium-accordion .accordion-button:not(.collapsed) .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #fff !important;
    color: #fff !important;
}

.score-badge {
    font-size: 0.8rem;
    padding: 0.5em 1em;
    border-radius: 1rem;
    background: var(--color-grey-6);
    color: var(--color-magenta);
    border: 1px solid var(--color-magenta);
}

/* --- Navigation & Search Bar --- */
.unified-top-bar {
    background: #fff;
    border-radius: 1.5rem;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
}

.search-nav-input {
    border: 1px solid var(--color-grey-6);
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    background: #fdfdfd;
}

/* --- Back to Top Button --- */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: #fff !important;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px var(--color-primary-glow);
    display: none;
    /* Initially hidden, shown via JS */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1100;
    transition: all 0.3s ease;
    text-decoration: none;
}

#backToTop:hover {
    transform: translateY(-5px);
    background-color: var(--color-primary-dark);
    box-shadow: 0 8px 25px var(--color-primary-glow);
}

#backToTop i {
    font-size: 1.5rem;
}

/* --- Category Type Backgrounds --- */
.kat-ano-bg {
    background-color: rgba(185, 189, 92, 0.12) !important;
    border: 1px solid rgba(185, 189, 92, 0.2) !important;
}

.kat-ne-bg {
    background-color: rgba(220, 53, 69, 0.08) !important;
    border: 1px solid rgba(220, 53, 69, 0.15) !important;
}

.custom-switch.centered-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 3rem;
    /* bootstrap switch padding adjustment */
    min-height: 2.5rem;
}

.custom-switch.centered-switch .form-check-input {
    margin-top: 0;
    float: none;
}

/* --- Top Navigation & Search Cards --- */
.top-bar-card {
    border-radius: 1.25rem;
    padding: 0.75rem 1.25rem;
    height: 100%;
    transition: transform 0.2s ease;
}

.top-bar-card:hover {
    transform: none;
    /* Removed jumping effect */
}

.nav-card-bg,
.search-card-bg {
    background: linear-gradient(135deg, var(--color-primary-soft) 0%, rgba(0, 0, 0, 0.02) 100%) !important;
    /* Unified tint */
    border: 1px solid var(--color-primary-glow) !important;
    /* Unified border */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border-radius: 1.25rem !important;
}

/* Contrast adjustment for fields inside the cards */
.top-bar-card .form-select-sm,
.top-bar-card .form-control,
.detail-header-card .form-select-sm,
.detail-header-card .form-control {
    background-color: rgba(255, 255, 255, 0.8) !important;
    /* Slightly more opaque for better field clarity */
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    font-size: 0.95rem !important;
    /* Unified font size */
}

.top-bar-card .form-select-sm:focus,
.top-bar-card .form-control:focus,
.detail-header-card .form-select-sm:focus,
.detail-header-card .form-control:focus {
    background-color: #fff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-glow) !important;
    /* Unified glow */
}

/* Kompaktní switche pro dlouhé seznamy */
.custom-switch-compact {
    padding-left: 2.8rem;
    min-height: 1.5rem;
}

.custom-switch-compact .form-check-input {
    width: 2rem;
    height: 1rem;
    margin-top: 0.3rem;
    margin-left: -2.8rem;
}

.fw-600 {
    font-weight: 600;
}

.letter-spacing-01 {
    letter-spacing: 0.05em;
}

/* Tlačítko Primární (dříve Petroleum) */
.btn-petroleum {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.btn-petroleum:hover {
    background-color: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

/* Unified Premium Select Style */
.select-premium,
.input-premium {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.5rem !important;
    font-size: 0.95rem !important;
    font-weight: 400;
    font-family: 'Outfit', sans-serif;
    padding: 0.4rem 2.25rem 0.4rem 1rem !important;
    transition: all 0.2s ease-in-out !important;
}

.input-search {
    padding-left: 3rem !important;
}

.select-premium:focus,
.input-premium:focus {
    background-color: #fff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-glow) !important;
    outline: 0 !important;
}

/* Toggleable button labels */
[aria-expanded="true"] .collapsed-visible {
    display: none !important;
}

[aria-expanded="false"] .expanded-visible {
    display: none !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--color-primary);
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    outline: none;
    text-decoration: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--color-primary-dark);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* --- Tooltips Visibility --- */
.tooltip-inner {
    max-width: 400px;
    padding: 0.65rem 0.9rem;
    color: #fff !important;
    text-align: left !important;
    background-color: #2b3035 !important;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-size: 0.82rem;
    line-height: 1.4;
}

.tooltip-inner,
.tooltip-inner *,
.tooltip-inner p,
.tooltip-inner div,
.tooltip-inner span {
    color: #fff !important;
}

.tooltip-inner strong {
    color: var(--color-yellow) !important;
}

.tooltip .bg-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* --- Quill Editor Content Styling --- */
.ql-editor {
    box-sizing: border-box;
    line-height: 1.42;
    height: 100%;
    outline: none;
    overflow-y: auto;
    padding: 0;
    tab-size: 4;
    -moz-tab-size: 4;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ql-editor p {
    margin: 0 0 1rem 0 !important;
    padding: 0;
}

.ql-editor ol,
.ql-editor ul {
    margin: 0 0 1rem 0 !important;
    padding: 0 0 0 1.5em;
    counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}

/* Odsazení pro řádky s odrážkami, pokud nejsou v pravém seznamu */
.ql-editor p br+span,
.ql-editor p br+text {
    display: block;
    margin-top: 1rem;
}

/* Odstranění rámečku z toolbarů */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 8px 0 !important;
}

.ql-container.ql-snow {
    border: none !important;
}

.ql-editor {
    padding: 1rem 0 !important;
}

.ql-editor ol,
.ql-editor ul {
    padding-left: 1.5em;
}

.ql-editor li {
    list-style-type: none;
}

.ql-editor ul>li::before {
    content: '\2022';
    display: inline-block;
    white-space: nowrap;
    width: 1.2em;
    margin-left: -1.2em;
    text-align: right;
}

.ql-editor ol>li {
    counter-increment: list-1;
}

.ql-editor ol>li::before {
    content: counter(list-1) '. ';
    display: inline-block;
    white-space: nowrap;
    width: 1.2em;
    margin-left: -1.2em;
    text-align: right;
}

/* --- Bloky Kampaň Builder ---*/
/* Kategorie "Základní" bude stále otevřená a nepůjde sbalit */
#blocks-container .basic-category-locked .gjs-title {
    pointer-events: none;
    cursor: default;
    border: none !important;
}

#blocks-container .basic-category-locked .gjs-caret-icon {
    display: none !important;
}

.dem-code-editor-modal .gjs-mdl-dialog {
    max-width: 1100px;
    width: 90vw;
}

.dem-code-editor-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dem-code-editor-textarea {
    width: 100%;
    min-height: 62vh;
    resize: vertical;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 16px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #1e1e1e;
    color: #f8f8f2;
    box-sizing: border-box;
}

.dem-code-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Kódový editor bude ukotvený jen nad oblastí builderu */
.gjs-mdl-container.dem-code-editor-modal {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 0 !important;
}

.gjs-mdl-container.dem-code-editor-modal .gjs-mdl-dialog {
    position: fixed !important;
    margin: 0 !important;
    max-width: none !important;
}