﻿/* =======================
   KairosIA – APP.CSS
   ======================= */

/* ---- Fix: autofill yellow background on MudBlazor inputs ---- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* Fix: MudBlazor outlined label background */
.mud-input-control .mud-input-label {
    background-color: white;
    padding: 0 4px;
}

/* ---- Paleta y tokens ---- */
:root {
    --green-700: #262010;
    --green-600: #F49718;
    --green-500: #1E8538;
    --orange: #FB8C00;
    --amber: #F59E0B;
    --accent: #FFA726;
    --ink: #0D1B2A;
    --paper: #FFFFFF;
    --page: #F6F8FB;
    --line: #E5E7EB;
    --radius: 12px;
    --shadow: 0 8px 22px rgba(0,0,0,.12);
    --topbar-h: 48px;
}

/* ---- Base ---- */
html, body {
    font-family: Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif !important;
    color: var(--ink);
    background: var(--page);
    margin: 0;
}

/* ---- Layout (legacy — disabled, using MudLayout now) ---- */

/* ---- Legacy topbar removed (now using MudAppBar) ---- */

/* ---- Legacy sidebar styles removed (now using MudDrawer + MudNavMenu) ---- */

/* ---- Dropdown ---- */
.dropdown {
    position: relative;
    margin-left: 8px;
}

.dropbtn {
    width: 40px;
    height: 40px;
    background: rgb(239 145 0 / 67%);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

    .dropbtn:focus {
        outline: 2px solid #FFFFFF80;
        outline-offset: 2px;
    }

.menu-icon, .menu-icon::before, .menu-icon::after {
    display: block;
    content: "";
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

    .menu-icon::before {
        transform: translateY(-6px);
    }

    .menu-icon::after {
        transform: translateY(6px);
    }

.dropdown-content {
    position: absolute;
    right: 0;
    top: 48px;
    background: #f6f8fb;
    color: var(--ink);
    border: 1px solid #cf7a2436;
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 220px;
    padding: 6px;
    display: none;
    z-index: 20;
}

.dropdown.open .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink) !important;
    font-weight: 700;
    text-decoration: none;
}

    .dropdown-content a:hover {
        background: #F3F4F6;
    }

    .dropdown-content a[aria-current="page"] {
        background: #FFF8E7;
        border-left: 3px solid var(--amber);
    }

/* ---- Contenido ---- */
article.content {
    padding: 10px 20px 28px;
}

.content {
    padding-top: 1.1rem;
}

/* ---- Validación Blazor ---- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ---- Error UI ---- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: .75rem;
        top: .5rem;
    }

/* ---- Loading ---- */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: .6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--green-700);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray .05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto .2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text,"Loading");
    }

/* ---- Legacy responsive sidebar removed ---- */

/* ---- Botones globales (opcionales fuera de firma) ---- */
.btn-clear {
    appearance: none;
    -webkit-appearance: none;
    background: #f1f5f9;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .5rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s,transform .1s,box-shadow .2s;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
}

    .btn-clear:hover {
        background: #e2e8f0;
    }

    .btn-clear:active {
        transform: scale(.98);
    }

    .btn-clear:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(148,163,184,.35);
    }

.btn-checkin {
    appearance: none;
    -webkit-appearance: none;
    background: var(--amber);
    color: #000;
    border: none;
    padding: .6rem 1.2rem;
    margin-top: 1rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s,transform .1s;
}

    .btn-checkin:not(:disabled):hover {
        background: var(--orange);
        color: #fff;
    }

    .btn-checkin:not(:disabled):active {
        transform: scale(.98);
    }

    .btn-checkin:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

/* =========================
   Firma: canvas + botones
   ========================= */

#Signature h2 {
    margin: 0 0 8px;
    color: var(--orange);
}

#Signature .signature-box canvas {
    display: block;
    width: 100%;
    aspect-ratio: 3/1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}

