/**
 * Medical Module Styles - Programări Clinică Medicală
 * 
 * Stiluri specifice pentru modulul medical multi-tenant
 * 
 * @author AI MINDLOOP SRL
 * @version 1.0.0
 * @date 2026-01-24
 */

/* ============================================================================
   MEDICAL COLOR PALETTE
   ============================================================================ */

:root {
    --medical-primary: #0891b2;
    --medical-primary-dark: #0e7490;
    --medical-primary-light: #22d3ee;
    --medical-secondary: #7c3aed;
    --medical-success: #10b981;
    --medical-warning: #f59e0b;
    --medical-danger: #ef4444;
    --medical-info: #3b82f6;
    
    /* Status Colors */
    --status-scheduled: #f59e0b;
    --status-confirmed: #10b981;
    --status-waiting: #3b82f6;
    --status-in-progress: #7c3aed;
    --status-completed: #6b7280;
    --status-cancelled: #ef4444;
    --status-no-show: #dc2626;
}

/* ============================================================================
   MEDICAL SECTIONS BASE
   ============================================================================ */

.medical-section {
    padding: 20px;
}

.medical-section .page-header {
    margin-bottom: 24px;
}

.medical-section .page-header h1 {
    color: var(--medical-primary-dark);
    font-size: 28px;
    margin-bottom: 8px;
}

.medical-section .page-header p {
    color: #64748b;
    font-size: 16px;
}

/* ============================================================================
   DOCTOR CARDS
   ============================================================================ */

.doctor-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.doctor-card .doctor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.doctor-card .doctor-info h4 {
    margin: 0 0 4px 0;
    color: #1e293b;
    font-size: 18px;
}

.doctor-card .doctor-info .specialization {
    color: #64748b;
    font-size: 14px;
}

/* ============================================================================
   EQUIPMENT CARDS
   ============================================================================ */

.equipment-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.equipment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.equipment-card .equipment-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

/* ============================================================================
   APPOINTMENT CARDS
   ============================================================================ */

.appointment-card {
    transition: background 0.2s ease;
}

.appointment-card:hover {
    background: #f1f5f9 !important;
}

.appointment-card .time-slot {
    min-width: 80px;
    text-align: center;
}

.appointment-card .time-slot .time {
    font-size: 24px;
    font-weight: bold;
    color: #1e293b;
}

