/* FPPMIS global stylesheet. Mirrors EPU ui-spec component classes. */

:root {
    --fpp-green: #198754;
    --fpp-blue: #2c6fbb;
    --fpp-red: #c0392b;
    --fpp-muted: #888;
}

body { background: #f5f6f8; }

/* ── Sidebar (primary nav) — mirrors EPU, FPPMIS green accent ─────── */
.sidebar {
    min-height: 100vh;
    background: #222e3c;
    color: #fff;
    width: 200px;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    padding: 24px 0 0 0;
    z-index: 1000;
    overflow-y: auto;
}
.sidebar .site-title { text-align: center; margin-bottom: 22px; }
.sidebar .site-title a { color: #fff; font-size: 1.4em; font-weight: 700; letter-spacing: 1px; text-decoration: none; }
.sidebar .nav { list-style: none; padding: 0; margin: 0; }
.sidebar .nav > li > a {
    color: #cfd6df; font-weight: 500; padding: 12px 20px;
    display: block; text-decoration: none; cursor: pointer; text-align: center;
}
.sidebar .nav > li > a:hover,
.sidebar .nav > li > a:focus { background: var(--fpp-green); color: #fff; }
.sidebar .nav > li.active > a { background: var(--fpp-green); color: #fff; }
.sidebar .user-info {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 15px 20px; margin-top: 20px; font-size: 0.9em; text-align: center;
}
.sidebar .user-info .username { color: #fff; font-weight: 500; margin-bottom: 5px; }
.sidebar .user-info a, .fpp-linkbtn {
    color: #9aa7b5; font-size: 0.9em; text-decoration: none;
    background: none; border: none; cursor: pointer; padding: 0;
}
.sidebar .user-info a:hover, .fpp-linkbtn:hover { color: #fff; }

.main-content { margin-left: 200px; padding: 0 32px 24px 32px; }

/* ── Section tab bar (context sub-nav) ───────────────────────────── */
.section-tabbar {
    display: flex; flex-wrap: wrap; align-items: stretch;
    background: #fff; border-bottom: 2px solid #dee2e6;
    margin: 0 -32px 18px -32px; padding: 0 32px;
}
.section-tab {
    display: inline-block; padding: 11px 18px 9px;
    color: #555; font-size: 0.85em; font-weight: 600; text-decoration: none;
    border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.section-tab:hover, .section-tab:focus { color: #222; text-decoration: none; border-bottom-color: #aaa; }
.section-tab.active { color: var(--fpp-green); border-bottom-color: var(--fpp-green); }

/* ── Selected-candidate banner ───────────────────────────────────── */
.fpp-candidate-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: #eaf5ee; border: 1px solid #cfe8d8; border-radius: 4px;
    padding: 6px 12px; margin-bottom: 16px; font-size: 0.92em;
}

@media (max-width: 768px) {
    .sidebar { position: relative; width: 100%; min-height: auto; }
    .main-content { margin-left: 0; }
}

/* --- Page skeleton (ui-spec §1) --- */
.epu-page { padding: 16px 20px; }
.epu-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}
.epu-page-header h2 { margin: 0 0 4px; }
.epu-page-actions { display: flex; gap: 8px; align-items: center; }

/* --- Content panel (ui-spec §3) --- */
.epu-content-panel {
    background: #fff;
    border: 1px solid #e2e4e8;
    border-radius: 4px;
    margin-bottom: 16px;
}
.epu-content-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e4e8;
    font-weight: 600;
}

/* --- Filter panel (ui-spec §2) --- */
.epu-filter-panel { background: #fff; border: 1px solid #e2e4e8; border-radius: 4px; margin-bottom: 16px; }
.epu-filter-panel-header { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid #e2e4e8; }
.epu-filter-panel-body { padding: 12px 14px; }
.epu-filter-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Stats bar (ui-spec §8) --- */
.epu-stats-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.epu-stat-card { background: #fff; border: 1px solid #e2e4e8; border-radius: 4px; padding: 12px 18px; min-width: 120px; }
.epu-stat-value { font-size: 26px; font-weight: 700; }
.epu-stat-label { font-size: 11px; text-transform: uppercase; color: var(--fpp-muted); }

/* --- Two-line cells (ui-spec §4) --- */
.type-primary { font-weight: bold; font-size: 13px; }
.type-secondary { font-size: 11px; color: var(--fpp-muted); margin-top: 1px; }
.project-type-cell { line-height: 1.4; }

/* --- Expand toggle (ui-spec §5) --- */
.epu-expand-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--fpp-green); color: #fff;
    font-size: 16px; font-weight: 700; line-height: 1;
    cursor: pointer; border: none; padding: 0;
    transition: background 0.15s;
}
.epu-expand-toggle:hover { background: #157347; }