/* Contenedor de acciones: centrado perfecto */
#Signature .signature-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

    /* Normaliza métricas de ambos botones (misma altura, borde y ancho mínimo) */
    #Signature .signature-actions button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-sizing: border-box;
        height: 40px;
        line-height: 1;
        padding: 0 .95rem;
        border-radius: 10px;
        font: inherit;
        font-weight: 700;
        margin: 0;
        border: 1px solid transparent; /* <-- MISMO borde para ambos */
        min-width: 120px; /* <-- MISMO ancho mínimo */
    }

/* CLEAR (con icono) */
#Signature #btnClearSign {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FCA5A5;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
    cursor: pointer;
    transition: background-color .2s,border-color .2s,color .2s,transform .1s,box-shadow .2s;
}

    #Signature #btnClearSign::before {
        content: "";
        width: 16px;
        height: 16px;
        background: currentColor;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M3 16.5 12.5 7a2 2 0 0 1 2.8 0l2.7 2.7a2 2 0 0 1 0 2.8L9 22H3v-5.5zM8 20l9-9-2.7-2.7L5.3 17.3 8 20zM21 7l-4-4 1.4-1.4L22.4 5.6 21 7z"/></svg>');
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M3 16.5 12.5 7a2 2 0 0 1 2.8 0l2.7 2.7a2 2 0 0 1 0 2.8L9 22H3v-5.5zM8 20l9-9-2.7-2.7L5.3 17.3 8 20zM21 7l-4-4 1.4-1.4L22.4 5.6 21 7z"/></svg>');
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
    }

    #Signature #btnClearSign:hover {
        background: #FCA5A5;
        border-color: #EF4444;
        color: #7F1D1D;
    }

    #Signature #btnClearSign:active {
        transform: scale(.98);
    }

    #Signature #btnClearSign:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(239,68,68,.35);
    }

/* SIGN (con icono) — mismas métricas que CLEAR */
#Signature #btnDoSign {
    background: var(--amber);
    color: #000;
    border-color: transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
    cursor: pointer;
    transition: background-color .2s,transform .1s,color .2s;
}

    #Signature #btnDoSign:hover {
        background: var(--orange);
        color: #fff;
    }

    #Signature #btnDoSign:active {
        transform: scale(.98);
    }

    #Signature #btnDoSign:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(245,158,11,.35);
    }

    #Signature #btnDoSign::before {
        content: "";
        width: 16px;
        height: 16px;
        background: currentColor;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.41l-2.34-2.34a1.003 1.003 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>');
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1.003 1.003 0 0 0 0-1.41l-2.34-2.34a1.003 1.003 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>');
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
    }
/* ======== HOME AKP ======== */
:root {
    --akp-bg1: #0f172a;
    --akp-bg2: #111827;
    --akp-text: #e5e7eb;
    --akp-muted: #9ca3af;
    --akp-accent: #2ecc71; /* verde AKP */
    --akp-rocket: #ff9800; /* naranja cohete */
    --akp-card: rgba(255,255,255,.06);
    --akp-border: rgba(255,255,255,.12);
}

.akp-hero {
    padding-block: clamp(1.5rem, 3vw, 2.75rem);
}

.akp-hero-card {
    position: relative;
    border-radius: 22px;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    background: radial-gradient(900px 400px at 90% -10%, rgba(46,204,113,.16), transparent), radial-gradient(900px 400px at -10% 130%, rgba(255,152,0,.16), transparent), var(--akp-card);
    border: 1px solid var(--akp-border);
    box-shadow: 0 20px 50px rgba(46,204,113,.15);
    overflow: clip;
}

.akp-hero-content {
    max-width: 960px;
}

.akp-eyebrow {
    letter-spacing: .1em;
    font-weight: 800;
    opacity: .9;
}

    .akp-eyebrow .keep {
        color: var(--akp-rocket);
    }

.akp-title {
    font-size: clamp(1.8rem, 3.2vw, 3rem);
    margin: .1rem 0;
    font-weight: 900;
}

.akp-subtitle {
    color: var(--akp-muted);
    margin: .25rem 0 .75rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.akp-dot {
    width: .5rem;
    height: .5rem;
    background: var(--akp-accent);
    border-radius: 999px;
    box-shadow: 0 0 0 .25rem rgba(46,204,113,.15);
    display: inline-block;
}

.akp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: .5rem 0 1rem;
}