.appointment-card .time-slot .duration {
    font-size: 12px;
    color: #64748b;
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge.scheduled {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.confirmed {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.waiting {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.in-progress {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-badge.completed {
    background: #e5e7eb;
    color: #374151;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.no-show {
    background: #fecaca;
    color: #b91c1c;
}

/* ============================================================================
   PATIENT TABLE
   ============================================================================ */

.medical-patients-table {
    width: 100%;
    border-collapse: collapse;
}

.medical-patients-table th {
    background: #f1f5f9;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.medical-patients-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.medical-patients-table tr:hover {
    background: #f8fafc;
}

.patient-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.patient-avatar.vip {
    background: #fef3c7;
}

/* ============================================================================
   MEDICAL MODAL
   ============================================================================ */

.medical-modal {
    display: none !important;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.medical-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.medical-modal.hidden {
    display: none !important;
}

.medical-modal-content {
    background: white;
    margin: 0;
    padding: 0;
    border-radius: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    box-shadow: none;
    animation: modalFadeIn 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* Pentru ecrane mari, păstrăm un modal centrat dar mai mare */
@media (min-width: 1024px) {
    .medical-modal-content {
        margin: 20px auto;
        border-radius: 16px;
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        max-width: 1200px;
        max-height: calc(100vh - 40px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
}

/* Pentru ecrane medii (tablete) */
@media (min-width: 768px) and (max-width: 1023px) {
    .medical-modal-content {
        margin: 10px;
        border-radius: 12px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.medical-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--medical-primary) 0%, var(--medical-primary-dark) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.medical-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.medical-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.medical-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.medical-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Important pentru flex scrolling */
}

/* Pe ecrane mari, body-ul ocupă tot spațiul disponibil */
@media (min-width: 768px) {
    .medical-modal-body {
        padding: 28px 32px;
    }
}

/* ============================================================================
   MOBILE-OPTIMIZED FORM CLASSES
   ============================================================================ */

.medical-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 80px; /* Space for fixed buttons on mobile */
}

.form-section-title {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--medical-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    cursor: pointer;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-divider {
    text-align: center;
    color: #94a3b8;
    margin: 16px 0;
    font-size: 14px;
    position: relative;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.form-divider::before {
    left: 0;
}

.form-divider::after {
    right: 0;
}

.selected-patient-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #86efac;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.selected-patient-card strong {
    color: #166534;
}

.selected-patient-card .patient-phone {
    color: #64748b;
    font-size: 14px;
}

.patient-search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.patient-search-results:empty {
    display: none;
}

.patient-search-results > div {
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.patient-search-results > div:last-child {
    border-bottom: none;
}

.patient-search-results > div:hover,
.patient-search-results > div:active {
    background: #f8fafc;
}

.new-patient-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e2e8f0;
}

.section-note {
    margin: 0 0 12px 0;
    color: #64748b;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    background: white;
    position: sticky;
    bottom: 0;
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
}

.form-actions button {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, var(--medical-primary) 0%, var(--medical-primary-dark) 100%);
    color: white;
    border: none;
}

.form-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.form-actions .btn-secondary {
    background: white;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.form-actions .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Mobile form improvements */
@media (max-width: 768px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    /* Form actions positioned ABOVE bottom navigation bar */
    .form-actions {
        position: fixed;
        bottom: 70px; /* Height of mobile bottom nav */
        left: 0;
        right: 0;
        padding: 12px 16px;
        margin: 0;
        z-index: 10001; /* Above bottom nav (9999) */
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        background: white;
        border-top: 1px solid #e5e7eb;
    }
    
    /* Extra padding at bottom of modal body to account for fixed buttons + nav */
    .medical-modal-body {
        padding-bottom: 160px !important; /* Space for buttons (82px) + nav (70px) + extra */
    }
    
    /* Also for forms inside modal */
    .medical-form {
        padding-bottom: 20px;
    }
    
    .form-section:last-of-type {
        margin-bottom: 20px; /* Reduced since we have modal body padding */
    }
    
    .form-input {
        padding: 14px 16px;
    }
    
    /* Ensure last form content is visible */
    .medical-modal-content {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .form-section-title {
        font-size: 15px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-input {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* Slightly smaller bottom offset for smaller phones */
    .form-actions {
        bottom: 65px;
        padding: 10px 12px;
    }
    
    .form-actions button {
        padding: 12px 16px;
        min-height: 46px;
    }
    
    .medical-modal-body {
        padding-bottom: 150px !important;
    }
}

/* ============================================================================
   MEDICAL CALENDAR VIEW
   ============================================================================ */

.medical-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 20px;
}

.medical-calendar-header {
    text-align: center;
    padding: 12px;
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

.medical-calendar-day {
    min-height: 100px;
    padding: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.medical-calendar-day:hover {
    border-color: var(--medical-primary);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.1);
}

.medical-calendar-day.today {
    background: #f0fdfa;
    border-color: var(--medical-primary);
}

.medical-calendar-day.other-month {
    background: #f8fafc;
    opacity: 0.5;
}

.medical-calendar-day .day-number {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.medical-calendar-day .appointments-count {
    font-size: 12px;
    color: #64748b;
}

/* ============================================================================
   WORKING HOURS FORM
   ============================================================================ */

.working-hours-grid {
    display: grid;
    gap: 12px;
}

.working-hours-row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.working-hours-row.disabled {
    opacity: 0.5;
}

.working-hours-row label {
    font-weight: 500;
    color: #374151;
}

.working-hours-row input[type="time"] {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

/* ============================================================================
   SPECIALIZATION TAGS
   ============================================================================ */

.specialization-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.specialization-tag.cardiology {
    background: #fce7f3;
    color: #be185d;
}

.specialization-tag.neurology {
    background: #ede9fe;
    color: #6d28d9;
}

.specialization-tag.orthopedics {
    background: #d1fae5;
    color: #047857;
}

.specialization-tag.radiology {
    background: #fef3c7;
    color: #b45309;
}

/* ============================================================================
   MEDICAL FILTERS BAR
   ============================================================================ */

.medical-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.medical-filter-group {
    flex: 1;
    min-width: 150px;
}

.medical-filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #475569;
    font-size: 13px;
}

.medical-filter-group select,
.medical-filter-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.medical-filter-group select:focus,
.medical-filter-group input:focus {
    outline: none;
    border-color: var(--medical-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* ============================================================================
   STATISTICS CARDS
   ============================================================================ */

.medical-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.medical-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
}

.medical-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.medical-stat-icon.primary {
    background: #e0f2fe;
}

.medical-stat-icon.success {
    background: #dcfce7;
}

.medical-stat-icon.warning {
    background: #fef3c7;
}

.medical-stat-icon.danger {
    background: #fee2e2;
}

.medical-stat-info h4 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.medical-stat-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================================================ */

/* Tablet and below */
@media (max-width: 768px) {
    .medical-section .page-header h1 {
        font-size: 22px;
    }
    
    .doctors-grid,
    .equipment-grid {
        grid-template-columns: 1fr !important;
    }
    
    .medical-filters {
        flex-direction: column;
    }
    
    .medical-filter-group {
        width: 100%;
    }
    
    .working-hours-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .appointment-card {
        flex-direction: column;
    }
    
    .appointment-card .time-slot {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    /* Modal Full Screen on Mobile */
    .medical-modal-content {
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }
    
    .medical-modal-header {
        padding: 16px 20px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .medical-modal-header h2 {
        font-size: 18px;
    }
    
    .medical-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px !important;
        padding-bottom: 100px !important; /* Space for bottom nav */
        -webkit-overflow-scrolling: touch;
    }
    
    .medical-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* Phone - Small screens */
@media (max-width: 480px) {
    .medical-stats {
        grid-template-columns: 1fr;
    }
    
    .medical-stat-card {
        padding: 16px;
    }
    
    .doctor-card,
    .equipment-card {
        padding: 16px;
    }
    
    .medical-modal-header {
        padding: 14px 16px;
    }
    
    .medical-modal-header h2 {
        font-size: 16px;
    }
    
    .medical-modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .medical-modal-body {
        padding: 12px !important;
    }
}

/* ============================================================================
   MOBILE-OPTIMIZED FORM STYLES
   ============================================================================ */

/* Form inputs - Mobile friendly */
@media (max-width: 768px) {
    .medical-modal .form-input,
    .medical-modal input[type="text"],
    .medical-modal input[type="number"],
    .medical-modal input[type="tel"],
    .medical-modal input[type="email"],
    .medical-modal input[type="date"],
    .medical-modal input[type="time"],
    .medical-modal select,
    .medical-modal textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 14px 16px !important;
        border-radius: 12px !important;
        border: 2px solid #e2e8f0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        -webkit-appearance: none;
        appearance: none;
        background-color: #fff;
    }
    
    .medical-modal input:focus,
    .medical-modal select:focus,
    .medical-modal textarea:focus {
        border-color: var(--medical-primary) !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1) !important;
    }
    
    .medical-modal select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 20px;
        padding-right: 44px !important;
    }
    
    .medical-modal label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
    }
    
    .medical-modal .form-group {
        margin-bottom: 16px;
    }
    
    /* Grid layouts to single column on mobile */
    .medical-modal [style*="grid-template-columns: 1fr 1fr 1fr"],
    .medical-modal [style*="grid-template-columns: 1fr 1fr"],
    .medical-modal [style*="grid-template-columns: 2fr 1fr 1fr"],
    .medical-modal [style*="grid-template-columns: 2fr 1fr"],
    .medical-modal [style*="grid-template-columns: 100px 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Section headers in forms */
    .medical-modal h4 {
        font-size: 16px !important;
        margin: 20px 0 12px 0 !important;
        padding-bottom: 8px;
    }
    
    /* Buttons in modal */
    .medical-modal .btn-primary,
    .medical-modal .btn-secondary,
    .medical-modal button[type="submit"],
    .medical-modal button[type="button"] {
        font-size: 16px !important;
        padding: 14px 20px !important;
        border-radius: 12px !important;
        min-height: 50px;
        font-weight: 600;
    }
    
    /* Fixed bottom action bar - positioned ABOVE mobile navigation */
    .medical-modal form > div:last-child,
    .medical-modal [style*="position: sticky"][style*="bottom: 0"],
    .medical-modal > div > div:last-child[style*="justify-content: flex-end"] {
        position: fixed !important;
        bottom: 70px !important; /* Above mobile bottom nav */
        left: 0 !important;
        right: 0 !important;
        padding: 12px 16px !important;
        background: white !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
        margin: 0 !important;
        z-index: 10001; /* Above bottom nav (9999) */
        display: flex !important;
        gap: 12px !important;
    }
    
    .medical-modal form > div:last-child .btn-primary,
    .medical-modal form > div:last-child .btn-secondary,
    .medical-modal form > div:last-child button {
        flex: 1;
    }
    
    /* Selected patient card */
    .medical-modal #apt_selected_patient,
    .medical-modal [style*="background: #f0fdf4"] {
        padding: 14px 16px !important;
        border-radius: 12px !important;
        margin: 12px 0 !important;
    }
    
    /* Patient search results */
    .medical-modal #apt_patient_results > div {
        padding: 14px 16px !important;
    }
    
    /* Status badges */
    .medical-modal span[style*="border-radius: 4px"],
    .medical-modal span[style*="border-radius: 8px"] {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .medical-modal .form-input,
    .medical-modal input,
    .medical-modal select,
    .medical-modal textarea {
        padding: 12px 14px !important;
    }
    
    .medical-modal .btn-primary,
    .medical-modal .btn-secondary,
    .medical-modal button {
        padding: 12px 16px !important;
        font-size: 15px !important;
    }
}

/* ============================================================================
   APPOINTMENT FORM MOBILE SPECIFIC
   ============================================================================ */

@media (max-width: 768px) {
    /* Patient section */
    .medical-modal #apt_patient_search {
        margin-bottom: 8px;
    }
    
    /* New patient fields */
    .medical-modal [style*="Sau adaugă pacient nou"] + div,
    .medical-modal div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Date/Time section */
    .medical-modal input[type="date"],
    .medical-modal input[type="time"] {
        min-height: 50px;
    }
    
    /* Doctor/Equipment selection */
    .medical-modal [style*="text-align: center"][style*="sau"] {
        padding: 16px 0 !important;
        font-size: 14px;
    }
    
    /* Textarea improvements */
    .medical-modal textarea {
        min-height: 80px;
        resize: vertical;
    }
    
    /* Price input */
    .medical-modal input[type="number"] {
        -moz-appearance: textfield;
    }
    
    .medical-modal input[type="number"]::-webkit-inner-spin-button,
    .medical-modal input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
}

/* ============================================================================
   SCHEDULE FORM MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    /* Schedule day row */
    .medical-modal [style*="grid-template-columns: 100px"] {
        background: #f8fafc;
        padding: 16px !important;
        border-radius: 12px !important;
        margin-bottom: 12px;
    }
    
    .medical-modal [style*="grid-template-columns: 100px"] > label:first-child {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: var(--medical-primary-dark) !important;
        margin-bottom: 12px !important;
        display: block !important;
        width: 100% !important;
    }
    
    /* Time inputs in schedule */
    .medical-modal [style*="grid-template-columns: 100px"] input[type="time"] {
        flex: 1;
    }
    
    /* Delete day button */
    .medical-modal [style*="grid-template-columns: 100px"] button {
        width: 100% !important;
        margin-top: 8px;
    }
}

/* ============================================================================
   CONSULTATION TYPES & PROCEDURES LIST MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    /* List cards */
    .medical-modal .card[style*="margin-bottom: 12px"] {
        padding: 16px !important;
        border-radius: 12px !important;
    }
    
    /* Card content */
    .medical-modal .card[style*="margin-bottom: 12px"] > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    /* Delete button in cards */
    .medical-modal .card .btn-danger {
        width: 100% !important;
        justify-content: center;
    }
    
    /* Add form (consultation types / procedures) */
    .medical-modal #addConsultationTypeForm,
    .medical-modal #addProcedureForm {
        border-radius: 12px !important;
        padding: 16px !important;
    }
    
    .medical-modal #addConsultationTypeForm h4,
    .medical-modal #addProcedureForm h4 {
        font-size: 16px !important;
    }
    
    /* Form buttons row */
    .medical-modal #addConsultationTypeForm > div:last-child,
    .medical-modal #addProcedureForm > div:last-child {
        flex-direction: column !important;
    }
    
    .medical-modal #addConsultationTypeForm > div:last-child button,
    .medical-modal #addProcedureForm > div:last-child button {
        width: 100% !important;
    }
}

/* ============================================================================
   TOUCH IMPROVEMENTS
   ============================================================================ */

@media (max-width: 768px) {
    /* Better tap targets */
    .medical-modal button,
    .medical-modal .btn-primary,
    .medical-modal .btn-secondary,
    .medical-modal .btn-danger,
    .medical-modal a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Checkbox and radio touch targets */
    .medical-modal input[type="checkbox"],
    .medical-modal input[type="radio"] {
        width: 22px;
        height: 22px;
        margin-right: 10px;
    }
    
    .medical-modal label[style*="display: flex"][style*="align-items: center"] {
        padding: 10px 0;
    }
    
    /* Scrolling improvements */
    .medical-modal-body {
        scroll-behavior: smooth;
        padding-bottom: 160px !important; /* Space for fixed buttons + nav bar */
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent body scroll when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Ensure all modal content can scroll past fixed buttons */
    .medical-modal-body > div,
    .medical-modal-body > form {
        padding-bottom: 20px;
    }
}

/* ============================================================================
   LOADING & EMPTY STATES
   ============================================================================ */

.medical-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}

.medical-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--medical-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.medical-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.medical-empty .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.medical-empty p {
    font-size: 18px;
    margin: 0 0 20px 0;
}

/* ============================================================================
   QUICK ACTIONS
   ============================================================================ */

.medical-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.medical-quick-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.medical-quick-action:hover {
    border-color: var(--medical-primary);
    color: var(--medical-primary);
    background: #f0fdfa;
}

.medical-quick-action .icon {
    font-size: 20px;
}

/* ============================================================================
   MOBILE OPTIMIZATIONS - APPOINTMENTS PAGE
   ============================================================================ */

@media (max-width: 768px) {
    /* Page header compact */
    #medicalAppointmentsSection .page-header,
    #medicalEquipmentSection .page-header,
    #medicalPatientsSection .page-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    #medicalAppointmentsSection .page-header h1,
    #medicalEquipmentSection .page-header h1,
    #medicalPatientsSection .page-header h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    #medicalAppointmentsSection .page-header p,
    #medicalEquipmentSection .page-header p,
    #medicalPatientsSection .page-header p {
        font-size: 13px;
        color: #64748b;
    }
    
    /* Filters card - stacked layout */
    #medicalAppointmentsSection .card[style*="margin-bottom: 20px"],
    #medicalEquipmentSection .card[style*="margin-bottom: 20px"],
    #medicalPatientsSection .card[style*="margin-bottom: 20px"] {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    
    #medicalAppointmentsSection .card[style*="margin-bottom: 20px"] > div[style*="display: flex"],
    #medicalEquipmentSection .card > div[style*="display: flex"],
    #medicalPatientsSection .card > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Filter inputs full width */
    #medicalAppointmentsSection input[type="date"],
    #medicalAppointmentsSection select,
    #medicalEquipmentSection select,
    #medicalPatientsSection input[type="text"] {
        width: 100% !important;
        padding: 14px 16px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        border: 2px solid #e2e8f0 !important;
        background: white;
        -webkit-appearance: none;
    }
    
    /* Filter labels */
    #medicalAppointmentsSection label,
    #medicalEquipmentSection label,
    #medicalPatientsSection label {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
        display: block;
    }
    
    /* Buttons row - full width */
    #medicalAppointmentsSection button,
    #medicalEquipmentSection button,
    #medicalPatientsSection button {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        min-height: 50px;
    }
    
    /* Two buttons side by side */
    #medicalAppointmentsSection .card[style*="margin-bottom: 20px"] > div > button,
    #medicalEquipmentSection .card > div > button,
    #medicalPatientsSection .card > div > button {
        flex: 1;
    }
}

/* ============================================================================
   MOBILE OPTIMIZATIONS - APPOINTMENT CARDS
   ============================================================================ */

@media (max-width: 768px) {
    /* Appointment day header */
    #medical-appointments-container .card {
        padding: 16px !important;
        margin-bottom: 16px !important;
        border-radius: 16px !important;
    }
    
    #medical-appointments-container .card h3 {
        font-size: 16px !important;
        flex-wrap: wrap;
        gap: 8px !important;
    }
    
    #medical-appointments-container .card h3 span {
        font-size: 12px !important;
    }
    
    /* Individual appointment card */
    .appointment-card,
    #medical-appointments-container [style*="border-left: 4px"] {
        flex-direction: column !important;
        padding: 16px !important;
        gap: 12px !important;
        border-radius: 12px !important;
    }
    
    /* Time section */
    .appointment-card > div:first-child,
    #medical-appointments-container [style*="border-left: 4px"] > div[style*="min-width: 80px"] {
        min-width: unset !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding-bottom: 12px;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
    }
    
    /* Patient name and details */
    .appointment-card > div:nth-child(2),
    #medical-appointments-container [style*="border-left: 4px"] > div[style*="flex: 1"] {
        width: 100%;
    }
    
    /* Action buttons */
    .appointment-card > div:last-child,
    #medical-appointments-container [style*="border-left: 4px"] > div[style*="display: flex"][style*="gap: 8px"] {
        width: 100% !important;
        justify-content: flex-start !important;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
        flex-wrap: wrap !important;
    }
    
    .appointment-card button,
    #medical-appointments-container [style*="border-left: 4px"] button {
        flex: 1 !important;
        min-width: 60px !important;
        padding: 10px 12px !important;
    }
}

