/* =========================================================
   XINGYUNDE HOTEL SUPPLIES TRADING
   Single stylesheet
   ========================================================= */

:root{
    --yellow:#ffd900;
    --orange:#ff7a00;
    --blue:#1746d1;
    --navy:#172033;
    --bg:#f5f7fb;
    --card:#ffffff;
    --line:#e3e8ef;
    --muted:#667085;
    --danger:#dc2626;
    --success:#047857;
}

*{box-sizing:border-box}

html,body{
    margin:0;
    padding:0;
}

body{
    font-family:Arial,Helvetica,sans-serif;
    font-size:16px;
    line-height:1.45;
    color:var(--navy);
    background:var(--bg);
}

a{
    color:inherit;
    text-decoration:none;
}

.wrap{
    width:min(1280px,calc(100% - 40px));
    margin:0 auto;
}

/* ---------- Header / navbar ---------- */

.topbar{
    position:sticky;
    top:0;
    z-index:100;
    background:#fff;
    border-bottom:1px solid var(--line);
}

.topbar-inner{
    min-height:68px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
}

.brand{
    display:flex;
    align-items:center;
    flex:0 0 auto;
}

.header-logo{
    display:block;
    width:145px;
    height:42px;
    max-width:145px;
    object-fit:contain;
    object-position:left center;
}

.nav{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
    flex-wrap:wrap;
}

.nav a{
    padding:8px 10px;
    border-radius:8px;
    font-size:14px;
    font-weight:700;
}

.nav a:hover{
    background:#f3f5f8;
}

.role-pill{
    padding:6px 10px;
    border-radius:999px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:12px;
    font-weight:700;
}

/* ---------- Main layout ---------- */

main{
    padding:30px 0 42px;
}

.page-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    margin-bottom:18px;
}

.page-head h1{
    margin:0 0 5px;
    font-size:30px;
    line-height:1.15;
}

.page-head p{
    margin:0;
    color:var(--muted);
}

.card{
    width:100%;
    background:var(--card);
    border:1px solid var(--line);
    border-radius:14px;
    padding:20px;
    box-shadow:0 4px 14px rgba(16,24,40,.04);
}

.stack-cards{
    display:flex;
    flex-direction:column;
    gap:20px;
}

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

.grid-4{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}

.action-row{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}

/* ---------- Forms ---------- */

.field{
    margin-bottom:12px;
}

label{
    display:block;
    margin-bottom:5px;
    font-size:13px;
    font-weight:700;
}

input,
select,
textarea{
    width:100%;
    min-height:38px;
    padding:8px 11px;
    border:1px solid #cbd5e1;
    border-radius:8px;
    background:#fff;
    color:var(--navy);
    font:inherit;
    font-size:14px;
}

textarea{
    min-height:72px;
    resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
    outline:2px solid rgba(23,70,209,.15);
    border-color:var(--blue);
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 14px;
    border:1px solid #d1d5db;
    border-radius:8px;
    background:#fff;
    color:var(--navy);
    font-weight:700;
    cursor:pointer;
}

.btn-primary{
    background:var(--blue);
    border-color:var(--blue);
    color:#fff;
}

.btn-yellow{
    background:var(--yellow);
    border-color:var(--yellow);
    color:#111827;
}

.btn-danger{
    background:var(--danger);
    border-color:var(--danger);
    color:#fff;
}

.btn-sm{
    min-height:32px;
    padding:6px 10px;
    font-size:12px;
}

.notice{
    padding:12px 14px;
    margin:14px 0;
    border-radius:9px;
}

.notice-error{
    background:#fef2f2;
    color:#991b1b;
}

.notice-success{
    background:#ecfdf5;
    color:#065f46;
}

.muted{
    color:var(--muted);
}

/* ---------- Tables ---------- */

.table-scroll{
    width:100%;
    overflow-x:auto;
    padding:22px 24px;
}

table{
    width:100%;
    border-collapse:collapse;
    font-size:15px;
}

th,
td{
    border-bottom:1px solid var(--line);
    text-align:left;
    vertical-align:middle;
}

th{
    padding:13px 14px;
    background:#f8fafc;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    white-space:nowrap;
}

td{
    padding:14px;
    line-height:1.4;
}

td b{
    font-size:15px;
}

.amount{
    color:var(--blue);
    font-weight:800;
}

.right{
    text-align:right;
}

.empty{
    padding:32px;
    text-align:center;
    color:var(--muted);
}

/* ---------- Search ---------- */

.search-card{
    margin-bottom:18px;
}

.search-row{
    display:flex;
    align-items:center;
    gap:8px;
}

.search-row input{
    flex:1;
}

.list-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:12px;
}

.compact-search{
    display:flex;
    align-items:center;
    gap:6px;
}

.compact-search input{
    width:280px;
}

/* ---------- Product barcode search ---------- */

.product-search-box{
    padding:16px;
    background:#f8fafc;
    border:1px solid #dbe3ee;
    border-radius:14px;
}

.search-input-wrap{
    display:flex;
    gap:8px;
}

.search-input-wrap input,
.product-search-box input{
    min-height:44px;
    padding:10px 13px;
    font-size:15px;
}

.search-results{
    margin-top:8px;
    overflow:hidden;
    border-radius:10px;
    box-shadow:0 10px 26px rgba(15,23,42,.08);
}

.search-result-item{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:12px 14px;
    border:0;
    border-bottom:1px solid var(--line);
    background:#fff;
    text-align:left;
    cursor:pointer;
}

.search-result-item:hover{
    background:#fffbea;
}

.search-result-item small{
    display:block;
    margin-top:4px;
    color:var(--muted);
}

.search-result-item strong{
    white-space:nowrap;
    color:var(--blue);
}

.search-empty{
    padding:12px 14px;
    border:1px solid var(--line);
    background:#fff;
    color:var(--muted);
}

.row-added{
    animation:addedFlash .7s ease;
}

@keyframes addedFlash{
    from{background:#fef3c7}
    to{background:transparent}
}

/* ---------- Status / account controls ---------- */

.status-pill,
.doc-badge{
    display:inline-block;
    padding:5px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
}

.status-active,
.doc-badge.so{
    background:#ecfdf5;
    color:#047857;
}

.status-archived{
    background:#f3f4f6;
    color:#6b7280;
}

.doc-badge.quote{
    background:#eff6ff;
    color:#1d4ed8;
}

.archived-row{
    opacity:.62;
}

.manage-details{
    display:inline-block;
    margin:2px 4px 2px 0;
    vertical-align:top;
}

.manage-details summary{
    list-style:none;
}

.manage-details summary::-webkit-details-marker{
    display:none;
}

.manage-form{
    min-width:270px;
    margin-top:8px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fafafa;
}

.inline-action-form{
    display:inline-block;
    margin:2px 4px 2px 0;
}

/* ---------- Sales stats ---------- */

.stat{
    padding:18px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
}

.stat small{
    display:block;
    margin-bottom:6px;
    color:var(--muted);
    font-weight:700;
}

.stat strong{
    color:var(--blue);
    font-size:24px;
}

/* ---------- Quotation details ---------- */

.quote-meta{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:24px;
    margin-bottom:22px;
}

.quote-meta small{
    display:block;
    margin-top:10px;
    color:var(--muted);
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
}

.quote-meta strong,
.quote-meta span{
    display:block;
}

/* ---------- Login ---------- */

.login-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
    background:linear-gradient(135deg,#ffe75a,#ff9a30 52%,#2456d8);
}

.login-box{
    width:min(900px,100%);
    display:grid;
    grid-template-columns:1fr 1fr;
    overflow:hidden;
    background:#fff;
    border-radius:22px;
    box-shadow:0 28px 70px rgba(0,0,0,.20);
}

.login-brand{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:38px;
    background:#111827;
    color:#fff;
}

.login-logo-image{
    display:block;
    width:100%;
    max-width:360px;
    max-height:190px;
    margin:0 auto;
    object-fit:contain;
}

.login-tagline{
    margin:20px 0 0;
    color:#fff;
    text-align:center;
    font-size:12px;
    font-weight:700;
    letter-spacing:1px;
}

.login-form{
    padding:42px 38px;
}

.login-form h3{
    margin:0 0 6px;
    font-size:30px;
}

/* =========================================================
   Print: Quotation
   ========================================================= */

@page{
    size:A4;
    margin:14mm;
}

.quotation-print-page{
    background:#fff;
    color:#222;
    font-family:Arial,sans-serif;
    font-size:12px;
    line-height:1.3;
}

.quotation-print-page .actions{
    margin-bottom:15px;
    text-align:center;
}

.quotation-print-page .sheet{
    max-width:190mm;
    margin:auto;
}

.quotation-print-page header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
}

.quotation-print-page .qt{
    color:#1746d1;
    font-size:28px;
    font-weight:900;
}

.quotation-print-page .rule{
    height:5px;
    margin:14px 0 20px;
    background:linear-gradient(90deg,#ffd900 0 40%,#ff7a00 40% 70%,#1746d1 70%);
}

.quotation-print-page .meta{
    display:grid;
    grid-template-columns:1.2fr .8fr;
    gap:30px;
    margin-bottom:22px;
}

.quotation-print-page .meta small{
    display:block;
    margin-top:8px;
    color:#777;
    font-size:9px;
    font-weight:700;
    text-transform:uppercase;
}

.quotation-print-page .meta b,
.quotation-print-page .meta span{
    display:block;
    font-size:12px;
}

.quotation-print-page table{
    font-size:11px;
}

.quotation-print-page th,
.quotation-print-page td{
    padding:9px;
}

.quotation-print-page th{
    background:#1746d1;
    color:#fff;
}

.quotation-print-page tfoot td{
    background:#f7f7f7;
    font-size:13px;
    font-weight:900;
}

.quotation-print-page footer{
    margin-top:40px;
    padding-top:8px;
    border-top:1px solid #ddd;
    color:#777;
    text-align:center;
    font-size:9px;
}

/* =========================================================
   Print: Logs
   ========================================================= */

.logs-print-page{
    background:#fff;
    color:#222;
    font-family:Arial,sans-serif;
    font-size:12px;
    line-height:1.3;
}

.logs-print-page .actions{
    margin-bottom:12px;
    text-align:center;
}

.logs-print-page .sheet{
    max-width:270mm;
    margin:auto;
}

.logs-print-page header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
}

.logs-print-page .title{
    color:#1746d1;
    font-size:22px;
    font-weight:900;
}

