:root {
    --dark_red: #731010;
    --grey: #d4d4d4;
    --dark_grey: #707070;
    --darkest_grey: #1f1f1f;
    --light_red: #a80000;
    --white: #f1f1f1;
    /* --surface: pozadí karet/vstupů. Na rozdíl od --white (které se používá i jako
       barva textu na barevných plochách) se v tmavém režimu skutečně mění. */
    --surface: #f1f1f1;

    /* Stavové barvy - stejné odstíny jako doposud, jen pojmenované */
    --color-success: rgb(30, 158, 30);
    --color-warning: #ff9800;
    --color-danger: rgb(255, 0, 0);
    --color-info: rgb(0, 68, 255);

    /* Design tokeny pro modernější vzhled (zaoblení, stíny, přechody) */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.16);
    --transition: 160ms ease;
}


body {
    background-color: var(--grey) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;



}

#modrapolovina {
    background-color: var(--dark_red);
    height: 300px;
    border-end-end-radius: var(--radius-lg);
    border-end-start-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);


}

.oznameni {
    width: 300px;
    /* Nastavte požadovanou šířku */
    word-wrap: break-word;
    /* Zalomí dlouhá slova */
    /* Alternativně můžete použít word-break */
    /* word-break: break-all; */
}

h1 {

    font-weight: bold;
    margin-top: 30px;
    color: var(--grey);
}

input[type=text] {

    background-image: url('/obr/user2.png');

}

input[type=password] {

    background-image: url('/obr/key2.png');

}


input[type=text],
input[type=password] {
    margin-top: 20%;
    border-radius: var(--radius-md);
    height: 50px;
    text-indent: 30px;
    border: 0px;
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);

    background-repeat: no-repeat;
    background-position: left;
    background-size: 20px;
    background-position-x: 5%;

}

input[type=text]:focus,
input[type=password]:focus {
    outline: none;
    box-shadow: var(--shadow-md);
}



input[type=submit],
button {
    background-color: var(--dark_red);
    color: var(--white);
    font-weight: bold;
    border-radius: var(--radius-md);
    /* margin-top: 20%; */
    width: 100%;
    height: 50px;
    border: 0px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);

}

input[type=submit]:active,
button:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-sm);
}

.dokoncit input[type=submit] {
    margin-top: 20%;


}



.uzivatel p {
    margin-top: 20%;
    text-align: center;

}


.nacist {


    text-align: center;

}


.nacist button {
    background-color: var(--dark_red);
    color: var(--white);
    font-weight: bold;
    border-radius: var(--radius-md);
    width: 100%;
    height: 50px;
    border: 0px;
    margin-top: 5px;
}

.volat button {
    background-color: var(--color-success);
}

.castka button {
    background-color: transparent;
    border: 1px solid var(--dark_red);
    color: black;
    box-shadow: none;
}

.poznamka button {
    background-color: var(--color-danger);
}

.sms button {
    background-color: var(--color-success);
}

.adresa button {
    background: var(--color-info);
}

.objednavka {

    border-radius: var(--radius-lg);
    background-color: var(--surface);
    margin-bottom: 10px;
    width: 100%;
    padding: 8px;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition);



}

.tlacitko input[type=submit] {
    /* background-color: var(--dark_red);
    color: var(--grey);
    font-weight: bold;
    border-radius:10px;
    width: 100%;
    height: 50px;
    border:0px; */
    margin-top: 5px;

}




.col-3 {

    padding-left: 2px;
    padding-right: 2px;
}

.row {

    padding-left: 10px;
    padding-right: 10px;
    line-height: 1;
}

.dohromady h2 {
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: unset;
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--white);
    margin-top: 3px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.cas h2 {
    background-color: var(--light_red);
    font-size: 18px;

}

.cislo_objednavky h2 {
    background-color: var(--dark_red);
    font-size: 22px;

}

.texty h3 {
    font-size: 20px;
    line-height: 0.05;
    overflow: hidden;
    /* Skryje pĹ™eteÄŤenĂ­ textu */
    white-space: nowrap;
    /* ZamezĂ­ zalomenĂ­ textu na novĂ˝ Ĺ™Ăˇdek */
    margin-top: 3px;
}

.cas_doruceno h2 {
    background-color: var(--color-success);
    font-size: 40px;

}




.modal-body a {

    text-decoration: none;
    color: var(--darkest_grey);

}

.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e2e2e2;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark_red);
    margin: 0;
}

