body { background:#FFFFFF; }
/* =========================
   BASE
========================= */
.kiosk-login {
    min-height: 100vh; /* 🔥 FIX (better than height) */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a;
    font-family: Arial;
    padding: 15px;
}

/* =========================
   LOGIN BOX
========================= */
.login-box {
    width: 100%;
    max-width: 320px; /* 🔥 responsive instead of fixed */
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.login-box h2 {
    margin-bottom: 15px;
    color: #111;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #1d4ed8;
}

.login-error {
    color: red;
    font-size: 13px;
    margin-bottom: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 10px 0;
    color: #333;
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* =========================
   TABLET (≤768px)
========================= */
@media (max-width:768px){

    .login-box{
        max-width: 400px;
        padding: 20px;
    }

    .login-box h2{
        font-size: 20px;
    }

    .login-box input{
        font-size: 15px;
    }

    .login-box button{
        font-size: 15px;
    }

    .remember-me{
        font-size: 14px;
    }
}

/* =========================
   SMALL MOBILE (≤480px)
========================= */
@media (max-width:480px){

    .kiosk-login{
        align-items: flex-start; /* 🔥 FIX */
        padding-top: 40px;
    }

    .login-box{
        max-width: 100%;
        padding: 18px;
        border-radius: 10px;
    }

    .login-box h2{
        font-size: 18px;
    }

    .login-box input{
        padding: 11px;
        font-size: 14px;
    }

    .login-box button{
        padding: 11px;
        font-size: 14px;
    }

    .remember-me{
        font-size: 13px;
    }

    .login-error{
        font-size: 12px;
    }
}


/* TOP */
.topbar {
    height: 70px;
    padding: 0 20px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    color: #fff;

    background: linear-gradient(135deg, #1e293b, #020617);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);

    position: relative;
}

/* LEFT */
.top-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* CENTER (TRUE CENTER) */
.top-center {
    text-align: center;
}

.title {
    font-size: 45px;
    font-weight: 700;
}


/* RIGHT */
.top-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

/* GROUP STORE INFO */
.store-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    margin-right: 10px;
}

/* LINE 1 */
.store-line1 {
     
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* LINE 2 */
.store-line2 {
     
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ID */
.store-id {
    font-size: 14px;
    opacity: 0.6;
}

/* ICON STYLE */
.store-line1 i,
.store-line2 i {
     
    opacity: 0.8;
}

/* ID STYLE */
.store-id {
    font-size: 14px;
    opacity: 0.6;
    margin-left: 5px;
}

.store-address {
     
    opacity: 0.7;
}

/* CLOCK */
#time {
	display:none;
    font-weight: 600;
    font-size: 15px;
}

/* BUTTON STYLE */
/* BIG ACTION BUTTONS */
.top-left .tb-btn {
    width: 50px;
    height: 50px;

    border-radius: 14px;

    font-size: 18px;

    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(6px);

    border: 1px solid rgba(255,255,255,0.08);

    transition: all 0.2s ease;
}
.top-left .tb-btn i {
    font-size: 30px;
	color:#fff;
}
.top-left .tb-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px) scale(1.05);
}

.top-left .tb-btn:active {
    transform: scale(0.95);
}
.tb-btn:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}




/* SETTINGS SPECIAL */
.settings-btn {
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.settings-btn:hover {
    transform: scale(1.15);
}

/* glossy shine effect */


/* FILTER */
.filterbar {
    height:auto;
        flex-wrap:wrap;
        padding:10px;
        position:relative;
        top:0;
}

.abf-chart-box{
    width:100%;
    background:#fff;
    padding:15px;
    border-radius:10px;
}

.abf-charts{
    display:flex;
    gap:20px;
    margin:20px 0;
    justify-content:center;
}


 
/* COUNT CENTER LOOK */

.unit_name{
	font-size: 14px;
    font-weight: 300;
    margin-top: 5px;
    color: #222;
	border: 0px solid #e9e9e9;
	color: #868686;
}

.card-count {
    flex: 1;
    text-align: center;
	margin-left:30px;
    font-size: 30px;
    font-weight: 700;
    color: #868686;
}
.card-actions {
    display: flex;
    gap: 6px;
}
.card button {
    width: 30px;
    padding: 5px;
    margin-top: 0px;

    border: none;
    border-radius: 10px;

    font-size: 16px;
    font-weight: 900;

    cursor: pointer;
    transition: 0.2s ease;
}

/* primary button */
.card .btn-add {
    background: #E7E7E7;
    color: #9E9E9E;
}

.card .btn-add:hover {
    background: #CFCFCF;
}

/* secondary button */
.card .btn-minus {
    background: #f2f2f2;
    color: #333;
}

.card .btn-minus:hover {
    background: #e0e0e0;
}

 



.counter { display:flex; justify-content:center; gap:10px; }

/* FILTER WRAPPER */
.abf-filter {
    background:#FFFFFF;
    
}

/* ROW */
.abf-filter-row {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}



/* LINKS */
.abf-filter-group {
    display:flex;
    gap:4px;
    flex-wrap:wrap;
}

.abf-filter-group a {
    padding:6px 10px;
    text-decoration:none;
    border-radius:6px;
    background:#f1f1f1;
    color:#333;
    font-size:18px;
}

.abf-filter-group a.active {
    background:#2d6cdf;
    color:#fff;
}

/* BOTTOM BAR */


.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.popup-box {
    background: #fff;
    padding: 20px;
    width: 320px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.popup-box h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.popup-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.popup-current {
    font-size: 20px;
    margin-bottom: 10px;
    color: #555;
}

/* COUNTER */
.counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
	 color: #555;
}

.counter button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

.btn-minus {
    background: #eee;
}

.btn-plus {
    background: #2d6cdf;
    color: #fff;
}

/* ACTIONS */
.popup-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-save {
    width: 60px;
    height: 60px;
   background: #ddd;
    border:none;
    padding:10px;
    border-radius:8px;
    cursor:pointer;
    font-size:20px;
	font-weight:600;
}

.btn-cancel {
     width: 60px;
    height: 60px;
    background: #ddd;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
	display:none;
}

/* container */
.quick-add{
    display:flex;
    flex-direction:column; /* 2 rows */
    gap:8px;
}

/* each row */
.quick-add > div{
    display:flex;
    gap:8px;
    justify-content:center;
    flex-wrap:nowrap; /* keep in one line */
}
@media (max-width:480px){
    .quick-add button{
        font-size:12px;
        padding:8px;
    }
}

/* buttons */
.quick-add button{
    flex:1; /* equal width */
    min-width:0;
}
.quick-add button {
	width: 60px;
    height: 60px;
    background:#eee;
    border:none;
    padding:6px 10px;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
}

.quick-add button:hover {
    background:#2d6cdf;
    color:#fff;
}

.abf-search {
	width:250px;
    padding:0px;
    background:#fff;
    border-bottom:0px solid #ddd;
	margin-bottom:5px;
}

#abf-search-input {
    width:100%;
    padding:10px 12px;
    border-radius:8px;
    border:1px solid #ccc;
    font-size:16px;
    outline:none;
    transition:0.2s;
}

#abf-search-input:focus {
    border-color:#2d6cdf;
    box-shadow:0 0 0 2px rgba(45,108,223,0.1);
}


