/* ========== PROFESSIONAL LOGIN DESIGN ========== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 50%, #1a365d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.login-box {
    background: white;
    max-width: 450px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

/* Top Blue Section */
.login-top-section {
    background: linear-gradient(135deg, #1a365d 0%, #2d5f8f 100%);
    padding: 50px 30px 40px;
    text-align: center;
    position: relative;
}

.brand-logo-circle {
    width: 110px;
    height: 110px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.brand-logo-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 1.5px;
    color: white;
    background: none !important;
    padding: 0 !important;
}

.brand-tagline {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    font-style: italic;
    color: white;
    font-weight: 300;
}

/* Form Section */
.login-form-section {
    padding: 40px 40px 40px;
    background: white;
}

.welcome-title {
    font-size: 26px;
    color: #1a365d;
    margin: 0 0 6px 0;
    font-weight: 700;
    background: none !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wave {
    display: inline-block;
    animation: waveHand 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    40% { transform: rotate(14deg); }
    50% { transform: rotate(0deg); }
}

.welcome-subtitle {
    color: #718096;
    font-size: 14px;
    margin: 0 0 25px 0;
}

.login-error {
    display: none;
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: center;
    animation: shake 0.4s;
}

.login-error.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Form Groups */
.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
}

/* Input Wrapper with Icon */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 16px;
    z-index: 2;
    opacity: 0.5;
    pointer-events: none;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 13px 15px 13px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f7fafc;
    color: #2d3748;
    box-sizing: border-box;
    font-family: inherit;
}

.login-form input#loginPassword {
    padding-right: 50px !important;
}

.login-form input:focus {
    outline: none;
    border-color: #2c5282;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

/* Password Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 18px;
    opacity: 0.5;
    z-index: 3;
    border-radius: 6px;
    transition: all 0.2s;
}

.password-toggle-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
}

/* Sign In Button */
.btn-signin {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a365d 0%, #2d5f8f 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(26, 54, 93, 0.4);
}

.btn-signin:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .login-box {
        max-width: 100%;
    }
    
    .login-top-section {
        padding: 35px 20px 30px;
    }
    
    .login-form-section {
        padding: 30px 25px;
    }
    
    .brand-logo-circle {
        width: 90px;
        height: 90px;
    }
    
    .brand-title {
        font-size: 18px;
    }
    
    .welcome-title {
        font-size: 22px;
    }
}
    
    .login-logo-section {
        padding: 30px 20px 25px;
    }
    
    .login-form-section {
        padding: 25px 25px 20px;
    }
    
    .brand-title {
        font-size: 24px;
    }
    
    .welcome-title {
        font-size: 20px;
    }
}
    
    .login-left {
        padding: 30px 25px;
        min-height: auto;
    }
    
    .login-features {
        display: none;
    }
    
    .brand-title {
        font-size: 24px;
    }
    
    .brand-logo {
        width: 70px;
        height: 70px;
    }
    
    .login-right {
        padding: 40px 30px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .login-footer-brand {
        margin-top: 15px;
    }
}

/* ========== GENERAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

h1 {
    text-align: center;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    margin-bottom: 0;
}

/* ========== BACKUP CONTAINER ========== */
.backup-container {
    background-color: #ecf0f1;
    padding: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    border-bottom: 2px solid #bdc3c7;
}

.btn-backup,
.btn-restore {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-backup {
    background-color: #16a085;
    color: white;
}

.btn-backup:hover {
    background-color: #138d75;
}

.btn-restore {
    background-color: #2980b9;
    color: white;
}

.btn-restore:hover {
    background-color: #1f6391;
}

/* ========== NAVIGATION ========== */
nav {
    background-color: #34495e;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

nav ul li a:hover {
    background-color: #2c3e50;
}

nav ul li a.active {
    background-color: #2c3e50;
    border-bottom: 3px solid #3498db;
    font-weight: bold;
}

/* ========== SECTIONS ========== */
section {
    display: none;
    background-color: white;
    margin: 20px auto;
    padding: 30px;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section.active {
    display: block;
}

section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

section h3 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 15px;
}

/* ========== FORMS ========== */
form {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 2px solid #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-row-full {
    margin-bottom: 15px;
}

form input,
form select {
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
}

form input:focus,
form select:focus {
    outline: none;
    border-color: #3498db;
}

form button {
    width: 100%;
    padding: 14px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
}

form button:hover {
    background-color: #229954;
}

/* ========== INVENTORY STATS ========== */
#inventoryStats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
}

#inventoryStats span {
    background-color: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 5px;
}

#inventoryStats strong {
    display: block;
    font-size: 18px;
    margin-top: 5px;
}

/* ========== TABLES ========== */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