.logs-print-page .rule{
    height:5px;
    margin:12px 0 16px;
    background:linear-gradient(90deg,#ffd900 0 40%,#ff7a00 40% 70%,#1746d1 70%);
}

.logs-print-page .filters{
    margin-bottom:12px;
    color:#555;
    font-size:10px;
}

.logs-print-page table{
    font-size:10px;
}

.logs-print-page th,
.logs-print-page td{
    padding:7px;
}

.logs-print-page th{
    background:#1746d1;
    color:#fff;
}

.logs-print-page tfoot td{
    background:#f7f7f7;
    font-weight:900;
}

/* ---------- Responsive ---------- */

@media(max-width:900px){
    .wrap{
        width:min(100% - 24px,1280px);
    }

    .topbar-inner{
        padding:10px 0;
        align-items:flex-start;
        flex-direction:column;
    }

    .header-logo{
        width:130px;
        height:38px;
        max-width:130px;
    }

    .grid-2,
    .grid-4,
    .quote-meta{
        grid-template-columns:1fr;
    }

    .login-box{
        grid-template-columns:1fr;
    }

    .login-brand{
        padding:26px;
    }

    .login-logo-image{
        max-width:300px;
        max-height:150px;
    }

    .search-row,
    .compact-search,
    .list-head,
    .search-input-wrap{
        align-items:stretch;
        flex-direction:column;
    }

    .compact-search input{
        width:100%;
    }

    .table-scroll{
        padding:16px;
    }

    table{
        font-size:14px;
    }

    th,
    td{
        padding:11px 10px;
    }
}

@media print{
    .quotation-print-page .actions,
    .logs-print-page .actions{
        display:none;
    }
}


/* ===== QUOTATION LIST TABLE ===== */
.quotation-list-table{
    table-layout:auto;
}
.quotation-list-table th:nth-child(1),
.quotation-list-table td:nth-child(1){
    width:120px;
}
.quotation-list-table th:nth-child(2),
.quotation-list-table td:nth-child(2){
    width:170px;
}
.quotation-list-table th:nth-child(3),
.quotation-list-table td:nth-child(3){
    width:115px;
}
.quotation-list-table th:nth-child(4),
.quotation-list-table td:nth-child(4){
    min-width:190px;
}
.quotation-list-table th:nth-child(5),
.quotation-list-table td:nth-child(5){
    width:150px;
}
.quotation-list-table th:nth-child(6),
.quotation-list-table td:nth-child(6){
    width:150px;
}
.quotation-list-table th:nth-child(7),
.quotation-list-table td:nth-child(7){
    width:140px;
    white-space:nowrap;
}
.quotation-list-table th:last-child,
.quotation-list-table td:last-child{
    width:250px;
}
.quotation-list-table .action-row{
    flex-wrap:nowrap;
}




/* ===== POPUP / MODAL FOR ACCOUNTS + PRODUCTS ===== */
.app-dialog{
    width:min(480px,calc(100% - 30px));
    max-height:90vh;
    padding:0;
    border:0;
    border-radius:16px;
    background:transparent;
    overflow:visible;
}

.app-dialog-wide{
    width:min(620px,calc(100% - 30px));
}

.app-dialog::backdrop{
    background:rgba(15,23,42,.55);
    backdrop-filter:blur(2px);
}

.dialog-card{
    overflow:hidden;
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:0 24px 70px rgba(15,23,42,.25);
}

.dialog-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:20px 22px 14px;
    border-bottom:1px solid var(--line);
}

.dialog-head h2{
    margin:0 0 4px;
    font-size:22px;
}

.dialog-head p{
    margin:0;
    color:var(--muted);
    font-size:13px;
}

.dialog-close{
    width:34px;
    height:34px;
    flex:0 0 34px;
    border:0;
    border-radius:8px;
    background:#f3f4f6;
    color:#475467;
    font-size:24px;
    line-height:1;
    cursor:pointer;
}

.dialog-body{
    max-height:65vh;
    overflow:auto;
    padding:20px 22px;
}

.dialog-actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    padding:14px 22px 20px;
    border-top:1px solid var(--line);
}

.check-row{
    display:flex;
    align-items:center;
    gap:8px;
    font-weight:700;
}

.check-row input{
    width:auto;
    min-height:auto;
}

@media(max-width:600px){
    .app-dialog,
    .app-dialog-wide{
        width:calc(100% - 20px);
    }

    .dialog-head,
    .dialog-body,
    .dialog-actions{
        padding-left:16px;
        padding-right:16px;
    }
}


/* ===== POPUP CLOSE BUTTON POSITION ===== */
.dialog-card{
    position:relative;
}

.dialog-head{
    position:relative;
    padding-right:64px;
}

.dialog-close{
    position:absolute;
    top:14px;
    right:14px;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0;
}

/* Product edit no longer uses an Active checkbox */




/* ===== FINAL POPUP X + PRODUCT STATUS RADIO FIX ===== */

/* The popup card is the positioning parent */
.app-dialog .dialog-card{
    position:relative !important;
}

/* Reserve space in the header so title never overlaps X */
.app-dialog .dialog-head{
    position:relative;
    padding-right:68px !important;
}

/* X is pinned to the actual top-right of the whole popup */
.app-dialog .popup-x{
    position:absolute !important;
    top:16px !important;
    right:16px !important;
    left:auto !important;
    bottom:auto !important;
    z-index:999 !important;

    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    min-height:34px !important;
    margin:0 !important;
    padding:0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    border:1px solid #d1d5db !important;
    border-radius:8px !important;
    background:#fff !important;
    color:#344054 !important;
    font-size:22px !important;
    font-weight:400 !important;
    line-height:1 !important;
    cursor:pointer;
}

.app-dialog .popup-x:hover{
    background:#f3f4f6 !important;
}

/* Simple normal radio buttons */
.product-status-radios{
    display:flex;
    align-items:center;
    gap:26px;
    margin-top:8px;
}

.product-status-radios .radio-option{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin:0;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
}

.product-status-radios .radio-option input[type="radio"]{
    appearance:auto !important;
    -webkit-appearance:radio !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    min-height:18px !important;
    margin:0 !important;
    padding:0 !important;
    border:initial !important;
    border-radius:50% !important;
    accent-color:#1746d1;
    cursor:pointer;
}

.product-status-radios .radio-option span{
    display:inline;
}


/* ===== RED POPUP CLOSE BUTTON ===== */
.app-dialog .popup-x{
    background:#dc2626 !important;
    border-color:#dc2626 !important;
    color:#ffffff !important;
}

.app-dialog .popup-x:hover{
    background:#b91c1c !important;
    border-color:#b91c1c !important;
    color:#ffffff !important;
}


/* ===== HARD POPUP FIX ===== */
.app-dialog .dialog-card{position:relative!important}
.app-dialog .popup-x{
    position:absolute!important;
    top:14px!important;
    right:14px!important;
    left:auto!important;
    bottom:auto!important;
    z-index:9999!important;
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    background:#dc2626!important;
    border:1px solid #dc2626!important;
    border-radius:8px!important;
    color:#fff!important;
}
.app-dialog input[type="radio"]{
    appearance:auto!important;
    -webkit-appearance:radio!important;
    width:18px!important;
    height:18px!important;
    min-width:18px!important;
    min-height:18px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:50%!important;
}


/* ===== QUOTATION TAB DATE + ACTION BUTTONS ===== */
.quotation-list-table .date-cell{
    white-space:nowrap;
    min-width:110px;
}

.quotation-actions{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:7px;
    min-width:118px;
}

.quotation-actions-top{
    display:flex;
    gap:7px;
}

.quotation-actions-top .btn{
    flex:1 1 0;
}

.quotation-sales-btn{
    width:100%;
    text-align:center;
}


/* ===== QUOTATION TABLE FINAL ALIGNMENT ===== */

/* Force the complete YYYY-MM-DD date to stay on one line */
.quotation-list-table th:nth-child(3),
.quotation-list-table td:nth-child(3),
.quotation-list-table .date-cell{
    width:130px !important;
    min-width:130px !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
}

/* Give the action column enough room */
.quotation-list-table th:last-child,
.quotation-list-table td:last-child{
    width:150px !important;
    min-width:150px !important;
}

/* Clean, consistent button arrangement */
.quotation-actions{
    width:126px;
    min-width:126px;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
}

.quotation-actions-top{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
}

.quotation-actions-top .btn{
    width:100%;
    min-width:0;
    padding-left:8px;
    padding-right:8px;
}

.quotation-sales-btn{
    display:flex;
    width:100%;
    justify-content:center;
    margin:0;
}

/* Keep quotation rows visually balanced */
.quotation-list-table td{
    vertical-align:middle;
}


/* ===== EMPLOYEE ACTIVE / INACTIVE STATUS ===== */
.status-inactive{
    background:#fff7ed;
    color:#c2410c;
}

.btn-status-active{
    background:#ecfdf5;
    border-color:#a7f3d0;
    color:#047857;
}

.btn-status-active:hover{
    background:#d1fae5;
}

.btn-status-inactive{
    background:#fff7ed;
    border-color:#fed7aa;
    color:#c2410c;
}

.btn-status-inactive:hover{
    background:#ffedd5;
}

