/* Sign-in and sign-up pages (login.php, demo_trial.php): one centred card.
   Loaded after dashboard_style.css, which supplies the colour tokens, .card
   and .form-group. style.css is loaded too (via head.php), so a few of its
   site-wide rules are cancelled here — noted where it happens. */

.auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 16px;
}

/* .card is shared with the dashboard; the auth card opts out of its hover
   lift and gets more air. */
.card.auth-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 36px 32px 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
}
.card.auth-card--wide { max-width: 520px; }
.card.auth-card:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
    border-color: var(--line);
}

.auth-head { text-align: center; margin-bottom: 28px; }
/* text-shadow: style.css puts a teal glow on every h1. */
.auth-head h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-shadow: none;
    margin: 0 0 6px;
}
.card.auth-card .auth-head p { font-size: 14px; color: var(--muted); font-weight: 400; margin: 0; }

/* gap: style.css makes .form-group a flex column with a 5px gap, which
   stacked on top of the label margin and floated the hints off their field. */
.auth-card .form-group { margin-bottom: 18px; gap: 0; }
.auth-card .form-group label { margin-bottom: 8px; }
.auth-card .form-group input,
.auth-card .form-group select,
.auth-card .form-group textarea {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 10px;
}
.auth-card .form-group textarea { height: 88px; min-height: 88px; }
.auth-card .form-group input::placeholder { color: #94a3b8; }

/* Two fields side by side; stacks on a phone. */
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) {
    .auth-row { grid-template-columns: 1fr; }
}

.auth-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
/* A hint under a whole .auth-row (the phone hint on sign-up). */
.auth-hint--row { margin: -10px 0 14px; }

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.label-row label { margin-bottom: 0 !important; }

/* min-height: style.css gives every link a 44px touch target, which here
   would push the field below it down. */
.auth-link {
    min-height: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}
.auth-link:hover { color: #1d4ed8; text-decoration: underline; }

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-btn--primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); margin-top: 8px; }
/* style.css underlines every hovered link; a button never is. */
.auth-btn:hover, .auth-btn:focus { text-decoration: none; }
.auth-btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25); color: #fff; }
.auth-btn--secondary { background: #fff; color: var(--ink); border: 1px solid #cbd5e1; }
.auth-btn--secondary:hover { border-color: var(--brand); color: var(--brand); background: #f8fafc; }

/* "Continue with Google" (google_auth_button_html()): white, Google's G on the left. */
.auth-btn--google { gap: 10px; background: #fff; color: var(--ink); border: 1px solid #cbd5e1; }
.auth-btn--google:hover { border-color: #94a3b8; background: #f8fafc; color: var(--ink); }
.auth-google-g { width: 20px; height: 20px; flex: none; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    font-size: 13px;
    color: var(--muted);
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* The "or" between the Google button and the form below it. */
.auth-divider--tight { margin: 18px 0; }

.card.auth-card .auth-foot { margin: 20px 0 0; text-align: center; font-size: 14px; font-weight: 400; color: var(--muted); }

/* The WhatsApp opt-in tick under the phone field (demo_trial.php). Not a
   .form-group, so its checkbox keeps a normal size. */
.auth-optin {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 18px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
}
.auth-optin[hidden] { display: none; }
.auth-optin input { width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; padding: 0; flex: none; accent-color: var(--brand); }

/* The 6-digit code step of quick_signup.php. */
.auth-card .form-group input.auth-code { font-size: 26px; letter-spacing: 10px; text-align: center; font-weight: 700; }
.auth-inline-form { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-link-btn { background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
.auth-link-btn:hover { text-decoration: underline; }
.auth-card .alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* align-items, not justify-content: style.css makes .form-group a column. */
/* "Keep me signed in" tick under the password. */
.auth-remember { display: flex; align-items: center; gap: 8px; margin: -4px 0 18px; font-size: 14px; font-weight: 400; color: #475569; cursor: pointer; }
.auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: #2563eb; cursor: pointer; }

.auth-captcha { display: flex; align-items: center; }
.auth-captcha:empty { display: none; }

/* Messages above the form. */
.auth-card .alert { margin-bottom: 20px; border-radius: 10px; font-size: 14px; }
.auth-card .alert-danger { background: #fdecea; border: 1px solid #f5c2c7; color: #b02a37; }

/* "Check your email" after a successful sign-up. */
.auth-done { text-align: center; padding: 8px 0 4px; }
.auth-done-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.auth-done h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    text-shadow: none;
    margin: 0 0 8px;
}
.card.auth-card .auth-done p { font-size: 14px; color: var(--muted); font-weight: 400; margin: 0 0 6px; }
.card.auth-card .auth-done .auth-done-email { color: var(--ink); font-weight: 600; margin-bottom: 14px; }
.auth-done .auth-btn { margin-top: 22px; }

/* Password fields with the show/hide eye (password-toggle.js). */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
input[type="password"]::-webkit-credentials-auto-fill-button { display: none; }
.password-container { position: relative; }
.password-container input { padding-right: 44px !important; }
.eye-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    transition: color 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}
.eye-icon:hover { color: var(--brand); }
