:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --subtle: #94a3b8;
    --line: #e2e8f0;
    --bg: #eef1f6;
    --field: #f8f9fc;
    --brand: #2f6bff;
    --brand-dark: #235bdf;
    --brand-ring: rgba(47, 107, 255, 0.15);
    --night: #020617;
    --danger-bg: #fff1f2;
    --danger: #be123c;
    --ok-bg: #ecfdf5;
    --ok: #047857;
    --radius: 22px;
    --radius-sm: 12px;
    --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 16px rgba(15, 23, 42, 0.06), 0 28px 56px -12px rgba(15, 23, 42, 0.22);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

p {
    line-height: 1.5;
}

:where(.auth) p {
    margin: 0;
}

a {
    color: var(--brand);
    font-weight: 500;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Layout de páginas simples */

.shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    min-height: 100dvh;
    padding: 48px 20px 0;
}

.shell > .card {
    margin-block: auto;
}

.shell > .footer {
    align-self: stretch;
    margin-inline: -20px;
}

.brand {
    display: flex;
    justify-content: center;
}

.brand-logo {
    display: block;
    width: auto;
    height: 40px;
}

.brand-on-dark {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.card,
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--card-shadow), 0 0 0 1px rgba(226, 232, 240, 0.6);
}

h1 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.lead {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

label {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
}

.form label {
    margin-top: 8px;
}

input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-sm);
    background: var(--field);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

input::placeholder {
    color: var(--subtle);
}

input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-ring);
}

input.code {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.28em;
}

.input-wrap input.code {
    padding-left: 44px;
    padding-right: 14px;
    letter-spacing: 0.2em;
}

input.code.is-recovery,
.input-wrap input.code.is-recovery {
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.help {
    color: var(--muted);
    font-size: 13px;
}

.help.is-warning {
    color: #b45309;
}

.help.is-error {
    color: var(--danger);
}

.help.is-success {
    color: var(--ok);
}

input.is-warning {
    border-color: #fcd34d;
}

input.is-error {
    border-color: #fda4af;
}

input.is-success {
    border-color: #6ee7b7;
}

button,
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    border: 0;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-soft);
    box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15, 23, 42, 0.05);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, opacity 0.15s;
}

button:hover,
.button:hover {
    background: #f8fafc;
    text-decoration: none;
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

button.primary,
.button.primary {
    margin-top: 12px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 20px rgba(47, 107, 255, 0.28);
}

button.primary:hover,
.button.primary:hover {
    background: var(--brand-dark);
}

button.block {
    width: 100%;
    height: 44px;
    font-size: 15px;
}

button.link {
    padding: 0;
    background: none;
    box-shadow: none;
    color: var(--brand);
}

button.link:hover {
    background: none;
    text-decoration: underline;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
}

.alert,
.success {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.alert {
    background: var(--danger-bg);
    color: var(--danger);
    box-shadow: inset 0 0 0 1px #fecdd3;
}

.success {
    background: var(--ok-bg);
    color: var(--ok);
    box-shadow: inset 0 0 0 1px #a7f3d0;
}

.hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.qr {
    width: 200px;
    margin: 16px auto;
}

.secret {
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--field);
    font-family: ui-monospace, monospace;
    word-break: break-all;
    text-align: center;
}

.codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
    list-style: none;
    font-family: ui-monospace, monospace;
}

.codes li {
    padding: 8px;
    border-radius: 8px;
    background: var(--field);
    text-align: center;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.choice {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
}

.choice.selected,
.choice:hover {
    box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-ring);
}

.choice-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

/* Pie de página */

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.footer-trust,
.footer-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-trust-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    margin: 0;
    line-height: 1.4;
}

.footer-trust-text strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.footer-lock {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    box-shadow: inset 0 0 0 1px var(--line);
}

.footer-lock svg {
    width: 13px;
    height: 13px;
}

.footer-meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.footer-sep {
    width: 1px;
    height: 12px;
    background: var(--line);
}

.footer-meta a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    color: var(--ink-soft);
}

.footer-meta a:hover {
    color: var(--brand);
    text-decoration: none;
}

.footer-meta a:focus-visible {
    outline: 2px solid var(--brand-ring);
    outline-offset: 3px;
}

.footer-meta svg {
    width: 12px;
    height: 12px;
}

