/* ========================================
   DOCTOR PORTAL STYLES
   ======================================== */

/* Portal Container & Layout */
.doctor-portal-main {
    background: #f1f5f9;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.doctor-portal-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.doctor-portal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sidebar */
.doctor-portal-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.doctor-sidebar-profile {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.doctor-sidebar-profile .doctor-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid #f1f5f9;
}

.doctor-sidebar-profile .doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-sidebar-profile h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.doctor-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doctor-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doctor-sidebar-nav li {
    margin-bottom: 0.5rem;
}

.doctor-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s ease;
}

.doctor-sidebar-nav a:hover {
    background: #f1f5f9;
    color: #06b6d4;
}

.doctor-sidebar-nav li.active a {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.doctor-sidebar-nav i {
    width: 20px;
    text-align: center;
}

.doctor-sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.doctor-logout-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    color: #ef4444;
    font-weight: 500;
    transition: all 0.2s ease;
}

.doctor-logout-link:hover {
    background: #fef2f2;
}

/* Main Content */
.doctor-portal-content {
    min-width: 0;
}

.doctor-dashboard-header {
    margin-bottom: 2rem;
}

.doctor-dashboard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.doctor-dashboard-header p {
    color: #64748b;
}

.doctor-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.doctor-content-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

/* Stats Grid */
.doctor-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.doctor-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.75rem;
    margin: 0;
    color: #1e293b;
}

.stat-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Content Sections */
.doctor-content-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-row h2 {
    font-size: 1.25rem;
    margin: 0;
}

/* Posts Table */
.doctor-posts-table-wrap {
    overflow-x: auto;
}

.doctor-posts-table {
    width: 100%;
    border-collapse: collapse;
}

.doctor-posts-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f1f5f9;
}

.doctor-posts-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.doctor-posts-table tbody tr:hover {
    background: #f8fafc;
}

.post-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-thumb,
.post-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.post-thumb-placeholder {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.post-cell-info {
    min-width: 0;
}

.post-title-link {
    font-weight: 600;
    color: #1e293b;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title-link:hover {
    color: #06b6d4;
}

.post-cats {
    font-size: 0.8rem;
    color: #94a3b8;
}

.post-status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-published {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-draft {
    background: #e2e8f0;
    color: #475569;
}

.status-default {
    background: #f1f5f9;
    color: #64748b;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn,
.action-link {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.2s ease;
}

.action-btn:hover,
.action-link:hover {
    background: #06b6d4;
    color: white;
}

/* Filter Tabs */
.doctor-filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.doctor-filter-tabs a {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    color: #64748b;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.doctor-filter-tabs a:hover {
    background: #f1f5f9;
}

.doctor-filter-tabs a.active {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

/* Quick Actions */
.doctor-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    transform: translateY(-2px);
}

.quick-action-card i {
    font-size: 1.5rem;
}

/* Empty State */
.doctor-empty-state {
    text-align: center;
    padding: 3rem;
}

.doctor-empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.doctor-empty-state p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Pagination */
.doctor-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.doctor-pagination a,
.doctor-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.doctor-pagination a:hover,
.doctor-pagination .current {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

/* Forms */
.doctor-form-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-only-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #334155;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-group input.disabled-input {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.form-group .required {
    color: #ef4444;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.form-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.field-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form-section-title {
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

/* File Upload */
.doctor-file-upload {
    position: relative;
}

.doctor-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-label:hover {
    border-color: #06b6d4;
    color: #06b6d4;
}

.file-upload-label i {
    font-size: 2rem;
}

.current-image-preview {
    margin-top: 1rem;
}

.current-image-preview img {
    max-width: 200px;
    border-radius: 8px;
}

.current-image-preview-round img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f1f5f9;
}

/* Buttons */
.btn-full {
    width: 100%;
}

.btn-small {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    color: #64748b;
    background: white;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: #06b6d4;
    color: #06b6d4;
}

/* Alerts */
.doctor-alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.doctor-alert-success {
    background: #d1fae5;
    color: #065f46;
}

.doctor-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Login Page */
.doctor-login-wrapper {
    max-width: 440px;
    margin: 3rem auto;
}

.doctor-login-branding {
    text-align: center;
    margin-bottom: 2rem;
}

.doctor-login-branding .site-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.portal-tagline {
    color: #64748b;
    font-size: 1rem;
}

.doctor-login-box {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.doctor-login-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.doctor-login-box .form-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.doctor-login-box .form-group {
    margin-bottom: 1.25rem;
}

.doctor-login-box .form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.doctor-login-box .form-footer a {
    color: #06b6d4;
    font-weight: 500;
}

.doctor-login-box .form-footer a:hover {
    text-decoration: underline;
}

.form-group-inline {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
}

.checkbox-label input {
    width: auto !important;
}

.doctor-login-back {
    text-align: center;
    margin-top: 2rem;
}

.doctor-login-back a {
    color: #64748b;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.doctor-login-back a:hover {
    color: #06b6d4;
}

/* WP Editor overrides in portal */
.doctor-portal-content .wp-editor-wrap {
    border-radius: 10px;
    overflow: hidden;
}

.doctor-portal-content .wp-editor-container {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 0 10px 10px;
}

.doctor-portal-content .wp-editor-tabs {
    padding: 0 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .doctor-portal-layout {
        grid-template-columns: 240px 1fr;
    }
    
    .doctor-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .doctor-portal-layout {
        grid-template-columns: 1fr;
    }
    
    .doctor-portal-sidebar {
        position: static;
        display: none; /* Could add a mobile toggle */
    }
    
    .doctor-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .doctor-content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .doctor-login-wrapper {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    
    .doctor-login-box {
        padding: 1.5rem;
    }
    
    .doctor-filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .doctor-posts-table-full {
        min-width: 600px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions .btn-outline {
        justify-content: center;
    }
}
