/**
 * QHSE Certification Pathway & Dashboard Stylesheet
 * Version: 1.2.0
 * Description: Master CSS file for frontend dashboards, public rosters, and custom admin panels.
 */

/* ==========================================================================
   1. CSS VARIABLES (Brand Colors & Formatting)
   ========================================================================== */
:root {
    /* Brand Colors */
    --qhse-dark: #0f172a;       /* Deep Slate */
    --qhse-primary: #2563eb;    /* Professional Blue */
    --qhse-primary-hover: #1d4ed8;
    --qhse-success: #10b981;    /* Emerald Green */
    --qhse-success-hover: #059669;
    --qhse-warning: #f59e0b;    /* Amber */
    --qhse-danger: #ef4444;     /* Red */
    
    /* Layout Colors */
    --qhse-bg-light: #f8fafc;
    --qhse-border: #e2e8f0;
    --qhse-text-main: #334155;
    --qhse-text-muted: #64748b;
    
    /* Tier Colors */
    --tier-candidate: #94a3b8;
    --tier-associate: #3b82f6;
    --tier-specialist: #0ea5e9;
    --tier-professional: #10b981;
    --tier-manager: #8b5cf6;
    --tier-fellow: #f59e0b;
}

/* ==========================================================================
   2. MEMBER DASHBOARD UI
   ========================================================================== */
.qhse-dash-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1000px;
    margin: 0 auto 30px auto;
    background: #fff;
    border: 1px solid var(--qhse-border);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Section */
.qhse-dash-header {
    background: var(--qhse-dark);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}
.qhse-profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.qhse-avatar img {
    border-radius: 50%;
    border: 3px solid #fff;
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.qhse-name {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #fff;
}
.qhse-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}
.qhse-cpd-summary {
    text-align: right;
}
.qhse-cpd-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #4ade80;
    line-height: 1;
}
.qhse-cpd-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

/* Pathway Stepper */
.qhse-pathway-section {
    padding: 30px;
    background: var(--qhse-bg-light);
    border-bottom: 1px solid var(--qhse-border);
}
.qhse-section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--qhse-dark);
}
.qhse-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qhse-step {
    text-align: center;
    position: relative;
    z-index: 2;
    width: 80px;
}
.qhse-step-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px auto;
    background: #fff;
    border: 2px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.qhse-step.locked .qhse-step-icon { border-color: #cbd5e1; background: #f1f5f9; }
.qhse-step.completed .qhse-step-icon { background: #f0fdf4; border-color: var(--qhse-success); color: var(--qhse-success); }
.qhse-step.active .qhse-step-icon { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }
.qhse-step-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--qhse-text-main);
}
.qhse-step-line {
    flex-grow: 1;
    height: 3px;
    background: #cbd5e1;
    margin: -25px 10px 0 10px;
    z-index: 1;
}
.completed-line { background: var(--qhse-success); }

