/**
 * Sign-in and first-run setup.
 *
 * These two pages sit outside the app shell -- no grid, no status bar -- but
 * share its palette and its live backdrop, so they read as the same product
 * rather than a bolted-on gate. Everything here is scoped to .authbox so it
 * cannot leak into index.php, which loads base.css only.
 */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.authbox {
    position: relative;
    width: min(400px, 100%);
    border: 1px solid var(--rule);
    background: var(--panel);
    padding: 26px 22px 22px;
}

.authbox h1 {
    position: absolute;
    top: -0.72em;
    left: 10px;
    margin: 0;
    padding: 0 7px;
    background: var(--bg);
    color: var(--accent);
    font-size: 12px;
    font-weight: normal;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    cursor: default;
    user-select: none;
}

.authbox label {
    display: block;
    margin: 0 0 4px;
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.authbox .edit-field { width: 100%; }
.authbox .ghost-btn  { width: 100%; padding: 8px; }

/* Own the vertical rhythm here rather than hanging margins off each field. */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; }

.auth-lede {
    margin: 0 0 16px;
    color: var(--dim);
    font-size: 12.5px;
    line-height: 1.6;
}

.auth-hint {
    margin: 5px 0 0;
    color: var(--dim);
    font-size: 11px;
    line-height: 1.5;
}

.auth-error {
    margin: 0 0 14px;
    color: var(--accent2);
    font-size: 12px;
    line-height: 1.5;
}

.auth-note {
    margin: 0;
    color: var(--dim);
    font-size: 12px;
    line-height: 1.6;
}

.auth-note code {
    display: block;
    margin-top: 8px;
    padding: 8px;
    border: 1px dashed var(--rule);
    color: var(--fg);
    white-space: pre-wrap;
    word-break: break-all;
}

/* The two-step ribbon: setup asks for an account, then for a location. */
.auth-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
}
.auth-steps span { padding-bottom: 3px; border-bottom: 1px solid transparent; }
.auth-steps .now { color: var(--accent); border-bottom-color: var(--accent); }
.auth-steps .sep { opacity: 0.5; }

/* Geocoder results. Buttons, because each one performs an action. */
.auth-results { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }

.auth-results button {
    display: block;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid transparent;
    background: none;
    color: var(--fg);
    font: inherit;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}

.auth-results button:hover,
.auth-results button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.auth-current {
    margin: 0 0 14px;
    padding: 9px 11px;
    border: 1px solid var(--rule);
    color: var(--fg);
    font-size: 12.5px;
}
.auth-current span { color: var(--dim); }

.auth-search { display: flex; gap: 6px; }
.auth-search .edit-field { flex: 1 1 auto; }
.auth-search .ghost-btn  { width: auto; flex: none; padding: 8px 12px; }