/* ============================================================================
   MOBILE OPTIMIZATIONS - EQUIPMENT CARDS
   ============================================================================ */

@media (max-width: 768px) {
    /* Equipment grid */
    #medical-equipment-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    /* Equipment card */
    #medical-equipment-container .card,
    #medical-equipment-container > div[style*="border-radius"] {
        padding: 16px !important;
        border-radius: 16px !important;
        margin-bottom: 0 !important;
    }
    
    /* Equipment header with icon */
    #medical-equipment-container [style*="display: flex"][style*="gap: 16px"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Equipment icon */
    #medical-equipment-container [style*="width: 50px"][style*="height: 50px"],
    #medical-equipment-container [style*="width: 60px"][style*="height: 60px"] {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
    
    /* Equipment name */
    #medical-equipment-container h4,
    #medical-equipment-container strong {
        font-size: 18px !important;
    }
    
    /* Equipment badges */
    #medical-equipment-container [style*="display: flex"][style*="gap: 8px"][style*="flex-wrap"] {
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-top: 12px !important;
    }
    
    #medical-equipment-container span[style*="border-radius"] {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
    
    /* Equipment action buttons */
    #medical-equipment-container [style*="display: flex"][style*="gap: 8px"]:last-child {
        width: 100% !important;
        margin-top: 16px !important;
        padding-top: 16px;
        border-top: 1px solid #f1f5f9;
    }
    
    #medical-equipment-container [style*="display: flex"][style*="gap: 8px"]:last-child button {
        flex: 1 !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        min-height: 48px;
    }
}