.akp-btn {
    border: 1px solid transparent;
    background: linear-gradient(90deg, var(--akp-accent), color-mix(in oklab, var(--akp-rocket) 60%, var(--akp-accent)));
    color: #0b1a12;
    font-weight: 800;
    padding: .7rem 1.1rem;
    border-radius: 14px;
    text-decoration: none;
}

    .akp-btn:hover {
        filter: brightness(1.05);
        box-shadow: 0 10px 30px rgba(46,204,113,.35);
    }

.akp-outline {
    background: transparent;
    color: var(--akp-text);
    border-color: color-mix(in oklab, var(--akp-accent) 60%, white);
}

    .akp-outline:hover {
        background: color-mix(in oklab, var(--akp-accent) 12%, black);
    }

.akp-ghost {
    background: transparent;
    color: var(--akp-text);
    border: 1px dashed var(--akp-border);
}

    .akp-ghost:hover {
        border-color: var(--akp-accent);
    }

/* Rocket */
.akp-rocket-wrap {
    position: absolute;
    right: clamp(12px, 3vw, 24px);
    top: clamp(12px, 3vw, 24px);
}

.akp-rocket {
    width: clamp(44px, 6vw, 64px);
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(255,152,0,.35));
    animation: bob 2.8s ease-in-out infinite;
}

.akp-trail::after {
    content: "";
    position: absolute;
    right: 16px;
    top: calc(100% - 2px);
    width: 6px;
    height: 120px;
    background: linear-gradient(180deg, rgba(255,152,0,.8), rgba(46,204,113,0));
    filter: blur(6px);
    border-radius: 999px;
    animation: flicker .9s ease-in-out infinite;
}

@keyframes bob {
    0%,100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-6px)
    }
}

@keyframes flicker {
    0%,100% {
        opacity: .85
    }

    50% {
        opacity: .35
    }
}

/* Progress ring */
.akp-progress {
    position: relative;
    width: 160px;
    aspect-ratio: 1;
    margin: .4rem 0 0;
}

.akp-ring {
    width: 100%;
    height: 100%;
}

    .akp-ring .track {
        fill: none;
        stroke: rgba(255,255,255,.15);
        stroke-width: 10;
    }

    .akp-ring .meter {
        fill: none;
        stroke: var(--akp-accent);
        stroke-width: 10;
        stroke-linecap: round;
        stroke-dasharray: 326; /* 2πr (r=52) */
        stroke-dashoffset: calc(326 - 326 * var(--pct, .42));
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
        filter: drop-shadow(0 6px 16px rgba(46,204,113,.45));
        transition: stroke-dashoffset .8s cubic-bezier(.4,0,.2,1);
    }

.akp-progress-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
}

    .akp-progress-label .big {
        font-size: 1.6rem;
        font-weight: 900;
        display: block;
    }

    .akp-progress-label small {
        color: var(--akp-muted);
    }

/* Grid */
.akp-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, 1fr);
    margin-block: 1rem 2rem;
}

.akp-card {
    background: var(--akp-card);
    border: 1px solid var(--akp-border);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

.akp-grid .akp-card:nth-child(1) {
    grid-column: span 4;
}

.akp-grid .akp-card:nth-child(2) {
    grid-column: span 4;
}

.akp-grid .akp-card:nth-child(3) {
    grid-column: span 4;
}

@media (max-width: 900px) {
    .akp-grid .akp-card {
        grid-column: span 12;
    }
}

.akp-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
}

.akp-card header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .4rem;
}

.akp-metric {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
}

    .akp-metric .unit {
        font-size: 1rem;
        color: var(--akp-muted);
        margin-left: .25rem;
    }

.muted {
    color: var(--akp-muted);
}

.akp-meter {
    height: 10px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: .4rem;
}

    .akp-meter span {
        display: block;
        height: 100%;
        background: linear-gradient(90deg, var(--akp-accent), color-mix(in oklab, var(--akp-rocket) 55%, var(--akp-accent)));
        width: var(--value, 30%);
    }