table thead {
    background-color: #34495e;
    color: white;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

table tbody tr.low-stock {
    background-color: #ffe6e6;
    color: #c0392b;
}

table tbody tr.out-of-stock {
    background-color: #fadbd8;
    color: #c0392b;
}

/* ========== BUTTONS ========== */
.btn-edit,
.btn-delete,
.btn-restock,
.btn-view,
.btn-view-receipt {
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 12px;
    color: white;
}

.btn-edit { background-color: #3498db; }
.btn-edit:hover { background-color: #2980b9; }

.btn-delete { background-color: #e74c3c; }
.btn-delete:hover { background-color: #c0392b; }

.btn-restock { background-color: #27ae60; }
.btn-restock:hover { background-color: #229954; }

.btn-view { background-color: #9b59b6; }
.btn-view:hover { background-color: #8e44ad; }

.btn-view-receipt { background-color: #3498db; }
.btn-view-receipt:hover { background-color: #2980b9; }

/* ========== POS CONTAINER ========== */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pos-left,
.pos-right {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.pos-left h3,
.pos-right h3 {
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

#posSearch,
#posCategory,
#paymentMethod {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
}

#posProductList {
    max-height: 500px;
    overflow-y: auto;
}

.pos-product-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.pos-product-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52,152,219,0.3);
}

.pos-product-item h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.pos-product-item p {
    margin: 3px 0;
    font-size: 13px;
    color: #7f8c8d;
}

.pos-product-item .price {
    color: #27ae60;
    font-weight: bold;
    font-size: 16px;
}

/* ========== POS QUANTITY CONTROLS ========== */
.pos-qty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.pos-qty-btn {
    width: 40px;
    height: 35px;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.pos-qty-btn:hover {
    background-color: #2980b9;
}

.pos-qty-btn.small {
    width: 35px;
    background-color: #9b59b6;
}

.pos-qty-btn.small:hover {
    background-color: #8e44ad;
}

.pos-qty-input {
    width: 70px;
    height: 35px;
    text-align: center;
    border: 2px solid #3498db;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.btn-add-cart:hover {
    background-color: #229954;
}

/* ========== CART ========== */
#cartItems {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    background-color: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.cart-item-info h5 {
    margin: 0 0 5px 0;
}

.cart-item-info p {
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.qty-btn {
    background-color: #3498db;
    color: white;
    border: none;
    width: 35px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.qty-btn:hover {
    background-color: #2980b9;
}

.qty-btn.small {
    width: 30px;
    background-color: #9b59b6;
}

.qty-btn.small:hover {
    background-color: #8e44ad;
}

.qty-input {
    width: 60px;
    text-align: center;
    padding: 5px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-weight: bold;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-btn:hover {
    background-color: #c0392b;
}

/* ========== CART SUMMARY ========== */
.cart-summary {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.summary-row.total {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: bold;
    color: #27ae60;
}

.pos-right h4 {
    margin: 15px 0 8px 0;
    color: #34495e;
}

/* ========== CUSTOMER SELECT ========== */
.customer-select-container {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #3498db;
}

.customer-search-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.customer-search-wrapper input {
    width: 100%;
    padding: 12px;
    border: 2px solid #3498db;
    border-radius: 5px;
    font-size: 14px;
}

.customer-search-wrapper input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39, 174, 96, 0.3);
}

.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.suggestions-box.active {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #e8f4fd;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item .name {
    font-weight: bold;
    color: #2c3e50;
}

.suggestion-item .phone {
    font-size: 12px;
    color: #7f8c8d;
}

.suggestion-item .purchases {
    font-size: 11px;
    color: #27ae60;
    margin-top: 3px;
}

.suggestion-item.new-customer {
    background-color: #fff9e6;
    border-left: 4px solid #f39c12;
}

.suggestion-item.new-customer:hover {
    background-color: #fff3cd;
}

#customerPhone {
    width: 100%;
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
}

#customerPhone:focus {
    outline: none;
    border-color: #27ae60;
}

#customerPhone.disabled {
    background-color: #ecf0f1;
    color: #7f8c8d;
}

.customer-status {
    padding: 10px;
    border-radius: 5px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.customer-status.existing {
    display: block;
    background-color: #d5f5e3;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.customer-status.new {
    display: block;
    background-color: #fef9e7;
    color: #f39c12;
    border: 1px solid #f39c12;
}

/* ========== POS BUTTONS ========== */
.btn-checkout {
    width: 100%;
    padding: 15px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-checkout:hover {
    background-color: #229954;
}

.btn-clear {
    width: 100%;
    padding: 12px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-clear:hover {
    background-color: #7f8c8d;
}

/* ========== CUSTOMER STATS ========== */
#customerStats {
    display: flex;
    gap: 30px;
    background-color: #ecf0f1;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 25px;
    font-size: 15px;
}

.search-bar input:focus {
    outline: none;
    border-color: #3498db;
}

/* ========== CUSTOMER HISTORY ========== */
#customerHistoryContent {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px 0;
}

.history-item {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.history-item h4 {
    margin: 0 0 10px 0;
}

.history-item p {
    margin: 5px 0;
    font-size: 14px;
}

.history-item .amount {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.no-history {
    text-align: center;
    color: #95a5a6;
    padding: 30px;
}

/* ========== REPORTS ========== */
.report-filters {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 13px;
    font-weight: bold;
    color: #34495e;
}

.filter-group select {
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
}

.btn-filter {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.btn-filter:hover {
    background-color: #2980b9;
}

/* ========== REPORT CARDS ========== */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.summary-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.summary-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.card-icon {
    font-size: 40px;
}

.card-info h3 {
    margin: 0;
    font-size: 24px;
}

.card-info p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

/* ========== PAYMENT BREAKDOWN ========== */
.payment-breakdown,
.best-sellers {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.payment-breakdown h3,
.best-sellers h3 {
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.payment-stats,
#bestSellers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.payment-stat-item,
.best-seller-item {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.best-sellers {
    background-color: #fff9e6;
    border: 2px solid #f39c12;
}

.best-sellers h3 {
    color: #d68910;
    border-color: #f39c12;
}

.best-seller-item {
    border-color: #f39c12;
}

.best-seller-item .quantity {
    font-size: 18px;
    font-weight: bold;
    color: #e67e22;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 35px;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #000;
}

/* ========== RECEIPT ========== */
#receiptContent {
    padding: 30px;
    font-family: 'Courier New', monospace;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.receipt-header h2 {
    margin: 0 0 10px 0;
    color: #27ae60;
}

.receipt-header p {
    margin: 5px 0;
    color: #555;
}

.receipt-customer {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.receipt-customer p {
    margin: 5px 0;
}

.receipt-table {
    width: 100%;
    margin-bottom: 20px;
}

.receipt-table th {
    background-color: #34495e;
    color: white;
    padding: 10px;
}

.receipt-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

.receipt-totals {
    border-top: 2px solid #333;
    padding-top: 15px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.receipt-total {
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #333;
    color: #7f8c8d;
}

.receipt-buttons {
    padding: 20px;
    background-color: #f8f9fa;
    display: flex;
    gap: 10px;
}

.btn-print {
    flex: 1;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.btn-print:hover {
    background-color: #2980b9;
}

.btn-close-receipt {
    flex: 1;
    padding: 12px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-close-receipt:hover {
    background-color: #7f8c8d;
}

/* ========== PRINT ========== */
@media print {
    body * {
        visibility: hidden;
    }
    #receiptContent, #receiptContent * {
        visibility: visible;
    }
    #receiptContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .receipt-buttons, .close-modal {
        display: none;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap;
    }
    nav ul li a {
        padding: 10px 15px;
        font-size: 14px;
    }
    .pos-container {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .backup-container {
        flex-direction: column;
    }
    #inventoryStats {
        flex-direction: column;
    }
}/* ========== REPORT HEADER ========== */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.report-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.btn-print-report {
    padding: 12px 25px;
    background-color: #9b59b6;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-print-report:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
}

/* ========== PRINT REPORT STYLES ========== */
@media print {
    /* Hide everything first */
    body * {
        visibility: hidden;
    }
    
    /* Show only reports section when printing report */
    body.printing-report #reports,
    body.printing-report #reports * {
        visibility: visible;
    }
    
    body.printing-report #reports {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        margin: 0;
    }
    
    /* Hide buttons and filters when printing */
    body.printing-report .btn-print-report,
    body.printing-report .report-filters,
    body.printing-report .btn-view-receipt {
        display: none !important;
    }
    
    /* Show only receipt when printing receipt */
    body.printing-receipt #receiptContent,
    body.printing-receipt #receiptContent * {
        visibility: visible;
    }
    
    body.printing-receipt #receiptContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    body.printing-receipt .receipt-buttons,
    body.printing-receipt .close-modal {
        display: none !important;
    }
    
    /* Make cards look good in print */
    .summary-card {
        background: #f0f0f0 !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .card-info h3,
    .card-info p {
        color: #333 !important;
    }
    
    /* Table styling for print */
    table {
        border: 1px solid #333;
    }
    
    table th {
        background-color: #333 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Add report title for print */
    .print-title {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
    }
}

.print-title {
    display: none;
}
/* ========== STOCK IN FORM ========== */
.stock-in-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border: 2px solid #3498db;
}

.stock-in-form h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.5rem;
    border-bottom: 3px solid #27ae60;
    padding-bottom: 10px;
}

.stock-in-form .form-group {
    margin-bottom: 18px;
}

.stock-in-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.stock-in-form select,
.stock-in-form input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: white;
}

.stock-in-form select:focus,
.stock-in-form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.stock-in-form select:disabled {
    background-color: #ecf0f1;
    cursor: not-allowed;
    color: #95a5a6;
}

.stock-in-form select option {
    padding: 10px;
}

/* Product Info Box */
.product-info {
    background: linear-gradient(135deg, #e8f8f5 0%, #d5f5e3 100%);
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-info .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(39, 174, 96, 0.2);
}

.product-info .info-row:last-child {
    border-bottom: none;
}

.product-info .label {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 14px;
}

.product-info .value {
    color: #2c3e50;
    font-weight: 700;
    font-size: 15px;
    text-align: right;
    max-width: 60%;
}

.product-info .value.in-stock {
    color: #27ae60;
}

.product-info .value.no-stock {
    color: #e74c3c;
}

/* Stock In Button */
.btn-stock-in {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-stock-in:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-stock-in:active {
    transform: translateY(-1px);
}

/* ========== CUSTOM PRODUCT SECTION ========== */
.custom-product-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-top: 25px;
    border: 2px solid #bdc3c7;
    overflow: hidden;
}

.custom-product-section summary {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #7f8c8d;
    background-color: #f8f9fa;
    transition: all 0.3s;
    list-style: none;
}

.custom-product-section summary::-webkit-details-marker {
    display: none;
}

.custom-product-section summary::before {
    content: "➕ ";
}

.custom-product-section[open] summary::before {
    content: "➖ ";
}

.custom-product-section summary:hover {
    color: #3498db;
    background-color: #ecf0f1;
}

.custom-product-section[open] summary {
    border-bottom: 2px solid #bdc3c7;
}

.custom-product-form {
    padding: 20px;
}

.custom-product-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.custom-product-form input,
.custom-product-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.custom-product-form input:focus,
.custom-product-form select:focus {
    outline: none;
    border-color: #3498db;
}

.btn-add-custom {
    width: 100%;
    padding: 14px;
    background-color: #9b59b6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-custom:hover {
    background-color: #8e44ad;
}

/* ========== INVENTORY TABLE IMPROVEMENTS ========== */
.inventory-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

/* Category badge in dropdowns */
.stock-in-form select option {
    padding: 8px;
}

/* Quick Stats Bar */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.quick-stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.quick-stat-item:nth-child(2) {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.quick-stat-item:nth-child(3) {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.quick-stat-item:nth-child(4) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.quick-stat-item h4 {
    margin: 0;
    font-size: 24px;
}

.quick-stat-item p {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

/* ========== RESPONSIVE FOR STOCK IN FORM ========== */
@media (max-width: 768px) {
    .stock-in-form {
        padding: 20px 15px;
    }
    
    .product-info .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .product-info .value {
        max-width: 100%;
        text-align: left;
    }
    
    .btn-stock-in {
        padding: 14px;
        font-size: 1rem;
    }
}
/* ========== LOGIN SYSTEM ========== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 {
    background: none;
    color: #2c3e50;
    padding: 0;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.login-container h2 {
    color: #34495e;
    margin-bottom: 30px;
    font-weight: normal;
    font-size: 1.1rem;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.login-form input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.login-form .btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.login-form .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.login-error {
    background-color: #fee;
    color: #e74c3c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #e74c3c;
}

.login-error.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #95a5a6;
    font-size: 13px;
}

/* User info bar */
.user-bar {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info .user-name {
    font-weight: bold;
}

.user-info .user-role {
    background-color: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.user-role.admin {
    background-color: #e74c3c;
}

.user-role.sales {
    background-color: #3498db;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: #c0392b;
}

/* Hide elements based on role */
body.role-sales nav ul li a[onclick*="inventory"],
body.role-sales nav ul li a[onclick*="customers"],
body.role-sales nav ul li a[onclick*="reports"] {
    display: none;
}

body.role-sales .backup-container {
    display: none;
}

/* Locked nav item style */
nav ul li a.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Settings section for managing users */
.user-management {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid #3498db;
}

.user-management h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.user-list {
    margin-top: 15px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.user-item .user-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-item .username {
    font-weight: bold;
    color: #2c3e50;
}

.user-item .role-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.user-item .role-badge.admin {
    background-color: #e74c3c;
}

.user-item .role-badge.sales {
    background-color: #3498db;
}

.add-user-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.add-user-form input,
.add-user-form select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.add-user-form button {
    padding: 10px 20px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.add-user-form button:hover {
    background-color: #229954;
}

@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .user-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .add-user-form {
        grid-template-columns: 1fr;
    }
}
/* ========== BARCODE SCANNER ========== */
.barcode-scanner-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px 50px;
    border-radius: 15px;
    z-index: 10000;
    text-align: center;
    display: none;
    animation: scanPulse 0.5s ease;
}

.barcode-scanner-status.show {
    display: block;
}

.barcode-scanner-status.success {
    background: rgba(39, 174, 96, 0.95);
}

.barcode-scanner-status.error {
    background: rgba(231, 76, 60, 0.95);
}

.barcode-scanner-status .scan-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.barcode-scanner-status .scan-message {
    font-size: 18px;
    font-weight: bold;
}

.barcode-scanner-status .scan-details {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.9;
}

@keyframes scanPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Scanner indicator in nav */
.scanner-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 15px;
}

.scanner-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: #27ae60;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Barcode input highlight */
.barcode-input-active {
    border-color: #9b59b6 !important;
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.5) !important;
}

/* Barcode badge on products */
.barcode-badge {
    display: inline-block;
    background: #34495e;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    margin-top: 5px;
}

/* Scanner help box */
.scanner-help {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.scanner-help .help-icon {
    font-size: 30px;
}

.scanner-help .help-text h4 {
    margin: 0 0 5px 0;
}

.scanner-help .help-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Barcode input in forms */
.barcode-input-group {
    position: relative;
}

.barcode-input-group input {
    padding-right: 45px;
}

.barcode-input-group .barcode-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #9b59b6;
}

/* Product card with barcode */
.pos-product-item .barcode-badge {
    background: #9b59b6;
}

/* Scan animation overlay */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #9b59b6, transparent);
    z-index: 9999;
    display: none;
    animation: scanLine 0.3s ease;
}

.scan-line.active {
    display: block;
}

@keyframes scanLine {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
/* ========== BARCODE LABEL PRINTING ========== */
.barcode-label-modal {
    padding: 30px;
}

.barcode-label-preview {
    border: 2px dashed #bdc3c7;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    background: white;
}

.barcode-label {
    display: inline-block;
    padding: 15px 25px;
    border: 1px solid #333;
    background: white;
    text-align: center;
}

.barcode-label .product-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.barcode-label .barcode-image {
    font-family: 'Libre Barcode 39', monospace;
    font-size: 50px;
    letter-spacing: 5px;
    line-height: 1;
}

.barcode-label .barcode-text {
    font-family: monospace;
    font-size: 14px;
    margin-top: 5px;
    letter-spacing: 2px;
}

.barcode-label .price-tag {
    font-size: 16px;
    font-weight: bold;
    margin-top: 8px;
    color: #27ae60;
}

.label-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.label-options label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
}

.label-options input,
.label-options select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.btn-print-labels {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-print-labels:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

@media print {
    body.printing-labels * {
        visibility: hidden;
    }
    
    body.printing-labels .barcode-labels-print,
    body.printing-labels .barcode-labels-print * {
        visibility: visible;
    }
    
    body.printing-labels .barcode-labels-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .barcode-label {
        page-break-inside: avoid;
        margin: 5mm;
    }
}

.barcode-labels-print {
    display: none;
}

body.printing-labels .barcode-labels-print {
    display: block;
}
/* ========== CHANGE PASSWORD ========== */
.change-password-btn {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    transition: all 0.3s;
}

.change-password-btn:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.password-modal {
    padding: 30px;
}

.password-modal h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.password-modal p.subtitle {
    color: #7f8c8d;
    margin-bottom: 25px;
}

.password-form .form-group {
    margin-bottom: 20px;
}

.password-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.password-form input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.password-form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.password-form input.error {
    border-color: #e74c3c;
    background-color: #fef0f0;
}

.password-form input.success {
    border-color: #27ae60;
    background-color: #f0fef4;
}

/* Password input with toggle - toggle on LEFT */
.password-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-input-wrapper .toggle-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.password-input-wrapper .toggle-btn:hover {
    background-color: #e8f4fd;
    border-color: #3498db;
}

.password-input-wrapper input {
    flex: 1;
}

.password-strength {
    margin-top: 8px;
    height: 5px;
    border-radius: 3px;
    background-color: #e0e0e0;
    overflow: hidden;
}

.password-strength .strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
}

.password-strength .strength-bar.weak {
    width: 33%;
    background-color: #e74c3c;
}

.password-strength .strength-bar.medium {
    width: 66%;
    background-color: #f39c12;
}

.password-strength .strength-bar.strong {
    width: 100%;
    background-color: #27ae60;
}

.password-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.password-hint.error {
    color: #e74c3c;
}

.password-hint.success {
    color: #27ae60;
}

.password-requirements {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.password-requirements h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #34495e;
}

.password-requirements ul {
    margin: 0;
    padding-left: 20px;
}

.password-requirements li {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.password-requirements li.valid {
    color: #27ae60;
}

.password-requirements li.valid::marker {
    content: "✅ ";
}

.btn-change-password {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-change-password:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.btn-change-password:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* User item actions */
.user-item .user-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.btn-reset-password {
    background-color: #f39c12;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-reset-password:hover {
    background-color: #e67e22;
}
/* ========== SPLIT PAYMENT ========== */
.payment-section {
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.payment-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.payment-method-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.payment-method-item.active {
    border-color: #27ae60;
    background: #f0fff4;
}

.payment-method-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.payment-method-item label {
    flex: 1;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-method-item input[type="number"] {
    width: 120px;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-align: right;
}

.payment-method-item input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

.payment-method-item input[type="number"]:disabled {
    background: #f5f5f5;
    color: #999;
}

.payment-summary {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    border: 2px solid #e0e0e0;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.payment-summary-row.total {
    border-top: 2px solid #333;
    margin-top: 8px;
    padding-top: 10px;
    font-weight: bold;
    font-size: 16px;
}

.payment-summary-row.remaining {
    color: #e74c3c;
    font-weight: bold;
}

.payment-summary-row.overpaid {
    color: #f39c12;
    font-weight: bold;
}

.payment-summary-row.complete {
    color: #27ae60;
    font-weight: bold;
}

.btn-full-amount {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 5px;
}

.btn-full-amount:hover {
    background: #8e44ad;
}

/* Receipt split payment */
.receipt-payments {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.receipt-payments p {
    margin: 5px 0;
    font-size: 13px;
}

.receipt-payments .method {
    display: flex;
    justify-content: space-between;
}
/* ========== ENHANCED REPORTS ========== */
.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-export {
    padding: 10px 20px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.report-filters .filter-group input {
    width: 200px;
}

/* Product details in sales table */
.product-list-cell {
    max-width: 300px;
}

.product-list-cell .product-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.product-list-cell .product-item:last-child {
    border-bottom: none;
}

.product-list-cell .product-name {
    color: #2c3e50;
    font-weight: 500;
}

.product-list-cell .product-qty {
    color: #7f8c8d;
    white-space: nowrap;
    margin-left: 10px;
}

.product-list-cell .product-price {
    color: #27ae60;
    font-weight: bold;
    white-space: nowrap;
    margin-left: 10px;
}

/* Export notification */
.export-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 10000;
    animation: slideUp 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .report-actions {
        width: 100%;
    }
    
    .btn-export {
        flex: 1;
        text-align: center;
    }
    
    .report-filters .filter-group input {
        width: 100%;
    }
}
/* ========== THERMAL RECEIPT STYLE ========== */
#receiptModal .modal-content {
    max-width: 320px;
    background: white;
    padding: 0;
}

#receiptContent {
    padding: 20px 15px;
    font-family: 'Courier New', monospace;
    color: #000;
    background: white;
    font-size: 12px;
    line-height: 1.4;
}

.receipt-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
}

.receipt-header h2 {
    margin: 0 0 5px 0;
    color: #000;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receipt-header p {
    margin: 2px 0;
    color: #000;
    font-size: 11px;
}

.receipt-header .company-phone {
    font-size: 12px;
    font-weight: bold;
}

.receipt-header .company-email {
    font-style: italic;
    font-size: 10px;
}

.receipt-info {
    margin: 10px 0;
    font-size: 11px;
}

.receipt-info p {
    margin: 3px 0;
    color: #000;
}

.receipt-info .label {
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
}

.receipt-number-box {
    text-align: center;
    margin: 10px 0;
}

.receipt-number-box .receipt-label {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 5px;
}

.receipt-barcode {
    text-align: center;
    margin: 8px 0;
    font-family: 'Libre Barcode 39', monospace;
    font-size: 40px;
    line-height: 1;
    letter-spacing: 0;
}

.receipt-barcode-text {
    text-align: center;
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.receipt-sale-type {
    margin: 10px 0;
    font-size: 11px;
}

.receipt-sale-type p {
    margin: 3px 0;
    font-weight: bold;
}

.receipt-table {
    width: 100%;
    margin: 10px 0;
    border-collapse: collapse;
    font-size: 10px;
}

.receipt-table thead tr {
    border-bottom: 1px solid #000;
}

.receipt-table th {
    background: white !important;
    color: #000 !important;
    padding: 5px 3px;
    text-align: left;
    font-weight: bold;
    font-size: 10px;
}

.receipt-table th:nth-child(2),
.receipt-table th:nth-child(3),
.receipt-table th:nth-child(4) {
    text-align: right;
}

.receipt-table td {
    padding: 4px 3px;
    border: none;
    font-size: 10px;
    vertical-align: top;
}

.receipt-table td:nth-child(2),
.receipt-table td:nth-child(3),
.receipt-table td:nth-child(4) {
    text-align: right;
}

.receipt-table tfoot tr {
    border-top: 1px solid #000;
}

.receipt-table tfoot td {
    padding-top: 8px;
    font-weight: bold;
}

.receipt-totals {
    border-top: none;
    padding-top: 10px;
    margin-top: 15px;
}

.receipt-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 8px 0;
    font-size: 16px;
    font-weight: bold;
}

.receipt-grand-total .label {
    text-transform: uppercase;
}

.receipt-payment-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 14px;
    font-weight: bold;
}

.receipt-divider {
    border-top: 1px dashed #000;
    margin: 10px 0;
}

.receipt-divider-solid {
    border-top: 2px solid #000;
    margin: 10px 0;
}

.receipt-message {
    text-align: center;
    margin: 15px 0;
    font-size: 11px;
    font-style: italic;
}

.receipt-thank-you {
    text-align: center;
    margin: 15px 0 10px;
    font-size: 11px;
}

.receipt-software {
    text-align: center;
    margin-top: 15px;
    font-size: 10px;
    color: #000;
}

.receipt-buttons {
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    border-top: 1px solid #ddd;
}

/* PRINT STYLES */
@media print {
    body * {
        visibility: hidden;
    }
    
    #receiptModal,
    #receiptModal * {
        visibility: visible;
    }
    
    #receiptModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
    }
    
    #receiptModal .modal-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 80mm;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    
    #receiptContent {
        padding: 5mm;
        font-size: 10pt;
    }
    
    .receipt-buttons,
    .close-modal {
        display: none !important;
    }
    
    .receipt-barcode {
        font-size: 30pt;
    }
    
    @page {
        size: 80mm auto;
        margin: 0;
    }
}
/* ========== RECEIPT CENTER ALIGNMENT ========== */
#receiptContent {
    text-align: center !important;
}

#receiptContent * {
    text-align: center;
}

/* Keep table cells aligned properly */
.receipt-table th:first-child,
.receipt-table td:first-child {
    text-align: left !important;
}

.receipt-table th:nth-child(2),
.receipt-table th:nth-child(3),
.receipt-table th:nth-child(4),
.receipt-table td:nth-child(2),
.receipt-table td:nth-child(3),
.receipt-table td:nth-child(4) {
    text-align: right !important;
}

/* Center the table itself */
.receipt-table {
    margin: 10px auto !important;
    width: 100%;
}

/* Keep receipt info labels readable */
.receipt-info {
    text-align: left !important;
    display: inline-block;
    margin: 10px auto !important;
}

.receipt-info p {
    text-align: left !important;
}

/* Center modal content */
#receiptModal .modal-content {
    margin: 3% auto !important;
}

/* Make sure totals are centered */
.receipt-grand-total,
.receipt-payment-row {
    text-align: left !important;
    max-width: 250px;
    margin: 5px auto !important;
    display: flex !important;
    justify-content: space-between !important;
}

/* PRINT - keep center alignment */
@media print {
    #receiptContent {
        text-align: center !important;
    }
    
    #receiptContent * {
        text-align: center;
    }
    
    .receipt-table th:first-child,
    .receipt-table td:first-child {
        text-align: left !important;
    }
    
    .receipt-table th:nth-child(2),
    .receipt-table th:nth-child(3),
    .receipt-table th:nth-child(4),
    .receipt-table td:nth-child(2),
    .receipt-table td:nth-child(3),
    .receipt-table td:nth-child(4) {
        text-align: right !important;
    }
    
    .receipt-info,
    .receipt-info p {
        text-align: left !important;
    }
}
/* ========== PRINT RECEIPT - CENTER ALIGNMENT ========== */
@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }
    
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 80mm !important;
    }
    
    body * {
        visibility: hidden;
    }
    
    #receiptModal,
    #receiptModal * {
        visibility: visible;
    }
    
    #receiptModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 80mm !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #receiptModal .modal-content {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: white !important;
    }
    
    #receiptContent {
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 auto !important;
        padding: 3mm !important;
        text-align: center !important;
        font-family: 'Courier New', monospace !important;
        color: #000 !important;
        background: white !important;
        font-size: 9pt !important;
        box-sizing: border-box !important;
    }
    
    #receiptContent * {
        color: #000 !important;
        text-align: center !important;
    }
    
    #receiptContent h2 {
        text-align: center !important;
        font-size: 11pt !important;
        margin: 0 0 3mm 0 !important;
    }
    
    #receiptContent p {
        text-align: center !important;
        margin: 1mm 0 !important;
    }
    
    /* Table needs special handling */
    #receiptContent table {
        width: 100% !important;
        margin: 2mm auto !important;
        border-collapse: collapse !important;
    }
    
    #receiptContent table th,
    #receiptContent table td {
        text-align: left !important;
        padding: 1mm !important;
        font-size: 8pt !important;
    }
    
    #receiptContent table th:nth-child(2),
    #receiptContent table th:nth-child(3),
    #receiptContent table th:nth-child(4),
    #receiptContent table td:nth-child(2),
    #receiptContent table td:nth-child(3),
    #receiptContent table td:nth-child(4) {
        text-align: right !important;
    }
    
    /* Flex containers for totals */
    #receiptContent div[style*="display:flex"],
    #receiptContent div[style*="display: flex"] {
        display: flex !important;
        justify-content: space-between !important;
        max-width: 60mm !important;
        margin: 1mm auto !important;
    }
    
    /* Hide buttons and close X */
    .receipt-buttons,
    .close-modal {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Barcode */
    #receiptContent div[style*="Libre Barcode"] {
        font-size: 30pt !important;
        text-align: center !important;
    }
}

