/* ============================================================
   estateKaido — brand theme administrácie (dizajn manuál v1.0)
   Ručne písané CSS nad publikovaným Filament app.css: farebné
   škály dodáva PHP (App\Filament\BrandPalette), tento súbor rieši
   tvary, typografiu, grafitový sidebar a obe farebné schémy.
   Načítava sa render hookom v AdminPanelProvider PO app.css,
   takže rovnaká špecificita vyhráva bez !important.
   ============================================================ */

:root {
    /* Kotvy manuálu */
    --ek-gold: oklch(0.64 0.105 80);
    --ek-gold-hover: oklch(0.56 0.1 78);
    --ek-gold-text: oklch(0.5 0.09 75);
    --ek-gold-on-dark: oklch(0.78 0.09 84);
    --ek-graphite: oklch(0.24 0.012 70);
    --ek-graphite-raised: oklch(0.3 0.014 70);
    --ek-graphite-active: oklch(0.32 0.016 70);
    --ek-graphite-line: oklch(0.34 0.014 70);
    --ek-paper: oklch(0.985 0.004 85);
    --ek-bg: oklch(0.975 0.004 85);
    --ek-line: oklch(0.89 0.008 85);
    --ek-line-soft: oklch(0.93 0.006 85);
    --ek-text: oklch(0.24 0.012 70);
    --ek-text-soft: oklch(0.48 0.012 80);
    --ek-text-faint: oklch(0.56 0.012 80);
    --ek-on-gold: oklch(0.99 0.01 85);
    --ek-sidebar-text: oklch(0.8 0.012 80);
    --ek-sidebar-text-strong: oklch(0.96 0.004 85);
    --ek-sidebar-text-faint: oklch(0.62 0.012 80);

    /* Ostré rohy podľa manuálu (3–4 px) — Tailwind radius tokeny,
       ktoré používa celý Filament (unlayered :root prebije @layer theme) */
    --radius-xs: 2px;
    --radius-sm: 3px;
    --radius-md: 3px;
    --radius-lg: 4px;
    --radius-xl: 4px;
    --radius-2xl: 6px;
    --radius-3xl: 8px;

    /* Mono popisky: 9,5 px verzálky s prestrkom (polia aj tabuľky) */
    --ek-label-font: var(--mono-font-family), ui-monospace, monospace;
    --ek-label-size: 0.656rem; /* 10,5px — 9,5px z manuálu je na obrazovke na hrane čitateľnosti */
    --ek-label-tracking: 0.12em;
}

/* Tmavý režim: teplé tmavé plochy (hue 70–85 drží aj tma) */
.dark {
    --ek-paper: oklch(0.215 0.01 70);
    --ek-bg: oklch(0.17 0.008 70);
    --ek-line: oklch(0.31 0.012 70);
    --ek-line-soft: oklch(0.27 0.01 70);
    --ek-text: oklch(0.93 0.004 85);
    --ek-text-soft: oklch(0.7 0.01 80);
    --ek-text-faint: oklch(0.6 0.012 80);
    --ek-graphite: oklch(0.205 0.01 70);
    --ek-graphite-raised: oklch(0.27 0.012 70);
    --ek-graphite-active: oklch(0.29 0.014 70);
    --ek-graphite-line: oklch(0.3 0.012 70);
}

/* Custom stránky (page builder, editor polygónov, import wizard) používajú
   Tailwind utility z filament-custom.css — preladenie farebných tokenov na
   brand hodnoty prefarbí všetky ich amber/emerald/slate/red triedy naraz.
   Gray tokeny mapuje Filament na --gray-* (BrandPalette), tie netreba. */
:root {
    --color-amber-50: oklch(0.988 0.008 85);
    --color-amber-100: oklch(0.955 0.03 84);
    --color-amber-300: oklch(0.855 0.08 83);
    --color-amber-400: oklch(0.75 0.098 82);
    --color-amber-500: oklch(0.64 0.105 80);
    --color-amber-600: oklch(0.56 0.1 78);
    --color-amber-700: oklch(0.5 0.09 75);
    --color-emerald-50: oklch(0.975 0.012 155);
    --color-emerald-200: oklch(0.9 0.045 155);
    --color-emerald-700: oklch(0.42 0.055 155);
    --color-emerald-800: oklch(0.37 0.05 155);
    --color-emerald-900: oklch(0.33 0.045 155);
    --color-emerald-950: oklch(0.24 0.035 155);
    --color-slate-50: oklch(0.985 0.004 85);
    --color-slate-100: oklch(0.955 0.005 85);
    --color-slate-200: oklch(0.9 0.008 85);
    --color-slate-300: oklch(0.84 0.008 85);
    --color-slate-400: oklch(0.68 0.01 80);
    --color-slate-500: oklch(0.55 0.012 80);
    --color-slate-600: oklch(0.45 0.012 80);
    --color-slate-700: oklch(0.35 0.012 70);
    --color-slate-900: oklch(0.24 0.012 70);
    --color-red-300: oklch(0.82 0.09 28);
    --color-red-600: oklch(0.55 0.125 28);
    --color-red-700: oklch(0.48 0.11 28);

    /* filament-custom.css prepisuje mapovanie gray tokenov z app.css svojimi
       studenými hodnotami (rovnaká @layer theme, neskorší súbor vyhráva) —
       vraciame mapovanie na Filament paletu (BrandPalette, teplá sivá) */
    --color-gray-50: var(--gray-50);
    --color-gray-100: var(--gray-100);
    --color-gray-200: var(--gray-200);
    --color-gray-300: var(--gray-300);
    --color-gray-400: var(--gray-400);
    --color-gray-500: var(--gray-500);
    --color-gray-700: var(--gray-700);
}