.akp-list {
    list-style: none;
    padding: 0;
    margin: .25rem 0 0;
    display: grid;
    gap: .35rem;
}

    .akp-list a {
        text-decoration: none;
        color: inherit;
        border: 1px solid transparent;
        padding: .45rem .6rem;
        border-radius: 12px;
        display: block;
    }

        .akp-list a:hover {
            border-color: var(--akp-accent);
            background: rgba(46,204,113,.07);
        }

.akp-note {
    display: flex;
    gap: .5rem;
}

.akp-input {
    flex: 1;
    border-radius: 12px;
    border: 1px solid var(--akp-border);
    background: rgba(255,255,255,.04);
    color: var(--akp-text);
    padding: .6rem .75rem;
}

    .akp-input:focus {
        outline: 3px solid color-mix(in oklab, var(--akp-accent) 60%, white);
        outline-offset: 2px;
    }

.akp-welcome {
    margin-bottom: 2rem;
}

/* =========================
   Surveys Styles (Clean)
   ========================= */

:root {
    --akp-green: #00A859;
    --akp-orange: #FF7A00;
    --akp-yellow: #FFD54A;
    --bg-page: #FFF9E6;
    --bg-card: #FFFFFF;
    --bg-question: #FFFBEC;
    --text: #222;
    --text-muted: #555;
    --border: #FFD54A;
    --shadow: 0 8px 20px rgba(0,0,0,0.06);
    --radius-card: 24px;
    --radius-block: 20px;
    --radius-pill: 999px;
}

/* ---------- Layout ---------- */
.survey-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--bg-page);
}

.survey-card {
    width: 100%;
    max-width: 850px;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 3px solid var(--akp-yellow);
}

/* ---------- Header ---------- */
.survey-header {
    text-align: center;
    margin-bottom: 2rem;
}

.survey-logo {
    width: 140px;
    height: auto;
}

.survey-header h1 {
    margin-top: 1rem;
    font-size: 2rem;
    font-family: 'Poppins', sans-serif;
    color: var(--akp-green);
    font-weight: 700;
}

.survey-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* -------- Language switch (AKP segmented control) -------- */
.lang-switch {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #FFFBEC; /* suave amarillo */
    border: 2px solid #FFD54A; /* amarillo corporativo */
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.lang-btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.85);
    color: #1f2933;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    letter-spacing: .01em;
}

    .lang-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.08);
        border-color: rgba(255,122,0,0.35); /* hint naranja */
    }
    /* Activo: gradiente corporativo + borde amarillo */
    .lang-btn.active {
        background: linear-gradient(90deg, #00A859 0%, #FF7A00 100%);
        color: #fff;
        border-color: #FFD54A;
        box-shadow: 0 10px 24px rgba(0,0,0,0.14);
    }
    /* Accesibilidad: foco visible */
    .lang-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(255,213,74,0.55), 0 10px 24px rgba(0,0,0,0.10);
    }

/* Mobile: un poco más compacto */
@media (max-width: 520px) {
    .lang-switch {
        gap: 10px;
        padding: 8px;
    }

    .lang-btn {
        padding: 12px 12px;
        font-size: 15px;
    }
}

/* ---------- Progress bar ---------- */
.survey-progress {
    margin-bottom: 1.5rem;
}

.survey-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.survey-progress-bar {
    width: 100%;
    height: 10px;
    background: #FFEFB3;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.survey-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--akp-green), var(--akp-orange));
    border-radius: var(--radius-pill);
    transition: width 0.25s ease-out;
}

/* ---------- Questions ---------- */
.survey-question {
    margin-bottom: 1.8rem;
    background: var(--bg-question);
    padding: 1.5rem 1.5rem 1.2rem;
    border-radius: var(--radius-block);
    border-left: 7px solid transparent;
    border-image: linear-gradient(var(--akp-orange), var(--akp-yellow)) 1;
    border-image-slice: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .survey-question:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.04);
        transform: translateY(-2px);
    }

    .survey-question > label,
    .survey-question label {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text);
        display: block;
    }

