﻿:root {
    --primary-blue: #1e40af;
    --primary-light: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-gray: #f8fafc;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
    --color-very-poor: #ef4444;
    --color-poor: #f59e0b;
    --color-fair: #eab308;
    --color-good: #10b981;
    --color-excellent: #22c55e;
}
/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--accent-green);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    zoom: 0.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102,126,234,0.1);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.logo {
    transition: transform .3s;
}

    .logo:hover {
        transform: scale(1.05) translateY(-1px);
    }

.navbar-logo {
    height: 65px;
}

.back-link {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    padding: 8px 14px;
    border-radius: 20px;
    transition: background .3s;
}

    .back-link:hover {
        background: #16a34a;
        color: #fff;
    }

/* Main wrapper & card */
.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    min-height: calc(100vh - 160px);
}

.form-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(25px);
    border-radius: 16px;
    padding: 32px;
    margin: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
    .form-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #0891b2, #16a34a, #0891b2);
        animation: slide 3s ease-in-out infinite;
    }

@keyframes slide {
    0%,100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

/* Card header */
.form-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg,#333,#555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: #666;
    margin-top: 6px;
    font-size: 14px;
}

.info-box {
    background: rgba(8, 145, 178, 0.08);
    border: 1px solid rgba(8, 145, 178, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
}

    .info-box strong {
        color: #0891b2;
        display: block;
    }

    .info-box p {
        margin-top: 4px;
        color: #64748b;
        font-size: 13px;
    }

/* Form fields & floating labels */
.form-grid {
    display: grid;
    gap: 18px;
}

.input-group {
    position: relative;
    margin-bottom: 0;
}

/* Base input style */
.form-control {
    width: 100%;
    height: 44px;
    padding: 14px 12px 6px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    transition: all .3s;
}

    .form-control:focus {
        border-color: #0891b2;
        box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
        transform: translateY(-1px);
        outline: none;
    }

/* Floating label base */
.floating-label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #888;
    background: #fff;
    padding: 0 4px;
    transition: all .3s;
    pointer-events: none;
    transform-origin: left top;
    font-size: 15px;
    z-index: 2;
}

/* Float on focus or content - FIXED: Always show label when focused or has content */
.input-group.focused .floating-label,
.input-group.has-content .floating-label,
.form-control:focus + .floating-label,
.form-control:not(:placeholder-shown) + .floating-label {
    transform: translateY(-22px) scale(.8);
    color: #0891b2;
    font-weight: 600;
    background: #fff;
    padding: 2px 6px;
}

/* FIXED: Ensure label stays visible during focus */
.form-control:focus + .floating-label {
    opacity: 1;
    visibility: visible;
}

/* Password toggle - FIXED positioning and visibility */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    background: rgba(255,255,255,0.95);
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all .3s ease;
    z-index: 10; /* FIXED: Higher z-index to ensure visibility */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

    .password-toggle:hover {
        background-color: rgba(8, 145, 178, 0.1);
        color: #0891b2;
        border-color: #0891b2;
        transform: translateY(-50%) scale(1.05);
    }

    .password-toggle:active {
        transform: translateY(-50%) scale(0.95);
    }

/* FIXED: Proper padding to ensure toggle button is always visible */
.password-group .form-control {
    padding-right: 60px; /* Increased padding to accommodate the button */
}

    .password-group .form-control:focus ~ .password-toggle {
        border-color: #0891b2;
        background: rgba(255,255,255,0.98);
    }

.submit-btn {
    width: 100%;
    height: 44px;
    margin-top: 16px;
    background: #0891b2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all .3s;
}

    .submit-btn:hover {
        transform: translateY(-1px);
    }

    .submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Action links */
.action-links {
    text-align: center;
    margin: 16px 0;
}

.link-group a {
    color: #0891b2;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 8px;
}

    .link-group a:hover {
        text-decoration: underline;
    }

.signup-prompt {
    font-size: 13px;
    color: #666;
}

    .signup-prompt a {
        color: #0891b2;
        font-weight: 600;
    }

        .signup-prompt a:hover {
            text-decoration: underline;
        }

/* reCAPTCHA notice */
.recaptcha-notice {
    font-size: 11px;
    color: #666;
    margin-top: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 16px 0;
    text-align: center;
    font-size: 11px;
    color: #666;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 99;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Validation states */
.form-control.valid {
    border-color: #10b981;
}

.form-control.invalid {
    border-color: #ef4444;
}

/* Responsive tweaks */
/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .form-container {
        max-width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .password-toggle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .password-group .form-control {
        padding-right: 50px;
    }

    .form-control {
        height: 42px;
        font-size: 14px;
    }

    .floating-label {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .form-container {
        max-width: 98%;
        padding: 16px;
        margin: 10px auto;
    }

    .page-title {
        font-size: 22px;
    }

    .info-box {
        padding: 10px;
        font-size: 12px;
    }

    .form-control {
        height: 40px;
        font-size: 13px;
        padding: 12px 10px 5px;
    }

    .floating-label {
        font-size: 13px;
        left: 10px;
    }

    .submit-btn {
        height: 42px;
        font-size: 15px;
    }

    .navbar-logo {
        height: 45px;
    }
}

@media (max-width: 360px) {
    .form-container {
        padding: 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .navbar-logo {
        height: 40px;
    }
}
/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .form-container {
        max-width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .password-toggle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .password-group .form-control {
        padding-right: 50px;
    }

    .form-control {
        height: 42px;
        font-size: 14px;
    }

    .floating-label {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .form-container {
        max-width: 98%;
        padding: 16px;
        margin: 10px auto;
    }

    .page-title {
        font-size: 22px;
    }

    .info-box {
        padding: 10px;
        font-size: 12px;
    }

    .form-control {
        height: 40px;
        font-size: 13px;
        padding: 12px 10px 5px;
    }

    .floating-label {
        font-size: 13px;
        left: 10px;
    }

    .submit-btn {
        height: 42px;
        font-size: 15px;
    }

    .navbar-logo {
        height: 45px;
    }
}

@media (max-width: 360px) {
    .form-container {
        padding: 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .navbar-logo {
        height: 40px;
    }
}
