/* Modern Fonts - Inter + Space Grotesk */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* Reset & Global styles */
:root {
    --primary-color: #025982;
    --primary-dark: #01425e;
    --primary-light: #f0f7fb;
    --primary-rgb: 2, 89, 130;
    --accent-color: #ff6b6b;
    --accent-hover: #ff5252;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --text-light: #8a94a6;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #001a29;
    --bg-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --transition-speed: 0.3s;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Password Reset Section */
.password-reset-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9f2f9 100%);
}

/* Background Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.shape-1 {
    top: -150px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(2, 89, 130, 0.06), rgba(2, 89, 130, 0.02));
    animation: floatShape1 20s ease-in-out infinite;
}

.shape-2 {
    bottom: -200px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(2, 89, 130, 0.04), rgba(2, 89, 130, 0.01));
    animation: floatShape2 25s ease-in-out infinite;
}

.shape-3 {
    top: 40%;
    left: 15%;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(2, 89, 130, 0.03), rgba(2, 89, 130, 0.01));
    animation: floatShape3 18s ease-in-out infinite;
}

@keyframes floatShape1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -15px) rotate(5deg); }
    66% { transform: translate(-10px, 10px) rotate(-3deg); }
}

@keyframes floatShape2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-15px, 20px) rotate(-5deg); }
    66% { transform: translate(10px, -10px) rotate(3deg); }
}

@keyframes floatShape3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -10px) scale(1.05); }
}

/* Password Reset Wrapper - Split Screen */
.password-reset-wrapper {
    display: flex;
    width: 100%;
    max-width: 850px;
    min-height: 500px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
    position: relative;
}

/* Password Reset Form Container */
.password-reset-form-container {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Brand Section */
.brand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.brand-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    box-shadow: 0 8px 20px rgba(2, 89, 130, 0.25);
    font-size: 1.5rem;
}

.password-reset-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.25rem;
    text-align: center;
}

.portal-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

/* Welcome Text */
.welcome-text {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-text h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.welcome-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.6;
}

/* Alert Styles */
.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Password Reset Form */
.password-reset-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Fix for input group and form control */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    transition: var(--transition);
    flex-wrap: nowrap;
    overflow: hidden;
    min-height: 3.2rem;
}

.input-group:focus-within {
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    z-index: 2;
    pointer-events: none;
}

.form-control {
    width: 100%;
    height: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    border: none !important;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: transparent !important;
    color: var(--text-primary);
    outline: none !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    z-index: 1;
}

.form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    -webkit-box-shadow: none !important;
    background-color: transparent !important;
}

.form-control::placeholder {
    color: var(--text-light);
}

/* Form Group */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

/* Password Reset Button */
.btn-password-reset {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-sans);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
    margin-bottom: 1.5rem;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-password-reset::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-password-reset:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.35);
}

.btn-password-reset:hover::before {
    left: 100%;
}

.btn-password-reset:active {
    transform: translateY(-1px);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    text-align: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Login Option */
.login-option {
    text-align: center;
    margin-bottom: 1.5rem;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
    text-decoration: none;
}

/* Signup Option */
.signup-option {
    text-align: center;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--text-secondary);
}

.signup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.signup-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Side Content */
.password-reset-side-content {
    width: 50%;
    background: linear-gradient(145deg, #025982 0%, #01425e 50%, #012e42 100%);
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.side-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
}

.password-reset-side-content:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'%3E%3C/path%3E%3C/svg%3E");
    opacity: 0.1;
}

.password-reset-side-content h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    text-align: center;
    color: white;
    position: relative;
}

.password-reset-side-content h2:after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 0.25rem;
    background: white;
    border-radius: 1rem;
    opacity: 0.3;
}

/* Security Features */
.security-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.security-feature-item {
    display: flex;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.security-feature-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
}

.security-feature-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
    font-size: 1.3rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.security-feature-item:hover .security-feature-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.security-feature-text h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: white;
    font-weight: 600;
}

