body {
    font-family: 'Tahoma', sans-serif;

    font-weight: 400;
    color: #414141;
    font-size: 14px;
    background: #fff;
    line-height: 1.25em;
}

/* === Глобална защита срещу хоризонтален скрол на мобилно ===
   Слагаме на root ниво (html/body), за да хванем и header/footer/menu,
   не само секцията „Поръчки". На десктоп — нищо не се променя. */
@media (max-width: 900px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    /* Всички top-level контейнери — не могат да надхвърлят екрана */
    body > *,
    body > * > *,
    .container, .container2, section, header, footer, nav {
        max-width: 100vw !important;
    }
    /* Чести виновници: широки таблици */
    table { max-width: 100% !important; }
    /* Note: ИЗБЯГВАМЕ глобален `img { max-width:100% }` — overrides-ва малки
       икони (CB icon, status iconки и т.н.) и ги прави огромни.
       Ако трябва responsive image — слагай го локално scoped в съответния клас. */
}

a:hover {
    text-decoration: none;
}

a:active,
a:hover,
a:focus {
    outline: 0 none;
    text-decoration: none
}


h4 a:hover {
    color: #468407;
}

ul {
    list-style: outside none none;
    margin: 0;
    padding: 0
}
.left {
    float: left;
}
.right {
    float: right;
}

.clear {
    clear: both
}

.fix {
    overflow: hidden;
}


.brcrlft {
    width: 65%;
}
.divLft {
    width: 50%;
}
.divRight {
    width: 50%;
}
.formobile {
        display: none;
    }