/* ===== PUBLIC LANDING + PRODUCT CATALOG ===== */
.public-site{margin:0;background:#fff;color:#101828}.public-wrap{width:min(1380px,calc(100% - 40px));margin:0 auto}.public-header{position:sticky;top:0;z-index:200;background:#fff600;border-bottom:4px solid #111}.public-nav{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:24px}.public-logo{display:block;width:190px;height:58px;object-fit:contain;object-position:left center}.public-nav nav{display:flex;align-items:center;gap:28px}.public-nav nav a{color:#0039c7;font-size:16px;font-weight:900;text-transform:uppercase}.public-nav nav a.active{text-decoration:underline;text-underline-offset:6px}.public-login-btn{padding:11px 18px;background:#ff1100;border:3px solid #111;color:#fff600!important}.public-hero{padding:70px 0;background:#ff1100}.hero-grid{display:grid;grid-template-columns:1.15fr .85fr;align-items:center;gap:50px}.hero-kicker{display:inline-block;margin-bottom:14px;padding:8px 12px;background:#fff600;color:#ff1100;font-weight:900;letter-spacing:1px}.public-hero h1{max-width:760px;margin:0 0 18px;color:#fff600;font-size:clamp(48px,7vw,90px);line-height:.93;text-transform:uppercase}.public-hero p{max-width:720px;margin:0 0 26px;color:#fff;font-size:20px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap}.hero-primary,.hero-secondary{display:inline-flex;align-items:center;justify-content:center;padding:14px 20px;border:3px solid #111;font-weight:900;text-transform:uppercase}.hero-primary{background:#fff600;color:#0039c7}.hero-secondary{background:#0039c7;color:#fff}.hero-rate-card{padding:42px;background:#fff600;border:5px solid #111}.hero-rate-card small{display:block;color:#ff1100;font-weight:900;letter-spacing:2px}.hero-rate-card strong{display:block;margin:10px 0 14px;color:#0039c7;font-size:44px;line-height:1;text-transform:uppercase}.hero-rate-card span{color:#111;font-size:17px}.public-section{padding:60px 0 75px;background:#fff}.section-title-row{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.section-eyebrow{color:#ff1100;font-weight:900;letter-spacing:2px}.section-title-row h2{margin:4px 0 0;color:#0039c7;font-size:38px}.text-link{color:#0039c7;font-weight:800}.public-product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.public-product-card{overflow:hidden;background:#fff600;border:4px solid #111}.public-product-image{height:260px;background:#fff;border-bottom:4px solid #111}.public-product-image img{width:100%;height:100%;object-fit:cover}.product-no-image{height:100%;display:grid;place-items:center;color:#98a2b3;font-weight:900}.public-product-content{padding:22px}.product-sku{color:#ff1100;font-weight:900}.public-product-content h3{margin:0 0 10px;color:#ff1100;font-size:29px;line-height:1.05}.public-product-content p{min-height:48px;margin:0 0 18px;color:#111}.public-price{margin:0 0 18px;color:#0039c7;font-size:30px;font-weight:900}.public-price span{font-size:14px}.public-deal-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;padding:10px 14px;background:#ff1100;border:3px solid #111;color:#fff600;font-weight:900;text-align:center}.public-empty{grid-column:1/-1;padding:40px;border:3px dashed #98a2b3;text-align:center;color:#667085}.catalog-banner{padding:46px 0;background:#ff1100;border-bottom:5px solid #111}.catalog-banner span{color:#fff600;font-weight:900;letter-spacing:2px}.catalog-banner h1{margin:5px 0;color:#fff600;font-size:62px;line-height:1}.catalog-banner p{margin:0;color:#fff;font-size:18px}.catalog-search{display:flex;gap:8px;margin-bottom:16px;padding:14px;background:#fff600;border:3px solid #111}.catalog-search input{flex:1;min-height:46px;background:#fff}.catalog-search button,.catalog-search a{display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border:3px solid #111;background:#0039c7;color:#fff;font-weight:900}.catalog-count{margin-bottom:18px;color:#667085;font-weight:700}.public-footer{padding:26px 0;background:#0039c7;color:#fff600;text-align:center;font-weight:900}.admin-product-thumb{width:76px;height:58px;display:block;border-radius:7px;object-fit:cover;border:1px solid var(--line)}.admin-product-no-image{width:76px;height:58px;display:grid;place-items:center;border-radius:7px;background:#f2f4f7;color:#98a2b3;font-size:10px;text-align:center}@media(max-width:900px){.public-nav{padding:12px 0;align-items:flex-start;flex-direction:column}.public-nav nav{width:100%;gap:14px;flex-wrap:wrap}.hero-grid,.public-product-grid{grid-template-columns:1fr}.public-logo{width:160px;height:50px}.hero-rate-card strong{font-size:34px}.section-title-row{align-items:flex-start;flex-direction:column}.catalog-search{flex-direction:column}.catalog-search button,.catalog-search a{min-height:44px}}


/* ===== PRODUCT PHOTO UPLOAD ===== */
.product-photo-field{
    margin-top:4px;
}

.product-photo-upload{
    display:flex;
    align-items:center;
    gap:18px;
    padding:16px;
    border:1px dashed #98a2b3;
    border-radius:12px;
    background:#f8fafc;
}

.product-photo-preview{
    width:150px;
    height:110px;
    flex:0 0 150px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    color:#98a2b3;
    font-size:12px;
    text-align:center;
}

.product-photo-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.product-photo-controls{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
}

.hidden-file-input{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
}

.upload-photo-btn{
    cursor:pointer;
}

@media(max-width:700px){
    .product-photo-upload{
        align-items:flex-start;
        flex-direction:column;
    }

    .product-photo-preview{
        width:100%;
        height:180px;
        flex-basis:auto;
    }
}


/* =========================================================
   PUBLIC LANDING ONLY — DIVISORIA / WHOLESALE STYLE
   DOES NOT CHANGE EMPLOYEE / ADMIN UI
   ========================================================= */

.divisoria-site{
    background:#fff600;
}

.divisoria-header{
    background:#fff600;
    border-bottom:5px solid #111;
}

.divisoria-header .public-nav{
    min-height:78px;
}

.divisoria-header .public-nav nav a{
    color:#0039c7;
    font-weight:1000;
}

.deal-marquee,
.bottom-marquee{
    width:100%;
    overflow:hidden;
    white-space:nowrap;
    border-top:4px solid #111;
    border-bottom:4px solid #111;
}

.deal-marquee{
    background:#ff1000;
    color:#fff600;
}

.bottom-marquee{
    background:#0039c7;
    color:#fff600;
}

.deal-marquee-track,
.bottom-marquee-track{
    display:inline-flex;
    min-width:max-content;
    animation:divisoriaScroll 18s linear infinite;
}

.deal-marquee-track span,
.bottom-marquee-track span{
    display:inline-block;
    padding:14px 0;
    font-size:26px;
    font-weight:1000;
    letter-spacing:1px;
}

@keyframes divisoriaScroll{
    from{transform:translateX(0)}
    to{transform:translateX(-50%)}
}

.divisoria-hero{
    padding:58px 0 64px;
    background:#ff1000;
    border-bottom:6px solid #111;
    text-align:center;
}

.divisoria-badge{
    display:inline-block;
    margin-bottom:18px;
    padding:10px 16px;
    background:#fff600;
    border:4px solid #111;
    color:#0039c7;
    font-size:18px;
    font-weight:1000;
    transform:rotate(-1deg);
}

.divisoria-hero h1{
    margin:0;
    color:#fff;
    font-size:clamp(70px,10vw,145px);
    line-height:.87;
    font-weight:1000;
    letter-spacing:-4px;
    text-transform:uppercase;
    text-shadow:5px 5px 0 #111;
}

.divisoria-markets{
    margin:32px 0 0;
    color:#fff600;
    font-size:clamp(24px,3.2vw,46px);
    font-weight:1000;
    text-transform:uppercase;
}

.divisoria-hero-actions{
    display:flex;
    justify-content:center;
    gap:14px;
    margin-top:30px;
    flex-wrap:wrap;
}

.divisoria-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:230px;
    min-height:58px;
    padding:12px 22px;
    border:4px solid #111;
    font-size:18px;
    font-weight:1000;
    box-shadow:6px 6px 0 #111;
}

.divisoria-btn.yellow{
    background:#fff600;
    color:#ff1000;
}

.divisoria-btn.blue{
    background:#0039c7;
    color:#fff;
}

.promo-strip{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    border-bottom:5px solid #111;
}

.promo-box{
    min-height:145px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:20px;
    border-right:4px solid #111;
    text-align:center;
}

.promo-box:last-child{
    border-right:0;
}

.promo-box strong{
    font-size:30px;
    line-height:1;
}

.promo-box span{
    margin-top:8px;
    font-size:22px;
    font-weight:900;
}

.promo-box.yellow{
    background:#fff600;
    color:#0039c7;
}

.promo-box.blue{
    background:#0039c7;
    color:#fff600;
}

.promo-box.red{
    background:#ff1000;
    color:#fff600;
}

.divisoria-products{
    background:#fff600;
}

.divisoria-section-title h2{
    color:#0039c7;
    font-size:46px;
    font-weight:1000;
    letter-spacing:-1px;
}

.divisoria-section-title .section-eyebrow{
    color:#ff1000;
    font-size:18px;
    font-weight:1000;
}

.divisoria-link{
    color:#ff1000;
    font-weight:1000;
    text-decoration:underline;
    text-underline-offset:5px;
}

.divisoria-card{
    border:5px solid #111;
    box-shadow:7px 7px 0 #111;
}

.divisoria-card .public-product-image{
    border-bottom:5px solid #111;
}

.divisoria-card .public-product-content{
    background:#fff600;
}

.divisoria-card h3{
    color:#ff1000;
    font-size:30px;
    font-weight:1000;
    text-transform:uppercase;
}

.divisoria-card p{
    color:#111;
    font-weight:600;
}

.divisoria-sku{
    display:inline-block;
    margin-bottom:8px;
    padding:4px 8px;
    background:#0039c7;
    color:#fff;
    font-size:11px;
    font-weight:900;
}

.divisoria-rate-label{
    margin-top:10px;
    color:#0039c7;
    font-size:12px;
    font-weight:1000;
    letter-spacing:1px;
}

.divisoria-card .public-price{
    margin:3px 0 16px;
    color:#0039c7;
    font-size:34px;
    font-weight:1000;
}

.divisoria-deal-btn{
    min-height:54px;
    background:#ff1000;
    color:#fff600;
    border:4px solid #111;
    font-size:16px;
    font-weight:1000;
}

.divisoria-footer{
    background:#111;
    color:#fff600;
    border-top:5px solid #ff1000;
    font-size:15px;
}

@media(max-width:900px){
    .promo-strip{
        grid-template-columns:1fr;
    }

    .promo-box{
        border-right:0;
        border-bottom:4px solid #111;
    }

    .promo-box:last-child{
        border-bottom:0;
    }

    .deal-marquee-track span,
    .bottom-marquee-track span{
        font-size:20px;
    }

    .divisoria-hero h1{
        letter-spacing:-2px;
    }
}

@media(prefers-reduced-motion:reduce){
    .deal-marquee-track,
    .bottom-marquee-track{
        animation:none;
    }
}


/* ===== SIMPLIFIED PUBLIC LOGIN ===== */
.simple-login-brand{
    align-items:center;
    justify-content:center;
    padding:34px;
}

.simple-login-brand .login-logo-image{
    max-width:320px;
    max-height:170px;
}

