/* ══════════════════════════════
   RESET & BASE
══════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #060e1a;
}

/* ══════════════════════════════
   AUTH LAYOUT — SPLIT SCREEN
══════════════════════════════ */
.auth-layout {
    display: flex;
    height: 100vh;
}

/* ══════════════════════════════
   LEFT PANEL — Premium Green
══════════════════════════════ */
.left-panel {
    flex: 1.1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #022c22 0%, #064e3b 35%, #065f46 65%, #047857 100%);
}

/* Animated moving gradient overlay */
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 40%, rgba(16, 185, 129, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(5, 150, 105, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 10% 90%, rgba(0, 100, 80, 0.3) 0%, transparent 50%);
    animation: leftGlow 6s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes leftGlow {
    from {
        opacity: 0.7;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* ─── Diagonal Train Track Lines ─── */
.track-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.track-lines::before,
.track-lines::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 200%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(52, 211, 153, 0.08) 20%,
            rgba(52, 211, 153, 0.15) 50%,
            rgba(52, 211, 153, 0.08) 80%,
            transparent 100%);
    animation: trackFlow 4s linear infinite;
}

.track-lines::before {
    left: 25%;
    transform: rotate(15deg) translateY(-50%);
    animation-delay: 0s;
}

.track-lines::after {
    left: 65%;
    transform: rotate(15deg) translateY(-50%);
    animation-delay: 2s;
}

@keyframes trackFlow {
    from {
        transform: rotate(15deg) translateY(-50%);
    }

    to {
        transform: rotate(15deg) translateY(0%);
    }
}

/* ─── Floating Particles ─── */
.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
    animation: floatUp linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    bottom: -10px;
    width: 3px;
    height: 3px;
    animation-duration: 7s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    bottom: -10px;
    width: 5px;
    height: 5px;
    animation-duration: 9s;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    left: 35%;
    bottom: -10px;
    width: 3px;
    height: 3px;
    animation-duration: 8s;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    left: 50%;
    bottom: -10px;
    width: 4px;
    height: 4px;
    animation-duration: 6s;
    animation-delay: 0.5s;
}

.particle:nth-child(5) {
    left: 65%;
    bottom: -10px;
    width: 3px;
    height: 3px;
    animation-duration: 10s;
    animation-delay: 3s;
}

.particle:nth-child(6) {
    left: 80%;
    bottom: -10px;
    width: 5px;
    height: 5px;
    animation-duration: 7s;
    animation-delay: 1.5s;
}

.particle:nth-child(7) {
    left: 90%;
    bottom: -10px;
    width: 3px;
    height: 3px;
    animation-duration: 8s;
    animation-delay: 4s;
}

.particle:nth-child(8) {
    left: 40%;
    bottom: -10px;
    width: 2px;
    height: 2px;
    animation-duration: 11s;
    animation-delay: 2.5s;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-110vh) scale(0.5);
        opacity: 0;
    }
}

/* ─── Horizontal Speed Lines ─── */
.speed-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(52, 211, 153, 0.3) 40%, transparent 100%);
    animation: speedLine 3s linear infinite;
    z-index: 1;
}

.speed-line:nth-child(1) {
    top: 30%;
    animation-delay: 0s;
}

.speed-line:nth-child(2) {
    top: 55%;
    animation-delay: 1s;
    opacity: 0.7;
}

.speed-line:nth-child(3) {
    top: 75%;
    animation-delay: 2s;
    opacity: 0.5;
}

@keyframes speedLine {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

/* ─── Left Brand Content ─── */
.left-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px;
    text-align: center;
}

.brand-icon {
    font-size: 72px;
    filter: drop-shadow(0 8px 30px rgba(52, 211, 153, 0.5));
    animation: iconPulse 3s ease-in-out infinite;
    display: block;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 8px 30px rgba(52, 211, 153, 0.5));
    }

    50% {
        transform: translateY(-8px) scale(1.04);
        filter: drop-shadow(0 16px 40px rgba(52, 211, 153, 0.7));
    }
}

.brand-name {
    font-size: 38px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.2s;
}

.brand-tagline {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.4s;
}

/* Brand badge underneath */
.brand-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 7px 18px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.6s;
    margin-top: 8px;
}

.brand-badge i {
    color: #34d399;
}

/* Small glow ring around icon */
.icon-ring {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(52, 211, 153, 0.15);
    animation: ringPulse 3s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    pointer-events: none;
}

.icon-ring-2 {
    width: 240px;
    height: 240px;
    border-color: rgba(52, 211, 153, 0.08);
    animation-delay: 1s;
}

@keyframes ringPulse {

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

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

/* ══════════════════════════════
   RIGHT PANEL — Dark
══════════════════════════════ */
.right-panel {
    flex: 1;
    background: #070f1d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Right panel subtle glow */
.right-panel::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ══════════════════════════════
   AUTH CARD — Glassmorphism
══════════════════════════════ */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(13, 24, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 36px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    animation: cardSlideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.2s;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Tabs ─── */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.tab {
    flex: 1;
    padding: 9px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #4a6080;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
}

.tab.active {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ─── Form Heading ─── */
.form-heading {
    margin-bottom: 26px;
    animation: fadeUp 0.5s ease both;
}

.form-heading h2 {
    font-size: 22px;
    font-weight: 800;
    color: #f0f6ff;
    margin-bottom: 6px;
}

.form-heading p {
    font-size: 13px;
    color: #3d5470;
}

/* ─── Form Groups ─── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #3d5470;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14.5px;
    color: #111827;
    font-family: inherit;
    outline: none;
    transition: all 0.25s;
}

.form-group input:focus {
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 15px;
    transition: color 0.2s;
}

.toggle-pw:hover {
    color: #10b981;
}

/* ─── Submit Button ─── */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep on button */
.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    animation: btnShimmer 3s linear infinite;
}

@keyframes btnShimmer {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5);
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ─── Error & Success ─── */
.error-msg {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    animation: fadeUp 0.3s ease;
}

.success-msg {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    animation: fadeUp 0.3s ease;
}

/* ─── Shared keyframes ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}