*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

input,
select,
textarea{
    font-size:16px !important;
}

body{
    background:#f4f7fb;
    padding-bottom:120px;
    color:#333;
}

/* ===========================
   STICKY HEADER
=========================== */

.sticky-header{
    position:sticky;
    top:0;
    z-index:1000;
    background:#fff;
    padding:12px;
    box-shadow:0 2px 15px rgba(0,0,0,.1);
}

.sticky-header h1{
    text-align:center;
    color:#0054A6;
    font-size:22px;
}

.header-top{
    display:grid;
    grid-template-columns:76px 1fr 76px;
    align-items:center;
    gap:8px;
    margin-bottom:12px;
}

.header-logo{
    display:block;
    width:76px;
    height:auto;
    max-height:46px;
    object-fit:contain;
}

.header-top .menu-toggle{
    justify-self:end;
}

.header-title{
    text-align:center;
    min-width:0;
}

.current-mode-label{
    display:inline-block;
    margin-top:4px;
    padding:2px 10px;
    border-radius:999px;
    background:#e8f1fb;
    color:#0054A6;
    font-size:12px;
    font-weight:700;
}

.menu-toggle{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:5px;
    width:44px;
    height:44px;
    padding:0 11px;
    border:1px solid #d7e1ed;
    border-radius:12px;
    background:#fff;
    cursor:pointer;
}

.menu-toggle span{
    display:block;
    height:2px;
    border-radius:2px;
    background:#0054A6;
}

.menu-toggle:focus-visible,
.app-menu-item:focus-visible{
    outline:3px solid rgba(0,84,166,.25);
    outline-offset:2px;
}

.app-menu-backdrop{
    position:fixed;
    inset:0;
    z-index:1100;
    background:rgba(15,30,45,.35);
}

.app-menu{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    z-index:1101;
    display:flex;
    flex-direction:column;
    gap:8px;
    width:min(280px, 82vw);
    padding:18px 14px;
    overflow-y:auto;
    background:#fff;
    box-shadow:-6px 0 24px rgba(0,0,0,.15);
    animation:menu-slide-in .18s ease-out;
}

.app-menu > *{
    flex-shrink:0;
}

body:not(.role-admin) .admin-only,
body:not(.role-owner) .owner-only,
body.role-admin .guest-only{
    display:none !important;
}

.app-menu-item.sync-status{
    border-color:#f5d48f;
    background:#fff8e6;
    color:#8a5a00;
}

.app-menu-backdrop[hidden],
.app-menu[hidden],
.app-menu-item[hidden]{
    display:none;
}

@keyframes menu-slide-in{
    from{ transform:translateX(100%); }
    to{ transform:translateX(0); }
}

.app-menu-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    padding-bottom:12px;
    margin-bottom:4px;
    border-bottom:1px solid #e6edf5;
}

.app-menu-header strong{
    display:block;
    color:#1f3347;
    font-size:16px;
}

.app-menu-header span{
    color:#667789;
    font-size:13px;
}

.app-menu-close{
    border:0;
    background:none;
    color:#667789;
    font-size:26px;
    line-height:1;
    cursor:pointer;
}

