/* ============================================================
   MAS FM — Login Page
   Split layout: dark branded left + clean form right
   ============================================================ */

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

body {
    margin: 0;
    padding: 0;
    background: #0f172a;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Main wrapper ─────────────────────────────────────────── */
#auth {
    display: flex;
    min-height: 100vh;
}

/* ── Left: branded panel ──────────────────────────────────── */
.auth-left {
    flex: 0 0 58%;
    background: linear-gradient(135deg, #1a0c0e 0%, #2d0a0f 40%, #1a0c0e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 3rem;
    animation: slideInLeft .6s ease both;
}

/* Decorative floating shapes */
.auth-left::before,
.auth-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .12;
}
.auth-left::before {
    width: 400px; height: 400px;
    background: #cc1f2d;
    top: -120px; left: -120px;
    animation: floatShape 8s ease-in-out infinite;
}
.auth-left::after {
    width: 280px; height: 280px;
    background: #f87171;
    bottom: -80px; right: -80px;
    animation: floatShape 10s ease-in-out infinite reverse;
}
.auth-shape-3 {
    position: absolute;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: #cc1f2d;
    opacity: .07;
    top: 50%; left: 70%;
    transform: translate(-50%, -50%);
    animation: floatShape 12s ease-in-out infinite 2s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(15px, -20px) scale(1.03); }
    66%  { transform: translate(-10px, 12px) scale(.97); }
}

.auth-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    animation: fadeInBrand .8s ease both .2s;
}
.auth-brand-logo {
    width: 180px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 24px rgba(99,102,241,.5));
}
.auth-brand h1 {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -.5px;
    margin: 0 0 .5rem;
    background: linear-gradient(135deg, #fff 0%, #fca5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-brand p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 320px;
    line-height: 1.7;
    margin: 0 auto;
}
.auth-brand-tagline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50px;
    padding: .4rem 1.2rem;
    font-size: .82rem;
    color: #fca5a5;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.auth-brand-tagline i { font-size: .8rem; }

/* ── Right: form panel ────────────────────────────────────── */
.auth-right {
    flex: 0 0 42%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    animation: slideInRight .6s ease both;
}

.auth-form-wrap {
    width: 100%;
    max-width: 380px;
}

.auth-form-logo {
    width: 130px;
    height: auto;
    display: block;
    margin: 0 auto 2rem;
}

.auth-form-wrap h3 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 .3rem;
    text-align: center;
}
.auth-form-wrap .auth-subtitle {
    color: #64748b;
    text-align: center;
    margin-bottom: 2rem;
    font-size: .95rem;
}

/* Form inputs */
.auth-form-wrap .form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    height: 52px;
    font-size: .95rem;
    background: #f8fafc;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    padding-top: 1.2rem;
}
.auth-form-wrap .form-control:focus {
    border-color: #cc1f2d;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(204,31,45,.12);
    outline: none;
}
.auth-form-wrap .form-control.is-invalid {
    border-color: #ef4444;
}
.auth-form-wrap .form-floating label {
    color: #94a3b8;
    font-size: .9rem;
}
.auth-form-wrap .form-floating > .form-control:focus ~ label,
.auth-form-wrap .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #cc1f2d;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    z-index: 5;
    font-size: 1.1rem;
    transition: color .2s ease;
    background: none;
    border: none;
    padding: 0;
}
.password-toggle:hover { color: #cc1f2d; }

/* Submit button */
.auth-submit-btn {
    display: block;
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #cc1f2d 0%, #e53548 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    transition: opacity .2s ease, transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(204,31,45,.35);
    margin-top: 1.5rem;
}
.auth-submit-btn:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(204,31,45,.45);
}
.auth-submit-btn:active { transform: scale(.97); }

/* Error messages */
.auth-error-block {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    padding: .75rem 1rem;
    font-size: .88rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Entrance Animations ──────────────────────────────────── */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInBrand {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    #auth {
        flex-direction: column;
    }
    .auth-left {
        flex: 0 0 auto;
        padding: 2.5rem 2rem;
        min-height: 220px;
        animation: none;
    }
    .auth-brand h1 { font-size: 2rem; }
    .auth-brand p { display: none; }
    .auth-brand-logo { width: 120px; margin-bottom: 1rem; }
    .auth-right {
        flex: 1;
        animation: none;
        padding: 2rem 1.5rem;
    }
}
@media (max-width: 480px) {
    .auth-left { padding: 1.5rem 1rem; min-height: 180px; }
    .auth-right { padding: 1.5rem 1rem; }
    .auth-form-wrap { max-width: 100%; }
}
