/* Physics Access — sign in / sign up pages. Same tokens as pa-dashboard.css. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --pa-bg: #f4f5fb;
    --pa-surface: #ffffff;
    --pa-surface-2: #f8f9fd;
    --pa-border: #e7e9f3;
    --pa-text: #1d2240;
    --pa-muted: #6b7190;
    --pa-brand: #4f46e5;
    --pa-brand-600: #4338ca;
    --pa-brand-50: #eef0ff;
    --pa-teal: #0ea5a4;
    --pa-rose: #e11d48;
    --pa-rose-50: #ffecf0;
    --pa-green: #16a34a;
    --pa-green-50: #e9f8ef;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background: var(--pa-bg);
    color: var(--pa-text);
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--pa-brand); text-decoration: none; font-weight: 600; }
a:hover { color: var(--pa-brand-600); text-decoration: underline; }

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

/* ---------- Brand panel ---------- */
.auth-panel {
    position: relative; overflow: hidden; color: #fff;
    padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.16) 0, transparent 38%),
                radial-gradient(circle at 10% 90%, rgba(14,165,164,.55) 0, transparent 45%),
                linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #6d28d9 100%);
}
.auth-panel.author { background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.18) 0, transparent 38%),
                radial-gradient(circle at 10% 90%, rgba(79,70,229,.55) 0, transparent 45%),
                linear-gradient(135deg, #134e4a 0%, #0f766e 40%, #0ea5a4 100%); }
.auth-orbits { position: absolute; right: -220px; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); opacity: .22; pointer-events: none; }
.auth-home { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; font-weight: 600; position: relative; }
.auth-home:hover { text-decoration: none; opacity: .9; }
.auth-home .mark { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; }
.auth-pitch { position: relative; max-width: 460px; }
.auth-pitch .eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); margin-bottom: 18px; }
.auth-pitch h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 700; }
.auth-pitch p { margin: 0; font-size: 16px; opacity: .88; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.auth-points svg { flex: none; width: 28px; height: 28px; padding: 6px; border-radius: 9px; background: rgba(255,255,255,.16); }
.auth-foot { position: relative; font-size: 13px; opacity: .75; }

/* ---------- Form side ---------- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { display: block; height: 64px; width: auto; margin-bottom: 28px; }
.auth-card h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-sub { color: var(--pa-muted); margin: 0 0 28px; }

.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: var(--pa-rose-50); color: #9f1239; border: 1px solid #fecdd6; }
.alert-success { background: var(--pa-green-50); color: #166534; border: 1px solid #bbf7d0; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 7px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9aa0bd; pointer-events: none; }
.field input {
    width: 100%; height: 48px; padding: 0 44px; border-radius: 12px; font: inherit; color: var(--pa-text);
    border: 1px solid var(--pa-border); background: var(--pa-surface);
    transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #a7acc6; }
.field input:focus { outline: none; border-color: var(--pa-brand); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.toggle-pw {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: #8a90ad; cursor: pointer; padding: 8px; border-radius: 8px; display: grid; place-items: center;
}
.toggle-pw:hover { background: var(--pa-surface-2); color: var(--pa-text); }
.toggle-pw svg { width: 18px; height: 18px; }

.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--pa-muted); }
.pw-rules li { display: flex; align-items: center; gap: 6px; }
.pw-rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c5c9dc; flex: none; }
.pw-rules li.ok { color: var(--pa-green); }
.pw-rules li.ok::before { border-color: var(--pa-green); background: var(--pa-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/10px no-repeat; }
.match-hint { font-size: 13px; margin-top: 6px; min-height: 18px; }
.match-hint.bad { color: var(--pa-rose); }
.match-hint.good { color: var(--pa-green); }

.btn-auth {
    width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
    color: #fff; background: var(--pa-brand); margin-top: 6px;
    box-shadow: 0 8px 20px rgba(79,70,229,.25); transition: background .15s, transform .1s, box-shadow .15s;
}
.btn-auth:hover { background: var(--pa-brand-600); box-shadow: 0 10px 24px rgba(79,70,229,.32); }
.btn-auth:active { transform: translateY(1px); }
.btn-auth:disabled { background: #a5a8d6; box-shadow: none; cursor: not-allowed; }
.auth-switch { text-align: center; margin-top: 26px; color: var(--pa-muted); font-size: 14px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--pa-muted); font-weight: 500; }
.auth-back svg { width: 14px; height: 14px; }
.auth-legal { text-align: center; font-size: 12px; color: var(--pa-muted); margin-top: 32px; }
.auth-legal a { font-weight: 500; color: var(--pa-muted); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-panel { padding: 24px 20px 28px; min-height: 0; }
    .auth-pitch h1 { font-size: 26px; }
    .auth-pitch { margin-top: 22px; }
    .auth-points, .auth-foot, .auth-orbits { display: none; }
    .auth-main { padding: 32px 16px 40px; align-items: flex-start; }
    .auth-logo { height: 52px; margin-bottom: 20px; }
}
@media (max-width: 420px) {
    .pw-rules { grid-template-columns: 1fr; }
}