.survey-subquestion {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Optional: section title + stronger label */
.survey-qtitle {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--akp-green);
    margin-bottom: 0.35rem;
}

.survey-qlabel {
    display: block;
    font-size: 1.12rem;
    font-weight: 650;
    color: var(--text);
    line-height: 1.25;
}

/* ---------- Scales (chips) ---------- */
.survey-scale {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.survey-radio {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    position: relative;
}

    /* Hide native radio visually but keep accessible */
    .survey-radio input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    /* Chip base */
    .survey-radio span {
        display: inline-block;
        padding: 0.55rem 1.2rem;
        border-radius: var(--radius-pill);
        border: 2px solid var(--akp-yellow);
        background: #fff;
        color: #333;
        font-size: 0.98rem;
        transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

    /* Hover */
    .survey-radio:hover span {
        background: #FFF3CC;
        border-color: #FFB300;
    }

    /* Selected */
    .survey-radio input[type="radio"]:checked + span {
        background: linear-gradient(90deg, var(--akp-orange), var(--akp-yellow));
        border-color: var(--akp-orange);
        color: #fff;
        font-weight: 600;
        animation: pulseSelected 0.18s ease-out;
    }

@keyframes pulseSelected {
    0% {
        transform: scale(1);
    }

    55% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

/* Optional: NPS scale circular buttons */
/* Vertical layout for multi-line options (NPS reason) */
.survey-scale-vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

    .survey-scale-vertical .survey-radio span {
        width: 100%;
        text-align: left;
        padding: 0.65rem 1rem;
        font-size: 0.93rem;
    }

/* Optional label badge */
.survey-optional {
    font-size: 0.78rem;
    font-weight: 400;
    color: #6c757d;
    margin-left: 0.35rem;
}

.survey-scale-nps {
    justify-content: center;
    gap: 10px;
}

    .survey-scale-nps .survey-radio span {
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }

/* ---------- Textarea ---------- */
.survey-textarea {
    width: 100%;
    border-radius: 16px;
    padding: 1rem;
    border: 2px solid var(--akp-yellow);
    background: var(--bg-question);
    min-height: 120px;
    font-size: 1rem;
    transition: border-color 0.15s ease, background 0.15s ease;
    resize: vertical;
}

    .survey-textarea:focus {
        outline: none;
        border-color: var(--akp-orange);
        background: #FFFDF5;
    }

/* ---------- Button + Loader ---------- */
.survey-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    background: linear-gradient(90deg, var(--akp-green), var(--akp-orange));
    color: #fff;
    font-size: 1.2rem;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, opacity 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

    .survey-submit-btn:hover:not(:disabled) {
        opacity: 0.95;
        transform: translateY(-1px);
    }

    .survey-submit-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .survey-submit-btn:disabled {
        opacity: 0.8;
        cursor: default;
    }

.loader-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    animation: spinLoader 0.7s linear infinite;
}

@keyframes spinLoader {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Thank you ---------- */
.survey-thanks {
    text-align: center;
    padding: 3rem 1rem;
}

    .survey-thanks h2 {
        color: var(--akp-green);
        font-size: 2rem;
        font-weight: 700;
    }

/* ---------- Alerts (global, not only mobile) ---------- */
.survey-alert {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin: 16px 0;
    align-items: flex-start;
}

.survey-alert-warning {
    background: #FFF3CD;
    border: 1px solid #FFECB5;
    color: #664D03;
}

.survey-alert-danger {
    background: #F8D7DA;
    border: 1px solid #F5C2C7;
    color: #842029;
}

.survey-alert-icon {
    font-size: 24px;
    line-height: 1;
}

.survey-alert-content h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.survey-alert-content p {
    margin: 4px 0 0;
    font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .survey-card {
        padding: 1.5rem;
        border-radius: 18px;
    }

    .survey-question {
        padding: 1.1rem;
        margin-bottom: 1.2rem;
    }

    .survey-header h1 {
        font-size: 1.6rem;
    }

    .survey-scale {
        gap: 6px;
    }

    /* Chips full width on mobile */
    .survey-radio span {
        width: 100%;
        text-align: center;
    }

    .survey-qtitle {
        font-size: 0.9rem;
    }

    .survey-qlabel {
        font-size: 1.05rem;
    }
}

@media (max-width: 380px) {
    .survey-scale-nps .survey-radio span {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
}

.survey-qtitle {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(0, 168, 89, 0.10); /* verde suave */
    color: #00A859;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.survey-qlabel {
    display: block;
    font-size: 1.12rem;
    font-weight: 650;
    color: #222;
    line-height: 1.25;
}

/* End legacy moved styles (replaced by MudLayout) */

/* ═══════════════════════════════════════════════
   MudBlazor Drawer & Nav overrides — Akapella v2
   ═══════════════════════════════════════════════ */

/* ── Drawer — dark sidebar ─────────────────── */
.akp-drawer.mud-drawer {
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%) !important;
    background-image: none;
    border-right: none;
    box-shadow: 2px 0 12px rgba(0,0,0,.15);
}

.akp-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.akp-drawer-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 0 16px;
}

/* ── AppBar — branded teal ─────────────────── */
.akp-appbar.mud-appbar {
    background: linear-gradient(90deg, #1B6B93 0%, #217da8 100%) !important;
    color: #FFFFFF !important;
    border-bottom: none;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

/* ── Main content ──────────────────────────── */
.akp-main-content {
    background: #F3F4F6;
    padding: 16px 24px;
    min-height: calc(100vh - 90px);
}

/* ── Nav links on dark sidebar ─────────────── */
.akp-drawer .mud-nav-link {
    color: #94A3B8 !important;
    transition: all .15s;
}

.akp-drawer .mud-nav-link:hover:not(.active) {
    background-color: rgba(255,255,255,.06) !important;
    color: #E2E8F0 !important;
}

.akp-drawer .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(27,107,147,.25) 0%, rgba(27,107,147,.08) 100%) !important;
    color: #38BDF8 !important;
    border-left: 3px solid #38BDF8;
    font-weight: 600;
}

/* Nav group expand icon color */
.akp-drawer .mud-nav-group .mud-expand-panel-header .mud-icon-root {
    color: #64748B !important;
}

/* Nav group title */
.akp-drawer .mud-nav-group .mud-nav-link {
    font-size: 13px;
    color: #CBD5E1 !important;
}

.akp-drawer .mud-nav-group .mud-nav-link:hover {
    color: #FFFFFF !important;
}

/* Compact nav items */
.mud-navmenu .mud-nav-link {
    padding-top: 6px;
    padding-bottom: 6px;
    border-radius: 6px;
    margin: 1px 4px;
}

/* Scrollbar dark theme for sidebar */
.akp-drawer .mud-drawer-content::-webkit-scrollbar { width: 4px; }
.akp-drawer .mud-drawer-content::-webkit-scrollbar-track { background: transparent; }
.akp-drawer .mud-drawer-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.akp-drawer .mud-drawer-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }


/* ═══════════════════════════════════════════════
   Menú horizontal superior (TopNavMenu)
   ═══════════════════════════════════════════════ */

.akp-topnav {
    position: sticky;
    top: 48px; /* alto del AppBar dense */
    height: auto; /* crece a 2 filas si los módulos no caben en una */
    margin: -16px -24px 14px;
    z-index: 1290; /* bajo el AppBar (1300) y sobre el contenido */
    background: linear-gradient(180deg, #0F172A 0%, #16233c 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.akp-topnav-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    min-height: 42px;
    padding: 0 8px;
}

.akp-topnav-toggle {
    display: none;
    align-items: center;
    background: none;
    border: none;
    color: #CBD5E1;
    padding: 0 10px;
    cursor: pointer;
}

.akp-topnav-root {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
    overflow: visible; /* imprescindible: cualquier overflow recorta los desplegables */
}

/* ── Nivel 1: ítems de la barra ─────────────── */
.akp-root-item {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
}

.akp-root-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 10px;
    color: #CBD5E1;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: background-color .15s, color .15s;
}

.akp-root-entry:hover { background-color: rgba(255,255,255,.07); color: #FFFFFF; }

.akp-root-item.open > .akp-root-entry { background-color: rgba(255,255,255,.10); color: #FFFFFF; }

.akp-root-item.active > .akp-root-entry {
    color: #38BDF8;
    border-bottom-color: #38BDF8;
    font-weight: 600;
    background-color: rgba(56,189,248,.10);
}

.akp-root-icon { opacity: .9; flex: 0 0 auto; }

/* Los últimos menús de la barra se abren hacia la izquierda para no salirse */
.akp-root-item:nth-last-child(-n+3) > .akp-dropdown { left: auto; right: 0; }

.akp-root-item:nth-last-child(-n+3) .akp-submenu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 2px;
}

.akp-root-arrow {
    font-size: 16px !important;
    opacity: .65;
    transition: transform .15s;
}

.akp-root-item.open .akp-root-arrow { transform: rotate(180deg); }

/* ── Niveles 2..n: paneles desplegables ─────── */
.akp-dropdown,
.akp-submenu {
    display: none;
    position: absolute;
    list-style: none;
    margin: 0;
    padding: 4px;
    min-width: 240px;
    max-width: 340px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15,23,42,.18);
    z-index: 1295;
}

.akp-dropdown {
    top: 100%;
    left: 0;
}

.akp-dropdown.open { display: block; }

/* Submenús (niveles 3, 4, 5...) se abren al costado */
.akp-submenu {
    top: -5px;
    left: 100%;
    margin-left: 2px;
}

.akp-nav-item {
    position: relative;
    list-style: none;
}

.akp-nav-item:hover > .akp-submenu,
.akp-nav-item:focus-within > .akp-submenu { display: block; }

.akp-nav-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #1E293B;
    font-size: 13px;
    cursor: pointer;
    transition: background-color .12s, color .12s;
}