.report-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.report-box {
    width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #111;
    color: #fff;
}

.report-filters button {
    background:#fff;
    padding:10px;
    border:1px solid #ddd;
    border-radius:8px;
}

.report-filters .active {
    background: #2563eb;
    color: #fff;
}

.report-body {
	 width: 400px;
    padding: 15px;

    /* center layout */
    display: flex;
    justify-content: center;
}

/* inner container for list */
.report-inner {
    width: 90%;
    max-width: 500px;

    max-height: 55vh;
    overflow-y: auto;

    padding-right: 10px;
}
.report-category {
    margin-top: 15px;
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
    text-align: left;
	color:#000;
	font-size:22px;
}

.report-row {
    display: flex;
    justify-content: space-between;
	font-size:20px;
    padding: 6px 0;
	color:#000;
    text-align: left;
	margin-left:20px;
	margin-right:20px;
	
}
.report-row:nth-child(even) {
    background: rgba(0,0,0,0.03);
}
.report-footer {
    padding: 10px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
	border: 1px solid #ddd;
	color:#000;
}
.report-email {
    width: 340px;
    
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-family: Arial, sans-serif;
	border: 0px solid #ddd;
}

.report-email h4 {
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
	display:none;
}

/* Email ROW Section  */
/* =========================
   ROW
========================= */
.email-row {
    display: flex;
    align-items: center;
    gap: 10px; /* 🔥 add spacing */
}

