/*
 * =========================================================
 * NUKID - Modern Login Styles (Dark Split Screen)
 * Based on user reference - Premium UI design
 * =========================================================
 */

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

/* CSS Variables - NUKID Brand Colors */
:root {
    /* Primary Brand Colors */
    --primary: #194F82;
    --primary-light: #2a6aa8;
    --primary-dark: #133d66;
    --accent: #56ACE0;
    --accent-light: #7bc4eb;
    --accent-glow: rgba(86, 172, 224, 0.3);

    /* Dark Theme Colors */
    --bg-dark: #0d1b2a;
    --bg-card: #1b2838;
    --bg-card-light: #243447;
    --bg-input: #0d1b2a;

    /* Borders */
    --border-color: rgba(86, 172, 224, 0.15);
    --border-hover: rgba(86, 172, 224, 0.3);

    /* Text */
    --text-white: #ffffff;
    --text-light: #e0e6ed;
    --text-muted: #8899a6;
    --text-accent: var(--accent);

    /* Gradient */
    --gradient-accent: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);

    /* Sizing - Bigger Components */
    --font-xs: 13px;
    --font-sm: 14px;
    --font-base: 15px;
    --font-md: 16px;
    --font-lg: 18px;
    --font-xl: 24px;
    --font-2xl: 32px;

    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 18px;
    --spacing-lg: 24px;
    --spacing-xl: 36px;
    --spacing-2xl: 50px;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body.modern-login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--font-base);
    line-height: 1.5;
    color: var(--text-light);
    background: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   MAIN LAYOUT
   ========================================== */

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--spacing-xl);
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

/* ==========================================
   ANIMATED BACKGROUND OBJECTS
   ========================================== */

.bg-objects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-object {
    position: absolute;
    opacity: 0.08;
    color: var(--accent);
    font-size: 32px;
    animation: floatObject 20s ease-in-out infinite;
}

.bg-object:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.bg-object:nth-child(2) {
    top: 20%;
    right: 8%;
    animation-duration: 22s;
    animation-delay: -3s;
}

.bg-object:nth-child(3) {
    bottom: 30%;
    left: 10%;
    animation-duration: 25s;
    animation-delay: -7s;
}

.bg-object:nth-child(4) {
    top: 60%;
    right: 15%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.bg-object:nth-child(5) {
    bottom: 15%;
    left: 25%;
    animation-duration: 23s;
    animation-delay: -10s;
}

.bg-object:nth-child(6) {
    top: 35%;
    left: 3%;
    animation-duration: 19s;
    animation-delay: -2s;
}

.bg-object:nth-child(7) {
    bottom: 10%;
    right: 5%;
    animation-duration: 21s;
    animation-delay: -8s;
}

.bg-object:nth-child(8) {
    top: 5%;
    right: 25%;
    animation-duration: 24s;
    animation-delay: -12s;
}

@keyframes floatObject {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(15px, -20px) rotate(5deg) scale(1.05);
    }

    50% {
        transform: translate(-10px, 15px) rotate(-3deg) scale(0.95);
    }

    75% {
        transform: translate(20px, 10px) rotate(8deg) scale(1.02);
    }
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px var(--border-color);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ==========================================
   LEFT CARD - BRANDING
   ========================================== */

.branding-card {
    flex: 1.1;
    background: var(--bg-card-light);
    border-right: 1px solid var(--border-color);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.brand-logo img {
    height: 48px;
    width: auto;
}

.brand-logo-text {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--text-white);
    font-style: italic;
}

/* Tagline */
.brand-tagline {
    font-size: var(--font-xs);
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xl);
}

/* Headline */
.brand-headline {
    font-size: var(--font-xl);
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: var(--spacing-md);
}

.brand-headline .highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Description */
.brand-description {
    font-size: var(--font-sm);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
}

.brand-description strong {
    color: var(--text-light);
}

/* Feature Badges */
.brand-features {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: auto;
}

.feature-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--text-white);
}

.feature-label {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   RIGHT SECTION - FORM (No card - floating style)
   ========================================== */

.form-section {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-lg);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.form-header h2 {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--spacing-xs);
}

.form-header p {
    font-size: var(--font-sm);
    color: var(--text-muted);
    margin: 0;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Form Group */
.form-group label {
    display: block;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: var(--font-lg);
    z-index: 1;
    transition: color 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-family: inherit;
    font-size: var(--font-base);
    color: var(--text-white);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-size: var(--font-sm);
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper input:focus~.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--accent);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: var(--font-lg);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--accent);
}

/* Autofill Override */
.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover,
.input-wrapper input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
    -webkit-text-fill-color: var(--text-white) !important;
    caret-color: var(--text-white);
}

