/* === accounts/doctor_login.html === */

.doctor-login-page {
  min-height: 100vh;
  background: var(--bg-secondary, #f8fafc);
}

.doctor-header {
  background: white;
  box-shadow: none;
  border-bottom: 1px solid var(--border-default, #e2e8f0);
}

.doctor-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.login-form-section {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 120px);
}

.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  border: 1px solid var(--border-default, #e2e8f0);
}

@media (max-width: 768px) {
  .doctor-header .flex-wrap {
    text-align: center;
  }
}

/* === accounts/doctor_register.html === */

.doctor-register-page {
  min-height: 100vh;
  background: var(--bg-secondary, #f8fafc);
}

.register-form-section {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 120px);
}

.register-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: none;
}

@media (max-width: 768px) {
  .register-card > div {
    padding: 20px;
  }

  .doctor-header .flex-wrap {
    text-align: center;
  }
}

/* === accounts/doctor_profile.html === */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-primary-alpha: rgba(129, 140, 248, 0.1);
  --border-light-alpha: rgba(255, 255, 255, 0.3);
  --text-light-secondary: rgba(255, 255, 255, 0.9);
  --text-light-muted: rgba(255, 255, 255, 0.8);
  --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
  --border-radius-sm: 6px;
  --gradient-primary: #818cf8;
  --gradient-primary-hover: #6366f1;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

/* Enhanced Subject Cards */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.subject-item {
    position: relative;
}

.subject-item > div {
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--bg-card);
}

.subject-item > div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.subject-card-header {
    position: relative;
    padding: var(--spacing-md);
    background: var(--bg-card-secondary);
    border-bottom: 1px solid var(--border-color);
}

.notification-badge-container {
    z-index: 2;
    position: relative;
}

.notification-badge-container .notification-icon {
    font-size: var(--font-size-lg);
    color: var(--primary);
    transition: all 0.2s ease;
}

.notification-badge-container:hover .notification-icon {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.subject-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.subject-meta > span {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-weight: 500;
}

@media (max-width: 768px) {
    .subject-item .card-title {
        font-size: var(--font-size-lg);
    }
}

[dir="rtl"] .notification-badge {
    right: auto;
    left: -8px;
}

/* Statistics Cards */
.doctor-stats-section {
    background: var(--bg-secondary);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary, #818cf8);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-content h4 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.stat-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* Professional Information */
.professional-info {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
    border: 1px solid var(--border-color);
}

.professional-info:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.professional-info h6 {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.professional-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0;
}

.professional-info .fas {
    width: 16px;
    text-align: center;
    color: var(--primary);
}

@media (max-width: 768px) {
    .stat-card {
        padding: 1.5rem;
        text-align: center;
    }

    .stat-content h4 {
        font-size: 2rem;
    }

    .professional-info {
        padding: 1rem;
    }
}

/* Enhanced Doctor Profile */
.doctor-profile-page {
    background: #f8fafc;
    min-height: 100vh;
}

.doctor-hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 80px 0;
}

.doctor-image-container {
    display: flex;
    justify-content: center;
}

.doctor-profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--border-light-alpha);
    box-shadow: var(--shadow-xl);
}

.doctor-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.doctor-specialization {
    font-size: 1.2rem;
    color: var(--text-light-secondary);
    margin-bottom: 1rem;
}

.doctor-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light-muted);
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-icon.facebook { background: #3b5998; }
.social-icon.instagram { background: #e1306c; }
.social-icon.twitter { background: #1da1f2; }
.social-icon.youtube { background: #ff0000; }
.social-icon.tiktok { background: #000000; }
.social-icon.github { background: #333333; }
.social-icon.linkedin { background: #0077b5; }
.social-icon.whatsapp { background: #25d366; }

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

#preferredBtn {
    transition: var(--transition-medium);
}

#preferredBtn.preferred {
    background: rgba(255,255,255,0.2);
}

.auth-section {
    background: var(--bg-primary-alpha);
}

.subjects-section {
    background: var(--bg-primary);
}

.filter-section {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius-md);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.no-subjects-message {
    padding: 60px 20px;
}

@media (max-width: 768px) {
    .doctor-hero-section {
        padding: 40px 0;
    }

    .doctor-name {
        font-size: 2rem;
    }

    .social-icons {
        justify-content: center;
    }
}

/* === accounts/doctor_selection.html === */

.doctor-selection-page {
    min-height: 100vh;
    background: var(--bg-secondary, #f8fafc);
}

.selection-hero {
    background: white;
    border-bottom: 1px solid var(--border-default, #e2e8f0);
}

.doctors-grid {
    padding: 60px 0;
}

.doctor-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    transition: border-color 0.2s ease;
    border: 1px solid var(--border-default, #e2e8f0);
    height: 100%;
}

.doctor-card:hover {
    transform: none;
    border-color: var(--color-primary, #818cf8);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.doctor-card-header {
    position: relative;
    height: 200px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.doctor-card-body {
    padding: 30px;
    text-align: center;
}

.doctor-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.doctor-specialization {
    color: #818cf8;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1rem;
}

.doctor-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-link.facebook { background: #3b5998; }
.social-link.instagram { background: #e1306c; }
.social-link.twitter { background: #1da1f2; }
.social-link.linkedin { background: #0077b5; }

.visit-profile-btn {
    background: var(--primary, #818cf8);
    border: none;
    transition: background-color 0.2s ease;
}

.visit-profile-btn:hover {
    transform: none;
    background: var(--color-primary-dark, #6366f1);
}

.quick-actions {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .doctor-card-body {
        padding: 20px;
    }

    .doctor-image {
        width: 100px;
        height: 100px;
    }

    .doctor-card-header {
        height: 160px;
    }
}

/* === accounts/updateuser.html === */

.profile-update-container {
    padding: 2rem 0;
    min-height: 100vh;
    background: var(--bg-secondary, #f8fafc);
}

.profile-update-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-default, #e2e8f0);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    background: #0f172a;
    color: white;
    padding: 2rem;
    text-align: center;
}

.profile-header h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.profile-header p {
    margin: 0;
    opacity: 0.9;
}

.profile-form-container {
    padding: 2rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === accounts/preferred_profiles.html === */

.preferred-profiles-page {
    background: var(--bg-color);
    min-height: 100vh;
    padding: 2rem 0;
}

.page-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: var(--text-shadow);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light-secondary);
    margin: 0;
}

.preferred-doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.doctor-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
    cursor: move;
    position: relative;
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.doctor-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drag-handle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: move;
}

.doctor-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 1rem;
}

.doctor-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.doctor-specialization {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.doctor-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctor-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-visit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    flex: 1;
    text-align: center;
}

.btn-visit:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.btn-remove {
    background: var(--alert-error-bg, #dc2626);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-browse {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-browse:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.anonymous-notice {
    background: var(--bg-card-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.anonymous-notice .icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.anonymous-notice h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.anonymous-notice p {
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .preferred-doctors-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .doctor-card {
        padding: 1rem;
    }

    .doctor-actions {
        flex-direction: column;
    }

    .btn-visit {
        width: 100%;
    }
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    transform: scale(1.02);
}

/* === Responsive for profile update === */
@media (max-width: 768px) {
    .profile-update-container {
        padding: 1rem 0;
    }

    .profile-header {
        padding: 1.5rem;
    }

    .profile-form-container {
        padding: 1.5rem;
    }
}
