/* ============================================================
   Focus Program — sistema de diseño (dark, atlético, mobile-first)
   Standalone: no depende del build de Tailwind.
   ============================================================ */

:root {
    --pg-bg: #0a0b12;
    --pg-bg-2: #0e1018;
    --pg-surface: #14161f;
    --pg-surface-2: #1b1e2a;
    --pg-border: rgba(255, 255, 255, 0.08);
    --pg-border-strong: rgba(255, 255, 255, 0.16);
    --pg-text: #f4f5f7;
    --pg-muted: rgba(255, 255, 255, 0.56);
    --pg-faint: rgba(255, 255, 255, 0.34);
    --pg-accent: #7c4dff;
    --pg-accent-2: #9b7bff;
    --pg-accent-soft: rgba(124, 77, 255, 0.16);
    --pg-data: #22d3ee;
    --pg-good: #22c55e;
    --pg-warn: #f59e0b;
    --pg-bad: #ef4444;
    --pg-radius: 16px;
    --pg-radius-sm: 10px;
    --pg-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --pg-maxw: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: radial-gradient(1100px 560px at 50% -220px, #1a1633 0%, var(--pg-bg) 58%);
    color: var(--pg-text);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Nav ---------- */
.pg-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; padding: 0 20px;
    background: rgba(10, 11, 13, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--pg-border);
}
.pg-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.pg-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pg-accent); box-shadow: 0 0 14px var(--pg-accent); }
.pg-brand small { color: var(--pg-muted); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }

.pg-nav-links { display: none; align-items: center; gap: 4px; }
.pg-nav-links a {
    padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
    color: var(--pg-muted); transition: color .15s, background .15s;
}
.pg-nav-links a:hover { color: var(--pg-text); background: rgba(255, 255, 255, 0.05); }
.pg-nav-links a.active { color: var(--pg-text); background: var(--pg-accent-soft); }

.pg-nav-right { display: flex; align-items: center; gap: 10px; }
.pg-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
    background: var(--pg-surface); border: 1px solid var(--pg-border); color: var(--pg-text);
    font-size: 18px;
}
.pg-menu {
    display: none; flex-direction: column; gap: 2px;
    padding: 8px; margin: 0 12px 8px;
    background: var(--pg-surface); border: 1px solid var(--pg-border); border-radius: var(--pg-radius);
}
.pg-menu.open { display: flex; }
.pg-menu a { padding: 12px 14px; border-radius: 10px; font-weight: 600; color: var(--pg-muted); }
.pg-menu a:hover, .pg-menu a.active { color: var(--pg-text); background: rgba(255, 255, 255, 0.05); }

/* ---------- Layout ---------- */
.pg-container { max-width: var(--pg-maxw); margin: 0 auto; padding: 22px 18px 80px; }
.pg-eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 700; color: var(--pg-accent); margin: 0 0 6px; }
.pg-h1 { font-size: clamp(26px, 6vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 4px; text-wrap: balance; }
.pg-h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 32px 0 14px; }
.pg-lead { color: var(--pg-muted); margin: 0; }
.pg-back { display: inline-flex; align-items: center; gap: 6px; color: var(--pg-muted); font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.pg-back:hover { color: var(--pg-text); }

/* ---------- Cards ---------- */
.pg-card {
    background: var(--pg-surface); border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius); padding: 20px;
}
.pg-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .pg-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .pg-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Player card (hero) ---------- */
.pg-player {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #1a1d24 0%, #101216 100%);
    border: 1px solid var(--pg-border); border-radius: 22px; padding: 24px;
    display: flex; gap: 20px; align-items: center;
}
.pg-player::before {
    content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
    background: radial-gradient(circle, var(--pg-accent-soft), transparent 70%);
}
.pg-player__avatar {
    width: 84px; height: 84px; border-radius: 20px; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--pg-border-strong); background: var(--pg-surface-2);
    display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; color: var(--pg-accent);
}
.pg-player__meta { position: relative; z-index: 1; min-width: 0; }
.pg-player__name { font-size: clamp(22px, 5vw, 30px); font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 8px; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Pills / chips ---------- */
.pg-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
    background: rgba(255, 255, 255, 0.06); color: var(--pg-muted); border: 1px solid var(--pg-border);
}
.pg-pill.accent { background: var(--pg-accent-soft); color: var(--pg-accent-2); border-color: transparent; }
.pg-pill.good { background: rgba(34, 197, 94, 0.14); color: #4ade80; border-color: transparent; }
.pg-pill.warn { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border-color: transparent; }
.pg-pill.bad { background: rgba(239, 68, 68, 0.14); color: #f87171; border-color: transparent; }

/* ---------- Buttons ---------- */
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--pg-radius-sm); font-weight: 700; font-size: 15px;
    cursor: pointer; border: 1px solid transparent; transition: transform .12s, opacity .12s, background .15s;
    font-family: inherit;
}
.pg-btn:hover { transform: translateY(-1px); }
.pg-btn-primary { background: var(--pg-accent); color: #fff; box-shadow: 0 6px 18px rgba(124, 77, 255, 0.35); }
.pg-btn-primary:hover { background: var(--pg-accent-2); }
.pg-btn-ghost { background: transparent; color: var(--pg-text); border-color: var(--pg-border-strong); }
.pg-btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
.pg-btn-block { width: 100%; }

/* ---------- Quick links grid (dashboard) ---------- */
.pg-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .pg-tiles { grid-template-columns: repeat(3, 1fr); } }
.pg-tile {
    background: var(--pg-surface); border: 1px solid var(--pg-border); border-radius: var(--pg-radius);
    padding: 18px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .12s;
}
.pg-tile:hover { border-color: var(--pg-accent); transform: translateY(-2px); }
.pg-tile__icon { font-size: 24px; }
.pg-tile__title { font-weight: 700; }
.pg-tile__sub { font-size: 13px; color: var(--pg-muted); }

