/* =========================================================
   MIMIC — Login Page Styles
   Split-screen immersive design
   ========================================================= */

/* === Split Layout === */
.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: var(--bg);
}

/* === Left Panel — Brand === */
.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(108,99,166,0.10) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(108,99,166,0.06) 0%, transparent 50%),
        linear-gradient(160deg, #0d1018 0%, #11141F 40%, #141825 100%);
    border-right: 1px solid rgba(108, 99, 166, 0.1);
}

/* Particles live inside the brand panel */
.login-brand #tsparticles {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 56px;
    max-width: 380px;
    animation: brandFadeIn 0.8s ease-out both;
}

@keyframes brandFadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Large Logo */
.login-logo {
    height: 280px;
    width: auto;
    filter: drop-shadow(0 0 40px rgba(108,99,166,0.25));
    transition: filter 0.4s ease;
}

.login-logo:hover {
    filter: drop-shadow(0 0 60px rgba(108,99,166,0.4));
}

/* Feature highlights */
.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(108, 99, 166, 0.08);
    transition: all 0.3s ease;
}

.login-feature:hover {
    background: rgba(108, 99, 166, 0.06);
    border-color: rgba(108, 99, 166, 0.18);
    transform: translateX(4px);
}

.login-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(108, 99, 166, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #58E75F;
    flex-shrink: 0;
}

.login-feature-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.login-feature-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.login-brand-footer {
    position: absolute;
    bottom: 24px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.03em;
    z-index: 1;
}

/* === Right Panel — Form === */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    background: var(--bg-secondary);
}

/* Ambient purple glow on the form side */
.login-form-panel::before {
    content: '';
    position: absolute;
    top: 30%;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(108,99,166,0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: formGlow 5s ease-in-out infinite alternate;
}

@keyframes formGlow {
    0%   { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 1;   transform: scale(1.2); }
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
    animation: formSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Greeting */
.login-greeting {
    margin-bottom: 40px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Error */
.login-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--danger);
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Fields */
.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-field label i {
    font-size: 15px;
    color: var(--text-muted);
}

.login-field input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.login-field input::placeholder {
    color: var(--text-dim);
}

.login-field input:hover {
    border-color: rgba(108, 99, 166, 0.3);
}

.login-field input:focus {
    border-color: rgba(108, 99, 166, 0.6);
    box-shadow: 0 0 0 3px rgba(108, 99, 166, 0.08), 0 0 20px rgba(108, 99, 166, 0.05);
    background: rgba(17, 20, 31, 0.8);
}

/* Password wrapper with eye toggle */
.login-password-wrap {
    position: relative;
}

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

.login-eye {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.login-eye:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

/* Submit Button */
.login-btn {
    width: 100%;
    padding: 14px 24px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #58E75F 0%, #45c44b 100%);
    color: #0a1a0b;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(88, 231, 95, 0.2);
}

.login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(88, 231, 95, 0.3), 0 0 50px rgba(88, 231, 95, 0.08);
}

.login-btn:hover::before {
    opacity: 1;
}

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

.login-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(4px);
}

/* Footer */
.login-form-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

.login-form-footer span {
    color: var(--text-muted);
    font-weight: 600;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .login-split {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        background:
            radial-gradient(ellipse at 50% 20%, rgba(108,99,166,0.06) 0%, transparent 60%),
            var(--bg);
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 24px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-form-wrapper {
        max-width: 100%;
    }
}
