/* ============================================================
   PollsMaster — Auth Pages v3 (Full Premium Revamp)
   ============================================================ */

html, body { height: 100%; margin: 0; padding: 0; }

/* ============================================================
   AUTH PAGE WRAPPER
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    font-family: var(--pm-font-sans);
    background: var(--pm-bg);
}

/* ============================================================
   LEFT BRANDING PANEL
   ============================================================ */
.auth-panel-left {
    width: 46%;
    min-height: 100vh;
    background: linear-gradient(150deg, #060412 0%, #0c0822 40%, #060412 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.875rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Animated aurora orbs */
.auth-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 25%, rgba(99,102,241,.48) 0%, transparent 52%),
        radial-gradient(ellipse at 88% 80%, rgba(6,182,212,.32)  0%, transparent 48%),
        radial-gradient(ellipse at 55% 55%, rgba(139,92,246,.2)  0%, transparent 50%);
    pointer-events: none;
    animation: auth-orbs 12s ease-in-out infinite alternate;
}

@keyframes auth-orbs {
    from {
        background:
            radial-gradient(ellipse at 15% 25%, rgba(99,102,241,.48) 0%, transparent 52%),
            radial-gradient(ellipse at 88% 80%, rgba(6,182,212,.32)  0%, transparent 48%),
            radial-gradient(ellipse at 55% 55%, rgba(139,92,246,.2)  0%, transparent 50%);
    }
    to {
        background:
            radial-gradient(ellipse at 22% 35%, rgba(99,102,241,.52) 0%, transparent 55%),
            radial-gradient(ellipse at 80% 72%, rgba(6,182,212,.28)  0%, transparent 50%),
            radial-gradient(ellipse at 60% 48%, rgba(139,92,246,.22) 0%, transparent 52%);
    }
}

/* Fine grid overlay */
.auth-panel-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.auth-panel-left > * { position: relative; z-index: 1; }

/* Brand logo */
.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.auth-brand-logo .logo-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,.1);
    border-radius: var(--pm-radius-xl);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.375rem;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.1);
}

.auth-brand-logo .logo-text {
    font-family: var(--pm-font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: -.035em;
}

/* Brand headline */
.auth-brand-headline {
    margin: auto 0;
    padding: 2.5rem 0;
}

.auth-brand-headline h1 {
    font-family: var(--pm-font-heading);
    font-weight: 800;
    font-size: clamp(2.25rem, 3.5vw, 3.25rem);
    color: #fff;
    line-height: 1.1;
    letter-spacing: -.05em;
    margin-bottom: 1rem;
}

.auth-brand-headline h1 span {
    background: linear-gradient(135deg, #a5b4fc 0%, #67e8f9 60%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-headline p {
    color: rgba(255,255,255,.55);
    font-size: 1.0625rem;
    line-height: 1.78;
    max-width: 340px;
}

/* Feature list */
.auth-features {
    list-style: none;
    padding: 0;
    margin: 2.5rem 0 0;
    position: relative;
    padding-top: 2rem;
}

.auth-features::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,.15), transparent);
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: .875rem;
    color: rgba(255,255,255,.72);
    font-size: .9375rem;
    margin-bottom: 1.125rem;
    font-weight: 400;
}

.auth-features li .feat-icon {
    width: 40px; height: 40px;
    background: rgba(99,102,241,.18);
    border-radius: var(--pm-radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    color: #a5b4fc;
    flex-shrink: 0;
    border: 1px solid rgba(165,180,252,.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    transition: transform var(--pm-transition), background var(--pm-transition);
}

.auth-features li:hover .feat-icon {
    transform: scale(1.08);
    background: rgba(99,102,241,.28);
}

.auth-panel-footer {
    color: rgba(255,255,255,.28);
    font-size: .8125rem;
}

/* Stats strip */
.auth-stats {
    display: flex;
    gap: 2.25rem;
    margin-top: 2.75rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.auth-stat-item { text-align: left; }

.auth-stat-num {
    font-family: var(--pm-font-heading);
    font-size: 1.625rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.04em;
    line-height: 1;
}

.auth-stat-lbl {
    font-size: .75rem;
    color: rgba(255,255,255,.4);
    font-weight: 600;
    margin-top: .1875rem;
    letter-spacing: .03em;
}

/* ============================================================
   RIGHT FORM PANEL
   ============================================================ */
.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
    background: var(--pm-bg);
}

/* Subtle dot pattern */
.auth-panel-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--pm-gray-300) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .28;
    pointer-events: none;
}