.app-menu-section{
    margin-top:4px;
    color:#8494a6;
    font-size:12px;
    font-weight:700;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.app-menu-item{
    width:100%;
    padding:13px 14px;
    border:1px solid #d7e1ed;
    border-radius:12px;
    background:#fff;
    color:#31516f;
    font-size:15px;
    font-weight:700;
    text-align:left;
    cursor:pointer;
}

.app-menu-item.active{
    border-color:#0054A6;
    background:#0054A6;
    color:#fff;
}

.app-menu-item.logout{
    margin-top:auto;
    border-color:#f1c9c9;
    color:#b42318;
}

/* ===========================
   LOGIN
=========================== */

body.login-open > :not(.login-screen):not(script){
    display:none !important;
}

body:not(.login-open) .login-screen{
    display:none;
}

body.login-open{
    padding-bottom:0;
}

body:not(.role-admin) .clear-all-btn{
    display:none;
}

/* The page itself never scrolls (see the app shell), so the login screen scrolls on its own
   and is only as tall as the space above the keyboard. */
.login-screen{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:var(--app-height, 100dvh);
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding:24px 16px calc(24px + env(safe-area-inset-bottom));
    background:linear-gradient(160deg, #e8f1fb 0%, #f4f7fb 60%);
}

.login-card{
    margin:auto;
    flex-shrink:0;
    display:flex;
    flex-direction:column;
    width:min(360px, 100%);
    padding:28px 22px;
    border-radius:20px;
    background:#fff;
    box-shadow:0 10px 30px rgba(0,60,120,.12);
}

.login-logo{
    display:block;
    width:150px;
    height:auto;
    margin:0 auto 10px;
}

.login-card h1{
    color:#0054A6;
    font-size:22px;
    text-align:center;
}

.login-subtitle{
    margin:4px 0 20px;
    color:#667789;
    font-size:14px;
    text-align:center;
}

.login-card label{
    margin-bottom:6px;
    color:#46586b;
    font-size:13px;
    font-weight:700;
}

.login-card input{
    margin-bottom:14px;
    padding:12px 14px;
    border:1px solid #d7e1ed;
    border-radius:12px;
    background:#fbfdff;
}

.login-card input:focus{
    border-color:#0054A6;
    outline:3px solid rgba(0,84,166,.15);
}

.login-error{
    margin:-4px 0 12px;
    color:#b42318;
    font-size:14px;
}

.login-btn{
    padding:14px;
    border:0;
    border-radius:12px;
    background:#0054A6;
    color:#fff;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
}

.login-btn:disabled{
    opacity:.7;
    cursor:wait;
}

.login-back-btn{
    margin-top:10px;
    padding:12px;
    border:1px solid #d7e1ed;
    border-radius:12px;
    background:#fff;
    color:#46586b;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
}

.app-menu-item.admin-login{
    margin-top:auto;
    border-color:#bcd3ec;
    color:#0054A6;
}

.dashboard{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
}

body.route-sale-mode .dashboard{
    grid-template-columns:1fr;
}

body.route-sale-mode .card.sale span{
    font-size:14px;
    font-weight:700;
    opacity:1;
}

body.route-sale-mode .card.sale strong{
    font-size:24px;
}

body.route-sale-mode #invoiceCard,
body.route-sale-mode #profitCard,
body.route-sale-mode #netCard,
body.route-sale-mode #financialDetails,
body.route-sale-mode #expensesSection{
    display:none;
}

.card{
    padding:12px;
    border-radius:14px;
    color:#fff;
    text-align:center;
}

.card span{
    display:block;
    font-size:12px;
    opacity:.9;
}

.card strong{
    display:block;
    margin-top:5px;
    font-size:18px;
}

.sale{
    background:#0054A6;
}

.invoice{
    background:#F9A825;
}

.profit{
    background:#0E8A45;
}

.net{
    background:#00695C;
}

/* ===========================
   SEARCH BAR
=========================== */

.search-wrapper{
    position:sticky;
    top:var(--sticky-header-height, 190px);
    z-index:998;
    background:#f4f7fb;
    padding:12px;
}

body.route-sale-mode .search-wrapper{
    padding-top:6px;
}

.search{
    width:100%;
    padding:14px;
    border:none;
    border-radius:15px;
    font-size:16px;
    background:white;
    box-shadow:0 2px 12px rgba(0,0,0,.08);
}

.clear-quantities-btn{
    display:block;
    width:100%;
    margin:4px 0 12px;
    padding:10px 14px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    background:#fff;
    color:#46586b;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
}

.clear-quantities-btn:hover{
    background:#f0f5fa;
}

.clear-options-dialog{
    width:min(380px, calc(100% - 36px));
    margin:auto;
    padding:22px;
    border:0;
    border-radius:18px;
    color:#333;
    box-shadow:0 16px 50px rgba(15,35,55,.25);
}

.clear-options-dialog::backdrop{
    background:rgba(16,31,48,.52);
}

.clear-options-dialog h2{
    color:#0054A6;
    font-size:19px;
}

.clear-options-dialog p{
    margin:9px 0 15px;
    color:#667789;
    font-size:14px;
    line-height:1.45;
}

.clear-options-dialog .clear-all-btn{
    background:#b42318;
}

.clear-options-dialog .clear-products-btn{
    background:#0054A6;
}

.clear-options-cancel{
    display:block;
    width:100%;
    margin-top:12px;
    padding:10px;
    border:0;
    background:transparent;
    color:#526477;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
}

.clear-undo-notice{
    display:flex;
    align-items:center;
    gap:10px;
    margin:-4px 0 10px;
    padding:9px 12px;
    border:1px solid #bfdbfe;
    border-radius:10px;
    background:#eff6ff;
    color:#24476a;
    font-size:13px;
}

.clear-undo-notice[hidden]{
    display:none;
}

.clear-undo-notice span{
    flex:1;
}

.clear-undo-notice button{
    border:0;
    background:transparent;
    color:#0054A6;
    font:inherit;
    font-weight:700;
    cursor:pointer;
}

.clear-undo-notice .clear-undo-dismiss{
    color:#667789;
    font-size:19px;
    line-height:1;
}

.daily-save-status{
    margin:-5px 2px 10px;
    color:#667789;
    font-size:12px;
}

.route-new-product{
    display:none;
    margin:4px 0 12px;
}

.load-new-product{
    margin:4px 0 12px;
}

body.route-sale-mode .route-new-product{
    display:block;
}

body.route-sale-mode .load-new-product{
    display:none;
}

.route-product-dialog{
    width:min(440px, calc(100% - 28px));
    max-height:min(80vh, 640px);
    margin:auto;
    padding:18px;
    border:0;
    border-radius:18px;
    color:#333;
    box-shadow:0 16px 50px rgba(15,35,55,.25);
}

.outlet-name-dialog{
    max-height:none;
}

.route-product-dialog::backdrop{
    background:rgba(16,31,48,.48);
}

/* While typing in a popup, keep the popup inside the space above the keyboard. */
body.keyboard-open dialog[open]{
    bottom:var(--keyboard-gap, 0px);
    max-height:calc(var(--app-height, 100dvh) - 16px) !important;
    overflow-y:auto;
}

.bill-alert-dialog{
    width:min(340px, calc(100% - 36px));
    margin:auto;
    padding:24px;
    border:0;
    border-radius:18px;
    color:#333;
    text-align:center;
    box-shadow:0 16px 50px rgba(15,35,55,.25);
}

.bill-alert-dialog::backdrop{
    background:rgba(16,31,48,.52);
}

.bill-alert-icon{
    display:grid;
    place-items:center;
    width:46px;
    height:46px;
    margin:0 auto 12px;
    border-radius:50%;
    background:#fff3d6;
    color:#a86100;
    font-size:26px;
    font-weight:700;
}

.bill-alert-dialog h2{
    color:#0054A6;
    font-size:19px;
}

.bill-alert-dialog p{
    margin:10px 0 20px;
    color:#667789;
    font-size:15px;
    line-height:1.45;
}

.bill-alert-dialog .btn{
    min-width:100px;
}

.route-product-dialog-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.route-product-dialog-header h2{
    color:#0054A6;
    font-size:19px;
}

.route-product-dialog p{
    margin:8px 0 14px;
    color:#667789;
    font-size:14px;
}

.route-dialog-close{
    width:36px;
    height:36px;
    border:0;
    border-radius:10px;
    background:#f0f3f7;
    color:#46586b;
    font-size:24px;
    cursor:pointer;
}

.route-product-options{
    display:grid;
    gap:8px;
    max-height:55vh;
    overflow-y:auto;
}

.route-product-form[hidden]{
    display:none;
}

.route-product-form label{
    display:block;
    margin:12px 0 5px;
    color:#354b61;
    font-size:14px;
    font-weight:700;
}

.route-product-form input,
.route-product-form select{
    width:100%;
    min-height:44px;
    padding:10px 12px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    color:#123a63;
    font-weight:600;
}

.route-product-form input:focus,
.route-product-form select:focus{
    outline:none;
    border-color:#0054A6;
    box-shadow:0 0 0 3px rgba(0,84,166,.12);
}

.phone-number-input{
    display:flex;
    align-items:center;
    min-height:44px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    background:#fff;
}

.phone-number-input:focus-within{
    border-color:#0054A6;
    box-shadow:0 0 0 3px rgba(0,84,166,.12);
}

.phone-country-code{
    padding:0 0 0 12px;
    color:#123a63;
    font-weight:700;
}

.route-product-form .phone-number-input input{
    min-width:0;
    border:0;
    box-shadow:none;
}

.route-product-form .phone-number-input input:focus{
    border:0;
    box-shadow:none;
}

.route-product-form .whatsapp-consent{
    display:flex;
    align-items:flex-start;
    gap:9px;
    margin-top:16px;
    font-weight:500;
}

.route-product-form .whatsapp-consent input{
    width:18px;
    min-height:18px;
    margin-top:1px;
    accent-color:#0054A6;
}

.route-product-form .send-invoice-option{
    margin:16px 0 4px;
    color:#123a63;
    font-weight:700;
}

#whatsappSendFields[hidden]{
    display:none;
}

