/* DivineEpic Auth — dashboard-preview edition */
:root {
    --auth-brand: #6D4AEE;
    --auth-brand-dark: #5B3BD6;
    --auth-ink: #101828;
    --auth-muted: #667085;
    --auth-line: #E4E7EC;
    --auth-bg: #EDEFF2;
    --auth-radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #EDEFF2;
    color: var(--auth-ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }
.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Frame: big rounded white sheet on soft gray ───────────────────────── */
.auth-frame {
    display: flex;
    min-height: calc(100vh - 48px);
    margin: 24px;
    background: #fff;
    border: 1px solid #E7EAF0;
    border-radius: 26px;
    box-shadow: 0 30px 70px -46px rgba(16, 24, 40, .28);
    overflow: hidden;
    animation: authIn .5s cubic-bezier(.16, 1, .3, 1) both;
}
.auth-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(430px, 1.02fr) 1fr;
    min-height: 0;
}

/* ── Form column ───────────────────────────────────────────────────────── */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    padding: clamp(26px, 2.8vw, 44px) clamp(26px, 3.2vw, 52px);
    min-height: 0;
}
.auth-panel-lockup { display: flex; align-items: center; }
.auth-form-wrap {
    width: 100%;
    max-width: 396px;
    margin: auto 0;
    padding: 40px 0;
}
.auth-form-wrap--wide { max-width: 480px; }
.auth-social { margin-top: 16px; text-align: center; }
.auth-social-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #A79FBE;
    margin: 0 0 10px;
}
.auth-social-row { display: flex; justify-content: center; gap: 10px; }
.auth-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E7E2F4;
    background: #FAF9FD;
    color: #6B5C95;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.auth-social-btn:hover { background: #5B4AF0; border-color: #5B4AF0; color: #fff; transform: translateY(-2px); }
.auth-social-btn svg { width: 16px; height: 16px; }

.auth-brand-lockup,
.auth-center-brand { display: flex; align-items: center; gap: 12px; }

.auth-logo-tile {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    background: #fff;
    border: 1px solid #E7EBF4;
    box-shadow: 0 8px 18px -10px rgba(16, 24, 40, .25);
    overflow: hidden;
}
.auth-logo-tile img { width: 32px; height: 32px; object-fit: contain; }

.auth-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    color: #fff;
    background: linear-gradient(135deg, #6D5BFF 0%, #A78BFA 100%);
    box-shadow: 0 10px 24px -10px rgba(124, 58, 237, .8);
}
.auth-logo-mark svg { width: 21px; height: 21px; }

