* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
}

.login-box h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.company-logo {
    max-width: 150px;
    max-height: 100px;
    object-fit: contain;
}

.login-box h2 {
    color: #764ba2;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.login-info {
    margin-top: 15px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* Login Page Categories */
.login-categories {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.login-categories h3 {
    text-align: center;
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.login-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.login-category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.header-text h1 {
    color: #667eea;
    font-size: 2em;
    margin: 0;
}

.company-tagline {
    color: #764ba2;
    font-size: 0.9em;
    margin-top: 5px;
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-cart,
.btn-admin,
.btn-logout {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-cart {
    background: #28a745;
    color: white;
}

.btn-admin {
    background: #ffc107;
    color: #333;
}

.btn-logout {
    background: #dc3545;
    color: white;
}

.btn-cart:hover,
.btn-admin:hover,
.btn-logout:hover {
    transform: translateY(-2px);
}

/* Company Info */
.company-info {
    background: white;
    padding: 15px;
    margin: 0 auto 20px;
    max-width: 1200px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
    line-height: 1.6;
}

.company-info p {
    margin: 5px 0;
}

/* Menu Section */
.menu-section {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.menu-section h2 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: white;
    color: #667eea;
}

/* Products Container */
.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-category {
    color: #667eea;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.product-price {
    font-size: 1.3em;
    color: #28a745;
    font-weight: bold;
    margin-bottom: 10px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.add-to-cart-btn:hover {
    background: #764ba2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content.admin-modal {
    max-width: 900px;
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
}

/* Cart Items */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #28a745;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 3px;
}

.quantity-btn:hover {
    background: #f0f0f0;
}

.cart-item-total {
    font-weight: bold;
    color: #667eea;
    min-width: 100px;
    text-align: right;
}

.remove-item-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.remove-item-btn:hover {
    background: #c82333;
}

.cart-summary {
    border-top: 2px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.summary-row.total {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    border-top: 2px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.cart-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cart-actions button {
    flex: 1;
    min-width: 120px;
}

/* Payment Modal */
.qr-code-section {
    text-align: center;
}

.qr-code {
    margin: 20px 0;
}

.qr-placeholder {
    width: 250px;
    height: 280px;
    margin: 20px auto;
    background: #f0f0f0;
    border: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: 15px;
}

.qr-code-display {
    background: white;
    padding: 10px;
    border-radius: 5px;
}

.payment-amount {
    font-size: 1.5em;
    margin: 20px 0;
    color: #28a745;
}

/* Admin Panel */
.admin-login {
    text-align: center;
}

.admin-login input {
    margin: 20px 0;
    padding: 12px;
    width: 100%;
    max-width: 300px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.products-list {
    margin-top: 20px;
}

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 10px;
}

.admin-product-info {
    flex: 1;
}

.admin-product-actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.report-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.report-controls input {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.sales-report {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.report-table th,
.report-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.report-table th {
    background: #667eea;
    color: white;
}

.report-table tr:hover {
    background: #f0f0f0;
}

.report-summary {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    font-size: 1.2em;
}

.logo-preview-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 10px;
}

.logo-preview {
    max-width: 200px;
    max-height: 150px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background: white;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header,
    .menu-section,
    .category-buttons,
    .cart-actions,
    .close {
        display: none;
    }
    
    .modal {
        position: static;
        display: block;
    }
    
    .modal-content {
        box-shadow: none;
        max-width: 100%;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Customer Address Footer */
.customer-address-footer {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.customer-address-content {
    text-align: center;
}

.customer-address-content h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.customer-address-content p {
    margin: 8px 0;
    line-height: 1.6;
}

/* Company Info Footer */
.company-info-footer {
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.company-info-footer h3 {
    margin-bottom: 15px;
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.company-info-footer p {
    margin: 8px 0;
    line-height: 1.8;
    font-size: 0.95em;
}

.switch-form {
    margin-top: 15px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.switch-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.switch-form a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .category-buttons {
        justify-content: flex-start;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions button {
        width: 100%;
    }
}

