/*
 * Sign-in pages (log in, forgot / reset password, two-factor), for every user, in
 * both looks. Layout follows CrawlBrain's auth pages (site header, a short pitch
 * beside the form, the site footer); colours are WP Ghost's. Loaded by
 * resources/views/admin/auth/layout.blade.php after open-admin's styles.css.
 *
 * Rules as in the new look: hex only in the token block, no gradients or glows,
 * alerts a hairline all round (never a coloured left rule), a 2px focus ring.
 */

:root {
    --wpa-navy: #112D4E;
    --wpa-navy-deep: #0e2644;
    --wpa-ink: #1d1d1f;
    --wpa-orange: #f97316;
    --wpa-orange-dark: #ea640c;
    --wpa-blue: #4488d4;
    --wpa-blue-dark: #3F72AF;
    --wpa-green: #3FAF72;
    --wpa-red: #dc3545;
    --wpa-on-accent: #ffffff;
    --wpa-footer-text: #b8c5d6;
    --wpa-footer-muted: #8fa1b8;

    --wpa-bg: #ffffff;
    --wpa-band: #f4f6f9;
    --wpa-surface: #ffffff;
    --wpa-border: #e3e8ef;
    --wpa-border-strong: #d3dae4;
    --wpa-text: #1c2b3d;
    --wpa-text-2: #4a5a6e;
    --wpa-muted: #7a8899;
    --wpa-ring: rgba(68, 136, 212, .28);
    --wpa-radius: 6px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --wpa-bg: #1b222b;
        --wpa-band: #1f2730;
        --wpa-surface: #232b35;
        --wpa-border: #34404e;
        --wpa-border-strong: #3f4c5c;
        --wpa-text: #e8eef5;
        --wpa-ink: #f1f4f8;
        --wpa-text-2: #c1ccd8;
        --wpa-muted: #8c9aab;
        --wpa-blue: #5ea8f5;
        --wpa-ring: rgba(94, 168, 245, .35);
    }
}

body.wpa {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--wpa-bg);
    color: var(--wpa-text);
    font-size: 16px;
    /* wpghost.com sets Inter; it is used where installed, without a font request. */
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.wpa a { color: var(--wpa-blue); }
body.wpa a:hover { color: var(--wpa-blue-dark); }
body.wpa :focus-visible { outline: 2px solid var(--wpa-blue); outline-offset: 2px; }

.wpa-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }

/* ---------------------------------------------------------------- Header */
/* As wpghost.com: the text logo, the menu in the middle, an orange Buy Now. */

.wpa-header { background: var(--wpa-surface); }
.wpa-header-row { display: flex; align-items: center; gap: 24px; min-height: 96px; }
.wpa-logo img { display: block; height: 46px; width: auto; }
.wpa-nav { display: flex; align-items: center; gap: 8px; margin: 0 auto; }
body.wpa .wpa-nav a { padding: 6px 16px; color: var(--wpa-text); font-size: 16px; font-weight: 400; text-decoration: none; }
body.wpa .wpa-nav a:hover { color: var(--wpa-ink); }
/* The current page is the bold one, as on wpghost.com. */
body.wpa .wpa-nav a[aria-current="page"] { color: var(--wpa-ink); font-weight: 600; }
body.wpa .wpa-buy { flex-shrink: 0; padding: 7px 17px; background: var(--wpa-orange); color: var(--wpa-on-accent); font-size: 16px; font-weight: 500; text-decoration: none; }
body.wpa .wpa-buy:hover { background: var(--wpa-orange-dark); color: var(--wpa-on-accent); }

/* ------------------------------------------------------------------ Main */

/* At least the window under the header, form centred: the footer starts below the
   fold instead of crowding the form. */
.wpa-main { flex: 1; display: flex; align-items: center; min-height: max(560px, calc(100vh - 96px)); padding: 64px 0; box-sizing: border-box; }
.wpa-main > .wpa-wrap { width: 100%; }
/* Stretch, so the divider runs the height of the taller column. */
.wpa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 0; align-items: stretch; }
.wpa-grid > .wpa-pitch { padding-right: 72px; }
.wpa-grid > .wpa-panel { padding: 32px 0 32px 72px; border-left: 1px solid var(--wpa-border); }
.wpa-single { max-width: 440px; margin: 0 auto; }

.wpa-pitch { padding: 48px 0 32px; max-width: 540px; }
.wpa-eyebrow { margin: 0 0 20px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--wpa-muted); }
.wpa-pitch-title { margin: 0 0 24px; font-size: 44px; line-height: 1.2; font-weight: 800; letter-spacing: -1px; color: var(--wpa-ink); }
.wpa-pitch-title span { color: var(--wpa-orange); }
.wpa-pitch-lead { margin: 0 0 36px; font-size: 17px; line-height: 1.7; color: var(--wpa-text-2); }
.wpa-checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; font-size: 16px; color: var(--wpa-text); }
.wpa-checks li { position: relative; padding-left: 32px; line-height: 1.6; }
.wpa-checks li::before { content: ""; position: absolute; left: 6px; top: 5px; width: 6px; height: 12px; border: solid var(--wpa-green); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.wpa-title { margin: 0 0 8px; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.5px; color: var(--wpa-ink); }
.wpa-lead { margin: 0 0 24px; font-size: 15px; line-height: 1.5; color: var(--wpa-text-2); }
.wpa-form { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.wpa-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--wpa-text); }
body.wpa .wpa-field .form-control { height: 46px; font-size: 15px; border-radius: var(--wpa-radius); border: 1px solid var(--wpa-border-strong); background: var(--wpa-surface); color: var(--wpa-text); box-shadow: none; }
body.wpa .wpa-field .form-control:focus { border-color: var(--wpa-blue); box-shadow: 0 0 0 2px var(--wpa-ring); }
body.wpa .wpa-field .form-control.is-invalid { border-color: var(--wpa-red); }
.wpa-field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--wpa-red); }
.wpa-field-hint { display: block; margin-top: 6px; font-size: 13px; color: var(--wpa-muted); }
.wpa-optional { font-weight: 400; color: var(--wpa-muted); }
/* The signup form's bot trap: off screen for people, still in the form for bots. */
.wpa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* "Continue with ..." (admin/auth/_social): one button per configured provider.
   Not .wpa-social: the footer's round social icons use that name. */