/* =========================
   ICON BOX
========================= */
.email-icon {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;

    font-size: 50px;
    width: 60px;
    height: 60px;
    flex-shrink: 0; /* 🔥 prevent shrinking */
}

/* =========================
   SELECT FIELD
========================= */
#emailSelect {
     
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: 0.2s;
}

#emailSelect:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 4px rgba(0,124,186,0.3);
}

/* =========================
   BUTTON
========================= */
#sendNowBtn {
    width: 100px;
    background: #007cba;
    color: #fff;
    padding: 6px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px; /* 🔥 slightly reduced */
    display: none;
}

#sendNowBtn:hover {
    background: #005a8c;
}

/* =========================
   TABLET (≤768px)
========================= */
@media (max-width:768px){

    .email-icon{
        width: 50px;
        height: 50px;
        font-size: 35px;
    }

    #emailSelect{
        font-size: 13px;
        padding: 9px;
    }

    #sendNowBtn{
        width: 90px;
        font-size: 16px;
        padding: 9px;
    }
}

/* =========================
   SMALL MOBILE (≤480px)
========================= */
@media (max-width:480px){

    .email-row{
        flex-direction: column; /* 🔥 stack */
        align-items: stretch;
        gap: 8px;
    }

    .email-icon{
		display:none;
        width: 50px;
        height: 50px;
        font-size: 35px;
    }

    #emailSelect{
		 width: 80%;
        font-size: 13px;
        padding: 9px;
		margin-top:10px;
		margin-bottom:5px;
		margin-left:5px;
    }

    #sendNowBtn{
        width: 90px;
        font-size: 16px;
        padding: 9px;
		margin-bottom:5px;
		margin-left:10px;
    }
}

.pdf-popup{
    position:fixed;
    top:0; left:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.6);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.pdf-box{
    width:90%;
    height:90%;
    background:#fff;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.pdf-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:5px 10px;
    background:#222;
    color:#fff;
	font-size:20px;
}

.pdf-header button{
    background:red;
    border:none;
    color:#fff;
    padding:5px 10px;
    cursor:pointer;
	font-size:16px;
}

.pdf-actions{
    padding:5px;
    border:1px solid #ddd;
    border-radius:8px;
}

.pdf-actions .pdf-btn{
    background:#0073aa;
    padding:10px;
    border:1px solid #ddd;
    border-radius:8px;
}

.pdf-actions .active{
    background:#0073aa;
    color:#fff;
}

.pdf-frame-wrap{
    position:relative;
    height:100%;
    flex:1;
}

/* CENTER EXACT */
.pdf-loader{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    display:none;
    text-align:center;
    z-index:10;
}

/* OPTIONAL OVERLAY */
.pdf-frame-wrap.loading::before{
    content:'';
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(255,255,255,0.8);
    z-index:5;
}

.spinner{
    width:50px;
    height:50px;
    border:5px solid #ddd;
    border-top:5px solid #0073aa;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:auto;
}

@keyframes spin{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}

#pdfFrame{
    width:100%;
    height:100%;
    border:none;
}
/* SWITCH BUTTON */
.view-switch{
    margin-bottom:15px;
}
.view-switch button{
    margin-right:8px;
    padding:6px 12px;
    cursor:pointer;
}