.simple-login-form{
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.simple-login-form form{
    width:100%;
}

.simple-login-form .btn{
    width:100%;
}

@media(max-width:900px){
    .simple-login-brand .login-logo-image{
        max-width:260px;
        max-height:140px;
    }
}


/* =========================================================
   PUBLIC LOGIN PAGE — SAME RED / YELLOW / BLUE PALETTE
   Employee/Admin UI remains unchanged.
   ========================================================= */

.public-login-page{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    background:#ff1000;
}

.public-login-main{
    flex:1;
    display:grid;
    place-items:center;
    padding:54px 20px 70px;
    background:#ff1000;
}

.public-login-shell{
    width:min(560px,100%);
}

.public-login-logo-wrap{
    display:flex;
    justify-content:center;
    margin-bottom:18px;
}

.public-login-logo{
    width:min(360px,80vw);
    height:120px;
    object-fit:contain;
    padding:10px 16px;
    background:#fff600;
    border:4px solid #111;
    box-shadow:7px 7px 0 #111;
}

.public-login-card{
    padding:28px;
    background:#fff600;
    border:5px solid #111;
    box-shadow:9px 9px 0 #0039c7;
}

.public-login-card label{
    color:#111;
    font-size:14px;
    font-weight:1000;
    text-transform:uppercase;
}

.public-login-card input{
    min-height:48px;
    border:3px solid #111;
    border-radius:0;
    background:#fff;
    font-size:16px;
}

.public-login-card input:focus{
    outline:3px solid #0039c7;
    border-color:#111;
}

.public-login-submit{
    width:100%;
    min-height:50px;
    margin-top:4px;
    border:3px solid #111 !important;
    border-radius:0 !important;
    background:#0039c7 !important;
    color:#fff600 !important;
    font-size:17px;
    font-weight:1000;
    letter-spacing:.5px;
    box-shadow:5px 5px 0 #111;
}

.public-login-submit:hover{
    transform:translate(2px,2px);
    box-shadow:3px 3px 0 #111;
}

.public-login-page .notice-error{
    margin-top:0;
    border:3px solid #111;
    border-radius:0;
    background:#fff;
    color:#b42318;
    font-weight:800;
}

@media(max-width:700px){
    .public-login-main{
        padding-top:36px;
    }

    .public-login-logo{
        height:100px;
    }

    .public-login-card{
        padding:22px;
    }
}

/* Keep public hero title on one line */
.divisoria-hero h1{white-space:nowrap;font-size:clamp(42px,6.8vw,112px);letter-spacing:-3px;}
@media(max-width:900px){.divisoria-hero h1{font-size:clamp(28px,6.5vw,60px);letter-spacing:-1px;}}
@media(max-width:520px){.divisoria-hero h1{font-size:clamp(20px,6.2vw,34px);letter-spacing:0;}}


/* ===== PUBLIC PRODUCT CARD UNIFORM SPACING ===== */

.public-product-grid{
    align-items:stretch;
}

.public-product-card{
    height:100%;
    display:flex;
    flex-direction:column;
}

.public-product-image{
    flex:0 0 260px;
    height:260px;
}

.public-product-content{
    flex:1;
    display:flex;
    flex-direction:column;
}

.public-product-content h3,
.divisoria-card h3{
    width:100%;
    margin-bottom:10px;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    line-height:1.15 !important;
    min-height:auto !important;
}

.public-product-content p,
.divisoria-card p{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
    min-height:66px;
    max-height:66px;
    margin-bottom:18px;
}

.divisoria-rate-label{
    margin-top:auto !important;
}

.public-price{
    min-height:42px;
}

.divisoria-sku{
    min-height:24px;
}

@media(max-width:900px){
    .public-product-image{
        flex-basis:230px;
        height:230px;
    }

    .public-product-content h3,
    .divisoria-card h3{
        font-size:24px !important;
    }
}


/* ===== PRODUCT TITLE: FULL TEXT, ONE LINE, SMALLER FONT ===== */
.public-product-content h3,
.divisoria-card h3{
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    font-size:clamp(17px,1.65vw,27px) !important;
    letter-spacing:-0.4px !important;
    line-height:1.1 !important;
}

/* On narrower screens keep the full title on one line by reducing it further. */
@media(max-width:1200px){
    .public-product-content h3,
    .divisoria-card h3{
        font-size:clamp(15px,1.7vw,22px) !important;
    }
}
@media(max-width:700px){
    .public-product-content h3,
    .divisoria-card h3{
        font-size:clamp(13px,3.5vw,18px) !important;
        letter-spacing:-0.6px !important;
    }
}


/* ===== PRODUCT DESCRIPTION: SHOW FULL TEXT, NO ELLIPSIS ===== */
.public-product-content p,
.divisoria-card p{
    display:block !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
    min-height:0 !important;
    max-height:none !important;
    height:auto !important;
    margin-bottom:18px;
}

/* Keep price aligned at the bottom even when descriptions differ in length */
.public-product-content{
    height:100%;
}

.divisoria-rate-label{
    margin-top:auto !important;
}


/* =========================================================
   QUOTATION / SALES ORDER PRINT LAYOUT — ISOLATED FIX
   ========================================================= */

@page{
    size:A4 portrait;
    margin:12mm;
}

.quotation-print-page{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
    color:#111 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:11pt !important;
    line-height:1.35 !important;
}

.quotation-print-page .actions{
    text-align:center;
    margin:10px 0 16px;
}

.quotation-print-page .actions button{
    padding:9px 14px;
    border:1px solid #cbd5e1;
    border-radius:6px;
    background:#1746d1;
    color:#fff;
    font-weight:700;
    cursor:pointer;
}

.quotation-print-page .print-sheet{
    width:100%;
    max-width:186mm;
    margin:0 auto;
}

.quotation-print-page .print-header{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:18px !important;
    min-height:28mm;
}

.quotation-print-page .print-company{
    display:block !important;
    flex:0 0 auto !important;
}

.quotation-print-page .print-logo{
    display:block !important;
    width:72mm !important;
    height:22mm !important;
    max-width:72mm !important;
    object-fit:contain !important;
    object-position:left center !important;
}

.quotation-print-page .print-document-title{
    flex:0 0 auto;
    color:#1746d1 !important;
    font-size:25pt !important;
    font-weight:900 !important;
    line-height:1 !important;
    text-align:right !important;
    white-space:nowrap !important;
}

.quotation-print-page .print-accent{
    height:3.5mm;
    margin:4mm 0 7mm;
    background:linear-gradient(90deg,#ffd900 0 40%,#ff7a00 40% 70%,#1746d1 70%) !important;
}

.quotation-print-page .print-meta{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:20mm !important;
    margin-bottom:7mm !important;
}

.quotation-print-page .print-meta-block{
    min-width:0;
}

.quotation-print-page .print-meta-right{
    padding-left:8mm;
}

.quotation-print-page .print-field{
    margin-bottom:3.2mm;
    min-height:10mm;
}

.quotation-print-page .print-label{
    display:block !important;
    margin-bottom:1mm;
    color:#667085 !important;
    font-size:7.5pt !important;
    font-weight:800 !important;
    letter-spacing:.25pt !important;
    text-transform:uppercase !important;
}

.quotation-print-page .print-field strong,
.quotation-print-page .print-field span:not(.print-label){
    display:block !important;
    color:#111 !important;
    font-size:10.5pt !important;
    font-weight:600 !important;
    overflow-wrap:anywhere;
}

.quotation-print-page .print-items{
    width:100% !important;
    border-collapse:collapse !important;
    table-layout:fixed !important;
    font-size:9.5pt !important;
}

.quotation-print-page .print-items thead th{
    padding:3.2mm 2.5mm !important;
    background:#1746d1 !important;
    color:#fff !important;
    border:0 !important;
    font-size:8pt !important;
    font-weight:800 !important;
    text-transform:uppercase !important;
}

.quotation-print-page .print-items tbody td{
    padding:3.4mm 2.5mm !important;
    border-bottom:1px solid #d7dde5 !important;
    color:#111 !important;
    vertical-align:top !important;
    overflow-wrap:anywhere;
}

.quotation-print-page .print-items .col-product{width:20%}
.quotation-print-page .print-items .col-description{width:40%}
.quotation-print-page .print-items .col-qty{width:10%}
.quotation-print-page .print-items .col-price{width:15%}
.quotation-print-page .print-items .col-amount{width:15%}

.quotation-print-page .print-items .product-name{
    font-weight:800 !important;
}

.quotation-print-page .print-items .num{
    text-align:right !important;
    white-space:nowrap !important;
}

.quotation-print-page .print-items tfoot td{
    padding:4mm 2.5mm !important;
    border-top:2px solid #1746d1 !important;
    background:#f8fafc !important;
    color:#111 !important;
    font-size:10.5pt !important;
    font-weight:900 !important;
}

.quotation-print-page .print-items tfoot td:first-child{
    text-align:right !important;
    color:#1746d1 !important;
}

.quotation-print-page .print-footer{
    margin-top:12mm !important;
    padding-top:3mm !important;
    border-top:1px solid #cfd6df !important;
    color:#667085 !important;
    text-align:center !important;
    font-size:7.5pt !important;
    font-weight:700 !important;
    letter-spacing:.15pt !important;
}

@media print{
    .quotation-print-page .actions{
        display:none !important;
    }

    .quotation-print-page .print-sheet{
        max-width:none !important;
        width:100% !important;
    }

    .quotation-print-page{
        -webkit-print-color-adjust:exact !important;
        print-color-adjust:exact !important;
    }
}

/* ===== PUBLIC CONTACT PAGE ===== */
.contact-hero{padding:52px 0 48px;background:#ff1000;border-bottom:5px solid #111;text-align:center}
.contact-kicker{display:inline-block;padding:8px 12px;margin-bottom:12px;background:#fff600;border:3px solid #111;color:#0039c7;font-weight:1000}
.contact-hero h1{margin:0;color:#fff600;font-size:clamp(54px,8vw,100px);line-height:.95;font-weight:1000;text-shadow:5px 5px 0 #111}
.contact-hero p{margin:18px auto 0;max-width:700px;color:#fff;font-size:18px;font-weight:700}
.contact-section{padding:54px 0 70px;background:#fff600}
.contact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.contact-card{display:flex;align-items:center;gap:18px;padding:24px;background:#fff;border:4px solid #111;box-shadow:7px 7px 0 #111;color:#111}
.contact-icon{width:58px;height:58px;flex:0 0 58px;display:grid;place-items:center;background:#0039c7;border:3px solid #111;color:#fff600;font-size:28px;font-weight:1000}
.contact-card small{display:block;margin-bottom:5px;color:#ff1000;font-weight:1000}
.contact-card strong{display:block;color:#0039c7;font-size:20px;overflow-wrap:anywhere}
.contact-card span{display:block;margin-top:6px;color:#667085;font-size:13px;font-weight:700}
@media(max-width:900px){.contact-grid{grid-template-columns:1fr}}


/* ===== NAVBAR LOGO: TRANSPARENT + LARGER, NAV HEIGHT UNCHANGED ===== */
.public-header .public-logo-link{
    height:66px !important;
    display:flex !important;
    align-items:center !important;
    overflow:visible !important;
}

.public-header .public-logo{
    width:145px !important;
    height:60px !important;
    max-height:60px !important;
    object-fit:contain !important;
    background:transparent !important;
    padding:0 !important;
    border:0 !important;
}

/* Keep existing public navbar height unchanged */
.public-header .public-nav{
    min-height:66px !important;
    height:66px !important;
}


/* ===== FINAL PUBLIC NAV LOGO =====
   Uses transparent PNG; logo is larger while navbar height stays unchanged.
*/
.public-header .public-nav{
    min-height:66px !important;
    height:66px !important;
}

.public-header .public-logo-link{
    height:66px !important;
    display:flex !important;
    align-items:center !important;
    overflow:visible !important;
    background:transparent !important;
}

.public-header .public-logo{
    width:175px !important;
    height:58px !important;
    max-width:175px !important;
    max-height:58px !important;
    padding:0 !important;
    margin:0 !important;
    object-fit:contain !important;
    object-position:left center !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}


/* ===== PRODUCT SKU / ITEM CODE BADGE =====
   Compact rounded badge that only fits the text.
*/
.divisoria-sku,
.product-sku{
    display:inline-flex !important;
    align-items:center !important;
    width:fit-content !important;
    max-width:max-content !important;
    min-width:0 !important;
    min-height:0 !important;
    padding:5px 11px !important;
    margin:0 0 10px 0 !important;
    background:#0039c7 !important;
    color:#ffffff !important;
    border-radius:999px !important;
    font-size:12px !important;
    font-weight:900 !important;
    line-height:1 !important;
    white-space:nowrap !important;
    letter-spacing:0 !important;
}


/* =========================================================
   PRODUCT CARD PRICE ALIGNMENT — FINAL
   Keeps prices at the same bottom position on every card.
   ========================================================= */

.divisoria-card{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
}

.divisoria-card .public-product-content,
.public-product-card .public-product-content{
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    height:100% !important;
    min-height:0 !important;
}

.divisoria-card .public-product-content p,
.public-product-card .public-product-content p{
    margin-bottom:16px !important;
}

/* Push the rate/price area to the bottom of the yellow content area */
.divisoria-card .divisoria-rate-label,
.public-product-card .divisoria-rate-label{
    margin-top:auto !important;
    margin-bottom:4px !important;
}

/* When the rate label is not present, push the price itself down */
.divisoria-card .public-product-price,
.public-product-card .public-product-price,
.divisoria-card .divisoria-price{
    margin-top:auto !important;
    padding-top:12px !important;
    margin-bottom:0 !important;
}

/* If label immediately precedes price, don't create a second auto gap */
.divisoria-rate-label + .public-product-price,
.divisoria-rate-label + .divisoria-price{
    margin-top:0 !important;
    padding-top:0 !important;
}

/* Keep price and / pc neatly on one baseline */
.public-product-price,
.divisoria-price{
    display:flex !important;
    align-items:baseline !important;
    gap:10px !important;
    flex-wrap:nowrap !important;
    white-space:nowrap !important;
}


/* =========================================================
   HARD FIX — ALIGN PRODUCT PRICES ON SAME BOTTOM LINE
   Actual price class used by the website is .public-price
   ========================================================= */

.public-product-grid{
    align-items:stretch !important;
}

.public-product-card,
.divisoria-card{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
}

.public-product-card .public-product-content,
.divisoria-card .public-product-content{
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    height:100% !important;
}

/* Let descriptions be full length, but do not control price position */
.public-product-card .public-product-content p,
.divisoria-card .public-product-content p{
    margin-bottom:16px !important;
}

/* Landing cards: push DIRECT DEPOT RATE + price block to bottom */
.divisoria-card .divisoria-rate-label{
    margin-top:auto !important;
    margin-bottom:5px !important;
}

.divisoria-card .divisoria-rate-label + .public-price{
    margin-top:0 !important;
}

/* Products catalog: price itself is the bottom anchor */
.public-product-card:not(.divisoria-card) .public-price{
    margin-top:auto !important;
}

/* Keep price line neat */
.public-price{
    display:flex !important;
    align-items:baseline !important;
    gap:10px !important;
    flex-wrap:nowrap !important;
    white-space:nowrap !important;
    margin-bottom:0 !important;
    padding-top:10px !important;
}

/* Ensure every content box has consistent bottom breathing room */
.public-product-content{
    padding-bottom:24px !important;
}


/* =========================================================
   FINAL PUBLIC LOGO FIX
   Landing, Products, Login, Contact pages
   IMPORTANT: navbar height is NOT changed.
   ========================================================= */

.public-header,
.divisoria-header{
    background:#fff600 !important;
}

/* Keep the existing navbar dimensions exactly as they are */
.public-header .public-logo-link,
.divisoria-header .public-logo-link{
    display:flex !important;
    align-items:center !important;
    align-self:stretch !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    margin:0 !important;
    overflow:visible !important;
}

/* Transparent logo only — do not resize navbar */
.public-header .public-logo,
.divisoria-header .public-logo{
    display:block !important;
    width:165px !important;
    height:56px !important;
    max-width:165px !important;
    max-height:56px !important;
    object-fit:contain !important;
    object-position:left center !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    margin:0 !important;
}


/* ===== TRUE TRANSPARENT NAV LOGO FIX =====
   Navbar height remains unchanged.
*/
.public-header .public-logo,
.divisoria-header .public-logo{
    width:165px !important;
    height:56px !important;
    max-width:165px !important;
    max-height:56px !important;
    object-fit:contain !important;
    object-position:left center !important;
    background-color:transparent !important;
}


/* =========================================================
   ADMIN ACTIVITY LOGS
   ========================================================= */

.activity-table{
    min-width:1180px;
}

.activity-table th,
.activity-table td{
    vertical-align:top;
}

.activity-date{
    min-width:170px;
    white-space:nowrap;
}

.activity-module{
    display:inline-block;
    padding:4px 8px;
    border-radius:999px;
    background:#eef2ff;
    color:#3730a3;
    font-size:11px;
    font-weight:800;
}

.activity-action{
    display:inline-block;
    padding:4px 8px;
    border-radius:7px;
    background:#f8fafc;
    border:1px solid var(--line);
    color:#344054;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

.audit-change-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.audit-change-grid h3{
    margin:0 0 8px;
    font-size:14px;
}

.audit-change-grid pre{
    min-height:180px;
    max-height:420px;
    margin:0;
    padding:14px;
    overflow:auto;
    border:1px solid var(--line);
    border-radius:9px;
    background:#f8fafc;
    color:#111827;
    font-family:Consolas,Monaco,monospace;
    font-size:12px;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}

@media(max-width:700px){
    .audit-change-grid{
        grid-template-columns:1fr;
    }
}


/* =========================================================
   FRIENDLY ACTIVITY LOG CHANGE VIEW
   No JSON / code appearance.
   ========================================================= */

.audit-friendly-panel{
    min-width:0;
}

.audit-friendly-panel h3{
    margin:0 0 10px;
    font-size:16px;
}

.audit-friendly-list{
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    overflow:hidden;
}

.audit-friendly-row{
    display:grid;
    grid-template-columns:minmax(125px, 38%) 1fr;
    gap:12px;
    padding:11px 13px;
    border-bottom:1px solid var(--line);
    align-items:start;
}

.audit-friendly-row:last-child{
    border-bottom:0;
}

.audit-friendly-label{
    color:#667085;
    font-size:12px;
    font-weight:700;
}

.audit-friendly-value{
    color:#101828;
    font-size:13px;
    font-weight:700;
    overflow-wrap:anywhere;
}

.audit-friendly-empty{
    padding:16px;
    color:#98a2b3;
    font-size:13px;
    text-align:center;
}

@media(max-width:700px){
    .audit-friendly-row{
        grid-template-columns:1fr;
        gap:3px;
    }
}


/* ===== SALES & LOGS COMBINED TAB ===== */
.logs-grand-total td{
    padding-top:14px !important;
    padding-bottom:14px !important;
    border-top:2px solid #1746d1 !important;
    background:#f8fafc !important;
    font-size:14px !important;
}

.logs-grand-total .amount{
    color:#1746d1 !important;
    white-space:nowrap !important;
    font-size:16px !important;
}


/* ===== SALES OVERVIEW INSIDE SALES & LOGS ===== */
.sales-overview-section{
    margin-bottom:28px;
}

.sales-overview-head{
    margin-bottom:14px;
}

.sales-overview-head h2{
    margin:0 0 4px;
    font-size:24px;
}

.sales-summary-grid{
    margin-bottom:18px;
}

.sales-breakdown-grid{
    margin-bottom:22px;
}


/* =========================================================
   SALES OVERVIEW CLEAN SPACING
   ========================================================= */

.sales-page-actions{
    display:flex;
    justify-content:flex-end;
    margin:22px 0 18px;
}

.sales-overview-section{
    margin-bottom:28px !important;
}

.sales-overview-head{
    margin-bottom:18px !important;
}

.sales-overview-head h1{
    margin:0 0 6px !important;
    font-size:28px !important;
    line-height:1.2 !important;
}

.sales-overview-head p{
    margin:0 !important;
    color:var(--muted) !important;
}

/* Summary cards */
.sales-summary-grid{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:16px !important;
    margin-bottom:20px !important;
}

.sales-summary-grid .stat{
    min-height:112px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    padding:20px 18px !important;
}

.sales-summary-grid .stat small{
    margin-bottom:8px !important;
    line-height:1.25 !important;
}

.sales-summary-grid .stat strong{
    line-height:1.15 !important;
}

/* Lower sales cards */
.sales-breakdown-grid{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:18px !important;
    margin-bottom:24px !important;
}

.sales-breakdown-grid .card{
    height:100% !important;
    padding:22px !important;
}

.sales-breakdown-grid .card h2{
    margin:0 0 18px !important;
}

/* Keep filter card separated evenly */
.sales-overview-section + .card{
    margin-top:0 !important;
}

@media(max-width:1000px){
    .sales-summary-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
}

@media(max-width:720px){
    .sales-summary-grid,
    .sales-breakdown-grid{
        grid-template-columns:1fr !important;
    }

    .sales-page-actions{
        justify-content:stretch;
    }

    .sales-page-actions .btn{
        width:100%;
    }
}

.sales-overview-top{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:20px!important;margin:22px 0 18px!important}
.sales-overview-top .sales-overview-head{margin:0!important}
.sales-overview-top .sales-overview-head h1{margin:0 0 6px!important}
.sales-overview-top .sales-overview-head p{margin:0!important}
.sales-overview-top>.btn{margin:0!important;flex:0 0 auto!important}
@media(max-width:720px){.sales-overview-top{flex-direction:column!important;align-items:stretch!important}.sales-overview-top>.btn{width:100%!important}}

/* Remove blue line above Grand Total */
.logs-grand-total td{
    border-top:0 !important;
}


/* =========================================================
   PUBLIC CONTACT PAGE - RESPONSIVE FIX
   ========================================================= */

/* Keep page content fluid */
.public-wrap{
    width:min(1380px, calc(100% - 32px)) !important;
}

/* Header / nav responsive without changing desktop height */
@media(max-width:900px){
    .public-header .public-nav{
        height:auto !important;
        min-height:66px !important;
        padding:10px 0 !important;
        flex-direction:row !important;
        align-items:center !important;
        justify-content:space-between !important;
        gap:12px !important;
        flex-wrap:wrap !important;
    }

    .public-header .public-logo-link{
        height:56px !important;
        flex:0 0 auto !important;
    }

    .public-header .public-logo{
        width:150px !important;
        height:52px !important;
        max-width:150px !important;
        max-height:52px !important;
    }

    .public-nav nav{
        display:flex !important;
        align-items:center !important;
        justify-content:flex-end !important;
        gap:10px !important;
        flex-wrap:wrap !important;
        width:auto !important;
        min-width:0 !important;
    }

    .public-nav nav a{
        font-size:13px !important;
        padding:8px 10px !important;
        white-space:nowrap !important;
    }

    .public-login-btn{
        padding:8px 12px !important;
    }
}

/* Contact hero */
@media(max-width:900px){
    .contact-hero{
        padding:42px 0 38px !important;
    }

    .contact-hero h1{
        font-size:clamp(44px, 11vw, 76px) !important;
        text-shadow:3px 3px 0 #111 !important;
    }

    .contact-hero p{
        max-width:620px !important;
        padding:0 8px !important;
        font-size:16px !important;
        line-height:1.45 !important;
    }
}

/* Contact cards */
.contact-grid{
    align-items:stretch !important;
}

.contact-card{
    min-width:0 !important;
    height:100% !important;
}

.contact-card > div:last-child{
    min-width:0 !important;
}

.contact-card strong,
.contact-card span{
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
}

@media(max-width:980px){
    .contact-grid{
        grid-template-columns:1fr !important;
        gap:16px !important;
    }

    .contact-section{
        padding:36px 0 48px !important;
    }

    .contact-card{
        width:100% !important;
        padding:20px !important;
        gap:16px !important;
    }
}

@media(max-width:600px){
    .public-wrap{
        width:calc(100% - 20px) !important;
    }

    .public-header .public-nav{
        flex-direction:column !important;
        align-items:stretch !important;
        padding:8px 0 10px !important;
    }

    .public-header .public-logo-link{
        justify-content:center !important;
        height:50px !important;
    }

    .public-header .public-logo{
        width:145px !important;
        height:48px !important;
        max-width:145px !important;
        max-height:48px !important;
        margin:auto !important;
    }

    .public-nav nav{
        width:100% !important;
        justify-content:center !important;
        gap:6px !important;
    }

    .public-nav nav a{
        font-size:12px !important;
        padding:7px 8px !important;
    }

    .contact-hero{
        padding:32px 0 30px !important;
    }

    .contact-kicker{
        padding:6px 10px !important;
        font-size:12px !important;
    }

    .contact-hero h1{
        font-size:clamp(38px, 13vw, 58px) !important;
        text-shadow:2px 2px 0 #111 !important;
        letter-spacing:-1px !important;
    }

    .contact-hero p{
        font-size:14px !important;
        line-height:1.45 !important;
    }

    .contact-section{
        padding:28px 0 38px !important;
    }

    .contact-card{
        align-items:flex-start !important;
        padding:16px !important;
        gap:12px !important;
        box-shadow:4px 4px 0 #111 !important;
    }

    .contact-icon{
        width:48px !important;
        height:48px !important;
        flex:0 0 48px !important;
        font-size:23px !important;
    }

    .contact-card strong{
        font-size:17px !important;
        line-height:1.25 !important;
    }

    .contact-card span{
        font-size:12px !important;
    }

    .public-footer{
        padding:20px 10px !important;
        font-size:12px !important;
    }
}

@media(max-width:380px){
    .public-nav nav{
        display:grid !important;
        grid-template-columns:repeat(2, minmax(0,1fr)) !important;
        width:100% !important;
    }

    .public-nav nav a{
        text-align:center !important;
    }

    .contact-card{
        flex-direction:column !important;
    }
}


/* =========================================================
   PUBLIC FOOTER FIX
   Keep footer at the true bottom of the page with no yellow gap.
   ========================================================= */

body.public-site{
    min-height:100vh !important;
    display:flex !important;
    flex-direction:column !important;
}

/* Main public content grows to fill the available screen height */
body.public-site > main,
body.public-site > .contact-section,
body.public-site > .public-section{
    flex:1 0 auto !important;
}

/* Footer always stays after content / at bottom on short pages */
body.public-site > .public-footer{
    flex:0 0 auto !important;
    margin-top:auto !important;
    width:100% !important;
    box-sizing:border-box !important;
}

/* Contact page specifically: fill remaining space cleanly */
body.public-site .contact-section{
    flex:1 0 auto !important;
}

/* Prevent any inherited yellow body area below the footer */
body.public-site{
    background:#111 !important;
}

body.public-site .contact-section,
body.public-site .divisoria-products,
body.public-site .public-section{
    background:#fff600;
}

@media(max-width:600px){
    body.public-site > .public-footer{
        margin-top:auto !important;
    }
}

.account-status-radios{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-top:6px}
.account-status-radios label{display:flex;align-items:center;gap:7px;font-weight:700;cursor:pointer}
.account-status-radios input[type=radio]{width:17px;height:17px;margin:0}


/* =========================================================
   PRODUCT PHOTOS IN QUOTATIONS
   ========================================================= */
.quote-photo-cell{width:82px;min-width:82px}
.quote-product-thumb{
    display:block;width:64px;height:64px;object-fit:contain;
    border:1px solid #e5e7eb;border-radius:8px;background:#fff;padding:3px;
}
.quote-product-no-image{
    width:64px;height:64px;border:1px dashed #cbd5e1;border-radius:8px;
    display:flex;align-items:center;justify-content:center;text-align:center;
    font-size:10px;color:#94a3b8;background:#f8fafc;
}
.search-result-item{display:flex;align-items:center;gap:10px}
.quote-search-thumb{
    width:44px;height:44px;object-fit:contain;border-radius:7px;
    border:1px solid #e5e7eb;background:#fff;flex:0 0 44px;
}
.quote-search-no-image{
    width:44px;height:44px;border:1px dashed #cbd5e1;border-radius:7px;
    display:flex;align-items:center;justify-content:center;font-size:9px;
    color:#94a3b8;flex:0 0 44px;
}

/* Printed quotation product images */
.print-items .col-photo{width:58px}
.print-product-photo{width:58px;text-align:center;padding:5px!important}
.print-product-photo img{
    display:block;width:46px;height:46px;object-fit:contain;
    margin:0 auto;background:#fff;
}
.print-no-image{font-size:8px;color:#999}
@media print{
    .print-product-photo img{
        width:42px!important;height:42px!important;object-fit:contain!important;
    }
}


/* FINAL OVERRIDE — SMALL PRODUCT PHOTO IN QUOTATION ONLY
   Does not change the old table, row, form, or page sizing. */
#quoteItemsTable .quote-photo-cell,
table .quote-photo-cell{
    width:56px !important;
    min-width:56px !important;
    max-width:56px !important;
    padding:6px !important;
    vertical-align:middle !important;
}
#quoteItemsTable .quote-product-thumb,
table .quote-product-thumb{
    display:block !important;
    width:44px !important;
    height:44px !important;
    max-width:44px !important;
    max-height:44px !important;
    object-fit:contain !important;
    margin:0 auto !important;
    padding:0 !important;
    border-radius:6px !important;
}
#quoteItemsTable .quote-product-no-image,
table .quote-product-no-image{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    font-size:8px !important;
}
/* Keep printed image compact too, without changing the existing print layout. */
.print-items .col-photo{width:48px !important}
.print-product-photo{width:48px !important;padding:4px !important}
.print-product-photo img{
    width:38px !important;
    height:38px !important;
    max-width:38px !important;
    max-height:38px !important;
    object-fit:contain !important;
}


/* =========================================================
   HARD FIX: QUOTATION PRODUCT IMAGES MUST STAY SMALL
   ========================================================= */

#searchResults .search-result-item{
    min-height:58px !important;
    max-height:72px !important;
    padding:7px 10px !important;
    overflow:hidden !important;
}

#searchResults .quote-search-thumb{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    max-width:44px !important;
    max-height:44px !important;
    flex:0 0 44px !important;
    object-fit:contain !important;
    object-position:center !important;
    display:block !important;
    padding:0 !important;
    margin:0 !important;
    border-radius:6px !important;
}

#quoteItemsTable td.quote-photo-cell{
    width:56px !important;
    min-width:56px !important;
    max-width:56px !important;
    padding:6px !important;
}

#quoteItemsTable img.quote-product-thumb{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    max-width:44px !important;
    max-height:44px !important;
    object-fit:contain !important;
    object-position:center !important;
    display:block !important;
    margin:0 auto !important;
    padding:0 !important;
}

/* Saved quotation view */
.quote-photo-cell img.quote-product-thumb{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    max-width:44px !important;
    max-height:44px !important;
    object-fit:contain !important;
}

/* Printed quotation remains compact */
.print-product-photo img{
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    min-height:36px !important;
    max-width:36px !important;
    max-height:36px !important;
    object-fit:contain !important;
}




/* RESTORE INTERNAL NAV LOGO VISUAL SIZE — navbar height unchanged */
.topbar .header-logo{
    width:190px !important;
    height:62px !important;
    max-width:190px !important;
    max-height:62px !important;
    object-fit:contain !important;
    object-position:left center !important;
    display:block !important;
}
.topbar .brand,
.topbar .brand-link{
    height:62px !important;
    display:flex !important;
    align-items:center !important;
}


/* PUBLIC NAV LOGO — transparent background, navbar size unchanged */
.public-header .public-logo,
.divisoria-header .public-logo{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
}
.public-header .public-logo-link,
.divisoria-header .public-logo-link{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}


/* PRINTED QUOTATION TERMS FOOTER */
.quotation-print-page .print-terms{
    margin-top:12mm;
    padding-top:4mm;
    border-top:1px solid #cfd6df;
    font-size:8.5pt;
    line-height:1.45;
    color:#344054;
    break-inside:avoid;
}
.quotation-print-page .print-terms h4{
    margin:0 0 2mm;
    font-size:9.5pt;
    color:#111827;
}
.quotation-print-page .print-terms ul{
    margin:0;
    padding-left:5mm;
}
.quotation-print-page .print-terms li{
    margin-bottom:1mm;
}
@media print{
    .quotation-print-page .print-terms{
        position:fixed;
        left:12mm;
        right:12mm;
        bottom:10mm;
        margin:0;
        padding-top:3mm;
        background:#fff;
    }
    .quotation-print-page .print-footer{
        display:none !important;
    }
}

.quotation-print-page .print-bank-details{
    margin-top:3mm;
    padding-top:2.5mm;
    border-top:1px solid #e5e7eb;
    font-size:8.5pt;
    line-height:1.5;
}


/* =========================================================
   PRINT TERMS & CONDITIONS — CLEAN COMPACT SPACING
   ========================================================= */
.quotation-print-page .print-terms{
    padding-top:3mm !important;
    font-size:8pt !important;
    line-height:1.28 !important;
}

.quotation-print-page .print-terms h4{
    margin:0 0 1.5mm 0 !important;
    font-size:9pt !important;
    line-height:1.2 !important;
}

.quotation-print-page .print-terms ul{
    margin:0 !important;
    padding-left:4.5mm !important;
}

.quotation-print-page .print-terms li{
    margin:0 0 0.8mm 0 !important;
    padding:0 !important;
    line-height:1.28 !important;
}

.quotation-print-page .print-bank-details{
    margin-top:2mm !important;
    padding-top:2mm !important;
    font-size:8pt !important;
    line-height:1.3 !important;
}

.quotation-print-page .print-bank-details strong{
    display:block !important;
    margin-bottom:0.8mm !important;
    font-size:8.5pt !important;
}

@media print{
    .quotation-print-page .print-terms{
        left:12mm !important;
        right:12mm !important;
        bottom:8mm !important;
        padding-top:3mm !important;
    }
}

/* FINAL PRINT FOOTER SPACING FIX */
.quotation-print-page .print-terms{line-height:1.20!important}
.quotation-print-page .print-terms h4{margin:0 0 1mm 0!important}
.quotation-print-page .print-terms ul{margin:0!important}
.quotation-print-page .print-terms li{margin:0 0 .45mm 0!important;line-height:1.20!important}
.quotation-print-page .print-bank-details{margin:1.5mm 0 0!important;padding:1.5mm 0 0!important;line-height:1.18!important}
.quotation-print-page .print-bank-details .bank-title{font-weight:700!important;margin:0 0 .8mm!important;padding:0!important;line-height:1.15!important}
.quotation-print-page .print-bank-details .bank-lines,.quotation-print-page .print-bank-details .bank-lines div{margin:0!important;padding:0!important;line-height:1.18!important}
@media print{.quotation-print-page .print-terms{bottom:7mm!important}}


/* PRINT FOOTER — align with the main quotation content above */
.quotation-print-page .print-terms{
    left:0 !important;
    right:0 !important;
    width:100% !important;
    box-sizing:border-box !important;
}

@media print{
    .quotation-print-page .print-terms{
        left:0 !important;
        right:0 !important;
        width:auto !important;
        margin-left:0 !important;
        margin-right:0 !important;
    }
}


/* =========================================================
   RETURNS
   ========================================================= */
.return-policy-card{
    display:flex;
    gap:12px;
    align-items:flex-start;
    margin-bottom:18px;
    padding:14px 16px;
    border:1px solid #f59e0b;
    border-left:5px solid #f59e0b;
    border-radius:9px;
    background:#fffbeb;
    color:#92400e;
}
.return-policy-card strong{white-space:nowrap}
.return-policy-card span{line-height:1.45}

.return-item-preview{
    align-items:center;
    gap:12px;
    margin:-2px 0 16px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#f8fafc;
}
.return-item-preview img,
.return-no-image{
    width:52px;
    height:52px;
    flex:0 0 52px;
    object-fit:contain;
    border:1px solid var(--line);
    border-radius:7px;
    background:#fff;
}
.return-no-image{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#98a2b3;
    font-size:9px;
    text-align:center;
}
.return-item-preview strong,
.return-item-preview span{display:block}
.return-item-preview span{margin-top:3px;color:var(--muted);font-size:12px}

.returns-table{min-width:1250px}
.return-notes{max-width:250px;margin-top:4px;font-size:11px}

.return-status{
    display:inline-block;
    padding:5px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}
.return-status-pending_inspection{background:#fff7ed;color:#c2410c}
.return-status-approved{background:#eff6ff;color:#1d4ed8}
.return-status-rejected{background:#fef2f2;color:#b91c1c}
.return-status-replaced{background:#ecfdf3;color:#027a48}

@media(max-width:700px){
    .return-policy-card{flex-direction:column;gap:5px}
}


/* =========================================================
   RETURNS — PRINT PER RECORD
   ========================================================= */
.return-action-buttons{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
}

.return-print-page .return-print-details{
    margin-top:7mm;
}

.return-print-page .return-print-detail{
    margin-bottom:5mm;
}

.return-print-page .return-print-value{
    margin-top:1.5mm;
    padding:3mm;
    min-height:13mm;
    border:1px solid #d7dde5;
    background:#f8fafc;
    color:#111;
    font-size:10pt;
    line-height:1.4;
    white-space:normal;
}

.return-print-page .return-print-two-col{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8mm;
}

.return-print-page .return-policy-print{
    position:static !important;
    margin-top:10mm !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    width:100% !important;
}

@media print{
    .return-print-page .return-policy-print{
        position:fixed !important;
        left:12mm !important;
        right:12mm !important;
        bottom:8mm !important;
        width:auto !important;
        background:#fff !important;
    }
}


/* =========================================================
   RETURNS — SEARCHABLE SALES ORDER + FILTERS
   ========================================================= */
.return-order-search-field{
    position:relative;
}

.return-order-results{
    position:absolute;
    z-index:50;
    left:0;
    right:0;
    top:72px;
    max-height:300px;
    overflow:auto;
    background:#fff;
    border:1px solid var(--line);
    border-radius:9px;
    box-shadow:0 10px 24px rgba(15,23,42,.12);
}

.return-order-results:empty{
    display:none;
}

.return-order-result{
    width:100%;
    display:grid;
    grid-template-columns:150px minmax(0,1fr) 100px;
    gap:10px;
    align-items:center;
    padding:10px 12px;
    border:0;
    border-bottom:1px solid var(--line);
    background:#fff;
    color:#111827;
    text-align:left;
    cursor:pointer;
}

.return-order-result:last-child{
    border-bottom:0;
}

.return-order-result:hover{
    background:#f8fafc;
}

.return-order-result strong{
    color:#1746d1;
}

.return-order-result span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.return-order-result small{
    color:var(--muted);
    text-align:right;
}

.return-order-empty{
    padding:12px;
    color:var(--muted);
    font-size:13px;
}

.returns-list-head{
    align-items:flex-start;
    gap:20px;
}

.returns-filter-form{
    flex:1;
    max-width:850px;
}

.returns-filter-grid{
    display:grid;
    grid-template-columns:1.5fr 1fr 1fr 1fr;
    gap:10px;
}

.returns-filter-form .field{
    margin-bottom:0;
}

@media(max-width:1000px){
    .returns-list-head{
        display:block;
    }

    .returns-filter-form{
        max-width:none;
        margin-top:14px;
    }

    .returns-filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:620px){
    .returns-filter-grid{
        grid-template-columns:1fr;
    }

    .return-order-result{
        grid-template-columns:1fr;
        gap:3px;
    }

    .return-order-result small{
        text-align:left;
    }
}


/* RETURNS FILTER BUTTON ALIGNMENT */
.returns-filter-actions{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    width:100%;
    margin-top:10px;
}

.returns-filter-actions .btn{
    width:auto !important;
    min-width:105px;
    height:38px;
    margin:0 !important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
}


/* RETURNS FILTER ACTIONS — clean button row */
.returns-filter-actions{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:8px !important;
    flex-wrap:wrap !important;
}
.returns-filter-actions .btn{
    width:auto !important;
    min-width:105px !important;
    margin:0 !important;
    white-space:nowrap !important;
}


/* =========================================================
   RETURNS FILTERS — SINGLE LINE ON DESKTOP
   ========================================================= */
.returns-list-head{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:20px !important;
    flex-wrap:nowrap !important;
}

.returns-list-head > div:first-child{
    flex:0 0 auto !important;
    min-width:230px !important;
}

.returns-filter-form{
    flex:1 1 auto !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
}

.returns-filter-grid{
    display:grid !important;
    grid-template-columns:minmax(190px,1.35fr) minmax(145px,.9fr) minmax(145px,.9fr) minmax(145px,.9fr) auto !important;
    gap:10px !important;
    align-items:end !important;
}

.returns-filter-grid .field{
    margin:0 !important;
    min-width:0 !important;
}

.returns-filter-actions{
    display:flex !important;
    align-items:flex-end !important;
    justify-content:flex-start !important;
    gap:7px !important;
    flex-wrap:nowrap !important;
    width:auto !important;
    margin:0 !important;
    min-width:max-content !important;
}

.returns-filter-actions .btn{
    width:auto !important;
    min-width:0 !important;
    height:38px !important;
    margin:0 !important;
    padding:0 14px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    white-space:nowrap !important;
}

@media(max-width:1180px){
    .returns-list-head{
        align-items:flex-start !important;
        flex-wrap:wrap !important;
    }
    .returns-filter-form{
        flex-basis:100% !important;
    }
}

@media(max-width:850px){
    .returns-filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
    .returns-filter-actions{
        flex-wrap:wrap !important;
        min-width:0 !important;
    }
}

@media(max-width:560px){
    .returns-filter-grid{
        grid-template-columns:1fr !important;
    }
}


/* FINAL RETURNS FILTER DESKTOP ROW FIX */
@media(min-width:1181px){
    .returns-list-head{
        display:grid !important;
        grid-template-columns:360px minmax(0,1fr) !important;
        align-items:end !important;
        gap:20px !important;
    }

    .returns-list-head > div:first-child{
        min-width:0 !important;
        padding-bottom:3px !important;
    }

    .returns-filter-form{
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;
    }

    .returns-filter-grid{
        display:grid !important;
        grid-template-columns:minmax(190px,1.25fr) minmax(150px,.85fr) minmax(150px,.85fr) minmax(150px,.85fr) max-content !important;
        gap:10px !important;
        align-items:end !important;
        width:100% !important;
    }

    .returns-filter-actions{
        display:flex !important;
        flex-direction:row !important;
        align-items:center !important;
        justify-content:flex-start !important;
        flex-wrap:nowrap !important;
        gap:7px !important;
        width:max-content !important;
        min-width:max-content !important;
        margin:0 !important;
    }

    .returns-filter-actions .btn{
        display:inline-flex !important;
        width:auto !important;
        min-width:0 !important;
        height:38px !important;
        margin:0 !important;
        padding:0 12px !important;
        white-space:nowrap !important;
    }
}


/* =========================================================
   FINAL HARD OVERRIDE — RETURN RECORDS FILTERS ONE ROW
   ========================================================= */
@media (min-width: 1000px){
    #return-records .returns-list-head{
        display:grid !important;
        grid-template-columns:220px minmax(0,1fr) !important;
        align-items:end !important;
        column-gap:16px !important;
        row-gap:0 !important;
        width:100% !important;
    }

    #return-records .returns-list-head > div:first-child{
        width:220px !important;
        min-width:220px !important;
        max-width:220px !important;
        margin:0 !important;
        padding:0 0 4px 0 !important;
    }

    #return-records .returns-filter-form{
        display:block !important;
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 !important;
    }

    #return-records .returns-filter-grid{
        display:grid !important;
        grid-template-columns:
            minmax(165px,1.2fr)
            minmax(120px,.8fr)
            minmax(125px,.8fr)
            minmax(125px,.8fr)
            max-content !important;
        align-items:end !important;
        gap:8px !important;
        width:100% !important;
        min-width:0 !important;
        margin:0 !important;
        padding:0 !important;
    }

    #return-records .returns-filter-grid > .field{
        width:auto !important;
        min-width:0 !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 !important;
    }

    #return-records .returns-filter-grid > .field input,
    #return-records .returns-filter-grid > .field select{
        width:100% !important;
        min-width:0 !important;
        height:38px !important;
        margin:0 !important;
    }

    #return-records .returns-filter-actions{
        display:flex !important;
        flex-direction:row !important;
        flex-wrap:nowrap !important;
        align-items:center !important;
        justify-content:flex-start !important;
        gap:6px !important;
        width:max-content !important;
        min-width:max-content !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 !important;
    }

    #return-records .returns-filter-actions .btn{
        display:inline-flex !important;
        flex:0 0 auto !important;
        width:auto !important;
        min-width:0 !important;
        max-width:none !important;
        height:38px !important;
        margin:0 !important;
        padding:0 11px !important;
        align-items:center !important;
        justify-content:center !important;
        white-space:nowrap !important;
        font-size:12px !important;
    }
}

@media (max-width: 999px){
    #return-records .returns-list-head{
        display:block !important;
    }

    #return-records .returns-filter-form{
        margin-top:14px !important;
        width:100% !important;
    }

    #return-records .returns-filter-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }

    #return-records .returns-filter-actions{
        flex-wrap:wrap !important;
    }
}

@media (max-width: 560px){
    #return-records .returns-filter-grid{
        grid-template-columns:1fr !important;
    }
}


/* =========================================================
   PRODUCT DESCRIPTIONS — PRODUCTS + QUOTATION
   ========================================================= */
.product-description-cell{
    min-width:260px;
    max-width:430px;
    white-space:normal !important;
    line-height:1.45;
    color:#344054;
}

#quoteItemsTable .quote-description-cell{
    min-width:260px;
    max-width:430px;
    white-space:normal !important;
    line-height:1.4;
    color:#344054;
}

#searchResults .search-result-item small{
    display:block;
    margin-top:3px;
    line-height:1.35;
    white-space:normal;
}

