/**
 * Lupad Music Guild — Auth Page Styles
 * /mg-login page: Login tab, Signup tab, OTP verification screen.
 *
 * Depends on: lupad-global.css (CSS variables + base resets)
 */

/* ── Page Layout ─────────────────────────────────────────────────── */

.lupad-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* Left panel — branding / hero */
.lupad-auth__left {
    display: none;
    width: 45%;
    position: relative;
    background: var(--lupad-gradient-hero);
    overflow: hidden;
    flex-shrink: 0;
}

.lupad-auth__left-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px;
}

.lupad-auth__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0.12;
    z-index: 1;
}

.lupad-auth__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.lupad-auth__logo-name {
    color: var(--lupad-gold);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
}

.lupad-auth__logo-sub {
    color: rgba(255,255,255,0.6);
    font-size: 9px;
    letter-spacing: 4px;
    margin-top: 3px;
    display: block;
}

.lupad-auth__tagline h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px;
    color: var(--lupad-white);
}

.lupad-auth__tagline p {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin: 0;
    line-height: 1.7;
}

.lupad-auth__tagline-gold { color: var(--lupad-gold); }

/*
 * COLOR BLOCK PLACEHOLDER
 * Replace background with actual image in Phase 5:
 *   background-image: url('IMAGE_URL_HERE');
 *   background-size: cover;
 *   background-position: center;
 */
.lupad-auth__color-block {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0D0B1E 0%, #2D1A6B 40%, #1A4A2E 100%);
    z-index: 0;
}

/* ── Right panel ─────────────────────────────────────────────────── */

.lupad-auth__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lupad-white);
    padding: 40px 24px;
    overflow-y: auto;
}

.lupad-auth__box {
    width: 100%;
    max-width: 440px;
}

.lupad-auth__mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
}

.lupad-auth__mobile-logo-name {
    color: var(--lupad-gold);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
}

.lupad-auth__mobile-logo-sub {
    color: var(--lupad-gray-500);
    font-size: 8px;
    letter-spacing: 3px;
    display: block;
}

/* ── Tabs ────────────────────────────────────────────────────────── */

.lupad-auth__tabs {
    display: flex;
    border-bottom: 2px solid var(--lupad-gray-200);
    margin-bottom: 32px;
}

.lupad-auth__tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: var(--lupad-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--lupad-gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lupad-auth__tab:hover { color: var(--lupad-purple); }

.lupad-auth__tab.is-active {
    color: var(--lupad-purple);
    border-bottom-color: var(--lupad-purple);
}

.lupad-auth__panel { display: none; }
.lupad-auth__panel.is-active { display: block; }

/* ── Headings ────────────────────────────────────────────────────── */

.lupad-auth__heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--lupad-gray-900);
    margin: 0 0 6px;
    line-height: 1.3;
}

.lupad-auth__sub {
    font-size: 14px;
    color: var(--lupad-gray-500);
    margin: 0 0 24px;
}

/* ── Two-col row ─────────────────────────────────────────────────── */

.lupad-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Password ────────────────────────────────────────────────────── */

.lupad-password-wrap { position: relative; }

.lupad-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--lupad-gray-500);
    padding: 0;
    display: flex;
    align-items: center;
}
.lupad-password-toggle:hover { color: var(--lupad-purple); }