/* Natívny file input (import cenníka, výmena pôdorysu) v tvare outline tlačidla */
input[type='file']::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid oklch(0.85 0.008 85);
    border-radius: 3px;
    background: var(--ek-paper);
    font-family: inherit;
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--ek-text);
    cursor: pointer;
}

.dark input[type='file']::file-selector-button {
    border-color: var(--ek-line);
    background: var(--ek-graphite-raised);
    color: var(--ek-text);
}

input[type='file'] {
    font-size: 0.813rem;
    color: var(--ek-text-faint);
}

/* Panel pre kroky custom stránok (import wizard, editor polygónov) */
.ek-panel {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 4px;
    padding: 1.25rem;
}

/* ---------- Editor polygónov ---------- */

/* Stavový pás nad plátnom: čo sa deje a čo robiť ďalej */
.ek-editor-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--ek-line);
    border-radius: 4px;
    background: var(--ek-paper);
    font-size: 0.813rem;
    color: var(--ek-text-soft);
    min-height: 2.5rem;
}

.ek-editor-bar strong { color: var(--ek-text); font-weight: 600; }

.ek-editor-bar-active {
    border-color: var(--ek-gold);
    background: color-mix(in oklab, var(--ek-gold) 8%, var(--ek-paper));
}

.ek-editor-btn {
    padding: 0.25rem 0.625rem;
    border: 1px solid oklch(0.86 0.008 85);
    border-radius: 3px;
    background: var(--ek-paper);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ek-text);
    cursor: pointer;
    white-space: nowrap;
}

.dark .ek-editor-btn { border-color: var(--ek-line); }

.ek-editor-btn:hover { background: var(--ek-line-soft); }

.ek-editor-btn-primary {
    background: var(--ek-gold);
    border-color: var(--ek-gold);
    color: var(--ek-on-gold);
}

.ek-editor-btn-primary:hover { background: var(--ek-gold-hover); }

.ek-editor-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Zoznam jednotiek / pohľadov so stavom zakreslenia */
.ek-editor-list-head {
    display: flex;
    align-items: baseline;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ek-line-soft);
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--ek-text);
}

.ek-editor-count {
    margin-left: 0.5rem;
    font-family: var(--ek-label-font);
    font-size: 0.688rem;
    font-weight: 400;
    color: var(--ek-text-faint);
}

.ek-editor-list {
    max-height: 24rem;
    overflow-y: auto;
}

.ek-editor-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--ek-line-soft);
    font-size: 0.813rem;
}

.ek-editor-row:last-child { border-bottom: none; }

.ek-editor-row-active {
    background: color-mix(in oklab, var(--ek-gold) 10%, var(--ek-paper));
}

.ek-editor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
    border: 1.5px solid var(--ek-line);
    background: transparent;
}

.ek-editor-dot-drawn {
    border-color: var(--success-700);
    background: var(--success-700);
}

.ek-editor-row-label {
    font-family: var(--ek-label-font);
    font-size: 0.75rem;
    color: var(--ek-text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ek-editor-row-actions { margin-left: auto; flex: none; }

.ek-editor-link {
    font-size: 0.75rem;
    color: var(--ek-gold-text);
    cursor: pointer;
}

.dark .ek-editor-link { color: var(--ek-gold-on-dark); }

.ek-editor-link:hover { text-decoration: underline; }

.ek-editor-link-danger { color: var(--danger-600); }

.dark .ek-editor-link-danger { color: var(--danger-400); }

.ek-editor-list-foot {
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--ek-line-soft);
    font-size: 0.719rem;
    color: var(--ek-text-faint);
}

.ek-editor-save {
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 3px;
    background: var(--ek-gold);
    color: var(--ek-on-gold);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.ek-editor-save:hover:not(:disabled) { background: var(--ek-gold-hover); }

.ek-editor-save:disabled {
    background: var(--ek-line);
    color: var(--ek-text-faint);
    cursor: not-allowed;
}

/* Prevzatie sady z iného podlažia — sekundárny blok pod hlavným flow */
.ek-editor-copy {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ek-line-soft);
}

.ek-editor-copy-label {
    font-family: var(--ek-label-font);
    font-size: 0.656rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ek-text-faint);
}

.ek-editor-copy-hint {
    margin-top: 0.25rem;
    font-size: 0.719rem;
    color: var(--ek-text-faint);
}

/* Inline potvrdenie deštruktívnej akcie */
.ek-editor-warning {
    margin-top: 0.625rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--danger-300);
    border-radius: 4px;
    background: color-mix(in oklab, var(--danger-500) 7%, var(--ek-paper));
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ek-text);
}

