/* ==========================================================================
   MODERN LOGIN PAGE - "Hello Gorgeous" Split Card
   ========================================================================== */

:root {
    --login-purple: #a872e8;
    --login-purple-2: #8e5fd9;
    --login-teal: #5dd4d8;
    --login-teal-dark: #3fb8bc;
    --login-pink: #f3a8c8;
    --login-text: #2d3748;
    --login-muted: #9aa3b2;
    --login-input-bg: #f1f3f6;
    --login-cta: #5C008E;
    --login-cta-2: #d946ef;
    --login-fb: #3d0866;
    --login-fb-2: #1a0533;
    --login-white: #ffffff;
    --login-error: #dc3545;
}

/* ===== Page Wrapper - Aurora Mesh Background ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 18% 25%, rgba(217, 70, 239, 0.45) 0%, transparent 45%),
        radial-gradient(ellipse at 82% 78%, rgba(168, 85, 247, 0.40) 0%, transparent 50%),
        radial-gradient(ellipse at 55% 55%, rgba(118, 75, 162, 0.30) 0%, transparent 65%),
        linear-gradient(135deg, #1a0533 0%, #3d0866 35%, #5C008E 70%, #7b2fb8 100%);
    background-attachment: fixed;
}

/* Floating glow orb - top left */
.login-wrapper::before {
    content: '';
    position: absolute;
    top: -180px;
    left: -160px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.55) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    animation: floatA 14s ease-in-out infinite;
    pointer-events: none;
}

/* Floating glow orb - bottom right */
.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -180px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 47, 184, 0.65) 0%, transparent 70%);
    filter: blur(70px);
    z-index: 0;
    animation: floatB 18s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(60px, 80px) scale(1.1); }
}

@keyframes floatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-80px, -60px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .login-wrapper::before,
    .login-wrapper::after { animation: none; }
}

/* ===== Main Card ===== */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 920px;
    min-height: 540px;
    background: var(--login-white);
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 20px 50px rgba(92, 0, 142, 0.35),
        0 40px 90px rgba(26, 5, 51, 0.45);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

/* ===== Left Side - Hero ===== */
.login-header {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    color: var(--login-white);
    overflow: hidden;
    background: var(--login-teal);
}

.login-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    mix-blend-mode: multiply;
    opacity: 0.95;
}

.login-hero-video {
    mix-blend-mode: normal;
    opacity: 1;
}

.login-header::before {
    display: none;
}

.login-logo {
    display: none; /* logo moved to right panel */
}

.login-hero-text {
    position: relative;
    z-index: 2;
    padding: 0 40px 70px;
}

.login-title {
    color: var(--login-white);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
    margin: 0;
    text-align: left;
    text-transform: uppercase;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
    max-width: 100%;
}

.login-subtitle {
    display: inline-block;
    color: var(--login-white);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    margin: 8px 0 0;
    text-align: left;
    max-width: none;
    text-transform: uppercase;
    opacity: 0.9;
}

.login-social {
    display: none; /* not used in this design */
}

/* ===== Right Side - Form ===== */
.login-body {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--login-white);
    position: relative;
}

/* Decorative shapes (small circles + plus signs) */
.login-body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--login-teal);
    opacity: 0.45;
}

.login-body::after {
    content: '';
    position: absolute;
    top: 58%;
    left: 22px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--login-pink);
    opacity: 0.6;
}

.login-deco-plus {
    position: absolute;
    color: var(--login-pink);
    font-weight: 700;
    font-size: 16px;
    z-index: 0;
    opacity: 0.7;
}

.login-deco-plus.p1 { right: 38px; top: 58%; }
.login-deco-plus.p2 { right: 22px; top: 64%; color: var(--login-teal); font-size: 13px; }
.login-deco-plus.p3 { right: 30px; top: 70%; color: var(--login-pink); font-size: 12px; }

.login-mini-logo {
    width: auto;
    height: 64px;
    max-width: 180px;
    object-fit: contain;
    margin: 0 0 22px;
    display: block;
}

