:root {
    --primary: #800000;
    --primary-dark: #570101;
    --bg: #f3f4f6;
    --white: #ffffff;
    --text: #1f2937;
    --gray: #6b7280;
    --danger: #ef4444;
    --success: #10b981;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 80px;
    --header-height: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; }

body { 
    background-color: var(--bg); 
    color: var(--text); 
    height: 100vh; 
    display: flex; 
    overflow: hidden; 
    font-size: 0.9rem;
}

/* === AUTH PAGES === */
.auth-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: flex-start; /* This pushes the card to the left */
    align-items: center;
    /* Uses your local image WITHOUT the dark overlay */
    background: url('POS-backdrop.png') no-repeat center center;
    background-size: cover;
    padding-left: 10%; /* Gives some breathing room from the left edge */
}

.auth-card {
    background: rgba(255, 255, 255, 0.95); /* Clean, slightly frosted white */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: 100%;
    max-width: 400px;
    animation: fadeInLeft 0.6s ease-out forwards;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Flat Text Layout (No Box) for Suspended Page */
.flat-text-panel {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-align: left !important;
    max-width: 500px;
}
.flat-text-panel h1 {
    font-size: 3rem;
    color: var(--danger);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
}
.flat-text-panel p {
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 600;
}
.no-underline { text-decoration: none !important; }

/* On smaller screens, center the card so it doesn't break off-screen */
@media (max-width: 768px) {
    .auth-container {
        justify-content: center;
        padding-left: 20px;
        padding-right: 20px;
    }
}

.auth-header { text-align: center; margin-bottom: 25px; }
.auth-header h1 { font-size: 2rem; color: var(--primary); font-weight: 800; margin-bottom: 8px; letter-spacing: -1px; }
.auth-header p { color: var(--gray); font-size: 0.95rem; }
.auth-footer { text-align: center; margin-top: 25px; font-size: 0.9rem; color: var(--gray); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 700; transition: 0.2s; }
.auth-footer a:hover { color: var(--primary-dark); text-decoration: underline; }

.btn-auth {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 8px 15px rgba(128, 0, 0, 0.2);
}
.btn-auth:hover { 
    background: var(--primary-dark); 
    transform: translateY(-2px); 
    box-shadow: 0 12px 20px rgba(128, 0, 0, 0.3); 
}

/* Suspended Page Specifics */
.auth-card.suspended-card {
    text-align: center;
    border-top: 6px solid var(--danger);
}
.suspended-card h1 { color: var(--danger); margin-bottom: 15px; font-size: 1.8rem; }
.suspended-card p { color: var(--text); line-height: 1.6; margin-bottom: 25px; font-size: 0.95rem; }
.suspended-icon-wrapper { margin-bottom: 20px; }
/* === SIDEBAR NAVIGATION === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 15px 10px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Keeps them grouped on the left */
    gap: 15px; /* Adds perfect spacing between the icon and text */
    margin-bottom: 30px;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0;
    padding-left: 0; /* Removed the old 10px padding */
    display: block;
    letter-spacing: -0.5px;
    transition: color 0.2s;
    white-space: normal;      
    overflow: visible;        
    text-overflow: clip;      
    word-wrap: break-word;    
    line-height: 1.2;         
    cursor: default;
}