.dark .ek-editor-warning { border-color: var(--danger-800); }

.ek-editor-warning strong { font-weight: 600; }

.ek-editor-btn-danger {
    background: var(--danger-600);
    border-color: var(--danger-600);
    color: #fff;
}

.ek-editor-btn-danger:hover { background: var(--danger-700); }

/* Custom stránky v tmavom režime: ich utility (bg-white, border-gray-200,
   text-gray-500…) sú napísané pre svetlý režim — remap na tmavé plochy,
   inak by v tme svietili biele karty s nečitateľným svetlým textom */
.dark .bg-white { background-color: var(--ek-paper); }

.dark .bg-gray-50,
.dark .bg-gray-100,
.dark .bg-slate-50,
.dark .bg-slate-100 { background-color: var(--ek-graphite-raised); }

.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300,
.dark .border-slate-100,
.dark .border-slate-200,
.dark .border-slate-300 { border-color: var(--ek-line); }

.dark :where(.divide-slate-100 > :not(:last-child)),
.dark :where(.divide-slate-200 > :not(:last-child)) { border-color: var(--ek-line); }

.dark .text-gray-400,
.dark .text-gray-500,
.dark .text-slate-400,
.dark .text-slate-500 { color: var(--ek-text-faint); }

.dark .text-gray-700,
.dark .text-slate-600,
.dark .text-slate-700,
.dark .text-slate-900 { color: var(--ek-text); }

.dark .ring-slate-200 { --tw-ring-color: var(--ek-line); }

.dark .hover\:bg-amber-50:hover { background-color: var(--ek-graphite-raised); }

/* ---------- Značka ---------- */

.ek-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--ek-text);
}

.ek-brand-mark {
    height: 1.6rem;
    width: auto;
    flex: none;
    color: var(--ek-gold);
}

.ek-brand-word {
    font-size: 1.05rem;
    letter-spacing: -0.015em;
    line-height: 1;
    white-space: nowrap;
}

.ek-brand-word-light { font-weight: 400; }
.ek-brand-word-bold { font-weight: 600; }

/* V grafitovom sidebari (a v tmavom režime všade) svetlejšia zlatá + svetlý text */
.fi-sidebar .ek-brand,
.dark .ek-brand {
    color: var(--ek-sidebar-text-strong);
}

.fi-sidebar .ek-brand-mark,
.dark .ek-brand-mark {
    color: var(--ek-gold-on-dark);
}

.fi-sidebar .ek-brand-word-light { font-weight: 300; }

/* ---------- Plochy ---------- */

.fi-body {
    background-color: var(--ek-bg);
    color: var(--ek-text);
    font-size: 0.875rem;
}

/* ---------- Sidebar: grafit v oboch režimoch ---------- */

.fi-sidebar,
.dark .fi-sidebar {
    background-color: var(--ek-graphite);
    border-inline-end: 1px solid var(--ek-graphite-line);
}

.fi-sidebar-header,
.dark .fi-sidebar-header {
    background-color: transparent;
    border-bottom: none;
    box-shadow: none;
    ring-width: 0;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
}

.fi-sidebar-group-label,
.dark .fi-sidebar-group-label {
    font-family: var(--ek-label-font);
    font-size: 0.594rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--ek-sidebar-text-faint);
}

.fi-sidebar-group-collapse-btn { color: var(--ek-sidebar-text-faint); }

.fi-sidebar-item-btn,
.dark .fi-sidebar-item-btn {
    border-radius: 3px;
    color: var(--ek-sidebar-text);
}

.fi-sidebar-item-btn:hover,
.dark .fi-sidebar-item-btn:hover {
    background-color: var(--ek-graphite-raised);
    color: var(--ek-sidebar-text-strong);
}

.fi-sidebar-item-btn > .fi-icon,
.dark .fi-sidebar-item-btn > .fi-icon {
    color: var(--ek-sidebar-text-faint);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--ek-graphite-active);
    color: var(--ek-sidebar-text-strong);
    font-weight: 500;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon,
.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
    color: var(--ek-gold-on-dark);
}

.fi-sidebar-item-label { color: inherit; }

/* Badge počtu v navigácii — mono číslo bez výplne, ako v návrhu */
.fi-sidebar-item-btn .fi-badge {
    background: transparent;
    border: none;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
    font-family: var(--ek-label-font);
    font-size: 0.688rem;
    color: var(--ek-sidebar-text-faint);
}

/* Výber projektu (tenant menu) — orámovaný box s mono nadpisom PROJEKT */
.fi-sidebar .fi-tenant-menu-trigger,
.dark .fi-sidebar .fi-tenant-menu-trigger {
    border: 1px solid var(--ek-graphite-line);
    border-radius: 3px;
    background: transparent;
    color: var(--ek-sidebar-text-strong);
}

.fi-sidebar .fi-tenant-menu-trigger:hover,
.dark .fi-sidebar .fi-tenant-menu-trigger:hover {
    background-color: var(--ek-graphite-raised);
}

/* Avatar v tenant boxe nechceme — návrh má len mono kicker PROJEKT + názov
   („Projekt“ je zhodné v SK aj EN, preto smie žiť v CSS content) */
