/**
 * ============================================================================
 * PASSWORD PAGES - Dark Theme (Forgot, Reset, Done)
 * ============================================================================
 */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }

/* ============================================================================
   DARK THEME BACKGROUND
   ============================================================================ */

.password-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow-x: hidden;
}

.password-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(13, 148, 136, 0.1) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.password-page::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(30deg, transparent 48%, rgba(255,255,255,0.01) 49%, rgba(255,255,255,0.01) 51%, transparent 52%),
        linear-gradient(-30deg, transparent 48%, rgba(255,255,255,0.01) 49%, rgba(255,255,255,0.01) 51%, transparent 52%);
    background-size: 120px 120px;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* Decorative orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbPulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
.glow-orb.top-left { top: -100px; left: -100px; width: 300px; height: 300px; background: #0d9488; }
.glow-orb.bottom-right { bottom: -100px; right: -100px; width: 400px; height: 400px; background: #0d9488; animation-delay: 3s; }

@keyframes orbPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

/* Floating particles */
.particle {
    position: fixed;
    width: 4px; height: 4px;
    background: rgba(13, 148, 136, 0.4);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 80%; top: 30%; animation-delay: 4s; animation-duration: 16s; }
.particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 1s; animation-duration: 13s; }
.particle:nth-child(5) { left: 90%; top: 50%; animation-delay: 3s; animation-duration: 15s; }
.particle:nth-child(6) { left: 5%; top: 60%; animation-delay: 5s; animation-duration: 11s; }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.3; }
    25% { transform: translateY(-30px) translateX(10px) scale(1.2); opacity: 0.6; }
    50% { transform: translateY(-10px) translateX(-10px) scale(0.8); opacity: 0.4; }
    75% { transform: translateY(-40px) translateX(5px) scale(1.1); opacity: 0.5; }
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.password-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    z-index: 10;
}

.password-logo {
    position: absolute;
    top: 32px; left: 32px;
    z-index: 10;
}
.password-logo a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #ffffff;
}
.password-logo .logo-full { height: 54px; width: auto; }

/* ============================================================================
   CARD
   ============================================================================ */

.password-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.password-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #0d9488 0%, #14b8a6 50%, #0d9488 100%);
}
.password-card-inner { padding: 40px 36px 36px; }

.password-card-header { text-align: center; margin-bottom: 28px; }
.password-card-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}
.password-card-subtitle { font-size: 15px; color: #6b7280; margin: 0; }

.password-card-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
}
.password-card-footer p { margin: 0; font-size: 14px; color: #6b7280; }
.password-card-footer a { color: #0d9488; text-decoration: none; font-weight: 500; }
.password-card-footer a:hover { color: #0f766e; text-decoration: underline; }

/* Success icon */
.password-success-icon {
    width: 80px; height: 80px;
    background: #f0fdfa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #0d9488;
}

/* Message text */
.password-message {
    text-align: center;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 8px; }
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1); }
.form-input::placeholder { color: #9ca3af; }
.form-hint { font-size: 13px; color: #9ca3af; margin-top: 6px; }

/* Password field */
.password-field { position: relative; }
.password-field .form-input { padding-right: 48px; }
.password-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
}
.password-toggle:hover { color: #6b7280; }

/* Password requirements */
.password-requirements { margin-top: 10px; font-size: 13px; }
.password-requirements .requirement { color: #9ca3af; padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.password-requirements .requirement::before { content: '○'; font-size: 8px; }
.password-requirements .requirement.met { color: #0d9488; }
.password-requirements .requirement.met::before { content: '●'; }

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert { padding: 14px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #111827 0%, #1f2937 100%); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #1f2937 0%, #374151 100%); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.btn-full { width: 100%; }
.password-form-actions { margin-top: 24px; }

/* ============================================================================
   FOOTER
   ============================================================================ */

.password-footer { padding: 24px; text-align: center; position: relative; z-index: 10; }
.password-footer p { font-size: 11px; color: rgba(255, 255, 255, 0.35); margin: 0; line-height: 1.6; }
.password-footer p + p { margin-top: 8px; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .password-main {
        padding: 90px 16px 40px;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: -webkit-fill-available;
    }
    .password-logo { top: 20px; left: 20px; }
    .password-logo .logo-full { height: 28px; }
    .password-card { border-radius: 16px; }
    .password-card-inner { padding: 32px 24px 28px; }
    .password-card-title { font-size: 22px; }
    .password-card-subtitle { font-size: 14px; }
    .glow-orb.top-left { width: 200px; height: 200px; }
    .glow-orb.bottom-right { width: 250px; height: 250px; }
    .form-input {
        font-size: 16px;
        padding: 14px 16px;
        -webkit-appearance: none;
    }
    .btn {
        min-height: 48px;
        font-size: 15px;
        -webkit-tap-highlight-color: transparent;
    }
    .password-card-footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .password-main { padding: 80px 12px 32px; }
    .password-card-inner { padding: 28px 20px 24px; }
    .password-card-title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}