/* Patient Management Professional Styling */

/* Modern Patients Header - Calm & Professional */
.patients-header-modern {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid #eef2f6;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(192, 110, 79, 0.08);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.patients-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(192, 110, 79, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.icon-container-gradient {
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 24px rgba(192, 110, 79, 0.12);
    position: relative;
    z-index: 1;
    border: 1px solid #eef2f6;
    transition: all 0.3s ease;
}

.icon-container-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(192, 110, 79, 0.16);
}

.icon-container-gradient svg {
    color: #C06E4F;
    filter: drop-shadow(0 2px 4px rgba(192, 110, 79, 0.14));
}

.patients-header-modern h1 {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
    position: relative;
    z-index: 1;
}

.patients-header-modern p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    position: relative;
    z-index: 1;
}

.btn-add-patient-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(192,110,79,0.28);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}
.btn-add-patient-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192,110,79,0.38);
}
[data-theme="dark"] .btn-add-patient-modern {
    box-shadow: 0 4px 14px rgba(192,110,79,0.22);
}


/* Professional Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    padding: 80px 20px 20px 20px; /* Add top padding to create space from header */
}

.modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 650px;
    max-height: calc(100vh - 160px); /* Adjust height to account for top/bottom padding */
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.modal-content .close-x-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Professional Modal Header */
.modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #134276 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2);
    position: relative;
}

.modal-header h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    padding: 10px 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Professional Modal Body */
.modal-body {
    padding: 30px;
    direction: rtl;
    text-align: right;
    max-height: 60vh;
    overflow-y: auto;
}

/* Professional Session Info Cards */
.session-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.session-info-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.session-info-card .label {
    font-weight: 700;
    color: #0369a1;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-info-card .value {
    font-size: 16px;
    color: #0c4a6e;
    font-weight: 600;
}

/* Professional Content Area */
.professional-content-area {
    background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    white-space: pre-line;
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #1e293b;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
}

/* Professional Headers */
.professional-header {
    background: linear-gradient(135deg, #A85838 0%, #C06E4F 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.professional-header h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.professional-header p {
    margin: 10px 0 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Modern Patient Cards */
.patient-card-modern {
    background: white;
    border-radius: 12px;
    border: 1px solid #f0f2f5;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.patient-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #e5e7eb;
}

.patient-card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f2f5;
    direction: rtl;
}

.patient-info-modern {
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-icon-modern {
    width: 40px;
    height: 40px;
    background: #FAF7F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C06E4F;
    flex-shrink: 0;
}

.patient-name-modern {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
}

.patient-actions-modern {
    display: flex;
    gap: 8px;
}

.btn-view-modern,
.btn-delete-modern,
.btn-new-treatment-modern {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-new-treatment-modern {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-new-treatment-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-view-modern {
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(192, 110, 79, 0.20);
}

.btn-view-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 110, 79, 0.28);
}

.btn-delete-modern {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-delete-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.patient-stats-modern {
    background: #f8fafc;
    padding: 14px 20px;
    direction: rtl;
}

.stat-item-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.stat-label-modern {
    color: #64748b;
    font-weight: 600;
}

.stat-value-modern {
    color: #1e293b;
    font-weight: 700;
    font-size: 16px;
}

/* Treatment Sub-Rows - Hierarchical Design */
.treatment-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-right: 3px solid #e2e8f0;
    border-radius: 0 8px 8px 0;
    padding: 10px 16px;
    margin: 4px 10px 4px 40px;
    transition: all 0.2s ease;
    direction: rtl;
}

.treatment-sub-row:hover {
    background: #f1f5f9;
    border-right-color: #cbd5e1;
}

.treatment-date-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.treatment-date-info svg {
    flex-shrink: 0;
}

.date-text {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.encrypted-badge {
    font-size: 12px;
    color: #6b7280;
    margin-right: 8px;
}

.treatment-actions {
    display: flex;
    gap: 6px;
}

.btn-view-small,
.btn-delete-small {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-view-small {
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    box-shadow: 0 1px 4px rgba(192, 110, 79, 0.20);
}

.btn-view-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(192, 110, 79, 0.28);
}

.btn-delete-small {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.2);
    padding: 6px 10px;
}

.btn-delete-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Old Professional Patient Card - Keep for backwards compatibility */
.professional-patient-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.professional-patient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
}

.professional-patient-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.patient-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.patient-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.professional-btn {
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(192, 110, 79, 0.28);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.professional-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(192, 110, 79, 0.38);
}

.professional-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.professional-btn.danger:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

.professional-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.professional-btn.success:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.professional-btn.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.professional-btn.secondary:hover {
    box-shadow: 0 6px 18px rgba(107, 114, 128, 0.4);
}

/* Patient Stats */
.patient-stats {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.patient-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    color: #1e293b;
    font-weight: 700;
}

/* Professional Session Cards */
.professional-session-card {
    background: linear-gradient(135deg, #fefefe 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.professional-session-card:hover {
    border-color: #C06E4F;
    box-shadow: 0 6px 20px rgba(192, 110, 79, 0.14);
    transform: translateY(-2px);
}

.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.session-date-time {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-actions {
    display: flex;
    gap: 8px;
}

.session-meta {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.session-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Professional Modal Footer */
.modal-footer {
    padding: 25px 30px;
    border-top: 2px solid #f1f5f9;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    display: flex;
    gap: 15px;
    justify-content: center;
    border-radius: 0 0 20px 20px;
}

/* Unified Button Styling for Modal Footer */
.modal-footer .nav-btn,
.modal-footer .local-save-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

/* Save Button - Green */
.modal-footer .local-save-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.modal-footer .local-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

/* Copy Button - Blue */
.modal-footer .nav-btn.secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-footer .nav-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Close Button - Gray */
.modal-footer .nav-btn.neutral {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.modal-footer .nav-btn.neutral:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(107, 114, 128, 0.4);
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 220px 15px 15px 15px; /* Increase top padding significantly for mobile to show modal header */
        align-items: flex-start; /* Align to top instead of center */
    }
    
    .modal-content {
        width: 95%;
        margin: 0;
        max-height: calc(100vh - 180px); /* Adjust height for mobile with more top space */
    }
    
    .session-info-cards {
        grid-template-columns: 1fr;
    }
    
    .patient-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .patient-actions {
        justify-content: center;
    }
    
    .session-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .session-actions {
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .professional-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile modal body adjustments */
    .modal-body {
        padding: 20px;
        max-height: calc(100vh - 280px); /* Adjust for mobile header and footer */
    }
    
    /* Mobile session info cards */
    .session-info-card {
        padding: 12px;
    }
    
    .session-info-card .label {
        font-size: 12px;
    }
    
    .session-info-card .value {
        font-size: 14px;
    }
}

/* Enhanced Typography */
.professional-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1e293b;
}

.professional-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
    text-align: right;
    direction: rtl;
}

/* Enhanced Professional Title */
.professional-title-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #134276 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(19, 66, 118, 0.5);
    direction: rtl;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.professional-title-enhanced::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30%, -30%); }
}