.fi-tenant-menu-trigger .fi-tenant-avatar { display: none; }

.fi-tenant-menu-trigger-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: start;
}

.fi-tenant-menu-trigger-text::before {
    content: 'Projekt';
    font-family: var(--ek-label-font);
    font-size: 0.563rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--ek-sidebar-text-faint);
}

.fi-tenant-menu-trigger-current-tenant-label { display: none; }

.fi-tenant-menu-trigger-tenant-name {
    font-size: 0.781rem;
    font-weight: 400;
    color: var(--ek-sidebar-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Topbar ---------- */

.fi-topbar-ctn,
.dark .fi-topbar-ctn {
    background-color: var(--ek-paper);
    border-bottom: 1px solid var(--ek-line);
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-topbar nav { box-shadow: none; }

/* ---------- Nadpisy a breadcrumbs ---------- */

.fi-header-heading {
    letter-spacing: -0.025em;
    font-weight: 600;
    color: var(--ek-text);
}

.fi-header-subheading { color: var(--ek-text-soft); }

.fi-breadcrumbs-item-label { color: var(--ek-text-faint); }

/* ---------- Sekcie / karty ---------- */

.fi-section,
.dark .fi-section {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 4px;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-section-header-heading {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ek-text);
}

.fi-section-header-description {
    font-size: 0.781rem;
    color: var(--ek-text-soft);
}

/* ---------- Formuláre ---------- */

.fi-fo-field-label-content,
.fi-in-entry-label {
    font-family: var(--ek-label-font);
    font-size: var(--ek-label-size);
    letter-spacing: var(--ek-label-tracking);
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ek-text-soft);
}

.fi-fo-field-label-required-mark { color: var(--ek-gold-text); }

/* Pole: 1 px rám, rádius 3 px (manuál 05) — Filament rámy stavia na ring
   shadow, ktorý téma nuluje, preto skutočný border */
.fi-input-wrp,
.dark .fi-input-wrp {
    border-radius: 3px;
    background-color: var(--ek-paper);
    box-shadow: none;
    --tw-shadow: 0 0 #0000;
    border: 1px solid oklch(0.85 0.008 85);
}

.dark .fi-input-wrp { border-color: var(--ek-line); }

.fi-input { font-size: 0.875rem; }

/* Aktívne pole: 2 px zlatý rám podľa manuálu (border + 1 px ring = 2 px) */
.fi-input-wrp:focus-within,
.dark .fi-input-wrp:focus-within {
    border-color: var(--ek-gold);
    box-shadow: 0 0 0 1px var(--ek-gold);
}

.fi-fo-field-wrp-error-message { font-size: 0.75rem; }

/* Checkbox a toggle preberajú primary paletu z PHP — len tvar */
.fi-checkbox-input { border-radius: 2px; }

/* ---------- Tabuľky ---------- */

.fi-ta,
.dark .fi-ta {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 4px;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-ta-header-cell,
.fi-ta-header-cell-sort-btn {
    font-family: var(--ek-label-font);
    font-size: var(--ek-label-size);
    letter-spacing: var(--ek-label-tracking);
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ek-text-faint);
}

.fi-ta-header-cell { background-color: oklch(0.955 0.005 85); }
.dark .fi-ta-header-cell { background-color: oklch(0.245 0.01 70); }

.fi-ta-row:hover > .fi-ta-cell { background-color: oklch(0.965 0.005 85); }
.dark .fi-ta-row:hover > .fi-ta-cell { background-color: oklch(0.25 0.01 70); }

.fi-ta-cell { font-size: 0.844rem; }

/* ---------- Tlačidlá ---------- */

.fi-btn {
    border-radius: 3px;
    font-weight: 500;
    box-shadow: none;
    --tw-shadow: 0 0 #0000;
}

/* Primárna akcia: zlatá s takmer bielym textom (manuál 04) */
.fi-btn.fi-color-primary:not(.fi-outlined) {
    background-color: var(--ek-gold);
    color: var(--ek-on-gold);
}

.fi-btn.fi-color-primary:not(.fi-outlined):hover {
    background-color: var(--ek-gold-hover);
}

/* ---------- Odznaky ---------- */

/* Pilulka s tlmeným podkladom podľa manuálu (04) — default color-50 bg
   splýva s papierom, preto color-100 + tmavší text bez ringu */
.fi-badge {
    border-radius: 999px;
    font-weight: 500;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
    background-color: var(--color-100);
    color: var(--color-800);
}

.dark .fi-badge {
    background-color: color-mix(in oklab, var(--color-400) 16%, transparent);
    color: var(--color-300);
}

/* ---------- Dropdowny a modály ---------- */

.fi-dropdown-panel,
.dark .fi-dropdown-panel {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 4px;
}

.fi-modal-window,
.dark .fi-modal-window {
    background-color: var(--ek-paper);
    border-radius: 6px;
}

/* ---------- Widgety štatistík (KPI rad z návrhu dashboardu) ---------- */

.fi-wi-stats-overview-stat,
.dark .fi-wi-stats-overview-stat {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 4px;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-wi-stats-overview-stat-label {
    font-family: var(--ek-label-font);
    font-size: var(--ek-label-size);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--ek-text-faint);
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.688rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ek-text);
}

.fi-wi-stats-overview-stat-description { font-size: 0.75rem; }

/* ---------- Karty nástenky (ek-card) — widgety podľa návrhu ---------- */

.ek-card {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ek-card-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ek-line-soft);
}

