/* === AUTHENTICATION STYLES === */

:root {
    --auth-glass-bg: rgba(255, 255, 255, 0.75);
    --auth-glass-border: rgba(0, 0, 0, 0.08);
    --auth-input-bg: rgba(0, 0, 0, 0.03);
    --auth-modal-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    --auth-btn-bg: var(--gam-primary);
    --auth-btn-color: #fff;
}

body.gam-dark-mode {
    --auth-glass-bg: rgba(15, 23, 42, 0.7);
    --auth-glass-border: rgba(255, 255, 255, 0.1);
    --auth-input-bg: rgba(255, 255, 255, 0.05);
    --auth-modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --auth-btn-bg: var(--gam-secondary);
    --auth-btn-color: #1a1a1a;
}

/* ─── Page: full‑viewport centered column ─── */
.auth-page-container {
    width: 100%;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: authFadeIn 0.5s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Glass Card ─── */
.auth-glass-card {
    background: var(--auth-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-glass-border);
    border-radius: 28px;
    box-shadow: var(--auth-modal-shadow);
    width: 100%;
    max-width: 420px;
    padding: 2rem 2.25rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Inputs ─── */
.auth-input {
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-glass-border);
    color: var(--text-editor);
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input:focus {
    background: var(--auth-glass-bg);
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(149, 0, 255, 0.12);
}

body.gam-dark-mode .auth-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.15);
}

/* ─── Submit Button (vivid + hover glow) ─── */
.auth-submit-btn {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--auth-btn-bg);
    color: var(--auth-btn-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.3s, filter 0.2s;
    box-shadow: 0 4px 14px rgba(149, 0, 255, 0.25);
}

body.gam-dark-mode .auth-submit-btn {
    box-shadow: 0 4px 14px rgba(255, 180, 0, 0.25);
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(149, 0, 255, 0.35);
    filter: brightness(1.08);
}

body.gam-dark-mode .auth-submit-btn:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(255, 180, 0, 0.35);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Field Disclosure ─── */
.reveal-field {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease,
        margin 0.35s ease;
    margin-top: 0;
}

.reveal-field.show {
    max-height: 80px;
    opacity: 1;
    margin-top: 0.5rem;
}

@keyframes fieldPulse {
    0% {
        opacity: 0.4;
        transform: translateY(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-field-change {
    animation: fieldPulse 0.35s ease-out forwards;
}

/* ─── Auth Tabs ─── */
.auth-tab {
    padding-bottom: 0.4rem;
    font-weight: 700;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    color: var(--text-editor-muted);
    background: none;
    cursor: pointer;
    transition: color 0.25s, border-color 0.25s;
}

.auth-tab.active {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-panel-enter {
    animation: panelSlideIn 0.3s ease-out forwards;
}

.auth-forgot-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    text-align: center;
    display: block;
    margin-top: 0.75rem;
}

.auth-forgot-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.auth-message {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 10px;
}

.auth-message.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.auth-message.success {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.auth-field-gap {
    margin-bottom: 0.5rem;
}

.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

body.gam-dark-mode .auth-spinner {
    border-color: rgba(0, 0, 0, 0.2);
    border-top-color: #1a1a1a;
}

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 2s infinite linear;
}

/* ─── Registration Split View ─── */
#auth-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: calc(100vh - 80px);
}

@media (min-width: 1024px) {
    #auth-main-grid {
        grid-template-columns: 5fr 7fr;
    }

    .auth-preview-col {
        display: flex !important;
    }
}

.auth-editor-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 20;
}

.auth-preview-col {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
}

/* Campaign card preview */
.auth-campaign-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', sans-serif;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card-image {
    height: 280px;
    background: var(--gam-primary);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
    position: relative;
    overflow: hidden;
}

.auth-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-card-content {
    padding: 30px 35px 85px;
    text-align: center;
}

.auth-card-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #0f172a;
}

/* Progress Section in Auth Card */
.auth-progress-section {
    text-align: left;
    margin-top: 2rem;
}

.auth-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.auth-raised-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--gam-primary);
}

.auth-raised-label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 4px;
}

.auth-progress-percent {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}

.auth-progress-bar-track {
    width: 100%;
    height: 12px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.auth-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9333ea 0%, #fbbf24 100%);
    border-radius: 99px;
    position: relative;
    overflow: hidden;
}

.auth-goal-text {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
}

.auth-goal-value {
    font-weight: 700;
    color: #475569;
}

.auth-card-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    border-top: 1px solid #f1f5f9;
}

.auth-action-btn-half {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    background: var(--gam-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-action-btn-half.share {
    background: #fff;
    color: var(--gam-primary);
    border-left: 1px solid #f1f5f9;
}

.auth-action-btn-half:hover {
    filter: brightness(0.95);
}