@media(max-width:800px){
    .product-description-cell,
    #quoteItemsTable .quote-description-cell{
        min-width:220px;
    }
}


/* =========================================================
   FINAL QUOTATION / SALES ORDER PRINT PAGINATION FIX
   Terms & Conditions appear only after the last item.
   They are never fixed over product rows.
   ========================================================= */
@media print{
    .quotation-print-page .print-items tr{
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }

    .quotation-print-page .print-items tfoot{
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }

    .quotation-print-page .print-terms{
        position:static !important;
        left:auto !important;
        right:auto !important;
        top:auto !important;
        bottom:auto !important;
        width:100% !important;
        margin:10mm 0 0 0 !important;
        padding-top:3mm !important;
        background:#fff !important;
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }

    .quotation-print-page .print-bank-details{
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }

    .quotation-print-page .print-footer{
        position:static !important;
        display:block !important;
        margin-top:4mm !important;
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }
}


/* =========================================================
   PRINT TOTAL — LAST PAGE ONLY
   ========================================================= */
.quotation-print-page .print-grand-total{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:18px;
    margin-top:0;
    padding:10px 0;
    border-top:2px solid #1746d1;
    font-weight:800;
    break-inside:avoid;
    page-break-inside:avoid;
}

.quotation-print-page .print-grand-total-label{
    min-width:120px;
    text-align:right;
    color:#1746d1;
}

