/*
 * Sign-in page styles — its own stylesheet, for the same reason
 * style_register.css is its own: this page's layout (a full-viewport
 * two-column split, a feature list, a security panel) is a different shape
 * from Activate, which still uses style_login.css's single centred card.
 * Keeping this separate means nothing here can change how Activate looks,
 * and nothing there can leak into this one.
 *
 * The shell/left-column rules below intentionally mirror style_register.css's
 * own (same tokens, same proportions) so Sign in and Register read as one
 * design system, without either file importing or modifying the other.
 */

:root {
    --ink: #1C2433;
    --ink-2: #414D5F;
    --ink-3: #5A6675;
    --ink-4: #7B8794;
    /* Sampled from the illustration asset's own baked-in background
       (login_image.png corners are #F4FAFE–#F5FBFF). Using that exact tone
       as the page ground is what makes the artwork sit directly on the page
       with no visible rectangle around it — the "blend" is a colour match,
       not an image edit. Change one and you must change the other. */
    --page: #F5FAFE;
    --surface: #FFFFFF;
    --border: #D8DDE4;
    --border-input: #C2C9D4;
    --border-soft: #EDF0F4;
    --navy: #16233A;
    --danger: #B42318;
    --danger-bg: #FAE9E7;
    --danger-border: #ECC8C3;
    --accent-tint: #E8EDF8;
    --info-bg: #EDF2FA;
    --info-border: #C6D6EE;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #16337F; text-decoration: underline; }

.si-shell { min-height: 100vh; display: flex; flex-direction: column; }

.si-header { padding: 18px 44px 0; }
.si-logo { height: 24px; width: auto; display: block; }

.si-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 44px 14px;
}

.si-grid {
    display: flex;
    align-items: flex-start;
    gap: 84px;
    max-width: 1236px;
    width: 100%;
}

/* --------------------------------------------------------------- left column */

.si-left { flex: 1 1 532px; max-width: 570px; }

/* The only heading on this side — the logo above already carries the Myka
   brand mark, so there is no separate "Myka Practice" line here. */
.si-heading {
    font-size: 30px; font-weight: 700; letter-spacing: -0.01em;
    color: var(--navy); margin: 0; line-height: 1.2;
    /* Breaks the line after "Compliance", as the approved reference shows. */
    max-width: 475px;
}
.si-lead {
    font-size: 13px; color: var(--ink-3); margin: 11px 0 0; line-height: 1.6;
    max-width: 440px;
}

/* The artwork's baked-in background is the page background (see --page), so
   this frame has no visible edge — it exists only to size the picture.
   The source carries wide empty margins (content ends at ~61% of the width
   and sits clear of the top edge), so the frame is capped and the image
   cropped left-of-centre to keep the drawn content, not the whitespace.
   The height cap is what lets the whole page fit a 1536×864 viewport;
   the artwork itself is untouched. */
.si-illustration-frame {
    width: min(100%, 446px);
    aspect-ratio: 1.1 / 1;
    overflow: hidden;
    margin: 13px auto 2px;
}
/* Oversize + negative margins zoom the crop in on the drawn content
   (source content sits in x 5–61%, y 10–89% of the asset), trimming the
   baked-in whitespace on every side. All percentages, so the crop scales
   with the frame. */
.si-illustration {
    display: block;
    width: 154%;
    height: auto;
    margin: -6% 0 0 -2%;
}

.si-security {
    display: flex; align-items: flex-start; gap: 14px;
    margin-top: 11px; padding: 13px 15px;
    background: var(--info-bg); border: 1px solid var(--info-border);
    border-radius: 8px;
}
.si-security-icon {
    flex: none; width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.si-security-title { font-size: 13px; font-weight: 600; color: var(--navy); }
.si-security-text {
    font-size: 12px; color: var(--ink-3); margin: 3px 0 0; line-height: 1.55;
}

/* ----------------------------------------------------------------- the card */

.si-card {
    flex: 1 1 532px; max-width: 570px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
    padding: 34px 38px;
}

.si-card-title {
    font-size: 25px; font-weight: 700; color: var(--navy); margin: 0;
    letter-spacing: -0.01em;
}
.si-card-subtitle {
    font-size: 13px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.55;
}

.si-form { margin-top: 23px; }

.si-field { margin-top: 17px; }
.si-field:first-of-type { margin-top: 0; }

.si-label-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 7px;
}
.si-label {
    display: flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-2);
    margin-bottom: 7px;
}
.si-label-row .si-label { margin-bottom: 0; }
.si-req { color: var(--danger); }

