:root {
    --color-blue-900: #001c51;
    --color-blue-950: #030d22;
    --color-blue-925: #07122a;
    --color-accent-yellow: #ffd000;
    --color-accent-gold-500: #cbb059;
    --color-accent-gold-400: #dfb841;
    --color-white: #ffffff;
    --color-off-white: #e2e8f0;
    --color-muted: #5e6e88;
    --color-ink: #0b1220;
    --color-ink-soft: #102033;
    --bg: var(--color-blue-900);
    --bg-alt: var(--color-blue-950);
    --surface: var(--color-blue-925);
    --surface-2: #0b1835;
    --line: rgba(255, 255, 255, 0.14);
    --text: var(--color-off-white);
    --text-strong: var(--color-white);
    --on-accent: var(--color-ink);
    --gradient-bg-main: linear-gradient(145deg, #001c51 0%, #07122a 52%, #030d22 100%);
    --gradient-cta: linear-gradient(135deg, #ffd000 0%, #ffbf00 100%);
    --radius-md: 14px;
    --space-2: 8px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --font-sans: "Segoe UI", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
    --text-sm: 14px;
    --text-md: 16px;
    --text-lg: 28px;
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.24);
    --hover-overlay-light: rgba(255, 255, 255, 0.08);
    --focus-ring: 0 0 0 3px rgba(255, 208, 0, 0.35);
    --success: #22c55e;
    --on-success: #05130a;
    --danger: #ef4444;
    --on-danger: #fff1f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--gradient-bg-main);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.reset-container {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

.logo {
    text-align: center;
    margin-bottom: var(--space-6);
}

.logo h1 {
    color: var(--text-strong);
    font-size: var(--text-lg);
    font-weight: 600;
}

.icon {
    text-align: center;
    margin-bottom: var(--space-4);
    color: var(--color-accent-yellow);
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.icon--success {
    color: var(--success);
}

.icon--danger {
    color: var(--danger);
}

.message {
    text-align: center;
    margin-bottom: var(--space-6);
    font-size: var(--text-md);
    line-height: 1.6;
}

.dev-reset-link {
    gap: 8px;
    margin: 0 0 var(--space-6);
    padding: var(--space-4);
    border-radius: calc(var(--radius-md) - 4px);
    border: 1px solid rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.1);
    text-align: center;
}

.dev-reset-link__label {
    color: #bfdbfe;
    font-size: var(--text-sm);
    font-weight: 700;
}

/* Clase reutilizable para mensajes de estado (Éxito o Error) */
.status-message {
    padding: var(--space-4);
    border-radius: calc(var(--radius-md) - 4px);
    margin-bottom: var(--space-6);
    display: none;
    font-size: var(--text-sm);
    line-height: 1.5;
    text-align: center;
}

.status-message.success {
    background-color: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-message.error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--text);
    font-size: var(--text-md);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: var(--space-4);
    background-color: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius-md) - 4px);
    color: var(--text-strong);
    font-size: var(--text-md);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--color-accent-yellow);
    box-shadow: var(--focus-ring);
}

.form-control.error {
    border-color: var(--danger);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
}

.form-text {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.password-container {
    position: relative;
}

.password-container .form-control {
    padding-right: 90px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 68px;
    min-height: 38px;
    border: 0;
    background: transparent;
    color: var(--color-accent-yellow);
    font-weight: 600;
    cursor: pointer;
}

.password-rules {
    list-style: none;
    margin: var(--space-4) 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    color: rgba(226, 232, 240, 0.72);
    font-size: var(--text-sm);
}

.password-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-rules li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
    flex: 0 0 auto;
}

.password-rules li.is-valid {
    color: #86efac;
}

.password-rules li.is-valid::before {
    background: var(--success);
}

.btn-reset {
    width: 100%;
    padding: var(--space-4);
    background: var(--gradient-cta);
    color: var(--on-accent);
    border: none;
    border-radius: calc(var(--radius-md) - 4px);
    font-size: var(--text-md);
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn-reset:hover:not(:disabled) {
    filter: brightness(1.05);
}

.btn-reset:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-reset:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.links {
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--text-md);
    display: grid;
    gap: var(--space-4);
}

.link {
    color: var(--color-accent-gold-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--color-accent-gold-500);
    text-decoration: underline;
}

.reset-link-button {
    text-decoration: none;
}

.reset-link-button:hover {
    color: var(--on-accent);
    text-decoration: none;
}

/* Spinner para estado de carga */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(11, 18, 32, 0.3);
    border-top-color: var(--on-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

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

@media (max-width: 480px) {
    .reset-container {
        padding: var(--space-6);
    }
}
