/* ------------------------------------------------------------------ */
/*  Design tokens — stejná paleta jako v odsouhlaseném návrhu (stone/teal/amber) */
/* ------------------------------------------------------------------ */
:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-900: #1c1917;

    --teal-50: #f0fdfa;
    --teal-200: #99f6e4;
    --teal-400: #2dd4bf;
    --teal-700: #0f766e;
    --teal-800: #115e59;

    --emerald-50: #ecfdf5;
    --emerald-200: #a7f3d0;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;

    --amber-50: #fffbeb;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;

    --rose-50: #fff1f2;
    --rose-200: #fecdd3;
    --rose-700: #be123c;

    --violet-50: #f5f3ff;
    --violet-200: #ddd6fe;
    --violet-700: #6d28d9;

    --sky-50: #f0f9ff;
    --sky-200: #bae6fd;
    --sky-700: #0369a1;

    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;
}

/* ------------------------------------------------------------------ */
/*  Reset a základ                                                     */
/* ------------------------------------------------------------------ */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--stone-50);
    color: var(--stone-900);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3, h4 {
    margin: 0;
    letter-spacing: -0.01em;
}

h1:focus {
    outline: none;
}

a {
    color: var(--teal-700);
}

/* ------------------------------------------------------------------ */
/*  Hlavička                                                           */
/* ------------------------------------------------------------------ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--stone-200);
    background: rgba(250, 250, 249, 0.9);
    backdrop-filter: blur(6px);
}

.app-header-inner {
    max-width: 96rem;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-lg);
    background: var(--teal-700);
    color: white;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.brand-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--stone-500);
}

/* Jednotný vizuální jazyk pro VŠECHNY klikatelné prvky v hlavičce (odkazy, přepínač
   hotelu, uživatelské jméno) — bílá pilulka s jemným rámečkem, aktivní stav plně teal. */
.header-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.header-item,
.hotel-switcher select {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--stone-200);
    background: white;
    border-radius: var(--radius-full);
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--stone-600);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.header-item:hover,
.hotel-switcher select:hover {
    border-color: var(--stone-300);
    color: var(--stone-900);
}

.header-item.active {
    background: var(--teal-700);
    border-color: var(--teal-700);
    color: white;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-divider {
    width: 1px;
    height: 1.4rem;
    background: var(--stone-200);
}

.logout-button {
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    color: var(--stone-400);
    cursor: pointer;
}

.logout-button:hover {
    color: var(--rose-700);
    border-color: var(--rose-200);
}

.hotel-switcher select {
    appearance: none;
    padding-right: 1.75rem;
}

/* Vodorovné taby mezi podstránkami konkrétního hotelu (Znalosti/Pravidla/Schránky/
   Komunikace) — schválně vodorovné pilulky, ne svislé menu jako u globální administrace,
   ať je na první pohled jasné, že jde o jiný rozsah nastavení (jeden hotel, ne celá appka). */
.hotel-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--stone-200);
}

.hotel-tabs-spacer {
    flex: 1;
}

.hotel-switcher select:focus {
    outline: none;
    border-color: var(--teal-400);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--stone-600);
}

.user-menu form {
    margin: 0;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--stone-500);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--teal-700);
}

/* ------------------------------------------------------------------ */
/*  Layout                                                             */
/* ------------------------------------------------------------------ */
.main-container {
    max-width: 96rem;
    margin: 0 auto;
    padding: 1.25rem 1rem;
}

.page-heading {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-heading h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.page-heading p {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--stone-500);
}

/* ------------------------------------------------------------------ */
/*  Karty                                                              */
/* ------------------------------------------------------------------ */
.card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    background: white;
    padding: 1rem;
}

.card-dashed {
    border-radius: var(--radius-xl);
    border: 1px dashed var(--stone-300);
    background: white;
    padding: 0.65rem 0.75rem;
    color: var(--stone-600);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    cursor: pointer;
}

.card-dashed:hover {
    border-color: var(--teal-400);
    color: var(--teal-700);
}

/* Stat dlaždice na přehledu schránky */
.stat-row {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-tile {
    flex: 1 1 8rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    background: white;
    padding: 0.6rem 0.75rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--stone-400);
}