.ek-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ek-text);
    white-space: nowrap;
}

.ek-card-meta {
    font-family: var(--ek-label-font);
    font-size: 0.688rem;
    color: var(--ek-text-faint);
}

.ek-card-link {
    margin-left: auto;
    font-size: 0.781rem;
    color: var(--ek-gold-text);
}

.ek-card-link:hover { text-decoration: underline; }

.dark .ek-card-link { color: var(--ek-gold-on-dark); }

.ek-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.688rem;
    padding: 1.125rem 1.25rem;
    flex: 1;
}

.ek-card-footnote {
    margin-top: auto;
    padding-top: 0.625rem;
    border-top: 1px solid var(--ek-line-soft);
    font-size: 0.719rem;
    color: var(--ek-text-faint);
}

.ek-empty {
    font-size: 0.781rem;
    color: var(--ek-text-faint);
}

/* Pruhy stavov dopytov */

.ek-bar-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.ek-bar-label {
    width: 8.5rem;
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.813rem;
    color: var(--ek-text);
}

.ek-bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex: none;
}

.ek-bar-track {
    flex: 1;
    height: 18px;
    border-radius: 2px;
    background: var(--ek-line-soft);
    overflow: hidden;
}

.ek-bar-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
}

.ek-bar-value {
    width: 2.25rem;
    text-align: right;
    font-family: var(--ek-label-font);
    font-size: 0.781rem;
    color: var(--ek-text);
}

/* Vyžaduje pozornosť */

.ek-attention { gap: 0; }

.ek-attention-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.688rem 0;
    border-top: 1px solid var(--ek-line-soft);
}

.ek-attention-row:first-child { border-top: none; padding-top: 0; }

.ek-attention-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex: none;
}

.ek-attention-text {
    display: flex;
    flex-direction: column;
    gap: 0.188rem;
    min-width: 0;
}

.ek-attention-title {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--ek-text);
}

.ek-attention-meta {
    font-size: 0.719rem;
    color: var(--ek-text-faint);
}

.ek-attention-action {
    margin-left: auto;
    flex: none;
    padding: 0.313rem 0.688rem;
    border: 1px solid oklch(0.86 0.008 85);
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--ek-text);
}

.dark .ek-attention-action { border-color: var(--ek-line); }

.ek-attention-action:hover { background: var(--ek-line-soft); }

/* Dostupnosť po blokoch */

.ek-availability-row {
    display: flex;
    flex-direction: column;
    gap: 0.438rem;
}

.ek-availability-head {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
}

.ek-availability-name {
    font-size: 0.781rem;
    font-weight: 500;
    color: var(--ek-text);
}

.ek-availability-summary {
    margin-left: auto;
    font-family: var(--ek-label-font);
    font-size: 0.688rem;
    color: var(--ek-text-faint);
}

.ek-availability-track {
    display: flex;
    height: 8px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--ek-line-soft);
}

.ek-availability-sold { background: var(--success-700); }
.ek-availability-reserved { background: var(--warning-400); }

.ek-availability-legend {
    display: flex;
    gap: 1rem;
    padding-top: 0.25rem;
    font-size: 0.719rem;
    color: var(--ek-text-faint);
}

.ek-availability-legend span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ek-legend-swatch {
    width: 8px;
    height: 8px;
    display: inline-block;
}

.ek-legend-sold { background: var(--success-700); }
.ek-legend-reserved { background: var(--warning-400); }
.ek-legend-free { background: var(--ek-line-soft); border: 1px solid var(--ek-line); }

/* Zdroje dopytov */

.ek-source-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.781rem;
    color: var(--ek-text);
}

.ek-source-label {
    width: 7.5rem;
    flex: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ek-source-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--ek-line-soft);
    overflow: hidden;
}

.ek-source-fill {
    display: block;
    height: 100%;
    background: var(--ek-gold);
}

.ek-source-value {
    font-family: var(--ek-label-font);
    font-size: 0.719rem;
    color: var(--ek-text-faint);
    flex: none;
}

/* ---------- Prihlásenie a jednoduché stránky ---------- */