.invoice-preview-dialog{
    width:min(720px, calc(100% - 16px));
    height:fit-content;
    max-height:92vh;
    margin:auto;
    padding:14px;
    border:0;
    border-radius:16px;
    box-shadow:0 16px 50px rgba(15,35,55,.25);
}

.invoice-preview-dialog::backdrop{
    background:rgba(16,31,48,.58);
}

.invoice-preview-dialog .route-product-dialog-header{
    margin-bottom:12px;
}

.invoice-preview-dialog h2{
    margin:0;
    color:#0054A6;
    font-size:19px;
}

.invoice-preview-pages{
    max-height:calc(92vh - 140px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    border:1px solid #d7e1ed;
    border-radius:8px;
    background:#e9eef4;
    padding:6px;
}

.invoice-preview-pages canvas{
    display:block;
    width:100%;
    height:auto;
    background:#fff;
    box-shadow:0 1px 4px rgba(15,35,55,.18);
}

.invoice-preview-pages canvas + canvas{
    margin-top:8px;
}

.invoice-preview-pages .invoice-preview-status{
    margin:40px 0;
    text-align:center;
    color:#64748b;
}

.invoice-preview-dialog .route-form-actions{
    justify-content:flex-end;
}

.route-form-actions{
    display:flex;
    gap:10px;
    margin-top:14px;
}

.route-form-actions .btn{
    margin-top:0;
}

.route-form-cancel{
    background:#e8eef5;
    color:#31516f;
}

.route-product-option{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:10px;
    border:1px solid #e2e9f1;
    border-radius:12px;
}

.route-product-option div{
    display:grid;
    gap:3px;
}

.route-product-option strong{
    font-size:14px;
}

.route-product-option span{
    color:#667789;
    font-size:12px;
}

.route-option-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:6px;
}

.route-option-toggle{
    min-width:76px;
    padding:8px 10px;
    border:0;
    border-radius:9px;
    background:#0054A6;
    color:#fff;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.route-option-toggle.included{
    background:#e8f5ec;
    color:#14753d;
}

.route-option-toggle:disabled{
    background:#edf1f5;
    color:#667789;
    cursor:default;
}

.search:focus{
    outline:none;
}

/* ===========================
   MAIN CONTAINER
=========================== */

.container{
    padding:12px;
}

/* ===========================
   PRODUCT CARDS
=========================== */

.product-card{
    background:#fff;
    border-radius:14px;
    padding:10px 12px;
    margin-bottom:9px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    grid-template-rows:auto auto;
    align-items:center;
    column-gap:10px;
}

.product-header{
    display:contents;
}

.product-title{
    grid-column:1;
    grid-row:1;
    min-width:0;
}

.product-title h4{
    font-size:16px;
    margin-bottom:2px;
}

.rate{
    color:#666;
    font-size:12px;
}

.pack-info{
    margin-top:3px;
    color:#0054A6;
    font-size:11px;
    font-weight:600;
}

.amount-box{
    grid-column:1;
    grid-row:2;
    font-size:16px;
    font-weight:bold;
    color:#0E8A45;
    white-space:nowrap;
    margin-top:5px;
}

.qty-section{
    display:flex;
    grid-column:2;
    grid-row:1;
    justify-content:center;
    align-items:center;
    align-self:center;
    gap:6px;
    margin:0;
}

.qty-btn{
    width:34px;
    height:34px;
    border:none;
    border-radius:10px;
    background:#0054A6;
    color:white;
    font-size:20px;
    cursor:pointer;
}

.qty-btn:active{
    transform:scale(.96);
}

.qty-input{
    width:54px;
    height:34px;
    padding:4px;
    border:none;
    border-radius:10px;
    text-align:center;
    background:#f5f7fb;
    font-size:16px;
    font-weight:bold;
}

.qty-unit{
    color:#667789;
    font-size:11px;
    font-weight:600;
    white-space:nowrap;
}

.qty-input:focus{
    outline:none;
    border:2px solid #0054A6;
}

/* ===========================
   COMMON SECTION
=========================== */

.section{
    background:white;
    border-radius:18px;
    padding:18px;
    margin-top:15px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
}

.section h2{
    margin-bottom:15px;
    color:#0054A6;
}

.section label{
    display:block;
    margin-top:12px;
    margin-bottom:5px;
    font-weight:600;
}

.section input{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
    font-size:16px;
}

.section input:focus{
    outline:none;
    border:1px solid #0054A6;
}

.currency-input{
    color:#123a63;
    font-weight:700;
    font-variant-numeric:tabular-nums;
    background:#f7faff;
    border:1px solid #c8d9eb !important;
    box-shadow:inset 0 1px 2px rgba(18,58,99,.05);
}

.currency-input:focus{
    border-color:#0054A6 !important;
    box-shadow:0 0 0 3px rgba(0,84,166,.12);
}

/* ===========================
   EXPENSES
=========================== */

.expense-row{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
}

.expense-row input{
    flex:1;
    min-width:0;
    font-size:16px;
}

.expense-cost{
    color:#123a63;
    font-weight:700;
    font-variant-numeric:tabular-nums;
    background:#f7faff;
    border-color:#c8d9eb !important;
}