/* ------------------------------------------------------------------ */
/*  Schránka: seznam emailů vlevo, detail vpravo                       */
/* ------------------------------------------------------------------ */
.email-layout {
    display: grid;
    grid-template-columns: minmax(0, 360px) 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .email-layout {
        grid-template-columns: 1fr;
    }
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-item {
    display: flex;
    width: 100%;
    text-align: left;
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    background: white;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: inherit;
}

.email-item:hover {
    border-color: var(--stone-300);
}

.email-item.active {
    border-color: var(--teal-400);
    box-shadow: 0 0 0 1px var(--teal-200) inset;
}

.email-item-spine {
    width: 0.35rem;
    flex-shrink: 0;
    background: var(--stone-300);
}

.email-item-spine.spine-emerald { background: var(--emerald-500); }
.email-item-spine.spine-amber { background: var(--amber-500); }
.email-item-spine.spine-teal { background: var(--teal-400); }

/* ------------------------------------------------------------------ */
/*  Filtry fronty podle typu emailu                                    */
/* ------------------------------------------------------------------ */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.filter-chip {
    border: 1px solid var(--stone-200);
    background: white;
    border-radius: var(--radius-full);
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--stone-600);
    cursor: pointer;
}

.filter-chip:hover {
    border-color: var(--stone-300);
}

.filter-chip.active {
    background: var(--teal-700);
    border-color: var(--teal-700);
    color: white;
}

.section-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.section-chip {
    border: 1px solid var(--stone-200);
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--stone-700);
    cursor: pointer;
}

.section-chip:hover {
    border-color: var(--stone-300);
}

.section-chip.active {
    background: var(--stone-900);
    border-color: var(--stone-900);
    color: white;
}

.section-chip .section-chip-count {
    font-weight: 400;
    opacity: 0.7;
    margin-left: 0.3rem;
}

/* ------------------------------------------------------------------ */
/*  Vysouvací filtr podle stavu — záměrně jiná grafika než sekce/typ,  */
/*  ať je vidět, že jde o odlišnou (druhořadou) úroveň filtrování.     */
/* ------------------------------------------------------------------ */
.status-filter-bar {
    margin-bottom: 1rem;
}

.status-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0;
    color: var(--stone-500);
    font-size: 0.78rem;
    cursor: pointer;
}

.status-filter-toggle:hover {
    color: var(--stone-800);
}

.status-filter-badge {
    background: var(--stone-100);
    color: var(--stone-600);
    border-radius: var(--radius-full);
    padding: 0.1rem 0.5rem;
    font-size: 0.7rem;
}

.status-filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.6rem;
    background: var(--stone-50);
    border: 1px dashed var(--stone-200);
    border-radius: var(--radius-lg);
}

.status-filter-chip {
    border: 1px solid transparent;
    background: white;
    border-radius: var(--radius-sm, 0.25rem);
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    color: var(--stone-500);
    cursor: pointer;
}

.status-filter-chip:hover {
    border-color: var(--stone-300);
}

.status-filter-chip.active {
    background: var(--stone-700);
    color: white;
}

.email-item-body {
    min-width: 0;
    flex: 1;
    padding: 0.6rem 0.75rem;
}

.email-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-item-from {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-time {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--stone-400);
}

.email-item-subject {
    font-size: 0.8rem;
    color: var(--stone-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-mailbox {
    font-size: 0.7rem;
    color: var(--stone-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-chips {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.email-detail {
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    background: white;
    padding: 1.25rem;
}

.email-detail-header {
    border-bottom: 1px solid var(--stone-100);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.email-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--stone-500);
    margin-top: 0.3rem;
}

.email-detail-body {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--stone-700);
    white-space: pre-wrap;
    margin-bottom: 1rem;
}

.email-detail-meta-time {
    margin-left: auto;
}

.email-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.email-quick-actions-spacer {
    flex: 1;
}

.email-delete-confirm-label {
    font-size: 0.75rem;
    color: var(--rose-700);
}

.btn-danger {
    background: var(--rose-700);
}

.btn-danger-text {
    color: var(--rose-700);
}

.empty-state-inline {
    padding: 1.5rem 0;
}

/* ------------------------------------------------------------------ */
/*  Detail e-mailu — sdílené bloky napříč EmailReadyPanel/SentPanel/    */
/*  NeedsInfoPanel/ActionRequiredPanel (viz Components/Pages/Home/).    */
/* ------------------------------------------------------------------ */
.card-spaced {
    margin-bottom: 1rem;
}

.chip-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.eval-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--stone-600);
}

.eval-reasoning {
    font-size: 0.8rem;
    color: var(--stone-600);
    margin: 0.4rem 0 0;
}

.eval-sources {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.eval-sources-label {
    font-size: 0.7rem;
    color: var(--stone-400);
}

.notice-amber {
    border-radius: var(--radius-lg);
    background: var(--amber-50);
    border: 1px solid var(--amber-200);
    color: var(--amber-900);
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.button-row {
    display: flex;
    gap: 0.5rem;
}

.sent-meta {
    font-size: 0.8rem;
    color: var(--stone-600);
    margin: 0.4rem 0 0;
}

.needs-info-pending-note {
    font-size: 0.8rem;
    color: var(--amber-800);
    margin-bottom: 0.6rem;
}

.info-box-amber {
    border-radius: var(--radius-xl);
    border: 1px solid var(--amber-200);
    background: var(--amber-50);
    padding: 1rem;
    margin-bottom: 0.6rem;
}

.info-box-amber-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--amber-800);
    margin-bottom: 0.3rem;
}

.info-box-amber-question {
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.6rem;
}

.info-box-amber-question-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--amber-700);
}

