/* ============================================================
   Consola22 · Generador de contraseñas v1
   ============================================================ */

.password-tool {
    padding-top: 54px;
}

.password-intro {
    padding-bottom: 28px;
}

.password-page-lead {
    max-width: 850px;
}

.password-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 26px;
    background:
        linear-gradient(145deg, #102D36 0%, #123540 58%, #153B46 100%);
    color: #fff;
    box-shadow: 0 22px 54px rgba(15, 42, 51, .13);
}

.password-panel::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    transform: translate(36%, -44%);
    background: rgba(34, 199, 214, .08);
    pointer-events: none;
}

.password-panel-inner {
    position: relative;
    z-index: 1;
    padding: clamp(26px, 4.5vw, 40px);
}

.password-console {
    margin: 0 0 24px;
    color: #8FDCE4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    font-weight: 700;
}

.password-console::before {
    content: "> ";
    color: var(--c22-accent);
    font-weight: 900;
}

.password-result-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: end;
}

.password-result-main {
    min-width: 0;
}

.password-result-label {
    margin: 0 0 7px;
    color: #AFC5CA;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.password-secret-frame {
    min-width: 0;
}

.password-secret {
    display: block;
    min-height: 1.18em;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(1.7rem, 4.6vw, 3.45rem);
    line-height: 1.08;
    font-weight: 780;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.password-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    color: #AFC4C9;
    font-size: .78rem;
    font-weight: 700;
}

.password-result-meta span + span::before {
    content: "·";
    color: #668F98;
    margin-right: 12px;
}

.password-local-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #AFC4C9;
    font-size: .75rem;
    font-weight: 650;
}

.password-local-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--c22-success);
    box-shadow: 0 0 0 3px rgba(59, 162, 114, .10);
}

.password-copy-status {
    min-height: 1.4em;
    margin: 9px 0 0;
    color: #CDEBDA;
    font-size: .78rem;
}

.password-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.password-action,
.generate-button,
.mode-switch-button,
.generated-copy,
.generated-item {
    appearance: none;
    font: inherit;
}

.password-action {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 10px;
    background: rgba(255, 255, 255, .055);
    color: #EAF7F9;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.password-action-primary {
    border-color: rgba(34, 199, 214, .25);
    background: rgba(34, 199, 214, .10);
}

.password-action:hover,
.password-action:focus-visible {
    border-color: rgba(34, 199, 214, .42);
    background: rgba(34, 199, 214, .14);
    outline: none;
}

.password-divider {
    height: 1px;
    margin: 28px 0 26px;
    background: rgba(255, 255, 255, .085);
}


.password-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.password-evaluation-card,
.password-privacy-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 16px;
    background: rgba(7, 24, 30, .16);
}

.password-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.password-summary-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

.entropy-hero {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 18px;
}

.entropy-hero strong {
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(2.65rem, 6vw, 4.4rem);
    line-height: .95;
    letter-spacing: -.055em;
}

.entropy-hero > span {
    color: #8FDCE4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9rem;
    font-weight: 800;
}

.entropy-hero-label {
    margin: 7px 0 0;
    color: #AFC4C9;
    font-size: .74rem;
}

.entropy-explanation {
    margin: 10px 0 0;
    color: #8FAAAF;
    font-size: .72rem;
    line-height: 1.55;
}

.password-guarantees {
    display: grid;
    gap: 0;
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
}

.password-guarantees li {
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.password-guarantees li:last-child {
    border-bottom: 0;
}

.password-guarantees li > span {
    color: #8ED3AE;
    font-size: .86rem;
    font-weight: 900;
}

.password-guarantees strong,
.password-guarantees small {
    display: block;
}

.password-guarantees strong {
    color: #E9F3F5;
    font-size: .78rem;
}

.password-guarantees small {
    margin-top: 2px;
    color: #8FAAAF;
    font-size: .7rem;
    line-height: 1.45;
}

.password-divider-compact {
    margin-top: 18px;
}

.password-workspace {
    display: grid;
    grid-template-columns: minmax(300px, .86fr) minmax(0, 1.14fr);
    gap: 16px;
}

.password-controls-card,
.fingerprint-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 16px;
    background: rgba(7, 24, 30, .16);
}

.password-card-heading,
.fingerprint-heading,
.generated-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.password-card-kicker {
    margin: 0 0 4px;
    color: #86D8E1;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.password-card-heading h2,
.fingerprint-heading h2,
.generated-list-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

.fingerprint-heading > span {
    color: #8EAAB0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .7rem;
}

.mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 20px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    background: rgba(0, 0, 0, .12);
}

.mode-switch-button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9DB5BB;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
}

.mode-switch-button.is-active {
    background: rgba(34, 199, 214, .13);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(34, 199, 214, .20);
}