.auth-brand-name {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--auth-ink);
}
.auth-brand-sub {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

/* ── Preview column (singer photo) ─────────────────────────────────────── */
.auth-preview-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin: clamp(16px, 1.8vw, 24px);
    margin-left: 0;
    border-radius: 20px;
    border: 1px solid #E4DFF5;
    background: #1A0F30;
    overflow: hidden;
    min-height: 420px;
}
.auth-preview-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 38% 18%;
    display: block;
}
.auth-preview-footer {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: clamp(56px, 7vw, 96px) clamp(24px, 2.6vw, 38px) clamp(22px, 2vw, 30px);
    background:
        radial-gradient(140% 130% at 12% 100%, rgba(124, 92, 255, .30) 0%, rgba(124, 92, 255, 0) 58%),
        linear-gradient(180deg, rgba(28, 14, 50, 0) 0%, rgba(33, 18, 58, .34) 22%, rgba(38, 21, 68, .74) 48%, rgba(30, 16, 54, .94) 74%, #1B0F33 100%);
    color: #fff;
}
.auth-preview-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}
.auth-preview-eyebrow i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #C4B5FD;
    box-shadow: 0 0 10px 1px rgba(196, 181, 253, .9);
}
.auth-preview-headline {
    margin: 10px 0 0;
    font-size: clamp(28px, 2.3vw, 38px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
    text-shadow: 0 2px 20px rgba(10, 6, 25, .45);
}
.auth-preview-headline em {
    font-style: normal;
    background: linear-gradient(92deg, #FFFFFF 6%, #D8CBFF 48%, #9FE6FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}
.auth-preview-sub {
    margin: 9px 0 0;
    max-width: 440px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 500;
    color: rgba(255, 255, 255, .84);
    text-shadow: 0 1px 12px rgba(10, 6, 25, .4);
}
.auth-preview-stats {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.2vw, 30px);
}
.auth-preview-stats span {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}
.auth-preview-stats strong {
    display: block;
    margin-bottom: 2px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.02em;
    text-transform: none;
    color: #fff;
}
.auth-preview-stats > i {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, .18);
}

/* ── Center variant (forgot / reset): same frame language ──────────────── */
.auth-center {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}
.auth-center-inner {
    width: 100%;
    max-width: 512px;
    background: #fff;
    border: 1px solid #E7EAF0;
    border-radius: 26px;
    box-shadow: 0 30px 70px -46px rgba(16, 24, 40, .28);
    padding: clamp(28px, 3.2vw, 44px);
    animation: authIn .5s cubic-bezier(.16, 1, .3, 1) both;
}
.auth-center-brand { justify-content: center; margin-bottom: 24px; }

/* Card sits directly on the white frame in split / center contexts */
.auth-frame .auth-card,
.auth-center .auth-card {
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    animation: none;
}

/* ── Card (base kept for safety) ───────────────────────────────────────── */
.auth-card {
    position: relative;
    width: 100%;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.auth-header { margin-bottom: 24px; }
.auth-kicker {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--auth-brand);
    margin-bottom: 10px;
}
.auth-title {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.2vw, 28px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.022em;
    color: var(--auth-ink);
}
.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13.5px;
    line-height: 1.55;
    font-weight: 500;
}
.auth-subtitle strong { color: #344054; font-weight: 700; }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}
.auth-alert svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.auth-alert--error { background: #FFF1F2; border-color: #FECDD3; color: #BE123C; }
.auth-alert--success { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.auth-alert--warning { background: #FFFBEB; border-color: #FDE68A; color: #B45309; }
.auth-alert--info { background: #EEF2FF; border-color: #C7D2FE; color: #3730A3; }

/* ── Form ──────────────────────────────────────────────────────────────── */
.auth-form { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 7px; }
.auth-label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #344054;
}
.auth-input-wrap { position: relative; }
.auth-input {
    width: 100%;
    height: 46px;
    border: 1px solid #D0D5DD;
    border-radius: 10px;
    background: #fff;
    padding: 0 42px 0 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--auth-ink);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.auth-input::placeholder { color: #98A2B3; font-weight: 500; }
.auth-input:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 4px rgba(109, 74, 238, .12);
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #98A2B3;
    pointer-events: none;
    transition: color .18s;
}
.auth-input-wrap:focus-within .auth-input-icon { color: var(--auth-brand); }
.auth-pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #98A2B3;
    cursor: pointer;
    transition: color .18s, background .18s;
}
.auth-pw-toggle:hover { color: #344054; background: #F2F4F7; }
.auth-pw-toggle svg { width: 17px; height: 17px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #344054;
    cursor: pointer;
    user-select: none;
}
.auth-check input { width: 16px; height: 16px; accent-color: var(--auth-brand); cursor: pointer; }
.auth-link {
    color: var(--auth-brand);
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: none;
    transition: color .18s;
}
.auth-link:hover { color: var(--auth-brand-dark); text-decoration: underline; }

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    margin-top: 4px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(109, 74, 238, .55);
    transition: transform .16s, box-shadow .16s, background .16s;
}
.auth-btn:hover {
    background: var(--auth-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -12px rgba(109, 74, 238, .6);
}
.auth-btn:active { transform: scale(.99); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-btn svg { width: 16px; height: 16px; }
.auth-btn--ghost {
    background: #fff;
    color: #344054;
    border: 1px solid #D0D5DD;
    box-shadow: none;
}
.auth-btn--ghost:hover { background: #F8FAFC; border-color: #98A2B3; transform: none; box-shadow: none; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0 0;
    color: #98A2B3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: #EAECF0; }

.auth-footnote {
    margin: 20px 0 0;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--auth-muted);
}
.auth-hint { margin: 0; font-size: 11px; font-weight: 500; color: #98A2B3; line-height: 1.5; }

.auth-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 3px; }
.auth-strength span { height: 4px; border-radius: 99px; background: #E9EDF5; transition: background .2s; }
.auth-strength[data-score="1"] span:nth-child(-n+1) { background: #F43F5E; }
.auth-strength[data-score="2"] span:nth-child(-n+2) { background: #FB923C; }
.auth-strength[data-score="3"] span:nth-child(-n+3) { background: #FBBF24; }
.auth-strength[data-score="4"] span { background: #10B981; }

/* ── Steps (forgot password) ───────────────────────────────────────────── */
.auth-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.auth-step {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #98A2B3;
    white-space: nowrap;
}
.auth-step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #DBE2EC;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    color: #98A2B3;
    transition: all .2s;
}
.auth-step.is-active { color: var(--auth-brand); }
.auth-step.is-active .auth-step-dot {
    border-color: var(--auth-brand);
    color: var(--auth-brand);
    box-shadow: 0 0 0 4px rgba(109, 74, 238, .1);
}
.auth-step.is-done .auth-step-dot {
    background: var(--auth-brand);
    border-color: var(--auth-brand);
    color: #fff;
}
.auth-step-line { flex: 1; min-width: 10px; height: 1.5px; border-radius: 99px; background: #E6EBF2; }

/* ── OTP ───────────────────────────────────────────────────────────────── */
.auth-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-box {
    width: 100%;
    height: 52px;
    border: 1px solid #D0D5DD;
    border-radius: 10px;
    background: #fff;
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    color: var(--auth-ink);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.otp-box:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 4px rgba(109, 74, 238, .12);
}
.auth-otp-single { letter-spacing: .35em; text-align: center; padding-right: 42px; font-weight: 800; }

/* ── Account picker ────────────────────────────────────────────────────── */
.auth-account-list { display: grid; gap: 10px; }
.auth-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #D0D5DD;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.auth-account-card:hover { border-color: #C7BDF6; background: #FBFAFF; }
.auth-account-card.is-selected {
    border-color: var(--auth-brand);
    background: #F7F5FF;
    box-shadow: 0 0 0 3px rgba(109, 74, 238, .1);
}
.auth-account-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #EEF2FF;
    color: var(--auth-brand);
}
.auth-account-icon svg { width: 17px; height: 17px; }
.auth-account-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--auth-ink); }
.auth-account-role { margin: 2px 0 0; font-size: 11px; font-weight: 500; color: var(--auth-muted); }
.auth-radio {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1.5px solid #CBD5E1;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.auth-radio span { width: 9px; height: 9px; border-radius: 50%; background: var(--auth-brand); display: none; }
.auth-account-card.is-selected .auth-radio { border-color: var(--auth-brand); }
.auth-account-card.is-selected .auth-radio span { display: block; }

.auth-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-muted);
}
.auth-linkbtn {
    border: 0;
    background: none;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--auth-brand);
    cursor: pointer;
}
.auth-linkbtn:hover { text-decoration: underline; }
.auth-linkbtn:disabled { opacity: .55; cursor: not-allowed; }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 0;
    border: 0;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-muted);
    cursor: pointer;
}
.auth-back:hover { color: var(--auth-ink); }
.auth-back svg { width: 15px; height: 15px; }

.auth-spin { animation: authSpin 1s linear infinite; }

/* ── OTP target box (register) ─────────────────────────────────────────── */
.auth-otp-target {
    text-align: center;
    padding: 14px;
    border: 1px solid #E4E7EC;
    border-radius: 12px;
    background: #F9FAFB;
}
.auth-otp-email {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-ink);
    word-break: break-all;
}

/* ── Motion ────────────────────────────────────────────────────────────── */
@keyframes authIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes authSpin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1120px) {
    .auth-preview-panel { display: none; }
    .auth-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .auth-frame { margin: 10px; min-height: calc(100vh - 20px); border-radius: 18px; }
    .auth-form-panel { padding: 22px 20px; }
    .auth-form-wrap { max-width: 100%; padding: 28px 0; }
    .auth-title { font-size: 22px; }
    .auth-otp { gap: 6px; }
    .otp-box { height: 47px; font-size: 17px; border-radius: 10px; }
    .auth-steps { gap: 4px; }
    .auth-step > span:not(.auth-step-dot) { display: none; }
    .auth-step-dot { width: 21px; height: 21px; }
    .auth-input { height: 46px; font-size: 13px; }
    .auth-btn { height: 46px; }
    .auth-center { padding: 14px 10px; }
    .auth-center-inner { padding: 24px 20px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