/* ============================================================================
   MOBILE OPTIMIZATIONS - PATIENTS PAGE
   ============================================================================ */

@media (max-width: 768px) {
    /* Patients container */
    #medical-patients-container {
        overflow-x: visible;
    }
    
    /* Hide table on mobile - now handled by JS */
    #medical-patients-container .table-responsive {
        display: block;
    }
    
    /* Patient cards list */
    .patients-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    /* Patient cards (generated by JS) */
    .patient-card-mobile {
        background: white;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1px solid #f1f5f9;
    }
    
    .patient-card-mobile .patient-name {
        font-size: 18px;
        font-weight: 600;
        color: #1e293b;
        margin-bottom: 8px;
    }
    
    .patient-card-mobile .patient-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        color: #64748b;
        font-size: 14px;
    }
    
    .patient-card-mobile .patient-info span {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .patient-card-mobile .patient-alerts {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }
    
    .patient-card-mobile .patient-alerts .alert-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: #fef2f2;
        color: #dc2626;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 500;
    }
    
    .patient-card-mobile .patient-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }
    
    .patient-card-mobile .patient-actions button {
        flex: 1;
        padding: 10px 16px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        min-height: 44px;
    }
}

/* ============================================================================
   MOBILE - GENERAL CARD IMPROVEMENTS
   ============================================================================ */