.login-body-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--login-text);
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.login-body-subtitle {
    font-size: 13px;
    color: var(--login-muted);
    margin: 0 0 26px;
    line-height: 1.5;
}

.login-body-subtitle a {
    color: var(--login-text);
    font-weight: 700;
    text-decoration: underline;
}

.login-body-subtitle a:hover {
    color: var(--login-purple-2);
}

/* Form */
.login-form-group {
    position: relative;
    margin-bottom: 14px;
}

.login-form-label {
    display: none; /* placeholder is enough */
}

.login-form-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    color: var(--login-text);
    background: var(--login-input-bg);
    transition: background 0.25s ease, box-shadow 0.25s ease;
    font-family: inherit;
    box-shadow: none;
}

.login-form-input:focus {
    outline: none;
    background: #e9ecf1;
    box-shadow: 0 0 0 2px rgba(168, 114, 232, 0.25);
}

.login-form-input::placeholder {
    color: #b0b8c2;
}

/* Input icon */
.login-form-group::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.55;
    pointer-events: none;
}

.login-form-group.icon-phone::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z'/></svg>");
}

.login-form-group.icon-lock::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
}

.login-form-group.icon-user::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>");
}

.login-form-group.icon-mail::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/><polyline points='22,6 12,13 2,6'/></svg>");
}

/* Row: Remember + Forgot */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 22px;
    flex-wrap: wrap;
    gap: 10px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--login-muted);
    cursor: pointer;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.login-remember input[type="checkbox"]::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #cfd5dd;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.login-remember input[type="checkbox"]:checked::before {
    background: transparent;
}

.login-remember input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: -1px;
    width: 5px;
    height: 11px;
    border: solid var(--login-text);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-forgot-link {
    font-size: 13px;
    color: var(--login-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.login-forgot-link:hover {
    color: var(--login-purple-2);
}

/* Error */
.login-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 16px;
}

.login-error-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--login-error);
}

.login-error-text {
    font-size: 13px;
    color: var(--login-error);
    margin: 0;
    line-height: 1.4;
}

/* Big Green Button */
.login-btn-row {
    display: block;
    margin-top: 8px;
}

.login-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--login-cta) 0%, var(--login-cta-2) 100%);
    color: var(--login-white);
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow:
        0 10px 22px rgba(92, 0, 142, 0.40),
        0 4px 10px rgba(217, 70, 239, 0.25);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(92, 0, 142, 0.50),
        0 6px 14px rgba(217, 70, 239, 0.35);
}

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

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 22px 0 16px;
    color: var(--login-muted);
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e3e7ec;
    margin: 0 12px;
}

/* Secondary (Outline) Button */
.login-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    background: transparent;
    color: var(--login-cta);
    border: 2px solid var(--login-cta);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.login-btn-secondary:hover {
    background: linear-gradient(135deg, var(--login-fb) 0%, var(--login-cta) 100%);
    color: var(--login-white);
    border-color: var(--login-fb);
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(61, 8, 102, 0.35);
    transform: translateY(-2px);
}

.login-btn-secondary i {
    font-size: 16px;
}

/* Hide old footer (we use top subtitle instead) */
.login-footer {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        max-width: 460px;
        min-height: 0;
    }

    .login-header {
        min-height: 280px;
    }

    .login-hero-text {
        padding: 0 30px 50px;
    }

    .login-body {
        padding: 40px 30px;
    }

    .login-body-title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 0;
    }

    .login-container {
        border-radius: 0;
        min-height: 100vh;
    }

    .login-header {
        min-height: 230px;
    }

    .login-hero-text {
        padding: 0 22px 50px;
    }

    .login-body {
        padding: 30px 22px;
    }

    .login-body-title {
        font-size: 22px;
    }
}

/* Hide old layout chrome on this page */
body.modern-login .hero { display: none; }
body.modern-login .content { padding: 0; }
body.modern-login .footer { display: none; }
