/* Bootcamps & cohorts: panel hub, learner view and catalogue. Theme-aware. */

.bc {
    --bc-card: var(--white, #fff);
    --bc-text: var(--dark, #111827);
    --bc-muted: var(--gray-500, #6B7280);
    --bc-line: var(--gray-200, #E5E7EB);
    --bc-soft: var(--gray-100, #F3F4F6);
    --bc-lime: #D0F10A;
    --bc-ink: #0C2309;
    --bc-green: #22A06B;
    --bc-amber: #E6A117;
    --bc-red: #E5484D;
    --bc-blue: #2D9CDB;
    --bc-violet: #8B7CF6;
}
body.dark-mode .bc { --bc-green: #4ADE80; --bc-amber: #FBBF24; --bc-red: #F87171; }

.bc-card { background: var(--bc-card); border: 1px solid var(--bc-line); border-radius: 22px; }
.bc-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.bc-card__title { font-size: 16px; font-weight: 700; color: var(--bc-text); margin: 0; }
.bc-card__sub { font-size: 12.5px; color: var(--bc-muted); margin-top: 2px; }
.bc-card__body { padding: 16px 20px 20px; }
.bc-muted { color: var(--bc-muted); }
.bc-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- hero */
.bc-hero {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 26px;
    color: #F2F5EE;
    background: radial-gradient(120% 140% at 85% 0%, #22330F 0%, #121812 55%, #0B0E0B 100%);
    border: 1px solid #242A22;
}
.bc-hero__glow { position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(208, 241, 10, .22), transparent 65%); pointer-events: none; }
.bc-hero__eyebrow a, .bc-hero__eyebrow a:hover { color: inherit; }
.bc-hero__eyebrow { position: relative; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #9FB39A; }
.bc-hero__title { position: relative; margin: 6px 0 0; font-size: 26px; font-weight: 800; color: #fff; }
.bc-hero__sub { position: relative; margin-top: 6px; font-size: 14px; color: rgba(242, 245, 238, .72); max-width: 720px; }
.bc-hero__meta { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bc-hero__meta span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; color: rgba(242, 245, 238, .85); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.bc-hero__actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bc-hero__bar { position: relative; margin-top: 18px; }
.bc-hero__bar-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bc-hero__bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--bc-lime); }
.bc-hero__bar-labels strong { color: #fff !important; font-size: 14px; }
.bc-btn--wrap { white-space: normal; height: auto; min-height: 38px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.bc-hero__bar-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: rgba(242, 245, 238, .6); }

/* ---------- buttons */
.bc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.bc-btn:hover { text-decoration: none; transform: translateY(-1px); }
.bc-btn--lime { background: var(--bc-lime); color: var(--bc-ink); }
.bc-btn--lime:hover { color: var(--bc-ink); }
.bc-btn--ghost { background: transparent; color: var(--bc-text); border-color: var(--bc-line); }
.bc-btn--ghost:hover { background: var(--bc-soft); color: var(--bc-text); }
.bc-hero .bc-btn--ghost { color: #F2F5EE; border-color: rgba(255, 255, 255, .18); }
.bc-hero .bc-btn--ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bc-btn--danger { background: transparent; color: var(--bc-red); border-color: color-mix(in srgb, var(--bc-red) 40%, transparent); }
.bc-btn--sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 10px; }

/* ---------- pills */
.bc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--bc-soft); color: var(--bc-muted); }
.bc-pill--green { background: color-mix(in srgb, var(--bc-green) 14%, transparent); color: var(--bc-green); }
.bc-pill--amber { background: color-mix(in srgb, var(--bc-amber) 16%, transparent); color: var(--bc-amber); }
.bc-pill--red { background: color-mix(in srgb, var(--bc-red) 14%, transparent); color: var(--bc-red); }
.bc-pill--blue { background: color-mix(in srgb, var(--bc-blue) 14%, transparent); color: var(--bc-blue); }
.bc-pill--lime { background: var(--bc-lime); color: var(--bc-ink); }
.bc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; margin-right: 6px; }
.bc-dot--green { background: var(--bc-green); }
.bc-dot--amber { background: var(--bc-amber); }
.bc-dot--red { background: var(--bc-red); }

/* ---------- KPI tiles */
.bc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bc-kpi { padding: 16px; border-radius: 20px; background: var(--bc-card); border: 1px solid var(--bc-line); min-width: 0; }
.bc-kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-kpi__label { font-size: 12.5px; color: var(--bc-muted); }
.bc-kpi__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bc-soft); color: var(--bc-text); }
.bc-kpi__value { margin-top: 10px; font-size: 26px; font-weight: 800; color: var(--bc-text); line-height: 1.1; }
.bc-kpi__hint { margin-top: 4px; font-size: 12px; color: var(--bc-muted); }
.bc-kpi--lime .bc-kpi__icon { background: color-mix(in srgb, var(--bc-lime) 30%, transparent); color: #5B6B00; }
body.dark-mode .bc-kpi--lime .bc-kpi__icon { color: var(--bc-lime); }
.bc-kpi--green .bc-kpi__icon { background: color-mix(in srgb, var(--bc-green) 15%, transparent); color: var(--bc-green); }
.bc-kpi--amber .bc-kpi__icon { background: color-mix(in srgb, var(--bc-amber) 16%, transparent); color: var(--bc-amber); }
.bc-kpi--red .bc-kpi__icon { background: color-mix(in srgb, var(--bc-red) 14%, transparent); color: var(--bc-red); }
.bc-kpi--violet .bc-kpi__icon { background: color-mix(in srgb, var(--bc-violet) 16%, transparent); color: var(--bc-violet); }
.bc-kpi--blue .bc-kpi__icon { background: color-mix(in srgb, var(--bc-blue) 14%, transparent); color: var(--bc-blue); }

.bc-bar { height: 6px; border-radius: 999px; background: var(--bc-soft); overflow: hidden; }
.bc-bar span { display: block; height: 100%; border-radius: inherit; background: var(--bc-lime); }
.bc-bar--green span { background: var(--bc-green); }
.bc-bar--amber span { background: var(--bc-amber); }
.bc-bar--red span { background: var(--bc-red); }
.bc-meter { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.bc-meter .bc-bar { flex: 1 1 auto; }
.bc-meter b { font-size: 12px; min-width: 34px; text-align: right; color: var(--bc-text); }

/* ---------- tabs */
.bc-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--bc-card); border: 1px solid var(--bc-line); overflow-x: auto; scrollbar-width: none; }
.bc-tabs::-webkit-scrollbar { display: none; }
.bc-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--bc-muted); white-space: nowrap; }
.bc-tab:hover { color: var(--bc-text); background: var(--bc-soft); text-decoration: none; }
.bc-tab.is-active { color: var(--bc-ink); background: var(--bc-lime); }
.bc-tab__count { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 999px; font-size: 10.5px; background: rgba(0, 0, 0, .08); }
.bc-tab.is-active .bc-tab__count { background: rgba(12, 35, 9, .15); }

/* ---------- tables */
.bc-table-wrap { overflow-x: auto; }
.bc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.bc-table th { padding: 10px 12px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bc-muted); border-bottom: 1px solid var(--bc-line); white-space: nowrap; text-align: left; }
.bc-table td { padding: 12px; border-bottom: 1px solid var(--bc-line); color: var(--bc-text); vertical-align: middle; }
.bc-table tr:last-child td { border-bottom: 0; }
.bc-table tr:hover td { background: color-mix(in srgb, var(--bc-soft) 60%, transparent); }
.bc-person { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.bc-person img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex: 0 0 34px; }
.bc-person strong { display: block; font-size: 13px; color: var(--bc-text); }
.bc-person small { display: block; font-size: 11.5px; color: var(--bc-muted); }
.bc-reasons { margin: 4px 0 0; padding: 0; list-style: none; font-size: 11.5px; color: var(--bc-muted); }

