/**
 * ENNU Practice Manager Panel - Frontend Styles
 */

/* Base Layout */
.ennu-pm-dashboard,
.ennu-pm-revenue,
.ennu-pm-patients,
.ennu-pm-scheduling,
.ennu-pm-analytics,
.ennu-pm-inventory,
.ennu-pm-system,
.ennu-pm-communications,
.ennu-pm-compliance {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.ennu-pm-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
}

.ennu-pm-header h1 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 32px;
}

.ennu-pm-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.ennu-pm-last-updated {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

/* KPI Cards Grid */
.ennu-pm-kpi-grid,
.patient-stats-grid,
.schedule-stats-grid,
.inventory-stats-grid,
.compliance-stats-grid,
.comm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ennu-pm-kpi-card,
.stat-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.ennu-pm-kpi-card:hover,
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.kpi-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.kpi-content h3,
.stat-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value,
.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin: 10px 0;
}

.kpi-detail,
.stat-detail {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.kpi-trend {
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0;
}

.kpi-trend.up,
.trend-up {
    color: #28a745;
}

.kpi-trend.down,
.trend-down {
    color: #dc3545;
}

.stat-card.warning .stat-value {
    color: #ffc107;
}

.stat-card.error .stat-value {
    color: #dc3545;
}

.stat-card.healthy .stat-value {
    color: #28a745;
}

/* Sections */
.ennu-pm-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.ennu-pm-section h2 {
    margin: 0 0 20px 0;
    color: #0073aa;
    font-size: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.ennu-pm-section h3 {
    margin: 15px 0 10px 0;
    color: #333;
    font-size: 18px;
}

/* Tables */
.ennu-pm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.ennu-pm-table thead {
    background: #f8f9fa;
}

.ennu-pm-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.ennu-pm-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.ennu-pm-table tr:hover {
    background: #f8f9fa;
}

.ennu-pm-table.compact td,
.ennu-pm-table.compact th {
    padding: 8px;
    font-size: 13px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

/* Buttons */
.btn-primary,
.ennu-pm-btn-primary {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover,
.ennu-pm-btn-primary:hover {
    background: #005a87;
}

.btn-secondary,
.ennu-pm-btn-secondary {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    margin: 0 2px;
}

.btn-icon:hover {
    opacity: 0.7;
}

/* Activity Feed */
.ennu-pm-activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px;
    border-left: 3px solid #0073aa;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.activity-time {
    display: inline-block;
    font-size: 12px;
    color: #999;
    margin-right: 10px;
}

.activity-type {
    display: inline-block;
    padding: 2px 8px;
    background: #0073aa;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 10px;
}

.activity-description {
    color: #333;
    font-size: 14px;
}

/* Quick Actions Grid */
.ennu-pm-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border: 2px solid #0073aa;
    border-radius: 8px;
    text-decoration: none;
    color: #0073aa;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #0073aa;
    color: white;
}

.action-btn .icon {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Alerts */
.ennu-pm-alerts {
    margin-top: 15px;
}

.alert-item {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.alert-item.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.alert-item.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.alert-item strong {
    display: block;
    margin-bottom: 5px;
}

/* Content Grid */
.ennu-pm-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .ennu-pm-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Calendar */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.provider-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.provider-column {
    border: 1px solid #ddd;
    border-radius: 4px;
}

.provider-header {
    background: #0073aa;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-slots {
    padding: 10px;
}

.time-slot {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.time-slot.completed {
    background: #d4edda;
}

.time-slot.upcoming {
    background: #fff3cd;
}

.time-slot.available {
    background: #f8f9fa;
}

.time-slot.in-progress {
    background: #cce5ff;
}

/* Responsive */
@media (max-width: 768px) {
    .ennu-pm-kpi-grid,
    .patient-stats-grid,
    .schedule-stats-grid {
        grid-template-columns: 1fr;
    }

    .ennu-pm-table {
        font-size: 12px;
    }

    .ennu-pm-table th,
    .ennu-pm-table td {
        padding: 8px 4px;
    }
}

/* Success Messages */
.success-message {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

/* Severity Indicators */
.severity-low {
    color: #28a745;
    font-weight: 600;
}

.severity-medium {
    color: #ffc107;
    font-weight: 600;
}

.severity-high {
    color: #dc3545;
    font-weight: 600;
}

/* Health Status */
.health-grid,
.integration-grid,
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.health-card,
.integration-card,
.security-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.health-card.healthy,
.integration-card.healthy,
.security-card.healthy {
    border-color: #28a745;
}

.health-card .status,
.integration-card .status,
.security-card .status {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
}

.status.success {
    color: #28a745;
}
