/* =====================================================
   GLOBAL STYLES
   ===================================================== */

   body {
    font-family: 'Playfair Display', serif;
     background: var(--bg-main);
     margin: 0;
     color: var(--text-primary);
 }

 a {
     color: var(--text-primary);
     text-decoration: none;
 }

 a:hover {
     color: var(--blue-light);
     text-decoration: none;
 }
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}



 
 /* =====================================================
    LAYOUT
    ===================================================== */
 
   .layout {
    display: flex;
    height: calc(100vh - 60px);
    align-items: stretch;   /* ← ADD THIS */
}

 
   .content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;   /* ← IMPORTANT for flex scrolling */
}

    
 
 
 /* =====================================================
    SIDEBAR
    ===================================================== */
 
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.3);
        border-radius: 4px;
    }
    
 
 .sidebar h2 {
     margin-top: 0;
     font-size: 18px;
     color: #d0e2ff;
 }
 
 .sidebar ul {
     list-style: none;
     padding: 0;
 }
 
 .sidebar li {
     margin: 10px 0;
 }
 
 .sidebar a {
     color: var(--text-muted);
 }
 
 
 /* =====================================================
    TOP BAR
    ===================================================== */
 
 .topbar {
     background: #ffffff;
     border-bottom: 1px solid #e0e6ed;
     padding: 12px 20px;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }
 
 
 /* =====================================================
    CARDS & TABLES
    ===================================================== */
 
 .card {
     background: #ffffff;
     border: 1px solid #e0e6ed;
     border-radius: 4px;
     padding: 16px;
     margin-bottom: 20px;
 }
 
 .table {
     width: 100%;
     border-collapse: collapse;
 }
 
 .table th,
 .table td {
     padding: 10px;
     border-bottom: 1px solid #e0e6ed;
     text-align: left;
 }
 
 
 /* =====================================================
    BUTTONS
    ===================================================== */
 
 .btn {
     display: inline-block;
     padding: 8px 12px;
     border: none;
     background: #1f5fa1;
     color: #ffffff;
     border-radius: 3px;
     cursor: pointer;
 }
 
 .btn.secondary {
     background: #6c757d;
 }
 
 .btn.danger {
     background: #d9534f;
 }
 
 
 /* =====================================================
    FORMS
    ===================================================== */
 
 .form-group {
     margin-bottom: 12px;
 }
 
 .form-group label {
     display: block;
     margin-bottom: 6px;
     font-weight: bold;
 }
 
 .form-group input,
 .form-group select {
     width: 100%;
     padding: 8px;
     border: 1px solid #cbd3dc;
     border-radius: 3px;
 }
 
 
 /* =====================================================
    MESSAGES
    ===================================================== */
 
 .message {
     margin-bottom: 10px;
     color: #d9534f;
 }
 
 
 /* =====================================================
    LOGIN PAGE (GIZMO GALAXY BRANDING)
    ===================================================== */
 
 /* Apply ONLY to login page */
 /* =========================
    LOGIN PAGE – REFINED
    ========================= */
 
 /* ===========================
    LOGIN PAGE – PREMIUM DARK-BLUE GLASS STYLE
    =========================== */

 /* Background for login page only */
 body.login-page {
     background-image: url('../indexbg.png');
     background-size: cover;
     background-position: center;
     background-repeat: no-repeat;
     background-attachment: fixed;
     margin: 0;
     padding: 0;
     height: 100vh;
     overflow: hidden;
 }

 /* Split layout: wallpaper left, login card right */
 .login-container {
     display: flex;
     justify-content: center;
     align-items: center;
     height: 100vh;
     padding: 60px;
     gap: 160px;
     box-sizing: border-box;
 }

 .login-branding {
     flex: 1;
     display: flex;
     align-items: center;
     justify-content: center;
     min-width: 0;
 }

 .branding-content {
     text-align: center;
 }

 .login-mobile-logo {
     display: none;
     max-width: 56px;
     max-height: 56px;
     width: auto;
     height: auto;
     object-fit: contain;
 }

 .login-card-logo {
     display: block;
     width: auto;
     max-width: 56px;
     max-height: 56px;
     height: auto;
     margin: 0 auto 14px;
     object-fit: contain;
 }

 /* ===== PREMIUM LOGIN CARD (DARK GLASS) ===== */
 .login-card {
     width: 420px;
     flex-shrink: 0;
     padding: 48px 36px;
     border-radius: 18px;
     min-height: 480px;

     background: rgba(8, 20, 50, 0.85);
     border: 1px solid rgba(255, 255, 255, 0.06);

     backdrop-filter: blur(14px);
     -webkit-backdrop-filter: blur(14px);

     box-shadow:
         0 10px 40px rgba(0, 0, 0, 0.5),
         inset 0 1px 0 rgba(255, 255, 255, 0.05);

     color: #fff;
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     box-sizing: border-box;
     transform: translate(-5cm, -0.5cm);
 }

 /* Title */
 .login-card h2 {
     text-align: center;
     margin-top: 0;
     margin-bottom: 6px;
     font-weight: 600;
     font-size: 22px;
     color: #ffffff;
     letter-spacing: -0.5px;
 }

 /* Login content wrapper */
 .login-content {
     flex: 1;
     display: flex;
     flex-direction: column;
 }

 /* Login footer */
 .login-footer {
     margin-top: 20px;
     padding-top: 16px;
     border-top: 1px solid rgba(255, 255, 255, 0.08);
     font-size: 12px;
     text-align: center;
     opacity: 0.6;
     color: rgba(255, 255, 255, 0.7);
 }

 /* Subtitle */
 .login-subtitle {
     text-align: center;
     margin: 0 0 20px 0;
     font-size: 13px;
     color: rgba(255, 255, 255, 0.7);
     opacity: 0.7;
     font-weight: 400;
 }

 /* ===== INPUT GROUPS ===== */
 .input-group {
     position: relative;
     margin-bottom: 18px;
 }

 .input-group input {
     width: 100%;
     padding: 12px 14px 12px 42px;
     border-radius: 10px;
     border: 1px solid rgba(255, 255, 255, 0.08);
     background: rgba(0, 0, 0, 0.35);
     color: #fff;
     font-size: 14px;
     outline: none;
     transition: all 0.2s ease;
     box-sizing: border-box;
 }

 .input-group input::placeholder {
     color: rgba(255, 255, 255, 0.4);
 }

 .input-group input:focus {
     border-color: #3b82f6;
     background: rgba(0, 0, 0, 0.5);
     box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
 }

 /* Input Icons */
 .input-icon {
     position: absolute;
     left: 12px;
     top: 50%;
     transform: translateY(-50%);
     font-size: 14px;
     opacity: 0.7;
 }

 /* Password toggle icon */
 .toggle-password {
     position: absolute;
     top: 50%;
     right: 12px;
     transform: translateY(-50%);
     cursor: pointer;
     transition: opacity 0.2s ease;
 }

 .toggle-password:hover {
     opacity: 1;
 }

 /* ===== REMEMBER & FORGOT PASSWORD ROW ===== */
 .login-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     font-size: 13px;
     margin-bottom: 18px;
 }

 /* Remember me checkbox */
 .remember-me {
     display: flex;
     align-items: center;
     gap: 6px;
     cursor: pointer;
     color: rgba(255, 255, 255, 0.7);
     user-select: none;
     transition: color 0.2s ease;
 }

 .remember-me:hover {
     color: rgba(255, 255, 255, 0.9);
 }

 .remember-me input[type="checkbox"] {
     cursor: pointer;
     width: 16px;
     height: 16px;
     accent-color: #3b82f6;
 }

 /* Forgot password link */
 .forgot-password {
     color: rgba(255, 255, 255, 0.7);
     text-decoration: none;
     transition: all 0.2s ease;
     font-weight: 500;
 }

 .forgot-password:hover {
     color: #3b82f6;
     text-decoration: underline;
 }

 /* ===== LOGIN BUTTON (STRONG GRADIENT) ===== */
 .btn-login {
     width: 100%;
     padding: 12px;
     border-radius: 10px;
     border: none;
     background: linear-gradient(135deg, #2563eb, #1e40af);
     color: #fff;
     font-weight: 600;
     font-size: 15px;
     cursor: pointer;
     box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
     transition: all 0.2s ease;
 }

 .btn-login:hover {
     transform: translateY(-1px);
     box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
 }

 .btn-login:active {
     transform: translateY(0);
 }

 /* Error/Success messages */
 body.login-page .message {
     background: rgba(239, 68, 68, 0.15);
     color: #fca5a5;
     padding: 12px 14px;
     border-radius: 8px;
     margin-bottom: 16px;
     text-align: center;
     font-size: 13px;
     border: 1px solid rgba(239, 68, 68, 0.3);
     word-wrap: break-word;
     overflow-wrap: break-word;
 }


 /* ===========================
    LOGIN PAGE – MOBILE RESPONSIVE
    =========================== */
 @media (max-width: 768px) {

    body.login-page {
        background-image: url('../indexbg1.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        padding: 0;
        margin: 0;
    }

    .login-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100vh;
        padding: 20px;
        gap: 30px;
    }

    .login-branding {
        display: none;
    }

    .branding-content {
        display: none;
    }

    .login-card {
        width: 95%;
        max-width: 360px;
        padding: 28px;
        min-height: auto;
        margin: 0 auto;
        transform: translateY(3cm);
        border-radius: 14px;
    }

    .login-content {
        flex: 1;
    }

    .login-card h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .login-subtitle {
        font-size: 12px;
        margin-bottom: 16px;
    }

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

    .input-group input {
        padding: 11px 12px 11px 38px;
        font-size: 13px;
    }

    .login-row {
        font-size: 12px;
        margin-bottom: 14px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .remember-me {
        gap: 4px;
    }

    .remember-me input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }

    .btn-login {
        padding: 11px;
        font-size: 14px;
        border-radius: 8px;
    }

    .login-footer {
        font-size: 11px;
        padding-top: 12px;
        margin-top: 16px;
    }

    body.login-page .message {
        font-size: 12px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {

    .login-card {
        width: 100%;
        max-width: none;
        padding: 20px;
        border-radius: 12px;
    }

    .login-card h2 {
        font-size: 18px;
    }

    .login-subtitle {
        font-size: 11px;
    }

    .input-group input {
        padding: 10px 11px 10px 36px;
        font-size: 12px;
    }

    .input-icon {
        left: 10px;
        font-size: 12px;
    }

    .toggle-password {
        right: 10px;
        width: 16px;
        height: 16px;
    }

    .btn-login {
        padding: 10px;
        font-size: 13px;
    }
}

  
  
 
 
 /* =====================================================
    CORE LAYOUT & SIDEBAR RESPONSIVENESS
    ===================================================== */
 
 @media (max-width: 768px) {
     .layout {
         height: calc(100vh - 60px);
         position: relative;
     }
 
     .sidebar {
         position: fixed;
         top: 0;
         left: 0;
         width: 260px;
         height: 100vh;
         z-index: 10000;
         transform: translateX(-100%);
         transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
         box-shadow: 10px 0 20px rgba(0,0,0,0.2);
     }
 
     .sidebar.open {
         transform: translateX(0);
     }
 
     .sidebar-overlay {
         position: fixed;
         inset: 0;
         background: rgba(0,0,0,0.5);
         z-index: 9999;
         display: none;
         backdrop-filter: blur(2px);
     }
 
     .sidebar-overlay.active {
         display: block;
     }
 
     .content {
         width: 100%;
         flex: none;
     }
 
     /* Mobile Form Stack */
     .form-row, .user-grid, .two-col {
         grid-template-columns: 1fr !important;
         gap: 10px;
     }
 
     /* Table Scroll */
     .table-wrapper, .users-card {
         overflow-x: auto;
         -webkit-overflow-scrolling: touch;
     }
 
     table {
         min-width: 600px;
     }
 }
      
/* =====================================================
    SIDEBAR – GIZMO GALAXY STYLE
    ===================================================== */
 
 /* =====================================================
    SIDEBAR – GLOBAL THEME STYLE
    ===================================================== */

    .sidebar {
        width: 230px;
        background: linear-gradient(180deg, var(--bg-main), rgba(11, 31, 77, 0.8));
        color: var(--text-primary);
        padding: 24px 18px;
        box-shadow: inset -1px 0 0 var(--border-soft);

        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        flex-shrink: 0;
    }
    
 
 /* Sidebar title / brand */
 .sidebar h2 {
   border-bottom:1px solid #e0e6ed; 
 }
 
 /* Menu list */
 .sidebar ul {
     list-style: none;
     padding: 0;
     margin: 0;
 }
 
 /* Menu items */
 .sidebar li {
     margin-bottom: 6px;
 }
 
 /* Links */
 .sidebar a {
     display: block;
     padding: 10px 14px;
     border-radius: 10px;
     color: #eaf5ee;
     font-size: 18px;
     font-weight: 500;
     transition: all 0.2s ease;
 }
 
 /* Hover effect */
 .sidebar a:hover {
     background: rgba(37, 99, 235, 0.15);
     color: var(--text-primary);
     text-decoration: none;
 }
 
 /* Active menu item (if you add class="active") */
 .sidebar a.active {
     background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
     color: var(--text-primary);
     box-shadow: 0 6px 14px rgba(37, 99, 235, 0.4);
 }
 
 /* Optional section divider */
 .sidebar hr {
     border: none;
     height: 1px;
     background: rgba(255, 255, 255, 0.08);
     margin: 15px 0;
 }
 
  
 /* ===========================
    DASHBOARD - CLEAN STYLES
    =========================== */
 
 /* Page title spacing */
 .page-title {
     margin-bottom: 18px;
 }
 
 /* Grid layout for stat cards */
 .dashboard-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
     gap: 18px;
     margin-bottom: 25px;
 }
 
 /* Card look */
 .card {
     background: #ffffff;
     border: 1px solid #d8dee7;
     border-radius: 10px;
     padding: 14px 16px;
     box-shadow: 0 6px 14px rgba(0,0,0,0.04);
     transition: transform .12s ease, box-shadow .12s ease;
 }
 
 /* Hover effect */
 .card:hover {
     transform: translateY(-2px);
     box-shadow: 0 12px 26px rgba(0,0,0,0.08);
 }
 
 /* Card number */
 .card h3 {
     margin: 0;
     font-size: 24px;
     font-weight: 700;
     color: #1f2937;
 }
 
 /* Card label */
 .card p {
     margin-top: 6px;
     font-size: 14px;
     color: #6b7280;
 }
 
 /* Colored indicator bars */
 .card.green  { border-top: 5px solid #22c55e; }
 .card.blue   { border-top: 5px solid #2563eb; }
 .card.orange { border-top: 5px solid #f97316; }
 .card.purple { border-top: 5px solid #8b5cf6; }
 .card.yellow { border-top: 5px solid #eab308; }
 .card.teal  { border-top: 5px solid #14b8a6; }  /* emerald/teal */
 .card.red   { border-top: 5px solid #ef4444; }  /* rose/red */
 .card.dark  { border-top: 5px solid #334155; }  /* slate dark */
 .card.cyan  { border-top: 5px solid #06b6d4; }  /* cyan */
 
 
 
 /* ---- TABLE POLISH ---- */
 
 .table thead th {
     background:white;
     font-weight:600;
 }
 
 .table tbody tr:hover {
     background:#f3f4f6;
 }
 
 /* ---------- TOPBAR STYLES ---------- */
 
 .topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.topbar-left,
.topbar-right{
    flex-shrink:0;
}

.topbar-center{
    flex:1;
    text-align:center;
}

 
 .fullscreen-btn {
     background:#22c55e;
     border:none;
     padding:7px 12px;
     border-radius:6px;
     color:#ffffff;
     cursor:pointer;
     font-size:13px;
 }
 
 .fullscreen-btn:hover {
     background:#16a34a;
 }
 
 /* ===========================
    TOP BAR (Header)
    =========================== */
 
 .topbar{
     background: linear-gradient(180deg, var(--bg-main), rgba(11, 31, 77, 0.8));
     border-bottom: 1px solid var(--border-soft);
     padding:12px 20px;
     display:flex;
     justify-content:space-between;
     align-items:center;
     position:sticky;
     top:0;
     z-index:100;
 }
 
 .topbar-left{
     font-size:15px;
     color:white;
 }
 
 .topbar-left strong{
     color:white;
 }
 
 .topbar-right{
     display:flex;
     gap:10px;
 }
 .topbar-center{
    font-size:16px;
    color: var(--text-muted);
    text-align:center;
    flex:1;
}

 
 /* Fullscreen Button */
 .fullscreen-btn{
     background:green;        /* Gizmo Galaxy green */
     border:none;
     padding:6px 12px;
     border-radius:6px;
     color:white;
     cursor:pointer;
     font-size:16px;
 }
 
 .fullscreen-btn:hover{
     background:#16a34a;
 }
 
 /* ============================
    POS FULL PAGE STYLE
    ============================ */
 
 .pos-wrapper{
     padding:15px;
     width: 100%; 
 }
 .pos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .pos-grid {
        grid-template-columns: 1.35fr 0.9fr;
    }
}

.pos-items,
.pos-summary {
    width: 100%;
    overflow: hidden;
}

.pos-item-card {
    word-wrap: break-word;
}

.pos-field input,
.pos-field select,
.pos-field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dropdown-list {
    width: 100%;
    left: 0;
}

@media (max-width: 768px) {
    .pos-wrapper {
        padding: 10px;
    }

    .pos-title {
        font-size: 18px;
    }
}

/* IMEI field container */
.imei-field {
    position: relative;
    width: 100%;
}

/* IMEI input */
.imei-field input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cfd6dd;
    box-sizing: border-box;
}

/* Dropdown suggestions */
.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    z-index: 9999;
}

/* Each suggestion */
.dropdown-list div {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f1f1f1;
}

/* Hover effect */
.dropdown-list div:hover {
    background: #f5fff8;
}

/* Prevent long IMEI breaking layout */
.dropdown-list div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
 
 .pos-title{
     margin-bottom:10px;
 }
 
 /* green theme */
 :root{
     --green:#2e8b57;
     --light:#f5fff8;
 }
 
 /* grid layout */
 .pos-grid{
     display:grid;
     grid-template-columns: 1.35fr 0.9fr;
     gap:20px;
 }
 
 .pos-items,.pos-summary{
     background:white;
     border-radius:12px;
     padding:16px;
     box-shadow:0 10px 25px rgba(0,0,0,.08);
 }
 
 .pos-item-card{
     border:1px solid #e4e9ef;
     padding:12px;
     margin-bottom:10px;
     border-radius:10px;
     background:#f8fbf9;
 }
 
 .pos-remove{
     text-align:right;
     margin-bottom:6px;
 }
 
 .pos-field label{
     font-size:13px;
     font-weight:600;
     margin-bottom:4px;
     display:block;
 }
 
 .pos-field select,
 .pos-field input,
 .pos-field textarea{
     width:100%;
     padding:9px;
     border-radius:8px;
     border:1px solid #cfd6dd;
 }
 
 .pos-summary h2{
     margin-top:0;
     font-size:22px;
     color:#2e8b57;
 }
 
 /* Payment Buttons */
 .pay-buttons{
     display:flex;
     gap:10px;
 }
 
 .pay-btn{
     flex:1;
     padding:10px;
     border-radius:10px;
     border:2px solid #2e8b57;
     background:white;
     cursor:pointer;
     font-weight:600;
 }
 
 .pay-btn.active{
     background:#2e8b57;
     color:white;
 }
 
 /* Submit button */
 .pos-summary .submit{
     width:100%;
     background:linear-gradient(135deg,#2e8b57,#3cb371);
     color:white;
     font-size:16px;
 }
 
 /* IMEI logic controls */
 .imei-field{ display:block; }
 .qty-field{ display:block; }
 .dropdown-list{
     position:absolute;
     background:white;
     border:1px solid #ccc;
     width:100%;
     max-height:180px;
     overflow-y:auto;
     z-index:9999;
 }
 
 .dropdown-list div{
     padding:8px;
     cursor:pointer;
 }
 
 .dropdown-list div:hover{
     background:#f2f2f2;
 }
 .manager-select{
     width:100%;
     position:relative;
 }
 
 #managerSearch{
     width:100%;
     padding:8px;
     margin-bottom:5px;
     border-radius:6px;
     border:1px solid #ccc;
 }
 
 #managerSelect{
     width:100%;
     padding:6px;
     border-radius:6px;
 }
 
 
 /* ==================================
    MOBILE
    ================================== */
 @media(max-width:900px){
     .pos-grid{
         grid-template-columns:1fr;
     }
 }
 /* ===== POS FULL WIDTH FIX ===== */
 body.pos-page .content{
     max-width:none;
     width:100%;
     padding:15px 25px;
 }
 
 #loader-overlay{
     position:fixed;
     inset:0;
     background:rgba(0,0,0,.45);
     display:none;
     align-items:center;
     justify-content:center;
     z-index:9999;
 }
 
 .loader-box{
     background:#fff;
     padding:18px 28px;
     border-radius:10px;
     font-weight:600;
     display:flex;
     gap:10px;
     align-items:center;
 }
 
 .spinner{
     width:18px;
     height:18px;
     border:3px solid #2e8b57;
     border-top-color:transparent;
     border-radius:50%;
     animation:spin 1s linear infinite;
 }
 
 @keyframes spin{to{transform:rotate(360deg)}}
 
 .users-card{
     width: 100%;
 }
 .users-header{
     display:flex;
     justify-content:space-between;
     align-items:center;
     margin-bottom:15px;
 }
 
 .user-filters{
     display:flex;
     gap:10px;
     margin-bottom:15px;
     flex-wrap:wrap;
 }
 
 .user-filters input,
 .user-filters select{
     padding:7px 10px;
     border:1px solid #cbd3dc;
     border-radius:6px;
 }
 
 /* Table hover + stripe */
 .users-table tbody tr:nth-child(even){
     background:#f9fbfc;
 }
 .users-table tbody tr:hover{
     background:#eef5ff;
 }
 
 /* Grey small text */
 .muted{
     color:#6c757d;
 }
 
 /* Role badges */
 .role-chip{
     padding:4px 10px;
     border-radius:999px;
     color:#fff;
     font-size:12px;
     font-weight:600;
 }
 .role-chip.admin{
     background:#c0392b;
 }
 .role-chip.manager{
     background:#1f618d;
 }
 .role-chip.agent{
     background:#27ae60;
 }
 
 /* Status tags */
 .status-badge{
     padding:4px 9px;
     border-radius:8px;
     font-size:12px;
     font-weight:600;
 }
 .status-badge.active{
     background:#e8f8ef;
     color:#1e7e34;
 }
 .status-badge.inactive{
     background:#fdecea;
     color:#b52b27;
 }
 .card.user-create-card{
     width: 100%;
 }
 
 .user-create-card h3{
     margin-top:0;
     color:#1f5fa1;
 }
 
 .form-block{
     border:1px solid #e3e7ec;
     padding:12px;
     border-radius:10px;
     margin-bottom:12px;
     background:#f9fbfc;
 }
 
 .two-col{
     display:grid;
     grid-template-columns:1fr 1fr;
     gap:12px;
 }
 
 .form-actions{
     display:flex;
     gap:10px;
     margin-top:10px;
 }
 /* ---------- USER EDIT FORM STYLING ---------- */
 
 .user-form {
     width: 100%;
     margin: 0 auto;
 }
 
 .user-form h2 {
     margin-bottom: 10px;
 }
 
 /* 2-column form layout (desktop only) */
 .user-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 14px 20px;
 }
 
 .user-grid .full {
     grid-column: 1 / 3;
 }
 
 .user-form .form-group label {
     font-weight: 600;
     margin-bottom: 4px;
     display: block;
 }
 
 .user-form .form-group input,
 .user-form .form-group select {
     width: 100%;
     padding: 8px 10px;
     border-radius: 6px;
     border: 1px solid #cbd3dc;
 }
 
 /* Buttons row */
 .user-form .actions {
     margin-top: 12px;
     display: flex;
     gap: 10px;
 }
 
 /* success + error */
 .message.success {
     color: #155724;
     background:#d4edda;
     border:1px solid #c3e6cb;
     padding:8px;
     border-radius:6px;
 }
 
 /* Mobile fallback */
 @media (max-width: 768px) {
     .user-grid {
         grid-template-columns: 1fr;
     }
 
     .user-grid .full {
         grid-column: 1 / 2;
     }
 }
 
 /* Sales Register Layout */
 .sales-register{
     width: 100%;
 }
 .sales-register .card-header h2 {
     margin: 0 0 10px 0;
 }
 
 .filter-bar {
     display: flex;
     flex-wrap: wrap;
     gap: 12px;
     background: #f7faf8;
     border: 1px solid #e0e6e2;
     padding: 12px;
     border-radius: 8px;
     margin-bottom: 12px;
 }
 
 .filter-item {
     display: flex;
     flex-direction: column;
     min-width: 160px;
 }
 
 .filter-bar label {
     font-size: 12px;
     color: #445;
     margin-bottom: 2px;
 }
 
 .filter-actions {
     align-self: flex-end;
 }
 
 /* Table wrapper */
 .table-wrapper {
     overflow-x: auto;
 }
 
 /* Pretty table */
 .table.pretty th {
     background: #ecf5f0;
     color: #234;
     font-weight: bold;
 }
 
 .table.pretty tr:hover {
     background: #f5fbf7;
 }
 
 /* Badges */
 .badge {
     padding: 4px 10px;
     border-radius: 12px;
     font-size: 12px;
     font-weight: bold;
 }
 
 /* Sale Type Colors */
 .badge.type-cash {
     background: #dbf7e4;
     color: #227a3b;
 }
 
 .badge.type-credit {
     background: #fff3d4;
     color: #9d6a00;
 }
 
 /* Status Colors */
 .badge.status-approved {
     background: #d6f5ff;
     color: #0077a7;
 }
 
 .badge.status-pending {
     background: #fde8cc;
     color: #9d5a00;
 }
 
 .badge.status-rejected {
     background: #ffd6d6;
     color: #a10000;
 }
 
 
 /* Commission Page */
 .commission-card{
     width: 100%;
 }
 .commission-card .card-header h2 {
     margin-top: 0;
 }
 
 /* summary pill bar */
 .commission-summary {
     display: flex;
     gap: 30px;
     background: #f6faf7;
     border: 1px solid #e2ece6;
     padding: 10px 12px;
     border-radius: 10px;
     margin-bottom: 12px;
 }
 
 .tag {
     background: #eaf1ed;
     padding: 4px 8px;
     border-radius: 10px;
     font-size: 12px;
 }
 
 .tag-green {
     background: #dff5e5;
     color: #1d6b37;
     font-weight: bold;
 }
 
 /* table look */
 .table.pretty th {
     background: #ecf5f0;
 }
 
 .table.pretty tr:hover {
     background: #f5fbf7;
 }
 
 /* Re-use badges so UI stays consistent */
 .badge {
     padding: 4px 10px;
     border-radius: 12px;
     font-size: 12px;
     font-weight: bold;
 }
 
 /* green-ish for commission */
 .badge.status-approved {
     background: #d6f5ff;
     color: #0077a7;
 }
 
 .badge.type-cash {
     background: #dbf7e4;
     color: #227a3b;
 }
 
 /* ================================
    STORES LIST
    ================================ */
 
 .stores-card {
     background:#ffffff;
     width: 100%;
     border:1px solid #e0e6ed;
     border-radius:10px;
     padding:18px;
     margin-bottom:20px;
     box-shadow:0 4px 10px rgba(0,0,0,.05);
 }
 
 /* Header row */
 .stores-header {
     display:flex;
     justify-content:space-between;
     align-items:center;
     margin-bottom:18px;
 }
 
 .stores-header h2 {
     margin:0;
 }
 
 /* Status badges */
 .store-status {
     padding:4px 10px;
     font-size:12px;
     font-weight:600;
     border-radius:20px;
 }
 
 .store-status.active {
     background:#e6ffed;
     color:#1f7a3d;
 }
 
 .store-status.inactive {
     background:#ffecec;
     color:#a11f1f;
 }
 
 /* Assigned users pill */
 .user-count-pill {
     background:#eef2ff;
     color:#1f3d8b;
     padding:4px 10px;
     border-radius:20px;
     font-size:12px;
     font-weight:600;
 }
 
 /* Right-aligned actions */
 .table .actions {
     text-align:right;
     white-space:nowrap;
 }
 
 /* Hover highlight */
 .table tr:hover {
     background:#f8fafc;
 }
 
 
 /* Mobile support */
 @media(max-width:768px){
     .stores-header{
         flex-direction:column;
         gap:10px;
         align-items:flex-start;
     }
 }
 
 /* ================================
    NICE FORM LAYOUT
    ================================ */
 
 .nice-form {
     display:flex;
     flex-direction:column;
     gap:16px;
 }
 
 .form-row {
     display:grid;
     grid-template-columns:1fr 1fr;
     gap:16px;
 }
 
 .checkbox {
     display:flex;
     align-items:center;
     gap:8px;
 }
 
 .form-actions {
     margin-top:8px;
     display:flex;
     gap:10px;
 }
 
 /* smaller screens → stack */
 @media(max-width:768px){
     .form-row{
         grid-template-columns:1fr;
     }
 }
 
 /* ========= Store View Styling ========= */
 
 .store-info-bar{
     display:flex;
     gap:10px;
     margin-bottom:12px;
     flex-wrap:wrap;
 }
 
 .pill{
     padding:6px 12px;
     border-radius:20px;
     background:#eef2f5;
     font-size:13px;
 }
 
 .pill-green{ background:#e7f7ec; color:#237a44; }
 .pill-red{ background:#fde8e8; color:#b91c1c; }
 
 .grid-2{
     display:grid;
     grid-template-columns:1fr 1fr;
     gap:16px;
     margin-top:16px;
 }
 
 .split-values{
     display:flex;
     justify-content:space-between;
     margin-top:6px;
 }
 
 .split-values .label{ color:#555; }
 .split-values .value{ font-size:18px; font-weight:600; }
 
 .compact td, .compact th{
     padding:8px 10px;
 }
 
 .trend-row{
     display:flex;
     justify-content:space-between;
     padding:6px 0;
     border-bottom:1px solid #eee;
 }
 
 .highlight-text{
     font-size:16px;
     line-height:1.6;
 }
 
 @media(max-width:768px){
     .grid-2{
         grid-template-columns:1fr;
     }
 }
 
 /* ========= Products========= */
 .products-card {
     background: #ffffff;
     width: 100%;
     border: 1px solid #e0e6ed;
     border-radius: 10px;
     padding: 18px;
 }
 
 .products-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 14px;
 }
 
 .products-table td {
     vertical-align: middle;
 }
 
 /* IMEI / Qty Chip */
 .role-chip.imei {
     background: #e6f5ff;
     color: #1161a8;
     padding: 4px 10px;
     border-radius: 14px;
     font-size: 12px;
 }
 
 .role-chip.qty {
     background: #ecf7ec;
     color: #1a7a32;
     padding: 4px 10px;
     border-radius: 14px;
     font-size: 12px;
 }
 .products-card {
     background: #fff;
     border: 1px solid #e0e6ed;
     border-radius: 10px;
     padding: 18px;
     margin-bottom: 15px;
 }
 
 .products-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 14px;
 }
 
 .product-form .form-row {
     display: grid;
     grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
     gap: 16px;
     margin-bottom: 12px;
 }
 
 .checkbox-group {
     display: flex;
     align-items: center;
 }
 
 .checkbox-group label {
     font-weight: normal;
 }
 
 .form-actions {
     margin-top: 14px;
 }
 
 .products-card {
     background: #fff;
     border: 1px solid #e0e6ed;
     border-radius: 10px;
     padding: 18px;
     margin-bottom: 15px;
 }
 
 .products-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 14px;
 }
 
 .product-form .form-row {
     display: grid;
     grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
     gap: 16px;
     margin-bottom: 12px;
 }
 
 .checkbox-group {
     display: flex;
     align-items: center;
 }
 
 .checkbox-group label {
     font-weight: normal;
 }
 
 .form-actions {
     margin-top: 14px;
 }
 
 
 .muted{
     color:#777;
     font-size:12px;
 }
 /* ===== STOCK — ADD PAGE ===== */
 
 .users-cards {
     background:#fff;
     width: 100%;
     border-radius:14px;
     padding:18px 20px;
     box-shadow:0 10px 25px rgba(0,0,0,0.08);
     margin-bottom:25px;
 }
 
 .users-header {
     display:flex;
     justify-content:space-between;
     align-items:center;
     margin-bottom:18px;
 }
 
 .users-header h2{
     margin:0;
 }
 
 .user-form {
     margin-top:10px;
 }
 
 /* Form Grid */
 .form-row{
     display:grid;
     grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
     gap:16px;
 }
 
 /* Form group + labels */
 .form-group{
     display:flex;
     flex-direction:column;
     margin-bottom:12px;
 }
 
 .form-group label{
     font-weight:600;
     margin-bottom:6px;
 }
 
 /* Inputs */
 .form-group input,
 .form-group select,
 .form-group textarea{
     padding:10px;
     border:1px solid #ddd;
     border-radius:10px;
     font-size:14px;
     width:100%;
     outline:none;
 }
 
 .form-group textarea{
     resize:vertical;
 }
 
 /* Focus */
 .form-group input:focus,
 .form-group select:focus,
 .form-group textarea:focus{
     border-color:#2e8b57;
     box-shadow:0 0 0 2px rgba(46,139,87,0.2);
 }
 
 /* IMEI counter text */
 .muted{
     color:#777;
     font-size:12px;
     margin-top:4px;
 }
 
 /* Actions */
 .form-actions{
     margin-top:12px;
 }
 
 /* Buttons matching your theme */
 .btn{
     padding:10px 16px;
     border-radius:10px;
     border:none;
     cursor:pointer;
     text-decoration:none;
     font-weight:600;
 }
 
 .btn.secondary{
     background:#e9eef0;
     color:#333;
 }
 
 .btn:hover{
     opacity:.92;
 }
 
 /* Error message styling */
 .message{
     background:#ffefef;
     color:#8b0000;
     padding:10px;
     border-radius:10px;
     margin-bottom:10px;
 }
 
 /* ===== AGED STOCK TABLE ===== */
 
 .aged-table th{
     font-weight:600;
 }
 
 /* Qty pill */
 .qty-pill{
     background:#e9eef0;
     padding:6px 12px;
     border-radius:20px;
     font-weight:600;
 }
 
 /* Age Badges */
 .age-badge{
     padding:7px 14px;
     border-radius:20px;
     font-weight:700;
     color:#fff;
 }
 
 .age-badge.ok{
     background:#2e8b57;   /* green */
 }
 
 .age-badge.warn{
     background:#e6a100;   /* amber */
 }
 
 .age-badge.danger{
     background:#b22222;   /* red */
 }
 
 /* Card wrapper reused */
 .users-card{
     background:#fff;
     border-radius:14px;
     padding:18px 20px;
     box-shadow:0 10px 25px rgba(0,0,0,0.08);
     margin-bottom:25px;
 }
 
 .users-header{
     display:flex;
     justify-content:space-between;
     align-items:center;
     margin-bottom:14px;
 }
 
 /* ===== STOCK DEDUCTION ===== */
 
 .users-card{
     background:#fff;
     border-radius:14px;
     padding:18px 20px;
     box-shadow:0 10px 25px rgba(0,0,0,0.08);
     margin-bottom:25px;
 }
 
 .users-header{
     display:flex;
     justify-content:space-between;
     align-items:center;
     margin-bottom:14px;
 }
 
 .user-form .form-row{
     display:flex;
     gap:16px;
     flex-wrap:wrap;
 }
 
 .user-form .form-group{
     flex:1;
 }
 
 .user-form input,
 .user-form select,
 .user-form textarea{
     width:100%;
 }
 
 .form-actions{
     margin-top:12px;
 }
 
 /* ===== STOCK LIST TABLE ===== */
 
 .qty-pill{
     background:#e8f2ff;
     color:#1f5fa1;
     padding:5px 10px;
     border-radius:30px;
     font-weight:600;
 }
 
 .qty-pill.low{
     background:#ffe8e8;
     color:#b00000;
 }
 
 .role-chip.agent{
     background:#2ecc71;
 }
 
 .role-chip.manager{
     background:#3498db;
 }
 /* Stock transfer styling */
 
 .hint{
     color:#6c757d;
     font-size:12px;
 }
 
 .users-card .form-row{
     display:flex;
     gap:20px;
     flex-wrap:wrap;
 }
 
 .users-card textarea{
     width:100%;
     border-radius:8px;
 }
 
 .users-card select,
 .users-card input{
     border-radius:8px;
 }
 
 .imei-group{
     margin-top:10px;
 }
 
 /* ===== CREDIT APPROVALS LAYOUT ===== */
 
 .users-card{
     width: 100%;
     background:#ffffff;
     border:1px solid #e0e6ed;
     border-radius:10px;
     padding:18px;
     box-shadow:0 5px 14px rgba(0,0,0,.05);
     margin-bottom:22px;
 }
 
 .users-header{
     display:flex;
     align-items:center;
     justify-content:space-between;
     margin-bottom:14px;
 }
 
 .users-header h2{
     margin:0;
 }
 
 /* ===== TABLE STYLING ===== */
 
 .users-table{
     width:100%;
     border-collapse:collapse;
 }
 
 .users-table th{
     background:#f7f9fc;
     padding:12px;
     text-align:left;
     border-bottom:1px solid #e3e6ef;
     font-weight:600;
 }
 
 .users-table td{
     padding:10px 12px;
     border-bottom:1px solid #eff2f7;
 }
 
 /* zebra rows like other pages */
 .users-table tbody tr:nth-child(even){
     background:#fafbfd;
 }
 
 /* ===== STATUS BADGE ===== */
 
 .status-badge{
     border-radius:12px;
     padding:4px 10px;
     font-size:12px;
     font-weight:600;
 }
 
 .status-badge.pending{
     background:#fff3cd;
     color:#8a6d1a;
     border:1px solid #e7d9a8;
 }
 
 /* ===== BUTTONS ===== */
 
 .btn{
     padding:7px 12px;
     border-radius:8px;
 }
 
 .btn.approve-btn{
     background:#2e8b57;
     color:#fff;
 }
 
 .btn.approve-btn:hover{
     opacity:.9;
 }
 
 .btn.danger{
     background:#d9534f;
     color:#fff;
 }
 
 /* ===== CUSTOMER INFO ROW ===== */
 
 .customer-row{
     background:#f8fafb;
     font-size:13px;
     color:#444;
 }
 
 .customer-row td{
     padding-top:6px;
     padding-bottom:6px;
 }
 
 /* =========================================
    MOBILE FIX FOR POS LAYOUT (FINAL)
    ========================================= */
 
  
   /* ===========================
    HEADER + MOBILE MENU + PWA
    =========================== */
 
 .menu-btn {
     display: none;
     font-size: 22px;
     background: none;
     border: none;
     color: #fff;
     cursor: pointer;
   }
   
   .install-btn {
     background: none;
     border: none;
     font-size: 20px;
     cursor: pointer;
     margin-right: 8px;
   }
   
   /* Mobile header layout */
   @media (max-width: 768px) {
   
     .topbar {
       display: flex;
       align-items: center;
       justify-content: space-between;
     }
   
     .topbar-left h2 {
       font-size: 16px;
       white-space: nowrap;
     }
   
     .topbar-center {
       display: none;
     }
   
     .menu-btn {
       display: inline-block;
     }
   
     .fullscreen-btn {
       display: none;
     }
   
   
   }
   /* ================================
   MOBILE SIDEBAR – FIXED SYSTEM
   ================================ */

@media (max-width: 768px) {

    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: 260px;
      height: 100%;
      background: linear-gradient(180deg, #0f3d2e, #0b2f23);
      z-index: 10000;
  
      transform: translateX(-100%);
      transition: transform 0.3s ease;
  
      pointer-events: none;
    }
  
    .sidebar.open {
      transform: translateX(0);
      pointer-events: auto;
    }
  
    .sidebar-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      z-index: 9999;
      display: none;
    }
  
    .sidebar-overlay.active {
      display: block;
    }
  
  }
  
  @media (max-width: 768px) {

    .layout,
    .content,
    .pos-wrapper,
    .users-card,
    .stores-card,
    .products-card,
    .commission-card {
      max-width: 100%;
      overflow-x: hidden;
    }
  
    table {
      width: 100%;
      display: block;
      overflow-x: auto;
    }
  
    * {
      box-sizing: border-box;
    }
  }

  .ios-install-hint{
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f3d2e;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 99999;
}

  @media (max-width: 768px) {

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }

  .dashboard-grid .card {
    aspect-ratio: 1 / 1;      /* makes square */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px;
  }

  .dashboard-grid .card h3 {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .dashboard-grid .card p {
    font-size: 18px;
    margin: 0;
  }

}

.reverse-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 20000;
    justify-content: center;
    align-items: center;
}

.reverse-modal-card {
    background: #fff;
    padding: 20px;
    width: 320px;
    max-width: 90%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: popIn 0.2s ease-out;
}

.reverse-modal-card input {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.reverse-btn{
    margin-top: 15px;   /* pushes it down from Submit button */
}


/* =====================================================
   ADMIN UI/UX REFRESH - PREMIUM BLUE SYSTEM
   ===================================================== */
:root {
    --bg-main: #0a1628;
    --bg-surface: #0f1f3d;
    --bg-glass: rgba(15, 31, 61, 0.75);

    --blue-primary: #3b82f6;
    --blue-accent: #2563eb;
    --blue-glow: rgba(59,130,246,0.4);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #94a3b8;

    --border-soft: rgba(255,255,255,0.08);
}

body {
    background: radial-gradient(circle at top right, rgba(59,130,246,0.16), transparent 40%), var(--bg-main);
    color: var(--text-primary);
}

.content {
    padding: 26px;
    background: var(--bg-main);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--text-primary);
}

.card {
    background: var(--bg-glass);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.15);
}

.metric-card {
    padding: 24px;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.metric-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    margin-top: 20px;
}

.chart-wrap {
    height: 320px;
    position: relative;
}

.chart-wrap canvas {
    background: transparent !important;
}

.sidebar {
    background: #071a3a;
}

.sidebar a {
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar a:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
}

.sidebar a.active {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent));
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--blue-glow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent));
    box-shadow: 0 6px 20px var(--blue-glow);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--blue-glow);
}

