/* ==========================================================================
   gg-auth.css — Login page (route: /login)
   Loaded only on /login via conditional in layouts/frontend.blade.php.
   Depends on the design tokens declared in gg-base.css critical inline CSS
   (--gg-primary, --gg-surface, --gg-text-muted, --gg-radius, …).
   ========================================================================== */

.gg-auth {
    min-height: calc(100vh - var(--gg-navbar-h, 64px));
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    background: var(--gg-bg);
    overflow: hidden;
    position: relative;
}

@media (max-width: 900px) {
    .gg-auth {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

/* --- left panel: brand / value props / animated mesh ------------------------ */
.gg-auth__panel {
    position: relative;
    padding: 4rem 3.5rem;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #ff432c 0%, #ff7a18 45%, #ff9301 100%);
}

@media (max-width: 900px) {
    .gg-auth__panel { padding: 2.5rem 1.5rem; }
}

/* Animated mesh — three soft conic blobs that drift on a 12s loop.
   Pure CSS, GPU-composited (transform-only), pauses if user prefers reduced motion. */
.gg-auth__panel::before,
.gg-auth__panel::after {
    content: "";
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    z-index: -1;
    will-change: transform;
}
.gg-auth__panel::before {
    background: radial-gradient(circle, #ffd166 0%, transparent 65%);
    top: -25%;
    left: -20%;
    animation: gg-auth-drift-a 14s ease-in-out infinite alternate;
}
.gg-auth__panel::after {
    background: radial-gradient(circle, #ef476f 0%, transparent 65%);
    bottom: -30%;
    right: -25%;
    animation: gg-auth-drift-b 16s ease-in-out infinite alternate;
}

@keyframes gg-auth-drift-a {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(8%, 6%, 0) scale(1.15); }
}
@keyframes gg-auth-drift-b {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-6%, -8%, 0) scale(1.2); }
}

.gg-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
}
.gg-auth__brand img {
    width: 36px; height: 36px;
    border-radius: 8px;
}

.gg-auth__hero {
    margin-top: 5rem;
    max-width: 460px;
    animation-delay: .1s;
}
@media (max-width: 900px) {
    .gg-auth__hero { margin-top: 2rem; }
}

.gg-auth__hero h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.8rem);
    line-height: 1.1;
    font-weight: 800;
    margin: 0 0 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}
.gg-auth__hero p {
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.92);
    margin: 0 0 2rem;
}

.gg-auth__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}
.gg-auth__points li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255,255,255,0.95);
    font-size: 0.96rem;
    line-height: 1.45;
}
.gg-auth__points svg {
    flex: 0 0 22px;
    width: 22px; height: 22px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    padding: 4px;
    color: #fff;
}

/* --- right panel: the card ------------------------------------------------- */
.gg-auth__card-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--gg-surface);
}

.gg-auth__card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gg-auth__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gg-text);
    margin: 0;
    letter-spacing: -0.01em;
}
.gg-auth__subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--gg-text-muted);
    margin: 0;
}

/* Google button — Material-inspired, white background, hover lift */
.gg-auth__google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 1.5px solid var(--gg-border);
    background: #fff;
    color: #18181b;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--gg-radius, 8px);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.gg-auth__google:hover,
.gg-auth__google:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -6px rgba(0,0,0,0.18);
    border-color: #c7c8cc;
    color: #18181b;
}
.gg-auth__google:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.gg-auth__google svg { width: 20px; height: 20px; flex: 0 0 20px; }

/* "Recommended · 1-click" treatment around the Google button */
.gg-auth__google-wrap {
    position: relative;
    margin-top: .5rem;
    padding-top: 1.1rem;
}
.gg-auth__google-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: .25rem .7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px -3px rgba(34, 197, 94, .5);
    white-space: nowrap;
    z-index: 1;
}
.gg-auth__google--recommended {
    border-color: rgba(34, 197, 94, .55);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12), 0 2px 6px rgba(0, 0, 0, .04);
}
.gg-auth__google--recommended:hover,
.gg-auth__google--recommended:focus-visible {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18), 0 8px 20px -6px rgba(34, 197, 94, .35);
}
.gg-auth__google-hint {
    margin: .55rem 0 0;
    text-align: center;
    font-size: .8rem;
    color: var(--gg-text-muted);
}