/* Vlastní zavírací tlačítko - nedědí globální styl "button" (dark_red, 100% šířka) */
.modal-close-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    flex-shrink: 0;
    padding: 0;
    font-size: 16px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.06) !important;
    color: #000;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:active {
    transform: scale(0.9);
    box-shadow: none;
}

.modal-body {
    padding: 18px 20px;
}

.modal-body .info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    margin-bottom: 10px;
}

.modal-body .info-row i {
    color: var(--dark_red);
    width: 18px;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

.modal-field {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e2e2;
}

.modal-field-label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin: 12px 0 6px;
    color: var(--dark_grey);
}

.modal-field-label:first-child {
    margin-top: 0;
}

.vlastni-select {

    width: 100%;
    /* background-color: var(--dark_red); */
    border-radius: var(--radius-md);
    height: 40px;
    border: 1px solid #d0d0d0;
    padding: 0 10px;

}

.vlastni-select:focus {
    outline: none;
    border-color: var(--dark_red);
    box-shadow: var(--shadow-sm);
}

.modal-textarea {
    resize: none;
    width: 100%;
    height: 90px;
    border-radius: var(--radius-md);
    border: 1px solid #d0d0d0;
    padding: 10px;
    font-family: inherit;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--dark_red);
    box-shadow: var(--shadow-sm);
}

.modal-footer {
    padding: 14px 20px 20px;
    border-top: none;
}


@media (max-width: 539px) {

    .pc {
        display: none;

    }
}



@media (min-width: 540px) {
    html {
        background-color: #1f1f1f !important;
    }

    body {
        max-width: 480px !important;
        margin: 0 auto !important;
        min-height: 100vh;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        background-color: var(--surface) !important;
        position: relative;
    }

    .mobil {
        display: block !important;
    }

    .pc {
        display: none !important;
    }

    .top-menu {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-nav {
        display: flex !important;
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }

    .pc h2 {
        font-size: 50px;
        text-align: center;
        text-decoration: underline;
        margin-top: 20%;
    }
}


.mobile-nav {
    background: #F1F1F1;
    position: fixed;
    bottom: 0;
    height: 65px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.bloc-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark_red);
    font-size: 30px;
    transition: color var(--transition), transform var(--transition);
}

.bloc-icon:hover {
    color: var(--light_red);
}

.bloc-icon:active {
    transform: scale(0.92);
}




@media screen and (min-width: 600px) {
    .mobile-nav {
        display: none;
    }
}


.top-menu {
    background: var(--dark_red);
    position: fixed;
    top: 0;
    height: 65px;
    width: 100%;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    z-index: 10;
}


#page-title {
    color: var(--white);
    text-align: start;
    margin-left: 25px;
    font-size: 25px;

}

/* ==== Tmavý režim ====
   Pozor: --white se v aplikaci používá i jako barva BÍLÉHO TEXTU na barevných
   plochách (tlačítka, odznaky, horní lišta) - ta proto v tmavém režimu
   zůstává beze změny. Pozadí karet/vstupů řídí samostatná --surface. */
html[data-theme="dark"] {
    --grey: #14161a;
    --surface: #1e2126;
    --darkest_grey: #f1f1f1;
    --dark_grey: #a5a5a5;
}

html[data-theme="dark"] body {
    color: var(--darkest_grey);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] p,
html[data-theme="dark"] label,
html[data-theme="dark"] b,
html[data-theme="dark"] .oznameni,
html[data-theme="dark"] .uzivatel p {
    color: #f1f1f1;
}

html[data-theme="dark"] .mobile-nav {
    background: #1e2126;
}

html[data-theme="dark"] .bloc-icon {
    color: #e6e6e6;
}

html[data-theme="dark"] .bloc-icon:hover {
    color: var(--light_red);
}

html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] .vlastni-select,
html[data-theme="dark"] .form-control {
    background-color: #2a2d33;
    color: #f1f1f1;
    border-color: #3a3d43;
}

html[data-theme="dark"] .modal-content {
    background-color: #1e2126;
    color: #f1f1f1;
}

html[data-theme="dark"] .castka button {
    color: #f1f1f1;
}

html[data-theme="dark"] .product-square,
html[data-theme="dark"] .oznameni {
    border-color: #3a3d43 !important;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-field {
    border-color: #3a3d43;
}

html[data-theme="dark"] .modal-close-btn {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #d0d0d0;
}

html[data-theme="dark"] .vlastni-select,
html[data-theme="dark"] .modal-textarea {
    border-color: #3a3d43;
}

html[data-theme="dark"] .modal-field-label {
    color: #a5a5a5;
}