.security-feature-text p {
    font-size: 0.9rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Security Note */
.security-note {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.security-note i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.security-note p {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.password-reset-form-container {
    animation: fadeInRight 0.6s ease forwards;
}

.password-reset-side-content {
    animation: fadeInRight 0.6s 0.2s ease forwards;
    opacity: 0;
}

/* Enhanced fixes for autofill and password fields */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-white) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
    background-color: var(--bg-white) !important;
    border-color: transparent !important;
    border-radius: var(--border-radius) !important;
}

/* Override any styles that might be affecting our inputs */
.form-control,
input[type="email"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: transparent !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 1rem !important;
    padding: 0.8rem 1rem 0.8rem 2.75rem !important;
    color: var(--text-primary) !important;
    z-index: 1 !important;
    position: relative !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Bootstrap utility classes */
.me-2 {
    margin-right: 0.5rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

/* Enhanced Responsive Styles */
@media (max-width: 992px) {
    .password-reset-wrapper {
        max-width: 720px;
        min-height: 480px;
    }
    
    .password-reset-form-container,
    .password-reset-side-content {
        padding: 1.75rem;
    }
    
    .security-feature-list {
        gap: 1.2rem;
    }
    
    .security-feature-item {
        padding: 1rem;
    }
    
    .security-feature-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .password-reset-section {
        padding: 1rem;
    }
    
    .password-reset-wrapper {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }
    
    .password-reset-form-container,
    .password-reset-side-content {
        width: 100%;
        padding: 1.75rem;
    }
    
    .password-reset-form-container {
        order: 1;
    }
    
    .password-reset-side-content {
        order: 2;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .password-reset-side-content h2 {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    
    .security-feature-list {
        gap: 1rem;
    }
    
    .security-feature-item {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .password-reset-section {
        padding: 0.75rem;
    }
    
    .password-reset-wrapper {
        max-width: 100%;
        border-radius: var(--border-radius);
    }
    
    .password-reset-form-container,
    .password-reset-side-content {
        padding: 1.5rem 1.25rem;
    }
    
    .password-reset-side-content {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .security-feature-item {
        padding: 0.9rem;
        align-items: center;
    }
    
    .security-feature-icon {
        width: 40px;
        height: 40px;
        margin-right: 1rem;
        font-size: 1rem;
    }
    
    .security-feature-text h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .security-feature-text p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .password-reset-form-container {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .password-reset-title {
        font-size: 1.6rem;
    }
    
    .welcome-text h2 {
        font-size: 1.3rem;
    }
    
    .welcome-text p {
        font-size: 0.9rem;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .password-reset-section {
        padding: 0.5rem;
    }
    
    .password-reset-form-container,
    .password-reset-side-content {
        padding: 1.25rem 1rem;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .password-reset-title {
        font-size: 1.4rem;
    }
    
    .welcome-text h2 {
        font-size: 1.2rem;
    }
    
    .welcome-text p {
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 0.7rem 1rem 0.7rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .btn-password-reset {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .security-feature-list {
        gap: 0.8rem;
    }
}

/* Fix for very small height screens */
@media (max-height: 700px) {
    .password-reset-wrapper {
        min-height: auto;
    }
    
    .brand-section {
        margin-bottom: 1rem;
    }
    
    .welcome-text {
        margin-bottom: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .password-reset-side-content h2 {
        margin-bottom: 1.5rem;
    }
    
    .security-feature-list {
        gap: 1rem;
    }
}

/* Fix for very large screens to maintain proportions */
@media (min-width: 1600px) {
    .password-reset-wrapper {
        max-width: 900px;
        min-height: 520px;
    }
    
    .password-reset-section {
        padding: 2rem;
    }
    
    .shape-1 {
        width: 450px;
        height: 450px;
    }
    
    .shape-2 {
        width: 550px;
        height: 550px;
    }
    
    .shape-3 {
        width: 250px;
        height: 250px;
    }
}