.ViberBtn {
    display: block;border: 1px solid #19089b;padding: 0 7px 6px 5px;color: #ffffff;float: left;text-decoration: none;margin-bottom: 10px;background: #4d3ccb;
}
.marginright10 {
    margin-right: 10px;
}
.width200 {
    width: 200px;
}
.BlueBtn  {
    width: 29px;padding: 9px 0 3px 0;height: 21px;display: block;float: left; background: linear-gradient(45deg, #1a6bb3, #218ADE);border-radius: 5px;text-align: center;color: white;margin-right: 5px;
}
.BlueBtnWhite {

    width: 29px;padding: 9px 0 3px 0;height: 21px;display: block;float: left; background: linear-gradient(45deg, #1a6bb3, #218ADE);border-radius: 5px;text-align: center;color: white;margin-right: 5px;color: whtie!important;
}

.RedBtn{
    width: 29px;padding: 9px 0 3px 0;height: 21px;display: block;float: left;background: linear-gradient(45deg, #a00d21, #cb1028, #e6133b);border-radius: 5px;text-align: center;color: white;margin-right: 5px;     font-size: 15px;
}

 .easyship-table {
                 /*  border-collapse: collapse; */
                  /* border: 1px solid #c9c9c9; */
                   width: 1500px;
               }
               .easyship-table th, .easyship-table td {
                    border-left: 1px solid white;
                    border-right: 1px solid white;
                    padding: 4px;
                   /* background: linear-gradient(to bottom, #ffffff, #e9e9e9); */
                   border-bottom: 1px solid #bfbfbf;
               }
               .easyship-table th {
                    padding-top: 10px;
                    padding-bottom: 10px;

               }

.pagination a:hover {
    color: #a8ca01;
}

.pagination  a {
   /* color: #6d6d6d;
    font-size: 14px;
    font-weight: 500;
    padding: 0 10px;*/
        color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 3px 8px;
    background: #03A9F4;
    margin: 0 3px;
    text-decoration: none;
}

.pagination  a i.fa-long-arrow-left {
    margin-right: 5px;
}

.pagination  a i.fa-long-arrow-right {
    margin-left: 5px;
}
.pagination .pg_current {
    color: #03A9F4;
    font-size: 14px;
    font-weight: 500;
    padding: 2px 7px;
    background: #fff;
    margin: 0 3px;
    text-decoration: none;
    border: 1px solid #03A9F4;
}
.pagination .pg_next, .pagination .pg_prev {
    color: #03A9F4;
     margin: 0 3px;
     background: none!important;
     padding: 0px;
    background: none !important;s

}

.ButtonStyle1 {
    padding: 10px;
    background-color: #218ade;
    color: white;
    display: block;
    text-decoration: none;
    border-radius: 5px;
    width: 150px;
    text-align: center;

}
.ButtonStyle1Long {
    padding: 10px;
    background-color: #218ade;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;

}
.ButtonStyle1Long2 {
    padding: 10px 40px;
    background-color: #218ade;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    margin: 0 15px 15px 0;
    display: block;

}
.ButtonStyle2 {
    padding: 10px;
    background-color: #8bc34a;
    color: white;
    display: block;
    text-decoration: none;
    border-radius: 5px;
    width: 150px;
    text-align: center;

}
.ButtonStyle3 {
    padding: 10px;
    background-color: #ff9800;
    color: white;
    display: block;
    text-decoration: none;
    border-radius: 5px;
    width: 150px;
    text-align: center;
}
.ButtonStyle4 {
    padding: 10px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    width: 110px;
    text-align: center;
    margin: 0 10px 10px;
    float: left;
}
.ButtonStyle5 {
    padding: 10px;
    background-color: #FF9800;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    width: 110px;
    text-align: center;
    float: left;
    margin: 0 10px 0 0;
}

input.norml {
    width: 25px;
    font-size: 12px;
    padding: 4px;
}

.correctdiv {
    border: 1px solid #2d8b05;
    background: #f0ffe9;
    padding: 10px;
}
.errordiv {
    border: 1px solid #F44336;
    background: #ffe9e9;
    padding: 10px;

}
/*input {
    padding: 8px 10px;
    border: 1px solid black;
    width: 100%;
    border-radius: 4px;
} */
input.checkbox {
    padding: 0!important;
     width: 10%;
}




body.outside {
    background: linear-gradient(to bottom, #b9b9b9, #b3b3b3);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
}
.container2 {
    width: 100%;
    max-width: 1500px;
    padding-top: 15px;
}

.login-box {
    background: #ffffff;
    padding: 35px 35px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.login-box h2 {
    margin-bottom: 25px;
    font-size: 28px;
    color: #1c2d48;
}

.input-group {
    margin-bottom: 20px;
}

.inputNrml {
    padding: 7px 8px;
    width: 76%;
    border-radius: 4px;
    border: 1px solid #999;
}

.input-group input.ghi {
    width: 88%;
    padding: 14px 16px;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    font-size: 16px;
    background: #f4f6f9;
}
.error {
  color: #c52d2d;
    padding: 10px;
    text-align: center;
}

.password-group {
    position: relative;
}

.show-pass {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
}

.btn {
    width: 100%;
    background: #2e4c92;
    color: white;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    margin-top: 10px;
    cursor: pointer;
}

.btn:hover {
    background: #244073;
}

.forgot {
    display: block;
    margin-top: 18px;
    color: #244073;
    font-size: 14px;
    text-decoration: none;
}

.signup {
    margin-top: 20px;
    font-size: 15px;
}

.signup a {
    color: #244073;
    font-weight: bold;
    text-decoration: none;
}
.correct {
    background: #d7ffd7;
    padding: 13px 10px;
    border: 1px solid #4dfb36;
    font-weight: bold;
    color: green;
}

.menuTOP {
    background: #218ADE;
    /* border: 1px solid red; */
    height: 30px;
    padding: 16px 0 5px 10px;

    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
}
.menuTOP a {
    text-decoration: none;
    color: white;
    padding-right: 17px;
}
.menuTOP a:hover {
    color: #ffeb3b;
}

.menuTOP li {
    position: relative;
    display: inline-block;
    list-style: none;
}
.menuTOP li svg.menu, .menu-topbar, .menu-user-block {
    display: none!important;
}
.menuTOP li .dropdown {
    display: none!important;
    position: absolute;
    top: 15px;
    left: -14px;
    background: #218ADE;
    min-width: 180px;
    padding: 15px 0;
    z-index: 999;
}

.menuTOP li:hover .dropdown {
    display: block;
}

.menuTOP li .dropdown li {
    display: block !important;
    width: 100%;
}

.menuTOP li .dropdown li a {
    display: block;
    padding: 8px 15px;
    white-space: nowrap;
}
.dropdown-arrow {
    cursor: pointer;
    color: white;
    font-size: 10px;
    margin-left: -19px;
    position: relative;
    top: -1px;
    margin-right: 13px;
}



/* =====================
   ПОТРЕБИТЕЛСКА ЛЕНТА
===================== */
li.nav-user-bar {
    margin-left: auto;
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
    border-left: 1px solid rgba(255,255,255,0.15);
    /*background: rgba(255,255,255,0.06);*/
    top: -5px;
    right: 10px;
}

.nav-user-avatar {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin: auto 10px auto 14px;
    letter-spacing: 0.5px;
}

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    padding-right: 12px;
    border-right: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-user-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    padding: 0 12px;
    border-right: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    height: 100%;
}

.nav-user-badge-yellow {
    color: #f0c040;
}

.nav-user-badge-light {
    color: #b3d0f5;
}

.nav-user-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    padding: 0 12px;
    border-right: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    height: 100%;
}

.nav-user-logout {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #ff8f8f !important;
    text-decoration: none !important;
    padding: 0 16px !important;
    height: 100%;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.15s;
}

.nav-user-logout:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #ffaaaa !important;
}

/* Премахваме стария header-top-in */
.header-top-in {
    display: none;
}


@media (min-width: 901px) {
    .nav-hamburger {
        display: none !important;
    }

    #menu {
        display: block;
    }

    .menuTOP {
        display: flex !important;
    }
}

/* =====================
   МОБИЛНА ВЕРСИЯ
===================== */
@media (max-width: 900px) {

    /* Скриваме nav-user-bar */
    li.nav-user-bar {
        display: none !important;
    }

    /* Показваме хамбургера */
    .nav-hamburger {
        display: flex;
    }

    /* Менюто е скрито по подразбиране */
    .menuTOP {
        display: none;
        flex-direction: column;
        height: auto;
        padding: 0;
        position: absolute;
        top: 44px;
        left: 0;
        right: 0;
        background: #218ADE;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }

    /* Показва се при клик */
    .menuTOP.nav-open {
        display: flex;
    }

    .menuTOP li {
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .menuTOP li a {
        display: block;
        padding: 13px 18px;
        font-size: 14px;
        color: #fff;
        border-right: none;
    }

    .menuTOP li a:hover,
    .menuTOP li a.nav-active {
        background: rgba(255,255,255,0.1);
        color: #ffeb3b;
    }

    /* Dropdown вътре в мобилното меню */
    .menuTOP li .dropdown {
        /*display: block;*/
        position: static;
        background: rgba(0,0,0,0.15);
        box-shadow: none;
        padding: 0;
        min-width: 100%;
    }

    .menuTOP li .dropdown li {
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    .menuTOP li .dropdown li a {
        padding: 11px 18px 11px 32px;
        font-size: 13px;
    }

    .dropdown-arrow {
        display: none;
    }

    /* Лого */
    .menuTOP li.left:first-child {
        border-bottom: none;
        padding: 6px 14px;
    }

    /* Header wrapper за хамбургер + лого */
    #menu {
        display: flex;
        align-items: center;
        background: #218ADE;
        position: relative;
        min-height: 44px;
    }

    #menu .nav-hamburger {
        order: 2;
        margin-left: auto;
    }

    /* Лого вляво */
    #menu > ul > li.left:first-child {
        /*order: 1;  */
        border: none;
    }

    /* Скриваме header-top-in */
    .header-top-in {
        display: none !important;
    }

    /* Таблицата scroll-ва хоризонтално */
    .prof-tbl-wrap,
    div[style*="overflow-x:auto"] {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .menuTOP li a {
        padding: 12px 16px;
        font-size: 13px;
    }
}

#wrapper h2 {

    font-family: Oswald;
    border-bottom: 3px solid #2196F3;
    padding-bottom: 14px;
    width: 1500px;
    color: #2196F3;
}

/*popup delete orders*/
#bvConfirmOverlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    display:none; align-items:center; justify-content:center;
    z-index: 9999;
}
#bvConfirmBox {
    background:#fff; padding:25px; width:350px;
    border-radius:10px; text-align:center;
    box-shadow:0 8px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.2s ease-out;
    font-family: Arial, sans-serif;
}
#bvConfirmBox h3 { margin-top:0; color:#333; }
.bv-btn {
    padding:8px 16px; border:none; border-radius:6px;
    cursor:pointer; font-size:14px;
}
.bv-btn-danger { background:#e74c3c; color:white; }
.bv-btn-secondary { background:#bdc3c7; color:#333; }
@keyframes fadeIn {
    from { opacity:0; transform:scale(0.95); }
    to   { opacity:1; transform:scale(1); }
}

/*popup*/



.innertable th, .innertable td {
    background: none!important;
}

.qty-btn {
    float: left;
    margin-right: 0px;
}
.qty-inp {
    float: left;
    width: 28px;
    margin-left: 8px;
    margin-right: 8px;
    text-align: center;
}

.DivCourier {
    width: 20%!important;
    float: left;
}
.DivCourierBig {
    width: 40%!important;
    float: left;
}
.DivCourierBig2 {
    width: 70%!important;
    float: left;
}
.innertable {
    border-collapse: collapse;
}
.innertable td {
    border: 0px;
    border-bottom: 1px solid #bfbfbf;
}

.linka {
    color: #218ade;
    text-decoration: none;
}
.linka:hover {
    text-decoration: underline;
}


/*Status Dropdown*/

        .status-wrapper {
            position: relative;
            display: inline-block;
        }

        .status-button {
            display: block;
            padding: 6px 20px;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            transition: opacity 0.2s;
            min-width: 120px;
        }

        .status-button:hover {
            opacity: 0.8;
        }

        /* ?????? ??????? */
        .status-pending { background: #eee; color: #525252; }
        .status-abandoned { background: #9e9e9e; color: white; }
        .status-sent { background: #ff9800; color: white; }
        .status-send { background: #ff9800; color: white; }
        .status-shipped { background: #ff9800; color: white; }
        .status-completed { background: #4caf50; color: white; }
        .status-delivered { background: #4caf50; color: white; }
        .status-undeliverable { background:  #c11616; color: white; }
        .status-returned { background: #f44336; color: white; }
        .status-cancelled { background: #212121; color: white; }
        .status-destroyed { background: #e91e63; color: white; }
        .status-redirected { background: #2196f3; color: white; }
        .status-anulled {background: #c11616;color: white; }
        .status-lost {background: #795548;color: white; }

        /* Dropdown menu */
        .status-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 4px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            min-width: 150px;
            z-index: 1000;
            display: none;
        }

        .status-dropdown.show {
            display: block;
        }

        .status-option {
            padding: 10px 16px;
            cursor: pointer;
            transition: background 0.2s;
            font-size: 14px;
            border-bottom: 1px solid #f0f0f0;
        }

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

        .status-option:hover {
            background: #f5f5f5;
        }

        .status-option.active {
            background: #e3f2fd;
            font-weight: bold;
        }

        /* Loading spinner */
        .status-loading {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            margin-left: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }
/*Status Dropdown*/

        .selectedrow {
            background: linear-gradient(180deg, #fff8b9, #fff172)!important;
        }

        /* Маркиран ред в "Пакетирани днес" (ръчно "тикче") — оцветява целия ред зелено */
        .packing-list-row.order-row-marked {
            background: linear-gradient(180deg, #d9f7e3, #b6efc8) !important;
        }
        /* Confirm бутон (потвърдена поръчка) */
        .confirm-order-btn.confirmed {
            background: #16a34a !important;
            border-color: #15803d !important;
        }
        .confirm-order-btn.confirmed:hover {
            background: #15803d !important;
        }
        @media print {
            .row-mark-wrap { display: none !important; }
        }
        .row-mark-wrap {
            display: inline-block;
            vertical-align: middle;
            margin-right: 4px;
            cursor: pointer;
        }
        .row-mark-cb {
            width: 17px;
            height: 17px;
            cursor: pointer;
            vertical-align: middle;
            accent-color: #16a34a;
        }
        /* Телефон на клиента — на десктоп обикновен текст; на мобилно tap-to-call */
        .bv-tel { color: inherit; text-decoration: none; }
        @media (max-width: 900px) {
            .bv-tel { color: #1a6fb5; text-decoration: underline; cursor: pointer; }
        }

        /* Call button in the order row actions — mobile only, green (tel:) */
        .bv-call-mobile { display: none !important; }
        @media (max-width: 900px) {
            .bv-call-mobile {
                display: block !important;
                background: linear-gradient(45deg, #128a3e, #17b355) !important;
            }
        }


/*OPEN NOTESt ???????*/
/* ????? ?? ???????? */
       /* ????? ?? ??????? */
        .open-notes-btn {
            cursor: pointer;
            color: #2196f3;
            font-size: 18px;
            transition: all 0.2s;
        }

        .open-notes-btn:hover {
            color: #1976d2;
            transform: scale(1.2);
        }

        /* Overlay */
        .notes-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }

        .notes-overlay.show {
            display: block;
        }

        /* Popup ????????? */
        .notes-popup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.25);
            z-index: 1000;
            width: 340px;
            max-width: 92vw;
            padding: 16px;
            box-sizing: border-box;
        }

        .notes-popup.show {
            display: block;
        }

        .notes-header {
            font-size: 14px;
            font-weight: 700;
            color: #166534;
            margin-bottom: 12px;
            padding-right: 24px;
        }

        .notes-close {
            position: absolute;
            top: 10px;
            right: 12px;
            width: 24px;
            height: 24px;
            border: none;
            background: none;
            font-size: 17px;
            line-height: 1;
            color: #9ca3af;
            cursor: pointer;
            padding: 0;
        }
        .notes-close:hover { color: #374151; }

        .notes-textarea {
            width: 100%;
            min-height: 120px;
            padding: 9px 11px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            resize: vertical;
            font-family: inherit;
            font-size: 13px;
            color: #374151;
            box-sizing: border-box;
        }

        .notes-textarea:focus {
            outline: none;
            border-color: #16a34a;
        }

        /* Footer ? ?????? */
        .notes-footer {
            margin-top: 14px;
        }

        .notes-btn {
            cursor: pointer;
            font-weight: 600;
            transition: opacity 0.2s;
        }

        .notes-btn:hover {
            opacity: 0.85;
        }

        .notes-btn-save {
            width: 100%;
            padding: 10px;
            border: none;
            border-radius: 6px;
            background: #16a34a;
            color: #fff;
            font-size: 13px;
        }

        /* ????????? ?? ?????????? ??????? ? ????????? */
        .saved-note {
            display: none;
            margin-top: 4px;
            padding: 6px 10px;
            background: #e8f5e9;
            border-left: 3px solid #4caf50;
            border-radius: 5px;
            font-size: 12px;
            color: #2e7d32;
            width: auto;
            min-height: 36px;
            box-sizing: border-box;
        }

        .saved-note.show {
            display: block;
        }

        .saved-note-text {
            white-space: pre-wrap;
        }
/*OPEN NOTESt ???????*/

.titlemobile {
    display: none;
}



/*calendar*/

     /* ????? ?? ???????? */
        .calendar-trigger {
            padding: 8px 16px;
            background: #2196f3;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

        .calendar-trigger:hover {
            background: #1976d2;
        }

        /* ???????? ????????? */
        .calendar-wrapper {
            display: none;
            position: absolute;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            padding: 10px;
            z-index: 1000;
            min-width: 280px;
            margin: 37px 0;
        }

        .calendar-wrapper.show {
            display: block;
        }

        /* Header ? ?????/?????? */
        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding: 5px;
        }

        .calendar-nav {
            cursor: pointer;
            padding: 5px 10px;
            background: #f5f5f5;
            border-radius: 3px;
            user-select: none;
        }

        .calendar-nav:hover {
            background: #e0e0e0;
        }

        .calendar-title {
            font-weight: bold;
            font-size: 14px;
        }

        /* ??? ?? ????????? */
        .calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
            margin-bottom: 5px;
        }

        .calendar-weekday {
            text-align: center;
            font-size: 12px;
            font-weight: bold;
            color: #666;
            padding: 5px;
        }

        /* ???? */
        .calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
        }

        .calendar-day {
            text-align: center;
            padding: 8px;
            cursor: pointer;
            border-radius: 3px;
            font-size: 14px;
            transition: all 0.2s;
        }

        .calendar-day:hover {
            background: #e3f2fd;
        }

        .calendar-day.today {
            background: #fff9c4;
            font-weight: bold;
        }

        .calendar-day.selected {
            background: #2196f3;
            color: white;
            font-weight: bold;
        }

        .calendar-day.other-month {
            color: #ccc;
        }

        /* Footer ?????? */
        .calendar-footer {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #eee;
            display: flex;
            gap: 5px;
        }

        .calendar-btn {
            flex: 1;
            padding: 8px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            font-size: 13px;
        }

        .calendar-btn-submit {
            background: #4caf50;
            color: white;
        }

        .calendar-btn-submit:hover {
            background: #45a049;
        }

        .calendar-btn-cancel {
            background: #f44336;
            color: white;
        }

        .calendar-btn-cancel:hover {
            background: #da190b;
        }

        /* ????????? ?? ????????? ???? */
        .selected-date {
            margin-top: 0px;
            margin-left: 6px;
            padding: 10px;
            background: #e8f5e9;
            border: 1px solid #4caf50;
            border-radius: 4px;
            display: none;
            float: left;
        }

        .selected-date.show {
            display: block;
        }

/*calendar*/

/*Notification bar*/

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.notification.success {
    background: #28a745;
    color: white;
}

.notification.error {
    background: #dc3545;
    color: white;
}

.notification.info {
    background: #17a2b8;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-close {
    margin-left: auto;
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}
/*Notification bar*/


/*POUP ADS START*/

/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.show {
    display: flex;
    opacity: 1;
}

/* Popup Content */
.popup-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.popup-close:hover {
    color: #333;
}

/* Popup Actions */
.popup-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.popup-actions button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.popup-actions button:hover {
    background: #f5f5f5;
}

.popup-actions button.btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.popup-actions button.btn-primary:hover {
    background: #0056b3;
}

/* Responsive */
@media (max-width: 600px) {
    .popup-content {
        padding: 20px;
        width: 95%;
    }

    .popup-actions {
        flex-direction: column;
    }

    .popup-actions button {
        width: 100%;
    }
}

/*POUP ADS END*/

/* EKONT */
       .picker-container {
            max-width: 600px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .picker-header {
            background: #ff6b00;
            color: white;
            padding: 20px;
            font-size: 18px;
            font-weight: 600;
        }

        .search-section {
          /*  padding: 20px;   */
            border-bottom: 1px solid #e0e0e0;
        }

        .search-box {
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 12px 0px 12px 9px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .search-input:focus {
            outline: none;
            border-color: #ff6b00;
        }

        .search-icon {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
        }

        .loading {
            padding: 20px;
            text-align: center;
            color: #666;
        }

        .results-section {
            max-height: 400px;
            overflow-y: auto;
        }

        .result-item {
            /*padding: 16px 20px;*/
            padding: 11px 14px;
            border-bottom: 1px solid #f0f0f0;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .result-item:hover {
            background-color: #f8f8f8;
        }

        .result-item:active {
            background-color: #f0f0f0;
        }

        .result-name {
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
            font-size: 15px;
        }

        .result-address {
            color: #666;
            font-size: 13px;
            line-height: 1.4;
        }

        .result-code {
            display: inline-block;
            background: #f0f0f0;
            color: #666;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 12px;
            margin-top: 6px;
        }

        .no-results {
           /* padding: 40px 20px;
            text-align: center;
            color: #999;  */
            padding: 8px 20px;
    text-align: left;
    color: #f35d5d;
        }

        .selected-office {
            padding: 11px;
            background: #f8f9fa;
            border-top: 2px solid #ff6b00;
        }

        .selected-label {
            font-size: 12px;
            color: #666;
            margin-bottom: 8px;
            text-transform: uppercase;
            font-weight: 600;
        }

        .selected-name {
            font-size: 14px;
            font-weight: 600;
            color: #333;
            margin-bottom: 6px;
        }

        .selected-address {
            color: #666;
            font-size: 14px;
            line-height: 1.5;
        }

        .clear-btn {
            margin-top: 12px;
            padding: 8px 16px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            color: #666;
        }

        .clear-btn:hover {
            background: #f5f5f5;
        }

        .error-message {
            padding: 20px;
            background: #fff3cd;
            color: #856404;
            border-left: 4px solid #ffc107;
            margin: 20px;
        }

/* EKONT */


.msg-stats-wrapper {
    display: flex;
    gap: 15px;
    margin: 15px 0 20px 0;
    flex-wrap: wrap;
}

.msg-stat-box {
    background: #fff;
   /* border: 1px solid #ddd;   */
    border-radius: 8px;
    padding: 15px 25px;
    flex: 1;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.msg-stat-number {
    font-size: 26px;
    font-weight: bold;
    color: #218ADE;
    margin-bottom: 5px;
}

.msg-stat-label {
    font-size: 13px;
    color: #888;
}

.color-green {
    color: #4CAF50;
}

/* KUPI MESSAGES*/
        .msg-stats-wrapper {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        .msg-stat-box {
            background: #f5f5f5;
            border-radius: 8px;
            padding: 15px;
            text-align: center;
        }

        .msg-stat-label {
            font-size: 15px;
            color: #888;
            margin-bottom: 6px;
        }

        .msg-stat-number {
            font-size: 39px;
            font-weight: 500;
            color: #218ADE;
            padding-top: 20px;
        }

        .msg-stat-sublabel {
            font-size: 11px;
            color: #888;
            margin-top: 4px;
        }

        .color-green {
            color: #4CAF50;
        }

        .msg-stat-box.highlight {
            background: #218ADE;
            text-align: center;
        }

        .msg-stat-box.highlight .msg-stat-label {
            color: #d0e8ff;
        }

        .msg-stat-box.highlight .msg-stat-number {
            color: #fff;
            font-size: 15px;
        }

        .msg-packages {
            display: flex;
            gap: 4px;
            justify-content: center;
            margin-top: 8px;
        }

        .msg-package-pill {
            background: rgba(255,255,255,0.15);
            color: white;
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 4px;
        }

        .btn-buy {
            display: inline-block;
            margin-top: 10px;
            background: #ffeb3b;
            color: #333;
            font-weight: 500;
            font-size: 13px;
            padding: 6px 16px;
            border-radius: 4px;
            text-decoration: none;
        }

        .btn-buy:hover {
            background: #fdd835;
}
/* KUPI MESSAGES*/

a.btn-clear-filter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e74c3c;
    display: block;
    text-align: center;
    line-height: 32px;
    color: white;
    text-decoration: none;
}

/*PACKAGES MESSAGES*/
        .pkg-cards-wrapper {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-bottom: 32px;
        }
        .pkg-card {
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 12px;
            overflow: hidden;
            text-align: center;
            position: relative;
        }
        .pkg-card-featured {
            border: 2px solid #218ADE;
        }
        .pkg-card-badge-top {
            position: absolute;
            top: -1px;
            right: 16px;
            background: #27ae60;
            color: #fff;
            font-size: 10px;
            font-weight: 500;
            padding: 3px 10px;
            border-radius: 0 0 6px 6px;
        }
        .pkg-card-header {
            padding: 14px;
        }
        .pkg-card-header-starter {
            background: #f0f7ff;
            border-bottom: 1px solid #dce8f5;
        }
        .pkg-card-header-standard {
            background: #218ADE;
        }
        .pkg-card-header-pro {
            background: #fffde7;
            border-bottom: 1px solid #f0e88a;
        }
        .pkg-card-name {
            font-size: 17px;
            font-weight: 500;
            color: #218ADE;
        }
        .pkg-card-name-white {
            color: #fff;
        }
        .pkg-card-name-pro {
            color: #7a6200;
        }
        .pkg-card-body {
            padding: 24px 20px;
        }
        .pkg-card-count {
            font-size: 42px;
            font-weight: 700;
            color: #333;
            line-height: 1;
        }
        .pkg-card-unit {
            font-size: 13px;
            color: #888;
            margin-bottom: 16px;
        }
        .pkg-card-price {
            font-size: 26px;
            font-weight: 700;
            color: #218ADE;
            margin-bottom: 4px;
        }
        .pkg-card-ppm {
            font-size: 12px;
            color: #aaa;
            margin-bottom: 12px;
        }
        .pkg-card-save {
            border-radius: 6px;
            padding: 6px 10px;
            font-size: 12px;
            margin-bottom: 20px;
        }
        .pkg-card-save-base {
            background: #f0f7ff;
            color: #185FA5;
        }
        .pkg-card-save-green {
            background: #e8f8ef;
            color: #27ae60;
            font-weight: 500;
        }
        .pkg-btn-buy {
            display: block;
            background: #218ADE;
            color: #fff;
            padding: 11px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
        }
        .pkg-btn-buy:hover {
            background: #1a6bb3;
            color: #fff;
            text-decoration: none;
        }
        .pkg-btn-pro {
            background: #ffeb3b;
            color: #5a4400;
        }
        .pkg-btn-pro:hover {
            background: #fdd835;
            color: #5a4400;
        }


        .pkg-balance-bar {
            background: #f5f5f5;
            border-radius: 8px;
            padding: 14px 20px;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .pkg-balance-label {
            font-size: 14px;
            color: #666;
        }
        .pkg-balance-number {
            font-size: 20px;
            font-weight: bold;
            color: #27ae60;
        }
        .pkg-balance-sub {
            font-size: 13px;
            color: #999;
        }



        .pkg-history-wrap {
            background: #f9f9f9;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .pkg-history-title {
            font-size: 15px;
            font-weight: 500;
            color: #333;
            margin-bottom: 14px;
        }
        .pkg-price-cell {
            color: #218ADE;
            font-weight: 500;
        }
        .pkg-remaining-cell {
            color: #27ae60;
            font-weight: 500;
        }

        .pkg-stripe-note {
            text-align: center;
            font-size: 12px;
            color: #aaa;
            margin-top: 10px;
        }
        .pkg-history-wrap {
            margin-bottom: 20px;
        }
        .pkg-history-title {
            font-size: 13px;
            font-weight: 500;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }
        .pkg-history-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .pkg-history-row {
            display: grid;
            grid-template-columns: 120px 1fr 100px 100px 100px 80px;
            align-items: center;
            padding: 14px 20px;
            background: #fff;
            border: 1px solid #e8e8e8;
            border-radius: 10px;
        }
        .pkg-history-row-dim {
            opacity: 0.55;
        }
        .pkg-history-col {
            padding-right: 10px;
        }
        .pkg-history-col-center {
            text-align: center;
            padding-right: 0;
        }
        .pkg-history-col-main {
            padding-right: 10px;
        }
        .pkg-history-label {
            font-size: 12px;
            color: #aaa;
            margin-bottom: 3px;
        }
        .pkg-history-value {
            font-size: 15px;
            color: #333;
        }
        .pkg-history-bold {
            font-size: 16px;
            font-weight: 500;
        }
        .pkg-history-blue {
            font-size: 15px;
            font-weight: 500;
            color: #218ADE;
        }
        .pkg-history-green {
            font-size: 15px;
            font-weight: 500;
            color: #27ae60;
        }
        .pkg-history-dim {
            color: #bbb;
        }
/*PACKAGES MESSAGES*/


/*line for main tabs*/
.shop-nav-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 20px;
}
.shop-nav-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
}
.shop-nav-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 15px;
    color: #888;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s;
    white-space: nowrap;
}
.shop-nav-tab:hover {
    color: #218ADE;
    text-decoration: none;
}
.shop-nav-tab.active {
    color: #218ADE;
    border-bottom: 2px solid #218ADE;
    font-weight: 500;
}
.shop-nav-tab.active_green {
    color: #218ADE;
    border-bottom: 2px solid #27ae60;
    font-weight: 500;
}
.shop-nav-tab.active_orange {
    color: #218ADE;
    border-bottom: 2px solid #f39c12;
    font-weight: 500;
}
.shop-nav-tab svg {
    flex-shrink: 0;
}
.shop-nav-back {
    display: inline-block;
    background: #218ADE;
    color: #fff;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 8px;
    white-space: nowrap;
}
/*line for main tabs*/

/*line before main tabs statistics*/

.shop-header-bar {
    background: #218ADE;
    border-radius: 10px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}
.shop-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.shop-header-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}
.shop-header-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.shop-header-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.shop-header-stat {
    text-align: center;
}
.shop-header-stat-number {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.shop-header-stat-profit {
    color: #ffeb3b;
}
.shop-header-stat-vat {
    color: #ff9f43;
}
.shop-header-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}
.shop-header-stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.25);
}


/*line before main tabs statistics*/


/*fast buttons about myorders*/
.order-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.order-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}
.order-action-btn:hover {
    opacity: 0.88;
    text-decoration: none;
    color: #fff;
}
.order-action-badge {
    background: rgba(255,255,255,0.25);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
}
.btn-packing  { background: #218ADE; }
.btn-products { background: #f39c12; }
.btn-warnings { background: #e74c3c; }
.btn-new { background: #8bc34a;margin-left: auto; }
/*fast buttons about myorders*/


/*packing-wrap myorders*/

.packing-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}
.packing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.packing-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}
.packing-date {
    font-size: 13px;
    color: #aaa;
    margin-top: 2px;
}
.packing-header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}
.packing-btn-pdf {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #27ae60;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
.packing-btn-pdf:hover {
    background: #1e8449;
    color: #fff;
    text-decoration: none;
}
.packing-btn-back {
    background: #218ADE;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
}
.packing-btn-back:hover {
    background: #1a6bb3;
    color: #fff;
    text-decoration: none;
}

.packing-summary-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.packing-summary-box {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
}
.packing-summary-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.packing-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}
.packing-summary-green { color: #27ae60; }
.packing-summary-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

.packing-section-title {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.packing-list {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}
.packing-list-header {
    display: grid;
    grid-template-columns: 140px 160px 1fr 140px 90px 110px;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f8f8;
    border-bottom: 2px solid #218ADE;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.packing-list-row {
    display: grid;
    grid-template-columns: 140px 160px 1fr 140px 90px 110px;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
    font-size: 13px;
}
.packing-list-row:last-child { border-bottom: none; }
.packing-list-row:hover { background: #fafafa; }

.packing-awb {
    font-weight: 700;
    color: #218ADE;
    font-size: 12px;
    word-break: break-all;
}
.packing-awb {
    color: #218ADE;
    text-decoration: none;
}

.packing-customer {
    font-weight: 500;
    color: #333;
}
.packing-products { color: #555; }
.packing-product-row {
    margin-bottom: 3px;
    font-size: 12px;
}
.packing-product-row:last-child { margin-bottom: 0; }
.packing-product-qty {
    font-weight: 700;
    color: #218ADE;
    margin-right: 4px;
}
.packing-courier {
    font-size: 12px;
    color: #888;
}
.packing-type {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
}
.packing-type-office  { background: #e8f4fd; color: #185FA5; }
.packing-type-address { background: #e8f8ef; color: #1a7a40; }

.packing-col-right { text-align: right; }
.packing-cod {
    font-weight: 700;
    color: #27ae60;
    text-align: right;
}
.packing-cod-bgn {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}

.packing-products-summary {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}
.packing-product-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.packing-product-summary-row:last-child { border-bottom: none; }
.packing-product-summary-name { color: #333; }
.packing-product-summary-qty {
    background: #218ADE;
    color: #fff;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.packing-empty {
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}

@media print {
    .shop-header-bar,
    .shop-nav-wrapper,
    .order-action-buttons,
    .orders-stats-grid,
    .cnt,
    .easyship-sec,
    header,
    #header,
    #productsNeededSection,
    #warningsSection,
    #callSection,
    #takenSection,
    .packing-btn-pdf,
    .packing-btn-back,
    #notesOverlay,
    #notesPopup,
    .pagination,
    .filter-bar,
    #mystat_btns_inline,
    .packing-header-right {
        display: none !important;
    }
    .packing-wrap {
        display: block !important;
    }
    .packing-list-header,
    .packing-list-row {
        grid-template-columns: 130px 120px 1fr 100px 70px 90px;
        font-size: 11px;
        padding: 6px 8px;
        overflow: visible;
    }
    .packing-col-right {
        text-align: right;
        white-space: nowrap;
    }
    .packing-awb {
        font-size: 11px;
        word-break: keep-all;
        white-space: nowrap;
    }
    .packing-product-row {
        white-space: nowrap;
        font-size: 11px;
    }
    .packing-list {
        overflow: visible;
        border: 1px solid #ccc;
        width: 100%;
    }
    .packing-summary-boxes {
        grid-template-columns: repeat(4, 1fr);
    }
    .packing-summary-box {
        padding: 8px;
    }
    .packing-cod {
        font-size: 11px;
        text-align: right;
        white-space: nowrap;
    }
    #packingSection {
        display: block !important;
    }
    .packing-summary-value {
        font-size: 16px;
    }
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
   
}


/*packing-wrap myorders*/

/* products needed myorders*/

.products-needed-wrap {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}
.products-needed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.products-needed-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
.products-needed-btn-pdf {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #27ae60;
    color: #fff;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
.products-needed-btn-pdf:hover {
    background: #1e8449;
    color: #fff;
    text-decoration: none;
}
.products-needed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.products-needed-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f0f7ff;
    border-radius: 6px;
}
.products-needed-name {
    font-size: 13px;
    color: #333;
}
.products-needed-qty {
    background: #218ADE;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
}

@media print {
    .products-needed-btn-pdf {
        display: none !important;
    }
    .products-needed-wrap {
        display: block !important;
    }
    .products-needed-row {
        background: #f0f7ff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* products needed myorders*/

/* warnings myorders*/

.warnings-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.warning-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.warning-red {
    background: #fef0f0;
    color: #a93226;
}
.warning-yellow {
    background: #fff8e1;
    color: #7a6200;
}
.warning-green {
    background: #e8f8ef;
    color: #1a7a40;
}
.warning-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.warning-row strong {
    font-weight: 500;
}

/* warnings myorders*/


/* reminder call myorders

.btn-call { background: #8e44ad; }
.btn-call:hover { background: #7d3c98; }

.call-section {
    background: #fff;
    border: 0.5px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.call-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 0.5px solid #e8e8e8;
}
.call-section-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}
.call-section-subtitle {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}
.call-section-badge {
    background: #f5f0ff;
    color: #534AB7;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 20px;
}
.call-list-header {
    display: grid;
    grid-template-columns: 1fr 140px 130px 110px 80px;
    align-items: center;
    padding: 10px 18px;
    background: #f8f8f8;
    border-bottom: 2px solid #8e44ad;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.call-list-row {
    display: grid;
    grid-template-columns: 1fr 140px 130px 110px 80px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 0.5px solid #c1c0c0;
}
.call-list-row:last-child { border-bottom: none; }
.call-row-red  { background: #fef0f0; }
.call-row-yellow { background: #fff8e1; }

.call-customer-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}
.call-customer-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}
.call-phone a {
    font-size: 13px;
    color: #8e44ad;
    font-weight: 500;
    text-decoration: none;
}
.call-phone a:hover { text-decoration: underline; }
.call-awb {
    font-size: 12px;
    color: #888;
}
.call-col-center { text-align: center; }
.call-days-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}
.call-days-red    { background: #fef0f0; color: #A32D2D; }
.call-days-yellow { background: #fff8e1; color: #854F0B; }
.call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #8e44ad;
    border-radius: 6px;
    text-decoration: none;
}
.call-btn:hover { background: #7d3c98; }
.call-empty {
    padding: 24px 18px;
    text-align: center;
    color: #aaa;
    font-size: 13px;
}


/* reminder call myorders*/


.btn-call { background: #8e44ad; }
.btn-call:hover { background: #7d3c98; color: #fff; text-decoration: none; }

.call-section {
    background: #fff;
    border: 0.5px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.call-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 0.5px solid #e8e8e8;
}
.call-section-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}
.call-section-subtitle {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}
.call-section-badge {
    background: #f5f0ff;
    color: #534AB7;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 20px;
}
.call-list-header {
    display: grid;
    grid-template-columns: 1fr 130px 120px 120px 1fr 1fr 100px 100px 70px;
    align-items: center;
    padding: 10px 18px;
    background: #f8f8f8;
    border-bottom: 2px solid #8e44ad;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.call-list-row {
    display: grid;
    grid-template-columns: 1fr 130px 120px 120px 1fr 1fr 100px 100px 70px;
    align-items: start;
    padding: 12px 18px;
    border-bottom: 0.5px solid #b3b3b3;
}
.call-list-row:last-child { border-bottom: none; }
.call-row-red    { background: #fef0f0; }
.call-row-yellow { background: #fff8e1; }

.call-customer-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}
.call-customer-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}
.call-phone a {
    font-size: 13px;
    color: #8e44ad;
    font-weight: 500;
    text-decoration: none;
}
.call-phone a:hover { text-decoration: underline; }
.call-awb {
    font-size: 12px;
    color: #888;
    padding-top: 2px;
}

.call-address {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    padding-top: 2px;
}
.call-address-street {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}
.call-products {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}
.call-product-row { margin-bottom: 2px; }
.call-product-qty {
    font-weight: 500;
    color: #8e44ad;
    margin-right: 4px;
}
.call-total {
    font-size: 13px;
    font-weight: 500;
    color: #27ae60;
    padding-top: 2px;
}
.call-total-bgn {
    display: block;
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}
.call-col-center { text-align: center; }
.call-col-left { text-align: left; }
.call-days-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}
.call-days-red    { background: #fef0f0; color: #A32D2D; }
.call-days-yellow { background: #fff8e1; color: #854F0B; }
.call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #8e44ad;
    border-radius: 6px;
    text-decoration: none;
}
.call-btn:hover { background: #7d3c98; }
.call-empty {
    padding: 24px 18px;
    text-align: center;
    color: #aaa;
    font-size: 13px;
}


/* reminder call myorders*/

/* other stats orders*/

.orders-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.orders-stat-box {
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    border-left: 4px solid;
}
.orders-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.orders-stat-number {
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
}
.orders-stat-sub {
    font-size: 11px;
    margin-top: 4px;
}
.orders-stat-blue   { background: #e8f4fd; border-color: #218ADE; }
.orders-stat-blue .orders-stat-label,
.orders-stat-blue .orders-stat-number { color: #185FA5; }
.orders-stat-blue .orders-stat-sub    { color: #378ADD; }

.orders-stat-orange { background: #fff8e1; border-color: #f39c12; }
.orders-stat-orange .orders-stat-label,
.orders-stat-orange .orders-stat-number { color: #854F0B; }
.orders-stat-orange .orders-stat-sub    { color: #BA7517; }

.orders-stat-red    { background: #fef0f0; border-color: #e74c3c; }
.orders-stat-red .orders-stat-label,
.orders-stat-red .orders-stat-number { color: #A32D2D; }
.orders-stat-red .orders-stat-sub    { color: #E24B4A; }

.orders-stat-darkred { background: #fef0f0; border-color: #c0392b; }
.orders-stat-darkred .orders-stat-label,
.orders-stat-darkred .orders-stat-number { color: #791F1F; }
.orders-stat-darkred .orders-stat-sub    { color: #A32D2D; }

.orders-stat-green  { background: #e8f8ef; border-color: #27ae60; }
.orders-stat-green .orders-stat-label,
.orders-stat-green .orders-stat-number { color: #1a7a40; }
.orders-stat-green .orders-stat-sub    { color: #27ae60; }

.orders-stat-purple { background: #f5f0ff; border-color: #8e44ad; }
.orders-stat-purple .orders-stat-label,
.orders-stat-purple .orders-stat-number { color: #5b2c6f; }
.orders-stat-purple .orders-stat-sub    { color: #8e44ad; }

/* other stats orders*/

/* business myorders table*/

/* Business stats table */
.business-table-wrap {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    overflow-x: auto;
    color: #4d4d4d;
}
.business-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
   /* min-width: 1200px;  */
}
.business-table thead tr, .easyship-table thead tr {
    background: #f8f9fa;
}
.business-table th {
    padding: 10px 8px;
    text-align: right;
    font-weight: 500;
    font-size: 13px;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.business-table th:first-child { text-align: center; border-bottom-color: #218ADE; color: #218ADE; }
.business-table th.col-turnover { color: #218ADE; border-bottom-color: #218ADE; }
.business-table th.col-ads      { color: #e74c3c; border-bottom-color: #e74c3c; }
.business-table th.col-profit   { color: #27ae60; border-bottom-color: #27ae60; }
.business-table th.col-cogs     { color: #f39c12; border-bottom-color: #f39c12; }
.business-table th.col-roi      { color: #8e44ad; border-bottom-color: #8e44ad; }

.business-table tbody tr { border-bottom: 1px solid #bfbfbf; }
.business-table tbody tr:nth-child(even) { background: #fafafa; }
.business-table tbody tr.row-weekend { background: #f0f0f0; }
.business-table tbody tr.row-today { background: #fffec5; }
.business-table tbody tr.row-loss { background: #fff8f8; }
.business-table tbody tr.row-loss:nth-child(even) { background: #fff0f0; }

.business-table td {
    padding: 8px;
    text-align: right;
    /*color: #555;*/
    font-size: 13px;
    vertical-align: middle;
}
.business-table td:first-child { text-align: center; color: #333; font-weight: 500; }

.business-table td small {
    display: block;
    font-size: 10px;
    color: #aaa;
    font-style: italic;
}

/* Стойности */
.val-turnover { font-weight: 500; color: #218ADE; }
.val-turnover-zero { font-weight: 500; color: #555; }
.val-ads      { color: #e74c3c; }
.val-profit-pos { font-weight: 500; color: #27ae60; }
.val-profit-neg { font-weight: 500; color: #e74c3c; }
.val-cogs     { color: #f39c12; }
.val-roi-pos  { font-weight: 500; color: #8e44ad; }
.val-roi-neg  { font-weight: 500; color: #e74c3c; }
.val-muted    { color: #aaa; }

/* ROAS пилюла */
.roas-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}
.roas-good { background: #e8f8ef; color: #27ae60; }
.roas-bad  { background: #fef0f0; color: #e74c3c; }
.roas-warn { background: #fff8e1; color: #f39c12; }

/* Тотален ред */
.business-table tfoot tr { border-top: 2px solid #333; }
.business-table tfoot td {
    padding: 10px 8px;
    font-weight: 500;
    background: #fff !important;
    border: none !important;
}
.business-table tfoot td.total-turnover { color: #218ADE; }
.business-table tfoot td.total-profit   { color: #27ae60; font-weight: 700; }

/* business myorders table*/

/* =========================================
   Бизнес статистики — кутии горе
   ========================================= */
.biz-stats-top {
    margin-bottom: 20px;
}
.biz-stats-row {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}
.biz-stats-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

.biz-kbox {
    border-radius: 0 8px 8px 0;
    padding: 13px 15px;
    border-left: 4px solid;
}
.biz-kbox-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
    font-weight: 500;
}
.biz-kbox-value {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.1;
}
.biz-kbox-sub {
    font-size: 12px;
    margin-top: 3px;
}
.biz-kbox-trend {
    font-size: 12px;
    font-weight: 500;
    margin-top: 3px;
}

/* Цветови варианти */
.biz-kbox-blue   { background: #e8f4fd; border-color: #218ADE; }
.biz-kbox-blue .biz-kbox-label,
.biz-kbox-blue .biz-kbox-value  { color: #185FA5; }
.biz-kbox-blue .biz-kbox-sub    { color: #378ADD; }

.biz-kbox-green  { background: #e8f8ef; border-color: #27ae60; }
.biz-kbox-green .biz-kbox-label,
.biz-kbox-green .biz-kbox-value { color: #1a7a40; }
.biz-kbox-green .biz-kbox-sub   { color: #27ae60; }

.biz-kbox-orange { background: #fff8e1; border-color: #f39c12; }
.biz-kbox-orange .biz-kbox-label,
.biz-kbox-orange .biz-kbox-value { color: #854F0B; }
.biz-kbox-orange .biz-kbox-sub   { color: #BA7517; }

.biz-kbox-purple { background: #f0eeff; border-color: #8e44ad; }
.biz-kbox-purple .biz-kbox-label,
.biz-kbox-purple .biz-kbox-value { color: #3C3489; }
.biz-kbox-purple .biz-kbox-sub   { color: #534AB7; }

.biz-kbox-red    { background: #fef0f0; border-color: #e74c3c; }
.biz-kbox-red .biz-kbox-label,
.biz-kbox-red .biz-kbox-value   { color: #A32D2D; }
.biz-kbox-red .biz-kbox-sub     { color: #E24B4A; }

.biz-kbox-teal   { background: #e1f5ee; border-color: #1D9E75; }
.biz-kbox-teal .biz-kbox-label,
.biz-kbox-teal .biz-kbox-value  { color: #085041; }
.biz-kbox-teal .biz-kbox-sub    { color: #0F6E56; }

/* Trend цветове */
.biz-trend-up   { color: #27ae60; }
.biz-trend-dn   { color: #e74c3c; }
.biz-trend-warn { color: #f39c12; }
.biz-trend-neu  { color: #888; }

/* Стойности с цвят */
.biz-val-up { color: #27ae60 !important; }
.biz-val-dn { color: #e74c3c !important; }

/* AI наблюдения */
.biz-ai-box {
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 4px;
}
.biz-ai-title {
    font-size: 11px;
    font-weight: 500;
    color: #185FA5;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.biz-ai-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 0.5px solid #f0f0f0;
    font-size: 12px;
    color: #444;
    line-height: 1.5;
}
.biz-ai-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.biz-ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.biz-ai-dot-success { background: #27ae60; }
.biz-ai-dot-warning { background: #f39c12; }
.biz-ai-dot-danger  { background: #e74c3c; }
.biz-ai-dot-info    { background: #218ADE; }
.biz-ai-text        { flex: 1; }

/* =========================================
    Бизнес статистики — кутии горе
    ========================================= */

    /* Навигация по месеци — бизнес статистики */
.biz-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 14px;
    border-bottom: 0.5px solid #e8e8e8;
}
.biz-month-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 7px;
    border: 0.5px solid #d0d0d0;
    background: #fff;
    color: #218ADE;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s;
}
.biz-month-btn:hover {
    background: #e8f4fd;
}
.biz-month-current {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}
.biz-month-today {
    font-size: 11px;
    color: #218ADE;
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 10px;
    background: #e8f4fd;
}
.biz-month-today:hover {
    background: #218ADE;
    color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
    .biz-stats-row-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .biz-stats-row-4 { grid-template-columns: 1fr; }
    .biz-kbox        { border-radius: 8px; }
}



/* =========================================
   Статистики за съобщения
   ========================================= */
.msg-stats-wrap {
    margin-bottom: 20px;
}

/* Предупреждения */
.msg-warn-box,
.msg-info-box {
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}
.msg-warn-box {
    background: #fef0f0;
    border: 1px solid #e74c3c;
}
.msg-info-box {
    background: #e8f4fd;
    border: 1px solid #218ADE;
}
.msg-warn-title  { font-size: 13px; font-weight: 500; color: #A32D2D; margin-bottom: 2px; }
.msg-warn-sub    { font-size: 11px; color: #e74c3c; }
.msg-info-title  { font-size: 13px; font-weight: 500; color: #185FA5; margin-bottom: 2px; }
.msg-info-sub    { font-size: 11px; color: #378ADD; }

/* Кутии — grid */
.msg-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.msg-stat-box {
    border-radius: 0 8px 8px 0;
    border-left: 4px solid;
    padding: 13px 15px;
}
.msg-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
    margin-bottom: 5px;
}
.msg-stat-value {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.1;
}
.msg-stat-sub {
    font-size: 12px;
    margin-top: 3px;
}
.msg-stat-trend {
    font-size: 12px;
    font-weight: 500;
    margin-top: 3px;
}

/* Цветови варианти */
.msg-stat-blue   { background: #e8f4fd; border-color: #218ADE; }
.msg-stat-blue .msg-stat-label,
.msg-stat-blue .msg-stat-value  { color: #185FA5; }
.msg-stat-blue .msg-stat-sub    { color: #378ADD; }

.msg-stat-green  { background: #e8f8ef; border-color: #27ae60; }
.msg-stat-green .msg-stat-label,
.msg-stat-green .msg-stat-value { color: #1a7a40; }
.msg-stat-green .msg-stat-sub   { color: #27ae60; }

.msg-stat-orange { background: #fff8e1; border-color: #f39c12; }
.msg-stat-orange .msg-stat-label,
.msg-stat-orange .msg-stat-value { color: #854F0B; }
.msg-stat-orange .msg-stat-sub   { color: #BA7517; }

.msg-stat-purple { background: #f0eeff; border-color: #8e44ad; }
.msg-stat-purple .msg-stat-label,
.msg-stat-purple .msg-stat-value { color: #3C3489; }
.msg-stat-purple .msg-stat-sub   { color: #534AB7; }

/* Trend цветове */
.msg-trend-up  { color: #27ae60; }
.msg-trend-dn  { color: #e74c3c; }
.msg-trend-neu { color: #888; }

/* Таблица по темплейт */
.msg-template-wrap {
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
}
.msg-template-title {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 12px 16px 0;
    margin-bottom: 8px;
}
.msg-template-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.msg-template-table thead tr {
    background: #f8f9fa;
}
.msg-template-table th {
    padding: 9px 12px;
    text-align: left;
    font-size: 10px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #218ADE;
    white-space: nowrap;
}
.msg-template-table td {
    padding: 10px 12px;
    border-bottom: 0.5px solid #f5f5f5;
    vertical-align: middle;
}
.msg-template-table tr:last-child td { border-bottom: none; }
.msg-template-table tr:hover td      { background: #fafafa; }

.msg-tbl-num   { /*text-align: right;*/ }
.msg-tpl-name  { font-weight: 500; color: #333; }
.msg-seen-val  { color: #27ae60; font-weight: 500; }
.msg-failed-val { color: #e74c3c; font-weight: 500; }

/* Пилюли */
.msg-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}
.msg-pill-green  { background: #e8f8ef; color: #1a7a40; }
.msg-pill-orange { background: #fff8e1; color: #854F0B; }
.msg-pill-red    { background: #fef0f0; color: #A32D2D; }
.msg-pill-purple { background: #f0eeff; color: #3C3489; }
.msg-pill-blue   { background: #e8f4fd; color: #185FA5; }
.msg-conv-val       { color: #3C3489; font-weight: 500; }

/* Responsive */
@media (max-width: 1024px) {
    .msg-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .msg-stats-grid    { grid-template-columns: 1fr; }
    .msg-stat-box      { border-radius: 8px; }
    .msg-template-table { font-size: 11px; }
    .msg-template-table th,
    .msg-template-table td { padding: 7px 8px; }
}

/* =========================================
    Статистики за съобщения
    ========================================= */


/* =========================================
    Отстъпка в поръчките
    ========================================= */

    .disc-section{border:0.5px solid #c8c8c8;border-radius:10px;padding:14px 18px;margin:14px 0;background:#fff}
.disc-section h4{font-size:13px;font-weight:500;color:#444;margin:0 0 10px;padding-bottom:8px;border-bottom:0.5px solid #e0e0e0}
.disc-presets{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}
.disc-preset{padding:5px 13px;font-size:12px;border:0.5px solid #bbb;border-radius:6px;background:#f4f4f4;color:#444;cursor:pointer}
.disc-preset.dactive{background:#218ADE;color:#fff;border-color:#1a6bb3}
.disc-row{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:13px;color:#555}
.disc-row label{min-width:80px}
.disc-inp-vis{height:32px;padding:0 9px;font-size:13px;border:0.5px solid #bbb;border-radius:6px;width:80px}
.disc-toggle{display:flex;border:0.5px solid #bbb;border-radius:6px;overflow:hidden;font-size:12px}
.disc-toggle span{padding:5px 11px;cursor:pointer;background:#f4f4f4;color:#555;user-select:none}
.disc-toggle span.don{background:#218ADE;color:#fff}
.disc-note-vis{height:32px;padding:0 9px;font-size:13px;border:0.5px solid #bbb;border-radius:6px;flex:1}
.disc-summary{background:#f8f8f8;border-radius:6px;padding:10px 14px;margin:10px 0;font-size:13px}
.disc-summary-row{display:flex;justify-content:space-between;padding:2px 0;color:#555}
.disc-summary-row.dgreen{color:#0a8a55;font-weight:500}
.disc-summary-row.dtotal{font-size:14px;font-weight:500;color:#222;border-top:0.5px solid #ddd;margin-top:5px;padding-top:5px}
.disc-remove-link{font-size:12px;color:#999;text-decoration:underline;cursor:pointer;margin-left:8px}

/* =========================================
    Отстъпка в поръчките
    ========================================= */

/* =========================================
    Грид в продуктите към магазина
    ========================================= */


.pstat-grid {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.pstat-box {
    flex: 1;
    padding: 14px 16px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.pstat-box:last-child {
    border-right: none;
}

.pstat-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.pstat-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pstat-num-sm {
    font-size: 16px;
    margin-top: 4px;
}

.pstat-sub {
    font-size: 13px;
}

.pstat-blue   { background: #e8f4fd; }
.pstat-blue   .pstat-label,
.pstat-blue   .pstat-num  { color: #1a5c9e; }
.pstat-blue   .pstat-sub  { color: #4a90c4; }

.pstat-orange { background: #fff3e0; }
.pstat-orange .pstat-label,
.pstat-orange .pstat-num  { color: #c4620a; }
.pstat-orange .pstat-sub  { color: #e07b1a; }

.pstat-purple { background: #f3e5f5; }
.pstat-purple .pstat-label,
.pstat-purple .pstat-num  { color: #4a148c; }
.pstat-purple .pstat-sub  { color: #7b1fa2; }

.pstat-green  { background: #e8f5e9; }
.pstat-green  .pstat-label,
.pstat-green  .pstat-num  { color: #1b5e20; }
.pstat-green  .pstat-sub  { color: #388e3c; }

/* =========================================
    Грид в продуктите към магазина
    ========================================= */

    .product-filter-select {
    width: 160px !important;
}

.pf-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-option-img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.pf-option-name {
    font-size: 13px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.select2-container--default .select2-selection--single {
    height: 30px;
    border: 1px solid #aaa;
    border-radius: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    padding-left: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 28px;
}

/*----------------------------------
     ДРУГИ РАЗХОДИ НАЧАЛО
    -----------------------------------*/

.exp-stats-grid { display: flex; gap: 0; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.exp-stat-box { flex: 1; padding: 14px 16px; border-right: 1px solid rgba(0,0,0,0.08); }
.exp-stat-box:last-child { border-right: none; }
.exp-stat-label { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px; }
.exp-stat-num { font-size: 24px; font-weight: 700; line-height: 1.1; margin-bottom: 2px; }
.exp-stat-sub { font-size: 11px; }
.exp-stat-blue   { background: #e8f4fd; }
.exp-stat-blue   .exp-stat-label, .exp-stat-blue   .exp-stat-num { color: #1a5c9e; }
.exp-stat-blue   .exp-stat-sub { color: #4a90c4; }
.exp-stat-orange { background: #fff3e0; }
.exp-stat-orange .exp-stat-label, .exp-stat-orange .exp-stat-num { color: #c4620a; }
.exp-stat-orange .exp-stat-sub { color: #e07b1a; }
.exp-stat-purple { background: #f3e5f5; }
.exp-stat-purple .exp-stat-label, .exp-stat-purple .exp-stat-num { color: #4a148c; }
.exp-stat-purple .exp-stat-sub { color: #7b1fa2; }
.exp-stat-red    { background: #fdecea; }
.exp-stat-red    .exp-stat-label, .exp-stat-red    .exp-stat-num { color: #b71c1c; }
.exp-stat-red    .exp-stat-sub { color: #e53935; }

.exp-permanent-wrap { margin-bottom: 20px; }
.exp-section-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #218ADE; }

.exp-filters { margin-bottom: 14px; }
.exp-filters form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.exp-form-wrap { background: #fff; border: 1px solid #ddd; border-radius: 10px; padding: 18px 20px; margin-bottom: 20px; }
.exp-form-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.exp-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }
.exp-full { grid-column: 1 / -1; }
.exp-form-group label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.3px; }

.exp-type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.exp-type-tab { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #bbb; border-radius: 6px; cursor: pointer; font-size: 13px; color: #444; background: #f5f5f5; transition: background 0.15s; }
.exp-type-tab input[type="radio"] { display: none; }
.exp-type-active { background: #218ADE !important; color: #fff !important; border-color: #1a6bb3 !important; }

.exp-vat-result { margin-top: 6px; font-size: 12px; color: #0a8a55; background: #e8f5e9; padding: 4px 8px; border-radius: 4px; }

.exp-badge-perm { background: #e3f2fd; color: #1565c0; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.exp-badge-vat { background: #fff3e0; color: #c4620a; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.exp-status-paid { background: #e8f5e9; color: #2e7d32; font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.exp-status-pending { background: #fdecea; color: #b71c1c; font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }

/*----------------------------------
     ДРУГИ РАЗХОДИ КРАЙ
    -----------------------------------*/

/*----------------------------------
     ДРУГИ РАЗХОДИ за конкретен магазин НАЧЛАО
    -----------------------------------*/

.se-shop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.se-shop-nav-btn {
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #f5f5f5;
    color: #444;
    text-decoration: none;
    white-space: nowrap;
}

.se-shop-nav-active {
    background: #218ADE;
    color: #fff !important;
    border-color: #1a6bb3;
}

.se-shop-nav-back {
    margin-left: auto;
    color: #888;
}

.se-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 14px;
}

.se-tab {
    /*padding: 8px 16px;     */
    font-size: 15px;
    color: #888;
    text-decoration: none;
   /*border-bottom: 2px solid transparent;
    margin-bottom: -2px; */
    white-space: nowrap;
    display: inline-block;
}

.se-tab-active {
    color: #2563a8;
    border-bottom: 2px solid #2563a8;
    font-weight: 600;
}

.se-tab-green {
    color: #35a600;
}

.se-tab-green:hover {
    color: #2a8000;
}

.se-stat-grid {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.se-stat-box {
    flex: 1;
    padding: 14px 16px;
    border-right: 1px solid rgba(0,0,0,0.08);
}

.se-stat-box:last-child { border-right: none; }

.se-stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.se-stat-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2px;
}

.se-stat-sub { font-size: 11px; }

.se-stat-blue   { background: #e8f4fd; }
.se-stat-blue   .se-stat-label,
.se-stat-blue   .se-stat-num  { color: #1a5c9e; }
.se-stat-blue   .se-stat-sub  { color: #4a90c4; }

.se-stat-orange { background: #fff3e0; }
.se-stat-orange .se-stat-label,
.se-stat-orange .se-stat-num  { color: #c4620a; }
.se-stat-orange .se-stat-sub  { color: #e07b1a; }

.se-stat-green  { background: #e8f5e9; }
.se-stat-green  .se-stat-label,
.se-stat-green  .se-stat-num  { color: #1b5e20; }
.se-stat-green  .se-stat-sub  { color: #388e3c; }

.se-stat-red    { background: #fdecea; }
.se-stat-red    .se-stat-label,
.se-stat-red    .se-stat-num  { color: #b71c1c; }
.se-stat-red    .se-stat-sub  { color: #e53935; }

.se-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 12px 0 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #218ADE;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.se-section-title span {
    font-size: 10px;
    color: #888;
    font-weight: normal;
    text-transform: none;
}

.se-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.se-cat-box {
    border: 1px solid #e0e8f0;
    border-radius: 8px;
    padding: 10px 13px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.se-cat-left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.se-cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}

.se-cat-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.se-cat-cnt { font-size: 11px; color: #888; }

.se-cat-right { text-align: right; }

.se-cat-sum {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.se-cat-bgn { font-size: 11px; color: #888; }

.se-cat-vat { font-size: 10px; color: #e07b1a; margin-top: 2px; }

.se-summary-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #f8f9fc;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.se-sum-item {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    border-radius: 7px;
    min-width: 110px;
    flex: 1;
}

.se-sum-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.se-sum-num {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}

.se-sum-sub { font-size: 11px; margin-top: 2px; }

.se-sum-arrow {
    font-size: 16px;
    font-weight: 700;
    color: #bbb;
    align-self: center;
    padding: 0 4px;
    flex-shrink: 0;
}

.se-sum-green  { background: #e8f5e9; }
.se-sum-green  .se-sum-label { color: #1b5e20; }
.se-sum-green  .se-sum-num   { color: #1b5e20; }
.se-sum-green  .se-sum-sub   { color: #388e3c; }

.se-sum-red    { background: #fdecea; }
.se-sum-red    .se-sum-label { color: #b71c1c; }
.se-sum-red    .se-sum-num   { color: #b71c1c; }
.se-sum-red    .se-sum-sub   { color: #e53935; }

.se-sum-orange { background: #fff3e0; }
.se-sum-orange .se-sum-label { color: #c4620a; }
.se-sum-orange .se-sum-num   { color: #c4620a; }
.se-sum-orange .se-sum-sub   { color: #e07b1a; }

.se-sum-amber  { background: #fffde7; }
.se-sum-amber  .se-sum-label { color: #856000; }
.se-sum-amber  .se-sum-num   { color: #856000; }
.se-sum-amber  .se-sum-sub   { color: #a07000; }

.se-sum-vat    { background: #e3f2fd; }
.se-sum-vat    .se-sum-label { color: #1565c0; }
.se-sum-vat    .se-sum-num   { color: #1565c0; }
.se-sum-vat    .se-sum-sub   { color: #1976d2; }

@media (max-width: 768px) {
    .se-stat-grid { flex-wrap: wrap; }
    .se-stat-box  { flex: 1 1 45%; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .se-cat-grid  { grid-template-columns: 1fr; }
    .se-summary-bar { flex-direction: column; }
    .se-sum-arrow { display: none; }
    .se-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .se-tab  { white-space: nowrap; }
}

/*----------------------------------
     ДРУГИ РАЗХОДИ за конкретен магазин НАЧЛАО
    -----------------------------------*/

/*----------------------------------
    /* Статистики по фирми  НАЧАЛО
    -----------------------------------*/

.firms-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.firms-stats-grid .exp-stat-box {
    border-right: 1px solid rgba(0,0,0,0.08);
}
.firms-stats-grid .exp-stat-box:last-child {
    border-right: none;
}

/* Блок на фирмата */
.firms-company-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

/* Хедър на фирмата */
.firms-co-hdr {
    background: #edf3fb;
    padding: 11px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.firms-co-hdr:hover { background: #e0ecf8; }
.firms-co-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a5c9e;
}
.firms-co-sub {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.firms-co-hdr-r { text-align: right; }
.firms-co-sum {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}
.firms-co-vat {
    font-size: 11px;
    color: #e07b1a;
    margin-top: 2px;
}

/* Блок на магазина */
.firms-shop-block {
    border-top: 1px solid #e0e8f0;
}
.firms-firm-only {
    background: #fffbf0;
    border-top: 1px solid #f0e8d0;
}
.firms-shop-hdr {
    background: #f7f9fc;
    padding: 8px 16px 8px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.firms-firm-only .firms-shop-hdr { background: #fffbf0; }
.firms-shop-hdr:hover { background: #eef3fa; }
.firms-firm-only .firms-shop-hdr:hover { background: #fff5e0; }
.firms-shop-hdr-l {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}
.firms-shop-dot {
    width: 10px;
    height: 10px;
    background: #218ADE;
    border-radius: 2px;
    flex-shrink: 0;
}
.firms-shop-hdr-r { text-align: right; }
.firms-shop-sum {
    font-size: 12px;
    font-weight: 700;
    color: #333;
}
.firms-shop-vat {
    font-size: 10px;
    color: #e07b1a;
    margin-top: 1px;
}

/* Категории */
.firms-cat-rows { background: #fff; }
.firms-cat-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 7px 16px 7px 40px;
    border-top: 1px solid #f3f3f3;
    font-size: 13px;
}
.firms-cat-row-firm { background: #fffbf0; }
.firms-cat-name {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #555;
}
.firms-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.firms-cat-sum { text-align: right; }
.firms-cat-sum-main { font-weight: 600; color: #333; }
.firms-cat-sum-vat  { font-size: 10px; color: #e07b1a; margin-top: 1px; }
.firms-cat-sum-net  { font-size: 10px; color: #888; }

/* Тотал ред */
.firms-co-total {
    background: #f0f0f0;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ddd;
    font-size: 12px;
}
.firms-co-total-l { color: #666; }
.firms-co-total-r { font-weight: 700; color: #b71c1c; }

/* Стрелки за toggle */
.firms-toggle-arrow {
    font-size: 10px;
    color: #aaa;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .firms-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .firms-co-hdr     { flex-direction: column; align-items: flex-start; gap: 6px; }
    .firms-co-hdr-r   { text-align: left; }
    .firms-shop-hdr   { flex-direction: column; align-items: flex-start; gap: 4px; }
    .firms-shop-hdr-r { text-align: left; }
    .firms-cat-row    { flex-direction: column; gap: 4px; }
    .firms-cat-sum    { text-align: left; }
}



.vat-summary-box {
    background: #fff8e8;
    border: 1px solid #f0d080;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    align-items: stretch;
}
.vat-summary-item {
    flex: 1;
    min-width: 140px;
    padding: 4px 16px 4px 0;
}
.vat-summary-label {
    font-size: 10px;
    font-weight: 600;
    color: #856000;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.vat-summary-num {
    font-size: 18px;
    font-weight: 700;
    color: #5a3d00;
    line-height: 1.1;
    margin-bottom: 2px;
}
.vat-summary-sub {
    font-size: 10px;
    color: #a07000;
}
.vat-summary-divider {
    width: 1px;
    background: #e0c060;
    margin: 0 16px 0 0;
    align-self: stretch;
}



/*----------------------------------
    /* Статистики по фирми  КРАЙ
    -----------------------------------*/

/*----------------------------------
    /* Статистики ДДС  НАЧАЛО
    -----------------------------------*/
     .co-vat-box {
    background: #fff8e8;
    border: 1px solid #f0d080;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.co-vat-item { display: flex; flex-direction: column; }
.co-vat-lbl  { font-size: 10px; color: #856000; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.co-vat-num  { font-size: 14px; font-weight: 700; color: #5a3d00; }
.co-vat-sub  { font-size: 10px; color: #a07000; margin-top: 1px; }
.co-vat-div  { width: 1px; background: #e0c060; align-self: stretch; margin: 0 2px; }

.co-fin-box {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.co-fin-item { display: flex; flex-direction: column; }
.co-fin-lbl  { font-size: 10px; color: #1b5e20; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.co-fin-num  { font-size: 14px; font-weight: 700; color: #1b5e20; }
.co-fin-sub  { font-size: 10px; color: #388e3c; margin-top: 1px; }
.co-fin-div  { width: 1px; background: #a5d6a7; align-self: stretch; margin: 0 2px; }

.co-note-box {
    font-size: 11px;
    color: #888;
    font-style: italic;
    padding: 5px 9px;
    background: #f9f9f9;
    border-left: 3px solid #ddd;
    border-radius: 0 4px 4px 0;
    margin-bottom: 14px;
}

.se-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 12px;
}

.co-chain-wrap {
    display: flex;
    align-items: center;
    background: #f8f9fc;
    border: 1px solid #dde3ee;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.co-chain-item {
    display: flex;
    flex-direction: column;
    padding: 8px 11px;
    border-radius: 7px;
    min-width: 90px;
    flex: 1;
}

.co-chain-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 3px; }
.co-chain-num { font-size: 16px; font-weight: 700; line-height: 1.1; }
.co-chain-sub { font-size: 10px; margin-top: 2px; }
.co-chain-arrow { font-size: 16px; font-weight: 700; color: #bbb; align-self: center; padding: 0 2px; flex-shrink: 0; }

.co-chain-blue { background: #e8f4fd; }
.co-chain-blue .co-chain-lbl, .co-chain-blue .co-chain-num { color: #1a5c9e; }
.co-chain-blue .co-chain-sub { color: #4a90c4; }

.co-chain-red { background: #fdecea; }
.co-chain-red .co-chain-lbl, .co-chain-red .co-chain-num { color: #b71c1c; }
.co-chain-red .co-chain-sub { color: #e53935; }

.co-chain-or { background: #fff3e0; }
.co-chain-or .co-chain-lbl, .co-chain-or .co-chain-num { color: #c4620a; }
.co-chain-or .co-chain-sub { color: #e07b1a; }

.co-chain-am { background: #fffde7; }
.co-chain-am .co-chain-lbl, .co-chain-am .co-chain-num { color: #856000; }
.co-chain-am .co-chain-sub { color: #a07000; }

.co-chain-pu { background: #f3e5f5; }
.co-chain-pu .co-chain-lbl, .co-chain-pu .co-chain-num { color: #4a148c; }
.co-chain-pu .co-chain-sub { color: #7b1fa2; }

.co-chain-gr { background: #e8f5e9; }
.co-chain-gr .co-chain-lbl, .co-chain-gr .co-chain-num { color: #1b5e20; }
.co-chain-gr .co-chain-sub { color: #388e3c; }

.se-stat-box.se-stat-purple { background: #f3e5f5; }
.se-stat-box.se-stat-purple .se-stat-label,
.se-stat-box.se-stat-purple .se-stat-num { color: #4a148c; }
.se-stat-box.se-stat-purple .se-stat-sub { color: #7b1fa2; }

@media (max-width: 768px) {
    .se-stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .co-vat-box, .co-fin-box, .co-chain-wrap { flex-direction: column; }
    .co-vat-div, .co-fin-div, .co-chain-arrow { display: none; }
}
/*----------------------------------
    /* Статистики ДДС  КРАЙ
    -----------------------------------*/

/*----------------------------------
    /* my profile new НАЧАЛО
    -----------------------------------*/

.prof-tbl th {
    white-space: nowrap;
    font-size: 13px;
}

.prof-tbl td {
    font-size: 12px;
}

.prof-sub {
    font-size: 10px;
    color: #aaa;
    display: inline-block;
}

.prof-pos { color: #2e7d32 !important; }
.prof-neg { color: #b71c1c !important; }

.prof-roi-pos {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.prof-roi-neg {
    background: #fdecea;
    color: #b71c1c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.prof-roi-zero {
    background: #f5f5f5;
    color: #999;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

.prof-total-row td {
    border-top: 2px solid #dde3ee !important;
    font-weight: 600;
}

.co-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin-bottom: 3px;
}

.prof-badge-vat {
    display: inline-block;
    background: #fff3e0;
    color: #c4620a;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.prof-badge-novat {
    display: inline-block;
    background: #f3e5f5;
    color: #4a148c;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.prof-shops-list {
    font-size: 12px;
    color: #444;
    line-height: 1.6;
}

.prof-shop-hidden {
    display: none;
    font-size: 11px;
    color: #888;
}

@media (max-width: 768px) {
    .prof-tbl thead { display: none; }
    .prof-tbl tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
    }
    .prof-tbl tbody td {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 13px;
    }
    .prof-tbl tbody td:last-child { border-bottom: none; }
    .prof-tbl tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        color: #888;
        text-transform: uppercase;
        min-width: 110px;
    }
}


/*РАзгъващ се ред начало*/

.exp-row-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #edf3fb;
    border-bottom: 1px solid #d0e0f0;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-row-title-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a5c9e;
}

.exp-row-title-sep {
    color: #aaa;
    font-size: 13px;
}

.exp-row-title-sub {
    font-size: 12px;
    color: #555;
}

.exp-row-date-badge {
    background: #218ADE;
    color: #fff;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 4px;
    font-weight: 600;
}

.exp-row-count-badge {
    background: #e8f4fd;
    color: #1a5c9e;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 4px;
    font-weight: 600;
}

.exp-row-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f8f9fc;
    border-bottom: 1px solid #e8eef5;
    flex-wrap: wrap;
}

.exp-row-sum-item {
    display: flex;
    flex-direction: column;
    padding: 7px 12px;
    border-radius: 7px;
    min-width: 90px;
}

.exp-row-sum-lbl {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
}

.exp-row-sum-num {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
}

.exp-row-sum-sub {
    font-size: 10px;
    margin-top: 2px;
}

.exp-row-sum-arrow {
    font-size: 16px;
    color: #bbb;
    font-weight: 700;
    padding: 0 2px;
    flex-shrink: 0;
}

.exp-row-sum-blue   { background: #e8f4fd; }
.exp-row-sum-blue   .exp-row-sum-lbl, .exp-row-sum-blue .exp-row-sum-num { color: #1a5c9e; }
.exp-row-sum-blue   .exp-row-sum-sub { color: #4a90c4; }

.exp-row-sum-red    { background: #fdecea; }
.exp-row-sum-red    .exp-row-sum-lbl, .exp-row-sum-red .exp-row-sum-num { color: #b71c1c; }
.exp-row-sum-red    .exp-row-sum-sub { color: #e53935; }

.exp-row-sum-green  { background: #e8f5e9; }
.exp-row-sum-green  .exp-row-sum-lbl, .exp-row-sum-green .exp-row-sum-num { color: #1b5e20; }
.exp-row-sum-green  .exp-row-sum-sub { color: #388e3c; }

.exp-row-sum-purple { background: #f3e5f5; }
.exp-row-sum-purple .exp-row-sum-lbl, .exp-row-sum-purple .exp-row-sum-num { color: #4a148c; }
.exp-row-sum-purple .exp-row-sum-sub { color: #7b1fa2; }

.exp-row-sum-orange { background: #fff3e0; }
.exp-row-sum-orange .exp-row-sum-lbl,
.exp-row-sum-orange .exp-row-sum-num { color: #c4620a; }
.exp-row-sum-orange .exp-row-sum-sub { color: #e07b1a; }

.exp-prod-tbl th {
    background: #f5f7fa;
    padding: 6px 10px;
    font-size: 10px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.exp-prod-tbl td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 12px;
}

.exp-prod-tbl tr:last-child td { border-bottom: none; }
.exp-prod-tbl tr:hover td { background: #f8fafd; }

@media (max-width: 768px) {
    .exp-row-title { flex-direction: column; align-items: flex-start; }
    .exp-row-summary { flex-direction: column; }
    .exp-row-sum-arrow { display: none; }
    .exp-row-sum-item { width: 100%; }

    .exp-prod-tbl thead { display: none; }
    .exp-prod-tbl tbody tr {
        display: block;
        border: 1px solid #ddd;
        border-radius: 6px;
        margin-bottom: 8px;
        background: #fff;
    }
    .exp-prod-tbl tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 10px;
        border: none;
        border-bottom: 1px solid #f5f5f5;
        text-align: right !important;
    }
    .exp-prod-tbl tbody td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 600;
        color: #888;
        text-transform: uppercase;
        min-width: 80px;
        text-align: left;
        flex-shrink: 0;
    }
    .exp-prod-tbl tbody td[data-label=""]::before { display: none; }
    .exp-prod-tbl tbody td[data-label=""] { justify-content: center; background: #f8fafd; }
}
/*РАзгъващ се ред край*/

/*----------------------------------
    /* my profile new край
    -----------------------------------*/


/* =====================
   ИСТОРИЯ НА КЛИЕНТА myorders
===================== */
.cust-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: default;
}

.cust-badge-new  { background: #e8f5e9; color: #1b5e20; }
.cust-badge-ret  { background: #e3f2fd; color: #0d47a1; }
.cust-badge-vip  { background: #fce4ec; color: #880e4f; }

/* nekorekten.com — сигнали за некоректен клиент */
.nk-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
}
.nk-badge-ok  { background: #e8f5e9; color: #1b5e20; }
.nk-badge-bad { background: #fdecea; color: #b71c1c; box-shadow: 0 0 0 1px #f3c4bd inset; }
.nk-badge-bad:hover { background: #f9d9d4; }
.nk-badge-ok:hover  { background: #d6eddb; }

/* nekorekten — бутон „подай сигнал / регистрация" в реда (само върнати) */
.nk-report-flag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
.nk-report-go   { background: #fdecea; color: #b71c1c; }
.nk-report-go:hover { background: #f9d9d4; }
.nk-report-reg  { background: #fff4e5; color: #b9770e; }
.nk-report-reg:hover { background: #fde8c8; }
.nk-report-done { background: #e8f5e9; color: #1b5e20; cursor: default; }

/* Tooltip wrapper — десктоп: на собствен ред (block); мобилно: inline-block (mobile.css) */
.cust-history-wrap { position: relative; display: block; }

.cust-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: 22px;
    z-index: 200;
    background: #fff;
    border: 1px solid #dde3ee;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 10px 13px;
    min-width: 220px;
    font-size: 12px;
    white-space: nowrap;
}

.cust-history-wrap:hover .cust-tooltip {
    display: block;
}

.cust-tooltip-title {
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 7px;
}

.cust-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cust-tooltip-row:last-of-type { border-bottom: none; }

.cust-tooltip-num  { color: #218ADE; font-weight: 600; min-width: 50px; }
.cust-tooltip-sum  { font-weight: 600; color: #333; min-width: 55px; text-align: right; }

.cust-tooltip-status {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.cust-s-ok   { background: #e8f5e9; color: #2e7d32; }
.cust-s-ret  { background: #fdecea; color: #b71c1c; }
.cust-s-ship { background: #fff3e0; color: #c4620a; }
.cust-s-pending { background: #e9e9e9; color: #000; }

.cust-tooltip-footer {
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #888;
}

.cust-tooltip-footer b { color: #222; }

/* На мобилно — скриваме tooltip (няма hover) */
@media (max-width: 768px) {
    .cust-tooltip { display: none !important; }
}

/* =====================
    ИСТОРИЯ НА КЛИЕНТА myorders
===================== */


/*----------------------------------
   ADS DASHBOARD 
----------------------------------*/

.ads-wrap {
    max-width: 1500px;
}

/* =====================
   FILTER BAR
===================== */
.ads-filter-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.ads-filter-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ads-filter-row2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ads-filter-title {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ads-filter-label {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}
.ads-filter-sep {
    width: 1px;
    height: 18px;
    background: #eee;
    flex-shrink: 0;
}
.ads-fi {
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
    border: 1px solid #dde3ee;
    border-radius: 6px;
    background: #fff;
    color: #333;
    outline: none;
}
.ads-fi:focus {
    border-color: #218ADE;
}
.ads-fi-search {
    width: 220px;
}
.ads-btn-period {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #dde3ee;
    border-radius: 6px;
    background: #f5f7fa;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}
.ads-btn-period.on {
    background: #218ADE;
    color: #fff;
    border-color: #218ADE;
}
.ads-btn-apply {
    height: 28px;
    padding: 0 14px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background: #218ADE;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}
.ads-btn-clear {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    border: 1px solid #dde3ee;
    border-radius: 6px;
    background: #fff;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.ads-btn-clear:hover {
    text-decoration: none;
    color: #555;
}
.ads-custom-dates {
    display: none;
    align-items: center;
    gap: 6px;
}
.ads-custom-dates.visible {
    display: flex;
}

/* Chips */
.ads-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.ads-chip:hover {
    text-decoration: none;
    opacity: .85;
}
.ads-chip.on {
    box-shadow: 0 0 0 2px currentColor;
}
.chip-all     { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.chip-scale   { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.chip-refresh { background: #fff8e1; color: #854f0b; border-color: #ffe082; }
.chip-stop    { background: #fdecea; color: #a32d2d; border-color: #ffcdd2; }
.chip-learn   { background: #f3e5f5; color: #4a148c; border-color: #ce93d8; }

/* =====================
   RESULTS BAR
===================== */
.ads-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}
.ads-results-count {
    font-size: 12px;
    color: #888;
}
.ads-results-count b {
    color: #333;
}
.ads-results-meta {
    font-size: 11px;
    color: #aaa;
}
.ads-empty {
    padding: 40px;
    text-align: center;
    font-size: 13px;
    color: #aaa;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

/* =====================
   AD CARD
===================== */
.ads-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
}
.ads-card--scale   { border-color: #c8e6c9; border-width: 1.5px; }
.ads-card--warning { border-color: #ffe0b2; border-width: 1.5px; }
.ads-card--danger  { border-color: #ffd5d5; border-width: 1.5px; }
.ads-card--learning { border-color: #e1bee7; border-width: 1.5px; }

.ads-card-grid {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: stretch;
}

/* Image */
.ads-card-img {
    position: relative;
    background: #222;
    min-height: 280px;
}
.ads-card-img img {
    width: 90px;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
    opacity: .88;
}
.ads-card-img-placeholder {
    width: 90px;
    min-height: 280px;
    background: #218ADE;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ads-card-img-placeholder span {
    font-size: 22px;
    font-weight: 700;
    color: rgba(255,255,255,.7);
}
.ads-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
}
.ads-status-badge--active { background: #27ae60; color: #fff; }
.ads-status-badge--paused { background: #888;    color: #fff; }

/* Body */
.ads-card-body {
    display: flex;
    flex-direction: column;
}

/* Header */
.ads-card-header {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.ads-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.ads-card-sub {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}
.ads-card-header-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.ads-data-date {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}
.ads-data-date b {
    color: #333;
}
.ads-btn-note {
    background: none;
    border: 1px solid #218ADE;
    color: #218ADE;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

/* Pills */
.ads-pill {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.ads-pill--scale    { background: #e8f5e9; color: #1b5e20; }
.ads-pill--refresh  { background: #fff8e1; color: #854f0b; }
.ads-pill--stop     { background: #fdecea; color: #a32d2d; }
.ads-pill--learning { background: #f3e5f5; color: #4a148c; }
.ads-pill--watch    { background: #f5f5f5; color: #666; }

/* Action Bar */
.ads-action-bar {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.ads-action-score-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ads-action-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    min-width: 28px;
}
.ads-action-num--scale    { color: #1b5e20; }
.ads-action-num--refresh  { color: #854f0b; }
.ads-action-num--stop     { color: #a32d2d; }
.ads-action-num--learning { color: #4a148c; }
.ads-action-num--watch    { color: #888; }

.ads-action-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ads-action-label {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}
.ads-action-label--scale    { background: #e8f5e9; color: #1b5e20; }
.ads-action-label--refresh  { background: #fff8e1; color: #854f0b; }
.ads-action-label--stop     { background: #fdecea; color: #a32d2d; }
.ads-action-label--learning { background: #f3e5f5; color: #4a148c; }
.ads-action-label--watch    { background: #f5f5f5; color: #666; }

.ads-lifecycle-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ads-lc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}
.ads-lc-dot--learning { background: #7b1fa2; }
.ads-lc-dot--peak     { background: #27ae60; }
.ads-lc-dot--fatigue  { background: #f39c12; }
.ads-lc-dot--dead     { background: #e53935; }

.ads-lc-text {
    font-size: 9px;
    color: #888;
}
.ads-action-divider {
    width: 1px;
    height: 32px;
    background: #f0f0f0;
    flex-shrink: 0;
}
.ads-action-text {
    font-size: 11px;
    color: #555;
    flex: 1;
    min-width: 160px;
}
.ads-action-text b {
    color: #333;
}

/* Lifecycle bar */
.ads-lifecycle-bar-wrap {
    flex-shrink: 0;
    text-align: right;
    min-width: 110px;
}
.ads-lc-bar-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 3px;
}
.ads-lc-bar {
    display: flex;
    height: 4px;
    border-radius: 4px;
    overflow: hidden;
    width: 110px;
}
.ads-lc-seg {
    flex: 1;
    opacity: .3;
    transition: opacity .2s;
}
.ads-lc-seg--active {
    opacity: 1;
}
.ads-lc-seg--learn { background: #ce93d8; }
.ads-lc-seg--peak  { background: #66bb6a; flex: 2; }
.ads-lc-seg--fade  { background: #ffb74d; flex: 2; }
.ads-lc-seg--dead  { background: #ef9a9a; flex: 2; }

.ads-lc-bar-sub {
    font-size: 9px;
    color: #888;
    margin-top: 2px;
}
.ads-lc-color--peak    { color: #27ae60; }
.ads-lc-color--fade    { color: #f39c12; }
.ads-lc-color--dead    { color: #e53935; }

/* Metrics row */
.ads-metrics-row {
    padding: 8px 14px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    border-bottom: 1px solid #f0f0f0;
}
.ads-metric {
    text-align: center;
}
.ads-metric-lbl {
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 2px;
    white-space: nowrap;
}
.ads-metric-val {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.1;
}
.ads-metric-sub {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 2px;
}

/* Metric value colors */
.ads-val--ok   { color: #27ae60; }
.ads-val--warn { color: #f39c12; }
.ads-val--bad  { color: #e53935; }
.ads-val--neu  { color: #333; }
.ads-val--pur  { color: #7b1fa2; }

/* Metric sub colors */
.ads-sub--ok   { background: #e8f5e9; color: #1b5e20; }
.ads-sub--warn { background: #fff8e1; color: #854f0b; }
.ads-sub--bad  { background: #fdecea; color: #a32d2d; }
.ads-sub--neu  { background: #f5f5f5; color: #666; }
.ads-sub--pur  { background: #f3e5f5; color: #4a148c; }

/* Trend chart */
.ads-trend-chart {
    display: flex;
    gap: 1px;
    align-items: flex-end;
    height: 28px;
    justify-content: center;
    margin-bottom: 2px;
}
.ads-trend-bar {
    width: 7px;
    background: #218ADE;
    border-radius: 1px 1px 0 0;
    min-height: 2px;
}
.ads-trend-bar--empty {
    background: #f0f0f0;
}

/* Fatigue row */
.ads-fatigue-row {
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.ads-fatigue-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #555;
}
.ads-fatigue-lbl {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}
.ads-fatigue-sep {
    width: 1px;
    height: 14px;
    background: #eee;
    flex-shrink: 0;
}

.ads-freq-bar {
    display: flex;
    gap: 2px;
    align-items: center;
}
.ads-freq-seg {
    width: 6px;
    height: 8px;
    border-radius: 1px;
    background: #e0e0e0;
}
.ads-freq-seg.on.ads-freq-seg--green { background: #27ae60; }
.ads-freq-seg.on.ads-freq-seg--amber { background: #f39c12; }
.ads-freq-seg.on.ads-freq-seg--red   { background: #e53935; }

.ads-fatigue-val {
    font-size: 11px;
    font-weight: 600;
}
.ads-fatigue-val--ok   { color: #27ae60; }
.ads-fatigue-val--warn { color: #f39c12; }
.ads-fatigue-val--bad  { color: #e53935; }

.ads-fatigue-metric {
    font-size: 11px;
    font-weight: 600;
}
.ads-fatigue-metric.ok   { color: #27ae60; }
.ads-fatigue-metric.warn { color: #f39c12; }
.ads-fatigue-metric.bad  { color: #e53935; }

.ads-bench-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
}
.bench-above { background: #e8f5e9; color: #1b5e20; }
.bench-below { background: #fdecea; color: #a32d2d; }

/* Learning progress */
.ads-learning-bar {
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.ads-learning-label {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}
.ads-learning-progress {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}
.ads-learning-fill {
    height: 6px;
    background: #7b1fa2;
    border-radius: 3px;
    width: 0;
    transition: width .4s ease;
}
.ads-learning-count {
    font-size: 10px;
    color: #7b1fa2;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Notes */
.ads-notes-row {
    padding: 8px 14px;
    display: flex;
    gap: 8px;
}
.ads-note {
    border-radius: 0 6px 6px 0;
    padding: 6px 10px;
    font-size: 11px;
    flex: 1;
    border-left: 3px solid;
}
.ads-note--green  { background: #fffde7; border-color: #f39c12; color: #7a6200; }
.ads-note--amber  { background: #fffde7; border-color: #f39c12; color: #7a6200; }
.ads-note--red    { background: #fef0f0; border-color: #e53935; color: #a93226; }
.ads-note--purple { background: #f3e5f5; border-color: #7b1fa2; color: #4a148c; }
.ads-note--user   { background: #f9f9f9; border-color: #e0e0e0; color: #aaa; }

/* =====================
   МОБИЛНА ВЕРСИЯ
===================== */
@media (max-width: 900px) {
    .ads-card-grid {
        grid-template-columns: 1fr;
    }
    .ads-card-img {
        display: none;
    }
    .ads-metrics-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .ads-action-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .ads-lifecycle-bar-wrap {
        display: none;
    }
    .ads-card-header {
        flex-direction: column;
        gap: 6px;
    }
    .ads-card-header-right {
        justify-content: flex-start;
    }
    .ads-fatigue-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .ads-fatigue-sep {
        display: none;
    }
    .ads-notes-row {
        flex-direction: column;
    }
    .ads-filter-top,
    .ads-filter-row2 {
        gap: 6px;
    }
    .ads-fi-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ads-metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =============================================
   ПРОДУКТОВА СТАТИСТИКА   myproductstats  НАЧАЛО
   ============================================= */
.ps-wrap {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dde3ee;
    padding: 16px;
    margin-bottom: 14px;
    font-size: 13px;
}
.ps-sec-title {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #218ADE;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ps-sec-title span {
    font-size: 10px;
    color: #888;
    font-weight: 400;
    text-transform: none;
}

/* KPI */
.ps-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.ps-kpi {
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    border-left: 4px solid;
}
.ps-kpi-lbl { font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; margin-bottom: 4px; }
.ps-kpi-val { font-size: 21px; font-weight: 700; line-height: 1.1; }
.ps-kpi-sub { font-size: 11px; margin-top: 3px; }
.ps-kpi-bl { background: #e8f4fd; border-color: #218ADE; }
.ps-kpi-bl .ps-kpi-lbl, .ps-kpi-bl .ps-kpi-val { color: #185FA5; }
.ps-kpi-bl .ps-kpi-sub { color: #378ADD; }
.ps-kpi-gr { background: #e8f5e9; border-color: #27ae60; }
.ps-kpi-gr .ps-kpi-lbl, .ps-kpi-gr .ps-kpi-val { color: #1a7a40; }
.ps-kpi-gr .ps-kpi-sub { color: #27ae60; }
.ps-kpi-or { background: #fff8e1; border-color: #f39c12; }
.ps-kpi-or .ps-kpi-lbl, .ps-kpi-or .ps-kpi-val { color: #854F0B; }
.ps-kpi-or .ps-kpi-sub { color: #BA7517; }
.ps-kpi-pu { background: #f0eeff; border-color: #8e44ad; }
.ps-kpi-pu .ps-kpi-lbl, .ps-kpi-pu .ps-kpi-val { color: #3C3489; }
.ps-kpi-pu .ps-kpi-sub { color: #534AB7; }

/* Подиум */
.ps-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.ps-pod {
    border: 1px solid #e0e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    position: relative;
    overflow: hidden;
}
.ps-pod-rank {
    position: absolute;
    top: 0; left: 0;
    width: 30px; height: 30px;
    border-radius: 8px 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.ps-r1 { background: #f39c12; }
.ps-r2 { background: #888; }
.ps-r3 { background: #b87333; }
.ps-pod-img {
   /* width: 100%; */
    height: 80px;
    border-radius: 6px;
    margin: 22px 0 8px;
    object-fit: cover;
}
.ps-pod-img-txt {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .5px;
    height: 64px;
}
.ps-pod-name { font-size: 12px; font-weight: 700; color: #222; margin-bottom: 5px; line-height: 1.3; }
.ps-pod-units { font-size: 22px; font-weight: 700; color: #218ADE; line-height: 1; }
.ps-pod-unitlbl { font-size: 12px; color: #888; margin-bottom: 5px; }
.ps-pod-rev { font-size: 12px; font-weight: 700; color: #1a7a40; }
.ps-pod-sub { font-size: 12px; color: #888; margin-top: 2px; }

/* Progress bars */
.ps-bw { background: #eee; border-radius: 3px; height: 5px; width: 100%; margin-top: 8px; }
.ps-bf { height: 5px; border-radius: 3px; }

/* Таблица */
.ps-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 12px; }
.ps-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 860px;
}
.ps-tbl th {
    background: #f5f7fa;
    padding: 7px 8px;
    text-align: left;
    font-size: 10px;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 2px solid #218ADE;
    white-space: nowrap;
}
.ps-tbl th.r { text-align: right; }
.ps-tbl td { padding: 8px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.ps-tbl td.r { text-align: right; }
.ps-tbl tr:last-child td { border-bottom: none; }
.ps-tbl tr:hover td { background: #fafbfd; }
.ps-tbl tfoot td { background: #f5f7fa; font-weight: 700; border-top: 2px solid #ddd; padding: 7px 8px; }

/* Продуктова клетка */
.ps-prod-img {
    width: 32px; height: 32px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}
.ps-prod-img-txt {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 5px;
    flex-shrink: 0;
}
.ps-prod-name { font-weight: 700; color: #222; font-size: 11px; }
.ps-prod-type { font-size: 10px; color: #888; }

/* ABC badges */
.ps-abc-a { background: #e8f5e9; color: #1a7a40; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.ps-abc-b { background: #fff8e1; color: #854F0B; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.ps-abc-c { background: #fdecea; color: #b71c1c; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.ps-abc-t { background: #e8f4fd; color: #185FA5; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }

/* Тренд */
.ps-trend-up   { color: #27ae60; font-weight: 700; font-size: 11px; line-height: 1.4; }
.ps-trend-warn { color: #f39c12; font-weight: 700; font-size: 11px; line-height: 1.4; }
.ps-trend-dn   { color: #e74c3c; font-weight: 700; font-size: 11px; line-height: 1.4; }
.ps-trend-new  { color: #888; font-size: 11px; }
.ps-trend-up small, .ps-trend-warn small, .ps-trend-dn small { font-size: 10px; font-weight: 400; }

/* Статус */
.ps-st-scale { background: #e8f5e9; color: #1a7a40; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.ps-st-opt   { background: #fff8e1; color: #854F0B; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.ps-st-stop  { background: #fdecea; color: #b71c1c; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.ps-st-test  { background: #e8f4fd; color: #185FA5; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }

/* Стойности */
.ps-col-rev  { color: #185FA5; font-weight: 700; }
.ps-col-pos  { color: #1a7a40; font-weight: 700; }
.ps-col-warn { color: #854F0B; font-weight: 700; }
.ps-col-neg  { color: #b71c1c; font-weight: 700; }
.ps-spd      { font-size: 11px; font-weight: 700; color: #3C3489; }

/* Боксове долу */
.ps-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ps-info-box  { padding: 10px 13px; border-radius: 7px; font-size: 12px; }
.ps-box-teal  { background: #e1f5ee; border: 1px solid #9FE1CB; color: #085041; }
.ps-box-amber { background: #fff8e8; border: 1px solid #f0d080; color: #856000; }
.ps-box-title { font-weight: 700; margin-bottom: 6px; }
.ps-leg-row   { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ps-leg-item  { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.ps-leg-actions { font-size: 10px; color: #0F6E56; line-height: 1.6; }
.ps-obs-text  { font-size: 12px; line-height: 1.6; color: #5a3d00; }

/* =============================================
   МОБИЛЕН CSS — my product stats
   ============================================= */
@media (max-width: 900px) {
    .ps-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .ps-podium   { grid-template-columns: repeat(2, 1fr); }
    .ps-podium .ps-pod:last-child { grid-column: span 2; }
    .ps-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .ps-wrap { padding: 12px; }
    .ps-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ps-kpi-val { font-size: 18px; }
    .ps-podium { grid-template-columns: 1fr; }
    .ps-podium .ps-pod:last-child { grid-column: auto; }
    .ps-pod-img, .ps-pod-img-txt { height: 48px; }

    /* Таблица → карти на мобилно */
    .ps-tbl { min-width: unset; }
    .ps-tbl thead { display: none; }
    .ps-tbl tbody, .ps-tbl tfoot { display: block; }
    .ps-tbl tr { display: block; border: 1px solid #e0e8f0; border-radius: 8px; margin-bottom: 10px; overflow: hidden; background: #fff; }
    .ps-tbl td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 7px 10px;
        border: none;
        border-bottom: 1px solid #f5f5f5;
        font-size: 12px;
        text-align: right !important;
    }
    .ps-tbl td:last-child { border-bottom: none; }
    .ps-tbl td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: .3px;
        text-align: left;
        flex-shrink: 0;
        margin-right: 8px;
    }
    /* Снимка + Продукт — без лейбъл, на цяла ширина */
    .ps-tbl td:first-child { justify-content: center; background: #f8fafd; }
    .ps-tbl td:first-child::before { display: none; }
    .ps-tbl td:nth-child(2) {
        flex-direction: column;
        align-items: flex-start;
        background: #f5f8fc;
        font-size: 13px;
    }
    .ps-tbl td:nth-child(2)::before { display: none; }
    .ps-tbl tfoot tr { background: #f5f7fa; }
    .ps-leg-row { gap: 6px; }
    .ps-leg-actions { font-size: 10px; }
}

/* =============================================
    ПРОДУКТОВА СТАТИСТИКА   myproductstats  КРАЙ
    ============================================= */



/* =============================================
   СТАТИСТИКА НА ФУНИЯТА  (префикс fs-)  НАЧАЛО
   ============================================= */
.fs-wrap {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dde3ee;
    padding: 16px;
    margin-bottom: 14px;
    font-size: 13px;
}
.fs-sec {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 7px;
    border-bottom: 2px solid #218ADE;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fs-sec span { font-size: 10px; color: #888; font-weight: 400; text-transform: none; }

/* Lifetime KPIs */
.fs-lkpi { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 14px; }
.fs-lk { border-radius: 0 8px 8px 0; padding: 11px 13px; border-left: 4px solid; }
.fs-lk-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 3px; }
.fs-lk-val { font-size: 19px; font-weight: 700; line-height: 1.1; }
.fs-lk-sub { font-size: 11px; margin-top: 2px; }
.fs-lk1 { background: #e8f4fd; border-color: #218ADE; }
.fs-lk1 .fs-lk-lbl, .fs-lk1 .fs-lk-val { color: #185FA5; }
.fs-lk1 .fs-lk-sub { color: #378ADD; }
.fs-lk2 { background: #e8f5e9; border-color: #27ae60; }
.fs-lk2 .fs-lk-lbl, .fs-lk2 .fs-lk-val { color: #1a7a40; }
.fs-lk2 .fs-lk-sub { color: #27ae60; }
.fs-lk3 { background: #f0eeff; border-color: #8e44ad; }
.fs-lk3 .fs-lk-lbl, .fs-lk3 .fs-lk-val { color: #3C3489; }
.fs-lk3 .fs-lk-sub { color: #534AB7; }
.fs-lk4 { background: #fff8e1; border-color: #f39c12; }
.fs-lk4 .fs-lk-lbl, .fs-lk4 .fs-lk-val { color: #854F0B; }
.fs-lk4 .fs-lk-sub { color: #BA7517; }

.fs-lk5 { background: #f5f5f5; border-color: #888; }
.fs-lk5 .fs-lk-lbl { color: #555; }
.fs-lk5 .fs-lk-val { color: #222; }
.fs-lk5 .fs-lk-sub { color: #888; }

.fs-lk6 { background: #fdecea; border-color: #e74c3c; }
.fs-lk6 .fs-lk-lbl { color: #b71c1c; }
.fs-lk6 .fs-lk-val { color: #b71c1c; }
.fs-lk6 .fs-lk-sub { color: #e74c3c; }

.fs-lk-conv { background: #f0eeff; border-color: #8e44ad; }
.fs-lk-conv .fs-lk-lbl { color: #3C3489; }
.fs-lk-conv .fs-lk-val { color: #3C3489; }
.fs-lk-conv .fs-lk-sub { color: #534AB7; }

.fs-lk7 { background: #fff3e0; border-color: #e67e22; }
.fs-lk7 .fs-lk-lbl { color: #7D3C00; }
.fs-lk7 .fs-lk-val { color: #7D3C00; }
.fs-lk7 .fs-lk-sub { color: #e67e22; }

/* „В касата общо" — паричен поток (teal, като В касата другаде) */
.fs-lk-cash { background: #e1f5ee; border-color: #0d9488; }
.fs-lk-cash .fs-lk-lbl, .fs-lk-cash .fs-lk-val { color: #085041; }
.fs-lk-cash .fs-lk-sub { color: #0d9488; }

/* Жизнен цикъл */
.fs-lifecycle {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid #e0e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.fs-lcs {
    padding: 10px 11px;
    text-align: center;
    border-right: 1px solid #e0e8f0;
}
.fs-lcs:last-child { border-right: none; }
.fs-lcs-active { background: #e8f4fd; }
.fs-lcs-here {
    font-size: 9px;
    background: #218ADE;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 3px;
    font-weight: 700;
}
.fs-lc-bar { height: 4px; margin: 0 0 10px; }
.fs-lcs-name { font-size: 14px; font-weight: 700; margin: 5px 0 3px; }
.fs-lcs-desc { font-size: 12px; color: #888; line-height: 1.4; }

/* Insight боксове */
.fs-ibox {
    padding: 9px 13px;
    border-radius: 7px;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.6;
}
.fs-ib-teal  { background: #e1f5ee; border: 1px solid #9FE1CB; color: #085041; }
.fs-ib-amber { background: #fff8e8; border: 1px solid #f0d080; color: #856000; }
.fs-ib-red   { background: #fdecea; border: 1px solid #f5c4b3; color: #7a1c1c; }

/* Ръчна реклама */
.fs-manual-section {
    border: 1px solid #e0e8f0;
    border-radius: 7px;
    margin-bottom: 12px;
    overflow: hidden;
}
.fs-manual-toggle {
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #185FA5;
    cursor: pointer;
    background: #f5f9ff;
    list-style: none;
}
.fs-manual-toggle::-webkit-details-marker { display: none; }
.fs-manual-body { padding: 12px 14px; background: #fafcff; }
.fs-manual-note { font-size: 11px; color: #888; margin-bottom: 10px; }
.fs-manual-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.fs-fi {
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #fff;
    color: #222;
}
.fs-btn-save {
    background: #218ADE;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 12px;
    cursor: pointer;
    height: 30px;
}
.fs-btn-del {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c4b3;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    cursor: pointer;
}
.fs-manual-tbl { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 8px; }
.fs-manual-tbl th { background: #f0f4f8; padding: 5px 8px; text-align: left; font-size: 10px; color: #666; font-weight: 700; border-bottom: 1px solid #ddd; }
.fs-manual-tbl td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }

/* Year tabs */
.fs-ytabs { display: flex; gap: 0; border-bottom: 2px solid #ddd; margin-bottom: 12px; }
.fs-ytab { padding: 6px 16px; font-size: 12px; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 600; white-space: nowrap; }
.fs-ytab.on { color: #218ADE; border-bottom-color: #218ADE; }

/* Chart legend */
.fs-cleg { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.fs-cli { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #555; }
.fs-clsq { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Таблица */
.fs-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fs-tbl { width: 100%; border-collapse: collapse; font-size: 11px; min-width: 760px; }
.fs-tbl th {
    background: #f5f7fa;
    padding: 6px 8px;
    font-size: 10px;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2px;
    border-bottom: 2px solid #218ADE;
    white-space: nowrap;
    text-align: left;
}
.fs-tbl th.r { text-align: right; }
.fs-tbl td { padding: 7px 8px; border-bottom: 1px solid #f0f0f0; }
.fs-tbl td.r { text-align: right; }
.fs-tbl tr:hover td { background: #fafbfd; }
.fs-yr-body { display: none; }
.fs-yr-body.fs-yr-active { display: table-row-group; }
.fs-row-cur td { background: #f0f7ff !important; }
.fs-row-total td { background: #f5f7fa; font-weight: 700; border-top: 2px solid #ddd; }
.fs-badge-cur { background: #218ADE; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.fs-badge-man { background: #fff8e1; color: #854F0B; font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 700; border: 1px solid #f0d080; }
.fs-pos   { color: #1a7a40; font-weight: 700; }
.fs-neg   { color: #b71c1c; font-weight: 700; }
.fs-warn  { color: #854F0B; font-weight: 700; }
.fs-muted { color: #888; }

/* =============================================
   МОБИЛЕН CSS
   ============================================= */
@media (max-width: 900px) {
    .fs-lkpi { grid-template-columns: repeat(3, 1fr); }
    .fs-lifecycle { grid-template-columns: repeat(3, 1fr); }
    .fs-lifecycle .fs-lcs:nth-child(4),
    .fs-lifecycle .fs-lcs:nth-child(5) { border-top: 1px solid #e0e8f0; }
}

@media (max-width: 600px) {
    .fs-wrap { padding: 10px; }
    .fs-lkpi { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .fs-lk-val { font-size: 16px; }
    .fs-lifecycle { grid-template-columns: 1fr 1fr; }
    .fs-lifecycle .fs-lcs:nth-child(odd):last-child { grid-column: span 2; }

    /* Таблица → карти */
    .fs-tbl { min-width: unset; }
    .fs-tbl thead { display: none; }
    .fs-yr-body.fs-yr-active { display: block; }
    .fs-tbl tr {
        display: block;
        border: 1px solid #e0e8f0;
        border-radius: 7px;
        margin-bottom: 8px;
        overflow: hidden;
        background: #fff;
    }
    .fs-row-cur { background: #f0f7ff !important; }
    .fs-row-total { background: #f5f7fa !important; }
    .fs-tbl td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 10px;
        border: none;
        border-bottom: 1px solid #f5f5f5;
        font-size: 12px;
        text-align: right !important;
    }
    .fs-tbl td:last-child { border-bottom: none; }
    .fs-tbl td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: .3px;
        text-align: left;
        flex-shrink: 0;
        margin-right: 8px;
    }
    .fs-manual-row { flex-direction: column; align-items: stretch; }
    .fs-fi { width: 100% !important; }
    .fs-btn-save { width: 100%; }
}

@media (max-width: 400px) {
    .fs-lkpi { grid-template-columns: 1fr 1fr; }
    .fs-lk-val { font-size: 14px; }
    .fs-lifecycle { grid-template-columns: 1fr; }
    .fs-lifecycle .fs-lcs:nth-child(odd):last-child { grid-column: auto; }
}

@media (max-width: 600px) {
    /* вече съществуващото ... плюс: */
    .fs-wrap > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================
    СТАТИСТИКА НА ФУНИЯТА  (префикс fs-)  Край
    ============================================= */



/* =============================================
   Popup — предходни поръчки на клиента  НАЧАЛО
   ============================================= */
.prev-orders-btn {
    float: right;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #218ADE;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 2px;
}
.prev-orders-btn:hover { background: #185FA5; }
.prev-orders-count {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}

/* Overlay */
.prev-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
}
.prev-overlay.show { display: block; }

/* Popup контейнер */
.prev-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 820px;
    max-height: 80vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 1001;
    flex-direction: column;
    overflow: hidden;
}
.prev-popup.show { display: flex; }

/* Хедър */
.prev-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #218ADE;
    flex-shrink: 0;
}
.prev-popup-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
.prev-popup-sub {
    font-size: 12px;
    color: #b3d0f5;
    margin-top: 2px;
}
.prev-popup-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    border-radius: 5px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}
.prev-popup-close:hover { background: rgba(255,255,255,0.3); }

/* Body */
.prev-popup-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

/* Таблица */
.prev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.prev-table th {
    background: #f5f7fa;
    padding: 7px 10px;
    text-align: left;
    font-size: 11px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 1px solid #e0e8f0;
}
.prev-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.prev-table tr:last-child td { border-bottom: none; }
.prev-table tr:hover td { background: #f9fbff; }

.prev-td-num a {
    font-weight: 700;
    color: #218ADE;
    text-decoration: none;
}
.prev-td-num a:hover { text-decoration: underline; }
.prev-td-date { color: #888; white-space: nowrap; }
.prev-td-products { color: #444; max-width: 280px; }
.prev-td-sum b { color: #222; display: block; }
.prev-sum-bgn { font-size: 10px; color: #999; }

/* Статус бадж */
.prev-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.prev-s-ok   { background: #e8f5e9; color: #2e7d32; }
.prev-s-ship { background: #fff3e0; color: #c4620a; }
.prev-s-ret  { background: #fdecea; color: #b71c1c; }
.prev-s-pend { background: #f5f5f5; color: #777; }

/* Бутон към поръчка */
.prev-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #218ADE;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}
.prev-edit-btn:hover { background: #185FA5; }

/* Празно */
.prev-empty {
    text-align: center;
    color: #aaa;
    padding: 30px;
    font-size: 13px;
}


/* =============================================
   Popup предходни поръчки — мобилна версия
   ============================================= */
@media (max-width: 768px) {

    .prev-popup {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        top: auto;
        bottom: 0;
        left: 0;
        transform: none;
        border-radius: 14px 14px 0 0;
    }

    .prev-popup-header {
        padding: 12px 16px;
    }

    .prev-popup-title { font-size: 13px; }
    .prev-popup-sub   { font-size: 10px; }

    .prev-popup-body {
        padding: 12px 14px;
    }

    /* Таблицата → карти */
    .prev-table thead { display: none; }

    .prev-table tr {
        display: block;
        border: 1px solid #e0e8f0;
        border-radius: 7px;
        margin-bottom: 10px;
        padding: 10px 12px;
        position: relative;
    }

    .prev-table td {
        display: block;
        padding: 3px 0;
        border-bottom: none;
    }

    /* Поръчка + дата на един ред */
    .prev-td-num {
        display: inline-block !important;
        font-weight: 700;
        font-size: 13px;
    }
    .prev-td-date {
        display: inline-block !important;
        margin-left: 8px;
        font-size: 11px;
        color: #888;
    }

    /* Сума вдясно горе */
    .prev-td-sum {
        position: absolute;
        top: 10px;
        right: 12px;
        text-align: right;
    }
    .prev-td-sum b { font-size: 13px; }

    /* Продукти */
    .prev-td-products { padding-top: 6px !important; }
    .prev-product-img { width: 28px; height: 28px; }

    /* Статус */
    .prev-table td:nth-child(5) { margin-top: 6px; }

    /* Бутон отвори */
    .prev-table td:last-child {
        position: absolute;
        bottom: 10px;
        right: 12px;
    }

    /* Бутон история */
    .prev-orders-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .prev-popup { max-height: 85vh; }

    .prev-td-sum {
        position: static;
        text-align: left;
        margin-top: 4px;
    }

    .prev-table td:last-child {
        position: static;
        margin-top: 8px;
    }
}

/* =============================================
    Popup — предходни поръчки на клиента  КРАЙ
    ============================================= */


    /* =============================================
   Добавяне на наличности — addstock страница
   ============================================= */

.addstock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 16px;
}

.addstock-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 2px solid #218ADE;
    padding-bottom: 6px;
    margin-bottom: 14px;
}

/* Форма */
.addstock-form-label {
    display: block;
    padding: 8px 0 4px;
    color: #555;
    font-weight: 600;
    font-size: 13px;
}
.addstock-form-label span {
    font-weight: normal;
    color: #aaa;
}
.addstock-form-row {
    margin-bottom: 14px;
}
.addstock-qty-input {
    width: 120px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}
.addstock-unit {
    color: #888;
    font-size: 12px;
    margin-left: 8px;
}
.addstock-submit-btn {
    width: 100%;
    text-align: center;
    display: block;
}
.addstock-no-sku {
    color: #aaa;
    font-size: 13px;
    padding: 20px 0;
}

/* Преглед на избрания продукт */
.addstock-product-preview {
    display: none;
    align-items: center;
    gap: 12px;
    background: #e8f4fd;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.addstock-product-preview img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #b3d0f5;
    flex-shrink: 0;
}
.addstock-product-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: #185FA5;
}
.addstock-product-preview-sku {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* История таблица */
.addstock-history-empty {
    color: #aaa;
    font-size: 13px;
    padding: 20px 0;
}
.addstock-history-product {
    display: flex;
    align-items: center;
    gap: 8px;
}
.addstock-history-product img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e8f0;
    flex-shrink: 0;
}
.addstock-history-product-name {
    font-weight: 600;
    color: #222;
    font-size: 12px;
}
.addstock-history-product-sku {
    font-size: 10px;
    color: #888;
}
.addstock-qty-badge {
    font-size: 14px;
    font-weight: 700;
    color: #1a7a40;
}
.addstock-price {
    color: #888;
    font-size: 12px;
}
.addstock-date {
    color: #888;
    white-space: nowrap;
    font-size: 12px;
}
.addstock-note {
    color: #666;
    font-size: 11px;
}

/* =============================================
   Добавяне на наличности — мобилна версия
   ============================================= */
@media (max-width: 900px) {
    .addstock-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .addstock-product-preview {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .addstock-product-preview img {
        width: 44px;
        height: 44px;
    }
    .addstock-qty-input {
        width: 100% !important;
    }
    .addstock-submit-btn {
        padding: 12px !important;
        font-size: 14px !important;
    }

    /* История — карти вместо таблица */
    .addstock-grid .business-table thead { display: none; }

    .addstock-grid .business-table tr {
        display: block;
        border: 1px solid #e0e8f0;
        border-radius: 7px;
        margin-bottom: 10px;
        padding: 10px 12px;
    }
    .addstock-grid .business-table td {
        display: block;
        padding: 3px 0;
        border-bottom: none;
        text-align: left !important;
    }

    /* Продукт + бройка на един ред */
    .addstock-history-product {
        margin-bottom: 6px;
    }
    .addstock-qty-badge {
        float: right;
        font-size: 16px;
    }
    .addstock-date {
        font-size: 11px;
        color: #aaa;
    }
}

@media (max-width: 480px) {
    .addstock-product-preview img {
        width: 38px;
        height: 38px;
    }
    .addstock-history-product img {
        width: 28px;
        height: 28px;
    }
}


/* =============================================
   Наличност и известия в myproductedit
   ============================================= */

.stock-current-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 13px;
}
.stock-current-ok {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}
.stock-current-low {
    background: #fff8e1;
    border: 1px solid #ffe082;
}
.stock-current-critical {
    background: #fdecea;
    border: 1px solid #f5c4b3;
}

.stock-current-num {
    font-size: 22px;
    font-weight: 700;
    color: #1b5e20;
}
.stock-current-ok .stock-current-num    { color: #1b5e20; }
.stock-current-low .stock-current-num   { color: #854F0B; }
.stock-current-critical .stock-current-num { color: #b71c1c; }

.stock-current-label {
    font-size: 12px;
    color: #555;
}
.stock-current-threshold {
    font-size: 11px;
    color: #888;
}

.stock-alert-input {
    width: 80px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: center !important;
}
.stock-alert-unit {
    font-size: 12px;
    color: #888;
}
.stock-alert-badge-active {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.stock-alert-badge-off {
    background: #f5f5f5;
    color: #999;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.stock-alert-hint {
    font-size: 13px;
    color: #aaa;
    margin-top: 5px;
    font-style: italic;
}



/* ==============================================
   Продукти — преработена страница products/ID-products.html
   ============================================== */

/* Статистически кутии */
.prod-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.prod-stat-box {
    background: var(--color-bg-secondary, #f5f7fa);
    border-radius: 8px;
    padding: 10px 14px;
    border-left: 3px solid #218ADE;
}

.prod-stat-box.prod-stat-orange { border-left-color: #e07b1a; }
.prod-stat-box.prod-stat-purple { border-left-color: #7F77DD; }
.prod-stat-box.prod-stat-green  { border-left-color: #1D9E75; }
.prod-stat-box.prod-stat-blue   { border-left-color: #218ADE; }

.prod-stat-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 3px;
}

.prod-stat-num {
    font-size: 22px;
    font-weight: 600;
    color: #222;
    line-height: 1.1;
}

.prod-stat-num.prod-stat-num-sm {
    font-size: 13px;
    padding-top: 4px;
}

.prod-stat-sub {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
}

/* Alert банер */
.prod-alert-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 12px;
}

.prod-alert-red {
    background: #fdecea;
    border: 1px solid #f5c4b3;
    color: #b71c1c;
}

.prod-alert-yellow {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #854F0B;
}

.prod-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.prod-alert-red    .prod-alert-dot { background: #E24B4A; }
.prod-alert-yellow .prod-alert-dot { background: #BA7517; }

.prod-alert-text { flex: 1; line-height: 1.5; }

.prod-alert-link {
    font-weight: 600;
    margin-left: 8px;
    text-decoration: underline;
}

.prod-alert-red    .prod-alert-link { color: #b71c1c; }
.prod-alert-yellow .prod-alert-link { color: #854F0B; }

/* Header на списъка */
.prod-list-header {
    display: grid;
    grid-template-columns: 56px 1fr 100px 110px 130px 90px 140px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e8f0;
    margin-bottom: 8px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.plh-img  { width: 56px; }
.plh-cell { padding: 0 10px; }
.plh-right  { text-align: right; }
.plh-center { text-align: center; }

/* Карта на продукт */
.prod-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prod-card {
    display: grid;
    grid-template-columns: 56px 1fr 100px 110px 130px 90px 140px;
    align-items: center;
    background: #fff;
    border: 0.5px solid #e0e8f0;
    border-left: 3px solid #e0e8f0;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.prod-card:hover {
    border-color: #c5d8ee;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

/* Снимка */
.prod-card-img {
    width: 56px;
    height: 68px;
    flex-shrink: 0;
    overflow: hidden;
}

.prod-card-img img {
    width: 56px;
    height: 68px;
    object-fit: cover;
    display: block;
}

.prod-img-empty {
    width: 56px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    color: #ccc;
}

/* Инфо */
.prod-card-info {
    padding: 10px 12px;
}

.prod-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    margin-bottom: 3px;
}

.prod-card-sku {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.prod-sku-missing {
    color: #E24B4A;
    font-style: italic;
}

.prod-badge-main {
    display: inline-block;
    background: #e8f4fd;
    color: #185FA5;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
}

/* Цена */
.prod-card-price {
    padding: 10px 11px;
    text-align: right;
}

.prod-price-main {
    font-size: 12px;
    font-weight: 600;
    color: #222;
}

.prod-price-sub {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
}

/* Производствена стойност */
.prod-card-cost {
    padding: 11px;
    text-align: right;
}

.prod-cost-main {
    font-size: 12px;
    color: #555;
}

.prod-cost-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 1px;
}

.prod-cost-missing {
    font-size: 11px;
    color: #E24B4A;
    font-style: italic;
}

/* Наличност */
.prod-card-stock {
    padding: 10px 12px;
}

.stock-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 5px;
}

.stock-num {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.prod-stock-ok       .stock-num { color: #1D9E75; }
.prod-stock-low      .stock-num { color: #BA7517; }
.prod-stock-critical .stock-num { color: #E24B4A; }
.prod-stock-nosku    .stock-num { color: #888; }

.stock-unit {
    font-size: 11px;
    color: #888;
}

.stock-threshold {
    font-size: 11px;
    color: #bbb;
    margin-left: 4px;
}

/* === 3-числа stock layout (Физическо / Резервирано / Свободно) === */
.stock-3num {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}
.s3-item {
    text-align: center;
    padding: 6px 4px;
    background: #f8fafd;
    border-radius: 5px;
    border: 1px solid #e8edf3;
    cursor: help;
}
.s3-val {
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    color: #1e293b;
}
.s3-lbl {
    font-size: 9.5px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.s3-phys { background: #eff6ff; border-color: #dbeafe; }
.s3-phys .s3-val { color: #1d4ed8; }
.s3-resv { background: #fff7ed; border-color: #fed7aa; }
.s3-resv .s3-val { color: #94a3b8; } /* сив когато 0 */
.s3-resv .s3-val.s3-resv-on { color: #c2410c; } /* оранжев когато > 0 */
.s3-free { background: #ecfdf5; border-color: #a7f3d0; }
.s3-free .s3-val { color: #047857; }
/* Status-based override на „Свободно" (винаги по нея, не по физическото) */
.prod-stock-critical .s3-free .s3-val { color: #c0392b; }
.prod-stock-low      .s3-free .s3-val { color: #b45309; }
.prod-stock-nosku    .s3-free .s3-val { color: #888; }
.s3-val.s3-neg { color: #c0392b !important; } /* отрицателно физическо = аларма */

.stock-threshold-line {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 4px;
}
.stock-threshold-line b { color: #475569; font-weight: 600; }

.stock-bar-bg {
    height: 4px;
    background: #eef0f4;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.stock-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s;
}

.prod-stock-ok       .stock-bar-fill { background: #1D9E75; }
.prod-stock-low      .stock-bar-fill { background: #BA7517; }
.prod-stock-critical .stock-bar-fill { background: #E24B4A; }
.prod-stock-nosku    .stock-bar-fill { background: #ccc; }

/* Бадж за наличност */
.stock-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
}

.stock-badge-ok   { background: #EAF3DE; color: #3B6D11; }
.stock-badge-low  { background: #FAEEDA; color: #854F0B; }
.stock-badge-crit { background: #FCEBEB; color: #A32D2D; }
.stock-badge-nosku{ background: #f0f0f0; color: #999; }

/* Продадени */
.prod-card-sold {
    padding: 10px;
    text-align: center;
}

.sold-num {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    line-height: 1.1;
}

.sold-sub {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

/* Действия */
.prod-card-actions {
    padding: 8px 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.prod-act-btn {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    border: 1px solid #cfd9e6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.prod-act-btn svg {
    width: 19px;
    height: 19px;
}

.prod-act-edit         { color: #218ADE; }
.prod-act-edit:hover   { background: #e8f4fd; border-color: #b3d0f5; }

.prod-act-del          { color: #E24B4A; }
.prod-act-del:hover    { background: #fdecea; border-color: #f5c4b3; }

/* Празно */
.prod-empty {
    padding: 40px;
    text-align: center;
    color: #aaa;
    font-size: 13px;
    border: 0.5px dashed #ddd;
    border-radius: 8px;
}

/* ==============================================
   Мобилна версия — myproducts/ID-products.html
   ============================================== */

@media (max-width: 900px) {
    .prod-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prod-list-header { display: none; }

    .prod-card {
        grid-template-columns: 56px 1fr;
        grid-template-rows: auto auto auto auto;
    }

    .prod-card-img {
        grid-row: 1 / 3;
        height: 100%;
        min-height: 80px;
    }

    .prod-card-info    { grid-column: 2; padding: 10px 12px 4px; }

    .prod-card-price,
    .prod-card-cost {
        grid-column: 2;
        text-align: left;
        padding: 2px 12px;
    }

    .prod-card-stock {
        grid-column: 1 / -1;
        border-top: 0.5px solid #f0f0f0;
        padding: 8px 12px;
    }

    .prod-card-sold {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 12px 8px;
        grid-column: 1 / -1;
    }

    .prod-card-sold .sold-num { font-size: 13px; }
    .prod-card-sold .sold-sub { font-size: 11px; margin-top: 0; }

    .prod-card-actions {
        flex-direction: row;
        padding: 8px 12px;
        justify-content: flex-end;
        grid-column: 1 / -1;
        border-top: 0.5px solid #f0f0f0;
    }
}

@media (max-width: 480px) {
    .prod-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .prod-stat-num { font-size: 18px; }

    .prod-alert-bar { flex-direction: column; align-items: flex-start; gap: 6px; }

    .prod-card-name { font-size: 11px; }
}

.packing-list-header, .packing-list-row { grid-template-columns: 175px 160px 1fr 140px 90px 110px; }
#takenSection .packing-list-header, #takenSection .packing-list-row { grid-template-columns: 150px 160px 1fr 120px 90px 110px; }
/* "Пакетирани днес": тикче + товарителница на ЕДИН ред (без чупене на номера) */
#packingSection .packing-awb { display: flex; align-items: center; gap: 6px; white-space: nowrap; word-break: normal; }
#packingSection .packing-awb a { white-space: nowrap; }
/* Колона „Продукти" в „Пакетиране днес" — целият продуктов ред на ЕДИН ред (без пренасяне на две) */
#packingSection .packing-product-row { white-space: nowrap; }
/* min-width:0 спира разтягането на 1fr колоната от дългото nowrap съдържание,
   за да НЕ избутва дясната колона „Наложен" извън рамката (grid blowout fix) */
#packingSection .packing-products { min-width: 0; overflow: hidden; }


/* ==============================================
   BUY SUCCESS страница (префикс buy-)
   Добавя се в main CSS
   ============================================== */

.buy-success-wrap {
    background: #fff;
    border: 1px solid #e0e8f0;
    border-radius: 14px;
    padding: 40px 32px;
    text-align: center;
}

.buy-success-icon {
    margin-bottom: 16px;
}

.buy-success-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.buy-success-sub {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}

/* Кутии с резултат */
.buy-success-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.buy-ss-box {
    border-radius: 10px;
    padding: 16px;
}

.buy-ss-blue {
    background: #e8f4fd;
}
.buy-ss-blue .buy-ss-label { color: #185FA5; }
.buy-ss-blue .buy-ss-num   { color: #0C447C; }

.buy-ss-green {
    background: #f0fdf4;
    border: 1px solid #a5d6a7;
}
.buy-ss-green .buy-ss-label { color: #1a7a40; }
.buy-ss-green .buy-ss-num   { color: #16a34a; }

.buy-ss-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.buy-ss-num {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.buy-ss-sub {
    font-size: 12px;
    margin-top: 3px;
    color: #888;
}

/* Бележка */
.buy-success-note {
    font-size: 12px;
    color: #aaa;
    background: #f9f9f9;
    border-radius: 7px;
    padding: 10px 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Бутони */
.buy-success-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.buy-btn-packages {
    padding: 10px 22px;
    background: #2563a8;
    color: #fff;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.buy-btn-packages:hover {
    background: #1a4f8a;
    color: #fff;
    text-decoration: none;
}

.buy-btn-messages {
    padding: 10px 22px;
    background: #f5f7fa;
    color: #555;
    border: 1px solid #e0e8f0;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
}
.buy-btn-messages:hover {
    background: #e8f4fd;
    color: #2563a8;
    text-decoration: none;
}

/* Spinner (pending) */
.buy-pending-spinner {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}
.buy-pending-spinner svg {
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.buy-pending-note {
    font-size: 12px;
    color: #aaa;
    margin-top: 12px;
}

@media (max-width: 480px) {
    .buy-success-wrap   { padding: 28px 16px; }
    .buy-success-stats  { grid-template-columns: 1fr; }
    .buy-ss-num         { font-size: 26px; }
}

/* ============================================================
   COMPACT PRODUCT LIST VIEW (toggle .prod-compact on body)
   Halves row height so ~2x more products fit without scrolling.
   Desktop only (>=769px) — mobile keeps its own stacked layout.
   ============================================================ */
@media (min-width: 769px) {
body.prod-compact .prod-list { gap: 4px; }
body.prod-compact .prod-list-header,
body.prod-compact .prod-card {
    grid-template-columns: 40px 1fr 92px 100px 128px 74px 140px;
    padding: 4px 10px;
    align-items: center;
}
body.prod-compact .prod-card-img,
body.prod-compact .prod-card-img img { width: 34px; height: 42px; }
body.prod-compact .prod-card-info { padding: 0 8px; }
body.prod-compact .prod-card-name {
    font-size: 12px; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.prod-compact .prod-card-sku { font-size: 10px; margin-top: 1px; }
/* Stock: keep the 3 cubes (color-coded + tooltips), drop threshold line + bar */
body.prod-compact .prod-card-stock { padding: 2px 6px; }
body.prod-compact .stock-3num { gap: 4px; margin-bottom: 0; }
body.prod-compact .s3-item { padding: 3px 3px; }
body.prod-compact .s3-val { font-size: 13px; }
body.prod-compact .s3-lbl { font-size: 8px; margin-top: 1px; }
body.prod-compact .stock-threshold-line,
body.prod-compact .prod-card-stock .stock-bar-bg,
body.prod-compact .prod-card-stock .stock-badge { display: none; }
/* Price / cost / sold: smaller */
body.prod-compact .prod-card-price,
body.prod-compact .prod-card-cost { font-size: 12px; padding: 4px 8px; }
body.prod-compact .prod-card-sold { padding: 4px; }
body.prod-compact .prod-card-sold .sold-num { font-size: 13px; }
body.prod-compact .prod-card-sold .sold-sub { font-size: 10px; margin-top: 0; }
/* Actions: side by side instead of stacked */
body.prod-compact .prod-card-actions { flex-direction: row; gap: 6px; padding: 4px; }
} /* end @media min-width 769px — compact product view */