/* Fix login alignment - safe version */
.login-overlay {
    justify-content: center;
    align-items: center;
}

.login-container {
    margin: 0 auto;
    text-align: center;
}

#loginLogo {
    text-align: center;
}

#loginLogo img {
    max-width: 80px;
    max-height: 80px;
    margin: 0 auto;
    display: block;
}
@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* ========== BULK STOCK IN ========== */
.bulk-stock-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 15px;
    align-items: center;
    background: white;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.bulk-stock-item:hover {
    border-color: #9b59b6;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.2);
}

.bulk-stock-item.has-quantity {
    border-color: #27ae60;
    background: #f0fff4;
}

.bulk-stock-item .product-info {
    flex: 1;
}

.bulk-stock-item .product-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.bulk-stock-item .product-meta {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
}

.bulk-stock-item .current-stock {
    text-align: center;
    padding: 5px 10px;
    background: #ecf0f1;
    border-radius: 5px;
    font-size: 12px;
    min-width: 80px;
}

.bulk-stock-item .current-stock strong {
    display: block;
    font-size: 16px;
    color: #2c3e50;
}

.bulk-stock-item .qty-input-bulk {
    width: 80px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.bulk-stock-item .qty-input-bulk:focus {
    outline: none;
    border-color: #9b59b6;
}

.bulk-stock-item .price-info {
    text-align: right;
    color: #27ae60;
    font-weight: bold;
    min-width: 100px;
}

.bulk-category-header {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 15px 0 10px 0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bulk-summary {
    background: #e8f4fd;
    border: 2px solid #3498db;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: bold;
}

.bulk-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.bulk-summary-row.total {
    border-top: 2px solid #3498db;
    padding-top: 8px;
    margin-top: 8px;
    font-size: 18px;
    color: #27ae60;
}

@media (max-width: 768px) {
    .bulk-stock-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .bulk-stock-item .current-stock,
    .bulk-stock-item .qty-input-bulk,
    .bulk-stock-item .price-info {
        width: 100%;
        text-align: left;
    }
}
/* ========== BULK ADD CATALOG MODAL ========== */
.bulk-add-modal {
    padding: 30px;
    max-width: 800px !important;
    width: 95% !important;
}

.bulk-add-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    align-items: center;
}

.bulk-add-row input,
.bulk-add-row select {
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.bulk-add-row input:focus,
.bulk-add-row select:focus {
    outline: none;
    border-color: #9b59b6;
}

.bulk-add-row .row-number {
    font-weight: bold;
    color: #7f8c8d;
    padding: 0 5px;
}

.bulk-add-row .remove-row {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.bulk-add-row .remove-row:hover {
    background: #c0392b;
}

.bulk-add-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.bulk-add-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

#bulkAddCategoryRow {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

#bulkAddCategoryRow label {
    color: white !important;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

#bulkAddCategoryRow select,
#bulkAddCategoryRow input {
    width: 100%;
    padding: 10px;
    border: 2px solid white;
    border-radius: 6px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .bulk-add-row {
        grid-template-columns: 1fr;
    }
}
/* ========== PROFESSIONAL NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-left: 5px solid #3498db;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}

.toast.success {
    border-left-color: #27ae60;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast.info {
    border-left-color: #3498db;
}

.toast .toast-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.toast .toast-content {
    flex: 1;
}

.toast .toast-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 3px;
    font-size: 14px;
}

.toast .toast-message {
    color: #7f8c8d;
    font-size: 13px;
}

.toast .toast-close {
    color: #bdc3c7;
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.toast.closing {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

/* CONFIRM DIALOG */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: zoomIn 0.3s ease;
}

.confirm-dialog .confirm-icon {
    font-size: 60px;
    text-align: center;
    margin-bottom: 15px;
}

.confirm-dialog .confirm-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

.confirm-dialog .confirm-message {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
    white-space: pre-line;
}

.confirm-dialog .confirm-buttons {
    display: flex;
    gap: 10px;
}

.confirm-dialog .confirm-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-dialog .btn-confirm {
    background: #3498db;
    color: white;
}

.confirm-dialog .btn-confirm:hover {
    background: #2980b9;
}

.confirm-dialog .btn-confirm.danger {
    background: #e74c3c;
}

.confirm-dialog .btn-confirm.danger:hover {
    background: #c0392b;
}

.confirm-dialog .btn-confirm.success {
    background: #27ae60;
}

.confirm-dialog .btn-confirm.success:hover {
    background: #229954;
}

.confirm-dialog .btn-cancel {
    background: #ecf0f1;
    color: #7f8c8d;
}

.confirm-dialog .btn-cancel:hover {
    background: #bdc3c7;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* ========== NEW POS LAYOUT ========== */

/* POS Header */
.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.pos-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.pos-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pos-stats {
    background: #ecf0f1;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #2c3e50;
}

.pos-stats strong {
    color: #27ae60;
    font-size: 16px;
    margin-left: 5px;
}

.btn-theme-toggle {
    padding: 8px 16px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* POS Container - NEW LAYOUT */
.pos-container-new {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    height: calc(100vh - 250px);
    min-height: 600px;
}

/* PRODUCTS SECTION (LEFT) */
.pos-products-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-search-bar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.search-wrapper {
    position: relative;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.search-wrapper input:focus {
    outline: none;
    border-color: #3498db;
}

.category-filter {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding-right: 5px;
    flex: 1;
}

.products-grid::-webkit-scrollbar {
    width: 8px;
}

.products-grid::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 10px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    color: #95a5a6;
    padding: 40px;
    font-size: 16px;
}

/* PRODUCT CARDS */
.pos-product-item {
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
}

.pos-product-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52,152,219,0.2);
}

.pos-product-item h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-product-item p {
    margin: 3px 0;
    font-size: 11px;
    color: #7f8c8d;
}

.pos-product-item .price {
    color: #27ae60;
    font-weight: bold;
    font-size: 16px;
    margin: 8px 0;
}

.pos-product-item .stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.pos-product-item .stock-badge.low {
    background: #f39c12;
}

.pos-qty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 8px 0;
}

