/* ============================================================
   Login / Sign-up page  (mobile-first)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.login-body {
    background: linear-gradient(145deg, #ede9fd 0%, #dbeafe 100%);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.login-wrapper { width: 100%; max-width: 420px; }

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px 24px;
    box-shadow: 0 8px 40px rgba(91,77,232,.15);
}

@media (min-width: 480px) {
    .login-card { padding: 36px 36px 32px; }
}

/* ── Logo ── */
.login-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px;
}
.logo-icon {
    width: 46px; height: 46px; border-radius: 12px;
    background: #5B4DE8;
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}
.logo-icon svg    { width: 22px; height: 22px; }
.login-title      { font-size: 18px; font-weight: 800; line-height: 1.2; }
.login-subtitle   { font-size: 10px; letter-spacing: .1em; color: #6B7280; display: block; margin-top: 2px; }

/* ── Tab switcher ── */
.auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    transition: all .15s;
    text-decoration: none;
    display: block;
}
.auth-tab.active  { background: #fff; color: #5B4DE8; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.auth-tab:hover:not(.active) { color: #374151; }

/* ── Desc ── */
.login-desc {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* ── Signup note ── */
.signup-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #ede9fd;
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    /* KEY FIX: force text to wrap properly */
    font-size: 13px;
    color: #4c1d95;
    line-height: 1.6;
    word-break: normal;
    overflow-wrap: break-word;
}
.signup-note svg  { flex-shrink: 0; margin-top: 2px; }
.signup-note span { display: block; min-width: 0; }

/* ── Form elements ── */
.login-form .form-group {
    margin-bottom: 14px;
}
.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-size: 16px; /* 16px prevents iOS zoom */
    background: #fff;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.login-form input:focus {
    outline: none;
    border-color: #5B4DE8;
    box-shadow: 0 0 0 3px rgba(91,77,232,.12);
}

/* Eye button */
.input-eye-wrap { position: relative; }
.input-eye-wrap input { padding-right: 44px; }
.eye-btn {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #9CA3AF; padding: 4px; cursor: pointer;
    display: flex; align-items: center;
}
.eye-icon { width: 18px; height: 18px; }

/* Submit button */
.login-form .btn-full {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    background: #5B4DE8;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 6px;
    touch-action: manipulation;
}
.login-form .btn-full:hover  { background: #4a3cc7; }
.login-form .btn-full:active { transform: scale(.98); }

/* Hint */
.login-hint {
    font-size: 13px;
    color: #9CA3AF;
    text-align: center;
    margin-top: 18px;
    line-height: 1.5;
}

/* Alert */
.alert {
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 16px;
    font-weight: 500;
    line-height: 1.5;
}
.alert-error   { background: #FEE2E2; color: #991b1b; }
.alert-success { background: #D1FAE5; color: #065f46; }