@media (min-width: 640px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
        padding-inline: 32px;
    }

    .footer-meta {
        justify-content: flex-end;
        text-align: right;
    }
}

/* Pantalla de acceso con panel lateral */

.auth {
    min-height: 100dvh;
}

.auth-aside {
    display: none;
}

.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100dvh;
    padding: 40px 20px 0;
}

.auth-main > .footer {
    margin-inline: -20px;
}

.auth-content {
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.auth-mobile-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.auth-card {
    max-width: none;
    padding: 24px;
}

.auth-head {
    text-align: center;
}

.auth-head h1 {
    margin: 8px 0 0;
}

.auth-head .lead {
    margin: 6px 0 0;
}

.eyebrow {
    color: var(--subtle);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.field-link {
    font-size: 13px;
}

.input-wrap {
    position: relative;
    display: block;
}

.input-wrap input {
    padding-left: 44px;
}

.input-wrap input.has-toggle {
    padding-right: 48px;
}

.input-icon {
    position: absolute;
    inset-block: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding-left: 14px;
    color: var(--subtle);
    pointer-events: none;
}

.input-icon svg,
.toggle-password svg {
    width: 16px;
    height: 16px;
}

.toggle-password {
    position: absolute;
    inset-block: 0;
    right: 0;
    padding: 0 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: none;
    box-shadow: none;
    color: var(--subtle);
}

.toggle-password:hover {
    background: none;
    color: #334155;
}

.toggle-password .icon-eye-off,
.toggle-password.is-visible .icon-eye {
    display: none;
}

.toggle-password.is-visible .icon-eye-off {
    display: block;
}

.auth-form button.primary {
    margin-top: 8px;
}

.auth-switch {
    margin-top: 28px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.auth-switch form {
    display: inline;
    margin: 0;
}

/* Invitación a una empresa */

.invite-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8faff, #f3f6ff);
    box-shadow: inset 0 0 0 1px rgba(47, 107, 255, 0.12);
}

.invite-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), #6d5cff);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 8px 18px -8px rgba(47, 107, 255, 0.8);
}

.invite-info {
    min-width: 0;
    flex: 1;
}

.invite-org {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invite-email {
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invite-badge {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.14);
}

.invite-note {
    margin-top: 20px;
    padding: 14px;
    border-radius: 16px;
    background: var(--field);
    color: var(--muted);
    font-size: 14px;
    box-shadow: inset 0 0 0 1px var(--line);
}

.invite-note p {
    margin: 0 0 12px;
}

.invite-note .button {
    width: 100%;
    margin-top: 0;
}

.invite-note strong {
    color: var(--ink-soft);
}

/* Lista de organizaciones */

.org-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.org-list.is-busy {
    pointer-events: none;
}

.org-list.is-busy .org-option:not(.is-loading) {
    opacity: 0.55;
}

.org-option {
    width: 100%;
    gap: 14px;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15, 23, 42, 0.04);
    text-align: left;
    transition: box-shadow 0.15s, background-color 0.15s, transform 0.15s;
}

.org-option:hover {
    background: #fff;
    box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-ring);
}

.org-option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-ring);
}

.org-option.is-current {
    background: rgba(47, 107, 255, 0.04);
    box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.45);
}

.org-avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.org-avatar.is-internal {
    background: linear-gradient(135deg, var(--brand), #38bdf8);
}

.org-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.org-name {
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.org-meta .dot {
    color: #cbd5e1;
}

.org-current {
    flex-shrink: 0;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(47, 107, 255, 0.1);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
}

.org-arrow {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--field);
    color: var(--subtle);
    transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.org-arrow svg {
    width: 16px;
    height: 16px;
}

.org-option:hover .org-arrow {
    background: var(--brand);
    color: #fff;
    transform: translateX(2px);
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 999px;
    animation: spin 0.7s linear infinite;
}

.org-option.is-loading .org-arrow {
    background: var(--brand);
    color: #fff;
}

.org-option.is-loading .icon-arrow {
    display: none;
}

.org-option.is-loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-switch button.link {
    font-size: inherit;
}

/* Tarjeta ancha con cabecera y barra de acciones */

.auth-content.wide {
    max-width: 576px;
}

.auth-card.panel {
    overflow: hidden;
    padding: 0;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04), 0 24px 48px -16px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.7);
}

