:root {
    --groc-yellow: #ffd400;
    --groc-yellow-soft: #fff4b7;
    --groc-black: #121212;
    --groc-ink: #202020;
    --groc-muted: #6f706f;
    --groc-line: #deded9;
    --groc-surface: #f6f6f2;
    --groc-white: #fff;
    --groc-danger: #b42318;
    --groc-danger-bg: #fef3f2;
    --groc-warning: #805d00;
    --groc-warning-bg: #fff9df;
    --groc-info: #175cd3;
    --groc-info-bg: #eff8ff;
    --font-display: "Manrope", system-ui, sans-serif;
    --font-body: "DM Sans", system-ui, sans-serif;
    --shadow-card: 0 24px 70px rgba(17, 17, 17, .12);
    --radius-lg: 28px;
    --radius-md: 15px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    font-family: var(--font-body);
    background: var(--groc-surface);
}

body {
    margin: 0;
    color: var(--groc-ink);
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.d-none {
    display: none !important;
}

.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    background: var(--groc-surface);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(520px, .95fr);
    min-height: 100vh;
    min-height: 100svh;
}

.auth-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    padding: clamp(34px, 5vw, 72px);
    color: var(--groc-white);
    background:
        radial-gradient(circle at 85% 16%, rgba(255, 212, 0, .22), transparent 24%),
        linear-gradient(145deg, #0d0d0d 5%, #181818 72%, #242100 130%);
}

.auth-brand::before,
.auth-brand::after {
    position: absolute;
    z-index: -1;
    content: "";
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
}

.auth-brand::before {
    width: 480px;
    height: 480px;
    right: -205px;
    bottom: 3%;
}

.auth-brand::after {
    width: 260px;
    height: 260px;
    right: -95px;
    bottom: 18%;
    border-color: rgba(255, 212, 0, .2);
}

.brand-copy {
    max-width: 650px;
    margin: auto 0;
    padding: 80px 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: #a5a5a0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.brand-copy .eyebrow {
    color: var(--groc-yellow);
}

.brand-copy h1 {
    max-width: 660px;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(48px, 5.4vw, 82px);
    line-height: .99;
    letter-spacing: -.055em;
}

.brand-lead {
    max-width: 535px;
    margin: 28px 0 0;
    color: #bdbdb7;
    font-size: clamp(17px, 1.45vw, 21px);
    line-height: 1.65;
}

.brand-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa9a4;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--groc-yellow);
    box-shadow: 0 0 0 5px rgba(255, 212, 0, .12);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 72px);
}

.auth-card {
    width: min(100%, 480px);
    padding: clamp(30px, 4vw, 50px);
    border: 1px solid rgba(18, 18, 18, .08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

.auth-heading h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(30px, 3vw, 40px);
    letter-spacing: -.04em;
}

.auth-heading > p:last-child {
    margin: 12px 0 0;
    color: var(--groc-muted);
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 22px;
    margin-top: 34px;
}

.field {
    display: grid;
    gap: 9px;
}

.field label {
    color: #343532;
    font-size: 14px;
    font-weight: 600;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.field-label-row a {
    color: #5c5d58;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.field-label-row a:hover {
    color: var(--groc-black);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.field-control {
    position: relative;
    display: flex;
    align-items: center;
}

.field-control > svg {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #81827c;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    pointer-events: none;
}

.field-control input {
    width: 100%;
    height: 56px;
    padding: 0 50px 0 49px;
    color: var(--groc-ink);
    border: 1px solid var(--groc-line);
    border-radius: var(--radius-md);
    outline: none;
    background: var(--groc-white);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field-control input::placeholder {
    color: #a1a29d;
}

.field-control input:focus {
    border-color: #7b6b00;
    box-shadow: 0 0 0 4px rgba(255, 212, 0, .22);
}

.password-toggle {
    position: absolute;
    right: 10px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: #7f807b;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--groc-black);
    background: #f2f2ed;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.password-toggle.is-visible {
    color: #6d5c00;
    background: var(--groc-yellow-soft);
}

.primary-button,
.secondary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
    gap: 12px;
    margin-top: 5px;
    padding: 0 20px;
    color: var(--groc-black);
    border: 1px solid var(--groc-yellow);
    background: var(--groc-yellow);
    box-shadow: 0 12px 24px rgba(184, 151, 0, .2);
    cursor: pointer;
}

.primary-button > svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #ffdd32;
    box-shadow: 0 16px 28px rgba(184, 151, 0, .25);
}

.primary-button:disabled {
    cursor: wait;
    opacity: .7;
}

.secondary-button {
    padding: 0 18px;
    border: 1px solid var(--groc-line);
    background: var(--groc-white);
}

.secondary-button:hover {
    transform: translateY(-1px);
    border-color: #b8b8b1;
    background: #fafaf7;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
    color: #9a9b96;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: var(--groc-line);
}

.auth-help {
    margin: 28px 0 0;
    color: var(--groc-muted);
    font-size: 13px;
    text-align: center;
}

.auth-help a {
    color: var(--groc-black);
    font-weight: 700;
    text-underline-offset: 3px;
}

.auth-legal {
    margin: 28px 0 0;
    color: #92938e;
    font-size: 12px;
    text-align: center;
}

.notice {
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.notice-warning,
.alert-warning {
    color: var(--groc-warning);
    border-color: #f5df8c;
    background: var(--groc-warning-bg);
}

.notice-info,
.alert-info {
    color: var(--groc-info);
    border-color: #b2ddff;
    background: var(--groc-info-bg);
}

.alert-danger {
    color: var(--groc-danger);
    border-color: #fecdca;
    background: var(--groc-danger-bg);
}

.notice code {
    font-size: .95em;
}

.spinner-border {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(18, 18, 18, .28);
    border-top-color: var(--groc-black);
    border-radius: 50%;
    vertical-align: -3px;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
        padding: 28px clamp(24px, 7vw, 64px) 38px;
    }

    .brand-copy {
        padding: 58px 0 45px;
    }

    .brand-copy h1 {
        max-width: 560px;
        font-size: clamp(42px, 9vw, 68px);
    }

    .brand-status {
        display: none;
    }

    .auth-panel {
        padding: 42px 22px;
    }
}

@media (max-width: 560px) {
    .auth-brand {
        padding: 22px 22px 30px;
    }

    .brand-copy {
        padding: 42px 0 8px;
    }

    .brand-copy h1 {
        font-size: clamp(38px, 12vw, 54px);
    }

    .brand-lead {
        margin-top: 20px;
        font-size: 16px;
    }

    .auth-panel {
        padding: 26px 14px 34px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 22px;
        box-shadow: 0 14px 40px rgba(17, 17, 17, .09);
    }

    .auth-form {
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