/* GRID */
.grid{
    top:0;
        margin-top:0;
        padding:10px;
}

/* ================= CONTAINER ================= */
#productContainer{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

/* ================= COMMON CARD ================= */
.item-card{
    background:#fff;
    border:1px solid #e9e9e9;
    border-radius:10px;
    padding:5px;
    transition:0.2s;
}

.item-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* IMAGE DEFAULT */
.item-card img{
    border-radius:8px;
    object-fit:cover;
}

/* TEXT */
.card-content{
    flex:1;
    display:flex;
    flex-direction:column;
}

.card-title{
    font-size:18px;
    font-weight:600;
    color:#222;
}

.card-row{
     display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0px 0px;
    margin-top: 1px;

    background: #f9f9f9;
    border-radius: 10px;
}

.card-count{
    font-size:20px;
    font-weight:600;
    color:#666;
}

/* ================= CARD VIEW ================= */
.view-card .item-card{
     width: 170px;
    height:px;
    background: #ffffff;
    border-radius: 16px;
    padding: 5px;
    text-align: center;

    border: 1px solid #e9e9e9;

    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all 0.25s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.view-card .item-card img{
    width: 165px;
    height: 120px;
     object-fit: ;
    border-radius: 12px;
	border: 1px solid #e9e9e9;
}

.view-card .card-content{
    margin-top:5px;
}

/* ================= LIST WITH IMAGE ================= */
.view-list-img .item-card{
    display:flex;
    align-items:center;
    gap:10px;
}

/* IMAGE LEFT */
.view-list-img .item-card img{
    width:60px;
    height:60px;
    flex-shrink:0;
}

/* ================= LIST WITHOUT IMAGE ================= */
.view-list .item-card{
    display:flex;
    align-items:center;
}

.view-list .item-card img{
    display:none;
}

/* ================= COLUMN CONTROL ================= */

/* 1 COLUMN */
.col-1 .item-card{
    width:100%;
}

/* 2 COLUMN */
.col-2 .item-card{
    width:calc(45% - 12px);
}

/* 3 COLUMN */
.col-3 .item-card{
    width:calc(30.33% - 12px);
}

/* 4 COLUMN */
.col-4 .item-card{
    width:calc(22% - 12px);
}

/* ================= COMPACT MODE ================= */
.view-compact .item-card{
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 8px;
}

.view-compact .item-card img{
    width:40px;
    height:40px;
}

.view-compact .card-title{
    font-size:13px;
}

.view-compact .card-count{
    font-size:14px;
}

/* ================= TABLE MODE ================= */
.view-table{
    display:block !important;
}

.view-table .item-card{
    display:grid;
    grid-template-columns: 50px 1fr 80px 60px;
    align-items:center;

    width:100%;
    border-bottom:1px solid #eee;
    border-radius:0;
    box-shadow:none;
}

.view-table .item-card img{
    width:40px;
    height:40px;
}

.view-table .card-content{
    display:contents;
}

.view-table .card-title{
    font-size:14px;
}

.view-table .card-row{
    display:contents;
}

.view-table .card-count{
    text-align:center;
}

/* ================= MOBILE ================= */
@media(max-width:768px){

    .col-2 .item-card,
    .col-3 .item-card{
        width:100%;
    }

    .view-card .item-card{
        width:100%;
        height:auto;
    }
}

/* ================= EXTRA POLISH ================= */

/* remove tap highlight (kiosk) */
*{
    -webkit-tap-highlight-color: transparent;
}

/* smoother hover */
.item-card{
    transition:all 0.2s ease;
}

.hidden{
    display:none !important;
}

/* PANEL */
.settings-panel {
    position: fixed;
    top: 0;
    right: -320px; /* hidden */
    width: 300px;
    height: 100%;

    background: #0f172a;
    color: #fff;

    box-shadow: -5px 0 20px rgba(0,0,0,0.3);

    transition: 0.3s ease;
    z-index: 9999;

    display: flex;
    flex-direction: column;
}

/* ACTIVE (OPEN) */
.settings-panel.active {
    right: 0;
}

/* HEADER */
.settings-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-name {
    font-size: 16px;
    font-weight: 600;
}

.user-id {
    font-size: 12px;
    opacity: 0.6;
}

/* CONTENT */
.settings-content {
    padding: 10px;
}

/* ITEMS */
.settings-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;
    margin-bottom: 5px;

    border-radius: 8px;
    cursor: pointer;

    text-decoration: none;
    color: #fff;
}