.info-box-amber-question-text {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.2rem 0 0;
}

.info-box-amber-answer {
    margin-top: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.info-box-amber-answer-text {
    font-size: 0.8rem;
    color: var(--amber-900);
}

.matched-rule-badge {
    margin-bottom: 0.75rem;
}

.info-box-stone {
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    background: var(--stone-50);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.info-box-stone-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.info-box-stone-text {
    font-size: 0.85rem;
}

.info-box-teal {
    border-radius: var(--radius-xl);
    border: 1px solid var(--teal-200);
    background: var(--teal-50);
    padding: 1rem;
}

.info-box-teal-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--teal-800);
    margin-bottom: 0.3rem;
}

.info-box-teal-text {
    font-size: 0.85rem;
}

.info-box-teal-note {
    font-size: 0.75rem;
    color: var(--stone-500);
    margin-top: 0.4rem;
}

.manual-reply {
    margin-top: 0.75rem;
}

.resolved-note {
    margin-top: 0.5rem;
}

.empty-state-sub {
    font-size: 0.8rem;
}

.tone-stone { color: var(--stone-700); }
.tone-emerald { color: var(--emerald-600); }
.tone-amber { color: var(--amber-600); }
.tone-muted { color: var(--stone-400); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    color: var(--stone-400);
    text-align: center;
}

/* ------------------------------------------------------------------ */
/*  Chipy / štítky stavů                                               */
/* ------------------------------------------------------------------ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: var(--radius-full);
    padding: 0.15rem 0.55rem;
    font-size: 0.65rem;
    font-weight: 500;
}

.chip-stone { background: var(--stone-100); color: var(--stone-600); }
.chip-teal { background: var(--teal-50); color: var(--teal-700); }
.chip-emerald { background: var(--emerald-50); color: var(--emerald-700); }
.chip-amber { background: var(--amber-50); color: var(--amber-700); }
.chip-rose { background: var(--rose-50); color: var(--rose-700); }
.chip-violet { background: var(--violet-50); color: var(--violet-700); }
.chip-sky { background: var(--sky-50); color: var(--sky-700); }

/* Pastelová paleta pro kategorie znalostní báze (25 odstínů, rovnoměrně po barevném kole) —
   samostatná od výše, ať se barva kategorie nikde nekříží s významem stavových chipů
   (chip-teal/emerald/amber/rose mají jinde konkrétní význam: jistota, stav e-mailu…).
   Přiřazení kategorie -> třída je stabilní hash v KnowledgeEntries.razor, tahle paleta jen
   drží samotné barvy. */
