/* ============================================
   NxtWise — Login Page Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #004AAD;
    --primary-light: #0066e6;
    --primary-glow: rgba(0, 74, 173, 0.4);
    --secondary: #0B1E3F;
    --accent: #00C2FF;
    --bg-dark: #060d1a;
    --bg-card: rgba(11, 30, 63, 0.55);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 74, 173, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Outfit', sans-serif;
}

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

html,
body {
    height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   SCROLLING BACKGROUND
   ============================================ */
.login-scrolling-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.03;
}

.login-scroll-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: loginScroll 20s linear infinite;
    position: absolute;
    left: 0;
}

.login-scroll-track span {
    font-family: var(--font);
    font-size: 5rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    padding: 0 40px;
    flex-shrink: 0;
    user-select: none;
    text-transform: uppercase;
}

.t1 {
    top: 5%;
    animation-duration: 24s;
}

.t2 {
    top: 20%;
    animation-duration: 30s;
    animation-direction: reverse;
}

.t3 {
    top: 38%;
    animation-duration: 22s;
}

.t4 {
    top: 55%;
    animation-duration: 28s;
    animation-direction: reverse;
}

.t5 {
    top: 72%;
    animation-duration: 26s;
}

.t6 {
    top: 88%;
    animation-duration: 32s;
    animation-direction: reverse;
}

@keyframes loginScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ============================================
   LOGIN WRAPPER / CARD
   ============================================ */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 48px 40px 36px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), #7c3aed);
}

.login-card::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    top: -80px;
    right: -80px;
    pointer-events: none;
}

/* Logo */
.login-logo {
    font-size: 2.2rem;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.login-subtitle {
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.login-divider {
    width: 100%;
    height: 1px;
    background: var(--border-glass);
    margin: 28px 0;
}

/* ============================================
   LOGIN FORM
   ============================================ */
.login-form {
    position: relative;
    z-index: 1;
}

.login-field {
    margin-bottom: 22px;
}

.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.login-input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.login-input-wrap input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.login-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-input-wrap input::placeholder {
    color: var(--text-muted);
}

.toggle-pw {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.toggle-pw:hover {
    color: var(--text-primary);
}

/* Options row */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.login-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.login-checkbox input:checked+.checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.login-checkbox input:checked+.checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Submit Button */
.login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 30px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--primary-glow);
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-btn.success {
    background: linear-gradient(135deg, #00c853, #00e676);
    box-shadow: 0 6px 30px rgba(0, 200, 83, 0.3);
}

/* Footer */
.login-footer {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.login-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.back-link {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    text-underline-offset: 3px;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px 28px;
    }

    .login-logo {
        font-size: 1.8rem;
    }

    .login-scroll-track span {
        font-size: 3rem;
        padding: 0 24px;
    }
}