.expense-cost:focus{
    border-color:#0054A6 !important;
    box-shadow:0 0 0 3px rgba(0,84,166,.12);
}

.expense-delete{
    flex:0 0 38px;
    width:38px;
    height:42px;
    border:0;
    border-radius:10px;
    background:#fff0f0;
    color:#c62828;
    font-size:24px;
    line-height:1;
    cursor:pointer;
}

.expense-delete:hover{
    background:#ffe0e0;
}

/* ===========================
   BUTTONS
=========================== */

.btn{
    width:100%;
    border:none;
    border-radius:12px;
    padding:14px;
    margin-top:10px;
    cursor:pointer;
    font-size:16px;
    font-weight:600;
    color:white;
    background:#0054A6;
}

.btn:hover{
    opacity:.95;
}

.pdf-btn{
    background:#0E8A45;
}

.preview-btn{
    background:#0054A6;
}

.bill-action-buttons{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
}

.bill-action-buttons .btn{
    margin-top:0;
}

/* ===========================
   MOBILE
=========================== */

@media(max-width:480px){

    .sticky-header h1{
        font-size:18px;
    }

    .header-top{
        grid-template-columns:64px 1fr 64px;
        gap:6px;
    }

    .header-logo{
        width:64px;
    }

    .card strong{
        font-size:16px;
    }

    .amount-box{
        font-size:16px;
    }

    .product-title h4{
        font-size:15px;
    }

    .product-card{
        padding:9px 10px;
        column-gap:6px;
    }

    .qty-section{
        gap:5px;
    }

    .qty-btn{
        width:32px;
        height:32px;
    }

    .qty-input{
        width:48px;
        height:32px;
    }

    .qty-unit{
        font-size:10px;
    }
}
/* ===========================
   RECORDS (history, monthly, prices)
=========================== */

.records-dialog{
    width:min(720px, calc(100% - 20px));
    max-height:92vh;
    margin:auto;
    padding:18px;
    border:0;
    border-radius:16px;
    color:#333;
    box-shadow:0 16px 50px rgba(15,35,55,.25);
}

.records-dialog::backdrop{
    background:rgba(16,31,48,.52);
}

.records-toolbar{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    margin:14px 0 6px;
}

.records-toolbar label{
    color:#31516f;
    font-weight:700;
}

.records-toolbar input{
    flex:1;
    min-width:150px;
    padding:9px 10px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    font-size:15px;
}

.records-toolbar .records-pdf-btn{
    margin-top:0;
    padding:10px 14px;
}

.records-note{
    margin:8px 0;
    color:#667789;
    font-size:13px;
}

.records-note[hidden]{
    display:none;
}

.records-content{
    display:grid;
    gap:12px;
    margin-top:10px;
}

.records-card{
    padding:14px;
    border:1px solid #e1e8f0;
    border-radius:12px;
    background:#fbfcfe;
}

.records-card h3{
    margin:0 0 10px;
    color:#123a63;
    font-size:16px;
}

.records-card-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
}

.records-card-head h3{
    margin:0;
}

.records-total{
    color:#31516f;
    font-weight:700;
    font-size:14px;
}

.records-stats{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:8px;
}

.records-stats div{
    display:flex;
    flex-direction:column;
    gap:2px;
    padding:10px;
    border-radius:10px;
    background:#fff;
    border:1px solid #e6edf5;
}

.records-stats span,
.records-stats small{
    color:#667789;
    font-size:12px;
}

.records-stats strong{
    color:#123a63;
    font-size:16px;
}

.records-list{
    display:grid;
    gap:8px;
    margin:0;
    padding:0;
    list-style:none;
}

.records-list li{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid #e6edf5;
    border-radius:10px;
    background:#fff;
}

.records-bill-main{
    display:flex;
    flex:1;
    min-width:0;
    flex-direction:column;
    gap:2px;
}

.records-bill-main strong{
    overflow:hidden;
    color:#1f3347;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.records-bill-main span{
    color:#667789;
    font-size:12.5px;
}

.records-bill-main .records-pending{
    color:#a86100;
    font-weight:700;
}

.records-amount{
    color:#123a63;
    white-space:nowrap;
}

.records-link{
    padding:7px 10px;
    border:1px solid #0054A6;
    border-radius:8px;
    background:#fff;
    color:#0054A6;
    font-weight:700;
    cursor:pointer;
}

.records-empty{
    margin:0;
    color:#667789;
    font-size:14px;
}

.records-table{
    width:100%;
    border-collapse:collapse;
    font-size:13.5px;
}

.records-table th,
.records-table td{
    padding:8px 6px;
    border-bottom:1px solid #e6edf5;
    text-align:right;
    white-space:nowrap;
}

.records-table th:first-child{
    text-align:left;
    white-space:normal;
}

.records-table thead th{
    color:#667789;
    font-size:12px;
    font-weight:700;
}

.records-table tbody th{
    color:#1f3347;
    font-weight:600;
}

.prices-table input{
    width:96px;
    padding:7px 8px;
    border:1px solid #d7e1ed;
    border-radius:8px;
    font-size:14px;
    text-align:right;
}

.backup-actions{
    display:grid;
    gap:10px;
}

.backup-actions .btn{
    margin-top:0;
    text-align:center;
}

.backup-restore-label{
    display:block;
    cursor:pointer;
}

@media (max-width:480px){
    .records-stats strong{
        font-size:14px;
    }

    .records-table{
        font-size:12.5px;
    }

    .prices-table input{
        width:76px;
    }
}

.route-product-form .product-form-toggle{
    display:flex;
    align-items:center;
    gap:8px;
    margin:12px 0 4px;
    cursor:pointer;
}

.route-product-form .product-form-toggle input{
    width:18px;
    height:18px;
    min-height:0;
    margin:0;
    padding:0;
    flex-shrink:0;
    accent-color:#0054A6;
}

.product-form-group{
    padding:4px 10px 8px;
    border-left:3px solid #d8e6f5;
}

.product-staff-fieldset{
    margin:10px 0 0;
    padding:6px 10px 10px;
    border:1px solid #e6edf5;
    border-radius:10px;
}

