/*
 * Go4Database - sign in / sign up pages
 * Loaded only by resources/views/layouts/auth-go4.blade.php, and every rule is
 * scoped under .g4-auth so nothing here can leak into the app itself.
 */

.g4-auth {
    /* Straight from www.go4database.com and the logo file:
       green #6FD943, navy #0B132A, slate #64748B, wash #F1F5F9. */
    --g4-green: #6FD943;
    --g4-green-dark: #1F7A2E;
    --g4-green-soft: #EFFAE8;
    --g4-ink: #0B132A;
    --g4-ink-soft: #64748B;
    --g4-line: #E2E8F0;
    --g4-panel: #FFFFFF;

    margin: 0;
    background: #F1F5F9;
    color: var(--g4-ink);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.g4-auth * { box-sizing: border-box; }

.g4-shell {
    display: grid;
    /* The form column keeps a real width whatever the window does - the pitch
       panel gets whatever is left over, never the other way round. */
    grid-template-columns: minmax(0, 1fr) minmax(440px, 520px);
    min-height: 100vh;
}

/* ---------------------------------------------------------- left: the pitch */

.g4-brand {
    position: relative;
    padding: 48px 56px;
    color: var(--g4-ink);
    border-right: 1px solid var(--g4-line);
    background:
        radial-gradient(900px 460px at 8% -8%, rgba(111, 217, 67, .20), transparent 62%),
        radial-gradient(760px 420px at 102% 104%, rgba(111, 217, 67, .13), transparent 60%),
        linear-gradient(180deg, #FFFFFF 0%, #F7FCF3 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.g4-brand::after {
    content: "";
    position: absolute;
    inset: auto -20% -35% -20%;
    height: 55%;
    background: radial-gradient(closest-side, rgba(111, 217, 67, .10), transparent);
    pointer-events: none;
}

.g4-brand-logo img {
    height: 40px;
    width: auto;
    max-width: 230px;
    object-fit: contain;
}

.g4-brand-body {
    /* sits under the logo; spare height goes below, not between */
    margin: 0;
    position: relative;
    z-index: 1;
    padding: 44px 0 28px;
}

/* text on the left, the illustration on the right, stats under the text */
.g4-brand-body.has-visual {
    flex: 1;                       /* take the panel's spare height... */
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "text   visual"
        "stats  visual"
        ".      visual";           /* ...so the character can sit at the bottom */
    column-gap: 28px;
    align-items: start;
}

.g4-brand-text { grid-area: text; min-width: 0; }
.has-visual .g4-stats { grid-area: stats; }

.g4-brand-visual {
    grid-area: visual;
    align-self: end;
    justify-self: end;
    width: 100%;
    max-width: 340px;
    position: relative;
    padding-top: 24px;
}

.g4-brand-visual::before {
    /* soft green glow behind the character */
    content: "";
    position: absolute;
    inset: 30% 6% 0 6%;
    border-radius: 48% 48% 40% 40%;
    background: radial-gradient(closest-side, rgba(111, 217, 67, .30), rgba(111, 217, 67, 0));
    z-index: 0;
}

.g4-brand-visual img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: bottom;
}

/* a short green rule above the headline - quiet, no badge */
.g4-rule {
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 2px;
    background: var(--g4-green);
}

.g4-brand h1 {
    font-size: clamp(30px, 3.1vw, 44px);
    line-height: 1.15;
    font-weight: 700;
    margin: 18px 0 14px;
    letter-spacing: -.02em;
}

.g4-brand h1 em {
    font-style: normal;
    color: var(--g4-green-dark);
    /* a soft green highlight behind the words, like a marker pen */
    background: linear-gradient(180deg, transparent 62%, rgba(111, 217, 67, .30) 62%);
    padding: 0 2px;
    white-space: nowrap;           /* keep the highlighted phrase on one line... */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;   /* ...and if it must wrap, highlight each piece */
}

.g4-brand-sub {
    font-size: 16px;
    line-height: 1.6;
    color: var(--g4-ink-soft);
    max-width: 56ch;
    margin: 0 0 30px;
}

.g4-points {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: grid;
    gap: 16px;
}

.g4-points li {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.5;
    color: var(--g4-ink);
}

.g4-tick {
    flex: 0 0 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--g4-green);
    color: #08240B;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(111, 217, 67, .45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.g4-points strong { display: block; font-weight: 600; }
.g4-points span { color: var(--g4-ink-soft); font-size: 14px; }

.g4-stats {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
    padding-top: 26px;
    border-top: 1px solid var(--g4-line);
}

.g4-stat-value {
    font-size: 25px;
    font-weight: 700;
    color: var(--g4-ink);
    line-height: 1.2;
}

.g4-stat-label {
    font-size: 12.5px;
    color: var(--g4-ink-soft);
    letter-spacing: .02em;
}

.g4-brand-foot {
    position: relative;
    z-index: 1;
    margin-top: auto;
    font-size: 13px;
    color: #94A3B8;
}

.g4-brand-foot-support { display: none; }
.g4-brand-foot a { color: var(--g4-ink-soft); text-decoration: none; }
.g4-brand-foot a:hover { color: var(--g4-green-dark); }

/* --------------------------------------------------------- right: the form */

.g4-main {
    display: flex;
    flex-direction: column;
    padding: 22px 24px 16px;
    min-width: 0;
}

.g4-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    font-size: 14px;
    color: var(--g4-ink-soft);
    min-height: 36px;
}