.quotation-print-page .print-grand-total-value{
    min-width:120px;
    text-align:right;
    color:#111;
}

@media print{
    .quotation-print-page .print-grand-total{
        position:static !important;
        margin-top:0 !important;
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }

    .quotation-print-page .print-items tfoot{
        display:none !important;
    }
}


/* =========================================================
   ADMIN QUOTATION SETTINGS
   ========================================================= */
.settings-terms-card{
    max-width:1000px;
}
.settings-help{
    max-width:850px;
    line-height:1.5;
}
.settings-terms-textarea{
    min-height:290px !important;
    resize:vertical !important;
    line-height:1.5 !important;
}
.settings-note{
    margin-top:20px;
    padding:14px 16px;
    border:1px solid #d0d5dd;
    border-radius:9px;
    background:#f8fafc;
    color:#475467;
    line-height:1.45;
}


/* ADMIN SETTINGS — TERMS + PAYMENT DETAILS */
.settings-terms-card .grid-2{
    gap:16px;
}
.settings-terms-card input{
    width:100%;
}


/* Dynamic T&C / Bank Details entered from Admin Settings */
.dynamic-terms{
    font-size:10px;
    line-height:1.35;
}
.terms-bullet{
    display:flex;
    gap:6px;
    align-items:flex-start;
    margin:1px 0;
}
.terms-bullet > span{
    flex:0 0 auto;
}
.terms-subheading{
    margin-top:7px;
    padding-top:5px;
    border-top:1px solid #d7dce5;
    font-weight:800;
    text-transform:uppercase;
}
.payment-line{
    margin:1px 0;
}
.terms-spacer{
    height:4px;
}
@media print{
    .dynamic-terms,
    .terms-subheading,
    .payment-line,
    .terms-bullet{
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }
}


