/**
 * ToolClinic — unified auth design system.
 *
 * Replaces 436 lines of CSS duplicated across seven standalone login and
 * registration pages, each of which had drifted its own way. One stylesheet,
 * one set of tokens, one set of components.
 */

:root {
    --auth-brand:      #e25101;
    --auth-brand-dark: #c44601;
    --auth-navy-900:   #0b1f3a;
    --auth-navy-700:   #1b4079;
    --auth-slate-800:  #1e293b;
    --auth-slate-700:  #334155;
    --auth-slate-500:  #64748b;
    --auth-slate-300:  #cbd5e1;
    --auth-slate-200:  #e2e8f0;
    --auth-slate-50:   #f8fafc;
    --auth-radius:     12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--auth-slate-800);
    background: var(--auth-navy-900);
}

/* ---------- shell ---------- */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    background: linear-gradient(135deg, var(--auth-navy-900) 0%, #12305a 45%, var(--auth-navy-700) 100%);
    position: relative;
    overflow: hidden;
}

.auth-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 72% 45%, rgba(226, 81, 1, 0.18) 0%, transparent 62%);
    pointer-events: none;
}

.auth-home {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px 0 13px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(15, 37, 71, 0.14);
    box-shadow: 0 2px 10px rgba(15, 37, 71, 0.12);
    color: #0f2547;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease-out, color .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out;
}
.auth-home svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-home span { white-space: nowrap; }
.auth-home:hover { background: #0f2547; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 37, 71, 0.2); }
.auth-home:focus-visible { outline: 2px solid #0f2547; outline-offset: 2px; }
@media (max-width: 480px) { .auth-home span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .auth-home { padding: 0; width: 40px; justify-content: center; } }

/* ---------- form panel ---------- */
.auth-main {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    z-index: 2;
}

.auth-card { width: 100%; max-width: 430px; }

.auth-logo { margin-bottom: 1.75rem; }
.auth-logo img { height: 46px; width: auto; }

.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--auth-slate-800);
    margin: 0 0 6px;
}

.auth-subtitle {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--auth-slate-500);
    margin: 0 0 1.75rem;
}

/* ---------- steps ---------- */
.auth-steps { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.auth-steps li {
    flex: 1 1 0;
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 600; color: var(--auth-slate-300);
    padding-bottom: 9px; border-bottom: 2px solid var(--auth-slate-200);
}
.auth-steps li span {
    width: 22px; height: 22px; flex: 0 0 auto;
    border-radius: 50%; background: var(--auth-slate-200); color: var(--auth-slate-500);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800;
}
.auth-steps li.is-current { color: var(--auth-slate-800); border-bottom-color: var(--auth-brand); }
.auth-steps li.is-current span { background: var(--auth-brand); color: #fff; }
.auth-steps li.is-done { color: #16a34a; border-bottom-color: #16a34a; }
.auth-steps li.is-done span { background: #16a34a; color: #fff; }

/* ---------- fields ---------- */
.auth-field { margin-bottom: 1rem; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.auth-label {
    display: block;
    font-size: 0.82rem; font-weight: 600;
    color: var(--auth-slate-700);
    margin-bottom: 6px;
}
.auth-label .req { color: #dc2626; margin-left: 2px; }

.auth-input {
    width: 100%;
    padding: 0.72rem 0.95rem;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--auth-slate-800);
    background: var(--auth-slate-50);
    border: 1.5px solid var(--auth-slate-200);
    border-radius: 10px;
    transition: border-color .2s ease-out, box-shadow .2s ease-out, background-color .2s ease-out;
}
.auth-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 4px rgba(226, 81, 1, 0.12);
}
textarea.auth-input { min-height: 84px; resize: vertical; }

.auth-hint { display: block; margin-top: 5px; font-size: 0.75rem; line-height: 1.45; color: #94a3b8; }
.auth-error { margin: 5px 0 0; font-size: 0.8rem; color: #dc2626; }

/* ---------- alerts ---------- */
.auth-alert {
    margin: 1rem 0 0;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
}
.auth-alert-ok  { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.auth-alert-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ---------- buttons ---------- */
.auth-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out;
}
.auth-btn-primary {
    margin-top: 1.25rem;
    background: var(--auth-brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(226, 81, 1, 0.32);
}
.auth-btn-primary:hover { background: var(--auth-brand-dark); transform: translateY(-2px); }
.auth-btn:focus-visible { outline: 2px solid var(--auth-brand); outline-offset: 3px; }

.auth-meta { display: block; margin-top: 14px; font-size: 0.83rem; color: var(--auth-slate-500); }
.auth-meta a { color: var(--auth-brand); font-weight: 600; text-decoration: none; }
.auth-meta a:hover { text-decoration: underline; }

/* ---------- alternate portals ---------- */
.auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
    z-index: 2;
}
.auth-aside-title { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 6px; }
.auth-aside-sub { font-size: 0.88rem; color: rgba(255, 255, 255, 0.62); margin: 0 0 1.75rem; }

.auth-alt-list { display: flex; flex-direction: column; gap: 12px; max-width: 340px; margin: 0; padding: 0; list-style: none; }

.auth-alt {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.87rem; font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease-out, border-color .2s ease-out, transform .2s ease-out;
}
.auth-alt:hover {
    background: rgba(226, 81, 1, 0.2);
    border-color: rgba(226, 81, 1, 0.42);
    color: #fff;
    transform: translateX(4px);
}
.auth-alt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.auth-alt-icon {
    width: 34px; height: 34px; flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
    .auth-main { padding: 4.5rem 1.5rem 2.5rem; }
    .auth-aside { padding: 2.5rem 1.5rem 3.5rem; }
    .auth-alt-list { max-width: none; }
}

@media (max-width: 575.98px) {
    .auth-row { grid-template-columns: 1fr; gap: 0; }
    .auth-title { font-size: 1.35rem; }
    .auth-main { padding: 4rem 1.15rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: .001ms !important; }
    .auth-alt:hover, .auth-btn-primary:hover, .auth-home:hover { transform: none; }
}