.settings-item:hover {
    background: rgba(255,255,255,0.1);
}

/* OVERLAY */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9998;
}

.settings-overlay.active {
    display: block;
}


/* =========================
   GLOBAL RESPONSIVE FIXES
========================= */
*{
    box-sizing: border-box;
}

img{
    max-width:100%;
    height:auto;
}

/* =========================
   TABLET (≤1024px)
========================= */
@media (max-width:1024px){

    .title{
        font-size:28px;
    }

    .topbar{
        height:auto;
        padding:10px;
        
        gap:10px;
        text-align:center;
    }

    .top-left,
    .top-right{
        justify-content:center;
    }

    .filterbar{
        height:auto;
        flex-wrap:wrap;
        padding:10px;
        position:relative;
        top:0;
    }

    .grid{
        top:0;
        margin-top:0;
        padding:10px;
    }

    .col-3 .item-card{
        width:calc(48% - 10px);
    }

    .col-4 .item-card{
        width:calc(48% - 10px);
    }

    .report-box{
        width:90%;
    }

    .pdf-box{
        width:95%;
        height:95%;
    }
}

/* =========================
   MOBILE (≤768px)
========================= */
@media (max-width:768px){

    .title{
        font-size:22px;
    }

    .topbar{
        padding:8px;
		 
        height:auto;
         
        grid-template-columns: 1fr;
        gap:10px;
        text-align:center;
     
    }

    .top-left .tb-btn{
        width:40px;
        height:40px;
    }

    .top-left .tb-btn i{
        font-size:20px;
    }

    .store-block{
        align-items:center;
        text-align:center;
    }

    .filterbar{
        gap:6px;
    }

    .abf-filter-row{
        flex-direction:column;
    }

    .abf-search{
        width:100%;
    }

    #abf-search-input{
        font-size:14px;
    }

    .grid{
        padding:6px;
        gap:8px;
    }

    /* force 2 columns */
    .col-2 .item-card,
    .col-3 .item-card,
    .col-4 .item-card{
        width:calc(50% - 8px);
    }

    .view-card .item-card{
        width:100%;
        height:auto;
    }

    .item-card img{
        height:auto;
    }

    .card-title{
        font-size:14px;
    }

    .card-count{
        font-size:16px;
    }

    .popup-box{
        width:90%;
    }

    .counter button{
        width:50px;
        height:50px;
    }

    .quick-add button{
        width:50px;
        height:50px;
    }

    .report-body{
        width:100%;
    }

    .report-inner{
        width:100%;
    }

    .report-row{
        font-size:16px;
    }

    .pdf-header{
        font-size:16px;
    }
}

/* =========================
   SMALL MOBILE (≤480px)
========================= */
@media (max-width:480px){

    .title{
        font-size:18px;
    }

    .topbar{
        padding:6px;
    }

    .top-left .tb-btn{
        width:36px;
        height:36px;
    }

    .top-left .tb-btn i{
        font-size:18px;
    }

    .grid{
        gap:6px;
    }

    /* force single column */
    .col-2 .item-card,
    .col-3 .item-card,
    .col-4 .item-card{
        width:100%;
    }

    .card-title{
        font-size:13px;
    }

    .card-count{
        font-size:14px;
    }

    .report-row{
        font-size:14px;
    }

    .popup-box{
        width:95%;
    }
}

