/* HIS Registration System Styles */

.his-registration-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.his-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.his-header-content {
    text-align: center;
}

.his-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.his-title i {
    font-size: 2.5rem;
}

.his-title h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.his-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
}

/* Step Progress Indicator */
.his-steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.his-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.his-step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.his-step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.his-step.active .step-label {
    color: #667eea;
}

.his-step.completed .step-label {
    color: #10b981;
}

.step-line {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    margin: 0 10px;
    min-width: 30px;
    transition: all 0.3s ease;
}

.step-line.completed {
    background: #10b981;
}

/* Step Content */
.his-step-content {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-card h3 i {
    color: #667eea;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin: 25px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.section-title i {
    color: #667eea;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Location Section */
.location-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.location-display {
    padding: 10px 15px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Test Selection */
.test-search-bar {
    position: relative;
    margin-bottom: 20px;
}

.test-search-bar input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.test-search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.selected-tests-summary {
    padding: 15px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.selected-tests-summary .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9rem;
}

.selected-tests-summary .badge i {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.selected-tests-summary .badge i:hover {
    transform: scale(1.2);
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns as requested */
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

/* Responsive adjustment for tests grid */
@media (max-width: 1200px) {
    .tests-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .tests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tests-grid {
        grid-template-columns: 1fr;
    }
}

.test-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ... existing styles ... */

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
    /* Ensure vertical alignment */
}

.summary-row.center-align {
    align-items: center;
}

.discount-label {
    font-weight: 600;
    color: #374151;
    margin-right: 10px;
}

.discount-input {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.3rem;
    color: #667eea;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

/* Success/Receipt */
.success-card {
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-card h2 {
    color: #10b981;
    margin-bottom: 10px;
}

.booking-id {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 30px;
}

.receipt-container {
    max-width: 800px;
    margin: 0 auto 30px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    text-align: left;
}

.receipt-header {
    text-align: center;
    margin-bottom: 30px;
}

.receipt-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.receipt-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 5px 0;
}

.receipt-header p {
    color: #6b7280;
    margin: 0;
}

.receipt-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 25px 0;
}

.receipt-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.receipt-table th,
.receipt-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.receipt-table th {
    background: #f9fafb;
    font-weight: 600;
}

.receipt-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #e5e7eb;
    color: #6b7280;
}

.receipt-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: #667eea;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .his-steps-container {
        overflow-x: scroll;
        justify-content: flex-start;
    }

    .his-step {
        min-width: 80px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .tests-grid,
    .labs-grid,
    .payment-options {
        grid-template-columns: 1fr;
    }

    .step-actions {
        flex-direction: column;
    }

    .step-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .receipt-container {
        padding: 20px;
    }

    .receipt-actions {
        flex-direction: column;
    }

    .receipt-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modern Review Section */
.review-dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.review-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.re-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.re-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.re-header h4 i {
    color: #667eea;
}

.re-content {
    padding: 20px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f0f4f8;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.info-details {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.info-value {
    display: block;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.4;
}

/* Modern Test Table */
.test-table-container {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    overflow: hidden;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 12px 20px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #e0e6ed;
}

.modern-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table .price-col {
    text-align: right;
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: #0f172a;
}

.total-section {
    background: #f8fafc;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #e0e6ed;
}

.total-label {
    font-weight: 600;
    color: #64748b;
}

.total-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.btn-edit {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: white;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #94a3b8;
}

/* Mobile responsive for review */
@media (max-width: 768px) {
    .review-grid {
        grid-template-columns: 1fr;
    }

    .re-content {
        padding: 15px;
    }
}

/* Modern Payment Section */
.payment-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.payment-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.payment-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.payment-card.selected {
    border-color: #667eea;
    background: #f0fdf4;
    /* Light green tint or generic active tint */
    background: linear-gradient(to right, #f0f7ff, #ffffff);
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.1);
}

.payment-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    border-radius: 50%;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.payment-card.selected .payment-icon {
    background: #667eea;
    color: white;
}

.payment-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.payment-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

.payment-select-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #667eea;
    font-size: 1.2rem;
}

.payment-summary-card {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.summary-header {
    background: #f8fafc;
    padding: 15px 25px;
    border-bottom: 1px solid #e0e6ed;
    font-weight: 600;
    color: #334155;
    font-size: 1.1rem;
}

.summary-body {
    padding: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-row span:first-child {
    color: #64748b;
    font-weight: 500;
}

.summary-row span:last-child {
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
}

.summary-row.total {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px dashed #e2e8f0;
}

.summary-row.total span:first-child {
    color: #334155;
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 800;
}

.manual-discount-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.manual-discount-container input {
    width: 80px;
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.discount-tag {
    background: #ecfdf5;
    color: #059669;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Print Styles */
@media print {

    .his-header,
    .his-steps-container,
    .step-actions,
    .receipt-actions {
        display: none !important;
    }

    .receipt-container {
        border: none;
        box-shadow: none;
    }
}