/* Colors come from theme-vars.css (see landing.css's identical note).
   Brand accent is the teal/blue gradient used everywhere else on the site
   (landing.css's .btn-primary, dashboard.css's panel buttons) -- this file
   used to run its own separate --gold accent, which is why login/signup/
   join/404 looked visually disconnected from the rest of the product. */
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Lato, sans-serif;
    position: relative;
    overflow: hidden;
}
/* Same soft radial-gradient wash as the landing hero (landing.css's
   .hero::before) so these auth screens read as the same product instead of
   a bare centered box on a flat background. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent-blue) 16%, transparent), transparent 55%),
        radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--accent-teal) 12%, transparent), transparent 55%);
    z-index: -1;
}
.theme-toggle-corner {
    position: fixed;
    top: 16px;
    right: 16px;
}
.card {
    width: 360px;
    max-width: calc(100vw - 40px);
    background: color-mix(in srgb, var(--bg2) 92%, transparent);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--shadow);
    animation: card-in 0.35s ease-out;
}
@keyframes card-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .card { animation: none; }
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.brand .mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    color: #06111f;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand .name {
    font-weight: 700;
    font-size: 18px;
}
h1 {
    font-size: 20px;
    margin: 0 0 20px;
}
label {
    display: block;
    font-size: 13px;
    color: var(--fg-muted);
    margin: 14px 0 6px;
}
input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 11px 13px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--fg);
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-teal) 18%, transparent);
}
/* Progressive email -> password reveal on login.html -- see its script.
   Fields fade/slide in on reveal rather than just snapping visible. */
.field-reveal {
    animation: field-in 0.25s ease-out;
}
@keyframes field-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .field-reveal { animation: none; }
}
.step-back {
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin: 0 0 14px;
    width: auto;
    text-decoration: none;
}
.step-back:hover { color: var(--fg); }
button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    color: #06111f;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-blue) 30%, transparent);
    filter: brightness(1.05);
}
button:active:not(:disabled) { transform: translateY(0); }
button.secondary {
    background: transparent;
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal);
}
button.secondary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent-teal) 10%, transparent);
    box-shadow: none;
    filter: none;
}
button:disabled { opacity: 0.6; cursor: not-allowed; }
.error {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    color: var(--danger-fg);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 14px;
}
.foot {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--fg-muted);
}
.foot a { color: var(--accent-teal); text-decoration: none; }
.code-box {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin: 16px 0;
}
.code-box .code {
    font-size: 22px;
    letter-spacing: 2px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.code-box .label {
    font-size: 12px;
    color: var(--fg-muted);
    margin-bottom: 6px;
}
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg-dim);
    font-size: 12px;
    margin: 20px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-strong);
}
.result {
    margin-top: 16px;
    font-size: 13px;
    color: var(--fg-muted);
    word-break: break-all;
}
/* OAuth sign-in buttons (login.html, signup.html) -- plain <a> links, not
   <button>, so they don't inherit the gradient `button {}` rule above.
   Neutral/bordered rather than each provider's official white pill --
   matches this app's dark aesthetic instead of breaking it with a stark
   white rectangle in dark mode. */
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-oauth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--fg);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-oauth:hover { background: var(--bg3); border-color: var(--fg-dim); }
.btn-oauth svg { flex-shrink: 0; }

/* iOS "Add to Home Screen" nudge (see public/pwa.js) -- duplicated from
   dashboard.css rather than shared, since this page (join.html) doesn't
   load that stylesheet at all. */
.pwa-install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg2);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    font-size: 13px;
    line-height: 1.4;
}
.pwa-install-banner button {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--fg-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
}
.pwa-install-banner button:hover { color: var(--fg); }
