/* ===== FORGOT PASSWORD PAGE STYLES ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #243b55;
    --primary-dark: #18283e;
    --primary-light: #324e6a;
    --accent: #2563eb;
    --accent-vivid: #3b82f6;
    --accent-soft: rgba(37, 99, 235, 0.05);
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    --success: #10b981;
    --success-deep: #059669;
    --danger: #ef4444;
    --danger-deep: #dc2626;
    --warning: #f59e0b;
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.06);
    --transition: all 0.25s ease-out;
}

html, body {
    height: 100%;
    font-family: var(--font-primary);
    background: var(--gray-50);
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
}

/* ===== Main Container ===== */
.forgot-password-container {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f4f4f5 100%);
}

.forgot-hero {
    position: relative;
    flex: 0 0 55%;
    background: linear-gradient(135deg, #18283e 0%, #243b55 50%, #324e6a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 35px 20px 35px;
    overflow: hidden;
}

.forgot-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.forgot-hero #heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.forgot-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 25% 40%, rgba(26, 127, 212, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse at 75% 15%, rgba(0, 168, 255, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(0, 168, 255, 0.1) 0%, transparent 40%);
    z-index: 0;
    pointer-events: none;
}

/* === Floating Decorative Elements === */
.forgot-hero .hero-float-elements {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.forgot-hero .float-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
}

.forgot-hero .float-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    animation: floatSlow 12s ease-in-out infinite;
}

.forgot-hero .float-2 {
    width: 180px;
    height: 180px;
    bottom: 15%;
    right: 10%;
    background: rgba(59, 130, 246, 0.06);
    animation: floatSlow 10s ease-in-out infinite reverse;
}

.forgot-hero .float-3 {
    width: 100px;
    height: 100px;
    top: 35%;
    right: 25%;
    background: rgba(255, 255, 255, 0.04);
    animation: floatSlow 8s ease-in-out infinite 2s;
}

.forgot-hero .float-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.forgot-hero .float-ring-1 {
    width: 220px;
    height: 220px;
    top: 20%;
    right: -40px;
    animation: floatRotate 20s linear infinite;
}

.forgot-hero .float-ring-2 {
    width: 140px;
    height: 140px;
    bottom: 25%;
    left: 15%;
    border-color: rgba(37, 99, 235, 0.1);
    animation: floatRotate 15s linear infinite reverse;
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(15px, -20px); }
    66% { transform: translate(-10px, 10px); }
}

@keyframes floatRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.forgot-hero .hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: left;
}

.forgot-hero .hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.8);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.forgot-hero .hero-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 10px;
}

.forgot-hero .hero-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    max-width: 350px;
    margin-bottom: 15px;
}

.forgot-hero .hero-features {
    display: flex;
    gap: 12px;
}

.forgot-hero .hero-feature-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    color: rgba(255,255,255,0.85);
    font-size: 0.7rem;
    font-weight: 500;
    min-width: 100px;
    transition: var(--transition);
}

.forgot-hero .hero-feature-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.forgot-hero .hero-feature-card .material-icons-outlined {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.7);
}

/* ===== Hero Stats ===== */
.forgot-hero .hero-stats {
    display: none;
}

/* ===== Form Wrapper ===== */
.forgot-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f4f5 100%);
}

.forgot-form-panel {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: var(--white);
    border: 1px solid rgba(0, 102, 204, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.08);
}

.forgot-header {
    margin-bottom: 32px;
}

.forgot-header .form-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.forgot-header .form-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ===== Form Steps ===== */
.reset-step {
    display: none;
}

.reset-step.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Form Group ===== */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    background: #ffffff;
    border: 2px solid #e2e6ef;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.8rem;
    color: var(--gray-800);
    transition: var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:focus {
    border-color: #1a7fd4;
    background: #f8f9fc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1), 0 0 0 8px rgba(26, 127, 212, 0.05);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--gray-400);
}

/* ===== Password Toggle ===== */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.password-toggle .material-icons-outlined {
    font-size: 1.2rem;
}

/* ===== Password Requirements ===== */
.password-requirements {
    margin-top: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 0.8rem;
}

.requirement-item.met {
    color: var(--success);
}

.requirement-item.met .requirement-icon {
    background: rgba(30, 169, 113, 0.15);
    color: var(--success);
}

/* ===== Error Messages ===== */
.form-error {
    display: block;
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 6px;
    min-height: 0;
    overflow: hidden;
    transition: all 0.25s ease;
    opacity: 0;
    max-height: 0;
}

