:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-color) 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Header Styles */
.header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.header-section > .container {
    position: relative;
    z-index: 1;
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    border: none;
    transition: all 0.3s ease;
}

.card-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Product Card Styles */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.product-card.selected {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.product-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-card.selected .product-icon {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
}

.product-icon i {
    font-size: 1.5rem;
    color: white;
}

.product-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.product-duration {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.form-check {
    margin-top: auto;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Order Summary Styles */
.total-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.selected-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.selected-product-item:last-child {
    border-bottom: none;
}

.selected-product-name {
    font-weight: 500;
    color: var(--dark-color);
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
    box-shadow: var(--shadow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.order-code-display {
    background: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin Styles */
.stat-card {
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-dark {
    background: var(--dark-color);
}

.navbar-brand {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-section {
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sticky Top Enhancement */
.sticky-top {
    top: 1rem;
}

/* Success States */
.success-highlight {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--secondary-color);
}

/* Error States */
.error-highlight {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

/* Footer Styles */
.footer-section {
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.footer-section .btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, #d97706 100%);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-section .btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

.footer-section .btn-warning:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.footer-section .btn-warning:hover:before {
    left: 100%;
}

.footer-section h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.9rem;
}