.wpa-oauth { display: grid; gap: 10px; margin-bottom: 18px; }
body.wpa .wpa-oauth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--wpa-border-strong); border-radius: var(--wpa-radius); background: var(--wpa-surface); color: var(--wpa-ink); font-size: 15px; font-weight: 500; text-decoration: none; }
body.wpa .wpa-oauth-btn:hover { background: var(--wpa-band); color: var(--wpa-ink); }
body.wpa .wpa-oauth-btn:focus-visible { outline: 2px solid var(--wpa-blue); outline-offset: 2px; }
.wpa-or { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--wpa-muted); font-size: 13px; }
.wpa-or::before, .wpa-or::after { content: ""; flex: 1; border-top: 1px solid var(--wpa-border); }
.wpa-field-help { display: block; margin-top: 6px; font-size: 13px; color: var(--wpa-muted); }
.wpa-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-size: 20px !important; text-align: center; }

.wpa-password { position: relative; }
body.wpa .wpa-password .form-control { padding-right: 72px; }
body.wpa .wpa-show { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 6px 8px; border: 0; border-radius: var(--wpa-radius); background: transparent; color: var(--wpa-blue); font-size: 14px; font-weight: 600; }

.wpa-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
body.wpa .wpa-between .form-check-label { color: var(--wpa-text-2); }
.wpa-remember { margin: -4px 0 18px; }
body.wpa .wpa-remember .form-check-label { color: var(--wpa-text-2); }
/* The app's blue, as the buttons inside the dashboard; only Buy Now is orange. */
body.wpa .wpa-submit { width: 100%; margin-top: 4px; padding: 12px 18px; border: 0; border-radius: var(--wpa-radius); background: var(--wpa-blue); color: var(--wpa-on-accent); font-size: 16px; font-weight: 600; }
body.wpa .wpa-submit:hover { background: var(--wpa-blue-dark); }
.wpa-switch { margin: 24px 0 0; font-size: 14px; color: var(--wpa-text-2); }

/* Alerts: a hairline all round and a faint tint, the text in the body colour. */
.wpa-alert { margin-bottom: 4px; padding: 12px 14px; border: 1px solid var(--wpa-border); border-radius: var(--wpa-radius); background: var(--wpa-band); color: var(--wpa-text); font-size: 14px; line-height: 1.45; }
.wpa-alert-danger { background: color-mix(in srgb, var(--wpa-red) 8%, transparent); border-color: color-mix(in srgb, var(--wpa-red) 30%, transparent); }
.wpa-alert-success { background: color-mix(in srgb, var(--wpa-green) 8%, transparent); border-color: color-mix(in srgb, var(--wpa-green) 30%, transparent); }

body.wpa details.wpa-more { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--wpa-border); }
body.wpa details.wpa-more > summary { cursor: pointer; color: var(--wpa-blue); font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------- Footer */
/* As wpghost.com: four link columns on navy, then a darker bar. */

.wpa-footer { background: var(--wpa-navy); color: var(--wpa-footer-text); }
.wpa-footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 56px; }
.wpa-footer-h { position: relative; margin: 0 0 26px; font-size: 18px; font-weight: 600; color: var(--wpa-on-accent); }
.wpa-footer-h::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 40px; height: 1px; background: var(--wpa-footer-muted); }
.wpa-footer ul { margin: 0; padding: 0; list-style: none; }
.wpa-footer li { margin: 0 0 14px; padding-left: 18px; position: relative; }
.wpa-footer li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border: solid var(--wpa-footer-text); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
body.wpa .wpa-footer a { color: var(--wpa-footer-text); text-decoration: none; font-size: 15px; }
body.wpa .wpa-footer a:hover { color: var(--wpa-on-accent); }
.wpa-footer-bar { background: var(--wpa-navy-deep); }
.wpa-footer-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 64px; font-size: 14px; color: var(--wpa-footer-muted); }
.wpa-social { display: flex; gap: 10px; }
body.wpa .wpa-social a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1.5px solid var(--wpa-footer-text); border-radius: 50%; font-size: 13px; }

/* ---------------------------------------------------------------- Phones */

@media (max-width: 991px) {
    .wpa-nav { display: none; }
    .wpa-header-row { justify-content: space-between; }
    .wpa-grid { grid-template-columns: 1fr; }
    .wpa-grid > .wpa-pitch { display: none; }
    .wpa-grid > .wpa-panel { padding-left: 0; border-left: 0; max-width: 440px; margin: 0 auto; width: 100%; }
    .wpa-main { min-height: 0; padding: 40px 0 64px; }
    .wpa-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .wpa-wrap { padding: 0 16px; }
    .wpa-logo img { height: 40px; }
    body.wpa .wpa-buy { padding: 7px 12px; font-size: 15px; }
    .wpa-pitch-title { font-size: 34px; }
}