.professional-title-enhanced .title-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.professional-title-enhanced .title-text {
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

/* Enhanced Professional Content Area */
.professional-content-area-enhanced {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 3px solid #e2e8f0;
    border-radius: 24px;
    padding: 35px;
    margin: 30px 0;
    white-space: pre-line;
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 17px;
    line-height: 2.2;
    color: #1e293b;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), inset 0 2px 8px rgba(0, 0, 0, 0.05);
    max-height: 480px;
    overflow-y: auto;
    position: relative;
}

.professional-content-area-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #134276 100%);
    border-radius: 24px 24px 0 0;
}

.professional-content-area-enhanced::after {
    content: '📋';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.1;
    pointer-events: none;
}

/* Custom Scrollbar for Content Area */
.professional-content-area-enhanced::-webkit-scrollbar {
    width: 12px;
}

.professional-content-area-enhanced::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 24px;
}

.professional-content-area-enhanced::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #134276 100%);
    border-radius: 24px;
    border: 2px solid #f1f5f9;
}

.professional-content-area-enhanced::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #0c2a4d 100%);
}

/* Enhanced Professional Button Styling */
.professional-save-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: white !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 160px !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.professional-save-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5) !important;
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
}

.professional-copy-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 140px !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.professional-copy-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5) !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.professional-close-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: white !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 18px rgba(107, 114, 128, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 100px !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.professional-close-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.5) !important;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
}

/* Enhanced Session Info Cards */
.session-info-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 3px solid #3b82f6;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.session-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #134276 100%);
}

.session-info-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, 30%);
}

.session-info-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.35);
    border-color: #134276;
}

.session-info-card .label {
    font-weight: 900;
    color: #1e3a8a;
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.session-info-card .value {
    font-size: 22px;
    color: #134276;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Enhanced Status Messages */
.professional-status {
    padding: 16px 24px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.professional-status.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-color: #86efac;
}

.professional-status.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border-color: #fca5a5;
}

.professional-status.loading {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    border-color: #93c5fd;
}

/* ============================================ */
/* NEW MODERN MODAL DESIGN - CLEAN & MINIMAL */
/* ============================================ */

/* Modern Modal Header - White & Clean */
.modal-header-modern {
    background: white;
    padding: 24px 30px 24px 70px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    direction: rtl;
    position: relative;
}

.modal-header-modern .header-text {
    flex: 1;
}

.modal-header-modern .patient-name-title {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.modal-header-modern .treatment-date-label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.close-x-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #475569;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 10;
}

.close-x-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Modern Modal Body with Scroll - Grid Layout */
.modal-body-scroll {
    padding: 30px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    direction: rtl;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
}

/* Simple Modal Body - For Single Text Content */
.modal-body-scroll-simple {
    padding: 30px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    direction: rtl;
    flex: 1;
}

/* Info Cards - Clean Design */
.info-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.info-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: #f1f5f9;
}

.info-card .card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.info-card .card-title h3 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.info-card .icon-purple {
    color: #C06E4F;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.info-card .content-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
}