.chip-cat-0 { background: hsl(0, 70%, 94%); color: hsl(0, 55%, 32%); }
.chip-cat-1 { background: hsl(14, 70%, 94%); color: hsl(14, 55%, 32%); }
.chip-cat-2 { background: hsl(29, 70%, 92%); color: hsl(29, 55%, 32%); }
.chip-cat-3 { background: hsl(43, 70%, 90%); color: hsl(43, 55%, 30%); }
.chip-cat-4 { background: hsl(58, 65%, 89%); color: hsl(58, 50%, 28%); }
.chip-cat-5 { background: hsl(72, 60%, 90%); color: hsl(72, 45%, 27%); }
.chip-cat-6 { background: hsl(86, 55%, 91%); color: hsl(86, 45%, 27%); }
.chip-cat-7 { background: hsl(101, 55%, 92%); color: hsl(101, 45%, 27%); }
.chip-cat-8 { background: hsl(115, 55%, 92%); color: hsl(115, 45%, 26%); }
.chip-cat-9 { background: hsl(130, 55%, 92%); color: hsl(130, 45%, 26%); }
.chip-cat-10 { background: hsl(144, 55%, 92%); color: hsl(144, 45%, 27%); }
.chip-cat-11 { background: hsl(158, 60%, 92%); color: hsl(158, 50%, 27%); }
.chip-cat-12 { background: hsl(173, 65%, 92%); color: hsl(173, 55%, 27%); }
.chip-cat-13 { background: hsl(187, 65%, 92%); color: hsl(187, 55%, 28%); }
.chip-cat-14 { background: hsl(202, 70%, 93%); color: hsl(202, 55%, 32%); }
.chip-cat-15 { background: hsl(216, 70%, 94%); color: hsl(216, 55%, 35%); }
.chip-cat-16 { background: hsl(230, 65%, 94%); color: hsl(230, 50%, 40%); }
.chip-cat-17 { background: hsl(245, 60%, 94%); color: hsl(245, 45%, 42%); }
.chip-cat-18 { background: hsl(259, 60%, 94%); color: hsl(259, 45%, 42%); }
.chip-cat-19 { background: hsl(274, 60%, 94%); color: hsl(274, 45%, 40%); }
.chip-cat-20 { background: hsl(288, 60%, 94%); color: hsl(288, 45%, 38%); }
.chip-cat-21 { background: hsl(302, 60%, 94%); color: hsl(302, 45%, 36%); }
.chip-cat-22 { background: hsl(317, 65%, 94%); color: hsl(317, 50%, 35%); }
.chip-cat-23 { background: hsl(331, 70%, 94%); color: hsl(331, 55%, 34%); }
.chip-cat-24 { background: hsl(346, 70%, 94%); color: hsl(346, 55%, 33%); }

/* Přepínací chip (pravidlo odesílatele VIP/Booking/Ignorovat) — schválně NEpoužívá
   amber/teal/rose jako stavové chipy (jistota, stav emailu), ať se barva jednoho
   místa v appce nepřekrývá s odlišným významem jinde. Neaktivní = stone, aktivní = tmavá
   výplň, stejný vzor jako section-chip.active / filter-chip.active. */
.chip-toggle {
    background: var(--stone-100);
    color: var(--stone-600);
    border: none;
    cursor: pointer;
}

.chip-toggle.active {
    background: var(--stone-900);
    color: white;
}

/* Zdrojový chip u návrhu odpovědi — klikatelný, otevírá detail znalosti v modalu. */
.chip-link {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.chip-link:hover {
    background: var(--stone-200);
}

/* ------------------------------------------------------------------ */
/*  Tlačítka                                                           */
/* ------------------------------------------------------------------ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--teal-700);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--teal-800);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--stone-700);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--stone-300);
}

/* ------------------------------------------------------------------ */
/*  Formuláře                                                          */
/* ------------------------------------------------------------------ */
.form-field {
    margin-bottom: 0.85rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--stone-700);
}

/* Základní vzhled + focus rámeček platí pro VŠECHNA textová pole v appce, ne jen uvnitř
   .form-field — ať je to jednotné i tam, kde se pole nepoužívá s wrapperem/labelem
   (např. rychlá pole přímo v tabulkách). Blazor komponenty jako InputText nevykreslí
   type="text", pokud se nezadá výslovně — selektor proto míří na "input bez type
   checkbox/radio", ne na konkrétní typy. */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--stone-900);
    background: white;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--teal-400);
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field textarea,
.form-field select {
    width: 100%;
}

/* Vlastní stylovaný combobox (např. kategorie u znalostní báze) — náhrada za nativní
   datalist popup prohlížeče, který vypadá v každém prohlížeči jinak a často ošklivě. */
.combobox {
    position: relative;
}

.combobox input {
    width: 100%;
}

.combobox-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.12);
    max-height: 12rem;
    overflow-y: auto;
    z-index: 20;
}

.combobox-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    color: var(--stone-700);
    background: none;
    border: none;
    cursor: pointer;
}

.combobox-option:hover {
    background: var(--stone-100);
}

