.topbar{background:#1565c0;color:#fff;padding:15px;text-align:center}
.screen{display:none;padding:10px}
.screen.active{display:block}
.screen input,
.screen select{
  width:100%;
  padding:8px;
  margin:5px 0;
}
button{width:100%;padding:8px;background:#1565c0;color:#fff;border:none;margin:5px 0}
.nav{display:flex;justify-content:space-around;background:#eee;padding:10px}
#sbp-app{
  max-width:420px;
  margin:auto;
  background:#f4f6f9;
  font-family:Arial;
  position:relative;
  min-height:100vh;
  padding-bottom:80px;
}
.bar{height:15px; background:#1565c0; border-radius:8px; margin-top:10px;}

 /* ================================
   FIXED TOP HEADER BAR
================================ */
#ar-header-bar {
    position: fixed;       /* fixed position on top */
    top: 0;                /* اوپر سے فاصلے */
    left: 0;
    width: 100%;           /* full screen width */
    background: #1565c0;   /* dark blue */
    color: #fff;
    text-align: left;
    padding: 12px 15px;
    z-index: 9999;         /* always on top */
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#ar-header-bar h1 {
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    color: #fff;
}
#ar-header-bar p {
    font-size: 12px;
    margin: 2px 0 0 0;
    font-weight: normal;
}

/* adjust sbp-app content to avoid being hidden under header */
#sbp-app {
    padding-top: 70px; /* roughly header height + spacing */
    }
    /* Hamburger Button */
#hamburger-menu {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

#hamburger-menu span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* Side Navigation */
#side-nav {
    position: fixed;
    top: 0;
    right: -250px; /* hidden by default */
    width: 250px;
    height: 100%;
    background: #1565c0;
    color: #fff;
    padding-top: 70px; /* header height */
    transition: right 0.3s ease;
    z-index: 9998;
}

#side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#side-nav ul li {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
}

#side-nav ul li:hover {
    background: rgba(255,255,255,0.1);
}
/* Hide sub-menu by default */
.sub-menu {
    display: none;
    list-style: none;
    padding-left: 15px;
}

.sub-menu li {
    padding: 10px 15px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
}

/* Show sub-menu when parent has 'open' class */
#side-nav ul li.open > .sub-menu {
    display: block;
}

.sales-filter-bar{
    display:flex;
    gap:10px;
    padding:10px;
    flex-wrap:wrap;
}

.sales-summary{
    display:flex;
    justify-content:space-between;
    background:#1565c0;
    color:#fff;
    padding:10px;
    border-radius:10px;
    margin:10px;
}
#sales-orders-content{
    display:flex;
    flex-direction:column; /* ⭐ main fix */
    gap:10px;
    padding:10px;
}

.sale-block{
    background:#fff;
    width:100%; /* ⭐ full width */
    padding:12px;
    border-radius:12px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.sale-avatar{
    background:#1565c0;
    color:#fff;
    width:40px;
    height:40px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
    margin-right:10px;
}

.sale-info{
    display:flex;
    flex-direction:column;
}

.sale-info h3{
    margin:0;
    font-size:14px;
}

.sale-info p{
    margin:2px 0;
    font-size:12px;
    color:#555;
}

.sale-view{
    cursor:pointer;
    font-size:20px;
}
/* Order Modal Popup */
.order-modal-overlay {
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.order-modal {
    background:#fff;
    padding:20px;
    border-radius:12px;
    max-width:400px;
    width:90%;
    box-shadow:0 5px 15px rgba(0,0,0,0.3);
    position:relative;
    font-family:Arial, sans-serif;
}

.order-modal h3 {
    margin:0 0 10px 0;
    display:flex;
    align-items:center;
    gap:8px;
}

.order-modal h5::before {
    content: "👤";
}

.order-modal p {
    margin:4px 0;
    font-size:14px;
    color:#555;
}

.order-modal hr {
    border:0;
    border-top:1px solid #eee;
    margin:10px 0;
}

/* ===== NEW PRODUCT CARD STYLE IN POPUP ===== */

.order-modal {
    background:#fff;
    padding:15px;
    border-radius:15px;
    max-width:400px;
    width:92%;
    max-height:85vh;              /* IMPORTANT */
    overflow-y:auto;              /* SCROLL ENABLE */
    box-shadow:0 5px 20px rgba(0,0,0,0.3);
}

.order-products{
    margin-top:10px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.product-card{
    background:#f5f5f5;
    padding:10px;
    border-radius:12px;
}

.product-card h4{
    margin:0 0 6px 0;
    font-size:14px;
}

.product-meta{
    display:flex;
    gap:8px;
}

.qty-box{
    background:#2e7d32;
    color:#fff;
    padding:3px 8px;
    border-radius:6px;
    font-size:12px;
}

.price-box{
    background:#1565c0;
    color:#fff;
    padding:3px 8px;
    border-radius:6px;
    font-size:12px;
}

.price-box span{
    color:#ffeb3b;
    font-weight:bold;
}

.order-modal h4 {
    margin:10px 0 0 0;
    text-align:left;
}

.order-modal .close-btn {
    position:absolute;
    top:10px;
    right:10px;
    cursor:pointer;
    font-size:18px;
    color:#d32f2f;
}
/*Top order filter bar */
.sales-segment-bar{
    margin:10px;
    background:#e0e0e0;
    border-radius:12px;
    display:flex;
    overflow:hidden;
}

.segment{
    flex:1;
    text-align:center;
    padding:10px 0;
    font-size:14px;
    cursor:pointer;
}

.segment.active{
    background:#1565c0;
    color:#fff;
}
.custom-input{
    width:100%;
    padding:10px;
    border-radius:10px;
    border:1px solid #ccc;
    margin-bottom:10px;
}

.filter-btn{
    padding:10px 20px;
    background:#1565c0;
    color:#fff;
    border:none;
    border-radius:10px;
    font-weight:bold;
    width:48%;
}

.cancel-btn{
    padding:10px 20px;
    background:#ccc;
    border:none;
    border-radius:10px;
    width:48%;
}
/*ADD MENU BUTTON CSS*/
.sub-menu-container {
    display: flex;
    flex-wrap: wrap; /* Left to right, then next row */
    gap: 15px;
    margin-top: 20px;
}

.sub-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    min-width: 150px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sub-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.icon-bar {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 16px;
}