/* Modern Footer - Minimal */
.modal-footer-modern {
    padding: 25px 30px;
    border-top: 1px solid #f0f2f5;
    background: white;
    display: flex;
    gap: 12px;
    justify-content: center;
    direction: rtl;
}

/* Primary Button - Purple */
.btn-copy-purple {
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(192, 110, 79, 0.22);
}

.btn-copy-purple:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 110, 79, 0.28);
}

.btn-copy-purple svg {
    width: 16px;
    height: 16px;
}

/* Ghost Button - PDF Export */
.btn-pdf-outline {
    background: white;
    color: #475569;
    border: 1.5px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pdf-outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-pdf-outline svg {
    width: 16px;
    height: 16px;
    color: #ef4444;
}

/* ============================================ */
/* EMPTY STATE - NO PATIENTS DESIGN */
/* ============================================ */

/* No Patients Card */
.no-patients-card {
    background: white;
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f2f5;
    max-width: 600px;
    margin: 0 auto;
}

/* Empty State Icon */
.empty-state-icon {
    margin: 0 auto 30px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
}

.empty-state-icon svg {
    color: #cbd5e1;
}

/* Empty State Title */
.empty-state-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    letter-spacing: -0.3px;
}

/* Empty State Description */
.empty-state-desc {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 40px 0;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

/* Primary CTA Button */
.btn-primary-cta {
    text-decoration: none;
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(192, 110, 79, 0.28);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 240px;
}

.btn-primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(192, 110, 79, 0.38);
    background: linear-gradient(135deg, #A85838 0%, #8C4528 100%);
}

.btn-primary-cta:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(192, 110, 79, 0.28);
}

.btn-primary-cta svg {
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .no-patients-card {
        padding: 40px 24px;
    }
    
    .empty-state-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }
    
    .empty-state-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .empty-state-title {
        font-size: 1.5rem;
    }
    
    .empty-state-desc {
        font-size: 1rem;
        margin-bottom: 32px;
    }
    
    .btn-primary-cta {
        width: 100%;
        padding: 18px 24px;
        font-size: 17px;
    }
}

/* ============================================ */
/* DELETE MODAL - NEW CLEAN DESIGN */
/* ============================================ */

/* Delete Modal Content */
.delete-modal-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    direction: rtl;
    max-height: 90vh;
    overflow-y: auto;
}

