/* ENNU Provider Portal Styles */

.ennu-provider-portal,
.ennu-provider-dashboard-mini {
    font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Portal Header */
.portal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.portal-welcome h1 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 300;
}

.portal-welcome p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.portal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Portal Navigation */
.portal-navigation {
    margin-bottom: 30px;
}

.portal-nav-tabs {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-tab:hover {
    background: #f8f9fa;
    color: #495057;
}

.nav-tab.active {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}

.nav-tab .dashicons {
    font-size: 18px;
}

/* Portal Content */
.portal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.portal-tab {
    display: none;
    padding: 30px;
}

.portal-tab.active {
    display: block;
}

/* Dashboard Overview */
.dashboard-overview {
    display: grid;
    gap: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon .dashicons {
    font-size: 24px;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 2.2em;
    font-weight: 300;
}

.stat-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9em;
}

/* Recent Activity & Schedule */
.recent-activity,
.todays-schedule {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.recent-activity h3,
.todays-schedule h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1.3em;
}

.activity-list,
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item,
.schedule-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-item {
    border-left-color: #e74c3c;
}

.activity-meta,
.schedule-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.activity-title,
.schedule-title {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.activity-time,
.schedule-time {
    font-size: 0.85em;
    color: #6c757d;
    margin: 0;
}

.activity-status,
.schedule-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-completed { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }
.status-scheduled { background: #d1ecf1; color: #0c5460; }

/* Patients Management */
.patients-management {
    display: grid;
    gap: 25px;
}

.patients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.patients-header h3 {
    margin: 0;
    color: #495057;
}

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

.patient-search-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    min-width: 250px;
}

.patients-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.patients-filters select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.patients-list-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.patients-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.patients-table th,
.patients-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.patients-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.patients-table tbody tr:hover {
    background: #f8f9fa;
}

.patient-name {
    font-weight: 600;
    color: #495057;
}

.patient-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }
.status-new { background: #d1ecf1; color: #0c5460; }

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

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.action-btn-primary {
    background: #007bff;
    color: white;
}

.action-btn-primary:hover {
    background: #0056b3;
}

.action-btn-secondary {
    background: #6c757d;
    color: white;
}

.action-btn-secondary:hover {
    background: #545b62;
}

/* Appointments Management */
.appointments-management {
    display: grid;
    gap: 25px;
}

.appointments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.appointments-header h3 {
    margin: 0;
    color: #495057;
}

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

.appointments-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.appointments-calendar {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.appointments-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

/* Clinical Management */
.clinical-management {
    display: grid;
    gap: 25px;
}

.clinical-header h3 {
    color: #495057;
    margin: 0 0 10px 0;
}

.clinical-header p {
    color: #6c757d;
    margin: 0 0 20px 0;
}

.clinical-patient-selector {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.clinical-patient-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.clinical-patient-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.clinical-tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.clinical-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.clinical-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clinical-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.clinical-tab.active {
    background: #3498db;
    color: white;
}

.clinical-panels {
    padding: 25px;
}

.clinical-panel {
    display: none;
}

.clinical-panel.active {
    display: block;
}

.notes-editor textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.notes-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* Analytics Dashboard */
.analytics-dashboard {
    display: grid;
    gap: 25px;
}

.analytics-header h3 {
    color: #495057;
    margin: 0 0 10px 0;
}

.analytics-header p {
    color: #6c757d;
    margin: 0 0 20px 0;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.analytics-card h4 {
    margin: 0 0 20px 0;
    color: #495057;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 250px;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
    color: #495057;
}

.metric-value {
    font-weight: 600;
    color: #3498db;
}

/* Button Styles */
.ennu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ennu-btn-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
}

.ennu-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.ennu-btn-secondary {
    background: #95a5a6;
    color: white;
}

.ennu-btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.ennu-btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.ennu-btn-outline:hover {
    background: #3498db;
    color: white;
}

/* Loading States */
.activity-loading,
.schedule-loading,
.patients-loading,
.calendar-loading,
.list-loading,
.overview-loading,
.assessments-loading,
.labs-loading,
.treatments-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .appointments-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ennu-provider-portal {
        padding: 15px;
    }

    .portal-header {
        padding: 20px;
    }

    .portal-welcome h1 {
        font-size: 1.8em;
    }

    .portal-nav-tabs {
        flex-direction: column;
    }

    .nav-tab {
        padding: 12px 15px;
    }

    .portal-tab {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .patients-header,
    .appointments-header,
    .clinical-header,
    .analytics-header {
        flex-direction: column;
        align-items: stretch;
    }

    .patients-actions,
    .appointments-actions {
        flex-direction: column;
    }

    .patients-filters {
        flex-direction: column;
    }

    .patients-filters select {
        min-width: auto;
    }

    .clinical-nav {
        flex-direction: column;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.nav-tab:focus,
.clinical-tab:focus,
.ennu-btn:focus,
.patient-search-input:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.portal-tab.active,
.clinical-panel.active {
    animation: fadeIn 0.3s ease-out;
}

/* Portal Login Required */
.ennu-portal-login-required,
.ennu-portal-access-denied {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.ennu-portal-login-required p,
.ennu-portal-access-denied p {
    font-size: 1.2em;
    color: #6c757d;
    margin-bottom: 20px;
}

.ennu-portal-access-denied p {
    color: #dc3545;
}

/* Mini Dashboard */
.ennu-provider-dashboard-mini {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.dashboard-header h2 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
    font-weight: 300;
}

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

.dashboard-stats .stat-item {
    text-align: center;
}

.dashboard-stats .stat-label {
    font-size: 0.85em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.dashboard-stats .stat-value {
    font-size: 1.5em;
    font-weight: 300;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* DataTables Integration */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    padding: 15px;
}

.dataTables_length select,
.dataTables_filter input {
    padding: 5px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}
