* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --secondary: #00c853;
    --danger: #f44336;
    --warning: #ff9800;
    --light: #f8f9fa;
    --dark: #212121;
    --gray: #757575;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --glow: 0 0 20px rgba(26, 115, 232, 0.3);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    animation: fadeInDown 0.8s ease;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.8rem;
    color: var(--primary);
    background: white;
    padding: 15px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 2.8rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.tagline {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 500;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background: linear-gradient(to right, #f44336, #d32f2f);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.booking-form, .receipt-preview, .history-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 1s ease;
}

.booking-form:hover, .receipt-preview:hover, .history-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow), var(--shadow);
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--secondary);
}

.form-group {
    margin-bottom: 20px;
    animation: slideInLeft 0.5s ease;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn {
    padding: 16px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.4);
}

.btn-success {
    background: linear-gradient(to right, var(--secondary), #00b248);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 200, 83, 0.3);
    width: 100%;
    margin-top: 20px;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 200, 83, 0.4);
}

.btn-info {
    background: linear-gradient(to right, #00bcd4, #0097a7);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.4);
}

.btn-warning {
    background: linear-gradient(to right, var(--warning), #f57c00);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    width: 100%;
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.btn-success:disabled, .btn-warning:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.receipt-content {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-top: 10px;
    border: 2px dashed #ddd;
}

.receipt-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.receipt-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.receipt-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
}

.receipt-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.receipt-item {
    margin-bottom: 12px;
}

.receipt-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.receipt-value {
    color: var(--gray);
    font-size: 1.05rem;
}

.receipt-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 2px solid #eee;
    text-align: center;
}

.receipt-id {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.2rem;
}

.patient-id-section {
    background: linear-gradient(to right, #e3f2fd, #f3e5f5);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #bbdefb;
}

.patient-id-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    text-align: center;
    margin: 10px 0;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed var(--primary);
}

.whatsapp-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.whatsapp-icon {
    font-size: 2.5rem;
    color: #25D366;
    margin-bottom: 15px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    transition: transform 0.5s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 5px solid var(--secondary);
}

.notification.error {
    border-left: 5px solid var(--danger);
}

.notification.info {
    border-left: 5px solid var(--primary);
}

.notification-icon {
    font-size: 1.8rem;
}

.success .notification-icon {
    color: var(--secondary);
}

.error .notification-icon {
    color: var(--danger);
}

.info .notification-icon {
    color: var(--primary);
}

.pulse {
    animation: pulse 2s infinite;
}
.history-section {
    grid-column: span 2;
}

.history-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.history-table th {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.history-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.history-table tr:hover {
    background-color: #f5f5f5;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.no-history {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-style: italic;
}

.history-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-btn {
    background: #e8f5e9;
    color: var(--secondary);
}

.delete-btn {
    background: #ffebee;
    color: var(--danger);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.required::after {
    content: " *";
    color: var(--danger);
}

.empty-field {
    color: #bbb;
    font-style: italic;
}

@media (max-width: 992px) {
    .history-section {
        grid-column: span 1;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .booking-form, .receipt-preview, .history-section {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
    }
    
    .history-controls {
        flex-direction: column;
    }
    
    .history-table {
        display: block;
        overflow-x: auto;
    }
    
    .logout-btn {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 10px;
        width: auto;
    }
}