.fi-simple-main,
.dark .fi-simple-main {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-radius: 6px;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-simple-layout { background-color: var(--ek-bg); }

/* ---------- Taby a stránkovanie ---------- */

.fi-tabs { border-radius: 4px; }

.fi-tabs-item-label { font-size: 0.813rem; }

/* ---------- Notifikácie ---------- */

.fi-no-notification,
.dark .fi-no-notification {
    border-radius: 4px;
    border: 1px solid var(--ek-line);
}

/* ---------- Nápoveda obrazovky (AdminHelp) ---------- */

.ek-help {
    background-color: var(--ek-paper);
    border: 1px solid var(--ek-line);
    border-left: 3px solid var(--ek-gold);
    border-radius: 4px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
}
.ek-help__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ek-help__title { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ek-help__title h3 { font-size: 0.95rem; font-weight: 600; color: var(--ek-text); margin: 0; }
.ek-help__badge,
.ek-help__label {
    font-family: var(--ek-label-font);
    font-size: var(--ek-label-size);
    letter-spacing: var(--ek-label-tracking);
    text-transform: uppercase;
    color: var(--ek-gold-text);
}
.ek-help__badge { border: 1px solid var(--ek-gold); border-radius: 3px; padding: 0.1rem 0.4rem; white-space: nowrap; }
.ek-help__label { display: block; margin: 0.9rem 0 0.35rem; color: var(--ek-text-faint); }
.ek-help__toggle {
    font-family: var(--ek-label-font);
    font-size: var(--ek-label-size);
    letter-spacing: var(--ek-label-tracking);
    text-transform: uppercase;
    color: var(--ek-text-soft);
    border: 1px solid var(--ek-line);
    border-radius: 3px;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}
.ek-help__toggle:hover { border-color: var(--ek-gold); color: var(--ek-gold-text); }
.ek-help__intro { margin: 0.4rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--ek-text-soft); }
.ek-help__steps { margin: 0; padding-left: 1.2rem; font-size: 0.85rem; line-height: 1.55; color: var(--ek-text); }
.ek-help__steps li { margin: 0.15rem 0; }
.ek-help__steps li::marker { color: var(--ek-gold-text); font-family: var(--ek-label-font); font-size: 0.75rem; }
.ek-help__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.8rem; }
.ek-help__links a { color: var(--ek-gold-text); text-decoration: none; border-bottom: 1px solid transparent; }
.ek-help__links a:hover { border-bottom-color: var(--ek-gold); }

/* ---------- Príručka (Guide) ---------- */

.ek-guide { display: grid; gap: 1.25rem; max-width: 64rem; }
.ek-guide__eyebrow {
    font-family: var(--ek-label-font);
    font-size: var(--ek-label-size);
    letter-spacing: var(--ek-label-tracking);
    text-transform: uppercase;
    color: var(--ek-gold-text);
    margin: 0 0 0.25rem;
}
.ek-guide__h2 { font-size: 1.15rem; font-weight: 600; color: var(--ek-text); margin: 0; }
.ek-guide__lead { margin: 0.5rem 0 1rem; font-size: 0.9rem; line-height: 1.55; color: var(--ek-text-soft); max-width: 48rem; }
.ek-guide__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.ek-guide__step { display: flex; gap: 0.9rem; align-items: flex-start; border-top: 1px solid var(--ek-line-soft); padding-top: 0.75rem; }
.ek-guide__step h3 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--ek-text); }
.ek-guide__step p { margin: 0.2rem 0 0.35rem; font-size: 0.85rem; line-height: 1.5; color: var(--ek-text-soft); }
.ek-guide__num {
    flex: 0 0 1.75rem; height: 1.75rem; border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ek-gold); color: var(--ek-on-gold);
    font-family: var(--ek-label-font); font-size: 0.8rem; font-weight: 600;
}
.ek-guide__link { font-size: 0.8rem; color: var(--ek-gold-text); text-decoration: none; }
.ek-guide__link:hover { text-decoration: underline; }
.ek-guide__blocks { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.ek-guide__block { border: 1px solid var(--ek-line); border-radius: 4px; padding: 0.8rem 0.9rem; background: var(--ek-bg); }
.ek-guide__block h3 { margin: 0 0 0.25rem; font-size: 0.9rem; font-weight: 600; color: var(--ek-text); }
.ek-guide__block p { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--ek-text-soft); }
.ek-guide__when { margin-top: 0.4rem !important; }
.ek-guide__map { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.ek-guide__group h3 { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--ek-text); }
.ek-guide__groupdesc { margin: 0.2rem 0 0.5rem; font-size: 0.78rem; line-height: 1.45; color: var(--ek-text-faint); }
.ek-guide__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.ek-guide__group li { font-size: 0.85rem; line-height: 1.4; }
.ek-guide__group li a { color: var(--ek-gold-text); text-decoration: none; }
.ek-guide__group li a:hover { text-decoration: underline; }
.ek-guide__group li small { display: block; font-size: 0.75rem; color: var(--ek-text-faint); }

/* ---------- Page builder (bloky, polia, modaly) ---------- */

.ek-builder { display: grid; gap: 1rem; }
.ek-builder__bar { display: grid; gap: 0.75rem; }
.ek-builder__bar-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.9rem; }
.ek-builder__spacer { flex: 1 1 auto; }
.ek-builder__preview { margin: 0; font-size: 0.8rem; color: var(--ek-text-soft); }
.ek-builder__preview a { color: var(--ek-gold-text); word-break: break-all; }
.ek-builder__errors { margin: 0; font-size: 0.85rem; color: oklch(0.5 0.19 27); font-weight: 500; }
.ek-builder__list { display: grid; gap: 0.9rem; }
.ek-builder__empty { border: 1px dashed var(--ek-line); border-radius: 4px; padding: 2rem; text-align: center; color: var(--ek-text-soft); font-size: 0.9rem; display: grid; gap: 0.5rem; justify-items: center; }
.ek-builder__empty p { margin: 0; max-width: 40rem; }

