﻿/* ----- RESET & GLOBAL STYLES ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: radial-gradient(circle at 10% 30%, #0b1120, #030712);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* overlay container */
.auth-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
}

/* card panel */
.xyro-card {
    max-width: 480px;
    width: 100%;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    padding: clamp(1.5rem, 5vw, 2rem);
    color: #f8fafc;
    position: relative;
    margin: auto;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

/* logo image */
.brand-logo {
    display: block;
    max-width: 160px;
    height: auto;
    margin: 0 auto 1.2rem auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* heading */
.login-heading {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #f0f0ff, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.login-sub {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 1.8rem;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

/* input groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    color: #f8fafc;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: clamp(0.85rem, 2vw, 1rem);
    letter-spacing: 0.2px;
    width: 100%
}

.input-icon-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0 0.75rem;
    transition: all 0.2s;
    width: 100%
}

    .input-icon-wrapper:focus-within {
        border-color: #a855f7;
        background: rgba(168, 85, 247, 0.08);
        box-shadow: 0 0 0 2px rgba(168,85,247,0.2);
    }

.input-icon {
    color: #94a3b8;
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Fixed input text color */
.auth-input, .select-field {
    flex: 1;
    background: transparent;
    border: none;
    padding: clamp(0.5rem, 2vw, 0.75rem) 0;
    color: #ffffff !important;
    outline: none;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 500;
    caret-color: #c084fc;
    width: 100%;
}
input {
    flex: 1;
    background: transparent;
    border: none;
    padding: clamp(0.5rem, 2vw, 0.75rem) 0;
    color: #ffffff !important;
    outline: none;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 500;
    caret-color: #c084fc;
    width: 100%;
}
select option {
    color: #000;
}
/* Target autofilled inputs */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active,
.select-field:-webkit-autofill,
.select-field:-webkit-autofill:hover,
.select-field:-webkit-autofill:focus,
.select-field:-webkit-autofill:active {
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 0px 1000px rgba(15, 23, 42, 0.95) !important;
    caret-color: #c084fc;
}

    .auth-input::placeholder, .select-field::placeholder {
        color: rgba(148, 163, 184, 0.7);
        font-weight: 400;
    }

/* Password toggle */
.toggle-pwd {
    color: #94a3b8;
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 1.2rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

    .toggle-pwd:hover {
        color: #c084fc;
    }

/* Forgot link */
.forgot-link {
    text-align: right;
    margin-bottom: 1.5rem;
}

    .forgot-link a {
        color: #a855f7;
        text-decoration: none;
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        font-weight: 500;
        transition: 0.2s;
    }

        .forgot-link a:hover {
            color: #d8b4fe;
            text-decoration: underline;
        }

/* Primary button */
.btn-primary-custom {
    width: 100%;
    padding: clamp(0.7rem, 2vh, 0.9rem);
    background: linear-gradient(90deg, #a855f7, #ec4899);
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

    .btn-primary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
        background: linear-gradient(90deg, #b45eff, #f657b0);
    }

    .btn-primary-custom:active {
        transform: translateY(1px);
    }

/* Divider */
.divider-text {
    text-align: center;
    color: #94a3b8;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    margin-bottom: 1rem;
    position: relative;
}

    .divider-text span {
        background: rgba(15, 23, 42, 0.9);
        padding: 0 0.7rem;
    }

/* Social buttons */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: clamp(0.6rem, 2vw, 0.75rem);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    transition: all 0.2s;
}

    .social-btn i {
        font-size: 1.2rem;
    }

    .social-btn:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(168, 85, 247, 0.5);
        color: #e2e8f0;
    }

/* Signup prompt */
.signup-prompt {
    text-align: center;
    color: #94a3b8;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.signup-link {
    color: #a855f7;
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.2rem;
    transition: 0.2s;
}

    .signup-link:hover {
        color: #d8b4fe;
        text-decoration: underline;
    }

/* Captcha row styling */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.captcha-img {
    height: 45px;
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: #0f172a;
}

.btn-theme {
    background: linear-gradient(90deg, #a855f7, #ec4899);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

    .btn-theme:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
    }

/* Remember row */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 10px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
}

    .check-label input {
        width: 16px;
        height: 16px;
        cursor: pointer;
        accent-color: #a855f7;
    }

/* Modal customization */
.modal-content {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid #a855f7;
    border-radius: 20px;
    color: #f8fafc;
}

.modal-header {
    border-bottom-color: rgba(168, 85, 247, 0.3);
}

.btn-primary {
    background: linear-gradient(90deg, #a855f7, #ec4899);
    border: none;
}

.validation-message {
    color: #f97316;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.modal {
    z-index: 99999;
}

@media (max-width: 480px) {
    .xyro-card {
        padding: 1.5rem;
    }

    .social-btn span {
        display: inline-block;
    }

    .captcha-row {
        flex-direction: column;
        align-items: stretch;
    }
}
