/* Shared look for the OSIRS sign-in, password and registration pages. */
/* Text colour pairs are >= 4.5:1, control borders and focus rings >= 3:1. */
:root {
    --osl-ink: #0f172a; --osl-muted: #475569; --osl-line: #64748b; --osl-surface: #ffffff; --osl-page: #eef2f8;
    --osl-brand: #1d4ed8; --osl-brand-hover: #1e40af; --osl-panel: #0f2a5f; --osl-panel-2: #1e3a8a;
    --osl-focus: #1d4ed8; --osl-panel-focus: #bfdbfe;
}
body.osl-body {
    margin: 0; min-height: 100vh; background: var(--osl-page); color: var(--osl-ink);
    font-family: 'Kanit', 'Leelawadee UI', Tahoma, sans-serif; font-weight: 300; font-size: 1rem; line-height: 1.6;
}
.osl-skip { position: absolute; left: -9999px; top: 0; }
.osl-skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; border-radius: .5rem; background: #fff; color: var(--osl-ink); outline: 3px solid var(--osl-focus); }
.osl-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* Brand panel */
.osl-panel {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
    padding: clamp(2rem, 5vw, 3.5rem); color: #ffffff;
    background: radial-gradient(circle at 85% 10%, rgba(96, 165, 250, .35), transparent 45%), linear-gradient(150deg, var(--osl-panel) 0%, var(--osl-panel-2) 100%);
}
.osl-panel::after {
    content: ""; position: absolute; right: -6rem; bottom: -6rem; width: 22rem; height: 22rem; border-radius: 50%;
    border: 2.5rem solid rgba(255, 255, 255, .06); pointer-events: none;
}
.osl-logo { display: inline-flex; align-items: center; gap: .75rem; color: #ffffff; text-decoration: none; font-weight: 600; font-size: 1.25rem; letter-spacing: .04em; }
.osl-logo:hover { color: #ffffff; text-decoration: none; }
.osl-logo:focus-visible { outline: 3px solid var(--osl-panel-focus); outline-offset: 4px; border-radius: .5rem; }
.osl-mark { width: 2.75rem; height: 2.75rem; border-radius: .85rem; display: grid; place-items: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); }
.osl-mark svg { width: 1.5rem; height: 1.5rem; }
.osl-pitch { position: relative; z-index: 1; max-width: 32rem; }
.osl-eyebrow { margin: 0 0 .5rem; font-size: .95rem; font-weight: 400; color: #dbeafe; letter-spacing: .02em; }
.osl-pitch h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 500; line-height: 1.3; color: #ffffff; }
.osl-features { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: .85rem; }
.osl-features li { display: flex; gap: .75rem; align-items: flex-start; color: #e2e8f0; }
.osl-features svg { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin-top: .1rem; color: #93c5fd; }
.osl-panel-foot { position: relative; z-index: 1; margin: 0; font-size: .9rem; color: #cbd5e1; }

/* Form side */
.osl-main { display: flex; align-items: center; justify-content: center; padding: clamp(1.5rem, 5vw, 3rem) 1rem; }
.osl-card {
    width: 100%; max-width: 27rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 1.25rem; background: var(--osl-surface);
    border: 1px solid #dbe3ee; box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 18px 40px rgba(15, 23, 42, .10);
}
.osl-card h1 { margin: 0; font-size: 1.75rem; font-weight: 500; line-height: 1.3; color: var(--osl-ink); }
.osl-sub { margin: .35rem 0 1.5rem; color: var(--osl-muted); }
.osl-alert { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1.25rem; padding: .75rem .9rem; border-radius: .75rem; border: 1px solid; font-weight: 400; }
.osl-alert svg { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin-top: .15rem; }
.osl-alert-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.osl-alert-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.osl-alert:focus { outline: 3px solid var(--osl-focus); outline-offset: 2px; }
.osl-field { margin-bottom: 1.1rem; }
.osl-field label { display: block; margin-bottom: .35rem; font-weight: 500; color: var(--osl-ink); }
.osl-input-wrap { position: relative; }
.osl-input-wrap > svg { position: absolute; left: .85rem; top: 50%; width: 1.2rem; height: 1.2rem; transform: translateY(-50%); color: #64748b; pointer-events: none; }
.osl-input {
    display: block; width: 100%; min-height: 3rem; padding: .6rem .9rem .6rem 2.7rem; border: 1px solid var(--osl-line); border-radius: .75rem;
    background: #ffffff; color: var(--osl-ink); font: inherit; font-weight: 400;
}
.osl-input.osl-has-toggle { padding-right: 3.25rem; }
.osl-input:hover { border-color: #334155; }
.osl-input:focus { outline: 3px solid var(--osl-focus); outline-offset: 1px; border-color: var(--osl-focus); }
.osl-toggle {
    position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; border: 0; border-radius: .6rem;
    display: grid; place-items: center; background: transparent; color: #475569; cursor: pointer;
}
.osl-toggle:hover { background: #f1f5f9; color: var(--osl-ink); }
.osl-toggle:focus-visible { outline: 3px solid var(--osl-focus); outline-offset: 0; }
.osl-toggle svg { width: 1.3rem; height: 1.3rem; }
.osl-submit {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3rem; margin-top: .4rem;
    border: 0; border-radius: .75rem; background: var(--osl-brand); color: #ffffff; font: inherit; font-weight: 500; font-size: 1.05rem; cursor: pointer;
}
.osl-submit:hover { background: var(--osl-brand-hover); }
.osl-submit:focus-visible { outline: 3px solid var(--osl-focus); outline-offset: 3px; }
.osl-submit svg { width: 1.2rem; height: 1.2rem; }
.osl-links { margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid #e2e8f0; list-style: none; display: grid; gap: .5rem; }
.osl-links a { display: inline-flex; align-items: center; min-height: 1.75rem; color: var(--osl-brand); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.osl-links a:hover { color: var(--osl-brand-hover); }
.osl-links a:focus-visible { outline: 3px solid var(--osl-focus); outline-offset: 2px; border-radius: .25rem; }
.osl-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
    .osl-shell { grid-template-columns: 1fr; }
    .osl-panel { gap: 1rem; padding: 1.5rem 1.25rem 1.75rem; }
    .osl-panel::after { display: none; }
    .osl-pitch h2 { font-size: 1.35rem; }
    .osl-features, .osl-panel-foot { display: none; }
    .osl-main { align-items: flex-start; padding-top: 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
    .osl-submit, .osl-input, .osl-toggle { transition: background-color .15s ease, border-color .15s ease; }
}

/* Extras for the password and registration pages */
.osl-card-wide { max-width: 32rem; }
.osl-step { display: inline-block; margin: 0 0 .5rem; padding: .1rem .7rem; border-radius: 999px; background: #e8efff; color: #1e40af; font-size: .9rem; font-weight: 500; }
.osl-hint { display: block; margin-top: .35rem; color: var(--osl-muted); font-size: .9rem; }
.osl-optional { font-weight: 300; color: var(--osl-muted); }
.osl-input[readonly] { background: #f1f5f9; color: #334155; cursor: default; }
.osl-identity { margin: 0 0 1.25rem; padding: .85rem 1rem; border-radius: .75rem; background: #f8fafc; border: 1px solid #cbd5e1; }
.osl-identity p { margin: 0; color: var(--osl-muted); }
.osl-identity strong { display: block; font-size: 1.35rem; font-weight: 500; color: var(--osl-ink); word-break: break-all; }
.osl-btn-link {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3rem;
    border-radius: .75rem; background: var(--osl-brand); color: #ffffff; font-weight: 500; text-decoration: none;
}
.osl-btn-link:hover { background: var(--osl-brand-hover); color: #ffffff; text-decoration: none; }
.osl-btn-link:focus-visible { outline: 3px solid var(--osl-focus); outline-offset: 3px; }
.osl-btn-link svg { width: 1.2rem; height: 1.2rem; }