.pos-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 5px;
    background: #ecf0f1;
    color: #2c3e50;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-qty-btn:hover {
    background: #3498db;
    color: white;
}

.pos-qty-btn.small {
    width: 24px;
    height: 28px;
    font-size: 11px;
    background: #ecf0f1;
}

.pos-qty-input {
    width: 50px;
    height: 28px;
    text-align: center;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
}

.btn-add-cart {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.btn-add-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(39,174,96,0.3);
}

/* CART SECTION (RIGHT) */
.pos-cart-section {
    background: white;
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.cart-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: white;
    border: none;
    padding: 0;
    font-size: 16px;
}

.btn-clear-cart-mini {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.btn-clear-cart-mini:hover {
    background: #e74c3c;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: 250px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-cart-icon {
    font-size: 60px;
    margin-bottom: 10px;
    opacity: 0.3;
}

.empty-cart p {
    font-size: 16px;
    margin: 5px 0;
    font-weight: bold;
}

.empty-cart small {
    font-size: 12px;
    color: #bdc3c7;
}

.cart-item {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.cart-item-info h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #2c3e50;
}

.cart-item-info p {
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.qty-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #3498db;
    color: white;
}

.qty-btn.small {
    width: 24px;
    font-size: 11px;
}

.qty-input {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 2px solid #ecf0f1;
    border-radius: 4px;
    font-weight: bold;
}

.remove-btn {
    background: #fee;
    color: #e74c3c;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #e74c3c;
    color: white;
}

/* TOTAL SECTION */
.cart-total-section {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 14px;
    opacity: 0.9;
    letter-spacing: 2px;
}

.total-amount {
    font-size: 24px;
    font-weight: bold;
}

/* SECTION BLOCKS */
.cart-section-block {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
}

.cart-section-block h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-section-block input,
.cart-section-block select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
}