.control-block {
    margin-top: 22px;
}

.control-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.control-heading label,
.control-select-row label,
.control-fieldset legend {
    color: #DCE9EC;
    font-size: .78rem;
    font-weight: 800;
}

.control-heading output {
    color: #8FDCE4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86rem;
    font-weight: 850;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--c22-accent);
}

.range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    color: #6F9199;
    font-size: .64rem;
}

.control-fieldset {
    display: grid;
    gap: 0;
    margin: 22px 0 0;
    padding: 0;
    border: 0;
}

.control-fieldset legend {
    margin-bottom: 8px;
}

.check-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 39px;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
    color: #D8E6E9;
    font-size: .79rem;
    cursor: pointer;
}

.check-row:last-child {
    border-bottom: 0;
}

.check-row input {
    margin: 0;
    accent-color: var(--c22-accent);
}

.check-row code {
    color: #789AA2;
    font-size: .67rem;
}

.check-row-secondary {
    margin-top: 5px;
    padding-top: 5px;
    color: #AFC3C8;
}

.control-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: 22px;
}

.control-select-row select {
    min-width: 126px;
    padding: 8px 32px 8px 10px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 9px;
    background: #163843;
    color: #fff;
    font-size: .78rem;
}

.quantity-row {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.generate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin-top: 20px;
    border: 1px solid rgba(34, 199, 214, .32);
    border-radius: 10px;
    background: rgba(34, 199, 214, .12);
    color: #fff;
    font-size: .82rem;
    font-weight: 850;
    cursor: pointer;
}

.generate-button span {
    color: var(--c22-accent);
}

.generate-button:hover,
.generate-button:focus-visible {
    background: rgba(34, 199, 214, .18);
    outline: none;
}

.generator-error {
    min-height: 1.3em;
    margin: 9px 0 0;
    color: #F0C0C0;
    font-size: .74rem;
}

.fingerprint-stage {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
    background: #0B252D;
    aspect-ratio: 12 / 7;
}

.fingerprint-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    transition: opacity .18s ease, transform .18s ease;
}

.fingerprint-stage canvas.is-refreshing {
    opacity: .56;
    transform: scale(.988);
}

.fingerprint-copy {
    margin: 12px 0 0;
    color: #8FAAAF;
    font-size: .73rem;
    line-height: 1.55;
}

.entropy-block {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.entropy-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.entropy-heading > div {
    display: grid;
    gap: 2px;
}

.entropy-heading span {
    color: #8FAAAF;
    font-size: .72rem;
}

.entropy-heading strong {
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
}

.entropy-level {
    color: #8FDCE4 !important;
    font-weight: 850;
}

.entropy-track {
    position: relative;
    height: 8px;
    overflow: hidden;
    margin-top: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .075);
}

.entropy-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2E8793 0%, #22C7D6 100%);
    transition: width .25s ease;
}

.entropy-block > p {
    margin: 9px 0 0;
    color: #8FAAAF;
    font-size: .72rem;
    line-height: 1.5;
}

.fingerprint-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.fingerprint-stats > div {
    padding: 14px 10px 0 0;
}

.fingerprint-stats dt,
.fingerprint-stats dd {
    margin: 0;
}

.fingerprint-stats dt {
    color: #75969D;
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.fingerprint-stats dd {
    margin-top: 3px;
    color: #DCE9EC;
    font-size: .76rem;
    font-weight: 700;
}

.generated-list-heading > p {
    max-width: 390px;
    margin: 0;
    color: #8FAAAF;
    font-size: .73rem;
}

.generated-list {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.generated-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.generated-item {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 10px;
    background: rgba(0, 0, 0, .10);
    color: #DCE9EC;
    text-align: left;
    cursor: pointer;
}

.generated-item.is-active {
    border-color: rgba(34, 199, 214, .30);
    background: rgba(34, 199, 214, .07);
}

.generated-number {
    color: #79BFC8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .67rem;
}

.generated-item code {
    overflow: hidden;
    color: #F5FAFB;
    font-size: .74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generated-bits {
    color: #789AA2;
    font-size: .66rem;
    white-space: nowrap;
}

.generated-copy {
    min-width: 72px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 9px;
    background: rgba(255, 255, 255, .045);
    color: #C9DADD;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
}


.password-technical-results {
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, .085);
    border-radius: 14px;
    background: rgba(0, 0, 0, .10);
}

.password-technical-results summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 17px;
    color: #DCE9EC;
    cursor: pointer;
    list-style: none;
}

.password-technical-results summary::-webkit-details-marker {
    display: none;
}

.password-technical-results summary > span:first-child {
    display: grid;
    gap: 2px;
}

.password-technical-results summary strong {
    color: #EAF5F7;
    font-size: .8rem;
}

.password-technical-results summary small {
    color: #789AA2;
    font-size: .68rem;
    line-height: 1.4;
}

.technical-chevron {
    color: var(--c22-accent);
    font-size: 1rem;
    transition: transform .18s ease;
}

.password-technical-results[open] .technical-chevron {
    transform: rotate(180deg);
}

.password-technical-body {
    padding: 0 17px 17px;
}

.password-technical-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.password-technical-grid > div {
    min-width: 0;
    padding: 12px 14px 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.password-technical-grid > div:nth-child(even) {
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, .055);
}

.password-technical-grid dt,
.password-technical-grid dd {
    margin: 0;
}

.password-technical-grid dt {
    color: #789AA2;
    font-size: .65rem;
    font-weight: 750;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.password-technical-grid dd {
    margin-top: 4px;
    color: #DCE9EC;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.password-technical-grid code {
    color: #B9E7EC;
    font-size: .92em;
}

.password-technical-note {
    margin: 13px 0 0;
    color: #789AA2;
    font-size: .68rem;
    line-height: 1.55;
}

.password-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding-top: 17px;
    border-top: 1px solid rgba(255, 255, 255, .075);
    color: #8FAAAF;
    font-size: .74rem;
}

.password-private-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.password-private-status > span {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--c22-success);
    box-shadow: 0 0 0 3px rgba(59, 162, 114, .09);
}