.si-input {
    height: 44px;
    width: 100%;
    border: 1px solid var(--border-input);
    border-radius: 6px;
    padding: 0 14px;
    font-size: 13px;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
}
.si-input::placeholder { color: #97A1AD; }
.si-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

/* Sits in the password label row instead of inside the field, matching the
   reference — a plain text control, not a boxed button. */
.si-pw-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: 0; padding: 0;
    font: inherit; font-size: 12.5px; font-weight: 600;
    color: var(--accent); cursor: pointer;
}
.si-pw-toggle:hover { text-decoration: underline; }
.si-pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.si-pw-toggle svg { flex: none; }

.si-error {
    display: none;
    margin-top: 13px;
    padding: 10px 12px;
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--danger);
}

.si-btn {
    height: 46px;
    width: 100%;
    margin-top: 21px;
    background: var(--accent);
    color: #FFFFFF;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.si-btn:hover { background: #16337F; }
.si-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.si-btn[disabled] { background: #93A5DE; cursor: default; }
.si-btn svg { flex: none; }

.si-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    display: inline-block;
    animation: si-spin 0.7s linear infinite;
}
@keyframes si-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .si-spinner { animation: none; }
}

.si-forgot { margin: 11px 0 0; text-align: right; font-size: 12.5px; }
.si-forgot a { font-weight: 600; text-decoration: underline; }

.si-card-divider { border: 0; border-top: 1px solid var(--border-soft); margin: 21px 0 0; }

.si-note { margin: 13px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.si-note a { font-weight: 600; }

/* ------------------------------------------------------------------- footer */

.si-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px 20px; flex-wrap: wrap;
    padding: 10px 44px 14px;
    font-size: 12px; color: var(--ink-4);
}
.si-footer-links { display: flex; align-items: center; gap: 10px; }
.si-footer-links a { color: var(--ink-3); }
.si-footer-sep { color: var(--border-input); }

/* --------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
    .si-grid { gap: 48px; }
    .si-card { padding: 28px 32px; }
    .si-heading { font-size: 28px; }
    .si-illustration-frame { width: min(100%, 400px); }
}

@media (max-width: 960px) {
    .si-main { padding: 20px 32px 32px; align-items: flex-start; }
    .si-grid { flex-direction: column; gap: 32px; }
    /* In a column flex container the desktop flex-basis would become a
       HEIGHT basis and pad both boxes with empty space — reset it. */
    .si-left, .si-card { flex: 0 0 auto; }
    .si-left { max-width: 620px; }
    .si-card { max-width: 620px; width: 100%; }
    .si-footer { padding: 11px 32px 14px; }
}

@media (max-width: 640px) {
    .si-header { padding: 20px 20px 0; }
    .si-main { padding: 16px 20px 28px; }
    .si-card { padding: 24px 20px; border-radius: 8px; }
    .si-heading { font-size: 26px; }
    .si-card-title { font-size: 21px; }
    .si-illustration-frame { width: 100%; }
    .si-footer { padding: 10px 20px 16px; justify-content: center; text-align: center; }
}

@media (pointer: coarse) {
    .si-btn { height: 48px; }
    .si-input { height: 46px; }
}

/*
 * Without JavaScript the form cannot submit, so hide it rather than let a
 * native POST return raw JSON to the browser — the same reasoning
 * style_login.css's .no-js rule states.
 */
.no-js .si-form { display: none; }

.si-nojs {
    margin-top: 18px;
    padding: 9px 11px;
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--danger);
}
.js .si-nojs { display: none; }