.auth-form-box {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

/* Form header */
.auth-form-header { margin-bottom: 2.5rem; }

.auth-form-header h2 {
    font-family: var(--pm-font-heading);
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--pm-gray-900);
    letter-spacing: -.05em;
    margin-bottom: .375rem;
    line-height: 1.08;
}

.auth-form-header p {
    color: var(--pm-gray-400);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.auth-form-group { margin-bottom: 1.375rem; }

.auth-label {
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--pm-gray-700);
    margin-bottom: .4375rem;
    letter-spacing: .02em;
}

.auth-input {
    width: 100%;
    padding: .9375rem 1.25rem;
    font-size: .9375rem;
    font-family: var(--pm-font-sans);
    border: 1.5px solid var(--pm-gray-200);
    border-radius: var(--pm-radius-xl);
    background: var(--pm-surface);
    color: var(--pm-gray-900);
    outline: none;
    transition: all var(--pm-transition);
    box-shadow: var(--pm-shadow-xs);
}

.auth-input:focus {
    border-color: var(--pm-primary);
    box-shadow: var(--pm-shadow-glow), var(--pm-shadow-xs);
    background: #fff;
}

.auth-input::placeholder { color: var(--pm-gray-300); }
.auth-input.is-error { border-color: var(--pm-danger); }
.auth-input.is-error:focus { box-shadow: 0 0 0 3px rgba(244,63,94,.14); }

.auth-input-group { position: relative; }

.auth-input-icon {
    position: absolute;
    right: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pm-gray-300);
    font-size: .875rem;
    transition: color var(--pm-transition);
    cursor: pointer;
}

.auth-input-group:focus-within .auth-input-icon { color: var(--pm-primary); }
.auth-input-group .auth-input { padding-right: 3rem; }

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--pm-font-sans);
    background: var(--pm-gradient-brand);
    color: #fff;
    border: none;
    border-radius: var(--pm-radius-xl);
    cursor: pointer;
    transition: all var(--pm-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    position: relative;
    overflow: hidden;
    margin-top: .5rem;
    box-shadow: 0 6px 24px rgba(99,102,241,.42);
    letter-spacing: .01em;
}

/* Shimmer sweep */
.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transition: left .55s ease;
}

.auth-submit-btn:hover::before { left: 150%; }

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99,102,241,.5);
}

.auth-submit-btn:active:not(:disabled) { transform: translateY(0); }
.auth-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.auth-submit-btn.is-loading .btn-text { visibility: hidden; }
.auth-submit-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pm-spin .7s linear infinite;
}

@keyframes pm-spin { to { transform: rotate(360deg); } }

/* ============================================================
   ALERTS
   ============================================================ */
.auth-alert {
    padding: .9375rem 1.125rem;
    border-radius: var(--pm-radius-xl);
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    line-height: 1.52;
}

.auth-alert.error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.auth-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* ============================================================
   SWITCH LINK
   ============================================================ */
.auth-switch {
    text-align: center;
    margin-top: 2.25rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pm-gray-200);
    font-size: .9375rem;
    color: var(--pm-gray-400);
}

.auth-switch a {
    color: var(--pm-primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: .3125rem;
    transition: color var(--pm-transition);
}

.auth-switch a:hover { color: var(--pm-primary-dark); text-decoration: underline; }

/* ============================================================
   DIVIDER
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--pm-gray-300);
    font-size: .8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pm-gray-200);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
    .auth-panel-left  { display: none; }
    .auth-panel-right { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
    .auth-form-header h2 { font-size: 1.875rem; }
    .auth-form-box { max-width: 100%; }
    .auth-panel-right {
        align-items: flex-start;
        padding-top: 3rem;
    }
}