.cart-section-block input:focus,
.cart-section-block select:focus {
    outline: none;
    border-color: #3498db;
}

/* PAYMENT METHODS - FIXED */
.payment-methods-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method-card {
    background: #f8f9fa;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s;
}

.payment-method-card:hover {
    border-color: #3498db;
    background: white;
}

.payment-method-card.active {
    border-color: #27ae60;
    background: #f0fff4;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 10px;
    user-select: none;
}

.payment-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

.payment-label .payment-icon {
    font-size: 22px;
}

.payment-label .payment-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.payment-input-row {
    display: flex;
    gap: 8px;
    margin-left: 30px;
}

.payment-input-row input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    text-align: right;
}

.payment-input-row input:focus {
    outline: none;
    border-color: #3498db;
    background: #f0f8ff;
}

.payment-input-row input:disabled {
    background: #f5f5f5;
    color: #bdc3c7;
    cursor: not-allowed;
}

.payment-input-row input:not(:disabled) {
    background: white;
    border-color: #27ae60;
}

.btn-full-mini {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-full-mini:hover {
    background: #8e44ad;
    transform: scale(1.05);
}

/* CART BADGE */
.cart-count-badge {
    background: #27ae60;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    margin-left: 8px;
}

.btn-view-cart {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-view-cart:hover {
    background: #2980b9;
}

/* ========== CART MODAL ========== */
.cart-modal-content {
    max-width: 700px !important;
    width: 95% !important;
    padding: 0 !important;
}

.cart-modal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-modal-header h2 {
    margin: 0;
    color: white;
    border: none;
    padding: 0;
}

.cart-modal-body {
    padding: 20px 25px;
    max-height: 500px;
    overflow-y: auto;
}

.cart-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.cart-modal-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-modal-item-info {
    flex: 1;
}

.cart-modal-item-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 16px;
}

.cart-modal-item-info .price-info {
    color: #7f8c8d;
    font-size: 13px;
}

.cart-modal-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-modal-item-controls .qty-btn-large {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: #ecf0f1;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-modal-item-controls .qty-btn-large:hover {
    background: #3498db;
    color: white;
}

.cart-modal-item-controls .qty-display {
    min-width: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    border: 2px solid #ecf0f1;
}

.cart-modal-item-controls .item-total {
    min-width: 100px;
    text-align: right;
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
}

.cart-modal-item-controls .remove-large {
    background: #fee;
    color: #e74c3c;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.cart-modal-item-controls .remove-large:hover {
    background: #e74c3c;
    color: white;
}

.cart-modal-footer {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 0 0 8px 8px;
    border-top: 2px solid #ecf0f1;
}

.cart-modal-totals {
    margin-bottom: 15px;
}

.cart-modal-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.cart-modal-total-row.grand {
    border-top: 2px solid #2c3e50;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
}

.cart-modal-buttons {
    display: flex;
    gap: 10px;
}

.cart-modal-buttons button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-continue-shopping {
    background: #ecf0f1;
    color: #7f8c8d;
}

.btn-continue-shopping:hover {
    background: #bdc3c7;
}

.btn-proceed-payment {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-proceed-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39,174,96,0.3);
}

