* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    color: #1B1A17;
    background: radial-gradient(1200px 700px at 12% -10%, #FBF8F3 0%, #EDEAE4 55%, #E4E0D8 100%);
    min-height: 100vh;
}
a { color: #0A6C7E; text-decoration: none; font-weight: 600; }
a:hover { color: #084F5C; }

/* ============ TOPBAR ============ */
.pp-topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px clamp(20px, 3vw, 56px); font-size: 13px; font-weight: 600; letter-spacing: .2px;
    color: #3C3A35; backdrop-filter: blur(18px);
    background: rgba(237,234,228,.72); border-bottom: 1px solid rgba(0,0,0,.05);
}
.pp-topbar-left { display: flex; align-items: center; gap: 10px; }
.pp-dot { width: 9px; height: 9px; border-radius: 50%; background: #0A6C7E; display: inline-block; }
.pp-topbar-right { display: flex; align-items: center; gap: 16px; }

.pp-back-btn {
    width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.75); color: #1B1A17; display: flex; align-items: center;
    justify-content: center; cursor: pointer; font-size: 14px; flex: none; padding: 0;
    transition: background .15s ease;
}
.pp-back-btn:hover { background: #fff; }

.pp-avatar-mini {
    width: 20px; height: 20px; border-radius: 50%; background: #1B1A17; color: #fff;
    font-size: 10px; display: flex; align-items: center; justify-content: center;
}
.pp-user-chip {
    display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border-radius: 999px;
    background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.06);
}
.pp-logout { color: #9A9486; font-weight: 600; font-size: 12px; }
.pp-logout:hover { color: #1B1A17; }

/* ============ CONTAINER / HEADER ============ */
.pp-container { width: 100%; margin: 0; padding: 34px clamp(20px, 3vw, 56px) 140px; }
.pp-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.pp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #8C8779; margin-bottom: 10px; }
.pp-title { margin: 0; font-size: clamp(30px, 3.2vw, 50px); line-height: 1.02; letter-spacing: -1.4px; font-weight: 700; }
.pp-subtitle { margin: 10px 0 0; font-size: 16px; color: #6B665B; max-width: 52ch; }
.pp-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-pill-dark {
    padding: 12px 18px; border-radius: 999px; border: none; background: #1B1A17; color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-pill-dark:hover { background: #000; color: #fff; }
.btn-pill-light {
    padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.8); color: #1B1A17; font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.btn-pill-light:hover { background: #fff; color: #1B1A17; }

/* ============ KPI CARDS ============ */
.pp-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 1200px) { .pp-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .pp-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .pp-kpi-grid { grid-template-columns: 1fr; } }

.pp-kpi-card {
    text-align: left; cursor: pointer; font-family: inherit; padding: 18px 18px 16px;
    border-radius: 26px; background: rgba(255,255,255,.78); border: 1.5px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 26px -18px rgba(28,26,22,.5); display: flex; flex-direction: column; gap: 14px;
    backdrop-filter: blur(14px); width: 100%; transition: background .15s ease, border-color .15s ease;
}
.pp-kpi-card:hover { background: #fff; }
.pp-kpi-card.is-active { border-color: var(--accent); }
.pp-kpi-top { display: flex; align-items: center; justify-content: space-between; }
.pp-kpi-icon {
    width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; background: var(--accent);
}
.pp-kpi-pct { font-size: 11px; font-weight: 600; color: #9A9486; font-variant-numeric: tabular-nums; }
.pp-kpi-value { display: block; font-size: 34px; font-weight: 700; letter-spacing: -1.2px; line-height: 1; font-variant-numeric: tabular-nums; }
.pp-kpi-label { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.35; color: #6B665B; }

.kpi-en-curso { --accent: #4E8CE0; }
.kpi-cumplio-30 { --accent: #C6952E; }
.kpi-cumplio-30-50 { --accent: #D2603A; }
.kpi-evidenciado-30 { --accent: #9B5FC0; }
.kpi-evidenciado-30-50 { --accent: #1E9E77; }

/* ============ PANELES ============ */
.pp-panels-grid { display: grid; grid-template-columns: minmax(320px, 4fr) 8fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .pp-panels-grid { grid-template-columns: 1fr; } }

.pp-panel, .tabla-card, .card.tabla-card {
    padding: 24px; border-radius: 30px; background: rgba(255,255,255,.78);
    border: 1px solid rgba(0,0,0,.06); box-shadow: 0 18px 40px -30px rgba(28,26,22,.7);
    backdrop-filter: blur(14px);
}
.pp-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 8px; }
.pp-panel-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.pp-panel-meta { font-size: 12px; color: #9A9486; font-weight: 600; }

.pp-donut-row { display: flex; gap: 26px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.pp-donut-wrap { position: relative; width: 132px; height: 132px; flex: none; }
.pp-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pp-donut-center strong { font-size: 26px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.pp-donut-center span { font-size: 10.5px; color: #9A9486; font-weight: 600; margin-top: 3px; }

.pp-legend { display: flex; flex-direction: column; gap: 12px; font-size: 12.5px; color: #6B665B; }
.pp-legend-item { display: flex; align-items: center; gap: 9px; }
.pp-legend-dot { width: 8px; height: 8px; border-radius: 2px; }

.pp-stackbar { display: flex; height: 16px; gap: 3px; margin-bottom: 18px; }
.pp-stackbar span { border-radius: 6px; }

.pp-legend-list { display: flex; flex-direction: column; }
.pp-legend-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 0;
    border-top: 1px solid rgba(0,0,0,.06); font-size: 13px;
}
.pp-legend-bar { width: 6px; height: 22px; border-radius: 3px; flex: none; }
.pp-legend-row-label { flex: 1; color: #413E38; }
.pp-legend-row-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ TABS SEGMENTADOS ============ */
.pp-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(28,26,22,.06); flex-wrap: wrap; }
.pp-tabs .nav-link {
    padding: 7px 13px; border-radius: 999px; border: none; cursor: pointer; font-family: inherit;
    font-size: 12.5px; font-weight: 600; color: #6B665B; background: transparent;
}
.pp-tabs .nav-link.active { background: #fff !important; color: #1B1A17 !important; box-shadow: 0 2px 8px -2px rgba(28,26,22,.35); }
.pp-scale-hint { font-size: 12px; color: #9A9486; margin-bottom: 20px; }

/* ============ BARRA DE PROGRESO CON MARCAS ============ */
.pp-track-row { margin-bottom: 16px; }
.pp-track-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; gap: 8px; flex-wrap: wrap; }
.pp-track-name { font-size: 13.5px; font-weight: 600; }
.pp-track-meta { font-size: 11.5px; color: #9A9486; font-variant-numeric: tabular-nums; }
.pp-track { position: relative; height: 26px; border-radius: 9px; background: rgba(28,26,22,.055); overflow: hidden; }
.pp-track-fill { position: absolute; inset: 0 auto 0 0; border-radius: 9px; }
.pp-track-tick { position: absolute; top: 0; bottom: 0; width: 1.5px; background: rgba(255,255,255,.85); }
.pp-track-estado {
    position: absolute; right: 9px; top: 0; bottom: 0; display: flex; align-items: center;
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8C8779;
}

/* ============ TABLA ============ */
.pp-table-panel { border-radius: 30px; background: rgba(255,255,255,.78); border: 1px solid rgba(0,0,0,.06); box-shadow: 0 18px 40px -30px rgba(28,26,22,.7); backdrop-filter: blur(14px); overflow: hidden; }
.pp-table-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 16px; }
.table { margin: 0; }
.table thead th {
    border: none; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #9A9486; background: rgba(28,26,22,.035); padding: 10px 26px;
}
.table td { padding: 15px 26px; border-top: 1px solid rgba(0,0,0,.05); vertical-align: middle; font-size: 13.5px; background: transparent; }
.table tbody tr:hover td { background: rgba(255,255,255,.9); }

.pp-avatar-badge {
    width: 34px; height: 34px; border-radius: 12px; flex: none; display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 700; color: #fff;
}
.pp-mini-progress { display: block; height: 6px; border-radius: 99px; background: rgba(28,26,22,.08); overflow: hidden; }
.pp-mini-progress-fill { display: block; height: 6px; border-radius: 99px; }

.pp-badge-evaluado {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; background: rgba(30,158,119,.12); color: #1E9E77;
}
.pp-btn-evaluar {
    border-radius: 999px; border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
    font-size: 11.5px; font-weight: 700; padding: 6px 12px; cursor: pointer; font-family: inherit;
}
.pp-btn-evaluar:hover { background: var(--accent); color: #fff; }

/* ============ DOCK FLOTANTE ============ */
.pp-dock {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 40;
    display: flex; gap: 6px; padding: 9px; border-radius: 28px; background: rgba(255,255,255,.72);
    border: 1px solid rgba(0,0,0,.07); box-shadow: 0 22px 50px -22px rgba(28,26,22,.55); backdrop-filter: blur(22px);
    max-width: calc(100vw - 24px); overflow-x: auto;
}
.pp-dock-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px; width: 82px; padding: 8px 4px;
    border: none; border-radius: 20px; cursor: pointer; font-family: inherit; background: transparent;
    text-decoration: none; flex: none;
}
.pp-dock-item:hover { background: rgba(28,26,22,.06); }
.pp-dock-item.is-active { background: rgba(28,26,22,.08); }
.pp-dock-icon {
    width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
}
.pp-dock-label { font-size: 10.5px; font-weight: 600; color: #413E38; }

/* ============ CONFIGURACIÓN: TOGGLES Y SELECTOR DE DÍAS ============ */
.pp-toggle-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 0; border-bottom: 1px solid rgba(0,0,0,.06);
}
.pp-toggle-row:last-child { border-bottom: none; }
.pp-toggle-info { flex: 1; }
.pp-toggle-title { font-weight: 600; font-size: 14.5px; color: #1B1A17; }
.pp-toggle-desc { font-size: 12.5px; color: #9A9486; margin-top: 2px; }

.pp-switch { position: relative; width: 46px; height: 26px; flex: none; }
.pp-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.pp-switch-track {
    position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
    background: rgba(28,26,22,.18); transition: background .2s ease;
}
.pp-switch input:checked + .pp-switch-track { background: #1E9E77; }
.pp-switch-thumb {
    position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease;
}
.pp-switch input:checked ~ .pp-switch-track .pp-switch-thumb { transform: translateX(20px); }

.pp-day-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pp-day-chip {
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 42px; border-radius: 12px; cursor: pointer;
    background: rgba(28,26,22,.05); border: 1.5px solid transparent;
    font-size: 12.5px; font-weight: 600; color: #6B665B; user-select: none;
    transition: all .15s ease;
}
.pp-day-chip input { display: none; }
.pp-day-chip:has(input:checked) {
    background: #1B1A17; color: #fff; border-color: #1B1A17;
}

/* ============ LOGIN ============ */
@keyframes floatA { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(6%,-8%,0) scale(1.12); } }
@keyframes floatB { 0%,100% { transform: translate3d(0,0,0) scale(1.05); } 50% { transform: translate3d(-8%,6%,0) scale(.92); } }
@keyframes floatC { 0%,100% { transform: translate3d(0,0,0) scale(.95); } 50% { transform: translate3d(5%,7%,0) scale(1.15); } }
@keyframes sheen { 0% { transform: translateX(-120%) rotate(18deg); } 100% { transform: translateX(220%) rotate(18deg); } }
@keyframes tilt { 0%,100% { transform: rotateX(6deg) rotateY(-5deg) translateZ(0); } 50% { transform: rotateX(2deg) rotateY(5deg) translateZ(10px); } }

.lg-stage { position: relative; min-height: 100vh; width: 100%; display: grid; place-items: center; padding: 56px 24px; overflow: hidden;
    background: linear-gradient(160deg,#eaf3ff 0%,#f6f0ff 45%,#fff4ec 100%); }
.lg-blobs { position: absolute; inset: 0; pointer-events: none; }
.lg-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; pointer-events: none; }
.lg-b1 { width: 460px; height: 460px; top: -12%; left: -10%; background: radial-gradient(circle,#7ad7ff,rgba(122,215,255,0) 70%); animation: floatA 14s ease-in-out 0s infinite; }
.lg-b2 { width: 520px; height: 520px; bottom: -18%; right: -12%; background: radial-gradient(circle,#ff9ec4,rgba(255,158,196,0) 70%); animation: floatB 17s ease-in-out 1s infinite; }
.lg-b3 { width: 380px; height: 380px; top: 18%; right: 8%; background: radial-gradient(circle,#c9a7ff,rgba(201,167,255,0) 70%); animation: floatC 12s ease-in-out .5s infinite; }
.lg-b4 { width: 340px; height: 340px; bottom: 6%; left: 12%; background: radial-gradient(circle,#ffd79a,rgba(255,215,154,0) 70%); animation: floatA 19s ease-in-out 2s infinite; }

.lg-persp { position: relative; perspective: 1600px; width: 100%; max-width: 420px; }
.lg-tilt { animation: tilt 11s ease-in-out infinite; transform-style: preserve-3d; }

.lg-card { position: relative; border-radius: 34px; padding: 34px 30px 30px; transform-style: preserve-3d; overflow: hidden;
    background: linear-gradient(150deg,rgba(255,255,255,.72),rgba(255,255,255,.38));
    backdrop-filter: blur(34px) saturate(180%); -webkit-backdrop-filter: blur(34px) saturate(180%);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 1px rgba(255,255,255,.5) inset,
                0 30px 60px -18px rgba(60,40,120,.35), 0 60px 110px -40px rgba(60,40,120,.4); }
.lg-sheen { position: absolute; top: 0; left: 0; width: 45%; height: 100%; pointer-events: none;
    background: linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.55),rgba(255,255,255,0));
    animation: sheen 7s ease-in-out infinite; }
.lg-shelf { height: 26px; margin: 0 26px; border-radius: 0 0 40px 40px; transform: translateZ(-20px);
    background: linear-gradient(180deg,rgba(255,255,255,.35),rgba(255,255,255,0));
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.lg-head { position: relative; text-align: center; transform: translateZ(40px); }
.lg-logo { width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center;
    background: linear-gradient(165deg,#5ac8fa,#0a84ff 55%,#5e5ce6);
    box-shadow: 0 1.5px 0 rgba(255,255,255,.75) inset, 0 -4px 8px rgba(0,0,0,.22) inset, 0 16px 28px -8px rgba(10,132,255,.6); }
.lg-title { font-size: 25px; font-weight: 700; letter-spacing: -.02em; color: #1c1c1e; line-height: 1.15; }
.lg-sub { margin-top: 9px; font-size: 14px; font-weight: 500; color: rgba(60,60,67,.6); }

.lg-form { position: relative; margin-top: 28px; display: flex; flex-direction: column; gap: 14px; transform: translateZ(26px); }
.lg-field { border-radius: 18px; padding: 2px; background: linear-gradient(180deg,rgba(120,120,140,.28),rgba(255,255,255,.85));
    box-shadow: 0 6px 14px -6px rgba(60,40,120,.35); }
.lg-field-in { border-radius: 16px; background: rgba(255,255,255,.72); display: flex; align-items: center; gap: 12px; padding: 0 16px;
    box-shadow: 0 4px 10px rgba(60,60,90,.14) inset, 0 1px 0 rgba(255,255,255,.9); }
.lg-field-in input { flex: 1; padding: 16px 0; border: 0; background: transparent; color: #1c1c1e; font-size: 16px; font-weight: 500; font-family: inherit; }
.lg-field-in input:focus { outline: none; }
.lg-field-in input::placeholder { color: rgba(60,60,67,.45); }

.lg-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.lg-remember { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: rgba(60,60,67,.65); cursor: pointer; }
.lg-switch { width: 44px; height: 27px; border-radius: 99px; padding: 2px; display: flex; align-items: center; justify-content: flex-end;
    background: linear-gradient(180deg,#34c759,#28a745);
    box-shadow: 0 2px 5px rgba(0,0,0,.2) inset, 0 1px 0 rgba(255,255,255,.5); transition: background .2s ease; }
.lg-switch.off { background: linear-gradient(180deg,#d1d1d6,#bcbcc2); justify-content: flex-start; }
.lg-knob { width: 23px; height: 23px; border-radius: 99px; background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.3), 0 -1px 0 rgba(0,0,0,.06) inset; }

.lg-btn { margin-top: 6px; padding: 18px; border: 0; border-radius: 18px; color: #fff; font-family: inherit; font-size: 17px;
    font-weight: 700; letter-spacing: -.01em; cursor: pointer; background: linear-gradient(180deg,#0a84ff,#0057d8);
    box-shadow: 0 1.5px 0 rgba(255,255,255,.65) inset, 0 -5px 0 #0046ad inset, 0 18px 30px -10px rgba(10,132,255,.75);
    transition: transform .13s ease, box-shadow .13s ease; width: 100%; }
.lg-btn:hover { transform: translateY(-2px);
    box-shadow: 0 1.5px 0 rgba(255,255,255,.75) inset, 0 -5px 0 #0046ad inset, 0 24px 36px -10px rgba(10,132,255,.85); }
.lg-btn:active { transform: translateY(4px);
    box-shadow: 0 1.5px 0 rgba(255,255,255,.5) inset, 0 -1px 0 #0046ad inset, 0 8px 14px -8px rgba(10,132,255,.8); }
.lg-error { text-align: center; font-size: 13px; font-weight: 600; color: #d2603a; margin-top: 10px; }