/* Warning Icon Circle */
.warning-icon-circle {
    background: #FAE8DF;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

/* Delete Modal Header */
.delete-modal-header {
    margin-bottom: 20px;
}

/* Delete Title */
.delete-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Delete Modal Body */
.delete-modal-body {
    margin-bottom: 32px;
}

.delete-modal-body p {
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

/* Critical Warning */
.critical-warning {
    color: #C06E4F;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

/* Delete Modal Footer */
.delete-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Confirm Delete Button */
.btn-confirm-delete {
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(192, 110, 79, 0.3);
}

.btn-confirm-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(192, 110, 79, 0.4);
    background: linear-gradient(135deg, #A85838 0%, #8C3F22 100%);
}

.btn-confirm-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(192, 110, 79, 0.3);
}

/* Cancel Button */
.btn-cancel-soft {
    background: transparent;
    color: #3C2A1E;
    border: 1.5px solid #C06E4F;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-soft:hover {
    background: #FAE8DF;
    color: #3C2A1E;
}

.btn-cancel-soft:active {
    background: #F0D4C4;
    border-color: #243329;
    color: #FBF8F3;
}

/* Mobile - Icon-Only Buttons for Patient Cards */
@media (max-width: 768px) {
    /* Hide button text on mobile - Patient level */
    .btn-view-modern span,
    .btn-delete-modern span,
    .btn-new-treatment-modern span {
        display: none !important;
    }

    /* Make buttons square and compact - Patient level */
    .btn-view-modern,
    .btn-delete-modern,
    .btn-new-treatment-modern {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }
    
    /* Ensure icons are centered and visible - Patient level */
    .btn-view-modern svg,
    .btn-delete-modern svg {
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
    }
    
    /* Adjust patient actions container */
    .patient-actions-modern {
        gap: 10px !important;
    }
    
    /* Hide button text on mobile - Treatment level */
    .btn-view-small span,
    .btn-delete-small span {
        display: none !important;
    }
    
    /* Make buttons square and compact - Treatment level */
    .btn-view-small,
    .btn-delete-small {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
    }
    
    /* Ensure icons are centered - Treatment level */
    .btn-view-small svg,
    .btn-delete-small svg {
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
    }
    
    /* Adjust treatment actions container */
    .treatment-actions {
        gap: 8px !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .modal-footer-modern {
        flex-direction: column;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1) !important;
        z-index: 1000 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 20px 30px 50px 30px !important; /* Added more bottom padding */
    }
    
    .btn-copy-purple,
    .btn-pdf-outline {
        width: 100%;
        justify-content: center;
    }
    
    .modal-body-scroll {
        padding: 20px;
        padding-bottom: 250px; /* Extra padding at bottom for fixed footer */
        max-height: calc(100vh - 280px);
        overflow-y: auto;
        grid-template-columns: 1fr; /* Single column on mobile */
        min-height: 400px; /* Ensure scrollable area */
    }
    
    .modal-body-scroll-simple {
        padding: 20px;
        padding-bottom: 200px !important; /* Large padding to prevent content hiding behind fixed footer */
        max-height: calc(100vh - 350px) !important;
        overflow-y: auto !important;
        min-height: 200px !important;
    }
    
    .modal-content {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 180px) !important;
        overflow: hidden !important;
        margin-bottom: 140px !important; /* Space for fixed footer */
    }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] body { background: #0f172a !important; color: #f1f5f9 !important; }
[data-theme="dark"] .patients-section { background: #0f172a !important; }
[data-theme="dark"] .patient-card-modern,
[data-theme="dark"] .patient-card { background: #1e293b !important; border-color: #334155 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .patient-card-modern:hover { background: #334155 !important; }
[data-theme="dark"] .patient-card-header-modern { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .patients-grid-modern { background: transparent !important; }
[data-theme="dark"] .page-header,
[data-theme="dark"] .patients-header { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .search-container input,
[data-theme="dark"] .search-input { background: #0f172a !important; color: #f1f5f9 !important; border-color: #475569 !important; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7) !important; }
[data-theme="dark"] .modal-content { background: #1e293b !important; border-color: #334155 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .modal-header { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .modal-body { background: #1e293b !important; }
[data-theme="dark"] .session-item,
[data-theme="dark"] .session-card { background: #0f172a !important; border-color: #334155 !important; color: #f1f5f9 !important; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5 { color: #f1f5f9 !important; }
[data-theme="dark"] p, [data-theme="dark"] span { color: #cbd5e1; }
[data-theme="dark"] .stat-card { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .empty-state { background: #1e293b !important; color: #94a3b8 !important; }
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-secondary { background: #334155 !important; color: #f1f5f9 !important; border-color: #475569 !important; }
[data-theme="dark"] .filter-btn { background: #1e293b !important; color: #94a3b8 !important; border-color: #334155 !important; }
[data-theme="dark"] .filter-btn.active { background: #C06E4F !important; color: white !important; }

/* ===== DARK MODE COMPREHENSIVE ===== */
[data-theme="dark"] .patients-header-modern { background: #1e293b !important; border-color: #334155 !important; box-shadow: none !important; }
[data-theme="dark"] .patients-header-modern h1 { color: #f1f5f9 !important; }
[data-theme="dark"] .patients-header-modern p { color: #94a3b8 !important; }
[data-theme="dark"] .icon-container-gradient { background: #334155 !important; }
[data-theme="dark"] .patient-card-modern { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .patient-card-modern:hover { background: #253147 !important; border-color: #475569 !important; }
[data-theme="dark"] .patient-card-header-modern { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .patient-name-modern { color: #f1f5f9 !important; }
[data-theme="dark"] .patient-icon-modern { background: #334155 !important; }
[data-theme="dark"] .patient-stats-modern { background: #0f172a !important; }
[data-theme="dark"] .stat-label-modern { color: #94a3b8 !important; }
[data-theme="dark"] .stat-value-modern { color: #f1f5f9 !important; }
[data-theme="dark"] .treatment-sub-row { background: #0f172a !important; border-right-color: #475569 !important; }
[data-theme="dark"] .treatment-sub-row:hover { background: #1e293b !important; }
[data-theme="dark"] .treatment-date-info,
[data-theme="dark"] .treatment-date { color: #94a3b8 !important; }
[data-theme="dark"] .status-bar-section { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .no-patients-card { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }
[data-theme="dark"] .search-bar input { background: #0f172a !important; color: #f1f5f9 !important; border-color: #475569 !important; }
[data-theme="dark"] .auth-message { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }

/* Session modal dark mode */
[data-theme="dark"] .modal-content { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .modal-header-modern { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .patient-name-title { color: #f1f5f9 !important; }
[data-theme="dark"] .treatment-date-label { color: #94a3b8 !important; }
[data-theme="dark"] .modal-body-scroll-simple { background: #1e293b !important; }
[data-theme="dark"] .session-content-box { background: #0f172a !important; border-color: #334155 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .modal-footer-modern { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .btn-pdf-outline { background: #0f172a !important; border-color: #475569 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .close-x-btn { color: #94a3b8 !important; background: transparent !important; }
[data-theme="dark"] .close-x-btn:hover { color: #f1f5f9 !important; }

/* ===== MOBILE-FIRST REDESIGN ===== */

/* Patient list container */
#patientsList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 4px;
}

/* Patient card — elevated, clear separation */
.patient-card-modern {
    background: white !important;
    border-radius: 16px !important;
    border: 1.5px solid #e5e7eb !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04) !important;
    overflow: visible !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

.patient-card-modern:hover {
    box-shadow: 0 6px 20px rgba(192,110,79,0.12), 0 2px 6px rgba(0,0,0,0.06) !important;
    transform: translateY(-1px) !important;
}

/* Header — larger touch area */
.patient-card-header-modern {
    padding: 16px 16px 14px !important;
    border-bottom: 1.5px solid #f0f2f5 !important;
}

/* Patient icon — larger, more prominent */
.patient-icon-modern {
    width: 44px !important;
    height: 44px !important;
    background: linear-gradient(135deg, #eef2ff 0%, #ede9fe 100%) !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
}

/* Patient name — larger on mobile */
.patient-name-modern {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

/* Action buttons — 44px min touch target */
.btn-view-modern,
.btn-delete-modern {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    gap: 5px !important;
}

/* Stats area — cleaner */
.patient-stats-modern {
    padding: 12px 16px !important;
    background: #fafbfc !important;
    border-bottom: 1px solid #f0f2f5 !important;
}

/* Treatment rows — more spacious, full-width */
.treatment-sub-row {
    margin: 4px 8px !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    min-height: 48px !important;
    background: #f8fafc !important;
    border-right: 3px solid rgba(192,110,79,0.35) !important;
}

/* Treatment action buttons — larger touch targets */
.btn-view-small,
.btn-delete-small {
    min-height: 36px !important;
    min-width: 36px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

/* Page header — compact on mobile */
.patients-header-modern {
    padding: 24px 20px !important;
    margin-bottom: 20px !important;
    border-radius: 16px !important;
}

/* Responsive — mobile */
@media (max-width: 480px) {
    .patient-card-header-modern { padding: 14px 12px !important; }
    .patient-name-modern { font-size: 1rem !important; }
    .btn-view-modern span, .btn-delete-modern span { display: none; }
    .btn-view-modern, .btn-delete-modern {
        padding: 10px 12px !important;
        min-width: 44px !important;
        justify-content: center !important;
    }
    .treatment-sub-row { margin: 4px 4px !important; }
}

/* Dark mode overrides */
[data-theme="dark"] .patient-card-modern {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}
[data-theme="dark"] .patient-card-header-modern { border-color: #334155 !important; }
[data-theme="dark"] .patient-stats-modern { background: #0f172a !important; border-color: #334155 !important; }
[data-theme="dark"] .treatment-sub-row { background: #0f172a !important; border-right-color: #A85838 !important; }
[data-theme="dark"] .patient-icon-modern { background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%) !important; }

/* ===== PROFESSIONAL DOCUMENT MODAL ===== */
.doc-modal { padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }

.doc-header {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, #fafafa 0%, #FAF7F2 100%);
    border-bottom: 1.5px solid #e5e7eb;
    direction: rtl;
    flex-shrink: 0;
}

.doc-header-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #eef2ff 0%, #ede9fe 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.doc-title {
    margin: 0; font-size: 1.15rem; font-weight: 700;
    color: #1e293b; line-height: 1.2;
}

.doc-date {
    font-size: 13px; color: #C06E4F; font-weight: 600;
    display: block; margin-top: 3px;
}

.doc-divider { height: 1px; background: #f0f2f5; flex-shrink: 0; }

/* Scrollable body */
.doc-content {
    padding: 20px 24px;
    direction: rtl; text-align: right;
    font-size: 15px; line-height: 1.8; color: #1e293b;
}

/* Section titles (=== ... ===) */
.doc-section-title {
    font-size: 1rem; font-weight: 700;
    color: #C06E4F;
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(192,110,79,0.18);
    display: flex; align-items: center; gap: 6px;
}

/* Sub-section headers */
.doc-subsection {
    font-size: 0.9rem; font-weight: 700;
    color: #475569; margin: 14px 0 4px;
    text-transform: uppercase; letter-spacing: 0.03em;
}

/* Paragraphs */
.doc-paragraph {
    margin: 8px 0; color: #374151; line-height: 1.8;
}

/* Lists */
.doc-list {
    list-style: none; padding: 0; margin: 8px 0;
}
.doc-list li {
    padding: 5px 0 5px 0;
    padding-right: 20px;
    position: relative; color: #374151;
}
.doc-list li::before {
    content: '▸'; position: absolute; right: 0;
    color: #C06E4F; font-size: 12px; top: 7px;
}

/* Bracket labels */
.doc-label {
    display: inline-block;
    background: #FBF8F3; color: #A85838;
    border: 1px solid rgba(192,110,79,0.35);
    border-radius: 6px; padding: 1px 8px;
    font-size: 12px; font-weight: 600; margin: 2px 0;
}

/* Dark mode */
[data-theme="dark"] .doc-header { background: linear-gradient(135deg, #1e293b 0%, #1e1b4b 100%) !important; border-color: #334155 !important; }
[data-theme="dark"] .doc-title { color: #f1f5f9 !important; }
[data-theme="dark"] .doc-content { color: #e2e8f0 !important; }
[data-theme="dark"] .doc-paragraph { color: #cbd5e1 !important; }
[data-theme="dark"] .doc-section-title { color: #C06E4F !important; border-color: #3730a3 !important; }
[data-theme="dark"] .doc-subsection { color: #94a3b8 !important; }
[data-theme="dark"] .doc-list li { color: #cbd5e1 !important; }
[data-theme="dark"] .doc-label { background: #1e1b4b !important; color: #a5b4fc !important; border-color: #3730a3 !important; }
[data-theme="dark"] .doc-header-icon { background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%) !important; }

/* Close button — top right corner in doc modal */
.doc-modal .close-x-btn {
    position: absolute !important;
    top: 12px !important;
    left: 14px !important;
    right: auto !important;
    z-index: 10 !important;
}
.doc-modal { position: relative !important; }

/* ===== DOC MODAL REDESIGN ===== */
.doc-modal {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 88vh !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative !important;
    max-width: 640px !important;
    width: 94vw !important;
}

.doc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px 18px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    direction: rtl;
    gap: 12px;
}

.doc-modal-title-wrap { flex: 1; }

.doc-title {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.doc-date {
    font-size: 13px;
    color: #C06E4F;
    font-weight: 600;
    display: block;
}

.doc-close-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.15s;
}
.doc-close-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #ef4444; }

.doc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    direction: rtl;
    -webkit-overflow-scrolling: touch;
}

.doc-content {
    font-size: 15px;
    line-height: 1.85;
    color: #1e293b;
    text-align: right;
}

.doc-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #A85838;
    margin: 20px 0 8px;
    padding: 8px 12px;
    background: #eef2ff;
    border-radius: 8px;
    border-right: 3px solid #C06E4F;
}

.doc-subsection {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin: 16px 0 4px;
    letter-spacing: 0.02em;
}

.doc-paragraph { margin: 6px 0; color: #374151; }

.doc-list { list-style: none; padding: 0; margin: 8px 0; }
.doc-list li {
    padding: 5px 16px 5px 0;
    position: relative; color: #374151;
    border-bottom: 1px solid #f8fafc;
}
.doc-list li::before {
    content: '▸'; position: absolute; right: 0;
    color: #C06E4F; font-weight: bold;
}

.doc-label {
    display: inline-block;
    background: #FBF8F3; color: #8C4528;
    border-radius: 6px; padding: 2px 8px;
    font-size: 12px; font-weight: 600;
    margin: 2px 1px;
}

/* Dark mode */
[data-theme="dark"] .doc-modal-header { background: #1e293b !important; border-color: #334155 !important; }
[data-theme="dark"] .doc-title { color: #f1f5f9 !important; }
[data-theme="dark"] .doc-close-btn { background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important; }
[data-theme="dark"] .doc-close-btn:hover { background: #450a0a !important; border-color: #991b1b !important; color: #f87171 !important; }
[data-theme="dark"] .doc-modal-body { background: #1e293b !important; }
[data-theme="dark"] .doc-content { color: #e2e8f0 !important; }
[data-theme="dark"] .doc-paragraph { color: #cbd5e1 !important; }
[data-theme="dark"] .doc-section-title { background: #1e1b4b !important; color: #a5b4fc !important; border-color: #A85838 !important; }
[data-theme="dark"] .doc-subsection { color: #94a3b8 !important; }
[data-theme="dark"] .doc-list li { color: #cbd5e1 !important; border-color: #334155 !important; }
[data-theme="dark"] .doc-label { background: #1e1b4b !important; color: #a5b4fc !important; }

/* ===== SESSION DOCUMENT MODAL — PROFESSIONAL ===== */
.session-doc-modal {
    display: flex;
    flex-direction: column;
    width: min(600px, 95vw);
    max-height: 88vh;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.1);
    font-family: 'Heebo', sans-serif;
}

/* Top bar — X | Title | Spacer */
.sdm-topbar {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbff;
    flex-shrink: 0;
    gap: 12px;
    direction: rtl;
}

.sdm-close {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #64748b;
    transition: all 0.15s;
    flex-shrink: 0;
    padding: 0;
    font-family: Heebo, sans-serif;
}
.sdm-close:hover { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }

.sdm-title-block {
    flex: 1;
    text-align: center;
}

.sdm-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.sdm-date {
    font-size: 12px;
    font-weight: 600;
    color: #C06E4F;
    display: block;
    margin-top: 2px;
}

.sdm-spacer { width: 36px; flex-shrink: 0; }

/* Scrollable body */
.sdm-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
    direction: rtl;
}

.sdm-content {
    font-size: 15px;
    line-height: 1.8;
    color: #1e293b;
    text-align: right;
}

/* Footer actions */
.sdm-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fafbff;
    flex-shrink: 0;
    direction: rtl;
}

.sdm-btn-primary, .sdm-btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    font-family: 'Heebo', sans-serif;
    min-height: 46px;
}

.sdm-btn-primary {
    background: linear-gradient(135deg, #C06E4F 0%, #A85838 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(192,110,79,0.25);
}
.sdm-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(192,110,79,0.38); }

.sdm-btn-secondary {
    background: white;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}
.sdm-btn-secondary:hover { background: #f8fafc; border-color: #C06E4F; color: #C06E4F; }

/* Content typography */
.sdm-content .doc-section-title {
    font-size: 0.9rem; font-weight: 700; color: #A85838;
    margin: 18px 0 8px; padding: 8px 12px;
    background: rgba(192,110,79,0.08); border-radius: 8px;
    border-right: 3px solid #C06E4F;
    display: block;
}
.sdm-content .doc-paragraph { margin: 6px 0; color: #374151; }
.sdm-content .doc-list { list-style: none; padding: 0; margin: 8px 0; }
.sdm-content .doc-list li { padding: 5px 16px 5px 0; position: relative; color: #374151; border-bottom: 1px solid #f8fafc; }
.sdm-content .doc-list li::before { content: '▸'; position: absolute; right: 0; color: #C06E4F; font-weight: bold; }
.sdm-content .doc-label { display: inline-block; background: rgba(192,110,79,0.10); color: #A85838; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; margin: 2px 1px; }
.sdm-content .doc-subsection { font-size: 0.85rem; font-weight: 700; color: #64748b; margin: 14px 0 4px; }

/* Dark mode */
[data-theme="dark"] .session-doc-modal { background: #1e293b !important; box-shadow: 0 24px 60px rgba(0,0,0,0.5) !important; }
[data-theme="dark"] .sdm-topbar { background: #0f172a !important; border-color: #334155 !important; }
[data-theme="dark"] .sdm-name { color: #f1f5f9 !important; }
[data-theme="dark"] .sdm-close { background: #334155 !important; border-color: #475569 !important; color: #94a3b8 !important; }
[data-theme="dark"] .sdm-close:hover { background: #450a0a !important; border-color: #991b1b !important; color: #f87171 !important; }
[data-theme="dark"] .sdm-body { background: #1e293b !important; }
[data-theme="dark"] .sdm-content { color: #e2e8f0 !important; }
[data-theme="dark"] .sdm-footer { background: #0f172a !important; border-color: #334155 !important; }
[data-theme="dark"] .sdm-btn-secondary { background: #334155 !important; border-color: #475569 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .sdm-content .doc-section-title { background: rgba(192,110,79,0.15) !important; color: #C06E4F !important; border-color: #C06E4F !important; }
[data-theme="dark"] .sdm-content .doc-paragraph { color: #cbd5e1 !important; }
[data-theme="dark"] .sdm-content .doc-list li { color: #cbd5e1 !important; border-color: #334155 !important; }
[data-theme="dark"] .sdm-content .doc-label { background: rgba(192,110,79,0.18) !important; color: #C06E4F !important; }

/* Overlay centers the new session-doc-modal */
.modal-overlay.active .session-doc-modal { transform: translateY(0) !important; }
.session-doc-modal { transform: translateY(-20px); transition: transform 0.25s ease; }

/* Mobile fix — session doc modal footer always visible */
@media (max-width: 768px) {
    .session-doc-modal {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: calc(100vh - 60px) !important;
        height: calc(100vh - 60px) !important;
        border-radius: 0 !important;
        position: fixed !important;
        top: 60px !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
    }
    .sdm-body { padding: 16px !important; }
    .sdm-footer {
        padding: 12px 16px !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    }
    .sdm-btn-primary, .sdm-btn-secondary { min-height: 50px !important; font-size: 15px !important; }
}

/* Mobile — modal overlay starts below navbar */
@media (max-width: 768px) {
    #sessionModal.modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
        top: 60px !important;
        background: transparent !important;
    }
}

/* Dark mode — delete modal */
[data-theme="dark"] .delete-modal-content {
    background: #1e293b !important;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5) !important;
}
[data-theme="dark"] .delete-title { color: #f1f5f9 !important; }
[data-theme="dark"] .delete-modal-body p { color: #94a3b8 !important; }
[data-theme="dark"] .critical-warning { color: #FAE8DF !important; }
[data-theme="dark"] .btn-cancel-soft { border-color: #C06E4F !important; color: #FAE8DF !important; background: transparent !important; }
[data-theme="dark"] .btn-cancel-soft:hover { background: #4A2418 !important; color: #FAE8DF !important; border-color: #C06E4F !important; }

/* ── Patient Card v2 ── */
.pc2-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: visible;
    transition: box-shadow 0.2s;
}
.pc2-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
[data-theme="dark"] .pc2-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .pc2-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.3); }

.pc2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    direction: rtl;
}
.pc2-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pc2-left {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
}
.pc2-avatar {
    width: 38px; height: 38px;
    border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.pc2-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    direction: rtl;
}
[data-theme="dark"] .pc2-name { color: #f1f5f9; }

.pc2-menu-wrapper { position: relative; }
.pc2-dots {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    display: flex; align-items: center;
    transition: background 0.15s, color 0.15s;
}
.pc2-dots:hover { background: #f1f5f9; color: #0f172a; }
[data-theme="dark"] .pc2-dots { color: #94a3b8; }
[data-theme="dark"] .pc2-dots:hover { background: #334155; color: #f1f5f9; }

.pc2-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 160px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
}
[data-theme="dark"] .pc2-dropdown { background: #1e293b; border-color: #334155; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

.pc2-dropdown button {
    width: 100%;
    background: none;
    border: none;
    color: #ef4444;
    padding: 10px 14px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    transition: background 0.15s;
}
.pc2-dropdown button:hover { background: #f8fafc; }
[data-theme="dark"] .pc2-dropdown button:hover { background: #334155; }

.pc2-arrow {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex; align-items: center;
    transition: transform 0.2s, color 0.15s;
}
.pc2-arrow:hover { color: #0f172a; }
[data-theme="dark"] .pc2-arrow { color: #94a3b8; }
[data-theme="dark"] .pc2-arrow:hover { color: #f1f5f9; }
.pc2-arrow.open { transform: rotate(180deg); }

.pc2-new-btn {
    background: transparent;
    border: 1.5px solid #10b981;
    color: #10b981;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.pc2-new-btn:hover { background: #10b981; color: #fff; }

.pc2-count-row {
    padding: 8px 16px 12px;
    font-size: 13px;
    color: #64748b;
    direction: rtl;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
[data-theme="dark"] .pc2-count-row { border-top-color: #334155; background: transparent; }
.pc2-count-val { font-weight: 700; color: #94a3b8; margin-right: 4px; }

/* Light mode override */
[data-theme="light"] .pc2-card { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .pc2-name { color: #0f172a; }
[data-theme="light"] .pc2-dots { color: #64748b; }
[data-theme="light"] .pc2-dots:hover { background: #f1f5f9; color: #0f172a; }
[data-theme="light"] .pc2-dropdown { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .pc2-dropdown button:hover { background: #f8fafc; }
[data-theme="light"] .pc2-arrow { color: #64748b; }
[data-theme="light"] .pc2-count-row { border-color: #e2e8f0; color: #64748b; }
[data-theme="light"] .pc2-count-val { color: #334155; }

/* ── Session Row v2 ── */
.sc2-list { display: flex; flex-direction: column; }
.sc2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #e2e8f0;
    direction: ltr;
    transition: background 0.15s;
}
.sc2-row:hover { background: #f8fafc; }
[data-theme="dark"] .sc2-row { border-top-color: #1e293b; }
[data-theme="dark"] .sc2-row:hover { background: rgba(255,255,255,0.03); }

.sc2-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}
.sc2-date { color: #334155; font-size: 14px; }
[data-theme="dark"] .sc2-date { color: #cbd5e1; }
.sc2-tag {
    background: rgba(192,110,79,0.20);
    color: #a5b4fc;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.sc2-left {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}
.sc2-view {
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: #C06E4F;
    border: none; border-radius: 8px;
    width: 32px; height: 32px;
    cursor: pointer;
    transition: background 0.15s;
}
.sc2-view:hover { background: rgba(192,110,79,0.28); }
.sc2-delete {
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: #f87171;
    border: none; border-radius: 8px;
    width: 32px; height: 32px;
    cursor: pointer;
    transition: background 0.15s;
}
.sc2-delete:hover { background: rgba(239,68,68,0.2); }

/* Light mode — session rows */
[data-theme="light"] .sc2-row { border-top-color: #e2e8f0; }
[data-theme="light"] .sc2-row:hover { background: #f8fafc; }
[data-theme="light"] .sc2-date { color: #334155; }
[data-theme="light"] .sc2-right svg { stroke: #94a3b8; }
[data-theme="light"] .sc2-view { background: transparent; color: #C06E4F; }
[data-theme="light"] .sc2-view:hover { background: rgba(192,110,79,0.22); }
[data-theme="light"] .sc2-delete { color: #ef4444; }
[data-theme="light"] .sc2-delete:hover { background: rgba(239,68,68,0.1); }
[data-theme="light"] .pc2-count-row { background: #f8fafc; }
[data-theme="light"] .pc2-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

/* Full-width new treatment button */
.pc2-new-treatment-row {
    padding: 10px 12px 12px;
}
.pc2-new-treatment-full {
    width: 100%;
    background: transparent;
    border: 2px dashed #10b981;
    color: #10b981;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    direction: rtl;
    font-family: inherit;
}
.pc2-new-treatment-full:hover {
    background: rgba(16,185,129,0.08);
    border-style: solid;
}

/* JWT Refresh Modal */
.jwt-modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    direction: rtl;
}
.jwt-modal-title { font-size: 18px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.jwt-modal-sub { font-size: 14px; color: #64748b; margin-bottom: 20px; }
.jwt-modal-input {
    width: 100%; padding: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px; font-size: 15px;
    text-align: right; margin-bottom: 16px;
    font-family: Heebo, sans-serif;
    background: #fff; color: #1e293b;
}
.jwt-modal-skip {
    flex: 1; background: #f1f5f9; color: #64748b;
    border: none; padding: 12px; border-radius: 10px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    font-family: Heebo, sans-serif;
}

/* Dark mode */
[data-theme="dark"] .jwt-modal-box {
    background: #1e293b !important;
    border: 1px solid #334155;
}
[data-theme="dark"] .jwt-modal-title { color: #f1f5f9 !important; }
[data-theme="dark"] .jwt-modal-sub { color: #94a3b8 !important; }
[data-theme="dark"] .jwt-modal-input {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .jwt-modal-skip {
    background: #334155 !important;
    color: #94a3b8 !important;
}