/* ==========================================
   Styly pro celostránkové rozhraní řidiče
   ========================================== */

/* Fixní záhlaví */
.nav-header-fixed {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    color: var(--darkest_grey);
    z-index: 1000;
    box-shadow: var(--shadow-md);
    padding: 10px 15px;
    border-bottom: 1px solid var(--grey);
}

@media (max-width: 539px) {
    .nav-header-fixed {
        left: 0;
        transform: none;
        max-width: 100%;
    }
}

.nav-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.nav-arrow-btn {
    background: transparent !important;
    border: none !important;
    color: var(--darkest_grey) !important;
    font-size: 24px !important;
    width: 45px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full) !important;
    box-shadow: none !important;
    transition: background var(--transition), transform var(--transition) !important;
}

.nav-arrow-btn:active {
    background: var(--grey) !important;
    transform: scale(0.9) !important;
}

.nav-arrow-btn.finish-check {
    color: #2e7d32 !important;
    background: rgba(46, 125, 50, 0.15) !important;
    font-size: 24px !important;
}

.nav-arrow-btn.finish-check:active {
    background: rgba(46, 125, 50, 0.3) !important;
}

.nav-order-info {
    flex-grow: 1;
}

.nav-order-label {
    font-weight: bold;
    font-size: 17px;
    letter-spacing: 0.5px;
}

.nav-order-progress {
    font-size: 13px;
    opacity: 0.8;
}

/* Přepínač záložek */
.tab-panel-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 3px;
}

.tab-btn {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: bold !important;
    font-size: 14px !important;
    height: 35px !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
    transition: background var(--transition), color var(--transition) !important;
}

.tab-btn.active {
    background: var(--surface) !important;
    color: var(--dark_red) !important;
}

html[data-theme="dark"] .tab-btn.active {
    background: #2a2d33 !important;
    color: #f1f1f1 !important;
}

/* Detailní info banner objednávky */
.order-meta-banner {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .order-meta-banner {
    border-color: #3a3d43;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.meta-address {
    font-weight: bold;
    font-size: 16px;
    color: var(--darkest_grey);
}

.meta-phone {
    font-weight: 500;
    color: var(--dark_grey);
}

.meta-price {
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    background-color: var(--surface) !important;
    border: 1.5px solid var(--dark_red) !important;
    color: var(--darkest_grey) !important;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

html[data-theme="dark"] .meta-price {
    border-color: var(--light_red) !important;
}

.meta-note {
    font-size: 13px;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--dark_red);
}

html[data-theme="dark"] .meta-note {
    background: rgba(255, 255, 255, 0.03);
}

/* Seznam produktů přes celou šířku */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-item-row {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

html[data-theme="dark"] .product-item-row {
    border-color: #3a3d43;
}

.product-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-name-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-qty {
    font-weight: 800;
    font-size: 18px;
    color: var(--dark_red);
    min-width: 25px;
}

html[data-theme="dark"] .product-qty {
    color: var(--light_red);
}

.product-name {
    font-weight: bold;
    font-size: 16px;
    color: var(--darkest_grey);
}

.product-price {
    font-weight: 600;
    font-size: 15px;
    color: var(--dark_grey);
}

.product-item-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.extra-badge {
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.extra-badge-plus {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.3);
}

html[data-theme="dark"] .extra-badge-plus {
    background: rgba(46, 125, 50, 0.2);
    color: #81c784;
}

.extra-badge-minus {
    background: rgba(198, 40, 40, 0.1);
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.3);
}

html[data-theme="dark"] .extra-badge-minus {
    background: rgba(198, 40, 40, 0.2);
    color: #e57373;
}

/* Fixní spodní ovládací panel */
.fixed-bottom-controls {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    padding: 12px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 539px) {
    .fixed-bottom-controls {
        left: 0;
        transform: none;
        max-width: 100%;
    }
}

.delivered-banner {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1.5px solid #a5d6a7;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .delivered-banner {
    background: rgba(46, 125, 50, 0.15);
    color: #81c784;
    border-color: rgba(46, 125, 50, 0.3);
}

.action-buttons-row {
    margin-top: 8px;
}

.action-buttons-row button {
    height: 48px !important;
}

/* Úprava mapy */
.order-map {
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .order-map {
    border-color: #3a3d43;
}

/* Navigační kolečka v záhlaví */
.nav-order-center-circles {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.header-circles-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.progress-badge {
    font-weight: bold;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.header-circles-wrapper .dohromady h2 {
    margin-top: 0 !important;
}


