/* ---------------------------------------------------------------------
   App 1.1 - základní vzhled
   Korporátní barva: sea green #2E9B57
   Výchozí motiv: tmavý, přepínatelný na světlý (ikona v horní liště)
   --------------------------------------------------------------------- */

:root {
    --accent: #2E9B57;
    --accent-hover: #34b065;
    --accent-dark: #257a46;

    --radius: 8px;
    --topbar-height: 60px;
    --status-height: 36px;
    --sidebar-width: 240px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #14171a;
    --bg-elevated: #1b1f23;
    --bg-sidebar: #1b1f23;
    --bg-topbar: #1b1f23;
    --bg-hover: #23282d;

    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --border: #2a2f36;

    --status-paid-bg: rgba(46, 155, 87, 0.16);
    --status-paid-text: #4cc97f;
    --status-unpaid-bg: rgba(220, 38, 38, 0.16);
    --status-unpaid-text: #f87171;

    /* žlutá = RAL 1007 (#E88C00), červená = Cherry (#D2042D) */
    --stav-yellow-bg: rgba(232, 140, 0, 0.18);
    --stav-yellow-text: #e88c00;
    --stav-red-bg: rgba(210, 4, 45, 0.18);
    --stav-red-text: #d2042d;
    --stav-none-bg: var(--bg-elevated);
    --stav-none-text: var(--text-secondary);
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f7f5f0;
    --bg-elevated: #fffdfa;
    --bg-sidebar: #fffdfa;
    --bg-topbar: #fffdfa;
    --bg-hover: #f1ede5;

    --text-primary: #1f2933;
    --text-secondary: #6b7280;
    --border: #e5e0d5;

    --status-paid-bg: #e6f4ea;
    --status-paid-text: #1e7e42;
    --status-unpaid-bg: #fdecec;
    --status-unpaid-text: #c0392b;

    /* žlutá = RAL 1007 (#E88C00), červená = Cherry (#D2042D) */
    --stav-yellow-bg: rgba(232, 140, 0, 0.12);
    --stav-yellow-text: #e88c00;
    --stav-red-bg: rgba(210, 4, 45, 0.12);
    --stav-red-text: #d2042d;
    --stav-none-bg: #ffffff;
    --stav-none-text: var(--text-secondary);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    transition: background 0.15s ease, color 0.15s ease;
}