.product-staff-fieldset legend{
    padding:0 4px;
    color:#123a63;
    font-weight:700;
}

.product-staff-list{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));
    gap:0 10px;
    margin-bottom:6px;
}

.route-product-form .product-staff-list .product-form-toggle{
    margin:6px 0;
    font-weight:500;
}

.product-delete-btn{
    margin-right:auto;
    border:1px solid #c62828;
    background:#fff;
    color:#c62828;
}

/* Payments, dues, settlement & stock */

.outlet-due-hint{
    margin:8px 0 0;
    padding:8px 10px;
    border-radius:8px;
    background:#fff4e5;
    color:#9a4b00 !important;
    font-size:13.5px;
    font-weight:700;
}

.outlet-due-hint[hidden]{
    display:none;
}

.route-product-form input.outlet-picker-field{
    padding-right:40px;
    cursor:pointer;
    background:#f8fbff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230054A6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    caret-color:transparent;
}

#gstBillFields[hidden]{
    display:none;
}

.outlet-pick-list{
    list-style:none;
    margin:0;
    padding:4px 0;
    max-height:60vh;
    overflow-y:auto;
}

#outletPickerSearch{
    flex:1 1 200px;
    min-height:44px;
    padding:10px 12px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    font:inherit;
}

.outlet-pick-list li + li{
    margin-top:6px;
}

.outlet-pick-list button{
    display:flex;
    flex-direction:column;
    gap:2px;
    width:100%;
    padding:12px 14px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    background:#fff;
    color:#123a63;
    font:inherit;
    text-align:left;
    cursor:pointer;
}

.outlet-pick-list button span{
    color:#647b93;
    font-size:12.5px;
}

.outlet-pick-list button:hover,
.outlet-pick-list button.selected{
    border-color:#0054A6;
    background:#eaf2fb;
}

.outlet-pick-empty{
    padding:12px;
    color:#9a4b00;
    font-size:13.5px;
    font-weight:600;
}

.outlet-pick-distance{
    margin-left:4px;
    padding:1px 7px;
    border-radius:10px;
    background:#e3f4ea;
    color:#0e6e3d;
    font-size:12px;
    font-style:normal;
    font-weight:700;
}

.outlet-pick-list button.outlet-pick-more{
    align-items:center;
    border-style:dashed;
    color:#0054A6;
    font-weight:700;
}

#outletPickerLocation[hidden]{
    display:none;
}

.outlet-picker-filters{
    display:flex;
    gap:8px;
    align-items:center;
    margin:2px 0 8px;
}

.outlet-picker-filters select{
    flex:1;
    min-width:0;
    padding:9px 10px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    font-size:15px;
    background:#fff;
}

.outlet-picker-filters select[hidden]{
    display:none;
}

.outlet-sort-toggle{
    display:flex;
    margin-left:auto;
    border:1px solid #c7d8ee;
    border-radius:10px;
    overflow:hidden;
    flex-shrink:0;
}

.outlet-sort-toggle button{
    width:auto;
    margin:0;
    padding:9px 12px;
    border:0;
    background:#fff;
    color:#31516f;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

.outlet-sort-toggle button.active{
    background:#0054A6;
    color:#fff;
}

#customerFreezerFields[hidden],
#customerFreezerNote[hidden],
#customerLocationButton[hidden]{
    display:none;
}

.customer-freezer{
    color:#0e7490;
    font-weight:600;
}

.records-toolbar select{
    flex:1 1 120px;
    min-width:0;
}

.payment-mode-group{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:12px 0 0;
    padding:0;
    border:0;
}

.payment-mode-group legend{
    width:100%;
    margin-bottom:6px;
    padding:0;
    color:#354b61;
    font-size:14px;
    font-weight:700;
}

.route-product-form .payment-mode-group label{
    display:flex;
    flex:1;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-width:80px;
    margin:0;
    padding:9px 8px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    color:#354b61;
    cursor:pointer;
}

.route-product-form .payment-mode-group input{
    width:16px;
    height:16px;
    min-height:0;
    margin:0;
    padding:0;
    accent-color:#0054A6;
}

.route-product-form .payment-mode-group label:has(input:checked){
    border-color:#0054A6;
    background:#eaf3fd;
    color:#0054A6;
}

.records-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:6px;
}

.records-link.danger{
    border-color:#c62828;
    color:#c62828;
}

.records-tags{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
}

.records-tags:empty{
    display:none;
}

.records-bill-main .records-tag{
    padding:1px 7px;
    border-radius:999px;
    background:#eef2f7;
    color:#455a70;
    font-size:11px;
    font-weight:700;
}

