/* --- Design tokens (shared with home/navbar/footer; redeclared here
   since auth.css loads standalone) --- */
:root {
    --mm-surface: #141c30;
    --mm-border: rgba(255, 255, 255, 0.08);
    --mm-text: #e2e8f0;
    --mm-text-dim: #94a3b8;
    --mm-accent: #60a5fa;
    --mm-accent-strong: #3b82f6;
}

body.light-mode {
    --mm-surface: #ffffff;
    --mm-border: rgba(15, 23, 42, 0.08);
    --mm-text: #1e293b;
    --mm-text-dim: #64748b;
    --mm-accent: #2563eb;
    --mm-accent-strong: #1d4ed8;
}

/* רקע העמוד: זוהר עדין מאחורי הכרטיס, כמו ה-hero בדף הבית */
.auth-page {
    position: relative;
    min-height: calc(100vh - 260px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-page::before {
    content: "";
    position: absolute;
    top: -160px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 560px;
    height: 420px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.16), transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

body.light-mode .auth-page::before {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 70%);
}

/* עיצוב מכולת הטופס */
.auth-container {
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
    margin: 40px auto;
    padding: 36px 34px;
    background: linear-gradient(165deg, var(--mm-surface) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--mm-border);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    overflow: hidden;
    animation: authContainerIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authContainerIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-container {
        animation: none;
    }
}

.auth-container::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mm-accent), rgba(96, 165, 250, 0.15));
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    color: var(--mm-accent);
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 14px;
}

.auth-container h1 {
    margin: 0;
}

.auth-container .legal-lead {
    text-align: center;
}

.google-signin-button {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--mm-text-dim);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--mm-border);
}

.auth-form {
    text-align: right;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--mm-text-dim);
    font-weight: 600;
}

/* עיצוב השדות - Inputs */
.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    padding: 12px 15px;
    color: var(--mm-text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

body.light-mode .form-group input {
    background: rgba(15, 23, 42, 0.02);
}

.form-group input:focus {
    outline: none;
    border-color: var(--mm-accent);
    background: rgba(96, 165, 250, 0.05);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

/* עטיפת שדה עם אייקון מוביל (שם משתמש / אימייל / מנעול) */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding-inline-start: 42px;
}

.input-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: var(--mm-text-dim);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-icon-wrap:focus-within .input-icon {
    color: var(--mm-accent);
}

/* שדה סיסמה עם כפתור הצגה/הסתרה */
.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    box-sizing: border-box;
    padding-inline-end: 44px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    border: none;
    color: var(--mm-text-dim);
    cursor: pointer;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--mm-accent);
}

.toggle-password .icon-eye-off {
    display: none;
}

.toggle-password.is-visible .icon-eye {
    display: none;
}

.toggle-password.is-visible .icon-eye-off {
    display: block;
}

/* כפתור שליחה */
.btn-auth-submit {
    background: var(--mm-accent-strong);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.btn-auth-submit:hover {
    background: var(--mm-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
}

/* הודעת עזר קטנה מתחת לשדה */
.form-help {
    font-size: 0.75rem;
    color: var(--mm-text-dim);
    margin-top: -12px;
    margin-bottom: 5px;
}

.auth-message {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: right;
}

.auth-message.is-visible {
    display: block;
}

/* שורת "עוד לא הצטרפתם? / כבר רשומים?" מתחת לטופס */
.auth-switch {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--mm-text-dim);
}

.auth-switch a {
    color: var(--mm-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}