/* ---------- register grid */
.bc-register { font-size: 12px; }
.bc-register th.bc-register__day { text-align: center; min-width: 38px; padding: 8px 4px; }
.bc-register th.bc-register__day small { display: block; font-weight: 600; text-transform: none; letter-spacing: 0; }
.bc-register td.bc-register__cell { text-align: center; padding: 6px 4px; }
.bc-cell { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; font-weight: 800; border: 0; cursor: pointer; background: var(--bc-soft); color: var(--bc-muted); }
.bc-cell--present { background: color-mix(in srgb, var(--bc-green) 18%, transparent); color: var(--bc-green); }
.bc-cell--late { background: color-mix(in srgb, var(--bc-amber) 20%, transparent); color: var(--bc-amber); }
.bc-cell--absent { background: color-mix(in srgb, var(--bc-red) 16%, transparent); color: var(--bc-red); }
.bc-cell--excused { background: color-mix(in srgb, var(--bc-blue) 16%, transparent); color: var(--bc-blue); }
.bc-sticky { position: sticky; left: 0; background: var(--bc-card); z-index: 1; }

/* ---------- sessions list */
.bc-session { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--bc-line); }
.bc-session:last-child { border-bottom: 0; }
.bc-session__date { flex: 0 0 54px; text-align: center; padding: 6px 0; border-radius: 14px; background: var(--bc-soft); color: var(--bc-text); }
.bc-session__date strong { display: block; font-size: 18px; line-height: 1.1; }
.bc-session__date small { font-size: 11px; color: var(--bc-muted); text-transform: uppercase; }
.bc-session.is-live .bc-session__date { background: var(--bc-lime); color: var(--bc-ink); }
.bc-session.is-live .bc-session__date small { color: var(--bc-ink); }
.bc-session__body { flex: 1 1 auto; min-width: 0; }
.bc-session__title { font-size: 14px; font-weight: 700; color: var(--bc-text); }
.bc-session__meta { font-size: 12px; color: var(--bc-muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.bc-session__meta span { display: inline-flex; align-items: center; gap: 4px; }
.bc-session__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bc-code { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 14px; border-radius: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 800; letter-spacing: .18em; color: var(--bc-ink); background: var(--bc-lime); }

/* ---------- phases timeline */
.bc-phases { position: relative; margin: 0; padding: 0; list-style: none; }
.bc-phase { position: relative; display: flex; gap: 14px; padding: 0 0 18px 0; }
.bc-phase:last-child { padding-bottom: 0; }
.bc-phase::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--bc-line); }
.bc-phase:last-child::before { display: none; }
.bc-phase__node { position: relative; z-index: 1; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--bc-soft); color: var(--bc-muted); border: 2px solid var(--bc-line); }
.bc-phase--done .bc-phase__node { background: var(--bc-green); border-color: var(--bc-green); color: #fff; }
.bc-phase--current .bc-phase__node { background: var(--bc-lime); border-color: var(--bc-lime); color: var(--bc-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--bc-lime) 25%, transparent); }
.bc-phase--break .bc-phase__node { border-style: dashed; }
.bc-phase__body { flex: 1 1 auto; min-width: 0; padding-top: 4px; }
.bc-phase__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--bc-text); }
.bc-phase__meta { font-size: 12px; color: var(--bc-muted); margin-top: 2px; }