.records-bill-main .records-tag.cash{ background:#e8f7ee; color:#0e6e3d; }
.records-bill-main .records-tag.upi{ background:#eaf3fd; color:#0054A6; }
.records-bill-main .records-tag.credit{ background:#fff4e5; color:#9a4b00; }
.records-bill-main .records-tag.edited{ background:#f3eafd; color:#6a2fb0; }
.records-bill-main .records-tag.cancelled{ background:#fdeaea; color:#c62828; }

.records-bill-main .records-audit{
    color:#6a2fb0;
    font-size:11.5px;
}

.records-cancelled .records-amount{
    color:#9aa5b1;
    text-decoration:line-through;
}

.records-empty-item{
    justify-content:center;
}

.due-amount{
    color:#c62828 !important;
}

.advance-amount{
    color:#0e6e3d !important;
}

.dues-toggle{
    display:flex;
    flex:0 0 auto;
    align-items:center;
    gap:6px;
    width:auto !important;
    font-weight:600 !important;
    white-space:nowrap;
}

.records-toolbar .dues-toggle input{
    flex:0 0 18px;
    width:18px !important;
    min-width:0;
    height:18px;
    min-height:0 !important;
    margin:0;
    padding:0;
    accent-color:#0054A6;
}

.dues-row{
    flex-wrap:wrap;
}

.dues-row .records-actions{
    width:100%;
}

.settlement-stats .cash-highlight{
    border-color:#bfe5cd;
    background:#e8f7ee;
}

.settlement-stats .cash-highlight strong{
    color:#0e6e3d;
}

.settlement-money{
    margin-top:10px;
}

.records-card .settlement-subhead{
    margin:14px 0 6px;
    font-size:14px;
}

.records-content > *{
    min-width:0;
}

.table-scroll{
    max-width:100%;
    overflow-x:auto;
}

.stock-short{
    color:#c62828;
    font-weight:700;
}

.stock-extra{
    color:#9a4b00;
    font-weight:700;
}

.stock-table input{
    width:78px;
    padding:7px 8px;
    border:1px solid #d7e1ed;
    border-radius:8px;
    font-size:14px;
    text-align:right;
}

.stock-table input[readonly]{
    border-color:transparent;
    background:#f1f4f8;
    color:#667789;
}

.stock-table tfoot th,
.stock-table tfoot td{
    border-bottom:0;
    color:#123a63;
    font-weight:800;
}

.repeat-order-btn{
    margin:0 0 12px;
    border:1px dashed #0054A6;
    background:#fff;
    color:#0054A6;
}

.staff-account-form{
    margin-bottom:12px;
    padding:4px 12px 12px;
    border:1px solid #e6edf5;
    border-radius:12px;
}

.staff-account-form .field-hint{
    margin:4px 0 0;
    color:#64748b;
    font-size:12px;
    line-height:1.35;
}

.staff-account-details{
    display:block;
    margin-top:2px;
    color:#475569;
    font-size:12px;
    line-height:1.4;
}

.stock-summary th,
.stock-summary td{
    padding-right:6px;
    padding-left:6px;
}

@media (max-width:480px){
    .stock-table input{
        width:60px;
    }

    .records-list li{
        flex-wrap:wrap;
    }

    .records-list li .records-actions{
        width:100%;
    }
}

.btn.danger-btn{
    background:#c62828;
}

/* UPI pay-before-bill screen */
.upi-pay-dialog{text-align:center}
.upi-pay-dialog .upi-pay-outlet{margin:4px 0 0;font-size:16px;font-weight:600;color:#334155}
.upi-pay-dialog .upi-pay-amount{margin:2px 0 10px;line-height:1.1;font-size:32px;font-weight:800;color:#0054A6}
.upi-pay-qr{display:flex;justify-content:center}
.upi-pay-qr img{width:220px;max-width:70vw;height:auto;image-rendering:pixelated;border:1px solid #e2e8f0;border-radius:12px;padding:8px;background:#fff}
.upi-pay-id{margin:8px 0 0;font-size:14px;color:#475569;word-break:break-all}
.upi-pay-help{font-size:13px;color:#64748b;margin:10px 0 4px}
.upi-pay-dialog .route-form-actions{text-align:initial}

/* Driver stock: trays in, liters back */
.stock-table th small,
.driver-summary th small{display:block;font-size:11px;font-weight:500;color:#6b7c8f;margin-top:2px}
.stock-table .stock-liters{display:block;font-size:11px;color:#0054A6;margin-top:2px;min-height:13px}
.stock-table .stock-row-amount{white-space:nowrap;font-weight:700;color:#123a63;text-align:right}
.stock-total{margin:10px 0 0;padding:12px 14px;border-radius:12px;background:#e8f7ee;color:#0e6e3d;font-size:15px;text-align:center}
.stock-total strong{font-size:20px}
.stock-total .stock-warning{display:block;margin-top:4px;color:#c62828;font-size:13px;font-weight:600}
.driver-summary td{white-space:nowrap;text-align:right}
.driver-summary tfoot th,.driver-summary tfoot td{font-weight:800;color:#123a63;border-bottom:0}
.records-tag.driver{background:#e8f0fb;color:#0054A6;font-size:11px;vertical-align:middle}
.driver-summary td small{display:block;font-size:11px;font-weight:500;color:#6b7c8f}
.stock-table .stock-return-value{color:#c62828}

/* Driver sale */
.driver-pick{
    display:grid;
    gap:6px;
    margin:0 0 12px;
}

.driver-pick label{
    color:#334155;
    font-size:14px;
    font-weight:700;
}

.driver-pick-row{
    display:flex;
    gap:8px;
}

.driver-pick-row select{
    flex:1;
    min-width:0;
    padding:10px 12px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    background:#fff;
    color:#123a63;
    font-size:16px;
    font-weight:700;
}

.driver-pick-row .btn{
    flex:none;
    width:auto;
    min-width:0;
    margin:0;
    padding:10px 12px;
    font-size:14px;
}

.driver-manager{
    margin:0 0 12px;
    padding:12px;
    border:1px dashed #b9c9dc;
    border-radius:12px;
    background:#f7faff;
}

.driver-add-row{
    display:flex;
    gap:8px;
    margin:0 0 10px;
}

.driver-add-row input{
    flex:1;
    min-width:0;
    padding:10px 12px;
    border:1px solid #d7e1ed;
    border-radius:10px;
    font-size:15px;
}

.driver-add-row .btn{
    flex:none;
    width:auto;
    min-width:0;
    margin:0;
    padding:10px 16px;
}

.driver-list{
    display:grid;
    gap:6px;
    margin:0;
    padding:0;
    list-style:none;
}

.driver-list li{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:8px 12px;
    border:1px solid #e6edf5;
    border-radius:10px;
    background:#fff;
    color:#123a63;
    font-weight:700;
}

.driver-list li.records-empty{
    justify-content:center;
    color:#667789;
    font-weight:400;
}

.driver-section-title{
    margin:16px 0 8px;
    color:#123a63;
    font-size:16px;
}

.driver-expense-row{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 96px 36px;
    gap:8px;
    margin:0 0 8px;
}

.driver-expense-row input{
    min-width:0;
    padding:9px 10px;
    border:1px solid #d7e1ed;
    border-radius:8px;
    font-size:15px;
}

.driver-expense-row input[data-expense="cost"]{
    text-align:right;
}

.driver-expense-remove{
    border:0;
    border-radius:8px;
    background:#fdecec;
    color:#b42318;
    font-size:20px;
    line-height:1;
    cursor:pointer;
}

.btn.driver-add-expense{
    width:auto;
    margin:0 0 14px;
    padding:8px 14px;
    font-size:14px;
}

.driver-totals{
    margin:0 0 10px;
}

.driver-totals td{
    text-align:right;
    font-weight:700;
}

.driver-sale-actions{
    flex-wrap:wrap;
}

.btn.driver-delete{
    color:#b42318;
    border-color:#f3c4c4;
}

.driver-sale-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.driver-sale-actions .btn{
    width:100%;
    margin:0;
}

.driver-sale-actions #driverSaleSubmit{
    grid-column:1 / -1;
    order:-1;
}

.btn.driver-outline,
.driver-pick-row .btn,
.btn.driver-add-expense{
    border:1px solid #b9c9dc;
    background:#fff;
    color:#1d4e82;
    box-shadow:none;
}

.btn.driver-delete{
    border:1px solid #f3c4c4;
    background:#fff;
    color:#b42318;
    box-shadow:none;
}

.driver-sale-actions .btn[hidden]{
    display:none;
}

#driverSaleDelete[hidden] + #driverSalePdf{
    grid-column:1 / -1;
}
.share-ready-dialog{width:min(480px, calc(100% - 16px));max-height:94vh;padding:14px}
.share-ready-dialog .upi-pay-outlet{font-size:14px;margin:0 0 8px}
.share-ready-dialog .upi-pay-help{margin:0 0 8px}
.share-ready-dialog .ready-pdf-pages{max-height:calc(94vh - 230px);text-align:initial}
.share-ready-actions{display:flex;gap:10px;margin-top:10px}
.share-ready-actions .btn{flex:1;margin:0;padding:13px 8px;font-size:16px}
.share-ready-actions .share-ready-main{background:#16a34a;border-color:#16a34a;color:#fff}
.share-ready-actions .share-ready-download{background:#fff;color:#0054A6;border:1px solid #0054A6}
.share-ready-dialog .share-ready-done{display:block;width:100%;margin-top:10px}
.share-ready-actions .btn[hidden]{display:none}

.load-date-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 16px;padding:10px 12px;border-radius:12px;background:#fff7e0;border:1px solid #f0d58a;color:#7a5a00;font-weight:700;font-size:14px}
.load-date-banner[hidden]{display:none}
.load-date-banner button{border:1px solid #c9a23a;background:#fff;color:#7a5a00;border-radius:8px;padding:6px 10px;font-weight:700}

/* App shell: only the product list scrolls, so the totals and search stay put when the keyboard opens. */
html,body{
    height:100%;
    overflow:hidden;
    overscroll-behavior:none;
}
/* Stops double-tap zoom (iOS ignores user-scalable=no). */
html,body,button,input,select,textarea,a,label{
    touch-action:manipulation;
}
body{padding-bottom:0}
.app-shell{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:var(--app-height, 100dvh);
    display:flex;
    flex-direction:column;
}
.app-shell > .sticky-header,
.app-shell > .load-date-banner,
.app-shell > .search-wrapper{
    position:relative;
    top:auto;
    flex:none;
}
/* Collapsible parts of the top bar: only the price cards stay while scrolling down. */
.app-shell .header-top{
    max-height:90px;
    overflow:hidden;
    transition:max-height .25s ease, opacity .2s ease, margin .25s ease;
}
.app-shell > .search-wrapper{
    max-height:90px;
    overflow:hidden;
    transition:max-height .25s ease, opacity .2s ease, padding .25s ease;
}
.app-shell.header-collapsed .header-top{
    max-height:0;
    opacity:0;
    margin-bottom:0;
}
.app-shell.header-collapsed > .search-wrapper{
    max-height:0;
    opacity:0;
    padding-top:0;
    padding-bottom:0;
}
.app-shell > .sticky-header{
    transition:padding .25s ease;
}
.app-shell.header-collapsed > .sticky-header{
    padding-top:8px;
    padding-bottom:8px;
}
.collapsed-mode-label{
    max-height:0;
    overflow:hidden;
    opacity:0;
    text-align:center;
    color:#0054A6;
    font-size:13px;
    font-weight:800;
    letter-spacing:.5px;
    text-transform:uppercase;
    transition:max-height .25s ease, opacity .2s ease, margin .25s ease;
}
.app-shell.header-collapsed .collapsed-mode-label{
    max-height:24px;
    opacity:1;
    margin-bottom:6px;
}
.app-shell > .container{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding-bottom:120px;
}


/* Admin activity */
.activity-me{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.activity-table td,.activity-table th{font-size:13px;word-break:break-word}
.activity-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.activity-list li{padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;font-size:14px}
.activity-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:2px}
.activity-head span{color:#64748b;font-size:13px}
.activity-list small{display:block;margin-top:4px;color:#64748b;font-size:12px}

/* Driver sale product list */
.driver-product-name{display:flex;align-items:center;justify-content:space-between;gap:6px}
.driver-product-remove{flex:none;width:24px;height:24px;border:0;border-radius:50%;background:#fee2e2;color:#b91c1c;font-size:16px;line-height:1;cursor:pointer}
.driver-product-add{display:block;width:100%;margin:8px 0 4px;padding:10px 12px;border:1px dashed #94a3b8;border-radius:10px;background:#f8fafc;color:#1d4e82;font-weight:600;font-size:15px}

/* Monthly summary options */
.monthly-options{flex-basis:100%;display:flex;flex-wrap:wrap;gap:6px 16px;font-size:14px;color:#334155}
.monthly-options label{display:inline-flex;align-items:center;gap:6px;margin:0;font-weight:500}
.monthly-options input{width:18px;height:18px;margin:0}

/* Manage admins */
.activity-me small{color:#64748b;font-size:12px}
.admins-hint{margin:0 0 10px;color:#64748b;font-size:13px;line-height:1.4}
.admins-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.admins-list li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.admins-list li.records-empty{display:block;border-style:dashed;background:transparent}
.admins-list li > div{min-width:0}
.admins-list strong{display:block;font-size:15px;color:#1e293b}
.admins-list small{display:block;color:#64748b;font-size:12px;word-break:break-all}
.admins-list .admins-owner{background:#eef4fb;border-color:#c7d8ee}
.admins-actions{display:flex;gap:6px;flex:none}
.admins-form{display:grid;gap:6px}
.admins-form label{font-weight:600;font-size:14px;color:#334155;margin-top:4px}
.admins-form label small{font-weight:400;color:#64748b}
.admins-form input{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid #cbd5e1;border-radius:10px;font-size:16px;background:#fff}
.admins-form input:disabled{background:#f1f5f9;color:#64748b}
.admins-form-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
.admins-form-actions .btn{flex:1;margin:0}
.admins-form-actions .btn-secondary{background:#e2e8f0;color:#1e293b}

/* Freezers */
.route-product-form textarea{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #d7e1ed;border-radius:10px;color:#123a63;font:inherit;font-weight:600;resize:vertical}
.route-product-form textarea:focus{outline:none;border-color:#0054A6;box-shadow:0 0 0 3px rgba(0,84,166,.12)}
.freezer-location{margin-top:12px;padding:10px 12px;border:1px dashed #c7d8ee;border-radius:10px;background:#f6f9fd}
.freezer-location p{margin:0 0 8px;color:#354b61;font-size:13px;line-height:1.4}
.freezer-location p.ok{color:#15803d}
.freezer-location p.bad{color:#b91c1c}
.freezer-location .btn{margin:0;width:100%;background:#e2e8f0;color:#1e293b}
.freezer-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.freezer-list li{padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.freezer-list li{min-width:0;overflow-wrap:anywhere}
.freezer-list .freezer-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 8px;align-items:baseline}
.freezer-list .freezer-head strong{min-width:0}
.freezer-list .freezer-no{flex:none;padding:2px 8px;border-radius:999px;background:#eef4fb;color:#0054A6;font-weight:700;font-size:13px}
.freezer-list .freezer-line{display:block;color:#475569;font-size:13px;margin-top:3px;word-break:break-word}
.freezer-list .freezer-by{display:block;color:#94a3b8;font-size:12px;margin-top:4px}
.freezer-list .records-actions{margin-top:8px}
.freezer-photo{margin-top:4px}
.freezer-photo.has-photo{padding:10px 12px;border:1px dashed #c7d8ee;border-radius:10px;background:#f6f9fd}
.freezer-photo img{display:block;width:100%;max-height:220px;object-fit:cover;border-radius:8px;margin-bottom:8px}
.freezer-photo p{margin:0 0 8px;color:#354b61;font-size:13px}
.freezer-photo p:empty{display:none}
.freezer-photo img[hidden],.freezer-details img[hidden]{display:none}
.route-product-form label.freezer-photo-btn{display:block;margin:0;width:100%;box-sizing:border-box;text-align:center;background:#e2e8f0;color:#1e293b;cursor:pointer}
.freezer-details{display:grid;gap:8px;margin:4px 0 8px}
.freezer-details img{display:block;width:100%;max-height:320px;object-fit:cover;border-radius:10px}
.freezer-details dl{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:0}
.freezer-details dt{color:#64748b;font-size:13px}
.freezer-details dd{margin:0;color:#1e293b;font-weight:600;word-break:break-word}
.freezer-details small{color:#94a3b8;font-weight:400}
.freezer-list li.freezer-exact{border-color:#0054A6;box-shadow:0 0 0 2px rgba(0,84,166,.15)}
.freezer-list li.freezer-scrap{background:#fef2f2;border-color:#fecaca}
.freezer-stats button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px;border-radius:10px;background:#fff;border:1px solid #e6edf5;font:inherit;text-align:left;cursor:pointer}
.freezer-stats button.active{background:#eef4fb;border-color:#0054A6;box-shadow:0 0 0 2px rgba(0,84,166,.15)}
.freezer-list li.freezer-repair{background:#fffbeb;border-color:#fde68a}
.freezer-log{margin-top:6px}
.freezer-log summary{display:inline-block;cursor:pointer;color:#0054A6;font-size:12px;font-weight:700;list-style:none}
.freezer-log summary::-webkit-details-marker{display:none}
.freezer-log[open] summary{margin-bottom:4px}
.freezer-details .freezer-log dl{padding:8px 10px;border-radius:8px;background:#f6f9fd}
.freezer-tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:0}
.freezer-status{padding:2px 8px;border-radius:999px;font-weight:700;font-size:12px}
.freezer-status.working{background:#dcfce7;color:#15803d}
.freezer-status.scrap{background:#fee2e2;color:#b91c1c}
.freezer-status.repair{background:#fef3c7;color:#b45309}
.records-toolbar select{padding:9px 10px;border:1px solid #d7e1ed;border-radius:10px;font-size:15px;background:#fff}

.statement-kind{
    display:flex;
    gap:16px;
    margin:4px 0 6px;
}

.statement-kind label{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    font-weight:600;
}

#statementRangeField .field-hint{
    margin:6px 0 0;
    color:#64748b;
    font-size:12px;
    line-height:1.35;
}

.product-gst-fields .product-gst-title{
    display:block;
    margin-bottom:2px;
    color:#1d4e82;
    font-size:14px;
}

.product-gst-fields .field-hint{
    margin:6px 0 0;
    color:#64748b;
    font-size:12px;
    line-height:1.35;
}

.records-list li,.records-card{min-width:0}
.records-dialog .back-to-top{position:sticky;bottom:6px;z-index:5;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-44px 0 0 auto;padding:0;border:0;border-radius:50%;background:#0054A6;color:#fff;font-size:22px;font-weight:800;box-shadow:0 4px 14px rgba(0,40,90,.3);cursor:pointer}
.records-dialog .back-to-top[hidden]{display:none}

#nl-badge-frame, .nl-wrap, .nl-badge, .nl-card {
    display:none !important;
}

.records-sticky-toolbar{position:sticky;top:-18px;z-index:6;margin:0 -18px 6px;padding:12px 18px 8px;background:#fff;box-shadow:0 2px 6px rgba(15,35,55,.08)}
.records-toolbar .records-search-full{flex:1 1 100%;min-width:0;width:100%;box-sizing:border-box}
.records-toolbar .records-pdf-btn[aria-pressed="true"]{background:#0054A6;color:#fff}
.customer-distance{display:inline-block;align-self:flex-start;margin:0 0 4px}
