/* ============================================================
   SVJ — moderní design (2026)
   Glassmorphism, smooth animace, microinterakce
   ============================================================ */

:root {
    /* Barevná paleta — odvozena z barev panelového domu (teplá oranžová + krémová) */
    --color-primary: #e07a2c;          /* hlavní oranžová — fasáda */
    --color-primary-dark: #b45f1f;     /* tmavší — pro hover */
    --color-primary-light: #f4a261;    /* světlejší — pro akcenty */
    --color-accent: #c2410c;           /* terakota — kontrast */
    --color-accent-warm: #fb923c;      /* teplá oranžová */

    /* Pozadí — krémově béžová z fasády */
    --color-bg: #faf6f0;
    --color-bg-warm: #f5ede0;          /* teplejší varianta */
    --color-bg-gradient: linear-gradient(135deg, #faf6f0 0%, #fff8ee 50%, #fdf2e2 100%);
    --color-surface: #ffffff;
    --color-surface-warm: #fffaf3;
    --color-surface-elevated: rgba(255, 251, 245, 0.85);

    /* Text — teplá tmavá hnědá místo studené černé */
    --color-text: #2d1f14;
    --color-text-muted: #78604a;
    --color-border: #eadccb;
    --color-border-light: rgba(234, 220, 203, 0.5);

    --color-success: #5a8d3a;          /* zelená sladěná s teplou paletou */
    --color-warning: #d97706;
    --color-danger: #c53030;           /* červená laděná do teplé */
    --color-info: #0e7490;

    /* Gradienty — odstíny fasády */
    --gradient-primary: linear-gradient(135deg, #e07a2c 0%, #d96d3a 50%, #c2410c 100%);
    --gradient-primary-soft: linear-gradient(135deg, #e07a2c 0%, #b45f1f 100%);
    --gradient-warm: linear-gradient(135deg, #fbbf24 0%, #e07a2c 50%, #c2410c 100%);
    --gradient-success: linear-gradient(135deg, #5a8d3a 0%, #4a7530 100%);
    --gradient-danger: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);

    /* Stíny — teplá hnědá místo studené šedé */
    --shadow-xs: 0 1px 2px rgba(45, 31, 20, 0.04);
    --shadow-sm: 0 1px 3px rgba(45, 31, 20, 0.07), 0 1px 2px rgba(45, 31, 20, 0.04);
    --shadow: 0 4px 6px -1px rgba(45, 31, 20, 0.08), 0 2px 4px -2px rgba(45, 31, 20, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(45, 31, 20, 0.1), 0 4px 6px -4px rgba(45, 31, 20, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(45, 31, 20, 0.12), 0 8px 10px -6px rgba(45, 31, 20, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(45, 31, 20, 0.18);
    --shadow-glow: 0 0 0 1px rgba(224, 122, 44, 0.12), 0 4px 16px rgba(224, 122, 44, 0.2);
    --shadow-glow-strong: 0 0 0 2px rgba(224, 122, 44, 0.18), 0 8px 24px rgba(224, 122, 44, 0.32);

    /* Border radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Fonts */
    --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    /* Layout */
    --container-max: 1600px;
    --container-padding: clamp(1rem, 3vw, 2.5rem);

    /* Přechody */
    --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Inter font (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(224, 122, 44, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(251, 146, 60, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(194, 65, 12, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animované pozadí blob — odstíny fasády */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224, 122, 44, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}
body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container-narrow { max-width: 760px; }

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Hlavička — glass effect
   ============================================================ */
.site-header {
    background: rgba(255, 251, 245, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(234, 220, 203, 0.4);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--t-base);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--container-padding);
    gap: 1rem;
    max-width: var(--container-max);
    margin: 0 auto;
}

.logo {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity var(--t-fast);
}
.logo:hover { opacity: 0.85; }

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

/* CTA tlačítka v nav menu mají větší odstup od textových odkazů */
.main-nav .nav-cta {
    margin-left: 0.875rem;
}
.main-nav .nav-cta + li {
    margin-left: 0.375rem;
}

.main-nav a {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    transition: all var(--t-fast);
    display: inline-block;
    min-height: 44px;
    line-height: 1.5;
    font-weight: 500;
    font-size: 0.925rem;
    position: relative;
}

.main-nav a:hover,
.main-nav a:focus {
    background: rgba(224, 122, 44, 0.1);
    color: var(--color-primary-dark);
}

.main-nav a.active {
    color: var(--color-primary-dark);
    background: rgba(224, 122, 44, 0.12);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.625rem;
    flex-direction: column;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: background var(--t-fast);
}
.nav-toggle:hover { background: rgba(224, 122, 44, 0.1); }
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--t-base);
    border-radius: 2px;
}

/* ============================================================
   Tlačítka — moderní s hover lift
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-base);
    font-family: inherit;
    min-height: 44px;
    line-height: 1.4;
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

/* Subtle shine effect on hover */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 600ms ease;
}
.btn:hover::before { left: 100%; }

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
    transition-duration: 75ms;
}

.btn-primary {
    background: var(--gradient-primary-soft);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    color: #fff;
    box-shadow: var(--shadow-glow-strong);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-primary-dark);
    border-color: var(--color-border);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: rgba(224, 122, 44, 0.06);
}

.btn-danger {
    background: var(--gradient-danger);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(197, 48, 48, 0.1), 0 4px 12px rgba(197, 48, 48, 0.2);
}
.btn-danger:hover {
    color: #fff;
    box-shadow: 0 0 0 2px rgba(197, 48, 48, 0.15), 0 8px 20px rgba(197, 48, 48, 0.3);
}

.btn-sm {
    padding: 0.45rem 0.875rem;
    font-size: 0.825rem;
    min-height: 36px;
}

/* ============================================================
   Typografie
   ============================================================ */
h1, h2, h3, h4 {
    color: var(--color-text);
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    font-weight: 700;
}
h1 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin-top: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

a {
    color: var(--color-primary);
    transition: color var(--t-fast);
}
a:hover { color: var(--color-primary-dark); }

main { padding: 2rem 0 4rem; animation: fadeInUp 400ms ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Hero — moderní gradient s noise texturou
   ============================================================ */
.hero {
    /* Tmavší gradient pro lepší kontrast bílého textu */
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 50%, #7c2d12 100%);
    color: #fffaf3;
    padding: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 4vw, 3rem);
    border-radius: var(--radius-xl);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(244, 162, 97, 0.15) 0%, transparent 55%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' /%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.4' /%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
    color: #fffaf3;
    font-size: clamp(1.875rem, 5vw, 3.25rem);
    margin-top: 0;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.hero p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: #fff8ee;
    opacity: 1;
    max-width: 720px;
    margin: 1rem auto 2rem;
    font-weight: 400;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}
.hero p strong {
    color: #fff;
    font-weight: 600;
}
.hero .actions .btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    backdrop-filter: blur(10px);
}
.hero .actions .btn-primary:hover {
    background: #fff;
    color: var(--color-primary-dark);
}
.hero .actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}
.hero .actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Grid a karty — glassmorphism
   ============================================================ */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Tlačítko v kartě je ukotvené k levému spodnímu rohu */
.card > .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Subtle gradient overlay on top edge */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--t-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(224, 122, 44, 0.25);
}
.card:hover::before { opacity: 1; }

.card h3 {
    margin-top: 0;
    color: var(--color-text);
    font-size: 1.125rem;
}
.card .meta {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: var(--color-bg);
    color: var(--color-text-muted);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.5;
}
.badge-primary {
    background: rgba(224, 122, 44, 0.12);
    color: var(--color-primary-dark);
}
.badge-warning {
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
}
.badge-danger {
    background: rgba(197, 48, 48, 0.12);
    color: var(--color-danger);
}
.badge-success {
    background: rgba(90, 141, 58, 0.12);
    color: var(--color-success);
}
.badge-info {
    background: rgba(56, 119, 188, 0.12);
    color: #2c5d96;
}

/* ============================================================
   Formuláře
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.form-group .required { color: var(--color-danger); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-surface);
    transition: all var(--t-fast);
    min-height: 44px;
    color: var(--color-text);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="datetime-local"]:hover,
input[type="file"]:hover,
select:hover,
textarea:hover {
    border-color: #cbd5e1;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(224, 122, 44, 0.15);
}

/* Checkboxy a radio — větší, klikatelné, oranžové */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
    vertical-align: middle;
}

textarea { resize: vertical; min-height: 120px; }

.form-help {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.form-wrap {
    background: var(--color-surface);
    padding: clamp(1.75rem, 3.5vw, 3rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-width: 640px;
    margin: 2rem auto;
    position: relative;
}

/* Užší varianta pro malé formuláře (login, zapomenuté heslo) */
.form-wrap.form-wrap-sm {
    max-width: 460px;
}

/* Široká varianta — formulář v plné šířce obsahu (kontakt, hromadné akce) */
.form-wrap.form-wrap-wide {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Subtle gradient top border for form-wrap */
.form-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius);
    opacity: 0.6;
}

/* ============================================================
   Flash zprávy — moderní toast styl
   ============================================================ */
.flash-zone {
    margin-bottom: 1.5rem;
    animation: slideInDown 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.flash-success {
    background: rgba(220, 245, 200, 0.92);
    border-color: var(--color-success);
    color: #2d5016;
}
.flash-error {
    background: rgba(254, 222, 222, 0.92);
    border-color: var(--color-danger);
    color: #7c1d1d;
}
.flash-info {
    background: rgba(207, 232, 240, 0.92);
    border-color: var(--color-info);
    color: #134e5e;
}
.flash-warning {
    background: rgba(254, 235, 200, 0.92);
    border-color: var(--color-warning);
    color: #7c2d12;
}

/* ============================================================
   Tabulky — moderní s hover efekty
   ============================================================ */
.table-wrap {
    overflow-x: auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}
th, td {
    padding: 0.875rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}
th {
    background: rgba(250, 246, 240, 0.6);
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
tr { transition: background var(--t-fast); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(224, 122, 44, 0.04); }

/* Poslední sloupec (akce) */
td.actions {
    display: table-cell;
    text-align: right;
    white-space: nowrap;
    width: 1%;
}
td.actions .btn,
td.actions a.btn {
    margin-left: 0.375rem;
    vertical-align: middle;
}
td.actions > *:first-child { margin-left: 0; }

/* Varianta: první tlačítko (Upravit) vlevo, druhé (Deaktivovat/Aktivovat) vpravo.
   Zachová zarovnání napříč řádky i tehdy, když má řádek jen jedno tlačítko
   (druhý slot je <span> placeholder, který flex roztáhne mezi prvek vlevo
   a okraj buňky vpravo). */
td.actions-split {
    /* Ne flex přímo na <td> — rozbíjelo by table layout (zubaté borders, když má
       jiná buňka v řádku větší výšku). Místo toho je <td> normální table-cell
       a flex je na vnitřním wrapperu nebo přímo na inline-flex obsahu. */
    text-align: right;
    white-space: nowrap;
    width: 1%;
    vertical-align: middle;
}
td.actions-split > * {
    margin-left: 0.375rem;
    vertical-align: middle;
}
td.actions-split > *:first-child {
    margin-left: 0;
}

/* ============================================================
   Seznam dokumentů
   ============================================================ */
.doc-list { list-style: none; padding: 0; }
.doc-list li {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}
.doc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform var(--t-base);
    transform-origin: center;
}
.doc-list li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(224, 122, 44, 0.25);
}
.doc-list li:hover::before { transform: scaleY(1); }

.doc-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fde7d3 0%, #f4a261 100%);
    color: #7c2d12;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}
.doc-info { flex: 1; min-width: 200px; }
.doc-info strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}
.doc-info .meta { font-size: 0.85rem; color: var(--color-text-muted); }
.doc-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ============================================================
   Aktuality
   ============================================================ */
.article-list article {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    transition: all var(--t-base);
}
.article-list article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(224, 122, 44, 0.25);
}
.article-list article h3 {
    margin-top: 0;
    font-size: 1.25rem;
}
.article-list article h3 a {
    text-decoration: none;
    color: var(--color-text);
    transition: color var(--t-fast);
}
.article-list article h3 a:hover {
    color: var(--color-primary);
}
.article-meta {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* ============================================================
   Patička
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, #2d1f14 0%, #3d2818 100%);
    color: #e8dcc7;
    padding: 4rem 0 1.5rem;
    margin-top: 6rem;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(244, 162, 97, 0.5), transparent);
}
.site-footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(224, 122, 44, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.site-footer h3 {
    color: #fff;
    margin-top: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 1rem;
}
.site-footer a {
    color: #f4a261;
    transition: color var(--t-fast);
    text-decoration: none;
}
.site-footer a:hover { color: #fff; }

.footer-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-havarie { list-style: none; padding: 0; margin: 0; }
.footer-havarie li { margin-bottom: 0.5rem; line-height: 1.5; }
.footer-havarie a { color: inherit; text-decoration: none; }
.footer-havarie a:hover { text-decoration: underline; }

/* Karty vyúčtování — rozpad nákladů */
.vyuct-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1rem;
}
.vyuct-card {
    background: #fff;
    border: 1px solid #eadccb;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.vyuct-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180, 95, 31, 0.08);
}
.vyuct-ikona  { font-size: 2rem; line-height: 1; }
.vyuct-nazev  { font-size: 0.85rem; color: #78604a; margin: .5rem 0 .25rem 0; text-transform: uppercase; letter-spacing: .03em; }
.vyuct-hodnota { font-size: 1.4rem; font-weight: 700; color: #2d1f14; }
.vyuct-detail { font-size: .8rem; color: #888; margin-top: .35rem; line-height: 1.4; }
/* Grafy: 2 sloupce na desktopu, 1 na mobilu */
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
}
/* Grafy: 3 sloupce na desktopu, 1 na tabletu i mobilu (pod sebou pro čitelnost) */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 992px) {
    .grid-3 { grid-template-columns: 1fr; }
}
/* Pevná výška boxu pro grafy, aby Chart.js měl kam vykreslit (`maintainAspectRatio: false`) */
.grid-2 > .card canvas,
.grid-3 > .card canvas { max-height: 280px; }

/* Mini grafy sazeb — 4 vedle sebe na desktopu, 2x2 na tabletu, 1 na mobilu */
.sazby-mini-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 992px) { .sazby-mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .sazby-mini-grid { grid-template-columns: 1fr; } }
.sazby-mini {
    background: #faf6f0;
    border: 1px solid #eadccb;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}
.sazby-mini-titulek {
    font-weight: 600;
    color: #2d1f14;
    font-size: 0.9rem;
}
.sazby-mini-jednotka {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.sazby-mini canvas { max-height: 160px; }

/* Přepínač roků — segmented control nahoře nad detailem vyúčtování */
.rok-prepinac {
    display: inline-flex;
    gap: 0;
    background: #faf6f0;
    border: 1px solid #eadccb;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 1rem;
}
.rok-prepinac-btn {
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #78604a;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
}
.rok-prepinac-btn:hover {
    background: #fff;
    color: #2d1f14;
}
.rok-prepinac-btn.is-aktivni {
    background: #b45f1f;
    color: #fff;
}
.rok-prepinac-btn.is-aktivni:hover {
    background: #9c4f15;
    color: #fff;
}

/* FAQ — rozbalitelné položky <details>/<summary> */
.faq-item {
    background: #fff;
    border: 1px solid #eadccb;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0.6rem;
    transition: box-shadow 0.15s ease;
}
.faq-item:hover {
    box-shadow: 0 2px 6px rgba(180, 95, 31, 0.06);
}
.faq-item[open] {
    box-shadow: 0 2px 8px rgba(180, 95, 31, 0.10);
}
.faq-item > summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #2d1f14;
    list-style: none;
    position: relative;
    padding-right: 2.5rem;
    user-select: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
    content: "+";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: #b45f1f;
    transition: transform 0.2s ease;
    font-weight: 400;
}
.faq-item[open] > summary::after {
    content: "−";
}
.faq-item > p,
.faq-item > ul,
.faq-item > ol {
    padding: 0 1.25rem 1rem;
    margin: 0;
    color: #4a3a2a;
    line-height: 1.6;
}
.faq-item > ul,
.faq-item > ol {
    padding-left: 2.5rem;
    padding-right: 1.25rem;
}
.faq-item a {
    color: #b45f1f;
}

/* Kalendář — karty událostí */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.event-card {
    background: #fff;
    border: 1px solid #eadccb;
    border-radius: 12px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.25rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.event-card:hover {
    box-shadow: 0 4px 12px rgba(180, 95, 31, 0.10);
    transform: translateY(-1px);
}
/* "Trhací kalendář" — odsazený box s datem */
.event-date {
    background: linear-gradient(135deg, #b45f1f, #d97534);
    color: #fff;
    border-radius: 10px;
    text-align: center;
    padding: 0.6rem 0.4rem;
    align-self: start;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.event-date-den {
    font-size: 1.9rem;
    font-weight: 700;
}
.event-date-mesic {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
    opacity: 0.95;
}
.event-date-rok {
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}
.event-body {
    min-width: 0; /* aby long words v event-popis wrapovaly v gridu */
}
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.event-title {
    margin: 0;
    font-size: 1.2rem;
    color: #2d1f14;
}
.event-meta {
    color: #78604a;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.event-popis {
    color: #4a3a2a;
    line-height: 1.55;
    white-space: pre-line; /* zachovat newlines z DB textu */
    word-wrap: break-word;
}

/* Strukturované bloky popisu */
.event-odstavec {
    color: #4a3a2a;
    line-height: 1.55;
    margin: 0 0 0.75rem 0;
}
.event-odstavec:last-child { margin-bottom: 0; }

.event-nadpis {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #78604a;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eadccb;
}
.event-nadpis:first-child { margin-top: 0; }

.event-varovani {
    background: #fff4e0;
    border-left: 3px solid #d97534;
    padding: 0.6rem 0.85rem;
    border-radius: 4px;
    margin: 0.5rem 0 0.75rem 0;
    color: #5c3210;
    font-size: 0.93rem;
}

/* Harmonogram po dnech — kompaktní tabulka */
.event-harmonogram,
.event-prehled-bytu {
    width: 100%;
    margin: 0.5rem 0 1rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.event-harmonogram td,
.event-prehled-bytu td,
.event-prehled-bytu th {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #f0e6d6;
    vertical-align: top;
}
.event-harmonogram tr:last-child td,
.event-prehled-bytu tr:last-child td {
    border-bottom: none;
}
.event-harmonogram-datum {
    font-weight: 600;
    color: #2d1f14;
    white-space: nowrap;
    width: 1%;
}
.event-harmonogram-den {
    color: #78604a;
    white-space: nowrap;
    width: 1%;
}
.event-harmonogram-obsah {
    color: #4a3a2a;
}
.event-prehled-bytu thead th {
    background: #faf6f0;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #78604a;
    font-weight: 600;
}
.event-prehled-bytu-bytu {
    font-weight: 600;
    color: #2d1f14;
}
.event-prehled-bytu-datum {
    color: #4a3a2a;
    white-space: nowrap;
}

/* "Zobrazit více" — rozbalitelná část popisu */
.event-rozbalit {
    margin-top: 0.5rem;
}
.event-rozbalit > summary {
    cursor: pointer;
    color: #b45f1f;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    list-style: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.event-rozbalit > summary::-webkit-details-marker { display: none; }
.event-rozbalit > summary::before {
    content: "▸";
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}
.event-rozbalit[open] > summary::before {
    transform: rotate(90deg);
}
.event-rozbalit[open] > summary::after {
    content: "Zobrazit méně";
}
.event-rozbalit > summary { font-size: 0; }
.event-rozbalit > summary::before { font-size: 0.8rem; }
.event-rozbalit > summary::after {
    content: "Zobrazit více";
    font-size: 0.9rem;
    margin-left: 0.35rem;
}
.event-rozbalit[open] > summary::after { content: "Zobrazit méně"; }
.event-rozbalit > .event-popis {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #eadccb;
}

@media (max-width: 560px) {
    .event-card {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    .event-date-den { font-size: 1.5rem; }
    .event-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
.footer-bottom {
    border-top: 1px solid rgba(244, 162, 97, 0.12);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.825rem;
    color: #a89380;
    position: relative;
    z-index: 1;
}

/* ============================================================
   Členská / Admin sekce — dashboard
   ============================================================ */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--t-base);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(224, 122, 44, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--t-base);
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(224, 122, 44, 0.25);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-value {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}
.stat-card .stat-label {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Klikatelná statistická karta */
a.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
a.stat-card-link:hover {
    text-decoration: none;
    color: inherit;
}
a.stat-card-link:hover .stat-label {
    color: var(--color-primary-dark);
}

/* Sub-navigace (členská sekce) */
.sub-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 0.375rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.sub-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.925rem;
    font-weight: 500;
    transition: all var(--t-fast);
    min-height: 40px;
}
.sub-nav-link:hover {
    background: rgba(224, 122, 44, 0.08);
    color: var(--color-primary-dark);
}
.sub-nav-link.active {
    background: var(--gradient-primary-soft);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.sub-nav-link.active:hover { color: #fff; }
.sub-nav-admin {
    margin-left: auto;
    border: 1px dashed var(--color-border);
}

/* Editace uživatele — dvousloupcový layout (formulář + boční info) */
.user-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .user-edit-layout {
        grid-template-columns: 1fr;
    }
}

/* Admin layout */
.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.admin-content { min-width: 0; }

.admin-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    align-self: start;
    position: sticky;
    top: 5rem;
    box-shadow: var(--shadow-sm);
}
.admin-sidebar h4 {
    margin: 1rem 0 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    font-weight: 700;
}
.admin-sidebar h4:first-child { margin-top: 0; }
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar a {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius);
    min-height: 40px;
    line-height: 1.3;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--t-fast);
    margin-bottom: 2px;
}
.admin-sidebar a:hover {
    background: rgba(224, 122, 44, 0.08);
    color: var(--color-primary-dark);
}
.admin-sidebar a.active {
    background: var(--gradient-primary-soft);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.admin-sidebar hr {
    border: 0;
    border-top: 1px solid var(--color-border-light);
    margin: 1rem 0;
}

/* ============================================================
   Pomocné třídy
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none; }
.actions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Code styling */
code {
    background: rgba(224, 122, 44, 0.1);
    color: var(--color-primary-dark);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* ============================================================
   Loading skeleton (pro budoucí použití)
   ============================================================ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

/* ============================================================
   Scroll bar
   ============================================================ */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(224, 122, 44, 0.25);
    border-radius: 6px;
    border: 3px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(224, 122, 44, 0.5); }

/* Selection */
::selection {
    background: rgba(224, 122, 44, 0.25);
    color: var(--color-text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .admin-sidebar { position: static; }
}

/* ============================================================
   Bottom navigation (mobil only) — pevná spodní lišta v členské sekci.
   Skrytá na desktopu, aktivuje se přes @media (max-width: 768px) níž.
   ============================================================ */
.bottom-nav { display: none; }

/* Mobilní hlavní menu — skryté na desktopu, aktivní jen pod 768px */
.mobile-nav { display: none; }

/* Admin sidebar — bottom-sheet toggle pro mobil */
.admin-sidebar-toggle {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    align-items: center;
    justify-content: space-between;
}
.admin-sidebar-toggle::after {
    content: '▾';
    color: var(--color-primary);
}
.admin-sidebar-toggle[aria-expanded="true"]::after {
    content: '▴';
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    main { padding: 1rem 0 3rem; }

    .nav-toggle { display: flex; }
    .header-inner { flex-wrap: wrap; }

    /* Desktop .main-nav skryjeme na mobilu — používáme samostatný .mobile-nav blok níž */
    .main-nav { display: none; }

    /* Mobilní menu — samostatný blok v document flow MEZI header a main.
       Žádné position: absolute / fixed, žádné z-index hádky. Když se otevře,
       fyzicky odsune obsah pod sebou dolů. */
    .mobile-nav {
        display: block;
        background: #fffbf5;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--t-slow) ease;
    }
    .mobile-nav.open { max-height: 80vh; overflow-y: auto; }
    .mobile-nav ul {
        list-style: none;
        margin: 0;
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .mobile-nav a {
        display: block;
        padding: 0.875rem 1rem;
        color: var(--color-text);
        text-decoration: none;
        border-radius: var(--radius);
        font-weight: 500;
    }
    .mobile-nav a:hover,
    .mobile-nav a.active {
        background: rgba(224, 122, 44, 0.1);
        color: var(--color-primary-dark);
    }
    .mobile-nav .nav-cta { margin-top: 0.5rem; }
    .mobile-nav .nav-cta a {
        text-align: center;
        background: var(--gradient-primary);
        color: #fff;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.75rem;
        align-items: stretch;
    }
    .main-nav a {
        display: block;
        padding: 0.875rem 1rem;
    }
    .main-nav .nav-cta { margin-top: 0.5rem; }

    .hero {
        padding: 2.5rem 1.5rem;
        margin-bottom: 2rem;
    }

    .grid, .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card, .stat-card { padding: 1.5rem; }

    .table-wrap {
        margin: 0 calc(-1 * var(--container-padding));
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .form-wrap { max-width: none; }
    .form-wrap button[type="submit"] { width: 100%; }

    .site-footer {
        padding: 2.5rem 0 1rem;
        margin-top: 3rem;
    }

    .doc-list li {
        flex-direction: column;
        align-items: flex-start;
    }
    .doc-list li .doc-actions { width: 100%; }
    .doc-list li .doc-actions .btn { flex: 1; }

    /* Členská sekce: skrýt desktop horní sub-nav, ukázat mobilní bottom-nav. */
    .sub-nav { display: none; }
    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 251, 245, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -4px 12px rgba(45, 31, 20, 0.08);
        z-index: 90;
        padding: 0.375rem 0.5rem calc(0.375rem + env(safe-area-inset-bottom, 0));
        gap: 0.25rem;
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.25rem;
        color: var(--color-text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 500;
        border-radius: var(--radius);
        gap: 0.15rem;
        line-height: 1.1;
        text-align: center;
        min-height: 52px;
    }
    .bottom-nav-icon {
        font-size: 1.35rem;
        line-height: 1;
    }
    .bottom-nav-label {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .bottom-nav-item.active {
        color: var(--color-primary-dark);
        background: rgba(224, 122, 44, 0.1);
    }
    .bottom-nav-item:hover {
        color: var(--color-primary-dark);
    }
    /* Když je bottom-nav vidět, posunout zbytek obsahu nahoru, ať nebrání čtení. */
    body:has(.bottom-nav) main { padding-bottom: 5rem; }

    /* Header na mobilu — nesticky, ať uvolní místo na obsah */
    .site-header { position: static; }

    /* Admin sidebar → bottom-sheet */
    .admin-sidebar-toggle { display: flex; }
    .admin-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 75vh;
        overflow-y: auto;
        z-index: 95;
        transform: translateY(100%);
        transition: transform var(--t-fast);
        margin: 0;
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0));
        box-shadow: 0 -8px 24px rgba(45, 31, 20, 0.18);
    }
    .admin-sidebar.open { transform: translateY(0); }
    .admin-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 94;
    }
    .admin-sidebar-backdrop.open { display: block; }

    /* Tabulky → karty na mobilu (volitelně přes class .table-responsive-cards) */
    .table-responsive-cards thead { display: none; }
    .table-responsive-cards,
    .table-responsive-cards tbody,
    .table-responsive-cards tr,
    .table-responsive-cards td {
        display: block;
        width: 100%;
    }
    .table-responsive-cards tr {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        margin-bottom: 0.75rem;
        padding: 0.75rem 1rem;
        box-shadow: var(--shadow-sm);
    }
    .table-responsive-cards td {
        padding: 0.4rem 0;
        border: 0;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .table-responsive-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        padding-top: 0.15rem;
    }
    .table-responsive-cards td:not([data-label])::before { display: none; }
    .table-responsive-cards td {
        white-space: normal;
    }
    /* Tabulka v kartě nemá horizontální scroll wrapper */
    .table-responsive-cards-wrap { overflow-x: visible; border: 0; background: transparent; box-shadow: none; }
}

@media (max-width: 480px) {
    :root { --container-padding: 1rem; }
    .hero { padding: 2rem 1rem; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::before, body::after { animation: none; }
}

/* Print */
@media print {
    .site-header, .site-footer, .nav-toggle, .admin-sidebar, .btn, .actions {
        display: none !important;
    }
    body {
        background: white;
        background-image: none;
    }
    body::before, body::after { display: none; }
    .container { max-width: none; padding: 0; }
}