/* ---------- cards grid (catalogue, lists) */
.bc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bc-tile { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--bc-card); border: 1px solid var(--bc-line); transition: transform .2s, box-shadow .2s; }
.bc-tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45); text-decoration: none; }
.bc-tile__img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111511; }
.bc-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.bc-tile__img .bc-pill { position: absolute; top: 12px; left: 12px; }
.bc-tile__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px; gap: 8px; }
.bc-tile__title { font-size: 16px; font-weight: 800; color: var(--bc-text); margin: 0; }
.bc-tile__sub { font-size: 13px; color: var(--bc-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-tile__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--bc-muted); margin-top: auto; padding-top: 8px; }
.bc-tile__facts span { display: inline-flex; align-items: center; gap: 5px; }
.bc-tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--bc-line); font-size: 12.5px; color: var(--bc-muted); }

/* ---------- repeaters (authoring form) */
.bc-repeater__row { position: relative; padding: 14px; border-radius: 16px; border: 1px solid var(--bc-line); background: color-mix(in srgb, var(--bc-soft) 50%, transparent); margin-bottom: 10px; }
.bc-repeater__remove { position: absolute; top: 10px; right: 10px; }
.bc-repeater__handle { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bc-muted); margin-bottom: 8px; }

/* ---------- misc */
.bc-empty { padding: 32px 16px; text-align: center; color: var(--bc-muted); font-size: 13.5px; }
.bc-empty .lucide { color: var(--bc-muted); opacity: .7; margin-bottom: 8px; }
.bc-list { margin: 0; padding: 0; list-style: none; }
.bc-list li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 13.5px; color: var(--bc-text); }
.bc-list li .lucide { flex: 0 0 auto; margin-top: 2px; color: var(--bc-green); }
.bc-fee-table td, .bc-fee-table th { padding: 10px 12px; }
.bc-announcement { padding: 14px 0; border-bottom: 1px solid var(--bc-line); }
.bc-announcement:last-child { border-bottom: 0; }
.bc-announcement h4 { font-size: 14px; font-weight: 700; color: var(--bc-text); margin: 0; display: flex; align-items: center; gap: 6px; }
.bc-announcement p { font-size: 13px; color: var(--bc-text); margin: 6px 0 0; white-space: pre-line; }
.bc-announcement small { font-size: 11.5px; color: var(--bc-muted); }
.bc-chart { min-height: 220px; }
.bc-checkin { display: flex; gap: 8px; }
.bc-checkin input { flex: 1 1 auto; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
details.bc-details > summary { cursor: pointer; list-style: none; }
details.bc-details > summary::-webkit-details-marker { display: none; }

@media (max-width: 1199px) {
    .bc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .bc-hero { padding: 18px; border-radius: 22px; }
    .bc-hero__title { font-size: 21px; }
    .bc-kpi__value { font-size: 21px; }
    .bc-grid { grid-template-columns: 1fr; }
    .bc-card__head, .bc-card__body { padding-left: 14px; padding-right: 14px; }
    .bc-session { flex-wrap: wrap; }
    .bc-session__actions { width: 100%; justify-content: flex-start; padding-left: 68px; }
}
@media (max-width: 420px) {
    .bc-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .bc-kpi { padding: 12px; }
}

/* Admin bootcamps table: roomier rows, readable columns, controls never clipped */
.dnx-admin-table { border-collapse: separate; border-spacing: 0; }
.dnx-admin-table th { white-space: nowrap; padding: 14px 16px !important; }
.dnx-admin-table td { padding: 16px !important; vertical-align: middle !important; }
.dnx-admin-table tr + tr td { border-top: 1px solid var(--gray-200, #EEF0F2); }
.dnx-admin-table td small { display: block; margin-top: 4px; line-height: 1.4; }
.dnx-admin-table .bc-meter { min-width: 140px; }
.dnx-admin-table select.form-control { min-width: 160px; height: 40px; }
.section-body.bc .card { margin-bottom: 24px; }
.section-body.bc .card-header { gap: 12px; flex-wrap: wrap; padding: 20px 24px; }
.section-body.bc .card-header form { flex-wrap: wrap; }
.section-body.bc .card-header .form-control { min-width: 180px; height: 42px; }
.dnx-admin-table .bc-meter { min-width: 110px !important; }
.dnx-admin-table select.form-control { min-width: 140px !important; font-size: 13px; padding-left: 10px; }
.dnx-admin-table td:first-child { min-width: 200px !important; }
.dnx-admin-table th, .dnx-admin-table td { padding-left: 12px !important; padding-right: 12px !important; }