/* ---- Horní lišta ---- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 0;
}

.topbar-logo-wrap {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.topbar-logo {
    height: 34px;
    width: auto;
    flex-shrink: 0;
    display: none;
}

.topbar-logo-light {
    background: #ffffff;
    border-radius: 6px;
    padding: 3px 8px;
}

[data-theme="light"] .topbar-logo-light {
    display: block;
}

[data-theme="dark"] .topbar-logo-dark {
    display: block;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 0;
    justify-content: flex-end;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sos-btn {
    background: var(--stav-red-text);
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.5px;
    width: 32px;
    height: 26px;
    padding: 0;
    border-radius: 4px;
    text-decoration: none;
}

.sos-btn:hover {
    background: var(--stav-red-text);
    color: #fff;
    opacity: 0.85;
}

.video-wrap {
    margin-top: 12px;
}

.icon {
    width: 20px;
    height: 20px;
}

.icon-sun, .icon-moon {
    display: none;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.user-badge .icon {
    color: var(--text-secondary);
}

/* ---- Stavový pruh (zaplaceno / nezaplaceno) ---- */
.status-strip {
    height: var(--status-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.status-paid {
    background: var(--status-paid-bg);
    color: var(--status-paid-text);
}

.status-warning {
    background: var(--stav-yellow-bg);
    color: var(--stav-yellow-text);
}

.status-unpaid {
    background: var(--stav-red-bg);
    color: var(--stav-red-text);
}

/* ---- Oznámení o podezřelém přihlašování (hned po přihlášení admina) ---- */
.podezreni-banner {
    display: block;
    text-align: center;
    padding: 10px 16px;
    background: var(--stav-red-bg);
    color: var(--stav-red-text);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.podezreni-banner:hover {
    text-decoration: underline;
}

/* ---- Smazaný (deaktivovaný, ještě obnovitelný) uživatel ve Správě uživatelů ---- */
.radek-smazany {
    opacity: 0.5;
    filter: grayscale(1);
}

.radek-smazany:hover {
    opacity: 0.75;
}

.smazani-odpocet {
    font-size: 12px;
    white-space: nowrap;
}

/* ---- Layout: sidebar + obsah ---- */
.layout {
    display: flex;
    min-height: calc(100vh - var(--topbar-height) - var(--status-height));
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 20px 0;
}

.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    padding: 0 20px 18px 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--status-paid-bg);
    color: var(--accent);
    border-left-color: var(--accent);
}

/* ---- Hlavní obsah ---- */
.content {
    flex: 1;
    min-width: 0;
    padding: 32px;
}

.content h1 {
    margin-top: 0;
    font-size: 22px;
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 520px;
    line-height: 1.5;
}

/* ---- Hamburger tlačítko a podklad panelu (jen na mobilu) ---- */
.menu-toggle {
    display: none;
    margin-right: 6px;
}

.menu-toggle .icon {
    width: 24px;
    height: 24px;
}

.sidebar-backdrop {
    display: none;
}

/* ---------------------------------------------------------------------
   Responzivita - primárně cíleno na mobil
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
    .topbar {
        padding: 0 12px;
        padding-top: env(safe-area-inset-top);
        height: calc(var(--topbar-height) + env(safe-area-inset-top));
    }

    .menu-toggle {
        display: flex;
    }

    .page-title {
        display: none;
    }

    .topbar-left {
        flex: 0 0 auto;
    }

    .topbar-right {
        flex: 0 0 auto;
    }

    .topbar-logo {
        height: 28px;
    }

    .odkazy-sloupce {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .user-badge span {
        max-width: 38vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-badge {
        padding: 6px 8px;
    }

    .topbar-right {
        gap: 8px;
    }

    /* Sidebar se mění na vysouvací panel přes celou výšku obrazovky */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.35);
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 55;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s ease, visibility 0s linear 0.22s;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.22s ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .content {
        padding: 18px;
    }

    .content h1 {
        font-size: 19px;
    }
}

@media (max-width: 380px) {
    .user-badge span {
        display: none;
    }
}

/* ---------------------------------------------------------------------
   Tlačítka
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

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

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: transparent;
    color: var(--status-unpaid-text);
    border-color: var(--status-unpaid-text);
}

.btn-danger:hover {
    background: var(--status-unpaid-bg);
}

.btn-success {
    background: transparent;
    color: var(--status-paid-text);
    border-color: var(--status-paid-text);
}

.btn-success:hover {
    background: var(--status-paid-bg);
}

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

.btn:disabled:hover {
    background: var(--bg-elevated);
}

.btn-small {
    padding: 6px 10px;
    font-size: 13px;
}

.inline-form {
    display: inline;
}

/* ---------------------------------------------------------------------
   Formuláře
   --------------------------------------------------------------------- */
.form {
    max-width: 360px;
    display: flex;
    flex-direction: column;
}

.form-wide {
    max-width: 480px;
}

.form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 16px;
    margin-bottom: 6px;
}

.form label:first-of-type {
    margin-top: 0;
}

