/* Login, sign-up, password and verification pages.
   Colors, type, .btn, .logo and .theme-toggle come from landing.css. */

:root {
    --field-line: #6F7396;
    --error: #B3261E;
    --panel-mark: var(--navy);
}

:root[data-theme='dark'] {
    --field-line: #8387B0;
    --error: #FF9C8A;
    --panel-mark: var(--saffron);
}

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth__main { display: flex; flex-direction: column; padding: 8px clamp(16px, 4vw, 48px) 40px; }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.auth__body { width: 100%; max-width: 420px; margin: auto; padding-top: 24px; }
.auth__body h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.auth__lede { margin-top: 10px; color: var(--muted); }

.auth__status {
    margin-top: 20px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: 8px;
    font-weight: 500;
}

.auth__form { margin-top: 28px; }

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 1rem; }
.field__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; }
.field__head a { margin-bottom: 6px; font-size: .9375rem; text-underline-offset: 3px; }

.field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    background: var(--paper);
    color: var(--ink);
    border: 1.5px solid var(--field-line);
    border-radius: 10px;
    font: 400 1.0625rem/1.2 var(--body);
}
.field input:hover { border-color: var(--ink); }
.field input:focus { outline: 3px solid var(--saffron); outline-offset: 0; border-color: var(--ink); }
.field input[aria-invalid='true'] { border-color: var(--error); }
.field__error { margin-top: 6px; color: var(--error); font-size: .9375rem; font-weight: 500; }

.field__password { position: relative; }
.field__password input { padding-right: 84px; }
.field__password button {
    position: absolute;
    top: 5px;
    right: 5px;
    height: 40px;
    min-width: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    font: 700 .9375rem/1 var(--body);
    cursor: pointer;
}
.field__password button:hover { background: var(--surface); }

.auth__remember { display: inline-flex; align-items: center; gap: 10px; padding-block: 4px; cursor: pointer; }
.auth__remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--saffron); }

.auth__submit { display: block; width: 100%; margin-top: 20px; border: 0; cursor: pointer; }
.auth__submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.auth__form fieldset { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
.auth__form legend { padding: 0; margin-bottom: 14px; font: 700 1.1875rem/1.25 var(--display); }

.auth__terms { align-items: flex-start; cursor: default; }
.auth__terms input { flex: none; margin-top: 3px; cursor: pointer; }
.auth__terms a { text-underline-offset: 3px; }

.auth__linkbtn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: 700 1em/inherit var(--body);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* Phone field: the country picker from layouts.common */
.field .iti { display: block; width: 100%; }
.iti__country-list { background: var(--paper); color: var(--ink); border-color: var(--line); }
.iti__country.iti__highlight { background: var(--surface); }
.iti__dial-code { color: var(--muted); }
.field .iti__selected-dial-code { color: var(--ink); }

.auth__alt { margin-top: 24px; color: var(--muted); }
.auth__alt a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

.auth__social { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.auth__social p { width: 100%; color: var(--muted); }
.auth__social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1.5px solid var(--field-line);
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}
.auth__social img { width: 20px; height: 20px; object-fit: contain; }

.auth__demo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.auth__demo button {
    padding: 8px 14px;
    border: 1.5px solid var(--field-line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: 500 .9375rem/1.2 var(--body);
    cursor: pointer;
}

/* Order confirmation: a kitchen ticket, paper-colored in both themes. */
.ticket {
    margin-top: 28px;
    padding: 22px 22px 24px;
    background: var(--sheet);
    color: var(--navy);
    border: 1px solid rgba(20, 23, 61, .18);
    border-top: 3px dashed var(--navy);
    box-shadow: 0 12px 28px rgba(7, 9, 32, .16);
}
.ticket__label { font-weight: 700; }
.ticket__number {
    margin-top: 2px;
    font: 800 clamp(2.75rem, 9vw, 4rem)/1 var(--display);
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}
.ticket__thanks { margin-top: 14px; padding-top: 12px; border-top: 2px dotted rgba(20, 23, 61, .45); }

.auth__actions { margin-top: 16px; }
.auth__actions .auth__submit { margin-top: 10px; }
.auth__submit--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* The panel's mark is the corner square of a QR code, cropped by the edge. */
.auth__panel {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow: hidden;
    padding: clamp(40px, 6vw, 80px);
    background: var(--hero-bg);
    color: var(--hero-ink);
}
.auth__panel p {
    position: relative;
    max-width: 11em;
    font: 800 clamp(2.75rem, 5.2vw, 4.75rem)/1 var(--display);
    letter-spacing: -.03em;
    font-variation-settings: 'opsz' 96;
}
.auth__finder {
    position: absolute;
    right: -12vmin;
    bottom: -12vmin;
    width: 62vmin;
    height: 62vmin;
    border: 9vmin solid var(--panel-mark);
}
.auth__finder::after {
    content: '';
    position: absolute;
    inset: 9vmin;
    background: var(--panel-mark);
}

@media (max-width: 860px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__panel { display: none; }
    .auth__body { margin-top: 16px; margin-bottom: auto; }
}
