/* ══════════════════════════════════════════
   CBHCM TRAINING PORTAL — Florida SMI
   style.css
══════════════════════════════════════════ */
#access-screen {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #0f2744 0%, #1a4b8c 50%, #0d8a6e 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 20px;
}
.access-box {
    background: var(--card); border-radius: 20px; width: 100%; max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3); overflow: hidden; border: 1px solid var(--border);
}
.access-logo {
    background: linear-gradient(135deg, #0f2744, #1a4b8c);
    padding: 32px 32px 24px; text-align: center;
}
.access-logo h2 { color: #fff; font-size: 22px; font-weight: 700; margin: 10px 0 6px; }
.access-logo p { color: rgba(255,255,255,0.75); font-size: 14px; margin: 0; }
.access-body { padding: 28px 32px 32px; }
#portal-wrapper { display: flex; width: 100%; height: 100vh; overflow: hidden; }
.key-row:hover { filter: brightness(0.97); }

:root {
    --navy:   #0f2744;
    --blue:   #1a4b8c;
    --teal:   #0d8a6e;
    --orange: #d4581a;
    --gold:   #c49a12;
    --purple: #6b3fa0;
    --green:  #2e7d32;
    --card:   #ffffff;
    --bg:     #f4f6fa;
    --border: #dde3ee;
    --text:   #1a2540;
    --muted:  #6a7a9a;
    --sidebar-w: 280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Sora', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── SIDEBAR ──────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: linear-gradient(180deg, #0f2744 0%, #0a1e38 100%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
}

.sidebar-logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.badge {
    display: inline-block;
    background: rgba(13,138,110,0.3);
    color: #5ecfb8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.sidebar-logo h1 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-logo p {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    margin-top: 3px;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 16px 20px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}

.nav-item.active {
    background: rgba(13,138,110,0.2);
    border-left-color: var(--teal);
    color: #fff;
}

.nav-icon { font-size: 16px; }

.nav-num {
    margin-left: auto;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    line-height: 1.6;
}

/* ── MAIN ─────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.breadcrumb span { color: var(--text); }

.progress-pill {
    background: rgba(13,138,110,0.1);
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

/* ── SECTIONS ─────────────────────────── */
.section-page { display: none; }
.section-page.active { display: block; }

/* ── WELCOME ──────────────────────────── */
.welcome-banner {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff;
    padding: 28px 32px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.welcome-banner h2 { font-size: 22px; margin-bottom: 8px; }
.welcome-banner p { opacity: 0.85; font-size: 14px; }

/* ── STATS ROW ────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card.blue  { border-top: 3px solid var(--blue); }
.stat-card.teal  { border-top: 3px solid var(--teal); }
.stat-card.orange{ border-top: 3px solid var(--orange); }
.stat-card.gold  { border-top: 3px solid var(--gold); }

.stat-num { font-size: 32px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── CARD ─────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ── MODULE HEADER ────────────────────── */
.module-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.module-icon-big {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.module-header-text h2 { font-size: 22px; margin-bottom: 6px; }
.module-header-text p  { font-size: 14px; color: var(--muted); }

.mod-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* ── SUBTABS ──────────────────────────── */
.subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.subtab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--card);
    border: 1.5px solid var(--border);
    color: var(--muted);
    transition: all 0.15s;
}

.subtab:hover { border-color: var(--blue); color: var(--blue); }

.subtab.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.subtab-content { display: none; }
.subtab-content.active { display: block; }

/* ── STEPS ────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 16px; }

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-body h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.step-body p, .step-body ul { font-size: 13px; color: var(--muted); }
.step-body ul { padding-left: 18px; }
.step-body li { margin-bottom: 4px; }

/* ── INFO BOXES ───────────────────────── */
.info-box {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.info-box.blue   { background: rgba(26,75,140,0.08); border-left: 4px solid var(--blue); }
.info-box.teal   { background: rgba(13,138,110,0.08); border-left: 4px solid var(--teal); }
.info-box.orange { background: rgba(212,88,26,0.08); border-left: 4px solid var(--orange); }
.info-box.gold   { background: rgba(196,154,18,0.08); border-left: 4px solid var(--gold); }
.info-box.purple { background: rgba(107,63,160,0.08); border-left: 4px solid var(--purple); }
.info-box.green  { background: rgba(46,125,50,0.08); border-left: 4px solid var(--green); }
.info-box.navy   { background: rgba(15,39,68,0.05); border-left: 4px solid var(--navy); }

.ib-title { font-weight: 700; margin-bottom: 6px; }

/* ── TABLE ────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--bg);
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    border-bottom: 2px solid var(--border);
    color: var(--navy);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0,0,0,0.02); }

/* ── NOTE TEMPLATE ────────────────────── */
.note-template {
    background: var(--bg);
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    font-size: 13px;
}

.note-template-header {
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}

.note-row {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.note-row:last-child { border-bottom: none; }

.note-label {
    width: 160px;
    min-width: 160px;
    padding: 10px 14px;
    font-weight: 700;
    color: var(--navy);
    background: rgba(15,39,68,0.04);
    font-size: 12px;
}

.note-value {
    flex: 1;
    padding: 10px 14px;
    line-height: 1.6;
}

.note-value.placeholder { color: var(--muted); font-style: italic; }

/* ── COPY BTN ─────────────────────────── */
.copy-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--teal);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.copy-btn:hover { filter: brightness(1.1); }

/* ── HOME GRID ────────────────────────── */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.home-card {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg);
}

.home-card:hover {
    border-color: var(--blue);
    background: var(--card);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hc-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.home-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.home-card p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.hc-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.tag-blue   { background: rgba(26,75,140,0.12); color: var(--blue); }
.tag-teal   { background: rgba(13,138,110,0.12); color: var(--teal); }
.tag-orange { background: rgba(212,88,26,0.12); color: var(--orange); }
.tag-gold   { background: rgba(196,154,18,0.12); color: var(--gold); }
.tag-purple { background: rgba(107,63,160,0.12); color: var(--purple); }

/* ── CHECKLIST ────────────────────────── */
.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist li {
    padding-left: 24px;
    position: relative;
    font-size: 13px;
    line-height: 1.5;
}

.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: 700;
}

/* ── ADMIN PANEL ──────────────────────── */
.admin-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-panel-header h3 { font-size: 16px; font-weight: 700; }

.admin-badge {
    background: rgba(107,63,160,0.12);
    color: var(--purple);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.admin-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    resize: vertical;
    background: var(--bg);
    color: var(--text);
    margin-bottom: 12px;
}

.admin-save-btn {
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-save-btn:hover { background: var(--blue); }

/* ── PAYWALL / ACCESS STYLES ──────────── */
.pw-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Sora', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.15s;
}

.pw-input:focus {
    outline: none;
    border-color: var(--teal);
}

.pw-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--teal), #0a6e57);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Sora', sans-serif;
}

.pw-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.pw-err {
    color: #e05;
    font-size: 13px;
    padding: 10px 14px;
    background: rgba(220,0,80,0.07);
    border-radius: 8px;
    border: 1px solid rgba(220,0,80,0.2);
}

/* ── SCROLLBAR ────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; min-width: unset; max-height: 200px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .home-grid { grid-template-columns: 1fr 1fr; }
    .module-header { flex-direction: column; }
    .note-label { width: 120px; min-width: 120px; }
}