.combobox-option-active {
    background: var(--stone-100);
    font-weight: 600;
    color: var(--stone-900);
}

.dropdown-select {
    position: relative;
    display: inline-block;
}

.dropdown-select-trigger {
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--stone-900);
    background: white;
}

.dropdown-select-trigger:focus {
    outline: none;
    border-color: var(--teal-400);
}

.dropdown-select-caret {
    color: var(--stone-400);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.template-preview {
    width: 100%;
    height: 20rem;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: white;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: var(--stone-50);
    color: var(--stone-700);
    font-size: 0.8rem;
    text-decoration: none;
}

.attachment-chip:hover {
    border-color: var(--teal-400);
    color: var(--teal-700);
}

.attachment-size {
    color: var(--stone-400);
}

.form-field .validation-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--rose-700);
}

.password-hints {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
}

.password-hints li {
    font-size: 0.72rem;
    color: var(--stone-400);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.password-hints li::before {
    content: "○";
    font-size: 0.55rem;
}

.password-hints li.met {
    color: var(--emerald-600);
}

.password-hints li.met::before {
    content: "●";
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--stone-600);
    margin-bottom: 1rem;
}

.invalid {
    outline: 1px solid var(--rose-700);
}

.validation-message {
    color: var(--rose-700);
    font-size: 0.75rem;
}

/* ------------------------------------------------------------------ */
/*  Přihlašovací stránka a stavové stránky (Lockout, AccessDenied)     */
/* ------------------------------------------------------------------ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 22rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    background: white;
    padding: 1.75rem;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
}

.login-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-lg);
    background: var(--teal-700);
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.login-brand-title {
    font-size: 1rem;
    font-weight: 600;
}

.login-brand-subtitle {
    font-size: 0.75rem;
    color: var(--stone-500);
}

.status-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.status-heading-danger {
    color: var(--rose-700);
}

/* ------------------------------------------------------------------ */
/*  Účet / Manage stránky                                              */
/* ------------------------------------------------------------------ */
.manage-page {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .manage-page {
        grid-template-columns: 1fr;
    }
}

.manage-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.manage-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    color: var(--stone-600);
    text-decoration: none;
    font-size: 0.85rem;
}

.manage-nav a:hover {
    background: var(--stone-100);
}

.manage-nav a.active {
    background: var(--teal-50);
    color: var(--teal-700);
    font-weight: 500;
}

.account-info-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--stone-100);
    font-size: 0.85rem;
}

.account-info-label {
    width: 8rem;
    color: var(--stone-500);
}

/* ------------------------------------------------------------------ */
/*  Stavová hláška (StatusMessage)                                     */
/* ------------------------------------------------------------------ */
.alert {
    border-radius: var(--radius-lg);
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background: var(--rose-50);
    color: var(--rose-700);
}

.alert-success {
    background: var(--emerald-50);
    color: var(--emerald-700);
}

/* ------------------------------------------------------------------ */
/*  Modal (detail znalosti přes klik na zdroj u návrhu odpovědi)       */
/* ------------------------------------------------------------------ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem;
    overflow-y: auto;
    z-index: 100;
}

.modal-panel {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--stone-200);
    box-shadow: 0 20px 50px rgba(28, 25, 23, 0.3);
    padding: 1.25rem;
    width: 100%;
    max-width: 32rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: var(--stone-400);
    padding: 0.2rem;
}

.modal-close:hover {
    color: var(--stone-700);
}

/* ------------------------------------------------------------------ */
/*  Tabulka (např. seznam hotelů)                                      */
/* ------------------------------------------------------------------ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--stone-400);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--stone-200);
}

.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--stone-100);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ------------------------------------------------------------------ */
/*  Blazor error UI (ponecháno z výchozí šablony)                      */
/* ------------------------------------------------------------------ */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Došlo k neočekávané chybě.";
}

/* ------------------------------------------------------------------ */
/*  Toast notifikace (krátkodobá hlášení, např. o selhání synchronizace) */
/* ------------------------------------------------------------------ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 22rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: var(--radius-lg);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.15);
    animation: toast-in 0.2s ease-out;
}

.toast span {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
}

.toast-close:hover {
    opacity: 1;
}

.toast-error {
    background: var(--rose-700);
    color: white;
}

.toast-info {
    background: var(--teal-800);
    color: white;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-0.5rem); }
    to { opacity: 1; transform: translateY(0); }
}