.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-soft);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-primary);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-soft);
}

.table td {
    color: var(--text-secondary);
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.table tbody tr {
    transition: all 0.15s ease;
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .content {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

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

    .metric-card {
        padding: 16px;
    }

    .metric-value {
        font-size: 22px;
    }

    .dashboard-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   ADMIN DASHBOARD SAAS REDESIGN
   ===================================================== */
body {
    margin: 0;
    background: #f8fafc;
    color: #111827;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.app-layout {
    display: flex;
    height: 100vh;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    min-width: 0;
}

.sidebar-brand-logo {
    height: 36px;
    width: auto;
    max-height: 40px;
    max-width: 42px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.sidebar-brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: #0f3d2e;
    min-width: 0;
    word-break: break-word;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 4px 8px 6px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
}

.sidebar a.active {
    background: #2563eb;
    color: #ffffff;
}

.sidebar a:hover {
    background: #f3f4f6;
}

.topbar {
    height: 60px;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid #e5e7eb;
    position: static;
}

.topbar .title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.topbar .right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-content {
    background: #f8fafc;
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.dashboard-header {
    margin-bottom: 20px;
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.page-subtitle {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

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

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.metric-title {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 6px;
    margin-bottom: 0;
    color: #111827;
}

.metric-change {
    font-size: 12px;
    margin-top: 6px;
}

.metric-change.positive {
    color: #16a34a;
}

.metric-change.negative {
    color: #dc2626;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}

.chart-wrap {
    height: 310px;
}

.shop-chart-wrap {
    height: 190px;
}

.products-chart-wrap {
    height: 280px;
    margin-bottom: 20px;
}

.products-title {
    margin-top: 14px;
}

.product-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: #374151;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 6px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 6px;
}

.table-card {
    margin-top: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-title {
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    font-size: 12px;
    color: #6b7280;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

td {
    padding: 12px 0;
    font-size: 14px;
    color: #111827;
    border-bottom: 1px solid #f1f5f9;
}

.fullscreen-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .sidebar {
        width: 210px;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   ADMIN DASHBOARD - APPLE STYLE WHITE/BLUE/BLACK
   ===================================================== */
:root {
    --blue-primary: #3b82f6;
    --blue-accent: #2563eb;
    --bg-main: #f8fbff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-soft: #e6efff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8fbff;
    color: #0f172a;
}

.main-content {
    background: var(--bg-main);
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--border-soft);
}

.sidebar a.active {
    background: var(--blue-primary);
    color: #ffffff;
}

.sidebar a:hover {
    background: rgba(59,130,246,0.08);
}

.sidebar-group-footer {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

.card,
.chart-card,
.table-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 12px rgba(37,99,235,0.05);
}

.metric-title {
    font-size: 13px;
    color: var(--text-muted);
}

.metric-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
}

.chart-wrap canvas,
.shop-chart-wrap canvas,
.products-chart-wrap canvas {
    background: transparent !important;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(37,99,235,0.3);
}

tr:hover {
    background: rgba(59,130,246,0.05);
}

th {
    color: var(--text-muted);
}

/* Focused admin dashboard polish */
.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: none;
}

.admin-dashboard .dashboard-header {
    margin-bottom: 0;
}

.admin-dashboard .dashboard-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-dashboard .metric-change {
    letter-spacing: 0.01em;
}

.admin-dashboard .dashboard-charts {
    align-items: start;
}

.admin-dashboard .dashboard-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.admin-dashboard .chart-card,
.admin-dashboard .table-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d8dee7;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.04);
}

.admin-dashboard .table {
    margin-top: 4px;
}

.admin-dashboard .table td,
.admin-dashboard .table th {
    white-space: nowrap;
}

.admin-dashboard .top-products-list {
    margin-top: 10px;
}

.admin-dashboard .chart-wrap {
    height: 380px;
}

.admin-dashboard .shop-chart-wrap {
    height: 240px;
}

.admin-dashboard .products-chart-wrap {
    height: 360px;
}

@media (max-width: 1024px) {
    .admin-dashboard .dashboard-tables {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .admin-dashboard .chart-wrap {
        height: 280px;
    }

    .admin-dashboard .shop-chart-wrap {
        height: 220px;
    }

    .admin-dashboard .products-chart-wrap {
        height: 260px;
    }
}

@media (max-width: 640px) {
    .admin-dashboard .main-content,
    .main-content {
        padding: 16px;
    }

    .admin-dashboard .dashboard-tables {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .admin-dashboard .table {
        display: block;
        overflow-x: auto;
    }

    .admin-dashboard .chart-card,
    .admin-dashboard .table-card {
        padding: 15px;
    }
}

/* =====================================================
   GLOBAL VISIBILITY FIXES - Input & Table Colors
   ===================================================== */

/* Fix input fields - ensure text is visible */
input,
select,
textarea {
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid #e6efff;
}

input:focus,
select:focus,
textarea:focus {
    color: #0f172a !important;
    background: #ffffff !important;
    border-color: #3b82f6;
}

/* Fix placeholders - ensure they're visible */
::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Fix select dropdown options - text must be dark */
select option {
    color: #0f172a;
    background: #ffffff;
}

/* Fix table text visibility */
table {
    color: #0f172a;
}

table td {
    color: #0f172a !important;
    background: transparent !important;
}

table th {
    color: #64748b;
    background: transparent !important;
}

/* Ensure rows visible without hover */
tr {
    background: transparent !important;
}

tr:hover {
    background: rgba(59, 130, 246, 0.05) !important;
}

/* Override any dark theme applied to forms */
.form-group input,
.form-group select,
.form-group textarea {
    color: #0f172a !important;
    background: #ffffff !important;
    border-color: #e6efff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8 !important;
}

/* Override dashboard form inputs */
.filter-select,
.dashboard-filters input,
.dashboard-filters select {
    color: #0f172a !important;
    background: #ffffff !important;
    border-color: #e6efff;
}

/* Override POS form inputs */
.pos-field input,
.pos-field select,
.pos-field textarea {
    color: #0f172a !important;
    background: #ffffff !important;
    border-color: #cfd6dd;
}

.pos-field input::placeholder,
.pos-field textarea::placeholder {
    color: #94a3b8 !important;
}

/* Override user form inputs */
.user-form input,
.user-form select,
.user-form textarea {
    color: #0f172a !important;
    background: #ffffff !important;
    border-color: #cbd3dc;
}

.user-form input::placeholder,
.user-form textarea::placeholder {
    color: #94a3b8 !important;
}

/* Override chart/data table inputs */
.data-table input,
.data-table select {
    color: #0f172a !important;
    background: #ffffff !important;
}

/* Ensure text in modals is visible */
.modal input,
.modal select,
.modal textarea {
    color: #0f172a !important;
    background: #ffffff !important;
}

.modal ::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Override any dark background on form containers */
.form-block,
.form-row {
    background: transparent !important;
}

/* Ensure input groups have proper contrast */
.input-group input {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.35) !important;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.input-group input:focus {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.5) !important;
}