.password-panel-footer a {
    color: #B8D0D5;
    font-weight: 750;
    text-decoration: none;
}

.password-panel-footer a span {
    color: var(--c22-accent);
}

.password-advice {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 7vw, 90px);
    margin-top: 24px;
    padding: 28px 30px;
    border: 1px solid var(--c22-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .68);
}

.password-advice p:last-child {
    margin: 2px 0 0;
    color: var(--c22-muted);
    line-height: 1.65;
}

.password-explain {
    padding-bottom: 70px;
}

.password-explain code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #EAF0F2;
    color: #24404A;
    font-size: .88em;
}

@media (max-width: 900px) {
    .password-workspace {
        grid-template-columns: 1fr;
    }

    .password-result-top {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .password-result-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .password-tool {
        padding-top: 42px;
    }

    .password-panel {
        border-radius: 20px;
    }

    .password-panel-inner {
        padding: 22px 18px;
    }

    .password-secret {
        font-size: clamp(1.55rem, 8.5vw, 2.4rem);
    }

    .password-result-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .password-action {
        width: 100%;
    }

    .password-controls-card,
    .fingerprint-card {
        padding: 18px;
    }

    .fingerprint-heading,
    .generated-list-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .fingerprint-stage {
        aspect-ratio: 1.35 / 1;
    }

    .fingerprint-stats {
        grid-template-columns: 1fr;
    }

    .fingerprint-stats > div {
        display: grid;
        grid-template-columns: 95px 1fr;
        gap: 10px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .055);
    }

    .fingerprint-stats > div:last-child {
        border-bottom: 0;
    }

    .generated-row {
        grid-template-columns: 1fr;
    }

    .generated-copy {
        min-height: 38px;
    }

    .generated-item {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .generated-bits {
        grid-column: 2;
    }

    .password-panel-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .password-advice {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 24px 22px;
    }
}

@media (max-width: 470px) {
    .password-result-actions {
        grid-template-columns: 1fr;
    }

    .control-select-row {
        align-items: start;
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .control-select-row select {
        width: 100%;
    }

    .check-row {
        grid-template-columns: 20px minmax(0, 1fr);
        padding: 4px 0;
    }

    .check-row code {
        grid-column: 2;
        padding-bottom: 5px;
    }
}


/* ============================================================
   V2.4.2 · estabilidad del resultado en móvil
   ============================================================ */

@media (max-width: 900px) {
    .password-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    /*
     * El área del secreto conserva una altura estable. Una contraseña
     * de 1, 2, 3 o 4 líneas no desplaza los botones ni provoca saltos
     * de scroll en la página. Si excepcionalmente necesita más espacio,
     * el desplazamiento queda contenido dentro de este área.
     */
    .password-secret-frame {
        height: 7.25rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .password-secret {
        padding-right: 4px;
    }

    .password-evaluation-card,
    .password-privacy-card {
        padding: 18px;
    }

    .entropy-hero strong {
        font-size: clamp(2.55rem, 14vw, 3.6rem);
    }

    .password-technical-grid {
        grid-template-columns: 1fr;
    }

    .password-technical-grid > div,
    .password-technical-grid > div:nth-child(even) {
        padding: 11px 0;
        border-left: 0;
    }
}

@media (max-width: 470px) {
    .password-secret-frame {
        height: 7.45rem;
    }

    .password-technical-results summary {
        padding: 14px;
    }

    .password-technical-body {
        padding: 0 14px 14px;
    }
}
