/* ======================================================
   BRAND VARIABLES (CHEAPDATASHOP PURPLE + WHITE)
====================================================== */

:root {
    --primary-purple: #6c2bd9;
    --primary-purple-dark: #5b21b6;
    --primary-purple-light: #ede9fe;
    --white: #ffffff;
    --gray-light: #f9fafb;
    --gray-border: #e5e7eb;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --success: #10b981;
    --danger: #ef4444;
}

/* ======================================================
   GLOBAL RESET
====================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);   /* ✅ WHITE BACKGROUND */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======================================================
   LOGIN WRAPPER
====================================================== */

.login-wrapper {
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======================================================
   LOGIN CARD
====================================================== */

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 18px;
    padding: 45px 35px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* ======================================================
   HEADER
====================================================== */

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-purple-dark);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ======================================================
   INPUT GROUP
====================================================== */

.input-group-modern {
    position: relative;
    margin-bottom: 18px;
}

.input-group-modern input {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: 1px solid var(--gray-border);
    padding: 0 15px 0 45px;
    font-size: 14px;
    background: var(--gray-light);
    transition: all 0.3s ease;
}

.input-group-modern input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(108,43,217,0.15);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-purple);
    font-size: 16px;
}

/* Password Toggle */

.password-group .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--primary-purple);
    transition: opacity 0.3s ease;
}

.password-group .toggle-password:hover {
    opacity: 0.7;
}

/* ======================================================
   FORM OPTIONS
====================================================== */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 22px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dark);
}

.remember-me input {
    accent-color: var(--primary-purple);
}

.form-options a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
}

.form-options a:hover {
    text-decoration: underline;
}

/* ======================================================
   LOGIN BUTTON
====================================================== */

.btn-login {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(108,43,217,0.35);
}

/* ======================================================
   BOTTOM LINKS
====================================================== */

.bottom-links {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.bottom-links p {
    margin-bottom: 8px;
}

.bottom-links a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
}

.bottom-links a:hover {
    text-decoration: underline;
}

/* ======================================================
   LOGIN LOADER
====================================================== */

.login-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7); /* lighter overlay for white bg */
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 9999;
}

.login-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-loader-box {
    background: var(--white);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--gray-border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.login-loader-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #ede9fe;
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.login-loader-box p {
    font-weight: 500;
    color: var(--primary-purple-dark);
}

/* ======================================================
   TOAST SYSTEM
====================================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-item {
    min-width: 280px;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-item.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #f0fdf4;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.toast-error {
    background: #fef2f2;
    color: #7f1d1d;
    border-left: 4px solid var(--danger);
}

.toast-icon {
    font-size: 18px;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}

/* GOOGLE BUTTON */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-google:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* DIVIDER */
.divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.divider span {
    background: #fff;
    padding: 0 10px;
    color: #888;
    font-size: 13px;
}

.divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
    z-index: -1;
}

.security-alert {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attempt-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    color: #d97706;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ======================================================
   PREMIUM AUTH HEADER (SaaS Level)
====================================================== */

.login-header {
    text-align: center;
    margin-bottom: 38px;
    position: relative;
    overflow: hidden;
}

/* Background animated glow */
.header-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(108,43,217,0.18), transparent 70%);
    border-radius: 50%;
    animation: floatGlow 6s ease-in-out infinite;
    z-index: 0;
}

/* Secure badge */
.brand-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
    background: rgba(108,43,217,0.08);
    color: var(--primary-purple-dark);
    margin-bottom: 18px;
    animation: fadeUp 0.7s ease forwards;
}

/* Title */
.login-title {
    position: relative;
    z-index: 2;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.9s ease forwards;
}

/* Subtitle */
.login-subtitle {
    position: relative;
    z-index: 2;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
    animation: fadeUp 1.1s ease forwards;
}

/* Brand highlight */
.brand-highlight {
    font-weight: 600;
    color: var(--primary-purple);
    position: relative;
}

.brand-highlight::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple-light), transparent);
    border-radius: 4px;
}

/* Animations */
@keyframes floatGlow {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
    100% { transform: translateX(-50%) translateY(0); }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================================
   PREMIUM GOOGLE BUTTON (ANIMATED)
====================================================== */

.btn-google {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--gray-border);
    background: #ffffff;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}

/* Hover Lift */
.btn-google:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(108, 43, 217, 0.15);
    border-color: var(--primary-purple-light);
}

/* Active Click */
.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(108, 43, 217, 0.1);
}

/* Google Icon */
.btn-google img {
    width: 20px;
    transition: transform 0.35s ease;
}

/* Icon slide animation */
.btn-google:hover img {
    transform: translateX(3px) scale(1.05);
}

/* Subtle Shine Effect */
.btn-google::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0.0) 0%,
        rgba(255,255,255,0.6) 50%,
        rgba(255,255,255,0.0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.6s;
}

.btn-google:hover::before {
    left: 130%;
}

/* Purple Glow Edge */
.btn-google::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: 0.3s ease;
}

.btn-google:hover::after {
    border-color: rgba(108,43,217,0.25);
}