/* RETURNS — SEARCHABLE EXCHANGE PRODUCT */
.return-exchange-search-field{
    position:relative;
}
.return-exchange-results{
    position:absolute;
    z-index:80;
    left:0;
    right:0;
    top:72px;
    max-height:320px;
    overflow:auto;
    background:#fff;
    border:1px solid var(--line);
    border-radius:9px;
    box-shadow:0 10px 24px rgba(15,23,42,.14);
}
.return-exchange-results:empty{
    display:none;
}
.return-exchange-result{
    width:100%;
    display:grid;
    grid-template-columns:minmax(170px,1.2fr) 120px minmax(220px,1.8fr);
    gap:10px;
    align-items:center;
    padding:10px 12px;
    border:0;
    border-bottom:1px solid var(--line);
    background:#fff;
    color:#111827;
    text-align:left;
    cursor:pointer;
}
.return-exchange-result:last-child{
    border-bottom:0;
}
.return-exchange-result:hover{
    background:#f8fafc;
}
.return-exchange-result strong{
    color:#1746d1;
}
.return-exchange-result span{
    color:#475467;
    font-size:12px;
}
.return-exchange-result small{
    color:#667085;
    line-height:1.3;
}
@media(max-width:700px){
    .return-exchange-result{
        grid-template-columns:1fr;
        gap:3px;
    }
}