.lupad-strength-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--lupad-gray-200);
    margin-top: 6px;
    overflow: hidden;
}
.lupad-strength-bar__fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 0.3s, background 0.3s;
}
.lupad-strength-bar__fill.s1 { width: 25%; background: #E84C4C; }
.lupad-strength-bar__fill.s2 { width: 50%; background: #F5A623; }
.lupad-strength-bar__fill.s3 { width: 75%; background: #C9A84C; }
.lupad-strength-bar__fill.s4 { width: 100%; background: #2DB87A; }

.lupad-strength-label {
    font-size: 11px;
    color: var(--lupad-gray-500);
    margin-top: 4px;
    min-height: 16px;
}

/* ── Photo upload ────────────────────────────────────────────────── */

.lupad-photo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1.5px dashed var(--lupad-gray-300);
    border-radius: var(--lupad-radius);
    cursor: pointer;
    transition: border-color 0.2s;
}
.lupad-photo-upload:hover { border-color: var(--lupad-purple); }

.lupad-photo-upload__preview {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--lupad-gray-200);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lupad-gray-500);
}
.lupad-photo-upload__preview img { width: 100%; height: 100%; object-fit: cover; }

.lupad-photo-upload__text { font-size: 13px; color: var(--lupad-gray-700); }
.lupad-photo-upload__text strong {
    display: block;
    color: var(--lupad-purple);
    margin-bottom: 2px;
}

/* ── Form actions ────────────────────────────────────────────────── */

.lupad-auth__actions { margin-top: 8px; }

.lupad-auth__switch {
    text-align: center;
    font-size: 13px;
    color: var(--lupad-gray-500);
    margin-top: 20px;
}
.lupad-auth__switch a,
.lupad-auth__switch button {
    color: var(--lupad-purple);
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}
.lupad-auth__switch a:hover,
.lupad-auth__switch button:hover { text-decoration: underline; }

.lupad-auth__forgot {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--lupad-gray-500);
    text-decoration: none;
    margin-top: -8px;
    margin-bottom: 16px;
}
.lupad-auth__forgot:hover { color: var(--lupad-purple); }

/* ── OTP Screen ──────────────────────────────────────────────────── */

.lupad-otp-screen { text-align: center; }

.lupad-otp-screen__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--lupad-purple), var(--lupad-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.lupad-otp-screen__heading {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--lupad-gray-900);
}

.lupad-otp-screen__sub {
    font-size: 14px;
    color: var(--lupad-gray-500);
    margin: 0 0 32px;
    line-height: 1.6;
}

.lupad-otp-screen__email {
    font-weight: 600;
    color: var(--lupad-gray-700);
}

/* OTP digit boxes */
.lupad-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.lupad-otp-inputs input {
    width: 52px;
    height: 60px;
    border: 2px solid var(--lupad-gray-300);
    border-radius: var(--lupad-radius);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--lupad-gray-900);
    font-family: monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -moz-appearance: textfield;
    background: var(--lupad-white);
}

.lupad-otp-inputs input::-webkit-outer-spin-button,
.lupad-otp-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lupad-otp-inputs input:focus {
    border-color: var(--lupad-purple);
    box-shadow: 0 0 0 3px rgba(75,45,143,0.12);
}

.lupad-otp-inputs input.is-filled {
    border-color: var(--lupad-purple);
    background: rgba(75,45,143,0.04);
}

.lupad-otp-inputs input.is-error {
    border-color: #E84C4C;
    animation: lupad-shake 0.4s ease;
}

@keyframes lupad-shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

.lupad-otp-screen__timer {
    font-size: 13px;
    color: var(--lupad-gray-500);
    margin-bottom: 16px;
}
.lupad-otp-screen__timer span {
    font-weight: 700;
    color: var(--lupad-purple);
    font-variant-numeric: tabular-nums;
}

.lupad-otp-screen__resend { font-size: 13px; color: var(--lupad-gray-500); }
.lupad-otp-screen__resend button {
    background: none;
    border: none;
    color: var(--lupad-purple);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}
.lupad-otp-screen__resend button:hover { text-decoration: underline; }
.lupad-otp-screen__resend button:disabled {
    color: var(--lupad-gray-300);
    cursor: default;
    text-decoration: none;
}

.lupad-otp-screen__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--lupad-gray-500);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    margin-top: 16px;
}
.lupad-otp-screen__back:hover { color: var(--lupad-gray-700); }

/* ── Notice ──────────────────────────────────────────────────────── */

.lupad-auth__notice { display: none; }
.lupad-auth__notice.is-visible { display: block; }

/* ── Button loading state ────────────────────────────────────────── */

.lupad-btn.is-loading { pointer-events: none; opacity: 0.8; }

/* ── Responsive ──────────────────────────────────────────────────── */

@media (min-width: 900px) {
    .lupad-auth__left { display: flex; flex-direction: column; }
    .lupad-auth__mobile-logo { display: none; }
    .lupad-auth__right { padding: 60px 40px; }
}

@media (max-width: 480px) {
    .lupad-field-row { grid-template-columns: 1fr; }
    .lupad-otp-inputs input { width: 44px; height: 52px; font-size: 20px; }
}