.form-error.visible {
    opacity: 1;
    max-height: 30px;
    min-height: 18px;
}

.form-group.has-error .form-input {
    border-color: var(--danger);
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.06);
}

/* ===== Buttons ===== */
.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #18283e 0%, #243b55 50%, #324e6a 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.35), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #18283e 0%, #243b55 50%, #324e6a 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 102, 204, 0.45), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary .material-icons-outlined {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover .material-icons-outlined {
    transform: translateX(4px);
}

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

/* ===== Resend Section ===== */
.resend-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.resend-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.resend-btn:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ===== Back to Login ===== */
.back-to-login {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.04) 0%, rgba(26, 127, 212, 0.02) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 102, 204, 0.08);
    transition: all 0.3s ease;
}

.back-to-login:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(26, 127, 212, 0.04) 100%);
    border-color: rgba(0, 102, 204, 0.15);
}

.back-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
    position: relative;
}

.back-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0066cc;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.back-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ===== Success Step ===== */
.success-step {
    text-align: center;
    padding: 24px 0;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(30, 169, 113, 0.15);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-icon .material-icons-outlined {
    font-size: 2.4rem;
    color: var(--success);
}

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

.success-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.success-message {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.success-step .btn-primary {
    margin-bottom: 0;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.04);
    border-left: 4px solid var(--accent);
    font-size: 0.9rem;
    color: var(--gray-800);
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 380px;
    backdrop-filter: blur(8px);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.success {
    border-left-color: var(--success);
}

.toast .material-icons-outlined {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast.error .material-icons-outlined { color: var(--danger); }
.toast.success .material-icons-outlined { color: var(--success); }

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(40px) scale(0.96); }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .forgot-password-container {
        flex-direction: column;
    }

    .forgot-hero {
        flex: 0 0 auto;
        padding: 30px 20px;
        min-height: 250px;
    }

    .forgot-hero .hero-title {
        font-size: 2rem;
    }

    .forgot-form-wrapper {
        flex: 1;
        padding: 30px 20px;
    }

    .forgot-form-panel {
        padding: 30px;
    }
}

@media (max-width: 1024px) {
    .forgot-hero {
        flex: 0 0 40%;
        padding: 25px;
    }

    .forgot-hero .hero-title {
        font-size: 1.8rem;
    }

    .forgot-hero .hero-description {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .forgot-hero .hero-features {
        display: none;
        gap: 8px;
    }

    .forgot-hero .hero-feature-card {
        padding: 12px 10px;
        font-size: 0.7rem;
    }

    .forgot-hero .hero-float-elements {
        display: none;
    }

    .forgot-form-wrapper {
        padding: 30px;
    }

    .forgot-form-panel {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .forgot-password-container {
        flex-direction: column;
    }

    .forgot-hero {
        flex: none;
        padding: 20px 18px;
        min-height: auto;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .forgot-hero .hero-content {
        text-align: left;
        width: 100%;
    }

    .forgot-hero .hero-badge {
        font-size: 0.6rem;
        padding: 6px 12px;
        margin-bottom: 8px;
    }

    .forgot-hero .hero-title {
        font-size: 1.7rem;
        margin: 8px 0 6px;
        line-height: 1.1;
        font-weight: 800;
    }

    .forgot-hero .hero-description {
        font-size: 0.72rem;
        line-height: 1.35;
        margin: 6px 0 10px;
        color: rgba(255, 255, 255, 0.85);
    }

    .forgot-hero .hero-features {
        display: none;
    }

    .forgot-hero .hero-feature-card {
        min-width: auto;
        padding: 8px 10px;
        font-size: 0.6rem;
        gap: 4px;
        flex: 1 1 calc(50% - 4px);
        min-width: 100px;
    }

    .forgot-hero .hero-feature-card:nth-child(n+3) {
        display: none;
    }

    .forgot-hero .hero-float-elements {
        display: none;
    }

    .forgot-form-wrapper {
        flex: none;
        padding: 20px;
        width: 100%;
    }

    .forgot-form-panel {
        max-width: 100%;
        padding: 24px;
    }

    .forgot-header .form-title {
        font-size: 1.3rem;
    }

    .btn-primary {
        font-size: 0.9rem;
        padding: 11px 20px;
    }

    .form-input {
        padding: 11px 14px;
        font-size: 0.9rem;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
    }
}