.panel-head {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-head h1 {
    margin: 8px 0 0;
    font-size: 1.25rem;
}

.panel-head .lead {
    margin: 4px 0 0;
}

.panel-body {
    padding: 24px;
}

.panel-body > .alert {
    margin: 0 0 20px;
}

.field-grid {
    display: grid;
    gap: 20px 16px;
}

.panel-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    background: var(--field);
    color: var(--muted);
    font-size: 14px;
}

.panel-foot button.primary {
    min-width: 176px;
    margin-top: 0;
    padding-inline: 20px;
}

@media (min-width: 640px) {
    .panel-head,
    .panel-body,
    .panel-foot {
        padding-inline: 28px;
    }

    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field-grid .span-2 {
        grid-column: span 2;
    }

    .panel-foot {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Tarjeta de estado (confirmaciones) */

.status-badge {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #ecfdf5;
    color: var(--ok);
}

.status-badge svg {
    width: 22px;
    height: 22px;
}

.status-badge.is-error {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-card .status-badge {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.status-card .status-badge svg {
    width: 26px;
    height: 26px;
}

.status-card .eyebrow {
    margin-top: 16px;
}

.status-card .alert + .lead {
    margin-top: 12px;
}

.status-title {
    margin: 20px 0 8px;
    font-size: 1.5rem;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.status-actions .button.primary {
    margin-top: 0;
}

@media (min-width: 640px) {
    .auth-main {
        padding-inline: 32px;
    }

    .auth-main > .footer {
        margin-inline: -32px;
    }

    .auth-card {
        padding: 32px;
    }
}

@media (min-width: 1024px) {
    .auth {
        display: grid;
        grid-template-columns: 380px minmax(0, 1fr);
    }

    .auth-aside {
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 48px 40px;
        background: var(--night);
        color: #fff;
    }

    .auth-mobile-brand {
        display: none;
    }
}

@media (min-width: 1024px) {
    .auth.auth-wide {
        grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    }
}

@media (min-width: 1280px) {
    .auth {
        grid-template-columns: 420px minmax(0, 1fr);
    }

    .auth.auth-wide {
        grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    }
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(64px);
    pointer-events: none;
}

.auth-orb-a {
    top: 96px;
    left: -96px;
    width: 288px;
    height: 288px;
    background: rgba(47, 107, 255, 0.3);
}

.auth-orb-b {
    right: -64px;
    bottom: 40px;
    width: 224px;
    height: 224px;
    background: rgba(56, 189, 248, 0.2);
}

.auth-aside-body,
.value-points {
    position: relative;
}

.auth-aside-title {
    margin-top: 48px;
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.auth-aside-lead {
    margin-top: 16px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
}

.value-points {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.value-points li {
    display: flex;
    gap: 12px;
}

.value-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 7px;
    border-radius: 999px;
    background: var(--brand);
}

.value-title {
    color: #fff;
    font-weight: 500;
}

.value-text {
    color: var(--subtle);
}

/* Espera por demasiados intentos (verificación en dos pasos) */

.cooldown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding: 22px 18px 18px;
    border-radius: 20px;
    background:
        radial-gradient(90% 70% at 50% 0%, rgba(47, 107, 255, 0.1), rgba(47, 107, 255, 0) 72%),
        linear-gradient(180deg, #f9fbff, #f3f6ff);
    box-shadow: inset 0 0 0 1px rgba(47, 107, 255, 0.14);
    text-align: center;
    animation: cooldown-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cooldown-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
}

.cooldown-halo {
    position: absolute;
    inset: 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 50%, rgba(47, 107, 255, 0.22), rgba(47, 107, 255, 0) 70%);
    animation: cooldown-breathe 4.6s ease-in-out infinite;
}

.cooldown-dial {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.cooldown-track,
.cooldown-bar {
    fill: none;
    stroke-width: 7;
}

.cooldown-track {
    stroke: rgba(47, 107, 255, 0.12);
}

.cooldown-bar {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
}

.cooldown-clock {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin: 0;
}

.cooldown-time {
    color: var(--ink);
    font-size: 27px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.cooldown-time.is-tick {
    animation: cooldown-tick 0.4s ease-out;
}

.cooldown-unit {
    color: var(--subtle);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cooldown-check {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    opacity: 0;
    stroke: var(--ok);
    stroke-width: 2.4;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
}

.cooldown-title {
    margin: 14px 0 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.cooldown-text,
.cooldown-done {
    max-width: 33ch;
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
}

.cooldown-text {
    color: var(--muted);
}

.cooldown-done {
    display: none;
    color: var(--ok);
}

.cooldown-tips {
    width: 100%;
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
    color: var(--ink-soft);
    font-size: 12.5px;
    text-align: left;
}

.cooldown-tips-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cooldown-tips-list li {
    display: none;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}

.cooldown-tips-list li.is-active {
    display: flex;
    animation: cooldown-tip-in 0.45s ease both;
}

.cooldown-done-tip {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    line-height: 1.45;
}

.cooldown-tip-dot {
    flex: none;
    width: 6px;
    height: 6px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--brand);
    opacity: 0.5;
}

.cooldown-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 12px 0 0;
    color: var(--subtle);
    font-size: 11.5px;
}

.cooldown-noscript {
    margin: 12px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 12px;
    line-height: 1.45;
}

.cooldown-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    animation: cooldown-ping 2s ease-out infinite;
}

.auth-form {
    transition: opacity 0.4s ease;
}

.auth-card.is-cooling .auth-form {
    opacity: 0.55;
}

.auth-card.is-cooling .auth-form input,
.auth-card.is-cooling .auth-form button {
    cursor: not-allowed;
}

.auth-card.is-cooling .field-link {
    visibility: hidden;
}

.cooldown.is-done {
    background:
        radial-gradient(90% 70% at 50% 0%, rgba(4, 120, 87, 0.08), rgba(4, 120, 87, 0) 72%),
        linear-gradient(180deg, #f6fefa, #ecfdf5);
    box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.18);
    animation: cooldown-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cooldown.is-done .cooldown-bar {
    stroke: var(--ok);
}

.cooldown.is-done .cooldown-halo {
    background: radial-gradient(circle at 50% 50%, rgba(4, 120, 87, 0.18), rgba(4, 120, 87, 0) 70%);
    animation: none;
}

.cooldown.is-done .cooldown-time {
    color: var(--ok);
}

.cooldown.is-done .cooldown-unit,
.cooldown.is-done .cooldown-time,
.cooldown.is-done .cooldown-text {
    display: none;
}

.cooldown.is-done .cooldown-check {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cooldown.is-done .cooldown-tips-list {
    display: none;
}

.cooldown.is-done .cooldown-done-tip {
    display: flex;
}

.cooldown-note-done {
    display: none;
}

.cooldown.is-done .cooldown-note-wait {
    display: none;
}

.cooldown.is-done .cooldown-note-done {
    display: inline;
}

.cooldown.is-done .cooldown-title-wait {
    display: none;
}

.cooldown.is-done .cooldown-title-done {
    display: inline;
    color: var(--ok);
}

.cooldown-title-done {
    display: none;
}

.cooldown.is-done .cooldown-done {
    display: block;
}

.cooldown-check path {
    fill: none;
}

body.is-cooling .auth-orb-a {
    animation: orb-drift 18s ease-in-out infinite;
}

body.is-cooling .auth-orb-b {
    animation: orb-drift 22s ease-in-out infinite reverse;
}

@keyframes cooldown-rise {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes cooldown-breathe {
    0%,
    100% {
        transform: scale(0.88);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.95;
    }
}

@keyframes cooldown-tick {
    from {
        transform: translateY(-3px);
        opacity: 0.35;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes cooldown-tip-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes cooldown-pop {
    0% {
        transform: scale(0.985);
    }
    55% {
        transform: scale(1.012);
    }
    100% {
        transform: none;
    }
}

@keyframes cooldown-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    70%,
    100% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

@keyframes orb-drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(14px, -18px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cooldown,
    .cooldown.is-done,
    .cooldown-halo,
    .cooldown-time.is-tick,
    .cooldown-tips-list li.is-active,
    .cooldown-dot,
    body.is-cooling .auth-orb-a,
    body.is-cooling .auth-orb-b {
        animation: none;
    }

    .cooldown-bar {
        transition: none;
    }

    .cooldown-tips-list li {
        display: flex;
    }

    .cooldown-check {
        transition: none;
    }
}