.sidebar.collapsed .brand {
    display: none;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.sidebar-toggle-btn:hover {
    transform: scale(1.1);
}

.nav-links { list-style: none; flex: 1; }
.nav-links li { margin-bottom: 8px; }

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.nav-btn:hover { background: #f3f4f6; color: var(--primary); }
.nav-btn.active { background: #e0e7ff; color: var(--primary); font-weight: 600; }
.nav-btn .ui-icon { width: 20px; height: 20px; }

.sidebar.collapsed .nav-btn {
    justify-content: center;
    padding: 12px 0;
}
.sidebar.collapsed .nav-btn .ui-icon {
    margin: 0;
    width: 22px;
    height: 22px;
}
.sidebar.collapsed .nav-btn span {
    display: none;
}

.user-profile {
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}
.user-info { flex: 1; overflow: hidden; }
.user-info h4 { font-size: 0.85rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.user-info small { font-size: 0.7rem; color: var(--gray); }

.sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .user-profile { justify-content: center; padding: 12px 5px; }

/* === SIDEBAR LOGOUT BUTTON === */
#logout-btn {
    background: rgba(239, 68, 68, 0.1); /* Soft red background */
    border: 1px solid rgba(239, 68, 68, 0.2); /* Subtle red border */
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover State */
#logout-btn:hover {
    background: var(--danger, #ef4444); /* Solid red */
    border-color: var(--danger, #ef4444);
    transform: translateY(-3px); /* Lifts the button up slightly */
}

/* Click State */
#logout-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* === MAIN CONTENT AREA === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.view-section {
    display: none;
    flex: 1;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}
.view-section.active { display: flex; }

/* Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounceUp { 0% { opacity: 0; transform: translateY(50px) scale(0.8); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.top-header {
    background: var(--white);
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    height: var(--header-height);
    flex-shrink: 0;
}
.page-title { font-size: 1.1rem; font-weight: 600; }
.search-wrapper { position: relative; width: 280px; }
.search-wrapper .ui-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); }
.search-wrapper input { width: 100%; padding: 8px 10px 8px 35px; border-radius: 20px; border: 1px solid #e5e7eb; background: #f9fafb; outline: none; transition: 0.3s; font-size: 0.9rem; }
.search-wrapper input:focus { border-color: var(--primary); background: white; }

/* === POS LAYOUT === */
.pos-container { display: flex; height: calc(100% - var(--header-height)); }
.product-area { flex: 7; padding: 15px; overflow-y: auto; overflow-x: hidden; }
.cart-area { 
    flex: 3; 
    min-width: 350px; /* Restrict cart from shrinking too much */
    background: var(--white); 
    border-left: 1px solid #e5e7eb; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

/* === CATEGORIES & GRID === */
.categories {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    -ms-overflow-style: none;  
    scrollbar-width: none;
}
.categories button { padding: 6px 14px; border-radius: 20px; border: 1px solid #e5e7eb; background: white; cursor: pointer; white-space: nowrap; transition: 0.2s; font-size: 0.85rem; }
.categories button:hover { background: #f3f4f6; }
.categories button.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 3px 5px rgba(79, 70, 229, 0.2); }

.categories::-webkit-scrollbar {
    display: none;
}

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }

.product-card { 
    background: white; padding: 12px; border-radius: 14px; text-align: center; 
    border: 1px solid transparent; box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    transition: 0.2s; position: relative; cursor: pointer; 
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }

.product-img-wrapper { 
    width: 100%; 
    aspect-ratio: 1/1; 
    border-radius: 10px; 
    overflow: hidden; 
    background: #f9fafb; 
    margin-bottom: 10px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    flex-shrink: 0; 
}
.product-img { width: 100%; height: 100%; object-fit: cover; }
.product-card-content { display: flex; flex-direction: column; flex-grow: 1; }
.product-name {
    font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.6em; 
}
.variant-badge { align-self: center; background-color: #e0e7ff; color: var(--primary); font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; margin-bottom: 5px; }
.meta-spacer { height: 1.4em; margin-bottom: 5px; }
.product-price { color: var(--text); font-weight: 800; font-size: 1.1rem; margin-top: auto; }
.card-actions { 
    position: absolute; top: 8px; right: 8px; 
    display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; 
    background: rgba(255,255,255,0.95); padding: 4px; border-radius: 6px; z-index: 10; 
}
.product-card:hover .card-actions { opacity: 1; }
.action-btn { width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.8rem; transition: transform 0.2s; }
.edit-btn { background: #f59e0b; }
.delete-btn { background: #ef4444; }
.action-btn:hover { transform: scale(1.1); }

/* === CART AREA === */
.cart-header { padding: 15px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; height: var(--header-height); }
.cart-header h3 { font-size: 1rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 12px; }

.empty-cart-state {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; 
    color: var(--gray); text-align: center; opacity: 0.6;
    animation: fadeIn 0.3s ease;
}
.empty-cart-state p { font-size: 1.1rem; font-weight: 500; margin-top: 0; }

.cart-item { 
    display: grid;
    /* Columns: Image | Info/Controls | Price/Remove */
    grid-template-columns: 60px 1fr auto; 
    /* Rows: Top (Info+Remove) | Bottom (Controls+Price) */
    grid-template-rows: auto auto; 
    gap: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-item-img { width: 45px; height: 45px; border-radius: 8px; object-fit: cover; background: #f3f4f6; flex-shrink: 0; }
.item-info { 
    grid-row: 1;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.item-info h4 { 
    font-size: 0.9rem; 
    font-weight: 700; 
    margin-bottom: 2px; 
    color: var(--text);
    line-height: 1.2;
}
.item-info .unit-price { 
    font-size: 0.75rem; 
    color: var(--gray); 
}

.item-controls { 
    grid-row: 2;
    grid-column: 2;
    align-self: end;
    justify-self: start;
    
    display: flex; 
    align-items: center; 
    background: white; 
    border: 1px solid #e5e7eb; /* Border instead of gray bg */
    border-radius: 8px; 
    padding: 0;
    height: 32px; /* Fixed height for neatness */
    overflow: hidden;
}

.qty-btn { 
    background: white; 
    border: none; 
    width: 30px; 
    height: 100%; 
    cursor: pointer; 
    font-weight: bold; 
    color: var(--primary); 
    font-size: 1rem;
    transition: background 0.2s;
}

.qty-btn:hover { 
    background: #f3f4f6; 
}

.item-controls span { 
    margin: 0 8px; 
    font-weight: 600; 
    font-size: 0.85rem; }

.item-controls span.qty-val { 
    margin: 0; 
    padding: 0 8px;
    font-weight: 600; 
    font-size: 0.9rem; 
    min-width: 24px;
    text-align: center;
    color: var(--text);
}

.item-total { 
    grid-row: 2;
    grid-column: 3;
    align-self: end;
    justify-self: end;
    
    font-weight: 800; 
    font-size: 1.1rem; /* Bigger font */
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px; /* Align visually with buttons */
}

.btn-remove-item { 
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
    align-self: start;
    
    background: transparent; 
    color: #9ca3af; /* Softer gray */
    border: none; 
    width: 24px; 
    height: 24px; 
    cursor: pointer; 
    font-size: 0.9rem; 
    margin: -4px -4px 0 0; /* Pull slightly to corner */
    transition: color 0.2s;
}

.btn-remove-item:hover { 
    color: var(--danger); 
    background: transparent;
}

.cart-footer { padding: 20px; background: #f9fafb; border-top: 1px solid #e5e7eb; flex-shrink: 0; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.85rem; color: var(--gray); }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; color: var(--text); border-top: 1px solid #e5e7eb; padding-top: 10px; margin-top: 8px; }

/* === SALES VIEW === */
.sales-view-content { padding: 25px; overflow-y: auto; height: 100%; }
.stats-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-card { background: white; padding: 18px; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 15px; }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; background: #e0e7ff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-info h3 { font-size: 1.5rem; margin: 0; color: var(--text); font-weight: 700; }
.stat-info p { margin: 0; color: var(--gray); font-size: 0.85rem; }

.table-container { background: white; border-radius: 14px; padding: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); overflow: hidden; }
.styled-table { width: 100%; border-collapse: collapse; }
.styled-table th { text-align: left; padding: 12px; color: var(--gray); border-bottom: 2px solid #e5e7eb; font-size: 0.85rem; }
.styled-table td { padding: 12px; border-bottom: 1px solid #f3f4f6; color: var(--text); font-size: 0.9rem; }

.clickable-row { cursor: pointer; transition: background 0.2s; }
.clickable-row:hover { background: #f8fafc; }
.clickable-row.active-row { background: #f0f4ff; border-left: 4px solid var(--primary); }

.order-detail-row td { padding: 0 !important; background: #fcfcfd; }
.detail-container { 
    padding: 20px 30px; 
    border-bottom: 2px solid #eee; 
    animation: slideDown 0.3s ease-out; 
}

@keyframes slideDown { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.detail-table { width: 100%; margin-bottom: 20px; border-spacing: 0; }
.detail-table th { font-size: 0.75rem; text-transform: uppercase; color: var(--gray); padding-bottom: 10px; border-bottom: 1px solid #eee; }
.detail-table td { padding: 8px 0; font-size: 0.85rem; border-bottom: none; }

.detail-footer { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 15px; border-top: 2px solid #f3f4f6; }
.detail-footer .breakdown { width: 250px; }
.detail-footer .breakdown p { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 0.85rem; }
.detail-footer .breakdown h4 { display: flex; justify-content: space-between; font-weight: 700; color: var(--text); }
.detail-footer .actions { text-align: right; }

/* === MODALS === */
.modal { display: none; position: fixed; z-index: 5000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { 
    background-color: white; padding: 25px; border-radius: 16px; width: 450px; max-width: 90%; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); 
    transform: scale(0.9); opacity: 0; transition: 0.3s; max-height: 90vh; overflow-y: auto; 
}
.modal.active .modal-content { transform: scale(1); opacity: 1; }

.modal-content.animate-out { animation: scaleFadeOut 0.3s forwards; }
.modal-content.animate-in { animation: bounceUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes scaleFadeOut { to { opacity: 0; transform: scale(0.8); } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 1.3rem; margin: 0; }
.close-btn { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--gray); transition: 0.2s; }
.close-btn:hover { color: var(--danger); transform: rotate(90deg); }

/* === GLOBAL UTILS === */
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.9rem; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-danger { background: #fee2e2; color: #ef4444; border: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; transition: 0.2s; font-size: 0.85rem; }
.btn-danger:hover { background: #ef4444; color: white; }
.checkout-btn { width: 100%; background: var(--primary); color: white; padding: 14px; font-size: 1.05rem; border-radius: 12px; border: none; font-weight: bold; cursor: pointer; transition: 0.2s; margin-top: 20px; }
.checkout-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.text-success { color: #10b981; font-weight: bold; }

/* === NOTIFICATIONS === */
.notification-container { 
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 9999; 
    display: flex; 
    flex-direction: column-reverse; 
    gap: 10px; 
}

.notification { 
    background: white; 
    padding: 10px 20px; 
    border-radius: 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    min-width: 250px;
    animation: popUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.notification.hiding {
    animation: popDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popUp { 
    from { transform: translateY(100px) scale(0.8); opacity: 0; } 
    to { transform: translateY(0) scale(1); opacity: 1; } 
}

@keyframes popDown { 
    from { transform: translateY(0) scale(1); opacity: 1; } 
    to { transform: translateY(100px) scale(0.8); opacity: 0; } 
}

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.85rem; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 0.95rem; outline: none; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }

/* Payment Buttons */
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.pay-btn { padding: 15px; border: 2px solid #e5e7eb; background: white; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: all 0.3s; position: relative; overflow: hidden; }
.pay-btn:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.pay-btn.active { border-color: var(--primary); background: #e0e7ff; color: var(--primary); font-weight: bold; }
.pay-btn .ui-icon { 
    width: 3.5rem !important;
    height: 3.5rem !important; 
    object-fit: contain !important;
    max-width: none !important;
    margin-bottom: 5px;
}.payment-input-area { background: #f9fafb; padding: 15px; border-radius: 12px; border: 1px dashed #cbd5e1; margin-bottom: 15px; text-align: center; }
.payment-input-area label { display: block; margin-bottom: 8px; color: var(--gray); font-weight: 600; font-size: 0.9rem; }
.payment-input-area input { width: 100%; padding: 12px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 1.3rem; text-align: center; font-weight: bold; color: var(--primary); outline: none; }
.payment-input-area input:focus { border-color: var(--primary); background: white; }

/* Image Upload & Variant */
.image-upload-wrapper { width: 100%; display: flex; justify-content: center; margin-bottom: 15px; }
.image-upload-box { width: 120px; height: 120px; border: 2px dashed #cbd5e1; border-radius: 15px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; background-color: #f9fafb; transition: all 0.3s; position: relative; overflow: hidden; }
.image-upload-box:hover { border-color: var(--primary); background-color: #e0e7ff; }
.image-upload-box img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 2; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; color: var(--gray); z-index: 1; font-size: 0.9rem; }

/* === FIXED: VARIANT ROWS STYLING === */
.variant-row { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 10px; 
    align-items: center;
}
.variant-row input { 
    flex: 1; 
    min-width: 70px; 
    padding: 10px; 
    border: 2px solid #e5e7eb; 
    border-radius: 10px; 
    outline: none;
    font-size: 0.9rem;
}
.variant-row input:focus {
    border-color: var(--primary);
}
.btn-remove-variant { 
    flex-shrink: 0; 
    width: 36px; 
    height: 36px; 
    background: #fee2e2; 
    color: var(--danger); 
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.1rem; 
    transition: 0.2s; 
}
.btn-remove-variant:hover { background: var(--danger); color: white; }

/* === FIXED SETTINGS PAGE LAYOUT === */

/* 1. Enable Scrolling for the Settings Page */
.settings-view-content {
    padding: 25px;
    height: 100%;       /* Take full height of parent */
    overflow-y: auto;   /* Scroll if content is too long */
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 2. Container for Side-by-Side Cards */
.settings-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 20px;
    margin-bottom: 20px;
}

/* Mobile Profile Globals */
.mobile-profile-btn { display: none !important; }
.profile-avatar {
    width: 80px; height: 80px; border-radius: 50%; background: var(--primary); 
    color: white; display: flex; align-items: center; justify-content: center; 
    font-size: 2.5rem; font-weight: bold; margin: 0 auto; 
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* On smaller screens, stack them */
@media (max-width: 768px) {
    .settings-grid-row {
        grid-template-columns: 1fr;
    }
}

/* 3. Card Adjustments */
.settings-card {
    background: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    animation: fadeInUp 0.5s ease-out forwards;
    height: 100%; /* Make cards same height */
    display: flex;
    flex-direction: column;
}

.settings-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
}

.settings-header h3 {
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 700;
    margin: 0;
}

.settings-footer {
    margin-top: auto; /* Pushes button to bottom of card */
    text-align: right;
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
}

/* 4. Input Field Styling */
.settings-card input[type="text"],
.settings-card input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    background: #f9fafb;
    transition: 0.2s;
}

.settings-card input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
}

/* === DATE SEPARATOR STYLING === */
.date-separator td {
    background-color: #f3f4f6; /* Light gray background */
    color: var(--primary-dark); /* Dark primary color text */
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 15px !important;
    border-bottom: 2px solid #e5e7eb;
}

/* Optional: Add a left border to match branding */
.date-separator td {
    border-left: 4px solid var(--primary);
}

/* === SALES HISTORY DATE SEPARATOR === */
.date-separator td {
    background-color: #f3f4f6;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 15px !important;
    border-bottom: 2px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === RBAC HIDDEN ELEMENTS FOR CASHIERS === */
body.role-cashier .action-btn {
    display: none !important;
}

/* Force hide the Add Item button for cashiers, completely overriding mobile flex rules */
body.role-cashier #pos-view .top-header .btn-primary {
    display: none !important;
}

.mobile-cart-fab {
    display: none !important;
}

.mobile-close-cart {
    display: none !important;
}

@media screen and (max-width: 768px) {
    /* 1. FIX VIEWPORT & SCALE DOWN UI FOR PHONES */
    html, body {
        height: 100%;
        height: 100dvh !important; /* dVH prevents browser address bar from hiding bottom nav */
        font-size: 14px !important; /* Scales down the UI so it doesn't look too big */
        flex-direction: column !important;
        overflow: hidden !important; 
    }

    /* 2. Bottom Navigation */
    .sidebar {
        width: 100% !important;
        height: 70px !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        padding: 5px !important;
        border-right: none !important;
        border-top: 2px solid #e5e7eb !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 9999 !important;
    }

    .sidebar-header, .brand, .user-profile { display: none !important; }

    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: center !important;
    }

    .nav-links li { flex: 1 !important; margin: 0 !important; }

    .nav-btn {
        flex-direction: column !important;
        font-size: 0.75rem !important;
        padding: 5px !important;
        text-align: center !important;
        width: 100% !important;
        border-radius: 8px !important;
        gap: 4px !important;
        justify-content: center !important;
    }
    .nav-btn .ui-icon { width: 1.4rem !important; height: 1.4rem !important; margin: 0 !important; }

    /* 3. Main Content Setup */
    .main-content {
        width: 100% !important;
        height: calc(100dvh - 70px) !important; 
    }

    .top-header { padding: 0 10px !important; }
    .top-header .page-title { display: none !important; }
    .search-wrapper { width: 100% !important; margin-right: 10px !important; }

    .pos-container { 
        flex-direction: column !important; 
        height: calc(100% - 60px) !important;
    }

    .product-area {
        width: 100% !important;
        flex: 1 1 100% !important; 
        padding: 10px !important;
        padding-bottom: 90px !important; /* Space for FAB */
        overflow-y: auto !important;
    }
    
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; gap: 10px !important; }

    /* 5. FLOATING CART BUTTON (FAB) */
    .mobile-cart-fab {
        display: flex !important;
        position: fixed;
        bottom: 85px; /* Floats above the bottom nav */
        right: 15px;
        width: 60px;
        height: 60px;
        background: var(--primary);
        color: white;
        border-radius: 50%;
        border: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        z-index: 10000;
        cursor: pointer;
    }
    .cart-badge {
        position: absolute; top: -2px; right: -2px;
        background: var(--danger); color: white;
        font-size: 0.75rem; font-weight: bold;
        border-radius: 50%; padding: 4px 8px;
    }

    /* 6. CART AREA (Hidden Overlay) */
    .cart-area {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100vw !important; height: 100dvh !important;
        z-index: 99990 !important; /* Covers everything except Modals */
        transform: translateX(100%); /* Hidden off-screen to the right */
        transition: transform 0.3s ease-in-out;
        background: white !important;
        display: flex !important; flex-direction: column !important;
    }

    .cart-area.show-cart { transform: translateX(0); /* Slides in */ }

    .mobile-close-cart {
        display: block !important;
        background: none; border: none;
        font-size: 1.2rem; color: var(--text);
        cursor: pointer; padding: 5px 15px 5px 0;
    }

    .cart-header { display: flex !important; justify-content: space-between !important; align-items: center !important; height: auto !important; padding: 10px 15px !important; }
    .cart-header h3 { font-size: 1rem !important; margin: 0 !important; flex: 1; }
    
    .cart-items { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; padding: 10px !important; }
    .cart-footer { padding: 15px !important; flex-shrink: 0 !important; padding-bottom: 30px !important; }

    /* 7. Ensure Payment Modals appear ABOVE the Cart Overlay */
    .modal { z-index: 99999 !important; }
    .modal-content { width: 95% !important; padding: 15px !important; }
    .payment-methods { grid-template-columns: 1fr 1fr !important; }
    #pay-total { font-size: 1.5rem !important; }

    /* 8. ADD/EDIT ITEM MODAL COMPRESSION */
    #add-modal .modal-header {
        margin-bottom: 10px !important;
    }
    #add-modal .modal-header h2 {
        font-size: 1.1rem !important; /* Smaller title */
    }
    
    /* Shrink the image upload square */
    .image-upload-box {
        width: 80px !important;
        height: 80px !important;
    }
    .image-upload-wrapper {
        margin-bottom: 10px !important;
    }
    .upload-placeholder .ui-icon {
        width: 1.2rem !important;
        height: 1.2rem !important;
    }
    .upload-placeholder span {
        font-size: 0.75rem !important;
    }

    /* Compress Form Groups & Inputs */
    #add-modal .form-group {
        margin-bottom: 8px !important;
    }
    #add-modal .form-group label {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
    #add-modal input {
        padding: 8px !important; /* Thinner text boxes */
        font-size: 0.9rem !important;
    }

    /* Compress the Variants Section */
    #variant-list {
        max-height: 100px !important; /* Prevents modal from getting too tall */
    }
    .variant-row {
        margin-bottom: 6px !important;
    }
    .variant-row input {
        padding: 6px 8px !important;
    }
    .btn-remove-variant {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
    }

    /* Compress the Save Button */
    #add-product-form .btn-primary[type="submit"] {
        margin-top: 10px !important;
        padding: 10px !important;
    }

    /* --- HEADER BUTTON OPTIMIZATION (Icon Only) --- */
    .top-header {
        gap: 10px !important; /* Adds a clean gap between search and button */
        padding: 10px !important;
    }
    
    .search-wrapper {
        flex: 1 !important; /* Forces search bar to flexibly take remaining space */
        width: auto !important;
        margin: 0 !important;
    }

    /* Turns the "Add Item" (and "Refresh") buttons into square icon buttons */
    .top-header .btn-primary {
        width: 45px !important;
        height: 45px !important;
        padding: 0 !important;
        flex-shrink: 0 !important; 
        font-size: 0 !important; /* Hides the text node */
        border-radius: 12px !important;
        
        /* THE FIX: Force perfect centering and remove the gap */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important; 
    }
    
    /* Keeps the icon visible and perfectly centered */
    .top-header .btn-primary .ui-icon {
        font-size: 1.2rem !important; 
        margin: 0 !important;
    }

/* --- 8. SALES & SETTINGS MOBILE SCROLL FIX --- */
    .sales-view-content, .settings-view-content {
        padding: 10px !important; 
        padding-bottom: 90px !important; /* Adds a buffer so the bottom is never cut off */
    }
    
    /* RESTORE HORIZONTAL SCROLLING FOR THE TABLE */
    .table-container {
        overflow-x: auto !important; /* Enables horizontal scrolling */
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth momentum scrolling on mobile */
        padding: 0 !important; /* Remove padding so the table touches the edges */
        border-radius: 8px !important;
    }
    
    .styled-table {
        min-width: 650px !important; /* Forces table to stay wide so it triggers the scroll */
    }
    
    .styled-table th, .styled-table td {
        white-space: nowrap !important; /* Prevents text from awkwardly stacking/wrapping */
        padding: 10px 15px !important;
    }

    /* --- DASHBOARD GRID MOBILE FIX --- */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr) !important; /* Forces 2 columns always */
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    .stat-card {
        padding: 15px 10px !important;
        gap: 8px !important;
        flex-direction: column !important; /* Stacks the icon on top of the text to save space */
        text-align: center !important;
        justify-content: center !important;
    }

    .stat-card .stat-icon {
        width: 45px !important;
        height: 45px !important;
        margin: 0 auto !important; /* Centers the icon */
    }

    .stat-card .stat-info h3 {
        font-size: 1.2rem !important;
    }

    .stat-card .stat-info p {
        font-size: 0.75rem !important;
    }

    /* Show Top-Left Avatar */
    .mobile-profile-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: var(--primary);
        color: white;
        border: none;
        font-weight: 600;
        font-size: 1.2rem;
        flex-shrink: 0;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 0;
    }
}

/* Very Small Screen Handling (e.g. older Androids width ~320px) */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    }
}

/* === ITEM TYPE TOGGLE (PRODUCTS VS SERVICES) === */
.type-toggle-container {
    display: flex;
    background: #e5e7eb;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 15px;
    width: fit-content;
}
.type-toggle-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s ease;
}
.type-toggle-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* === SALES TABS === */
.sales-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}
.sales-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px; /* Pull it down to overlap the border */
}
.sales-tab-btn:hover { color: var(--primary); }
.sales-tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* MANAGER RESTRICTIONS */
body.role-admin .manager-restricted {
    display: none !important;
}

.dev-gate-body{
    /* Reset & Base */
        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
        body {
            background-color: #020617; /* Very dark slate */
            color: #f8fafc;
            height: 100dvh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }

        /* Animated Ambient Background Mesh */
        .bg-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: float 10s infinite ease-in-out alternate; }
        .orb-1 { width: 350px; height: 350px; background: #38bdf8; top: -100px; left: -100px; animation-delay: 0s; }
        .orb-2 { width: 450px; height: 450px; background: #818cf8; bottom: -150px; right: -150px; animation-delay: -5s; }
        .orb-3 { width: 250px; height: 250px; background: #2dd4bf; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -2s; opacity: 0.2; }

        @keyframes float {
            0% { transform: translate(0, 0) scale(1); }
            100% { transform: translate(30px, 60px) scale(1.1); }
        }

        /* Centered Glass Login Card */
        .login-card {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 400px;
            background: rgba(15, 23, 42, 0.65);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            padding: 3.5rem 2.5rem;
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
            margin: 20px;
            animation: scaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        @keyframes scaleUp {
            from { opacity: 0; transform: scale(0.9) translateY(20px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        /* Branding Header */
        .brand-header { text-align: center; margin-bottom: 2.5rem; }
        .mascot { 
            width: 75px; height: 75px; object-fit: contain; margin-bottom: 15px; 
            filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5)); 
            animation: hoverMascot 3s ease-in-out infinite; 
        }
        @keyframes hoverMascot {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        .brand-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 5px; }
        .brand-title span { color: #38bdf8; }
        .brand-subtitle { font-size: 0.9rem; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

        /* Form Elements */
        .form-group { margin-bottom: 1.25rem; }
        .form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #cbd5e1; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
        
        .input-wrapper { position: relative; }
        .input-wrapper i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 1.1rem; transition: color 0.3s; }
        .input-wrapper input {
            width: 100%; padding: 15px 16px 15px 50px;
            background: rgba(2, 6, 23, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 14px; color: #f8fafc; font-size: 1rem;
            outline: none; transition: all 0.3s;
        }
        .input-wrapper input:focus { 
            border-color: #38bdf8; background: rgba(2, 6, 23, 0.8); 
            box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15); 
        }
        .input-wrapper input:focus + i { color: #38bdf8; }

        /* Cyber Button */
        .btn-submit {
            width: 100%; padding: 16px; margin-top: 15px;
            background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
            color: white; border: none; border-radius: 14px;
            font-size: 1.05rem; font-weight: 700; letter-spacing: 0.5px;
            cursor: pointer; transition: all 0.3s;
            display: flex; justify-content: center; align-items: center; gap: 10px;
            box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
        }
        .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 15px 25px -5px rgba(14, 165, 233, 0.6); filter: brightness(1.1); }
        .btn-submit:active { transform: translateY(1px); box-shadow: 0 5px 10px -5px rgba(14, 165, 233, 0.4); }
        .btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

        /* Error Message Box */
        #error-msg {
            display: none; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2);
            color: #ef4444; padding: 12px; border-radius: 12px; font-size: 0.9rem; margin-top: 20px;
            text-align: center; font-weight: 500; animation: shake 0.4s;
        }
        @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

        /* Mobile Polish */
        @media (max-width: 480px) {
            .login-card { padding: 2.5rem 1.5rem; margin: 15px; border-radius: 20px; }
            .mascot { width: 65px; height: 65px; }
            .brand-title { font-size: 1.6rem; }
            .input-wrapper input { font-size: 0.95rem; padding: 14px 16px 14px 45px; }
            .btn-submit { padding: 15px; font-size: 1rem; }
        }
}

/* Input Icon Wrappers for Auth Pages */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray, #6b7280); /* Fallback gray if variable is missing */
}

.input-icon-wrapper .ui-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

.input-icon-wrapper input {
    padding-left: 40px;
}

.btn-icon-right {
    margin-left: 10px;
}

/* Form Layout Utilities */
.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

/* Developer Dashboard Table Utilities */
.dev-toggle-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cashier-row {
    background: #f8fafc;
    display: none;
}
.cashier-row.show-cashier {
    display: table-row;
}
.cashier-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}
.raw-pass {
    font-family: monospace;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* CSP Utility Layer */
.hidden { display: none !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-grid { display: grid !important; }
.flex-col { flex-direction: column !important; }
.flex-row { display: flex !important; flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.flex-1 { flex: 1 !important; }
.gap-5 { gap: 5px !important; }
.gap-10 { gap: 10px !important; }
.gap-15 { gap: 15px !important; }
.mt-5 { margin-top: 5px !important; }
.mt-8 { margin-top: 8px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-5 { margin-bottom: 5px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-25 { margin-bottom: 25px !important; }
.mr-5 { margin-right: 5px !important; }
.mr-10 { margin-right: 10px !important; }
.mr-20 { margin-right: 20px !important; }
.ml-auto { margin-left: auto !important; }
.p-8 { padding: 8px !important; }
.p-10 { padding: 10px !important; }
.p-12 { padding: 12px !important; }
.p-14 { padding: 14px !important; }
.p-15 { padding: 15px !important; }
.p-20 { padding: 20px !important; }
.pb-10 { padding-bottom: 10px !important; }
.p-inline-8 { padding: 0 8px !important; }
.rounded-8 { border-radius: 8px !important; }
.rounded-10 { border-radius: 10px !important; }
.rounded-12 { border-radius: 12px !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fs-07 { font-size: 0.7rem !important; }
.fs-08 { font-size: 0.8rem !important; }
.fs-085 { font-size: 0.85rem !important; }
.fs-09 { font-size: 0.9rem !important; }
.fs-105 { font-size: 1.05rem !important; }
.fs-15 { font-size: 1.5rem !important; }
.lh-15 { line-height: 1.5 !important; }
.lh-16 { line-height: 1.6 !important; }
.cursor-pointer { cursor: pointer !important; }

.bg-warning { background-color: #f59e0b !important; }
.bg-info { background-color: #3b82f6 !important; }
.bg-success { background-color: #10b981 !important; }
.bg-gray-400 { background-color: #9ca3af !important; }
.bg-muted { background-color: #e5e7eb !important; }
.bg-soft { background-color: #f9fafb !important; }
.bg-green-soft { background-color: #dcfce7 !important; }
.bg-red-soft { background-color: #fee2e2 !important; }
.bg-blue-soft { background-color: #e0e7ff !important; }
.bg-gray-soft { background-color: #f3f4f6 !important; }
.bg-yellow-soft { background-color: #fffbeb !important; }
.bg-blue-lighter { background-color: #eff6ff !important; }
.bg-transparent { background: transparent !important; }

.text-gray { color: #6b7280 !important; }
.text-muted { color: #888 !important; }
.text-success { color: #10b981 !important; }
.text-danger { color: #ef4444 !important; }
.text-info { color: #3b82f6 !important; }
.text-slate { color: #374151 !important; }
.text-green-700 { color: #166534 !important; }
.text-green-900 { color: #14532d !important; }
.text-amber-800 { color: #92400e !important; }
.text-amber-700 { color: #b45309 !important; }
.text-primary { color: var(--primary) !important; }

.border { border: 1px solid #e5e7eb !important; }
.border-0 { border: 0 !important; }
.border-gray-300 { border: 1px solid #d1d5db !important; }
.border-blue-200 { border: 1px solid #bfdbfe !important; }
.border-yellow-300 { border: 1px solid #fcd34d !important; }
.border-dashed { border-style: dashed !important; }
.border-top-dashed { border-top: 1px dashed #9ca3af !important; }
.border-top-dashed-light { border-top: 1px dashed #ccc !important; }
.border-bottom-black { border-bottom: 1px solid #000 !important; }

.ui-icon { width: 1.2em; height: 1.2em; object-fit: contain; vertical-align: middle; display: inline-block; }

/* Large Icon Utility for Modals */
.ui-icon-large {
    width: 3.5rem !important;
    height: 3.5rem !important;
}

.btn-pad-compact { padding: 6px 10px !important; }
.btn-tax-muted { background: #4b5563 !important; }
.btn-neutral { background: #e5e7eb !important; color: #374151 !important; }
.btn-discount-toggle { background: #f3f4f6 !important; color: #374151 !important; border: 1px dashed #cbd5e1 !important; justify-content: center !important; padding: 12px !important; width: 100% !important; }
.btn-disc-option { background: #fff !important; color: #374151 !important; border: 1px solid #d1d5db !important; flex: 1 !important; min-width: 100px !important; padding: 8px !important; }

.search-wrapper-sales { margin-right: 10px; margin-left: auto; }
.select-pill { padding: 8px 15px; border-radius: 20px; border: 1px solid #e5e7eb; background: #fff; margin-right: 10px; cursor: pointer; outline: none; font-family: inherit; font-size: 0.9rem; }
.note-small { color: #6b7280; display: block; margin-top: 5px; }

.settings-card-wide { grid-column: 1 / -1; margin-top: 20px; }
.settings-header-row { display: flex; justify-content: space-between; align-items: center; }
.settings-card-block { margin-top: 20px; width: 100%; }

.modal-w-320 { width: 320px !important; }
.modal-w-350 { width: 350px !important; }
.modal-w-400 { width: 400px !important; }
.modal-w-450 { width: 450px !important; }
.modal-w-500 { width: 500px !important; }
.modal-w-650 { width: 650px !important; }
.z-9000 { z-index: 9000 !important; }
.z-99999 { z-index: 99999 !important; }

.variant-toggle-box { background: #f9fafb; padding: 10px; border-radius: 8px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; border: 1px solid #e5e7eb; }
.variant-toggle-checkbox { width: 18px !important; height: 18px !important; cursor: pointer; }
.variant-toggle-label { margin: 0 !important; cursor: pointer; font-weight: 600; }
.variant-list-scroll { max-height: 150px; overflow-y: auto; margin-bottom: 10px; padding-right: 5px; }

.payment-highlight { padding: 15px; border-radius: 8px; text-align: left; line-height: 1.5; }
.payment-highlight.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.payment-highlight.warning { background: #fef3c7; color: #92400e; border: 1px solid #fbd38d; }
.payment-highlight.neutral { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.payment-highlight-title { font-weight: 700; margin-bottom: 5px; font-size: 1.05rem; display: flex; align-items: center; gap: 6px; }
.payment-highlight-total { margin-top: 8px; font-size: 1.1rem; }

.receipt-shell { text-align: center; font-family: monospace; color: #000; }
.receipt-store-title { margin-bottom: 5px; font-size: 1.2rem; }
.receipt-store-address { font-size: 0.8rem; margin-bottom: 15px; }
.receipt-meta { text-align: center; margin-bottom: 10px; font-size: 0.85rem; }
.receipt-strong { font-weight: 700; }
.receipt-code { font-family: monospace; font-weight: 600; color: var(--primary); }
.receipt-hr { border: 1px dashed #9ca3af; margin: 10px 0; }
.receipt-items { text-align: left; font-size: 0.9rem; }
.receipt-line { display: flex; justify-content: space-between; margin-bottom: 5px; }
.receipt-summary { font-size: 0.9rem; line-height: 1.4; }
.receipt-total { text-align: right; margin-top: 10px; padding-top: 10px; border-top: 1px solid #000; font-size: 1.3rem; }
.receipt-paid { text-align: right; font-size: 0.8rem; margin-top: 5px; }
.receipt-footer { margin-top: 20px; font-size: 0.8rem; text-align: center; }
.receipt-signature { margin-top: 20px; display: flex; align-items: flex-end; }
.receipt-signature-label { font-weight: 700; margin-right: 5px; }
.receipt-signature-line { flex: 1; border-bottom: 1px solid #000; margin-bottom: 3px; }

.cashier-online-indicator { display: flex; align-items: center; gap: 5px; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.online-dot.on { background: #10b981; }
.online-dot.off { background: #d1d5db; }
.status-badge-active { background: #e0e7ff; color: var(--primary); }
.status-badge-suspended { background: #fee2e2; color: #ef4444; }

.cart-item-placeholder { display: flex; align-items: center; justify-content: center; color: #ccc; }
.product-empty-state { grid-column: 1 / -1; text-align: center; color: #666; }
.icon-btn-28 { width: 28px !important; height: 28px !important; }

#pay-total { font-size: 2.2rem; margin: 0; }

.password-input {
    text-align: center;
    letter-spacing: 5px;
    font-size: 1.5rem;
    padding: 10px;
    width: 80%;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}

/* Integration: Out of Stock Styling */
.product-out-of-stock {
    opacity: 0.5;
    filter: grayscale(100%);
    cursor: not-allowed !important;
    position: relative;
}
.out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    text-align: center;
    width: 80%;
}