@media (max-width: 768px) {
    /* All medical cards */
    .medical-module .card,
    [id^="medical"] .card {
        border-radius: 16px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    }
    
    /* Empty states */
    .medical-module .card[style*="text-align: center"],
    [id^="medical"] .card[style*="text-align: center"] {
        padding: 40px 20px !important;
    }
    
    .medical-module .card[style*="text-align: center"] p,
    [id^="medical"] .card[style*="text-align: center"] p {
        font-size: 15px !important;
    }
    
    /* Section padding for bottom nav */
    #medicalAppointmentsSection,
    #medicalEquipmentSection,
    #medicalPatientsSection,
    #medicalDoctorsSection {
        padding-bottom: 100px !important;
    }
}

/* ============================================================================
   MOBILE - BUTTONS STYLING
   ============================================================================ */

@media (max-width: 768px) {
    /* Primary buttons */
    .medical-module .btn-primary,
    [id^="medical"] .btn-primary,
    .medical-module button[style*="background: linear-gradient"],
    [id^="medical"] button[style*="background: linear-gradient"] {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
        color: white !important;
        border: none !important;
        font-weight: 600 !important;
    }
    
    /* Secondary buttons */
    .medical-module .btn-secondary,
    [id^="medical"] .btn-secondary {
        background: white !important;
        color: #475569 !important;
        border: 2px solid #e2e8f0 !important;
    }
    
    /* Button hover states for touch */
    .medical-module button:active,
    [id^="medical"] button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .medical-section .btn,
    .medical-section button,
    .medical-filters {
        display: none !important;
    }
    
    .medical-section {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* ============================================================================
   APPOINTMENT WIZARD - FULL SCREEN RESPONSIVE STYLES
   ============================================================================ */

.wizard-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.wizard-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

.wizard-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.wizard-step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-icon {
    background: linear-gradient(135deg, var(--medical-primary) 0%, var(--medical-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.wizard-step.completed .wizard-step-icon {
    background: var(--medical-success);
    color: white;
}

.wizard-step-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.wizard-step.active .wizard-step-label {
    color: var(--medical-primary);
    font-weight: 600;
}

.wizard-step-line {
    width: 60px;
    height: 3px;
    background: #e2e8f0;
    margin: 0 10px;
    margin-top: -25px;
}

.wizard-step.completed + .wizard-step-line,
.wizard-step-line.completed {
    background: var(--medical-success);
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    gap: 12px;
}

.wizard-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-btn-primary {
    background: linear-gradient(135deg, var(--medical-primary) 0%, var(--medical-primary-dark) 100%);
    color: white;
}

.wizard-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.wizard-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.wizard-btn-secondary:hover {
    background: #e2e8f0;
}

.wizard-btn-success {
    background: linear-gradient(135deg, var(--medical-success) 0%, #059669 100%);
}

.wizard-btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.wizard-step-content {
    max-width: 800px;
    margin: 0 auto;
}

.wizard-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

/* Wizard Form Elements */
.wizard-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.wizard-input:focus {
    border-color: var(--medical-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.wizard-label {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Wizard Cards */
.wizard-doctor-grid,
.wizard-equipment-grid,
.wizard-consultation-types {
    display: grid;
    gap: 12px;
}

.wizard-doctor-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.wizard-doctor-card,
.wizard-equipment-card,
.wizard-ct-card {
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.wizard-doctor-card:hover,
.wizard-equipment-card:hover,
.wizard-ct-card:hover {
    border-color: var(--medical-primary);
    background: #f0fdfa;
}

.wizard-doctor-card.selected,
.wizard-equipment-card.selected,
.wizard-ct-card.selected {
    border-color: var(--medical-primary);
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.15);
}

.wizard-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--medical-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Wizard Slots */
.wizard-date-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.wizard-date-nav {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #64748b;
    transition: all 0.2s;
}

.wizard-date-nav:hover {
    border-color: var(--medical-primary);
    color: var(--medical-primary);
}

.wizard-dates-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    padding: 4px;
}

.wizard-date-card {
    min-width: 70px;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    flex-shrink: 0;
}

.wizard-date-card:hover {
    border-color: var(--medical-primary);
}

.wizard-date-card.selected {
    background: var(--medical-primary);
    border-color: var(--medical-primary);
    color: white;
}

.wizard-date-day {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.wizard-date-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.wizard-date-month {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.wizard-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.wizard-slot-card {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    position: relative;
}

.wizard-slot-card:hover {
    border-color: var(--medical-primary);
    background: #f0fdfa;
}

.wizard-slot-card.selected {
    border-color: var(--medical-primary);
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
}

.wizard-slot-time {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.wizard-slot-end {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.wizard-slot-type {
    display: block;
    font-size: 10px;
    margin-top: 4px;
}

.wizard-slots-section {
    margin-bottom: 20px;
}

.wizard-slots-header {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.wizard-no-slots {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.wizard-no-slots-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.wizard-no-slots-text {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 8px;
}

.wizard-no-slots-hint {
    font-size: 14px;
    color: #94a3b8;
}

/* Type Selector */
.wizard-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.wizard-type-card {
    padding: 24px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.wizard-type-card:hover {
    border-color: var(--medical-primary);
    transform: translateY(-2px);
}

.wizard-type-card.active {
    border-color: var(--medical-primary);
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.15);
}

.wizard-type-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.wizard-type-label {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    display: block;
}

.wizard-type-desc {
    font-size: 13px;
    color: #64748b;
    display: block;
    margin-top: 4px;
}

/* Responsive adjustments for wizard */
@media (max-width: 768px) {
    .wizard-progress {
        padding: 16px 10px;
        overflow-x: auto;
    }
    
    .wizard-step-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .wizard-step-label {
        font-size: 10px;
    }
    
    .wizard-step-line {
        width: 30px;
    }
    
    .wizard-content {
        padding: 16px;
    }
    
    .wizard-step-title {
        font-size: 18px;
    }
    
    .wizard-doctor-grid {
        grid-template-columns: 1fr;
    }
    
    .wizard-type-selector {
        grid-template-columns: 1fr;
    }
    
    .wizard-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wizard-navigation {
        position: sticky;
        bottom: 0;
        padding: 12px 16px;
    }
    
    .wizard-btn {
        padding: 14px 20px;
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wizard-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wizard-date-card {
        min-width: 55px;
        padding: 10px 6px;
    }
    
    .wizard-date-num {
        font-size: 18px;
    }
}