/* RETURNS ACTION BUTTONS — FORCE VISIBLE */
#return-records .return-action-buttons{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
    flex-wrap:nowrap !important;
    min-width:170px !important;
}

#return-records .return-action-buttons .btn{
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    flex:0 0 auto !important;
    white-space:nowrap !important;
}

#return-records th:last-child,
#return-records td:last-child{
    min-width:190px !important;
    width:190px !important;
}


/* RETURN EDIT PAGE — quotation-style full page form */
.return-edit-page-card{
    max-width:none;
}
.return-edit-original-item{
    display:flex;
    align-items:center;
    gap:16px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#f8fafc;
}
.return-edit-original-photo{
    width:80px;
    height:80px;
    flex:0 0 80px;
}
.return-edit-original-photo img{
    width:100%;
    height:100%;
    object-fit:contain;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
}


/* FINAL RETURNS ACTION VISIBILITY */
#return-records .return-action-buttons{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
    flex-wrap:nowrap !important;
    min-width:230px !important;
}
#return-records .return-action-buttons .btn{
    display:inline-flex !important;
    flex:0 0 auto !important;
    visibility:visible !important;
    opacity:1 !important;
    white-space:nowrap !important;
}
#return-records th:last-child,
#return-records td:last-child{
    min-width:240px !important;
    width:240px !important;
}


/* RETURN EDIT BUTTON — DEFINITIVE VISIBILITY FIX */
#return-records .btn-edit-return{
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative !important;
    z-index:2 !important;
}


/* RETURN PRINT — RETURNED ITEM + REPLACEMENT ITEM */
.return-print-page .return-item-pair{
    margin-bottom:5mm;
}
.return-print-page .return-item-pair .return-print-detail{
    margin-bottom:0 !important;
}
@media print{
    .return-print-page .return-item-pair{
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }
}


/* =========================================================
   QUOTATION PRODUCT SEARCH — CLEAN COMPACT RESULTS
   ========================================================= */
.product-search-box{
    position:relative;
}

.product-search-box .search-results{
    margin-top:8px !important;
    max-height:390px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    border:1px solid #dbe3ee !important;
    border-radius:10px !important;
    background:#fff !important;
    box-shadow:0 10px 26px rgba(15,23,42,.10) !important;
}

.product-search-box .search-results:empty{
    display:none !important;
}

.product-search-box .search-result-item{
    width:100% !important;
    display:grid !important;
    grid-template-columns:58px minmax(0,1fr) 130px !important;
    align-items:center !important;
    gap:12px !important;
    padding:10px 12px !important;
    min-height:72px !important;
    border:0 !important;
    border-bottom:1px solid #e5e7eb !important;
    background:#fff !important;
    text-align:left !important;
    cursor:pointer !important;
}

.product-search-box .search-result-item:last-child{
    border-bottom:0 !important;
}

.product-search-box .search-result-item:hover,
.product-search-box .search-result-item:focus{
    background:#fffbea !important;
    outline:none !important;
}

.quote-search-photo{
    width:58px !important;
    height:54px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
}

.quote-search-thumb,
.quote-search-no-image{
    width:54px !important;
    height:54px !important;
    min-width:54px !important;
    max-width:54px !important;
    min-height:54px !important;
    max-height:54px !important;
    border:1px dashed #cbd5e1 !important;
    border-radius:8px !important;
    background:#f8fafc !important;
}

.quote-search-thumb{
    display:block !important;
    object-fit:contain !important;
    padding:2px !important;
}

.quote-search-no-image{
    align-items:center !important;
    justify-content:center !important;
    color:#94a3b8 !important;
    font-size:9px !important;
    text-align:center !important;
}

.quote-search-info{
    display:block !important;
    min-width:0 !important;
    text-align:left !important;
}

.quote-search-info b{
    display:block !important;
    margin:0 0 3px !important;
    color:#111827 !important;
    font-size:14px !important;
    line-height:1.25 !important;
    text-align:left !important;
}

.product-search-box .search-result-item .quote-search-sku,
.product-search-box .search-result-item .quote-search-description{
    display:block !important;
    margin:0 !important;
    color:#667085 !important;
    font-size:12px !important;
    line-height:1.35 !important;
    text-align:left !important;
    white-space:normal !important;
}

.product-search-box .search-result-item .quote-search-description{
    margin-top:2px !important;
    color:#475467 !important;
}

.quote-search-price{
    justify-self:end !important;
    align-self:center !important;
    min-width:110px !important;
    color:#1746d1 !important;
    font-size:14px !important;
    font-weight:800 !important;
    text-align:right !important;
    white-space:nowrap !important;
}

@media(max-width:700px){
    .product-search-box .search-result-item{
        grid-template-columns:50px minmax(0,1fr) !important;
    }

    .quote-search-price{
        grid-column:2 !important;
        justify-self:start !important;
        margin-top:4px !important;
        text-align:left !important;
    }

    .quote-search-photo,
    .quote-search-thumb,
    .quote-search-no-image{
        width:46px !important;
        min-width:46px !important;
        max-width:46px !important;
        height:46px !important;
        min-height:46px !important;
        max-height:46px !important;
    }
}


/* =========================================================
   SETTINGS GROUPED NAVIGATION
   ========================================================= */
.nav a.nav-active{
    color:var(--blue) !important;
}

.settings-subnav{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin:0 0 20px;
    padding:7px;
    width:max-content;
    max-width:100%;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
}

.settings-subnav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 14px;
    border-radius:8px;
    color:#344054;
    font-weight:700;
    text-decoration:none;
    white-space:nowrap;
}

.settings-subnav a:hover{
    background:#f8fafc;
}

.settings-subnav a.active{
    background:var(--blue);
    color:#fff;
}

@media(max-width:650px){
    .settings-subnav{
        width:100%;
    }

    .settings-subnav a{
        flex:1 1 auto;
    }
}
