/* Auth forms & modal */
.auth-page {
    padding: var(--space-10) 0 var(--space-16);
    min-height: 60vh;
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
}

.auth-card__promo {
    text-align: center;
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(20, 184, 166, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.auth-card__promo-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.auth-card__promo-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7C3AED, #14B8A6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card h1 {
    font-size: 1.35rem;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.auth-card__subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-6);
}

.auth-card__switch {
    text-align: center;
    margin-top: var(--space-5);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-card__switch a {
    color: var(--color-primary);
    font-weight: 700;
}

.form-control {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: var(--space-3);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    background: #fff;
}

.form-control:focus {
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.auth-form__agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: var(--space-5);
}

.auth-form__agree input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.auth-form__agree label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.auth-form__agree button {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    z-index: 100000;
    padding: 16px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}

.auth-modal-overlay.open {
    display: flex;
}

.auth-modal {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    max-width: 420px;
    width: 100%;
    margin: 24px auto;
    padding: 24px 20px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: authModalIn 0.25s ease;
}

@keyframes authModalIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.auth-modal__header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-modal__header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.auth-modal__header p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.auth-modal__agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.auth-modal__agree label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.auth-modal__submit {
    width: 100%;
}

.auth-modal__switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 16px;
}

.auth-modal__switch button {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease;
}

.toast-success { background: #059669; }
.toast-error { background: #DC2626; }
.toast-info { background: #7C3AED; }

.toast.hide {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.terms-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100002;
    padding: 16px;
    overflow-y: auto;
}

.terms-overlay.open {
    display: block;
}

.terms-box {
    background: #fff;
    border-radius: var(--radius-xl);
    max-width: 480px;
    margin: 40px auto;
    padding: 24px;
    position: relative;
}

.terms-box__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-text-muted);
}

.terms-box p {
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