/* ---------- Progress ---------- */
.pg-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pg-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pg-accent), var(--pg-data)); }
.pg-ring {
    --v: 0; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--pg-accent) calc(var(--v) * 1%), rgba(255, 255, 255, 0.08) 0);
    display: grid; place-items: center;
}
.pg-ring::before { content: ''; position: absolute; width: 48px; height: 48px; border-radius: 50%; background: var(--pg-surface); }
.pg-ring span { position: relative; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Lesson grid ---------- */
.pg-lessons { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .pg-lessons { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .pg-lessons { grid-template-columns: repeat(3, 1fr); } }
.pg-lesson {
    background: var(--pg-surface); border: 1px solid var(--pg-border); border-radius: var(--pg-radius);
    overflow: hidden; transition: border-color .15s, transform .12s; display: flex; flex-direction: column;
}
.pg-lesson:hover { border-color: var(--pg-accent); transform: translateY(-2px); }
.pg-lesson__thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2a2350, #14161b); display: grid; place-items: center; overflow: hidden; }
.pg-lesson__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-lesson__play { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(124, 77, 255, 0.85); color: #fff; font-size: 17px; padding-left: 3px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4); transition: transform .15s ease, background .15s ease; }
.pg-lesson:hover .pg-lesson__play { transform: scale(1.08); background: #7c4dff; }
.pg-lesson__dur { position: absolute; z-index: 1; right: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.pg-lesson__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pg-lesson__title { font-weight: 700; line-height: 1.3; }
.pg-lesson__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--pg-muted); }

/* ---------- Forms ---------- */
.pg-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pg-field > span, .pg-label { font-size: 13px; font-weight: 600; color: var(--pg-muted); }
.pg-input, .pg-textarea, .pg-select {
    width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
    background: var(--pg-bg-2); color: var(--pg-text);
    border: 1px solid var(--pg-border-strong); border-radius: var(--pg-radius-sm); outline: none;
    transition: border-color .15s;
}
.pg-input:focus, .pg-textarea:focus, .pg-select:focus { border-color: var(--pg-accent); }
.pg-textarea { min-height: 96px; resize: vertical; }

/* ---------- Alerts / flash ---------- */
.pg-flash { padding: 12px 16px; border-radius: var(--pg-radius-sm); font-weight: 600; margin-bottom: 16px; }
.pg-flash.ok { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.pg-flash.err { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.pg-errors { list-style: none; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--pg-radius-sm); background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }
.pg-errors li { font-size: 14px; }

/* ---------- Article / list items ---------- */
.pg-item { padding: 16px 0; border-bottom: 1px solid var(--pg-border); }
.pg-item:last-child { border-bottom: 0; }
.pg-item__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pg-item__title { font-weight: 700; }
.pg-muted { color: var(--pg-muted); }
.pg-empty { text-align: center; color: var(--pg-muted); padding: 32px 16px; border: 1px dashed var(--pg-border-strong); border-radius: var(--pg-radius); }

/* ---------- Auth ---------- */
.pg-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.pg-auth__card { width: 100%; max-width: 420px; }

/* ---------- Table (admin) ---------- */
.pg-table-wrap { overflow-x: auto; border: 1px solid var(--pg-border); border-radius: var(--pg-radius); }
.pg-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.pg-table th, .pg-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--pg-border); white-space: nowrap; }
.pg-table th { color: var(--pg-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.pg-table tr:last-child td { border-bottom: 0; }

/* ---------- Likert (bienestar) ---------- */
.pg-likert { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-likert label { cursor: pointer; position: relative; }
.pg-likert input { position: absolute; opacity: 0; width: 0; height: 0; }
.pg-likert span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--pg-bg-2); border: 1px solid var(--pg-border-strong); font-weight: 800; transition: background .12s, border-color .12s; }
.pg-likert input:checked + span { background: var(--pg-accent); border-color: transparent; color: #fff; }
.pg-likert input:focus-visible + span { outline: 2px solid var(--pg-accent-2); outline-offset: 2px; }

/* ---------- Video comments ---------- */
.pg-comment { padding: 9px 12px; background: var(--pg-bg-2); border-radius: 10px; margin-bottom: 6px; font-size: 14px; }
.pg-ts { color: var(--pg-accent-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.pg-video { width: 100%; border-radius: var(--pg-radius-sm); background: #000; aspect-ratio: 16/9; }

/* ---------- Utilities ---------- */
.pg-stack { display: flex; flex-direction: column; gap: 12px; }
.pg-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pg-mt { margin-top: 20px; }
.pg-center { text-align: center; }

@media (min-width: 860px) {
    .pg-nav-links { display: flex; }
    .pg-burger { display: none; }
    .pg-container { padding: 32px 24px 60px; }
}