.akp-nav-entry:hover { background-color: #EFF6FF; color: #0066BB; }

.akp-nav-entry-text { flex: 1 1 auto; }

.akp-nav-entry-icon { color: #64748B; font-size: 18px !important; }

.akp-nav-entry:hover .akp-nav-entry-icon { color: #0066BB; }

.akp-nav-entry-arrow { font-size: 16px !important; color: #94A3B8; }

/* Rama activa: se resalta todo el camino hasta la pantalla actual */
.akp-nav-item.active-branch > .akp-nav-entry {
    color: #0066BB;
    font-weight: 600;
    background-color: rgba(0,102,187,.07);
}

.akp-nav-item.active-branch > .akp-nav-entry .akp-nav-entry-icon { color: #0066BB; }

.akp-nav-entry.current {
    background-color: rgba(0,102,187,.14);
    box-shadow: inset 3px 0 0 #0066BB;
}

/* ── Migas de pan: dónde estoy ──────────────── */
.akp-topnav-crumbs {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 1 auto;
    padding: 0 10px 0 14px;
    margin-left: auto;
    border-left: 1px solid rgba(255,255,255,.10);
    overflow: hidden;
    white-space: nowrap;
}

.akp-crumb { font-size: 12px; color: #94A3B8; }

.akp-crumb.current { color: #FFFFFF; font-weight: 600; }

.akp-crumb-sep { font-size: 14px !important; color: #475569; }

/* Capa para cerrar el menú al hacer clic fuera */
.akp-topnav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1289;
    background: transparent;
}

/* La barra vive dentro del contenido (sticky), no hace falta desplazarlo */

/* ── Responsive ─────────────────────────────── */
@media (max-width: 960px) {
    .akp-topnav-toggle { display: flex; }

    .akp-topnav-root {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        background: #0F172A;
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
        padding: 6px;
    }

    .akp-topnav-root.open { display: flex; }

    .akp-root-item { flex-direction: column; }

    .akp-root-entry { border-bottom: none; padding: 10px 12px; }

    .akp-dropdown,
    .akp-submenu {
        position: static;
        display: block;
        min-width: 0;
        max-width: none;
        background: transparent;
        border: none;
        border-left: 1px solid rgba(255,255,255,.12);
        border-radius: 0;
        box-shadow: none;
        margin: 0 0 0 18px;
        padding: 0;
    }

    .akp-dropdown:not(.open) { display: none; }

    .akp-nav-entry { color: #CBD5E1; }
    .akp-nav-entry:hover { background-color: rgba(255,255,255,.08); color: #FFFFFF; }
    .akp-nav-entry-icon { color: #64748B; }
    .akp-nav-item.active-branch > .akp-nav-entry { color: #38BDF8; background-color: rgba(56,189,248,.10); }
    .akp-nav-entry.current { background-color: rgba(56,189,248,.16); box-shadow: inset 3px 0 0 #38BDF8; }
    .akp-nav-entry-arrow { display: none; }

    .akp-topnav-crumbs { display: none; }
}

/* ── Barras de desplazamiento de las tablas ──────────────────────────────────
   Chrome y Edge dibujan por defecto barras flotantes que se desvanecen solas:
   en una tabla mas ancha que la pantalla no queda ninguna pista de que hay
   columnas a la derecha. Al declarar el estilo de la barra, el navegador vuelve
   a la barra clasica, siempre visible y ocupando su propio espacio.

   Se limita a los contenedores de tablas a proposito: aplicarlo a todo
   engordaria tambien las barras de menus, popovers y desplegables.

   .akp-tabla-scroll es para los div propios que envuelven una tabla; las otras
   dos clases son las que MudBlazor pone en MudTable y MudSimpleTable.          */
.akp-tabla-scroll,
.mud-table-container,
.mud-simple-table {
    scrollbar-width: thin;                /* Firefox */
    scrollbar-color: #94a3b8 #f1f5f9;     /* Firefox: pulgar y riel */
}

.akp-tabla-scroll::-webkit-scrollbar,
.mud-table-container::-webkit-scrollbar,
.mud-simple-table::-webkit-scrollbar { width: 14px; height: 14px; }

.akp-tabla-scroll::-webkit-scrollbar-track,
.mud-table-container::-webkit-scrollbar-track,
.mud-simple-table::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 7px; }

.akp-tabla-scroll::-webkit-scrollbar-thumb,
.mud-table-container::-webkit-scrollbar-thumb,
.mud-simple-table::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 7px;
    border: 3px solid #f1f5f9;
}

.akp-tabla-scroll::-webkit-scrollbar-thumb:hover,
.mud-table-container::-webkit-scrollbar-thumb:hover,
.mud-simple-table::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* El cuadrito donde se cruzan las dos barras, para que no quede un hueco. */
.akp-tabla-scroll::-webkit-scrollbar-corner,
.mud-table-container::-webkit-scrollbar-corner,
.mud-simple-table::-webkit-scrollbar-corner { background: #f1f5f9; }

/* ── Barra de scroll horizontal espejo para los grids anchos ──────────────
   El grid de screening mide mucho mas que la pantalla y su unica barra queda
   al pie: hay que bajar hasta el final para arrastrarla y en el camino se
   pierde la cabecera. Se cuelga una segunda barra encima de la tabla; la
   sincroniza wwwroot/js/gridscroll.js, que ademas le ajusta el alto al hueco
   que queda en pantalla. */
.akp-hscroll { position: relative; }

.akp-hscroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.akp-hscroll-top > div { height: 1px; }

.akp-hscroll-body {
    overflow: auto;
    max-height: calc(100vh - 320px);
}

/* Catalogos de Evolution (dimension, proyecto, actividad) en el paso 1 de la
   vacante: los valores vienen como "codigo - descripcion" y son largos, asi
   que en la lista se muestran en dos lineas y sin recortar. */
.catalogo-evolution-pop .mud-list-item {
    white-space: normal;
    align-items: flex-start;
}

.catalogo-evolution-pop .mud-list-item-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}