.g4-topbar a {
    color: var(--g4-ink);
    text-decoration: none;
    font-weight: 600;
}

.g4-topbar a:hover { color: var(--g4-green-dark); }

.g4-topbar-logo { display: none; margin-right: auto; }
.g4-topbar-logo img { height: 34px; width: auto; }

.g4-card-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.g4-auth .card,
.g4-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--g4-line);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(16, 27, 51, .07);
    padding: 8px;
}

.g4-auth .card-body { padding: 24px 28px 26px; }

.g4-auth .card-body h2,
.g4-auth .card-body h4 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--g4-ink);
    margin: 0 0 6px;
}

.g4-lead {
    font-size: 14.5px;
    color: var(--g4-ink-soft);
    margin: 0 0 22px;
}

.g4-auth .form-group { margin-bottom: 14px; }

.g4-auth .form-label,
.g4-auth label.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--g4-ink);
    margin-bottom: 7px;
}

.g4-auth .form-control {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--g4-ink);
    background: #fff;
    border: 1px solid var(--g4-line);
    border-radius: 11px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.g4-auth .form-control::placeholder { color: #9AA4B8; }

.g4-auth .form-control:focus {
    outline: none;
    border-color: var(--g4-green-dark);
    box-shadow: 0 0 0 4px rgba(111, 217, 67, .25);
}

.g4-auth .form-control.is-invalid {
    border-color: #DC3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, .12);
}

/* show / hide password */
.g4-pass { position: relative; }
.g4-pass .form-control { padding-right: 46px; }

.g4-pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: none;
    color: var(--g4-ink-soft);
    cursor: pointer;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.g4-pass-toggle:hover { color: var(--g4-ink); background: #F3F5F9; }
.g4-pass-toggle svg { width: 19px; height: 19px; }

.g4-auth .btn-primary,
.g4-auth .btn.btn-primary {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 11px;
    background: var(--g4-green);
    color: #08240B;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: 0 8px 18px rgba(111, 217, 67, .38);
}

.g4-auth .btn-primary:hover { background: var(--g4-green-dark); color: #fff; }
.g4-auth .btn-primary:active { transform: translateY(1px); }
.g4-auth .btn-danger { border-radius: 11px; }

.g4-auth a { color: var(--g4-green-dark); }
.g4-auth a:hover { color: #15803D; }

.g4-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 14px;
}

.g4-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--g4-ink-soft);
    cursor: pointer;
    font-size: 14px;
}

.g4-check input { width: 16px; height: 16px; accent-color: var(--g4-green-dark); }

.g4-auth .alert {
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid transparent;
    margin-bottom: 18px;
}

.g4-auth .alert-danger { background: #FDEDEE; border-color: #F7C9CD; color: #9B2C2C; }
.g4-auth .alert-success { background: var(--g4-green-soft); border-color: #CDE8BC; color: #2F6B18; }

.g4-auth .invalid-feedback,
.g4-auth .text-danger,
.g4-auth .error {
    display: block;
    color: #C02B3A !important;
    font-size: 13px;
    margin-top: 6px;
}

.g4-hint {
    font-size: 12.5px;
    color: var(--g4-ink-soft);
    margin-top: 7px;
    line-height: 1.5;
}

.g4-switch {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14.5px;
    color: var(--g4-ink-soft);
}

.g4-switch a { font-weight: 600; text-decoration: none; }

.g4-secure {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--g4-line);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #7A8499;
}

.g4-secure svg { width: 15px; height: 15px; flex: 0 0 15px; }

.g4-foot {
    text-align: center;
    font-size: 12.5px;
    color: #8A93A6;
    padding: 6px 0 2px;
}

.g4-auth .g-recaptcha { margin-bottom: 4px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1440px) {
    /* laptops: a slightly narrower form column leaves the pitch more room */
    .g4-shell { grid-template-columns: minmax(0, 1fr) minmax(420px, 470px); }
    .g4-brand { padding: 40px 40px; }
    .g4-brand h1 { font-size: 33px; }
    .g4-brand-body.has-visual { grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); column-gap: 18px; }
    .g4-brand-visual img { max-height: 420px; }
}

@media (max-width: 1280px) {
    .g4-brand { padding: 36px 32px; }
    .g4-brand h1 { font-size: 31px; }
    .g4-brand-body.has-visual { grid-template-columns: minmax(0, 1fr) minmax(160px, 200px); }
    .g4-brand-visual img { max-height: 330px; }
}

@media (max-width: 1080px) {
    /* One column - and the form comes first, so a phone opens straight on it. */
    .g4-shell { grid-template-columns: 1fr; }

    .g4-main { order: 1; }
    .g4-brand { order: 2; }

    .g4-brand {
        padding: 30px 22px 34px;
        border-right: 0;
        border-top: 1px solid var(--g4-line);
    }

    .g4-brand-body { padding: 8px 0 0; margin: 0; max-width: 720px; }
    .g4-brand h1 { font-size: 28px; margin-top: 16px; }
    .g4-brand-sub { margin-bottom: 22px; font-size: 15px; }
    .g4-points { gap: 12px; margin-bottom: 24px; }
    .g4-stats { gap: 24px; padding-top: 20px; }
    .g4-stat-value { font-size: 21px; }

    /* tablet: the character sits beside the text, a little smaller */
    .g4-brand-body.has-visual { flex: none; grid-template-columns: minmax(0, 1fr) 220px; grid-template-rows: auto auto 0; align-items: end; }
    .g4-brand-visual img { max-height: 340px; }

    /* one footer, at the very bottom of the page */
    .g4-foot { display: none; }
    .g4-brand-foot { margin-top: 26px; }
    .g4-brand-foot-support { display: inline; }

    .g4-main { padding: 16px 16px 8px; }
    .g4-card-wrap { padding: 14px 0 6px; }
    .g4-auth .card-body { padding: 22px 20px 24px; }
}

@media (max-width: 1080px) {
    /* The logo lives in the top bar once the pitch panel moves below the form. */
    .g4-brand-logo { display: none; }
    .g4-topbar-logo { display: block; }
}

@media (max-width: 560px) {
    .g4-brand { padding: 24px 18px 26px; }
    .g4-brand h1 { font-size: 24px; }
    .g4-brand h1 em { white-space: normal; }   /* let the phrase wrap on a phone */
    .g4-brand-sub { font-size: 14.5px; }
    .g4-point-desc { display: none; }          /* titles only on a phone */

    /* phone: the character goes under the text, centred and small */
    .g4-brand-body.has-visual {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: "text" "visual" "stats";
        row-gap: 8px;
    }
    .g4-brand-visual { justify-self: center; max-width: 200px; margin: 4px 0 6px; }
    .g4-brand-visual img { max-height: 200px; }
    .g4-points { gap: 10px; margin-bottom: 20px; }

    .g4-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .g4-stat-value { font-size: 19px; }
    .g4-stat-label { font-size: 11.5px; }

    .g4-brand-foot { font-size: 12px; line-height: 1.7; }
    .g4-brand-foot-support { display: block; }
    .g4-main { padding: 12px 12px 6px; }
    .g4-auth .card { border-radius: 16px; padding: 6px; }
    .g4-auth .card-body { padding: 20px 16px 22px; }
    .g4-auth .card-body h2 { font-size: 23px; }
    .g4-topbar { font-size: 13.5px; }
}

/* ---------------------------------------------------------------------------
 * Compatibility: "forgot password", "reset password" and "verify email" still
 * use the old helper class names, so give those names sensible meanings here
 * instead of rewriting those pages.
 * ------------------------------------------------------------------------- */

.g4-auth .mt-2 { margin-top: 8px; }
.g4-auth .mt-4 { margin-top: 16px; }
.g4-auth .mb-3 { margin-bottom: 12px; }
.g4-auth .mb-4 { margin-bottom: 18px; }
.g4-auth .my-4 { margin: 18px 0; }
.g4-auth .text-center { text-align: center; }
.g4-auth .text-left { text-align: left; }
.g4-auth .text-sm, .g4-auth .text-xs { font-size: 13.5px; }
.g4-auth .text-lg { font-size: 14.5px; line-height: 1.6; color: var(--g4-ink-soft); }
.g4-auth .text-muted, .g4-auth .text-gray-600 { color: var(--g4-ink-soft); }
.g4-auth .text-primary { color: var(--g4-ink); }
.g4-auth .text-green-600 { color: var(--g4-green-dark); }
.g4-auth .font-weight-normal, .g4-auth .font-medium { font-weight: 700; }
.g4-auth .d-grid { display: block; }
.g4-auth .d-flex { display: flex; }
.g4-auth .f-w-600 { font-weight: 700; }
.g4-auth .row { display: flex; flex-wrap: wrap; gap: 10px; }
.g4-auth .col-auto { flex: 1 1 auto; }
.g4-auth .btn-block { width: 100%; }
.g4-auth .btn-sm { height: 44px; font-size: 14.5px; }

.g4-auth .btn-danger {
    width: 100%;
    height: 44px;
    border: 1px solid var(--g4-line);
    border-radius: 11px;
    background: #fff;
    color: #C02B3A;
    font-weight: 600;
    cursor: pointer;
}

.g4-auth .btn-danger:hover { background: #FDEDEE; }

.g4-auth .form-check-input { width: 16px; height: 16px; accent-color: var(--g4-green-dark); }
.g4-auth .form-check-label { font-size: 13.5px; color: var(--g4-ink-soft); }