/* PAYMENT SUMMARY */
.payment-summary-new {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.payment-summary-row.remaining {
    color: #e74c3c;
    font-weight: bold;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    margin-top: 4px;
}

.payment-summary-row.complete {
    color: #27ae60;
    font-weight: bold;
}

.payment-summary-row.overpaid {
    color: #f39c12;
    font-weight: bold;
}

/* CHECKOUT BUTTON */
.btn-checkout-new {
    margin: 0 20px 20px 20px;
    padding: 16px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-checkout-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39,174,96,0.4);
}

.checkout-icon {
    font-size: 20px;
}

/* ========== DARK MODE ========== */
body.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode section {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #e0e0e0;
}

body.dark-mode .pos-products-section {
    background: #0f3460;
}

body.dark-mode .pos-product-item {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-mode .pos-product-item h4 {
    color: #e0e0e0;
}

body.dark-mode .pos-product-item p {
    color: #a0a0a0;
}

body.dark-mode .pos-cart-section {
    background: #16213e;
    border-color: #0f3460;
}

body.dark-mode .cart-item {
    background: #0f3460;
    border-left-color: #e94560;
}

body.dark-mode .cart-item-info h5 {
    color: #e0e0e0;
}

body.dark-mode .cart-section-block {
    border-bottom-color: #0f3460;
}

body.dark-mode .cart-section-block input,
body.dark-mode .cart-section-block select {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #16213e;
}

body.dark-mode .payment-method-card {
    background: #0f3460;
    border-color: #16213e;
}

body.dark-mode .payment-method-card.active {
    background: #1b4332;
    border-color: #2ecc71;
}

body.dark-mode .payment-name {
    color: #e0e0e0;
}

body.dark-mode .payment-summary-new {
    background: #0f3460;
}

body.dark-mode .search-wrapper input,
body.dark-mode .category-filter {
    background: #16213e;
    color: #e0e0e0;
    border-color: #0f3460;
}

body.dark-mode .pos-stats {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-mode .empty-cart {
    color: #6c757d;
}

body.dark-mode table {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-mode table th {
    background: #0f3460;
}

body.dark-mode table tbody tr:hover {
    background: #1a3a5c;
}

body.dark-mode .modal-content {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-mode nav {
    background: #0f3460;
}

body.dark-mode .user-bar {
    background: #0f3460;
}

/* Responsive */
@media (max-width: 1024px) {
    .pos-container-new {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .pos-products-section {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .pos-search-bar {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .pos-header {
        flex-direction: column;
        align-items: stretch;
    }
}
/* Add this at the bottom of style.css */
.pos-cart-section {
    overflow-y: auto !important;
    max-height: none !important;
}

.cart-section-block {
    overflow: visible !important;
}

.payment-methods-new {
    overflow: visible !important;
    max-height: none !important;
}
/* ========== HIDE ADMIN FEATURES FROM SALES ========== */
body.role-sales .stock-in-form,
body.role-sales .custom-product-section,
body.role-sales #bulkStockContainer,
body.role-sales .backup-container {
    display: none !important;
}

/* Show export/print for sales too */
body.role-sales .btn-export,
body.role-sales .btn-print-report,
body.role-sales .report-actions {
    display: inline-block !important;
}

/* Show only view features in inventory for sales */
body.role-sales .quick-stats {
    display: grid !important;
}

/* ========== FIXED PASSWORD FIELD WITH SHOW BUTTON ========== */
.password-input-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.password-input-inner {
    position: relative;
    flex: 1;
}

.password-lock-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 2;
    opacity: 0.5;
    pointer-events: none;
}

.password-input-inner input {
    width: 100%;
    padding: 13px 15px 13px 45px !important;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f7fafc;
    color: #2d3748;
    box-sizing: border-box;
    font-family: inherit;
}

.password-input-inner input:focus {
    outline: none;
    border-color: #2c5282;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.show-hide-btn {
    padding: 0 18px;
    background: #edf2f7;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2c5282;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 70px;
}

.show-hide-btn:hover {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    transform: translateY(-1px);
}

.show-hide-btn:active {
    transform: translateY(0);
}
/* FINAL FIX for password field */
.password-input-container {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
}

.password-input-inner {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.password-input-inner input {
    width: 100% !important;
    box-sizing: border-box !important;
}

.show-hide-btn {
    flex: 0 0 auto !important;
    width: 80px !important;
}