/* Login + Register pages. Loaded after theme.css and style.css, so it re-skins the old card to the FORGE theme
   (same colors and fonts as the front page and dashboard) without touching the toast or message styles in style.css.
   Layout: one sharp-cornered box, photo + FORGE on the left half, the form on the right half. */

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/poppins-latin-900-normal.woff2") format("woff2");
}

body.auth-page {
    margin: 0; padding: 32px 16px; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--forge-bg); color: var(--forge-text);
    background-image: radial-gradient(900px 420px at 50% -120px, var(--forge-primary-soft), transparent 70%);
}

.auth-split {
    width: 100%; max-width: 980px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--forge-surface); border: 1px solid var(--forge-border); border-radius: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.auth-visual {
    position: relative; overflow: hidden; min-height: 560px;
    display: flex; align-items: flex-start;
    background: #050607 url("../images/auth-gym.jpg") center / cover no-repeat;
}
.auth-visual::after { /* darkens the photo so the white wordmark always reads */
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.3) 100%);
}
.auth-wordmark { position: relative; z-index: 1; display: block; padding: 36px; color: #fff; text-decoration: none; }
/* Same lockup as the front page: solid FORGE, outlined FITNESS GYM underneath (the icon tile is dropped). */
.auth-wordmark-mark { display: none; }
.auth-wordmark-name, .auth-wordmark-sub { display: block; font-family: "Poppins", "Inter Variable", system-ui, sans-serif; font-weight: 900; text-transform: uppercase; line-height: 0.95; }
.auth-wordmark-name { font-size: 112px; letter-spacing: -0.01em; color: #fff; margin-left: -4px; }
.auth-wordmark-sub { margin-top: 6px; font-size: 54px; letter-spacing: 0; color: transparent; -webkit-text-stroke: 1.5px #fff; }

.auth-pane { display: flex; flex-direction: column; justify-content: center; padding: 40px; min-width: 0; }

/* The form card is no longer its own box: the outer .auth-split is the box. */
.auth-page .card { width: 100%; max-width: none; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.auth-page h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: var(--forge-text); }
.auth-page p.subtitle { margin: 0 0 20px; font-size: 14px; color: var(--forge-text-muted); line-height: 1.5; }

.auth-page label { margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--forge-text-muted); }
.auth-page input, .auth-page select {
    height: 44px; padding: 0 12px; font-family: inherit; font-size: 14px;
    background: var(--forge-bg); color: var(--forge-text);
    border: 1px solid var(--forge-border-strong); border-radius: 0;
}
.auth-page input:focus, .auth-page select:focus { outline: none; border-color: var(--forge-primary); box-shadow: var(--forge-focus-ring); }

.auth-page .row { gap: 12px; }

.auth-page .password-field input { padding-right: 64px; }
.auth-page .password-toggle {
    position: absolute; top: 0; right: 0; transform: none; width: auto; min-width: 56px; height: 100%; margin: 0; padding: 0 14px;
    background: transparent; border: 0; border-radius: 0;
    color: var(--forge-text-muted); font-family: inherit; font-size: 12px; font-weight: 600;
}
.auth-page .password-toggle:hover { background: var(--forge-surface-alt); color: var(--forge-text); }
.auth-page .password-toggle:focus-visible { outline: none; box-shadow: var(--forge-focus-ring); }

.auth-page form button[type="submit"] {
    width: 100%; height: 44px; margin-top: 24px; padding: 0;
    background: var(--forge-primary); color: var(--forge-on-primary);
    border: 0; border-radius: 0; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background-color 0.15s ease;
}
.auth-page form button[type="submit"]:hover:not(:disabled) { background: var(--forge-primary-hover); }
.auth-page form button[type="submit"]:disabled { background: var(--forge-primary); opacity: 0.6; cursor: not-allowed; }
.auth-page form button[type="submit"]:focus-visible { outline: none; box-shadow: var(--forge-focus-ring); }

.auth-page .msg { margin-top: 16px; border-radius: 0; }
.auth-page .msg.error { background: var(--forge-danger-soft); color: var(--forge-danger); }
.auth-page .msg.success { background: var(--forge-primary-soft); color: var(--forge-primary); }

.auth-page .footer-link { margin-top: 20px; font-size: 13px; color: var(--forge-text-muted); }
.auth-page .footer-link a { color: var(--forge-primary); font-weight: 600; text-decoration: none; }
.auth-page .footer-link a:hover { text-decoration: underline; }

.auth-back { margin-top: 14px; text-align: center; font-size: 13px; color: var(--forge-text-muted); text-decoration: none; }
.auth-back:hover { color: var(--forge-text); }

@media (max-width: 860px) {
    body.auth-page { align-items: flex-start; padding: 16px; }
    .auth-split { grid-template-columns: 1fr; max-width: 520px; }
    .auth-visual { min-height: 0; height: 170px; }
    .auth-wordmark { padding: 20px 24px; }
    .auth-wordmark-name { font-size: 52px; margin-left: -2px; }
    .auth-visual::after { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.62) 100%); }
    .auth-wordmark-sub { margin-top: 3px; font-size: 25px; -webkit-text-stroke-width: 1px; }
    .auth-pane { padding: 28px 24px 24px; }
}
@media (max-width: 480px) {
    .auth-pane { padding: 24px 18px 20px; }
    .auth-page .row { flex-direction: column; gap: 0; }
}

/* Edge draws its own reveal icon in password fields; the Show/Hide button already does that. */
.auth-page input[type="password"]::-ms-reveal, .auth-page input[type="password"]::-ms-clear { display: none; }
