/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: -webkit-fill-available; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #f0f2f5; color: #1c1c2e; font-size: 15px; line-height: 1.5;
    -webkit-text-size-adjust: 100%; overflow-x: hidden;
    min-height: 100vh; min-height: -webkit-fill-available;
}
input, select, textarea, button { font-size: 16px; font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ===== NAVBAR ===== */
.navbar {
    background: #1c1c2e; display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: 52px; position: sticky; top: 0; z-index: 997;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.navbar-brand { font-size: 1rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; text-decoration:none; }
.navbar-links { display: flex; gap: 2px; }
.navbar-links a { color: #aab; font-size: 0.82rem; padding: 7px 11px; border-radius: 7px; display: flex; align-items: center; gap: 5px; }
.navbar-links a:active { background: rgba(255,255,255,.12); color: #fff; }
.navbar-right { display: flex; align-items: center; gap: 6px; }

/* Burger — skrytý na desktopu */
.burger-btn { display: none; }

/* Desktop nav — viditelný nad 768px */
.desktop-nav { display: flex !important; }

/* === MOBIL === */
@media screen and (max-width: 768px) {
    .desktop-nav  { display: none !important; }
    .burger-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        background: rgba(255,255,255,.08);
        border: none;
        cursor: pointer;
        padding: 0;
        border-radius: 8px;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
    .burger-btn span {
        display: block;
        height: 2px;
        width: 20px;
        background: #fff;
        border-radius: 2px;
        transition: all .25s ease;
        transform-origin: center;
    }
    .burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ===== CONTAINER ===== */
.container { max-width: 700px; margin: 0 auto; padding: 14px 12px 48px; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; flex-wrap: wrap; }
.page-header h2 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; background: #3b82f6; color: #fff; font-size: 0.7rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px; margin-left: 4px; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 9px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-align: center; line-height: 1.3; transition: opacity .15s, transform .1s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; white-space: nowrap; }
.btn:active { opacity: .72; transform: scale(.95); }
.btn-block  { display: flex; justify-content: center; width: 100%; margin-top: 12px; padding: 14px; font-size: 15px; }
.btn-primary   { background: #3b82f6; color: #fff; }
.btn-secondary { background: #64748b; color: #fff; }
.btn-warning   { background: #f59e0b; color: #fff; }
.btn-success   { background: #22c55e; color: #fff; }
.btn-outline   { background: #fff; color: #3b82f6; border: 1.5px solid #3b82f6; }
.btn-sm        { padding: 8px 13px; font-size: 13px; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 33px; height: 33px; border-radius: 8px; font-size: 13px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-decoration: none; transition: filter .12s; }
.ibtn:active { filter: brightness(.8); }
.ibtn-detail { background: #dbeafe; color: #1d4ed8; }
.ibtn-edit   { background: #e0f2fe; color: #0369a1; }
.ibtn-unlock { background: #fef3c7; color: #92400e; }
.ibtn-del    { background: #fee2e2; color: #b91c1c; }
.btn-icon-round { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 50%; border: 1.5px solid #dde; background: #fff; cursor: pointer; font-size: 15px; color: #475569; -webkit-tap-highlight-color: transparent; touch-action: manipulation; flex-shrink: 0; }
.btn-icon-round:active { background: #f0f4ff; }

/* ===== ALERTS ===== */
.alert { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 0.9rem; font-weight: 500; }
.alert-danger  { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-warning { background: #fef9c3; color: #854d0e; }
.locked-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff7ed; border: 1.5px solid #fcd34d; border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-size: 0.88rem; color: #92400e; }

/* ===== LOGIN ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(155deg, #1c1c2e 0%, #0f3460 100%); padding: 20px; }
.login-box { background: #fff; border-radius: 20px; padding: 34px 26px 28px; width: 100%; max-width: 360px; box-shadow: 0 16px 48px rgba(0,0,0,.45); }
.login-icon { font-size: 2.8rem; text-align: center; margin-bottom: 4px; color: #3b82f6; }
.login-box h1 { text-align: center; font-size: 1.4rem; margin-bottom: 24px; }

/* ===== FORMS ===== */
.form-card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 1px 8px rgba(0,0,0,.08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 700; color: #64748b; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.form-group input:not([type=radio]):not([type=checkbox]), .form-group select, .form-group textarea { width: 100%; padding: 12px 13px; border: 1.5px solid #e2e8f0; border-radius: 9px; background: #f8faff; color: #1c1c2e; -webkit-appearance: none; appearance: none; transition: border-color .2s; }
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-group input:not([type=radio]):not([type=checkbox]):focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #3b82f6; background: #fff; }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-section-title { display: flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 700; color: #1c1c2e; margin: 18px 0 10px; padding-top: 14px; border-top: 1.5px solid #e2e8f0; }

/* ===== TOGGLE SLIDER — OPRAVA zarovnání ===== */
.form-group label.toggle-label { display: flex; text-transform: none; letter-spacing: 0; color: inherit; margin-bottom: 0; font-size: inherit; font-weight: inherit; }
.toggle-label { display: flex; align-items: center; gap: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.toggle-label input[type=checkbox] { display: none; }
.toggle-switch { width: 44px; height: 26px; background: #cbd5e1; border-radius: 13px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: left .2s; }
.toggle-label input:checked + .toggle-switch { background: #3b82f6; }
.toggle-label input:checked + .toggle-switch::after { left: 21px; }
.toggle-text { font-size: 0.92rem; font-weight: 500; color: #1c1c2e; line-height: 1.3; }

/* ===== SEARCH ===== */
.search-form { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.search-input-wrap { position: relative; }
.search-input-wrap input { width: 100%; padding: 12px 13px 12px 38px; border: 1.5px solid #dde; border-radius: 10px; background: #fff; -webkit-appearance: none; }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 14px; pointer-events: none; }
.search-row { display: flex; gap: 8px; }
.search-row select { flex: 1; padding: 11px 34px 11px 13px; border: 1.5px solid #dde; border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; -webkit-appearance: none; appearance: none; }

/* ===== STATUS BADGES ===== */
.stbadge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.st-blue   { background: #dbeafe; color: #1d4ed8; }
.st-yellow { background: #fef9c3; color: #92400e; }
.st-green  { background: #dcfce7; color: #15803d; }
.st-locked { background: #fff7ed; color: #9a3412; margin-left: 4px; }

/* ===== ZAKÁZKY TABULKA ===== */
.ztable-wrap { border-radius: 14px; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,.09); }
.ztable { width: 100%; border-collapse: collapse; background: #fff; }
.ztable thead tr { background: #1c1c2e; }
.ztable thead th { color: #8899aa; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; text-align: left; }
.ztable tbody tr { border-bottom: 1px solid #f0f2f5; }
.ztable tbody tr:last-child { border-bottom: none; }
.ztable tbody tr:active { background: #f5f7ff; }
.zrow-locked { opacity: .85; }
.td-main { padding: 11px 12px; }
.td-name { font-size: 0.92rem; font-weight: 700; color: #1c1c2e; margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.lock-sm { font-size: 0.7rem; color: #f59e0b; }
.td-sub  { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; background: #f1f5f9; color: #475569; padding: 2px 8px; border-radius: 20px; border: 1px solid #e2e8f0; }
.chip-spz  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; font-weight: 700; }
.chip-olej { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.col-date   { width: 72px; }
.col-status { width: 88px; }
.col-act    { width: 80px; }
.td-date   { padding: 11px 12px; font-size: 0.8rem; color: #64748b; white-space: nowrap; vertical-align: middle; }
.td-status { padding: 11px 12px; vertical-align: middle; }
.td-act    { padding: 7px 8px; vertical-align: middle; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; }

/* ===== SECTION CARD ===== */
.section-card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 8px rgba(0,0,0,.08); margin-bottom: 14px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.section-header h3 { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.section-btns { display: flex; gap: 8px; align-items: center; }

/* ===== DETAIL HEADER ===== */
.detail-head { background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; border-left: 5px solid #e2e8f0; box-shadow: 0 1px 8px rgba(0,0,0,.08); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bdr-blue   { border-left-color: #3b82f6; }
.bdr-yellow { border-left-color: #eab308; }
.bdr-green  { border-left-color: #22c55e; }
.detail-name   { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.detail-head-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== INFO TABLE ===== */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { display: flex; align-items: flex-start; border-bottom: 1px solid #f0f2f5; }
.info-table tr:last-child { border-bottom: none; }
.info-table th { text-align: left; font-size: 0.78rem; font-weight: 600; color: #94a3b8; padding: 10px 10px 10px 0; width: 120px; min-width: 120px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.info-table td { font-size: 0.88rem; color: #1c1c2e; padding: 10px 0; flex: 1; }
.olej-row { background: #fff7ed; margin: 0 -14px; padding: 0 14px; }
.popis-td { white-space: pre-wrap; font-size: 0.85rem; color: #475569; line-height: 1.65; }

/* ===== DÍLY TABULKA ===== */
.dil-add-form { background: #f5f8ff; border-radius: 10px; padding: 14px; margin-bottom: 12px; border: 1.5px solid #dbeafe; }
.dil-add-form .form-group { margin-bottom: 10px; }
.dtable-wrap { border-radius: 10px; overflow-x: auto; border: 1px solid #e2e8f0; margin-bottom: 0; }
.dtable { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.dtable thead tr { background: #f8faff; }
.dtable thead th { padding: 9px 12px; text-align: left; font-size: 0.71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #64748b; border-bottom: 1.5px solid #e2e8f0; }
.dtable tbody tr { border-bottom: 1px solid #f0f2f5; }
.dtable tbody tr:last-child { border-bottom: none; }
.dtable td { padding: 10px 12px; color: #1c1c2e; vertical-align: middle; }
.dtable .num { text-align: right; }
.dtable .td-act { display: flex; gap: 4px; justify-content: flex-end; padding: 7px 8px; }



/* ===== FOTKY ===== */
.upload-form { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.file-label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 12px; background: #f8faff; border: 2px dashed #93c5fd; border-radius: 10px; font-size: 13px; color: #3b82f6; cursor: pointer; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.file-label input[type=file] { display: none; }
.foto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foto-item { position: relative; }
.foto-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 9px; border: 1.5px solid #e2e8f0; display: block; }
.foto-del { position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 11px; box-shadow: 0 2px 6px rgba(239,68,68,.4); -webkit-tap-highlight-color: transparent; }

.empty-state { text-align: center; padding: 44px 20px; background: #fff; border-radius: 14px; box-shadow: 0 1px 8px rgba(0,0,0,.07); }
.empty-icon { font-size: 3rem; color: #cbd5e1; margin-bottom: 12px; display: block; }
.empty-state p { color: #94a3b8; margin-bottom: 18px; }
.empty-msg { display: flex; align-items: center; justify-content: center; gap: 6px; color: #94a3b8; font-size: 0.87rem; padding: 12px 0; }

@media (min-width: 600px) {
    .container { padding: 20px 18px 48px; }
    .foto-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== MEZISOUČET ===== */
.subtotal-box {
    display: flex; align-items: center; justify-content: space-between;
    background: #f8faff; border-top: 2px solid #e2e8f0;
    border-radius: 0 0 10px 10px; padding: 11px 14px; margin-top: 0;
    flex-wrap: wrap; gap: 6px;
}
.subtotal-label { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: #64748b; font-weight: 600; }
.subtotal-value { font-size: 1rem; font-weight: 700; color: #1c1c2e; }

/* ===== CELKOVÁ CENA ===== */
.final-price-box {
    display: flex; align-items: center; justify-content: space-between;
    background: #f0fdf4; border: 2px solid #22c55e; border-radius: 14px;
    padding: 15px 18px; margin-bottom: 14px; gap: 10px; flex-wrap: wrap;
}
.final-price-label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #166534; font-weight: 700; }
.final-price-value { font-size: 1.35rem; font-weight: 800; color: #15803d; white-space: nowrap; }

/* ===== AUTA GRID ===== */
.auta-grid { display: flex; flex-direction: column; gap: 12px; }
.auto-card { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 8px rgba(0,0,0,.08); display: block; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .1s; border: 1.5px solid transparent; }
.auto-card:active { box-shadow: 0 4px 16px rgba(59,130,246,.2); border-color: #93c5fd; transform: scale(.99); }
.auto-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.auto-icon { width: 44px; height: 44px; background: #eff6ff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #3b82f6; flex-shrink: 0; }
.auto-card-info { flex: 1; }
.auto-name { font-size: 0.97rem; font-weight: 700; margin-bottom: 5px; }
.auto-card-stats { display: flex; flex-wrap: wrap; gap: 8px 0; border-top: 1px solid #f0f2f5; padding-top: 10px; }
.auto-stat { flex: 1; min-width: 80px; text-align: center; }
.auto-stat-val { display: block; font-size: 0.95rem; font-weight: 700; color: #1c1c2e; }
.auto-stat-lbl { display: block; font-size: 0.68rem; color: #94a3b8; margin-top: 1px; }

/* ===== PROFIL HLAVIČKA ===== */
.profil-head { background: linear-gradient(135deg,#1c1c2e,#0f3460); border-radius: 16px; padding: 20px 18px; display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.profil-avatar { width: 60px; height: 60px; background: rgba(255,255,255,.12); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; flex-shrink: 0; }
.profil-name { font-size: 1.15rem; font-weight: 800; color: #fff; margin-bottom: 7px; }
.profil-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.profil-chips .chip { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.2); }
.profil-chips .chip-spz { background: rgba(59,130,246,.4); color: #fff; border-color: rgba(59,130,246,.5); }

/* ===== PROFIL STATISTIKY ===== */
.profil-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 14px; }
.profil-stat-box { background: #fff; border-radius: 12px; padding: 13px 14px; box-shadow: 0 1px 6px rgba(0,0,0,.07); text-align: center; }
.profil-stat-val { font-size: 1.15rem; font-weight: 800; color: #1c1c2e; margin-bottom: 3px; }
.profil-stat-lbl { font-size: 0.72rem; color: #94a3b8; display: flex; align-items: center; justify-content: center; gap: 4px; }

/* ===== SERVISNÍ HISTORIE ===== */
.historie-list { display: flex; flex-direction: column; }
.historie-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #f0f2f5; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.historie-item:last-child { border-bottom: none; }
.historie-item:active { background: #f8faff; margin: 0 -14px; padding-left: 18px; padding-right: 18px; border-radius: 10px; }
.historie-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.historie-dot.st-blue   { background: #3b82f6; }
.historie-dot.st-yellow { background: #eab308; }
.historie-dot.st-green  { background: #22c55e; }
.historie-body { flex: 1; }
.historie-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; flex-wrap: wrap; }
.historie-datum { font-size: 0.85rem; font-weight: 700; color: #1c1c2e; }
.historie-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.historie-popis { font-size: 0.8rem; color: #64748b; margin-top: 3px; line-height: 1.4; }
.historie-cena { font-size: 0.82rem; font-weight: 700; color: #15803d; margin-top: 4px; }
.historie-arrow { color: #cbd5e1; font-size: 0.8rem; margin-top: 4px; flex-shrink: 0; }

@media (min-width: 500px) {
    .profil-stats { grid-template-columns: repeat(4,1fr); }
}
/* ===== MOBILE PORTRAIT — tabulka zakázek ===== */
@media (max-width: 480px) {
    /* Skryj datum sloupec — nejméně důležitý */
    .col-date, .td-date { display: none; }

    /* Status badge — zkrať na tečku + text jen pokud místo je */
    .col-status { width: 70px; }

    /* Akční tlačítka — zmenši, zalamuj */
    .col-act { width: 76px; }
    .td-act  { flex-wrap: wrap; gap: 3px; padding: 5px 6px; justify-content: flex-end; }
    .ibtn    { width: 32px; height: 32px; font-size: 13px; border-radius: 7px; }

    /* Hlavní sloupec — trochu víc prostoru */
    .td-main { padding: 10px 8px; }
    .td-name { font-size: 0.88rem; }
}

/* ===== OLEJ FIXED SIDEBAR ===== */
.olej-fixed-sidebar {
    display: none;
}
@media (min-width: 900px) {
    .olej-fixed-sidebar {
        display: block;
        position: fixed;
        top: 70px;
        right: 16px;
        width: 265px;
        max-height: calc(100vh - 86px);
        overflow-y: auto;
        z-index: 100;
    }
    /* Posuň container aby se nepřekrýval se sidebarem */
    .container {
        padding-right: 295px !important;
        max-width: 1000px !important;
    }
}

/* ===== OLEJ SIDEBAR ===== */
.olej-sidebar { background: #fff; border-radius: 14px; box-shadow: 0 1px 8px rgba(0,0,0,.08); overflow: hidden; }
.olej-sidebar-title { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #1c1c2e; color: #fff; font-size: 0.82rem; font-weight: 700; }
.olej-count { background: #ef4444; color: #fff; font-size: 0.68rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; margin-left: auto; }
.olej-alert-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f0f2f5; align-items: flex-start; }
.olej-alert-item:last-child { border-bottom: none; }
.olej-alert-item.olej-alert-overdue { background: #fff5f5; }
.olej-alert-icon { width: 30px; height: 30px; border-radius: 8px; background: #fff7ed; color: #f59e0b; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.olej-alert-overdue .olej-alert-icon { background: #fee2e2; color: #ef4444; }
.olej-alert-body { flex: 1; min-width: 0; }
.olej-alert-name  { font-size: 0.85rem; font-weight: 700; color: #1c1c2e; margin-bottom: 1px; }
.olej-alert-model { font-size: 0.75rem; color: #64748b; margin-bottom: 3px; }
.olej-alert-datum { font-size: 0.75rem; color: #475569; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.olej-badge { font-size: 0.68rem; font-weight: 700; padding: 2px 6px; border-radius: 20px; }
.olej-badge.soon    { background: #fef9c3; color: #854d0e; }
.olej-badge.today   { background: #fce7f3; color: #9d174d; }
.olej-badge.overdue { background: #fee2e2; color: #b91c1c; }

/* ===== PROFIL OLEJ ALERT ===== */
.profil-olej-alert { display: flex; gap: 14px; align-items: flex-start; background: #fff7ed; border: 2px solid #fcd34d; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.profil-olej-alert.overdue { background: #fff5f5; border-color: #fca5a5; }
.profil-olej-alert-icon { width: 40px; height: 40px; border-radius: 10px; background: #fef3c7; color: #d97706; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.profil-olej-alert.overdue .profil-olej-alert-icon { background: #fee2e2; color: #ef4444; }
.profil-olej-alert-title { font-size: 0.92rem; font-weight: 800; color: #92400e; margin-bottom: 3px; }
.profil-olej-alert.overdue .profil-olej-alert-title { color: #b91c1c; }
.profil-olej-alert-info  { font-size: 0.8rem; color: #78350f; margin-bottom: 4px; }
.profil-olej-alert-datum { font-size: 0.8rem; color: #92400e; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 14px 0 4px; flex-wrap: wrap; }
.pag-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #475569; background: #fff; border: 1.5px solid #e2e8f0; text-decoration: none; transition: all .15s; }
.pag-btn:active, .pag-btn.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.pag-btn.disabled { opacity: .35; pointer-events: none; }
.pag-info { font-size: 0.78rem; color: #94a3b8; text-align: center; padding-bottom: 8px; }

/* ===== DESKTOP/MOBILE VISIBILITY ===== */
.desktop-only { display: block; }
.mobile-only  { display: none; }
.olej-mobile-wrap { display: none; }

@media (max-width: 899px) {
    .desktop-only  { display: none; }
    .mobile-only   { display: block; }
    .olej-fixed-sidebar { display: none !important; }
    .olej-mobile-wrap { display: block; padding: 0 12px 14px; }
    /* Zrušit padding-right na container který je jen pro desktop sidebar */
    .container { padding-right: 14px !important; max-width: 700px !important; }
}

/* ===== OLEJ MOBILE BAR ===== */
.olej-mobile-bar { background: #fff; border-radius: 14px; box-shadow: 0 1px 8px rgba(0,0,0,.08); overflow: hidden; }
.olej-mobile-title { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: #1c1c2e; color: #fff; font-size: 0.82rem; font-weight: 700; }
.olej-mobile-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.olej-mobile-scroll::-webkit-scrollbar { display: none; }

.olej-mobile-card {
    flex: 0 0 200px;
    background: #fff7ed;
    border: 1.5px solid #fcd34d;
    border-radius: 12px;
    padding: 12px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.olej-mobile-card.overdue { background: #fff5f5; border-color: #fca5a5; }
.olej-mc-icon { font-size: 1.1rem; color: #d97706; margin-bottom: 2px; }
.olej-mobile-card.overdue .olej-mc-icon { color: #ef4444; }
.olej-mc-name { font-size: 0.88rem; font-weight: 700; color: #1c1c2e; }
.olej-mc-sub  { font-size: 0.73rem; color: #78350f; }
.olej-mobile-card.overdue .olej-mc-sub { color: #991b1b; }
.olej-mc-datum { font-size: 0.75rem; color: #92400e; font-weight: 600; margin-top: 4px; }

/* ===== TELEFON V DESKTOP ALERTU ===== */
.olej-alert-tel { font-size: 0.75rem; color: #475569; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }

/* ===== OLEJ INTERVAL RADIO ===== */
.interval-opt { display:flex; align-items:center; gap:6px; }
.interval-opt input[type=radio] { display:inline-block !important; width:16px; height:16px; accent-color:#3b82f6; cursor:pointer; pointer-events:auto; flex-shrink:0; }
.interval-opt label { display:inline !important; font-size:0.88rem; font-weight:500; color:#1c1c2e; text-transform:none !important; letter-spacing:0 !important; margin-bottom:0 !important; cursor:pointer; user-select:none; }

/* ===== STATISTIKY ===== */
.stat-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:22px; background:#ffffff; border-radius:14px; padding:14px 18px; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.stat-view-toggle { display:flex; background:#f1f5f9; border-radius:10px; padding:3px; gap:3px; }
.stat-toggle-btn { padding:7px 18px; border-radius:8px; font-size:0.88rem; font-weight:600; color:#64748b; text-decoration:none; transition:all .2s; }
.stat-toggle-btn.active { background:#3b82f6; color:#fff; box-shadow:0 2px 6px rgba(59,130,246,.3); }
.stat-nav { display:flex; align-items:center; gap:10px; margin-left:auto; }
.stat-period-label { font-size:1rem; font-weight:700; color:#1c1c2e; min-width:160px; text-align:center; }
.stat-year-sel select { padding:7px 12px; border:1.5px solid #e2e8f0; border-radius:9px; font-size:0.9rem; font-weight:600; background:#f8faff; cursor:pointer; }

.stat-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card { display:flex; align-items:center; gap:16px; background:#fff; border-radius:16px; padding:20px 22px; box-shadow:0 2px 10px rgba(0,0,0,.06); border-left:4px solid; }
.stat-card--red    { border-color:#ef4444; }
.stat-card--blue   { border-color:#3b82f6; }
.stat-card--green  { border-color:#22c55e; }
.stat-card--purple { border-color:#8b5cf6; }
.stat-card-icon { font-size:1.6rem; opacity:.8; }
.stat-card--red    .stat-card-icon { color:#ef4444; }
.stat-card--blue   .stat-card-icon { color:#3b82f6; }
.stat-card--green  .stat-card-icon { color:#22c55e; }
.stat-card--purple .stat-card-icon { color:#8b5cf6; }
.stat-card-label { font-size:0.75rem; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:.5px; }
.stat-card-value { font-size:1.35rem; font-weight:800; color:#1c1c2e; margin:2px 0; }
.stat-card-value.stat-negative { color:#ef4444; }
.stat-card-sub { font-size:0.78rem; color:#94a3b8; }

.stat-chart-wrap { background:#fff; border-radius:16px; padding:20px 22px; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.stat-chart-header { font-size:0.9rem; font-weight:700; color:#64748b; margin-bottom:16px; }
.stat-chart-container { position:relative; height:320px; }

/* ===== PROFIT SLOUPEC & PRÁCE EXCLUDE ===== */
.col-profit { color: #16a34a; }
.prace-excluded { opacity: 0.45; transition: opacity .2s; }
.prace-excluded .subtotal-box { opacity: 0.45; }

.final-price-profit { font-size:0.85rem; color:#16a34a; font-weight:600; text-align:right; margin-top:2px; }

.subtotal-profit { font-size:0.82rem; color:#16a34a; font-weight:600; margin-left:8px; }

/* ===== NASTAVENÍ ===== */
.settings-section-title { font-size:1rem; font-weight:700; color:#1c1c2e; margin-bottom:6px; }
.settings-hint { font-size:0.82rem; color:#94a3b8; margin-bottom:18px; }
.form-group--full { grid-column: 1 / -1; }

.settings-preview { margin-top:24px; background:#fff; border-radius:16px; padding:20px 24px; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.settings-preview-title { font-size:0.85rem; font-weight:700; color:#64748b; margin-bottom:14px; text-transform:uppercase; letter-spacing:.5px; }

.invoice-header-preview { border:1.5px solid #e2e8f0; border-radius:10px; padding:16px 20px; background:#f8faff; }
.ihp-name { font-size:1.1rem; font-weight:800; color:#1c1c2e; margin-bottom:8px; }
.ihp-details { display:flex; flex-wrap:wrap; gap:6px 20px; font-size:0.82rem; color:#555; }
.ihp-details span { display:flex; align-items:center; gap:5px; }
.ihp-note { margin-top:10px; font-size:0.8rem; color:#94a3b8; font-style:italic; border-top:1px dashed #e2e8f0; padding-top:8px; }

/* ================================================================
   DARK MODE — kompletní přepis
   Princip: CSS custom properties na :root, body.dark je přepíše
   ================================================================ */

:root {
    --c-bg:           #f1f5f9;
    --c-bg2:          #ffffff;
    --c-bg3:          #f8faff;
    --c-card:         #ffffff;
    --c-border:       #e2e8f0;
    --c-text:         #1c1c2e;
    --c-text2:        #64748b;
    --c-text3:        #94a3b8;
    --c-input-bg:     #ffffff;
    --c-input-border: #cbd5e1;
    --c-hover:        #f8faff;
    --c-table-head:   #f1f5f9;
    --c-table-stripe: #f8fafc;
    --c-navbar:       #1c1c2e;
    --c-navbar-text:  #ffffff;
    --c-shadow:       rgba(0,0,0,.08);
}

body.dark {
    --c-bg:           #111827;
    --c-bg2:          #1f2937;
    --c-bg3:          #1a2332;
    --c-card:         #1f2937;
    --c-border:       #374151;
    --c-text:         #f1f5f9;
    --c-text2:        #cbd5e1;
    --c-text3:        #94a3b8;
    --c-input-bg:     #111827;
    --c-input-border: #374151;
    --c-hover:        #263044;
    --c-table-head:   #1a2332;
    --c-table-stripe: #1c2535;
    --c-navbar:       #0f172a;
    --c-navbar-text:  #f1f5f9;
    --c-shadow:       rgba(0,0,0,.4);
}

/* ── Základní elementy ── */
body.dark                         { background: var(--c-bg) !important; color: var(--c-text) !important; }
body.dark *                       { color: inherit; }

/* ── Navbar ── */
body.dark .navbar                 { background: var(--c-navbar) !important; box-shadow: 0 2px 8px var(--c-shadow) !important; }
body.dark .navbar-brand,
body.dark .navbar a,
body.dark .navbar span,
body.dark .navbar i               { color: var(--c-navbar-text) !important; }
body.dark .navbar a.active,
body.dark .navbar a:hover         { background: rgba(255,255,255,.08) !important; }

/* ── Kontejner ── */
body.dark .container              { background: transparent !important; }

/* ── Karty / sekce ── */
body.dark .section-card,
body.dark .form-card,
body.dark .stat-card,
body.dark .auto-card,
body.dark .settings-preview,
body.dark .login-box,
body.dark .locked-banner,
body.dark .total-box,
body.dark .final-price-box        { background: var(--c-card) !important; border-color: var(--c-border) !important; box-shadow: 0 2px 8px var(--c-shadow) !important; }

/* ── Page header ── */
body.dark .page-header            { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .page-header h2,
body.dark h1,body.dark h2,
body.dark h3,body.dark h4         { color: var(--c-text) !important; }

/* ── Tabulky ── */
body.dark .ztable-wrap,
body.dark .dtable-wrap            { background: var(--c-card) !important; border-color: var(--c-border) !important; border-radius: 12px; overflow: hidden; }
body.dark table                   { background: transparent !important; }
body.dark thead tr,
body.dark thead th,
body.dark .list-header,
body.dark .table-header           { background: var(--c-table-head) !important; color: var(--c-text2) !important; border-color: var(--c-border) !important; }
body.dark tbody tr                { background: var(--c-card) !important; }
body.dark tbody tr:nth-child(even){ background: var(--c-table-stripe) !important; }
body.dark tbody tr:hover          { background: var(--c-hover) !important; }
body.dark td,body.dark th         { color: var(--c-text) !important; border-color: var(--c-border) !important; }
body.dark .td-sub,
body.dark .popis-td               { color: var(--c-text2) !important; }

/* ── Zakázky seznam ── */
body.dark .ztable                 { background: var(--c-card) !important; }
body.dark .zrow                   { border-color: var(--c-border) !important; }
body.dark .zrow:hover             { background: var(--c-hover) !important; }
body.dark .td-name                { color: var(--c-text) !important; }
body.dark .td-date,
body.dark .col-date,
body.dark .td-status              { color: var(--c-text2) !important; }
body.dark .chip,
body.dark .chip-spz               { background: var(--c-bg3) !important; color: var(--c-text2) !important; border-color: var(--c-border) !important; }
body.dark .chip-olej              { background: #1a2e1a !important; color: #86efac !important; }

/* ── Auta profily ── */
body.dark .auta-grid .auto-card   { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .auto-card-top          { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }
body.dark .auto-name              { color: var(--c-text) !important; }
body.dark .auto-stat-lbl          { color: var(--c-text3) !important; }
body.dark .auto-stat-val          { color: var(--c-text) !important; }
body.dark .profil-head            { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .profil-name            { color: var(--c-text) !important; }
body.dark .profil-stat-box        { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }
body.dark .profil-stat-lbl        { color: var(--c-text3) !important; }
body.dark .profil-stat-val        { color: var(--c-text) !important; }

/* ── Sekce header (díly/práce) ── */
body.dark .section-header         { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }
body.dark .section-header h3      { color: var(--c-text) !important; }

/* ── Detail zakázky ── */
body.dark .detail-head            { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .detail-name            { color: var(--c-text) !important; }
body.dark .detail-badges .chip    { background: var(--c-bg3) !important; color: var(--c-text2) !important; }
body.dark .info-table .info-label { color: var(--c-text3) !important; }
body.dark .info-table .info-val   { color: var(--c-text) !important; }
body.dark .subtotal-box           { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }
body.dark .subtotal-label         { color: var(--c-text2) !important; }
body.dark .subtotal-value         { color: var(--c-text) !important; }
body.dark .final-price-label      { color: var(--c-text2) !important; }
body.dark .final-price-value      { color: var(--c-text) !important; }

/* ── Formuláře ── */
body.dark input,
body.dark select,
body.dark textarea                { background: var(--c-input-bg) !important; color: var(--c-text) !important; border-color: var(--c-input-border) !important; }
body.dark input::placeholder,
body.dark textarea::placeholder   { color: var(--c-text3) !important; }
body.dark select option           { background: var(--c-input-bg); color: var(--c-text); }
body.dark label,
body.dark .toggle-label,
body.dark .form-section-title     { color: var(--c-text2) !important; }
body.dark .settings-section-title { color: var(--c-text) !important; }
body.dark .settings-hint          { color: var(--c-text3) !important; }

/* ── Search / Filter ── */
body.dark .search-form,
body.dark .search-input-wrap,
body.dark .filter-bar             { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .search-ico             { color: var(--c-text3) !important; }

/* ── Tlačítka ── */
body.dark .btn-outline            { border-color: var(--c-border) !important; color: var(--c-text) !important; background: transparent !important; }
body.dark .btn-outline:hover      { background: var(--c-hover) !important; }
body.dark .btn-icon-round         { background: var(--c-bg3) !important; border-color: var(--c-border) !important; color: var(--c-text2) !important; }
body.dark .btn-icon-round:hover   { background: var(--c-hover) !important; }
body.dark .ibtn                   { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }

/* ── Statistiky ── */
body.dark .stat-cards             { background: transparent !important; }
body.dark .stat-card-label        { color: var(--c-text2) !important; }
body.dark .stat-card-value        { color: var(--c-text) !important; }
body.dark .stat-card-sub          { color: var(--c-text3) !important; }
body.dark .stat-card--blue        { background: #1e3a5f !important; border-color: #2563eb33 !important; }
body.dark .stat-card--green       { background: #14532d !important; border-color: #16a34a33 !important; }
body.dark .stat-card--purple      { background: #3b0764 !important; border-color: #9333ea33 !important; }
body.dark .stat-card--red         { background: #7f1d1d !important; border-color: #ef444433 !important; }
body.dark .stat-chart-wrap,
body.dark .stat-chart-container   { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .auto-icon              { background: #1e3a5f !important; color: #93c5fd !important; }
body.dark .stat-nav               { background: transparent !important; border-color: var(--c-border) !important; }
body.dark .stat-toolbar           { background: var(--c-card) !important; box-shadow: 0 2px 8px var(--c-shadow) !important; color: var(--c-text) !important; }
body.dark .stat-view-toggle       { background: var(--c-bg) !important; }
body.dark .stat-toggle-btn        { color: var(--c-text2) !important; }
body.dark .stat-toggle-btn.active { background: #3b82f6 !important; color: #fff !important; box-shadow: 0 2px 6px rgba(59,130,246,.4) !important; }
body.dark .stat-toggle-btn:hover:not(.active) { background: var(--c-hover) !important; color: var(--c-text) !important; }
body.dark .stat-period-label      { color: var(--c-text) !important; }
body.dark .stat-year-sel select   { background: var(--c-input-bg) !important; color: var(--c-text) !important; border-color: var(--c-input-border) !important; }

/* ── Historie ── */
body.dark .historie-item          { border-color: var(--c-border) !important; }
body.dark .historie-body          { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .historie-top           { color: var(--c-text) !important; }
body.dark .historie-popis         { color: var(--c-text2) !important; }
body.dark .historie-cena          { color: var(--c-text) !important; }
body.dark .historie-datum         { color: var(--c-text3) !important; }
body.dark .historie-dot           { background: var(--c-border) !important; border-color: var(--c-bg) !important; }

/* ── Olej alerts ── */
body.dark .olej-fixed-sidebar,
body.dark .olej-sidebar           { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .olej-sidebar-title     { color: var(--c-text2) !important; }
body.dark .olej-alert-body        { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }
body.dark .olej-alert-name        { color: var(--c-text) !important; }
body.dark .olej-alert-model,
body.dark .olej-alert-datum,
body.dark .olej-alert-tel         { color: var(--c-text3) !important; }
body.dark .olej-mobile-bar        { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .overdue                { background: #7f1d1d22 !important; }

/* ── Alerty ── */
body.dark .alert-success          { background: #14532d !important; color: #86efac !important; border-color: #166534 !important; }
body.dark .alert-warning          { background: #78350f !important; color: #fde68a !important; border-color: #92400e !important; }
body.dark .alert-danger           { background: #7f1d1d !important; color: #fca5a5 !important; border-color: #991b1b !important; }

/* ── Foto ── */
body.dark .foto-item              { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }

/* ── Upload form ── */
body.dark .upload-form,
body.dark .dil-add-form           { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }

/* ── Paginace ── */
body.dark .pagination .pag-btn    { background: var(--c-card) !important; border-color: var(--c-border) !important; color: var(--c-text) !important; }
body.dark .pagination .pag-btn:hover { background: var(--c-hover) !important; }
body.dark .pagination .today      { background: var(--c-bg3) !important; }
body.dark .pag-info               { color: var(--c-text2) !important; }

/* ── Status badges dark mode ── */
body.dark .stbadge.st-blue   { background: #1e3a5f !important; color: #93c5fd !important; }
body.dark .stbadge.st-yellow { background: #3d2e00 !important; color: #fde68a !important; }
body.dark .stbadge.st-green  { background: #14532d !important; color: #86efac !important; }
body.dark .stbadge.st-locked { background: #3d1a00 !important; color: #fed7aa !important; }
body.dark .olej-badge.soon    { background: #3d2e00 !important; color: #fde68a !important; }
body.dark .olej-badge.today   { background: #3d0e2a !important; color: #f9a8d4 !important; }
body.dark .olej-badge.overdue { background: #450a0a !important; color: #fca5a5 !important; }

/* ── Nastavení ── */
body.dark .invoice-header-preview { background: var(--c-bg3) !important; border-color: var(--c-border) !important; }
body.dark .ihp-name               { color: var(--c-text) !important; }
body.dark .ihp-details            { color: var(--c-text2) !important; }
body.dark .ihp-note               { color: var(--c-text3) !important; border-color: var(--c-border) !important; }

/* ── Login ── */
body.dark .login-page             { background: var(--c-bg) !important; }
body.dark .login-box              { background: var(--c-card) !important; border-color: var(--c-border) !important; }
body.dark .login-icon             { color: var(--c-text3) !important; }

/* ── Locked banner ── */
body.dark .locked-banner          { background: var(--c-bg3) !important; border-color: var(--c-border) !important; color: var(--c-text2) !important; }

/* ── Scrollbar ── */
body.dark                         { scrollbar-color: var(--c-border) var(--c-bg); }
body.dark ::-webkit-scrollbar     { width: 6px; height: 6px; }
body.dark ::-webkit-scrollbar-track  { background: var(--c-bg); }
body.dark ::-webkit-scrollbar-thumb  { background: var(--c-border); border-radius: 3px; }
body.dark ::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* ── Dark toggle tlačítko ── */
.dark-toggle {
    background: none; border: none; cursor: pointer;
    font-size: 1.2rem; padding: 6px 8px;
    border-radius: 8px; transition: background .2s;
    color: inherit; line-height: 1;
}
.dark-toggle:hover { background: rgba(128,128,128,.15); }

/* ── Foto upload file-label ── */
body.dark .file-label             { background: var(--c-bg3) !important; border-color: #3b82f6 !important; color: #93c5fd !important; }
body.dark .file-label:hover       { background: var(--c-hover) !important; }
body.dark input[type=file]        { background: var(--c-input-bg) !important; color: var(--c-text) !important; }

/* ================================================================
   BURGER / MOBILE MENU
   ================================================================ */

/* Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 998;
    opacity: 0;
    transition: opacity .25s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-overlay.open { display: block; opacity: 1; }

/* Drawer */
.mobile-menu {
    position: fixed;
    top: 0; right: -290px;
    width: 270px; height: 100%;
    height: 100dvh;
    background: #1c1c2e;
    z-index: 999;
    transition: right .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu.open { right: 0; }

.mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: #fff; font-weight: 700; font-size: 1rem;
    flex-shrink: 0;
}
.mobile-menu-close {
    background: none; border: none; color: #94a3b8;
    font-size: 1.8rem; cursor: pointer; line-height: 1; padding: 0 4px;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-close:hover { color: #fff; }

.mobile-menu-nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }
.mobile-menu-nav a {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 24px;
    color: #cbd5e1; text-decoration: none;
    font-size: 1rem; font-weight: 500;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-nav a i { width: 20px; text-align: center; font-size: 1rem; }
.mobile-menu-nav a:hover,
.mobile-menu-nav a:active  { background: rgba(255,255,255,.07); color: #fff; }
.mobile-menu-nav a.active  {
    background: rgba(99,102,241,.15);
    color: #818cf8;
    border-left-color: #6366f1;
}
.mobile-menu-logout {
    margin-top: auto !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
    color: #f87171 !important;
}
.mobile-menu-logout:hover,
.mobile-menu-logout:active { background: rgba(239,68,68,.1) !important; }

/* Dark mode — drawer je vždy tmavý */
body.dark .mobile-menu        { background: #0f172a; }
body.dark .mobile-menu-header { border-color: rgba(255,255,255,.07); }
