/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
    min-height: 100vh;
    color: #1f2937;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container.large {
    max-width: 1000px;
}

/* Card */
.card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    width: 100%;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    height: 4rem;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.header p {
    color: #6b7280;
    font-size: 1rem;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.success-icon i {
    color: #16a34a;
    font-size: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group label i {
    color: #16a34a;
    width: 1rem;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    padding-left: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

input:focus, select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

input:hover, select:hover {
    border-color: #16a34a;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Time Selection */
.time-selection {
    margin-bottom: 2rem;
}

.time-selection label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.time-selection label i {
    color: #16a34a;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.time-period h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.time-slot {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.time-slot:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.time-slot.active {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #16a34a;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 48px;
}

.btn-primary {
    background: #16a34a;
    color: white;
}

.btn-primary:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .button-group {
        flex-direction: row;
    }
    
    .button-group .btn {
        flex: 1;
    }
}

/* Patient Info */
.patient-avatar {
    text-align: center;
    margin-bottom: 2rem;
}

.patient-avatar img {
    width: 8rem;
    height: 8rem;
    object-fit: cover;
    border: 4px solid #f0fdf4;
    margin-bottom: 1rem;
}

.patient-avatar h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.info-item i {
    color: #16a34a;
    width: 1.25rem;
    flex-shrink: 0;
}

.info-item div p:first-child {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.info-item div p:last-child {
    font-weight: 600;
    color: #1f2937;
}

/* Review Content */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.review-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.review-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.review-item i {
    color: #16a34a;
    width: 1.25rem;
    flex-shrink: 0;
}

.review-item div p:first-child {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.review-item div p:last-child {
    font-weight: 600;
    color: #1f2937;
}

/* Payment Methods */
.payment-methods {
    margin-bottom: 2rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.payment-method:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.payment-method.active {
    border-color: #16a34a;
    background: #f0fdf4;
}

.payment-method i {
    font-size: 1.5rem;
    color: #6b7280;
    width: 2rem;
    text-align: center;
}

.payment-method.active i {
    color: #16a34a;
}

.method-info {
    flex: 1;
}

.method-info h3 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.method-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

.radio {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
}

.payment-method.active .radio {
    border-color: #16a34a;
    background: #16a34a;
}

.payment-method.active .radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.25rem;
    height: 0.25rem;
    background: white;
    border-radius: 50%;
}

/* Payment Summary */
.payment-summary {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.payment-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #6b7280;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.125rem;
    font-weight: 700;
    color: #16a34a;
    margin-top: 0.75rem;
}

.payment-summary hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0.75rem 0;
}

/* QR Code */
.qr-container {
    text-align: center;
    margin-bottom: 2rem;
}

.qr-code {
    display: inline-block;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.qr-code img {
    width: 12rem;
    height: 12rem;
}

.qr-info p:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.qr-info p:last-child {
    font-size: 0.875rem;
    color: #6b7280;
}

.qr-instructions {
    background: #dbeafe;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.qr-instructions h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.qr-instructions ol {
    padding-left: 1.25rem;
}

.qr-instructions li {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Notice */
.notice {
    background: #dbeafe;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.notice h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.notice ul {
    padding-left: 1.25rem;
}

.notice li {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #16a34a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities */
.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .time-grid {
        grid-template-columns: 1fr;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}