/* Polia */
.ek-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.ek-field--grow { flex: 1 1 14rem; }
.ek-field--wide { grid-column: 1 / -1; }
.ek-field label { display: flex; flex-direction: column; gap: 0.3rem; }
.ek-field__label {
    font-family: var(--ek-label-font); font-size: var(--ek-label-size); letter-spacing: var(--ek-label-tracking);
    text-transform: uppercase; color: var(--ek-text-soft);
}
.ek-field__label em { color: var(--ek-gold-text); font-style: normal; }
.ek-field__help { font-size: 0.74rem; line-height: 1.4; color: var(--ek-text-faint); }
.ek-field__error { font-size: 0.76rem; line-height: 1.4; color: oklch(0.5 0.19 27); font-weight: 500; }
.ek-field--error .ek-input { border-color: oklch(0.6 0.19 27); }
.ek-field__check, .ek-field label.ek-field__check { display: inline-flex; flex-direction: row; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--ek-text); cursor: pointer; }
.ek-field__check input { accent-color: var(--ek-gold); }
.ek-field__locale { display: flex; align-items: flex-start; gap: 0.4rem; }
.ek-field__lang { flex: 0 0 auto; margin-top: 0.55rem; font-family: var(--ek-label-font); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ek-gold-text); border: 1px solid var(--ek-line); border-radius: 3px; padding: 0.1rem 0.3rem; }
.ek-input {
    width: 100%; font-size: 0.875rem; color: var(--ek-text); background: var(--ek-paper);
    border: 1px solid var(--ek-line); border-radius: 3px; padding: 0.45rem 0.6rem; line-height: 1.4;
}
.ek-input:focus { outline: none; border-color: var(--ek-gold); box-shadow: 0 0 0 2px color-mix(in oklch, var(--ek-gold) 25%, transparent); }
.ek-input--mono { font-family: var(--mono-font-family), ui-monospace, monospace; font-size: 0.78rem; }
.ek-input--search { max-width: 18rem; margin-left: auto; }
select.ek-input { appearance: auto; }

/* Tlačidlá */
.ek-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; white-space: nowrap;
    font-family: var(--ek-label-font); font-size: var(--ek-label-size); letter-spacing: var(--ek-label-tracking); text-transform: uppercase;
    border-radius: 3px; padding: 0.55rem 0.9rem; border: 1px solid var(--ek-line); color: var(--ek-text); background: var(--ek-paper); cursor: pointer; text-decoration: none;
}
.ek-btn:hover { border-color: var(--ek-gold); color: var(--ek-gold-text); }
.ek-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ek-btn--primary { background: var(--ek-graphite); color: var(--ek-sidebar-text-strong); border-color: var(--ek-graphite); }
.ek-btn--primary:hover { background: var(--ek-graphite-raised); color: var(--ek-gold-on-dark); }
.ek-btn--save { background: var(--ek-gold); color: var(--ek-on-gold); border-color: var(--ek-gold); }
.ek-btn--save:hover { background: var(--ek-gold-hover); color: var(--ek-on-gold); }
.ek-btn--ghost { background: transparent; }
.ek-btn--danger { background: oklch(0.55 0.19 27); border-color: oklch(0.55 0.19 27); color: white; }
.ek-btn--danger-text { color: oklch(0.5 0.19 27); }
.ek-iconbtn {
    font-size: 0.72rem; line-height: 1; padding: 0.35rem 0.5rem; border: 1px solid var(--ek-line); border-radius: 3px;
    background: var(--ek-paper); color: var(--ek-text-soft); cursor: pointer; white-space: nowrap;
}
.ek-iconbtn:hover { border-color: var(--ek-gold); color: var(--ek-gold-text); }
.ek-iconbtn--danger { color: oklch(0.5 0.19 27); }

