/**
 * style.css
 * 
 * ملف التنسيق الرئيسي
 * يحتوي على:
 * - Dashboard UI
 * - Responsive Design
 * - Animations خفيفة
 * - ألوان طبية حديثة
 */

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* الألوان الطبية */
    --primary-color: #2c5f8d;
    --primary-light: #3d7fb8;
    --primary-dark: #1e4263;
    --secondary-color: #4a90a4;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* ألوان الحالات */
    --status-present: #28a745;
    --status-ending: #ffc107;
    --status-absent: #dc3545;
    
    /* ألوان الخلفية */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    
    /* ألوان النصوص */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    
    /* الظلال */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Fonts - Arabic Royal Fonts */
    --font-primary: 'Tajawal', 'Amiri', sans-serif;
    --font-heading: 'Amiri', 'Tajawal', serif;
    --font-elegant: 'Changa', 'Tajawal', sans-serif;
    --font-mono: 'Inter', 'Courier New', monospace;
    
    /* Text Colors - Dark Theme */
    --text-primary-dark: #ffffff;
    --text-secondary-dark: rgba(255, 255, 255, 0.85);
    --text-tertiary-dark: rgba(255, 255, 255, 0.65);
    --text-accent-dark: #34d399;
    --text-muted-dark: rgba(255, 255, 255, 0.5);
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    direction: rtl;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    color: #34d399;
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
}