/* Remember Me */
.remember-group {
    display: flex;
    align-items: center;
}

.custom-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: var(--font-sm);
    color: var(--text-muted);
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-checkbox:hover .checkmark {
    border-color: var(--accent);
}

.custom-checkbox input:checked~.checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkmark::after {
    content: '';
    display: none;
    width: 4px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 1px;
}

.custom-checkbox input:checked~.checkmark::after {
    display: block;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px 20px;
    font-family: inherit;
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--text-white);
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.login-btn i {
    font-size: var(--font-lg);
}

.login-btn::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;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 172, 224, 0.3);
}

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

.login-btn:active {
    transform: translateY(0);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.login-footer p {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin: 0;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--accent-light);
}

/* ==========================================
   PRELOADER (Page Load)
   ========================================== */

.modern-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modern-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   PROCESS LOADER (Modern - Gradient Ring with Glow)
   ========================================== */

.process-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.process-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loader Container */
.process-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Modern Gradient Ring Loader */
.loader-modern {
    position: relative;
    width: 64px;
    height: 64px;
}

/* Outer Rotating Ring */
.loader-modern .ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: ringRotate 1.5s linear infinite;
}

.loader-modern .ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            var(--accent) 60deg,
            var(--primary-light) 120deg,
            var(--primary) 180deg,
            transparent 360deg);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    padding: 3px;
}

/* Inner Glow Pulse */
.loader-modern .glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation: glowPulse 1.5s ease-in-out infinite;
}

/* Center Dot */
.loader-modern .center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 10px var(--accent),
        0 0 20px rgba(86, 172, 224, 0.5),
        0 0 30px rgba(86, 172, 224, 0.3);
    animation: centerPulse 1.5s ease-in-out infinite;
}

/* Orbiting Dots */
.loader-modern .orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: ringRotate 2s linear infinite reverse;
}

.loader-modern .orbit::before,
.loader-modern .orbit::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 6px var(--primary-light);
}

.loader-modern .orbit::before {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.loader-modern .orbit::after {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

@keyframes ringRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes centerPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 10px var(--accent),
            0 0 20px rgba(86, 172, 224, 0.5),
            0 0 30px rgba(86, 172, 224, 0.3);
    }

    50% {
        transform: translate(-50%, -50%) scale(0.85);
        box-shadow:
            0 0 15px var(--accent),
            0 0 30px rgba(86, 172, 224, 0.6),
            0 0 45px rgba(86, 172, 224, 0.4);
    }
}

/* Loader Text */
.loader-text {
    font-size: var(--font-base);
    font-weight: 500;
    color: var(--text-white);
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes textFade {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */

@media (max-width: 900px) {
    .login-container {
        max-width: 700px;
    }

    .branding-card {
        padding: var(--spacing-lg);
    }

    .brand-headline {
        font-size: var(--font-lg);
    }

    .brand-features {
        gap: var(--spacing-md);
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (Stack)
   ========================================== */

@media (max-width: 768px) {
    .login-wrapper {
        padding: var(--spacing-md);
        align-items: flex-start;
        padding-top: var(--spacing-xl);
    }

    .login-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .branding-card {
        padding: var(--spacing-lg);
    }

    .brand-logo img {
        height: 28px;
    }

    .brand-logo-text {
        font-size: var(--font-md);
    }

    .brand-tagline {
        margin-bottom: var(--spacing-md);
    }

    .brand-headline {
        font-size: var(--font-lg);
        margin-bottom: var(--spacing-sm);
    }

    .brand-description {
        display: none;
    }

    .brand-features {
        margin-top: var(--spacing-md);
    }

    .feature-icon {
        width: 32px;
        height: 32px;
        font-size: var(--font-sm);
    }

    .form-section {
        padding: var(--spacing-lg);
    }

    .form-header {
        margin-bottom: var(--spacing-lg);
    }

    .form-header h2 {
        font-size: var(--font-lg);
    }
}

/* ==========================================
   RESPONSIVE - SMALL MOBILE
   ========================================== */

@media (max-width: 480px) {
    .login-wrapper {
        padding: var(--spacing-sm);
        padding-top: var(--spacing-lg);
    }

    .branding-card,
    .form-section {
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
    }

    .brand-features {
        gap: var(--spacing-sm);
    }

    .feature-icon {
        width: 28px;
        height: 28px;
        font-size: var(--font-xs);
    }

    .feature-label {
        font-size: 9px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.login-btn:focus-visible,
.password-toggle:focus-visible,
.custom-checkbox input:focus-visible~.checkmark {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .login-btn::before {
        display: none;
    }

    .loader-spinner {
        animation: none;
        border-color: var(--accent);
    }
}