/* Blok (sekcia) */
.ek-block { background: var(--ek-paper); border: 1px solid var(--ek-line); border-left: 3px solid var(--ek-graphite); border-radius: 4px; }
.ek-block--draft { border-style: dashed; border-left-style: solid; border-left-color: var(--ek-text-faint); }
.ek-block--draft .ek-block__head { opacity: 0.85; }
.ek-block--shared { border-left-color: var(--ek-gold); }
.ek-block--error { border-color: oklch(0.6 0.19 27); border-left-color: oklch(0.6 0.19 27); }
.ek-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; }
.ek-block__handle { cursor: grab; user-select: none; color: var(--ek-text-faint); font-size: 1.1rem; }
.ek-block__num, .ek-repeater__item-head .ek-block__num {
    display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; border-radius: 3px;
    background: var(--ek-bg); border: 1px solid var(--ek-line); font-family: var(--ek-label-font); font-size: 0.72rem; color: var(--ek-text-soft);
}
.ek-block__type { font-family: var(--ek-label-font); font-size: var(--ek-label-size); letter-spacing: var(--ek-label-tracking); text-transform: uppercase; color: var(--ek-sidebar-text-strong); background: var(--ek-graphite); border-radius: 3px; padding: 0.25rem 0.5rem; white-space: nowrap; }
.ek-block__name { flex: 1 1 12rem; min-width: 8rem; font-size: 0.85rem; border: 1px solid transparent; border-radius: 3px; padding: 0.3rem 0.45rem; background: transparent; color: var(--ek-text); }
.ek-block__name:hover, .ek-block__name:focus { border-color: var(--ek-line); background: var(--ek-paper); outline: none; }
.ek-block__shared { font-size: 0.75rem; color: var(--ek-gold-text); border: 1px solid var(--ek-gold); border-radius: 3px; padding: 0.2rem 0.45rem; white-space: nowrap; }
.ek-block__state { font-family: var(--ek-label-font); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ek-text-faint); white-space: nowrap; }
.ek-block__actions { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.ek-block__confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-top: 1px solid var(--ek-line-soft); background: var(--ek-bg); font-size: 0.85rem; color: var(--ek-text); }
.ek-block__confirm .ek-input { max-width: 18rem; }
.ek-block__body { border-top: 1px solid var(--ek-line-soft); padding: 0.8rem; display: grid; gap: 0.9rem; }
.ek-block__desc { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--ek-text-soft); }
.ek-block__when { color: var(--ek-text-faint); }
.ek-block__note { margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--ek-gold-text); background: color-mix(in oklch, var(--ek-gold) 10%, transparent); border-radius: 3px; padding: 0.5rem 0.7rem; }
.ek-block__base { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); padding: 0.7rem; border: 1px dashed var(--ek-line); border-radius: 4px; background: var(--ek-bg); }
.ek-block__fields { display: grid; gap: 0.9rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

/* Repeater */
.ek-repeater { grid-column: 1 / -1; border: 1px solid var(--ek-line); border-radius: 4px; background: var(--ek-bg); padding: 0.7rem; display: grid; gap: 0.6rem; }
.ek-repeater__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.ek-repeater__item { background: var(--ek-paper); border: 1px solid var(--ek-line); border-radius: 3px; padding: 0.6rem; display: grid; gap: 0.6rem; }
.ek-repeater__item-head { display: flex; align-items: center; justify-content: space-between; }
.ek-repeater__empty { margin: 0; font-size: 0.8rem; color: var(--ek-text-faint); }

/* Médiá */
.ek-media { display: flex; align-items: center; gap: 0.75rem; }
.ek-media__thumb { width: 3.5rem; height: 3.5rem; border-radius: 3px; border: 1px solid var(--ek-line); object-fit: cover; display: inline-flex; align-items: center; justify-content: center; color: var(--ek-text-faint); background: var(--ek-bg); }
.ek-media__thumb--empty { border-style: dashed; }
.ek-media__actions { display: flex; flex-direction: column; gap: 0.3rem; }

/* Náhľad v položkách výberu média (MediaPicker → Select::allowHtml) — aby bolo
   vo výpise aj na vybranej hodnote vidieť, o ktorý obrázok ide */
.ek-option { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; max-width: 100%; }
.ek-option__thumb { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 3px; border: 1px solid var(--ek-line); object-fit: cover; }
.ek-option__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fi-badge-label .ek-option__thumb { width: 1.15rem; height: 1.15rem; border-radius: 2px; }

/* Modaly */
.ek-modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: oklch(0.2 0.01 70 / 0.55); }
.ek-modal__box { width: 100%; max-width: 46rem; max-height: 85vh; overflow: auto; background: var(--ek-paper); border: 1px solid var(--ek-line); border-radius: 4px; padding: 1rem; display: grid; gap: 0.9rem; }
.ek-modal__box--wide { max-width: 64rem; }
.ek-modal__head { display: flex; align-items: center; gap: 0.75rem; }
.ek-modal__head > div { flex: 1 1 auto; }
.ek-modal__foot { margin: 0; }
.ek-typegrid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.ek-typecard { text-align: left; display: grid; gap: 0.3rem; border: 1px solid var(--ek-line); border-radius: 4px; padding: 0.75rem; background: var(--ek-bg); cursor: pointer; }
.ek-typecard:hover { border-color: var(--ek-gold); background: var(--ek-paper); }
.ek-typecard--muted { opacity: 0.7; }
.ek-typecard__title { font-size: 0.9rem; font-weight: 600; color: var(--ek-text); }
.ek-typecard__desc { font-size: 0.78rem; line-height: 1.45; color: var(--ek-text-soft); }
.ek-typecard__when { font-size: 0.74rem; line-height: 1.4; color: var(--ek-text-faint); }
.ek-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; padding: 0.75rem; border: 1px dashed var(--ek-line); border-radius: 4px; background: var(--ek-bg); }
.ek-mediagrid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); }
.ek-mediacard { border: 1px solid var(--ek-line); border-radius: 3px; overflow: hidden; background: var(--ek-paper); cursor: pointer; text-align: left; display: grid; }
.ek-mediacard:hover { border-color: var(--ek-gold); }
.ek-mediacard img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.ek-mediacard span { font-size: 0.68rem; color: var(--ek-text-faint); padding: 0.2rem 0.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[x-cloak] { display: none !important; }