.form-section-label {
    margin-top: 24px !important;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.form input[type="text"],
.form input[type="password"],
.form input[type="email"],
.form input[type="number"],
.form input[type="date"],
.form input[type="month"],
.form input[type="time"],
.form input[type="tel"],
.form input[type="url"] {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color-scheme: inherit;
}

.form input:focus {
    outline: none;
    border-color: var(--accent);
}

.form input:disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.required-mark {
    color: var(--stav-red-text);
    font-weight: 700;
}

.form-error {
    background: var(--status-unpaid-bg);
    color: var(--status-unpaid-text);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin: 0 0 16px 0;
    max-width: 480px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
}

/* ---- Správa plateb - stažení výpisu ---- */
.platby-vypis-sekce {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
}

.platby-vypis-sekce select,
.platby-vypis-sekce input {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
}

.platby-vypis-obdobi {
    display: flex;
    gap: 12px;
}

.platby-vypis-obdobi > div {
    flex: 1;
}

/* ---- Toggle přepínače (přístup ano/ne k záložce) ---- */
.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 480px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    cursor: pointer;
}

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

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    transition: background 0.15s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* ---------------------------------------------------------------------
   Tabulka (Správa uživatelů)
   --------------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell > * {
    margin-right: 8px;
}

.actions-cell > *:last-child {
    margin-right: 0;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    background: var(--status-paid-bg);
    color: var(--status-paid-text);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.text-secondary {
    color: var(--text-secondary);
}

/* ---------------------------------------------------------------------
   Přihlašovací stránka
   --------------------------------------------------------------------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
}

.login-wrap {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.login-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 28px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.login-brand {
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.login-title {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.login-submit {
    width: 100%;
    margin-top: 24px;
}

/* ---------------------------------------------------------------------
   Vnořené (pod)záložky v sidebaru
   --------------------------------------------------------------------- */
.nav-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-subitem {
    padding-left: 44px;
    font-size: 13px;
}

.nav-subitem .icon {
    width: 16px;
    height: 16px;
}

/* ---- Hierarchie přepínačů (rodič / podzáložka) v admin formuláři ---- */
.toggle-row-sub {
    padding-left: 22px;
}

.toggle-row-sub span:first-child {
    color: var(--text-secondary);
    font-size: 13px;
}

.toggle-switch:has(input:disabled) {
    opacity: 0.4;
}

.form-hint {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 10px;
    max-width: 480px;
}

.form textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form select {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

.form select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ---------------------------------------------------------------------
   Platby
   --------------------------------------------------------------------- */
.platby-radek {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.platby-hodnota {
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
}

.priradit-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.priradit-form select {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 7px 8px;
    font-size: 13px;
    font-family: inherit;
}

.poznamka-form input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 6px 8px;
    font-size: 13px;
    font-family: inherit;
    width: 100%;
    min-width: 160px;
}

.poznamka-form input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ---------------------------------------------------------------------
   Stavy docházky (Dorazím? / Dorazím / Nevím / Nedorazím)
   --------------------------------------------------------------------- */
.stav-none {
    background: var(--stav-none-bg);
    color: var(--stav-none-text);
    border: 1px solid var(--border);
}

.stav-dorazim {
    background: var(--status-paid-bg);
    color: var(--status-paid-text);
    border: 1px solid transparent;
}

.stav-nevim {
    background: var(--stav-yellow-bg);
    color: var(--stav-yellow-text);
    border: 1px solid transparent;
}

.stav-nedorazim {
    background: var(--stav-red-bg);
    color: var(--stav-red-text);
    border: 1px solid transparent;
}

.badge-stav {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   Aprílový žertík na Schůzích (1.4.)
   --------------------------------------------------------------------- */
.april-zert {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 24px;
}

.april-tlacitko {
    font-size: 20px;
    padding: 20px 40px;
}

.april-zprava {
    color: var(--stav-red-text);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

/* ---------------------------------------------------------------------
   Záložka Schůze
   --------------------------------------------------------------------- */
.schuze-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 640px;
    margin-bottom: 28px;
}

.schuze-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 18px;
}

.schuze-termin-block {
    position: relative;
    flex: 1 1 200px;
}

.schuze-program-box {
    flex: 1 1 200px;
    min-width: 0;
}

.schuze-program-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.schuze-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.schuze-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.schuze-date-pill:hover {
    border-color: var(--accent);
}

.icon-small {
    width: 14px;
    height: 14px;
}

.schuze-termin-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.schuze-typ-badge {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.schuze-popis {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 8px 0 0 0;
}

.schuze-termin-list {
    display: none;
    flex-direction: column;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.schuze-termin-list.open {
    display: flex;
}

.schuze-termin-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.schuze-termin-option:last-child {
    border-bottom: none;
}

.schuze-termin-option:hover {
    background: var(--bg-hover);
}

.schuze-stav-form {
    margin-bottom: 14px;
}

.schuze-stav-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.schuze-cas-form-wrap {
    margin-bottom: 14px;
}

.schuze-cas-form {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.schuze-poznamka-field {
    display: flex;
    flex-direction: column;
}

.schuze-poznamka-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.schuze-poznamka-field input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 9px 10px;
    font-size: 14px;
    font-family: inherit;
}

.schuze-poznamka-field input:focus {
    outline: none;
    border-color: var(--accent);
}

.schuze-cas-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.schuze-cas-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cas-input {
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 9px 10px;
    font-size: 14px;
    font-family: inherit;
}

.cas-input:focus {
    outline: none;
    border-color: var(--accent);
}

.cas-select {
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 9px 10px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
}

.cas-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Nabídka v rozbaleném <select> (i u výběru času) - bez tohohle ji některé
   prohlížeče kreslí s bílým pozadím bez ohledu na motiv appky. */
.cas-select option,
.form select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Stránka Účast (zpětné zapsání účasti na proběhlé schůzi) - řádek radio
   voleb Byl/Nevím/Nebyl/Nezadáno u každého člena. */
.ucast-stav-volby {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px 14px;
}

.ucast-stav-volba {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.ucast-stav-volba input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent, #2f9e64);
    cursor: pointer;
    flex-shrink: 0;
}

/* Sloupce Od/Do mají krátké záhlaví ("Od"/"Do") a bez tohohle si o ně
   automatické rozvržení tabulky řeklo jen tolik místa, kolik potřebuje to
   krátké záhlaví - samotný <select> (šířka 100 %) se pak zobrazil jen pár
   pixelů široký a čas v něm nebyl vůbec vidět (hlavně na mobilu, kde není
   jinde v řádku "volné" místo navíc). Min-width to řeší bez ohledu na
   šířku obrazovky. */
.ucast-cas {
    min-width: 92px;
}

.schuze-plan-link {
    display: inline-block;
    margin-top: 4px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.schuze-plan-link:hover {
    text-decoration: underline;
}

/* .schuze-plan-link se občas použije i na <button> (např. "+ Přidat další
   dokument") - button má jinak defaultní prohlížečové pozadí/rámeček, který
   je potřeba shodit, ať vypadá stejně jako odkaz. */
button.schuze-plan-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    align-self: flex-start;
}

.schuze-table-heading {
    font-size: 16px;
    margin-bottom: 12px;
}

.odkazy-sloupce {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.odkazy-sloupec-nadpis {
    font-size: 16px;
    margin: 0 0 12px;
}

.odkazy-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.odkaz-karta {
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.odkaz-karta:hover {
    border-color: var(--accent);
}

.odkaz-nazev {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.odkaz-popis {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 6px;
}

.odkaz-url {
    color: var(--accent);
    font-size: 12px;
    word-break: break-all;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 40px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.password-toggle .icon-eye-off {
    display: none;
}

.password-toggle.is-showing .icon-eye {
    display: none;
}

.password-toggle.is-showing .icon-eye-off {
    display: block;
}

/* ---------------------------------------------------------------------
   Nástěnka
   --------------------------------------------------------------------- */
.nastenka-filtr {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 640px;
    margin-bottom: 20px;
}

.nastenka-filtr-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.badge-viditelnost {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.nastenka-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
}

.nastenka-karta {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.nastenka-pripnuta {
    border-color: var(--accent);
}

.nastenka-karta-hlavicka {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.nastenka-pin-badge {
    background: var(--stav-yellow-bg);
    color: var(--stav-yellow-text);
}

.nastenka-nazev {
    margin: 0 0 8px 0;
    font-size: 17px;
}

.nastenka-text {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.nastenka-potvrzeni {
    margin-top: 12px;
}

.nastenka-dokumenty-seznam {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.nastenka-meta {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 16px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Uvnitř .form je tohle jediný flex item, takže by se bez vlastního
   display:flex jeho vnitřní labely/inputy chovaly jako normální inline tok
   (a lepily by se na sebe) místo aby se pod sebou rozestoupily jako zbytek
   formuláře. */
.nastenka-dokument-sekce {
    display: flex;
    flex-direction: column;
}

/* Formulář "Naplánovat schůzi" - "Info k akci" sekce, ze stejného důvodu
   vlastní display:flex jako .nastenka-dokument-sekce výše. */
.schuze-akce-sekce {
    display: flex;
    flex-direction: column;
}

/* ---- Formulář "Něco připnout" - řádky s dokumenty ---- */
.dokumenty-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.dokument-radek {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dokument-radek select,
.dokument-radek input[type="text"] {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
}

.dokument-radek input[type="file"] {
    color: var(--text-primary);
    font-size: 13px;
}

.dokument-pole-url,
.dokument-pole-soubor {
    flex: 1;
    min-width: 160px;
}

/* ---- Účetnictví - řádky s položkami při zpracování/úpravě účtenky ---- */
.polozky-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.polozka-radek {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.polozka-radek select,
.polozka-radek input[type="text"] {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
}

.polozka-radek input[name="polozka_nazev"] {
    flex: 2;
    min-width: 160px;
}

.polozka-radek select[name="polozka_typ"] {
    flex: 2;
    min-width: 180px;
}

.polozka-radek input[name="polozka_castka"] {
    flex: 1;
    min-width: 110px;
}

/* ---- Účtenky - výběr souborů (Vyfotit/Galerie/Soubor) a seznam stávajících ---- */
.uctenka-soubory-tlacitka {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.uctenka-nove-soubory-seznam {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.uctenka-nove-soubory-seznam:empty {
    display: none;
}

/* Na PC vypadají "Vyfotit" a "Vybrat z galerie" zbytečně (fotoaparát/galerie
   telefonu tam nedávají smysl) - necháme jen "Vybrat soubor". Na mobilu
   (do 860px, stejný zlom jako zbytek layoutu) zůstávají všechny tři. */
@media (min-width: 861px) {
    .uctenka-soubory-tlacitka [data-vyber="foto"],
    .uctenka-soubory-tlacitka [data-vyber="galerie"] {
        display: none;
    }
}

.uctenka-existujici-soubory {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.uctenka-existujici-soubor {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* ---- Tabulka "Detail" (stav přečtení/seznámení po členech) ---- */
.nastenka-detail-table {
    margin: 4px 0;
}

/* ---------------------------------------------------------------------
   Modal (vyskakovací hláška)
   --------------------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.modal-typ {
    font-weight: 700;
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 10px;
}

/* ---------------------------------------------------------------------
   Členové - kopírování e-mailu, tel: odkaz
   --------------------------------------------------------------------- */
.email-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.copy-email-btn {
    padding: 4px;
}

.telefon-link {
    color: inherit;
    text-decoration: none;
}

.telefon-link:hover {
    text-decoration: underline;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 300;
    font-size: 14px;
}

/* ---- Formulář "Něco připnout" - řádky s možnostmi hlasování ---- */
.moznosti-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.moznost-radek {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.moznost-radek input[type="text"] {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    flex: 1;
    min-width: 160px;
}

/* ---- Nástěnka - hlasování ---- */
.nastenka-hlasovani {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hlasovani-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.hlasovani-tlacitka {
    display: flex;
    gap: 8px;
}

.hlasovani-moznost {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.hlasovani-moznost input[type="checkbox"],
.hlasovani-moznost input[type="radio"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent, #2f9e64);
    cursor: pointer;
    flex-shrink: 0;
}

.nastenka-detail-vysledky {
    margin-top: 4px;
}