.gg-auth__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gg-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.gg-auth__divider::before,
.gg-auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--gg-border);
}

/* Admin sign-in lives at its own URL (/admin/login). The .gg-auth__field
   / .gg-auth__input / .gg-auth__submit rules below are reused by that
   page's card, so keep them — only the old toggle UI is gone. */
.gg-auth__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.gg-auth__field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gg-text);
}
.gg-auth__input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--gg-border);
    border-radius: var(--gg-radius-sm, 6px);
    background: var(--gg-surface);
    color: var(--gg-text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.gg-auth__input:focus {
    outline: none;
    border-color: var(--gg-primary);
    box-shadow: 0 0 0 3px rgba(255,85,31,0.18);
}

.gg-auth__submit {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--gg-primary);
    color: #fff;
    border: none;
    border-radius: var(--gg-radius, 8px);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}
.gg-auth__submit:hover { background: var(--gg-primary-hover, #ff3d00); }
.gg-auth__submit:active { transform: scale(.99); }

.gg-auth__alert {
    padding: 0.7rem 0.9rem;
    border-radius: var(--gg-radius-sm, 6px);
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 0.88rem;
    line-height: 1.45;
}

.gg-auth__email-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.25rem;
}
.gg-auth__email-form .gg-auth__field { gap: 0.45rem; }

/* Label row puts "Password" on the left + "Forgot?" on the right. The
   `flex` with `justify-content: space-between` must beat the generic
   `.gg-auth__field label` block-level rule above, so we re-declare label
   display here so the property doesn't get clobbered by source order. */
label.gg-auth__field-label-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
label.gg-auth__field-label-row > span:first-child {
    flex: 1;
    min-width: 0;
}

.gg-auth__forgot-inline {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gg-text-muted) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}
.gg-auth__forgot-inline:hover { color: var(--gg-primary) !important; }

.gg-auth__remember {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--gg-text-muted);
    cursor: pointer;
    user-select: none;
    margin: 0.15rem 0 0.25rem;
}
.gg-auth__remember input { accent-color: var(--gg-primary); width: 16px; height: 16px; }

/* Autofill yellow → match theme. Chrome paints a lavender/yellow box on
   credentials prefill which clashed with the dark card. */
.gg-auth__input:-webkit-autofill,
.gg-auth__input:-webkit-autofill:hover,
.gg-auth__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--gg-text);
    -webkit-box-shadow: 0 0 0 1000px var(--gg-surface) inset;
    transition: background-color 9999s ease-out;
    caret-color: var(--gg-text);
}

.gg-auth__legal {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--gg-text-muted);
    margin: 0;
    text-align: center;
}
.gg-auth__legal a {
    color: var(--gg-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gg-auth__legal a:hover { color: var(--gg-primary); }

/* --- entrance animations --------------------------------------------------- */
.gg-auth__hero,
.gg-auth__card > * {
    opacity: 0;
    transform: translateY(10px);
    animation: gg-auth-fade .55s ease forwards;
}
.gg-auth__card > *:nth-child(1) { animation-delay: .05s; }
.gg-auth__card > *:nth-child(2) { animation-delay: .12s; }
.gg-auth__card > *:nth-child(3) { animation-delay: .2s; }
.gg-auth__card > *:nth-child(4) { animation-delay: .28s; }
.gg-auth__card > *:nth-child(5) { animation-delay: .36s; }
.gg-auth__card > *:nth-child(6) { animation-delay: .44s; }
.gg-auth__card > *:nth-child(7) { animation-delay: .52s; }

@keyframes gg-auth-fade {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .gg-auth__panel::before,
    .gg-auth__panel::after { animation: none; }
    .gg-auth__hero,
    .gg-auth__card > * { animation: none; opacity: 1; transform: none; }
    .gg-auth__google { transition: none; }
}

/* The dedicated layouts.auth template has no navbar/footer padding, so
   the grid hugs the viewport edge naturally. */
.gg-auth-wrap { margin: 0; }
