/* ============================================================
   MARSUPIA · assets/css/activar.css
   Wizard público de activación (activar.php) — paleta y tokens
   idénticos a assets/css/style.css (el panel admin), pero hoja aparte
   porque esta pantalla no requiere sesión ni el resto del sistema de
   diseño del panel (sidebar, tablas, etc.). Mobile-first: la mayoría
   de los padres lo va a llenar desde el celular.
   ============================================================ */
:root {
    --pino: #0E3F38;
    --pino-2: #0B332E;
    --menta: #66F1C2;
    --arena: #E9E1D2;
    --papel: #FBF8F1;
    --tinta: #16211D;
    --salvia: #5C6B64;
    --bruma: #B9C8C0;
    --miel: #E6B45C;
    --clay: #B5533C;
    --sombra: 0 2px 12px rgba(14, 63, 56, .10);
}
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Hanken Grotesk', -apple-system, 'Segoe UI', sans-serif;
    background: var(--papel);
    color: var(--tinta);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--menta); color: var(--pino); }

.act-header {
    background: var(--pino);
    padding: 18px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.act-brand { display: flex; align-items: center; gap: 10px; }
.act-brand span {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--papel);
    font-size: 20px;
    font-weight: 600;
}
.act-badge {
    background: rgba(102, 241, 194, .15);
    border: 1px solid rgba(102, 241, 194, .3);
    color: var(--menta);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.act-progress { background: var(--pino); padding: 0 24px 18px; }
.act-progress-dots { display: flex; align-items: center; gap: 0; }
.act-dot {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 2px solid rgba(255, 255, 255, .25);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .5);
    flex-shrink: 0; transition: all .25s;
}
.act-dot.active { background: var(--menta); border-color: var(--menta); color: var(--pino); }
.act-dot.done { background: rgba(102, 241, 194, .3); border-color: var(--menta); color: var(--menta); }
.act-line { flex: 1; height: 2px; background: rgba(255, 255, 255, .15); transition: background .25s; }
.act-line.done { background: var(--menta); }

.act-container { max-width: 540px; margin: 0 auto; padding: 24px 20px 48px; }

.act-alert {
    background: rgba(181, 83, 60, .1);
    border: 1px solid rgba(181, 83, 60, .35);
    color: var(--clay);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.act-step { display: none; }
.act-step.visible { display: block; }
.act-step-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px; font-weight: 600;
    color: var(--pino); margin-bottom: 6px; line-height: 1.2;
}
.act-step-desc { color: var(--salvia); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }

.act-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.act-field-row { display: flex; gap: 12px; }
.act-field-row .act-field { flex: 1; }
.act-field label {
    font-size: 11.5px; font-weight: 600; color: var(--pino);
    text-transform: uppercase; letter-spacing: .04em;
}
.act-field input, .act-field select {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid rgba(14, 63, 56, .18);
    border-radius: 10px; font-size: 15px;
    font-family: inherit; background: #fff; color: var(--tinta);
    transition: border-color .2s;
}
.act-field input:focus, .act-field select:focus { outline: none; border-color: var(--menta); }
.act-field input::placeholder { color: #b0a898; }

.act-error {
    color: var(--clay); font-size: 13px; margin-top: 6px;
    display: none;
}
.act-error.visible { display: block; }

/* Botón de ayuda contextual + panel que despliega — uno por paso, no por
   cada opción individual, para no saturar de clics una pantalla que va a
   llenar alguien sin experiencia previa con el sistema. */
.act-info-btn {
    display: inline; background: none; border: none; padding: 0;
    margin-left: 4px; color: var(--pino); font-size: 12.5px; font-weight: 600;
    text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
    font-family: inherit;
}
.act-info-panel {
    display: none; background: rgba(102, 241, 194, .1);
    border: 1px solid rgba(102, 241, 194, .3); border-radius: 10px;
    padding: 10px 13px; font-size: 13px; color: var(--tinta);
    line-height: 1.5; margin: 8px 0 4px;
}
.act-info-panel.visible { display: block; }

/* Aclaración siempre visible (no detrás de un clic) sobre la diferencia
   entre bloquear una categoría completa y bloquear una app puntual —
   es la fuente de confusión más probable, así que no se esconde. */
.act-nota-aclaracion {
    background: rgba(230, 180, 92, .12);
    border: 1px solid rgba(230, 180, 92, .35);
    border-radius: 12px; padding: 12px 15px; font-size: 13px;
    color: var(--tinta); line-height: 1.55; margin-bottom: 22px;
}
.act-nota-aclaracion strong { color: var(--pino); }

.act-btn-mas {
    display: block; width: 100%; text-align: center; background: none;
    border: none; color: var(--pino); font-family: inherit; font-size: 13px;
    font-weight: 600; cursor: pointer; padding: 10px 0; margin-top: 2px;
}
.act-btn-mas:hover { text-decoration: underline; }
.act-apps-extra { margin-top: 10px; }

.act-nav { display: flex; gap: 12px; margin-top: 28px; }
.act-btn-back, .act-btn-next {
    padding: 13px 16px; border-radius: 12px; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all .2s;
}
.act-btn-back { flex: 1; background: #fff; border: 2px solid rgba(14, 63, 56, .18); color: var(--pino); }
.act-btn-back:hover { border-color: var(--pino); }
.act-btn-next {
    flex: 2; background: var(--pino); border: none; color: var(--menta);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.act-btn-next:hover { background: var(--pino-2); }

/* Tarjeta hijo */
.act-hijo-card {
    background: #fff; border: 1.5px solid rgba(14, 63, 56, .14);
    border-radius: 16px; padding: 18px; margin-bottom: 14px;
    box-shadow: var(--sombra); position: relative;
}
.act-hijo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.act-hijo-num {
    width: 28px; height: 28px; background: var(--menta); color: var(--pino);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.act-hijo-title { font-weight: 700; font-size: 14.5px; color: var(--pino); }
.act-btn-quitar {
    position: absolute; top: 14px; right: 14px; background: none; border: none;
    color: var(--salvia); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px;
}
.act-btn-quitar:hover { color: var(--clay); }

.act-btn-add {
    width: 100%; padding: 13px; background: #fff;
    border: 2px dashed rgba(14, 63, 56, .22); border-radius: 14px;
    color: var(--pino); font-family: inherit; font-size: 14.5px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.act-btn-add:hover { border-color: var(--menta); background: rgba(102, 241, 194, .05); }

/* Dispositivos */
.act-dispositivos-hijo { margin-bottom: 20px; }
.act-dispositivos-hijo .nombre-edad { font-weight: 700; color: var(--pino); margin-bottom: 10px; font-size: 14.5px; }
.act-dispositivos-hijo .nombre-edad span { color: var(--salvia); font-weight: 400; }
.act-dispositivos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.act-device-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.act-device-label {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 13px 8px; background: #fff; border: 2px solid rgba(14, 63, 56, .14);
    border-radius: 12px; cursor: pointer; transition: all .2s; text-align: center;
}
.act-device-label:hover { border-color: var(--menta); }
.act-device-option input:checked + .act-device-label { border-color: var(--menta); background: rgba(102, 241, 194, .08); }
.act-device-emoji { font-size: 24px; }
.act-device-name { font-size: 12.5px; font-weight: 600; color: var(--pino); }
.act-device-sub { font-size: 10.5px; color: var(--salvia); }

/* Protecciones */
.act-proteccion-seccion { margin-bottom: 22px; }
.act-proteccion-titulo {
    font-family: 'Fraunces', Georgia, serif; font-size: 14.5px; color: var(--pino);
    margin-bottom: 11px; padding-bottom: 7px; border-bottom: 1.5px solid var(--arena);
}
.act-toggle {
    background: #fff; border: 1.5px solid rgba(14, 63, 56, .14); border-radius: 14px;
    padding: 13px 15px; margin-bottom: 9px; display: flex; align-items: center;
    gap: 13px; cursor: pointer; transition: all .2s; box-shadow: var(--sombra);
}
.act-toggle:hover { border-color: var(--menta); }
.act-toggle.on { border-color: var(--menta); background: rgba(102, 241, 194, .07); }
.act-toggle-fijo { cursor: default; opacity: .85; background: rgba(14, 63, 56, .03); border-color: rgba(14, 63, 56, .18); }
.act-toggle-icon { font-size: 22px; flex-shrink: 0; width: 32px; text-align: center; }
.act-toggle-info { flex: 1; }
.act-toggle-nombre { font-weight: 700; font-size: 14px; color: var(--pino); margin-bottom: 2px; }
.act-toggle-desc { font-size: 12.5px; color: var(--salvia); line-height: 1.35; }
.act-switch {
    flex-shrink: 0; width: 44px; height: 24px; border-radius: 24px;
    background: rgba(14, 63, 56, .18); position: relative; transition: background .2s;
}
.act-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.act-switch.on { background: var(--menta); }
.act-switch.on::after { transform: translateX(20px); }

.act-apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.act-app-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.act-app-label {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 11px 6px; background: #fff; border: 2px solid rgba(14, 63, 56, .14);
    border-radius: 12px; cursor: pointer; transition: all .2s; text-align: center;
}
.act-app-label:hover { border-color: var(--menta); }
.act-app-option input:checked + .act-app-label { border-color: var(--menta); background: rgba(102, 241, 194, .08); }
.act-app-emoji { font-size: 20px; }
.act-app-name { font-size: 11.5px; font-weight: 600; color: var(--pino); }

/* Resumen */
.act-resumen-box { background: var(--pino); border-radius: 16px; padding: 20px; margin-bottom: 22px; }
.act-resumen-titulo {
    font-family: 'Fraunces', Georgia, serif; color: var(--menta); font-size: 15px;
    margin-bottom: 14px;
}
.act-resumen-texto {
    font-family: ui-monospace, monospace; font-size: 12.5px; color: rgba(255, 255, 255, .92);
    line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.act-nota-final { text-align: center; margin-top: 18px; }
.act-nota-final button {
    background: none; border: none; color: var(--pino); font-family: inherit;
    font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline;
}

/* Confirmación final */
.act-shell-final { display: flex; flex-direction: column; min-height: 100vh; }
.act-final-card {
    background: #fff; border: 1.5px solid rgba(14, 63, 56, .14); border-radius: 18px;
    padding: 36px 26px; text-align: center; box-shadow: var(--sombra); margin-top: 32px;
}
.act-final-icon {
    width: 56px; height: 56px; border-radius: 50%; background: var(--menta); color: var(--pino);
    display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700;
    margin: 0 auto 18px;
}
.act-final-card h1 { font-family: 'Fraunces', Georgia, serif; font-size: 24px; color: var(--pino); margin-bottom: 12px; }
.act-final-card p { color: var(--salvia); font-size: 14.5px; line-height: 1.55; margin-bottom: 10px; }
.act-final-nota { font-size: 13px !important; }
.act-btn-whatsapp {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; margin-top: 18px; padding: 14px; background: #25D366; border-radius: 12px;
    color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
}
.act-btn-whatsapp:hover { background: #20b858; }

@media (max-width: 380px) {
    .act-apps-grid { grid-template-columns: repeat(2, 1fr); }
    .act-field-row { flex-direction: column; }
}
