* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(104, 110, 195, 0.37);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-button {
    background: linear-gradient(45deg, #569387, #788786);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.admin-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cart-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4em;
    font-weight: bold;
    color: #2d3436;
}

.checkout-section {
    background: rgb(0, 0, 0);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.price-items-section {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    order: 0;
}
.checkout-btn {
    order: 1;
}

.checkout-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: rgb(13, 13, 13);
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 1.3em;
    cursor: pointer;
    transition: transform 0.3s;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.product-grid {
    margin-bottom: 25px;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.product-card {
    background: rgb(4, 4, 4);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.product-image {
    display: none;
}

/* Removed white overlay on product images */
.product-image::before {
    content: none;
}

.bottle-icon {
    font-size: 4em;
    color: rgb(122, 5, 5);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.product-info {
    text-align: center;
}

.product-name {
    font-size: 1.4em;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 5px;
}

.product-volume {
    color: #636e72;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #00b894;
    margin-bottom: 15px;
}

.product-stock {
    color: #e17055;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f7f7f7;
    color: rgb(245, 110, 110);
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #0984e3;
}

.quantity-display {
    font-size: 1.3em;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.add-to-cart-btn {
    width: 200px;
    background: linear-gradient(45deg, #00b894, #00cec9);
    color: rgb(255, 52, 52);
    border: none;
    padding: 8px 12px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.3s;
    display: block;
    margin: 10px auto;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
}

.add-to-cart-btn:disabled {
    background: #b2bec3;
    cursor: not-allowed;
    transform: none;
}

.admin-panel {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.admin-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.add-product, .stock-management {
    background: #369bff;
    padding: 20px;
    border-radius: 10px;
}

.stock-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.individual-stock, .case-stock {
    background: rgb(86, 255, 111);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sales-report {
    background: rgb(255, 255, 255);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .products {
        grid-template-columns: 1fr;
    }
    
    .admin-sections, .stock-tables {
        grid-template-columns: 1fr;
    }
    .checkout-section {
        padding: 15px;
    }
}

/* Dark theme styles */
body.dark-theme {
    background: #b56f6f;
    color: #7757ea;
}

body.dark-theme header {
    background: rgba(175, 91, 91, 0.9);
    color: #c40a0a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

body.dark-theme .admin-button {
    background: linear-gradient(45deg, #00cec9, #00b894);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(75, 48, 230, 0);
}

body.dark-theme .cart-summary {
    background: #222;
    color: #ad1f1f;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

body.dark-theme .checkout-section {
    background: #222;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

body.dark-theme .add-to-cart-btn, 
body.dark-theme .checkout-btn {
    background: linear-gradient(45deg, #00cec9, #00b894);
    color: #121212;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

body.dark-theme .product-card {
    background: #222;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

body.dark-theme .product-name,
body.dark-theme .product-volume,
body.dark-theme .product-price,
body.dark-theme .product-stock {
    color: #27c2c2;
}

body.dark-theme .quantity-btn {
    background: #00cec9;
    color: #121212;
}

body.dark-theme .quantity-btn:hover {
    background: #00b894;
}

body.dark-theme .remove-btn {
    background: #ff7675;
    color: #121212;
}

/* Additional dark theme styles for other elements */
body.dark-theme .container {
    background: transparent;
}

body.dark-theme .product-image {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
}

body.dark-theme .cart-info {
    color: #c12a2a;
}

body.dark-theme .sales-report {
    background: #222;
    color: #401a1a;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

body.dark-theme .admin-panel {
    background: #222;
    color: #ff8e8e;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

body.dark-theme .admin-sections {
    color: #e0e0e0;
}

body.dark-theme .add-product, 
body.dark-theme .stock-management {
    background: #2c2c2c;
    color: #502a42;
}

body.dark-theme .stock-tables {
    background: transparent;
}

body.dark-theme .individual-stock, 
body.dark-theme .case-stock {
    background: #2c2c2c;
    color: #c74848;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

/* Additional dark theme styles for other elements */
body.dark-theme .container {
    background: transparent;
}

body.dark-theme .product-image {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
}

body.dark-theme .cart-info {
    color: #e0e0e0;
}

body.dark-theme .sales-report {
    background: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

body.dark-theme .admin-panel {
    background: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

body.dark-theme .admin-sections {
    color: #e0e0e0;
}

body.dark-theme .add-product, 
body.dark-theme .stock-management {
    background: #2c2c2c;
    color: #e0e0e0;
}

body.dark-theme .stock-tables {
    background: transparent;
}

body.dark-theme .individual-stock, 
body.dark-theme .case-stock {
    background: #2c2c2c;
    color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Transaction History Styles */
.transaction-history {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.transaction-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section select {
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-section button {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.transaction-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card i {
    font-size: 2em;
    opacity: 0.8;
}

.stat-card h4 {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.stat-card span {
    font-size: 1.5em;
    font-weight: bold;
}

.transaction-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#transactionTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#transactionTable th {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
}

#transactionTable td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

#transactionTable tr:hover {
    background-color: #f8f9fa;
}

.btn-view {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.status-completed {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending {
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-cancelled {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.transaction-details h4 {
    color: #2c3e50;
    margin: 20px 0 15px 0;
    font-size: 1.2em;
}

.transaction-details p {
    margin: 10px 0;
    font-size: 14px;
}

.transaction-details hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.transaction-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.transaction-items-table th {
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.transaction-items-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.total-amount {
    font-size: 1.1em;
    color: #2c3e50;
    text-align: right;
    margin-top: 20px;
}

/* Responsive Design for Transaction History */
@media (max-width: 768px) {
    .transaction-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .transaction-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    #transactionTable {
        font-size: 12px;
    }
    
    #transactionTable th,
    #transactionTable td {
        padding: 8px 6px;
    }
}