.logo h1,
.logo .hospital-name {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.dark-theme .logo i,
body.index-page .logo i {
    color: #34d399;
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
}

.logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    margin-left: 0.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== Doctors Grid (Patient View) ===== */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.doctor-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* حالات البطاقة */
.doctor-card.status-present {
    border-top: 4px solid var(--status-present);
}

.doctor-card.status-ending {
    border-top: 4px solid var(--status-ending);
}

.doctor-card.status-absent {
    border-top: 4px solid var(--status-absent);
}

.card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.doctor-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-info {
    flex: 1;
}

.doctor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.doctor-specialty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-icon {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
}

.status-badge-table {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.status-badge-table i {
    font-size: 1rem;
}

.status-text-inline {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.time-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.schedule-time,
.checkin-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.schedule-time .label,
.checkin-time .label {
    color: var(--text-secondary);
    font-weight: 600;
}

.schedule-time .value,
.checkin-time .value {
    color: var(--text-primary);
    font-weight: 700;
}

.countdown-section {
    text-align: center;
    margin-bottom: 1rem;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-section {
    margin-top: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
    animation: progressAnimation 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* ===== Admin View ===== */
.admin-main {
    background-color: var(--bg-primary);
}

.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

/* Table */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    margin-bottom: 2rem;
    position: relative;
}

.doctors-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.doctors-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-light);
}

.doctors-table th {
    padding: clamp(0.8rem, 1.5vw, 1.2rem);
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
}

.doctors-table td {
    padding: clamp(0.8rem, 1.5vw, 1.2rem);
    border-bottom: 1px solid #e9ecef;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
}

.doctors-table tbody tr {
    transition: background-color 0.2s ease;
}

.doctors-table tbody tr:hover {
    background-color: #f8f9fa;
}

.doctor-cell {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 1.5vw, 1rem);
    min-width: 0;
}

.table-photo {
    width: clamp(45px, 6vw, 50px);
    height: clamp(45px, 6vw, 50px);
    min-width: 45px;
    min-height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.doctor-cell strong {
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    display: block;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doctor-cell small {
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge-table {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: clamp(0.4rem, 0.8vw, 0.5rem);
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.btn {
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.8rem, 1.5vw, 1rem);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: clamp(0.75rem, 1.1vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn i {
    font-size: clamp(0.8rem, 1.2vw, 1rem);
}

.btn-checkin {
    background-color: var(--success-color);
    color: var(--text-light);
}

.btn-checkin:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-checkout {
    background-color: var(--danger-color);
    color: var(--text-light);
}

.btn-checkout:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-edit {
    background-color: var(--info-color);
    color: var(--text-light);
}

.btn-edit:hover {
    background-color: #138496;
    transform: translateY(-2px);
}

.btn-toggle-visibility {
    background-color: var(--warning-color);
    color: var(--text-primary);
}

.btn-toggle-visibility:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

/* Statistics Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 25vw, 300px), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: clamp(1.2rem, 2vw, 1.5rem);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 1.5vw, 1rem);
    transition: all 0.3s ease;
    min-height: clamp(80px, 12vh, 100px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    min-width: 50px;
    min-height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-light);
    flex-shrink: 0;
}

.stat-icon.stat-present {
    background-color: var(--status-present);
}

.stat-icon.stat-absent {
    background-color: var(--status-absent);
}

.stat-icon.stat-ending {
    background-color: var(--status-ending);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Notifications ===== */
.notifications-container {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-light);
    font-weight: 600;
    min-width: 300px;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background-color: var(--success-color);
}

.notification-error {
    background-color: var(--danger-color);
}

.notification-warning {
    background-color: var(--warning-color);
    color: var(--text-primary);
}

.notification-info {
    background-color: var(--info-color);
}

/* ===== Footer ===== */
.main-footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* ===== Action Bar ===== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 3vh, 2rem);
    flex-wrap: wrap;
}

.action-bar .search-section {
    flex: 1;
    min-width: 200px;
    max-width: 500px;
}

.action-bar .btn-add-doctor {
    white-space: nowrap;
    padding: clamp(0.6rem, 1.2vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add-doctor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-small {
    max-width: 450px;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.required {
    color: var(--danger-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.form-input.error {
    border-color: var(--danger-color);
}

.error-message {
    display: none;
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-help {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===== Photo Upload ===== */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.photo-preview {
    position: relative;
    width: 150px;
    height: 150px;
    border: 2px dashed #e9ecef;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    display: block;
}

.photo-preview:hover {
    border-color: var(--primary-color);
    background-color: #e9ecef;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    pointer-events: none;
}

.photo-preview img + .photo-placeholder {
    display: none;
}

.photo-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.photo-input {
    display: none;
}

.btn-remove-photo {
    align-self: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-section-divider {
    margin: 2rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.form-section-divider h4 {
    margin: 0 0 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===== Delete Confirmation Modal ===== */
.delete-warning {
    text-align: center;
    padding: 1rem 0;
}

.warning-icon {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.delete-warning h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.delete-info {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.delete-alert {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: right;
    color: #856404;
}

.delete-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--text-light);
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-delete {
    background-color: var(--danger-color);
    color: var(--text-light);
}

.btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-delete i {
    margin-left: 0.25rem;
}

.btn-edit-times {
    background-color: var(--info-color);
    color: var(--text-light);
}

.btn-edit-times:hover {
    background-color: #138496;
    transform: translateY(-2px);
}

.btn-edit-times i {
    margin-left: 0.25rem;
}

/* ===== Doctor Info Box ===== */
.doctor-info-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.doctor-info-box img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.doctor-info-box .info-text h4 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.doctor-info-box .info-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Time Preview ===== */
.time-preview {
    background-color: #e7f3ff;
    border: 1px solid var(--info-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.time-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.time-preview-item:last-child {
    margin-bottom: 0;
}

.time-preview-label {
    font-weight: 600;
    color: var(--text-primary);
}

.time-preview-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===== Image Preview Overlay ===== */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-overlay.show {
    opacity: 1;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-preview-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%) scale(1.1);
}

/* تحسين عرض الصور في البطاقات */
.doctor-photo img,
.table-photo {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.doctor-photo img:hover,
.table-photo:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.photo-preview img {
    transition: transform 0.3s ease;
}

.photo-preview img:hover {
    transform: scale(1.1);
}

/* ===== Attendance Page ===== */
.filters-section {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.table-header-actions h3 {
    margin: 0;
    color: var(--primary-color);
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--text-light);
}

.btn-success:hover {
    background-color: #218838;
}

.status-complete {
    background-color: var(--success-color);
    color: var(--text-light);
}

.status-present {
    background-color: var(--info-color);
    color: var(--text-light);
}

.status-absent {
    background-color: var(--danger-color);
    color: var(--text-light);
}

/* تحسينات إضافية لأيقونات الحالة */
.status-icon i {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

.status-ending .status-icon i {
    animation: statusWarning 1.5s ease-in-out infinite;
}

@keyframes statusWarning {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.btn-secondary {
    background-color: #6c757d;
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressAnimation {
    from {
        width: 0;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-add-doctor {
        width: 100%;
        justify-content: center;
    }
    
    .doctors-grid {
        grid-template-columns: 1fr;
    }
    
    .doctors-table {
        font-size: clamp(0.75rem, 1vw, 0.85rem);
        min-width: 700px;
    }
    
    .doctors-table th,
    .doctors-table td {
        padding: clamp(0.6rem, 1vw, 0.75rem) clamp(0.4rem, 0.8vw, 0.5rem);
    }
    
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .btn {
        width: auto;
        min-width: fit-content;
        padding: 0.5rem 0.8rem;
        font-size: clamp(0.7rem, 1vw, 0.85rem);
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
    }
    
    .stat-icon {
        margin: 0 auto;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        min-height: auto;
    }
    
    .doctors-table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .doctors-table th,
    .doctors-table td {
        padding: 0.6rem 0.4rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .doctor-cell {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .table-photo {
        margin: 0 auto;
    }
    
    .notifications-container {
        left: 10px;
        right: 10px;
    }
    
    .notification {
        min-width: auto;
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .doctor-photo {
        width: 100px;
        height: 100px;
    }
}

/* ===== Dark Pastel / Glass Hero Style - Global Theme ===== */
body.dark-theme,
body.index-page {
    background: #0a0a15;
    color: #ffffff;
    min-height: 100vh;
}

body.dark-theme .main-header,
body.index-page .main-header {
    background: rgba(21, 21, 32, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-theme .main-content,
body.index-page .main-content {
    background: #0a0a15;
    min-height: calc(100vh - 200px);
    position: relative;
    overflow: hidden;
}

body.dark-theme .main-content::before,
body.index-page .main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(45, 212, 191, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.dark-theme .container,
body.index-page .container {
    position: relative;
    z-index: 1;
}

/* Header Styles */
body.dark-theme .logo,
body.index-page .logo {
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
}

body.dark-theme .logo h1,
body.index-page .logo h1 {
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    letter-spacing: 0.02em;
}

body.dark-theme .nav-link,
body.index-page .nav-link {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.8vh 1.5vw;
    border-radius: 1vw;
    letter-spacing: 0.01em;
}

body.dark-theme .nav-link:hover,
body.index-page .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary-dark);
    font-weight: 600;
}

body.dark-theme .nav-link.active,
body.index-page .nav-link.active {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2) 0%, rgba(45, 212, 191, 0.2) 100%);
    color: var(--text-accent-dark);
    font-weight: 700;
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.2);
}

/* Page Header */
body.dark-theme .page-header,
body.index-page .page-header {
    color: var(--text-primary-dark);
    margin-bottom: 3vh;
    padding: 2vh 0;
}

body.dark-theme .page-header h2,
body.index-page .page-header h2 {
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1vh;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

body.dark-theme .page-subtitle,
body.index-page .page-subtitle {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Cards and Tables - Glass Style */
body.dark-theme .doctor-card,
body.dark-theme .card,
body.dark-theme .table-container,
body.dark-theme .stats-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

body.dark-theme .doctors-table,
body.dark-theme table {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2vw;
    overflow: hidden;
}

body.dark-theme .doctors-table th,
body.dark-theme table th {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary-dark);
    font-family: var(--font-elegant);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: clamp(1vh, 1.5vw, 1.5vh) clamp(1vw, 1.5vw, 1.5vw);
    letter-spacing: 0.01em;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
}

body.dark-theme .doctors-table td,
body.dark-theme table td {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-weight: 400;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: clamp(1vh, 1.5vw, 1.5vh) clamp(1vw, 1.5vw, 1.5vw);
    letter-spacing: 0.005em;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
}

body.dark-theme .doctors-table tr:hover,
body.dark-theme table tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .doctors-table a,
body.dark-theme table a {
    color: var(--text-accent-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

body.dark-theme .doctors-table a:hover,
body.dark-theme table a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* Buttons - Glass Style */
body.dark-theme .btn,
body.dark-theme button {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary-dark);
    font-family: var(--font-elegant);
    font-weight: 600;
    border-radius: 1vw;
    padding: 1.2vh 2.5vw;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
    cursor: pointer;
}

body.dark-theme .btn:hover,
body.dark-theme button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3);
}

body.dark-theme .btn-primary,
body.dark-theme .btn-success {
    background: linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);
    border-color: #34d399;
    color: #0a0a15;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3);
}

body.dark-theme .btn-primary:hover,
body.dark-theme .btn-success:hover {
    box-shadow: 0 6px 30px rgba(52, 211, 153, 0.5);
    transform: translateY(-2px);
}

body.dark-theme .btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    border-color: #f87171;
    color: #ffffff;
}

body.dark-theme .btn-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fbbf24;
    color: #0a0a15;
}

/* Input Fields - Glass Style */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1vw;
    color: var(--text-primary-dark);
    font-family: var(--font-primary);
    font-weight: 400;
    padding: 1.2vh 1.5vw;
    letter-spacing: 0.01em;
}

body.dark-theme input:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
    outline: none;
    border-color: var(--text-accent-dark);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary-dark);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: var(--text-muted-dark);
    font-weight: 300;
}

/* Search Box */
body.dark-theme .search-box,
body.dark-theme .search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.dark-theme .search-input:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

/* Modals - Glass Style */
body.dark-theme .modal,
body.dark-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark-theme .modal-content {
    background: rgba(21, 21, 32, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: #ffffff;
}

body.dark-theme .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .modal-header h3 {
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.dark-theme .modal-body,
body.dark-theme .modal-footer {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
}

/* Footer */
body.dark-theme .main-footer {
    background: rgba(21, 21, 32, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-tertiary-dark);
    font-family: var(--font-primary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Empty State */
body.dark-theme .empty-state {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

body.dark-theme .empty-state p {
    color: var(--text-tertiary-dark);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
}

/* Stats Cards */
body.dark-theme .stat-card,
body.dark-theme .stats-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(1vw, 2vw, 2vw);
    padding: clamp(1.5vh, 2.5vh, 2.5vh) clamp(1.5vw, 2.5vw, 2.5vw);
    transition: all 0.3s ease;
    min-height: clamp(80px, 12vh, 100px);
}

body.dark-theme .stat-card:hover,
body.dark-theme .stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(52, 211, 153, 0.3);
}

body.dark-theme .stat-icon {
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    min-width: 50px;
    min-height: 50px;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    flex-shrink: 0;
}

body.dark-theme .stat-info h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

body.dark-theme .stat-info p {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    letter-spacing: 0.01em;
}

body.dark-theme .stat-value {
    color: var(--text-primary-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.dark-theme .stat-label {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-weight: 500;
    letter-spacing: 0.01em;
}


/* Cards Control Panel */
.cards-control-panel {
    display: flex;
    align-items: center;
    gap: 1.5vw;
    margin-top: 2vh;
    padding: 1.5vh 2vw;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.control-label i {
    color: #34d399;
}

.cards-count-buttons {
    display: flex;
    gap: 0.8vw;
}

.count-btn {
    width: clamp(40px, 4vw, 60px);
    height: clamp(40px, 4vw, 60px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1vw;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.count-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #34d399;
    color: #ffffff;
    transform: translateY(-2px);
}

.count-btn.active {
    background: linear-gradient(135deg, #34d399 0%, #2dd4bf 100%);
    border-color: #34d399;
    color: #0a0a15;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
}

/* Doctors Grid - Dark Pastel Style */
body.index-page .doctors-grid {
    display: grid;
    gap: 2.5vw;
    margin-top: 3vh;
    grid-template-columns: repeat(3, 1fr);
}

body.index-page .doctors-grid.grid-1 {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

body.index-page .doctors-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

body.index-page .doctors-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

body.index-page .doctors-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Doctor Card - Glass Hero Style */
body.index-page .doctor-card {
    background: rgba(15, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.index-page .doctor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    transition: left 0.5s ease;
}

body.index-page .doctor-card:hover::before {
    left: 100%;
}

body.index-page .doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(52, 211, 153, 0.3);
}

body.index-page .card-header {
    padding: 2.5vh 2.5vw;
    display: flex;
    align-items: center;
    gap: 2vw;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.index-page .doctor-photo {
    width: clamp(80px, 10vw, 120px);
    height: clamp(80px, 10vw, 120px);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.3);
    position: relative;
    flex-shrink: 0;
}

body.index-page .doctor-photo::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d399, #2dd4bf, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

body.index-page .doctor-card:hover .doctor-photo::after {
    opacity: 0.5;
    animation: photoGlow 2s ease-in-out infinite;
}

@keyframes photoGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

body.index-page .doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.index-page .doctor-name {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5vh;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(52, 211, 153, 0.4);
    letter-spacing: 0.02em;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

body.index-page .doctor-specialty {
    font-family: var(--font-elegant);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: #34d399;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(52, 211, 153, 0.4);
    position: relative;
    z-index: 2;
}

body.index-page .status-badge {
    margin-right: auto;
    padding: 1vh 1.5vw;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5vh;
}

body.index-page .status-icon {
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

body.index-page .status-text {
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.index-page .card-body {
    padding: 2vh 2.5vw;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.index-page .time-info {
    margin-bottom: 2vh;
    padding-bottom: 2vh;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.index-page .schedule-time,
body.index-page .checkin-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1vh;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
}

body.index-page .schedule-time .label,
body.index-page .checkin-time .label {
    color: var(--text-secondary-dark);
    font-family: var(--font-primary);
    font-weight: 500;
    letter-spacing: 0.01em;
}

body.index-page .schedule-time .value,
body.index-page .checkin-time .value {
    color: #ffffff;
    font-family: var(--font-elegant);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.index-page .countdown-section {
    text-align: center;
    margin-bottom: 2vh;
    padding: 1.5vh 1.5vw;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5vw;
}

body.index-page .countdown-label {
    font-family: var(--font-primary);
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    color: var(--text-secondary-dark);
    font-weight: 500;
    margin-bottom: 1vh;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.index-page .countdown-value {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-accent-dark);
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
    letter-spacing: 0.05em;
    animation: countdownPulse 2s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
    }
    50% {
        text-shadow: 0 0 30px rgba(52, 211, 153, 0.7);
    }
}

body.index-page .progress-section {
    margin-top: 2vh;
}

body.index-page .progress-bar-container {
    width: 100%;
    height: clamp(8px, 1vh, 12px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1vw;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.index-page .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        #34d399 0%,
        #2dd4bf 50%,
        #60a5fa 100%);
    border-radius: 1vw;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
    position: relative;
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0%, 100% {
        box-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(52, 211, 153, 0.8);
    }
}

body.index-page .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

body.index-page .progress-text {
    font-family: var(--font-primary);
    text-align: center;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    color: var(--text-secondary-dark);
    font-weight: 500;
    margin-top: 1vh;
    letter-spacing: 0.01em;
}

/* Status Colors */
body.index-page .doctor-card.status-present {
    border-color: rgba(52, 211, 153, 0.3);
}

body.index-page .doctor-card.status-ending {
    border-color: rgba(251, 191, 36, 0.3);
}

body.index-page .doctor-card.status-ending .countdown-value {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

body.index-page .doctor-card.status-ending .progress-bar {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 50%, #f87171 100%);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.6);
}

/* Responsive */
@media (max-width: 1200px) {
    body.index-page .doctors-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body.index-page .doctors-grid.grid-3,
    body.index-page .doctors-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    body.index-page .doctors-grid.grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body.index-page .doctors-grid {
        grid-template-columns: 1fr !important;
    }
    
    .cards-control-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}