/* Upgrade Panel */
.qhse-upgrade-panel {
    padding: 30px;
}
.qhse-upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.qhse-upgrade-header h3 {
    margin: 0;
    color: var(--qhse-dark);
}
.qhse-req-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.qhse-req-box {
    border: 1px solid var(--qhse-border);
    border-radius: 8px;
    padding: 20px;
}
.qhse-req-box h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--qhse-text-main);
}
.qhse-progress-bar-bg {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}
.qhse-progress-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}
.qhse-req-desc {
    font-size: 13px;
    color: var(--qhse-text-muted);
    margin: 0 0 10px 0;
}
.qhse-req-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}
.qhse-req-list li {
    font-size: 13px;
    color: var(--qhse-text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.qhse-req-list li .dashicons {
    color: #94a3b8;
    font-size: 16px;
    width: 16px; 
    height: 16px;
}

/* Buttons */
.qhse-btn-primary, .qhse-btn-secondary {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.qhse-btn-primary {
    background: var(--qhse-primary);
    color: #fff;
}
.qhse-btn-primary:hover { background: var(--qhse-primary-hover); color: #fff; }
.qhse-btn-secondary {
    background: #f1f5f9;
    color: var(--qhse-text-main);
    border: 1px solid #cbd5e1;
    width: 100%;
}
.qhse-btn-secondary:hover { background: #e2e8f0; }
.qhse-link-sm {
    font-size: 13px;
    color: var(--qhse-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Fellow / Teaser Panels */
.qhse-fellow-panel {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-top: 1px solid #fde68a;
}
.qhse-trainer-teaser {
    background: var(--qhse-bg-light);
    padding: 20px 30px;
    border-top: 1px solid var(--qhse-border);
    font-size: 13px;
    color: var(--qhse-text-muted);
}
.qhse-trainer-teaser h4 { margin: 0 0 5px 0; color: var(--qhse-dark); font-size: 14px; }


/* ==========================================================================
   3. PUBLIC CERTIFICATION ROSTER
   ========================================================================== */
.qhse-roster-container {
    max-width: 1000px; 
    margin: 0 auto; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.qhse-roster-filter-bar {
    background: var(--qhse-bg-light); 
    padding: 20px; 
    border-radius: 8px; 
    border: 1px solid var(--qhse-border); 
    margin-bottom: 20px; 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap;
}
.qhse-roster-filter-bar input, .qhse-roster-filter-bar select {
    padding: 10px; 
    border: 1px solid #cbd5e1; 
    border-radius: 4px;
    font-size: 14px;
}
.qhse-roster-filter-bar input { flex: 1; min-width: 200px; }
.qhse-roster-filter-bar select { background: #fff; }

.qhse-roster-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px;
}
.qhse-roster-card {
    border: 1px solid var(--qhse-border); 
    border-radius: 8px; 
    padding: 20px; 
    background: #fff; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qhse-roster-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.qhse-roster-card-header {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 15px;
}
.qhse-roster-card h3 {
    margin: 0 0 5px 0; 
    font-size: 18px; 
    color: var(--qhse-dark);
}
.qhse-roster-id {
    font-size: 12px; 
    color: var(--qhse-text-muted);
}
.qhse-roster-tier-pill {
    display: inline-block; 
    background: #dbeafe; 
    color: #1e40af; 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: bold;
    margin-bottom: 15px;
}
.qhse-roster-footer {
    border-top: 1px solid #f1f5f9; 
    padding-top: 10px; 
    font-size: 13px; 
    color: var(--qhse-text-main); 
    display: flex; 
    justify-content: space-between;
}


/* ==========================================================================
   4. FELLOWSHIP PEER NOMINATION PORTAL
   ========================================================================== */
.qhse-fellowship-portal {
    max-width: 600px; 
    margin: 40px auto; 
    background: #fff; 
    padding: 30px; 
    border-radius: 8px; 
    border: 1px solid var(--qhse-border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.qhse-fellowship-portal h2 {
    margin-top: 0; 
    color: var(--qhse-dark);
}
.qhse-fellowship-textarea {
    width: 100%; 
    padding: 10px; 
    border: 1px solid #cbd5e1; 
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}
.qhse-fellowship-disclaimer {
    background: var(--qhse-bg-light); 
    padding: 15px; 
    border-radius: 4px; 
    font-size: 12px; 
    color: var(--qhse-text-muted); 
    margin-bottom: 20px;
}


/* ==========================================================================
   5. ADMIN / ASSESSOR PANEL OVERRIDES
   ========================================================================== */
/* Wraps the Viva Voce Rubric inside the WP Admin */
.qhse-viva-rubric-wrap {
    background: #fff; 
    border: 2px solid var(--qhse-success); 
    border-radius: 8px; 
    padding: 20px; 
    margin-top: 15px;
}
.qhse-viva-rubric-wrap h3 {
    margin-top: 0; 
    color: #065f46;
}
.qhse-viva-rubric-wrap table input[type="number"] {
    width: 70px;
}
.qhse-viva-rubric-wrap table input[type="text"] {
    width: 100%;
}


/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .qhse-req-grid { grid-template-columns: 1fr; }
    .qhse-dash-header { flex-direction: column; text-align: center; gap: 20px; }
    .qhse-profile-info { flex-direction: column; }
    .qhse-cpd-summary { text-align: center; }
    .qhse-stepper { flex-wrap: wrap; gap: 10px; justify-content: center; }
    .qhse-step-line { display: none; }
    
    .qhse-roster-filter-bar { flex-direction: column; }
    .qhse-roster-filter-bar input, .qhse-roster-filter-bar select { width: 100%; }
}