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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
}

/* NAV */
nav {
    background: #1a1a2e;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.logo { color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 700; }
nav .btn { margin: 0; }

.nav-tabs { display: flex; gap: .25rem; }
.nav-tab {
    color: rgba(255,255,255,.65); text-decoration: none;
    padding: .35rem .85rem; border-radius: 6px;
    font-size: .88rem; font-weight: 600; transition: background .15s, color .15s;
}
.nav-tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-tab.active { background: rgba(255,255,255,.15); color: #fff; }

/* MAIN */
main { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }

/* FLASH */
.flash { padding: .8rem 1.2rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 500; }
.flash-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.flash-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

/* DASHBOARD HEADER */
.dashboard-header { margin-bottom: 1.5rem; }
.dashboard-header h1 { font-size: 1.6rem; margin-bottom: .8rem; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat { padding: .4rem .9rem; border-radius: 20px; font-size: .9rem; font-weight: 600; }
.stat-ok       { background: #d1fae5; color: #065f46; }
.stat-brzy     { background: #fef3c7; color: #92400e; }
.stat-kriticky { background: #fee2e2; color: #991b1b; }
.stat-prosle   { background: #f3f4f6; color: #6b7280; }

/* SEARCH */
.search-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.search-bar input { padding: .5rem .9rem; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: .95rem; width: 280px; outline: none; }
.search-bar input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
#hledej-pocet { font-size: .85rem; color: #6b7280; }

/* TABLE */
.table-wrap { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; text-align: left; padding: .75rem 1rem; font-size: .8rem;
     text-transform: uppercase; letter-spacing: .05em; color: #64748b; border-bottom: 1px solid #e2e8f0; }
td { padding: .75rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
td small { color: #94a3b8; font-size: .8rem; margin-left: .3rem; }
tr:last-child td { border-bottom: none; }

/* Row colors */
.row-brzy     td { background: #fffbeb; }
.row-kriticky td { background: #fff5f5; }
.row-proslé   td { background: #f3f4f6; color: #6b7280; }

/* BADGE */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 12px; font-size: .78rem; font-weight: 600; }
.badge-ok       { background: #d1fae5; color: #065f46; }
.badge-brzy     { background: #fef3c7; color: #92400e; }
.badge-kriticky { background: #fee2e2; color: #991b1b; }
.badge-proslé   { background: #e5e7eb; color: #6b7280; }

/* AKCE */
.akce { display: flex; gap: .4rem; align-items: center; }

/* BUTTONS */
.btn {
    display: inline-block; padding: .45rem .9rem; border-radius: 6px;
    font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: none;
    border: none; transition: background .15s;
}
.btn-primary  { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-outline  { background: transparent; color: #4f46e5; border: 1.5px solid #4f46e5; }
.btn-outline:hover { background: #eef2ff; }
.btn-danger   { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-small    { padding: .3rem .65rem; font-size: .8rem; }

/* EMPTY */
.empty { text-align: center; padding: 4rem 1rem; color: #94a3b8; }
.empty a { color: #4f46e5; }

/* FORM */
.form-wrap { background: #fff; border-radius: 10px; padding: 2rem; max-width: 560px;
             box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.form-wrap h1 { margin-bottom: 1.5rem; font-size: 1.4rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: #374151; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: .55rem .75rem; border: 1.5px solid #d1d5db;
    border-radius: 6px; font-size: .95rem; font-family: inherit;
    transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: #4f46e5; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }

@media (max-width: 700px) {
    .stats { flex-direction: column; }
    .table-wrap { overflow-x: auto; }
    .akce { flex-wrap: wrap; }
}

/* TP ikonky */
.tp-akce { display: flex; gap: .35rem; align-items: center; flex-wrap: nowrap; }

.btn-tp-pdf, .btn-tp-upload {
    display: inline-flex; align-items: center; gap: .28rem;
    padding: .22rem .55rem; border-radius: 5px;
    font-size: .75rem; font-weight: 600; text-decoration: none;
    white-space: nowrap; border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}

.btn-tp-pdf {
    background: #fee2e2; color: #b91c1c; border-color: #fca5a5;
}
.btn-tp-pdf:hover { background: #fecaca; border-color: #f87171; }

.btn-tp-upload {
    background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
.btn-tp-upload:hover { background: #dbeafe; border-color: #93c5fd; }

/* NAV vpravo */
.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-user { color: rgba(255,255,255,.65); text-decoration: none; font-size: .85rem; }
.nav-user:hover { color: #fff; }

.napoveda { display: block; color: #64748b; font-size: .82rem; margin-top: .3rem; }

/* ROZCESTNÍK */
.sekce-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.sekce {
    display: flex; flex-direction: column; gap: .5rem;
    background: #fff; border-radius: 12px; padding: 1.4rem 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); text-decoration: none; color: inherit;
    border-left: 6px solid #4f46e5; transition: transform .1s, box-shadow .1s;
}
a.sekce:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.sekce-nazev { font-size: 1.2rem; font-weight: 700; }
.sekce-stav { font-size: .92rem; color: #475569; }
.sekce-ok { border-left-color: #10b981; }
.sekce-pozor { border-left-color: #f59e0b; }
.sekce-pripravujeme { border-left-color: #cbd5e1; background: #f8fafc; color: #64748b; }

/* ROLE */
.badge-role-admin  { background: #ede9fe; color: #5b21b6; }
.badge-role-servis { background: #dbeafe; color: #1e40af; }
.badge-role-ridic  { background: #f1f5f9; color: #334155; }

/* MOBIL: navigace se zalomí */
@media (max-width: 700px) {
    nav { height: auto; flex-wrap: wrap; gap: .5rem; padding: .6rem 1rem; }
    .nav-tabs { order: 3; width: 100%; overflow-x: auto; }
    main { margin: 1rem auto; }
    .form-wrap { padding: 1.25rem; }
}

/* ── VOZIDLA: dlaždice ─────────────────────────────────────── */
.filtr { font-size: .9rem; color: #374151; display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.auta-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.auto {
    display: flex; flex-direction: column; background: #fff; border-radius: 12px;
    padding: 1rem 1.1rem; text-decoration: none; color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); border-top: 6px solid #10b981;
    transition: transform .1s, box-shadow .1s; min-height: 170px;
}
.auto:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.auto-zelena   { border-top-color: #10b981; }
.auto-oranzova { border-top-color: #f59e0b; }
.auto-cervena  { border-top-color: #ef4444; background: #fff8f8; }
.auto-hlava { display: flex; justify-content: space-between; align-items: center; }
.auto-spz { font-size: 1.3rem; font-weight: 800; letter-spacing: .03em; }
.auto-pocet {
    background: #ef4444; color: #fff; border-radius: 999px; min-width: 1.7rem; height: 1.7rem;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
}
.auto-oranzova .auto-pocet { background: #f59e0b; }
.auto-nazev { color: #64748b; font-size: .85rem; margin-bottom: .6rem; }
.auto-telo { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.auto-zavada { display: flex; align-items: center; gap: .45rem; font-size: .9rem; }
.auto-zavada-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-vic { font-size: .82rem; color: #64748b; }
.auto-ok { color: #059669; font-weight: 600; font-size: .92rem; }
.auto-pata { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.tecka { width: .65rem; height: .65rem; border-radius: 50%; flex: none; }
.tecka-nejede { background: #ef4444; }
.tecka-omezene { background: #f59e0b; }
.tecka-lze_jezdit { background: #94a3b8; }
.mini { font-size: .75rem; padding: .12rem .5rem; border-radius: 999px; background: #f1f5f9; color: #475569; font-weight: 600; white-space: nowrap; }
.mini-brzy, .mini-kriticky { background: #fef3c7; color: #92400e; }
.mini-proslé { background: #fee2e2; color: #991b1b; }
.mini-reseni { background: #dbeafe; color: #1e40af; }
.sekce-kriticky { border-left-color: #ef4444; }

/* ── DETAIL AUTA ────────────────────────────────────────────── */
.detail-hlava {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
    background: #fff; border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); border-top: 6px solid #10b981;
}
.detail-hlava h1 { font-size: 2rem; letter-spacing: .03em; }
.detail-podtitul { color: #64748b; }
.zpet { color: #4f46e5; text-decoration: none; font-size: .9rem; }
.karta { background: #fff; border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.karta h2 { font-size: 1.15rem; margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }
.pocet { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 .55rem; font-size: .85rem; }
.detail-mrizka { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.detail-mrizka .karta { margin-bottom: 0; }
.detail-mrizka + .karta { margin-top: 1rem; }
.udaje { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin-bottom: .8rem; }
.udaje dt { color: #64748b; }
.odkaz { color: #4f46e5; font-size: .88rem; }

.zavada { border: 1px solid #e2e8f0; border-left: 5px solid #94a3b8; border-radius: 10px; padding: .9rem 1rem; margin-bottom: .8rem; }
.zavada-nejede { border-left-color: #ef4444; background: #fff8f8; }
.zavada-omezene { border-left-color: #f59e0b; }
.zavada-radek { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.zavada-popis { font-size: 1.05rem; margin: .6rem 0; white-space: pre-line; }
.zavada-foto img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; margin-bottom: .5rem; }
.zavada-meta { font-size: .82rem; color: #64748b; }
.zavada-akce { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; margin-top: .8rem; }
.hotovo-box summary { list-style: none; }
.hotovo-box summary::-webkit-details-marker { display: none; }
.hotovo-box[open] summary { display: none; }
.hotovo-form { background: #f0fdf4; border-radius: 8px; padding: .9rem; min-width: 260px; }
.badge-zavaznost-nejede { background: #fee2e2; color: #991b1b; }
.badge-zavaznost-omezene { background: #fef3c7; color: #92400e; }
.badge-zavaznost-lze_jezdit { background: #f1f5f9; color: #475569; }
.badge-stav-nahlaseno { background: #fef3c7; color: #92400e; }
.badge-stav-v_reseni { background: #dbeafe; color: #1e40af; }
.badge-stav-hotovo { background: #d1fae5; color: #065f46; }

.btn-velke { padding: .75rem 1.2rem; font-size: 1rem; border-radius: 10px; }
.btn-plna { width: 100%; display: block; text-align: center; }
.btn-hotovo { background: #10b981; color: #fff; }
.btn-hotovo:hover { background: #059669; }
.btn-text-danger { background: none; border: none; color: #dc2626; cursor: pointer; font-size: .85rem; padding: .75rem .3rem; }

.pridat-zaznam { margin-bottom: 1rem; }
.pridat-zaznam summary { list-style: none; display: inline-block; }
.pridat-zaznam summary::-webkit-details-marker { display: none; }
.zaznam-form { margin-top: .9rem; max-width: 460px; }
.zaznam { display: flex; gap: 1rem; padding: .7rem 0; border-top: 1px solid #f1f5f9; align-items: flex-start; }
.zaznam-datum { color: #64748b; font-size: .88rem; min-width: 5.5rem; padding-top: .1rem; }
.zaznam-telo { flex: 1; }

/* ── HLÁŠENÍ (mobil) ───────────────────────────────────────── */
.hlaseni { max-width: 520px; margin: 0 auto; }
.velky { font-size: 1.05rem !important; padding: .75rem .85rem !important; }
.volby { display: grid; gap: .5rem; }
.volba { display: flex !important; align-items: center; gap: .7rem; border: 2px solid #e2e8f0; border-radius: 10px;
    padding: .8rem 1rem; cursor: pointer; font-size: 1.02rem !important; font-weight: 600; margin: 0 !important; }
.volba input { width: 1.2rem !important; height: 1.2rem; }
.volba:has(input:checked) { border-color: #4f46e5; background: #eef2ff; }
.volba-nejede:has(input:checked) { border-color: #ef4444; background: #fef2f2; }
.volba-omezene:has(input:checked) { border-color: #f59e0b; background: #fffbeb; }
.foto-tlacitko { display: block !important; border: 2px dashed #cbd5e1; border-radius: 10px; padding: 1rem;
    text-align: center; cursor: pointer; font-size: 1rem !important; color: #475569 !important; }
.foto-tlacitko input { display: none; }
.btn-hlavni { margin-bottom: 1.5rem; font-size: 1.15rem; padding: 1rem; }
.nadpis-sekce { font-size: 1.15rem; margin-bottom: .8rem; }
.moje-zavada { padding: 1rem 1.1rem; }

/* ── LÍSTKY K TISKU ────────────────────────────────────────── */
.listky { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.listek { background: #fff; border: 1px dashed #94a3b8; border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .3rem; }
@media print {
    nav, .nevytisknout, .flash { display: none !important; }
    body { background: #fff; }
    main { margin: 0; max-width: none; }
    .listek { break-inside: avoid; }
}

@media (max-width: 700px) {
    .auta-grid { grid-template-columns: 1fr; }
    .auto { min-height: 0; }
    .detail-hlava .btn-velke { width: 100%; text-align: center; }
    .search-bar { flex-wrap: wrap; }
    .search-bar input { width: 100%; }
}

/* opravy */
.search-bar .filtr input { width: auto; padding: 0; }
.detail-hlava.auto-oranzova { border-top-color: #f59e0b; }
.detail-hlava.auto-cervena  { border-top-color: #ef4444; }

/* ── VOZOVÝ PARK: hlavička, skupiny, ikonky ──────────────────── */
.park-hlava { text-align: center; margin-bottom: 1.5rem; }
.park-hlava h1 { font-size: 2rem; margin-bottom: .9rem; }
.park-hlava .stats { justify-content: center; margin-bottom: 1rem; }
.park-hlava .search-bar { justify-content: center; }
.skupina { margin-bottom: 2rem; }
.skupina-nazev { font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem;
    padding-bottom: .4rem; border-bottom: 2px solid #e2e8f0; }
.skupina-pocet { background: #e2e8f0; color: #334155; border-radius: 999px; padding: .05rem .6rem; font-size: .85rem; }
.skupina-pozor { background: #fef3c7; color: #92400e; border-radius: 999px; padding: .1rem .65rem; font-size: .82rem; font-weight: 600; }
.auto-hlava { gap: .55rem; justify-content: flex-start; }
.auto-hlava .auto-pocet { margin-left: auto; }
.auto-ikona { color: #475569; display: inline-flex; flex: none; }
.ikona-vozidla { width: 40px; height: 22px; }
.auto-ikona.velka .ikona-vozidla { width: 56px; height: 30px; margin-right: .6rem; vertical-align: middle; }
.detail-hlava h1 { display: flex; align-items: center; }
@media (max-width: 700px) {
    .park-hlava .stats { flex-direction: row; flex-wrap: wrap; }
}

/* ikonky vozidel z obrázků */
.ikona-vozidla { width: auto; height: 34px; display: block; }
.ikona-svg { width: 52px; height: 30px; color: #1e1e1e; }
.auto-ikona { width: 56px; justify-content: center; }
.auto-ikona.velka { width: auto; margin-right: .7rem; }
.auto-ikona.velka .ikona-vozidla { height: 52px; width: auto; margin-right: 0; }
.auto-ikona.velka .ikona-svg { width: 80px; height: 46px; }
.ikona-vozidla { height: 46px; }
.auto-ikona { width: auto; min-width: 64px; justify-content: flex-start; }
.auto-ikona .ikona-svg { width: 64px; height: 36px; }
