/*
 * The split-screen sign-in shared by every SleekTech sign-in page: the staff web app (Pm.Web
 * Views/SignIn, which uses the si- form classes and no Bootstrap) and the portals' account pages
 * (_PortalSignInLayout — Tenant, Supplier, the manager app — whose forms are Bootstrap; the
 * "Portal pages" section at the end makes those match). One design: change it here.
 * Colours are the new website's (Pm.Website index.html :root) — change them here at the rebrand.
 */
:root {
    --si-bg: #f5f9fb;
    --si-surface: #ffffff;
    --si-ink: #12212a;
    --si-muted: #55656d;
    --si-line: #d8e3e8;
    --si-brand: #30afdf;
    --si-brand-ink: #0b77a3;
    --si-brand-deep: #0a5f84;
    --si-graphite: #72716f;
    --si-soft: #e5f4fb;
    --si-dark: #0f1c23;
    --si-danger: #c23b30;
    --si-ok: #138a5b;
    --si-radius: 12px;
    --si-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --si-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.si { margin: 0; font-family: var(--si-font); font-size: 15px; color: var(--si-ink); background: var(--si-bg); -webkit-font-smoothing: antialiased; }

.si-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); min-height: 100vh; }

/* ---- Brand panel ---------------------------------------------------------- */
.si-brand { position: relative; overflow: hidden; background: var(--si-dark); color: #fff; }
.si-brand-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: si-drift 30s ease-in-out infinite alternate; }
.si-brand-shade { position: absolute; inset: 0; background:
    linear-gradient(180deg, rgb(15 28 35 / .15) 0%, rgb(15 28 35 / .35) 45%, rgb(15 28 35 / .88) 100%),
    linear-gradient(90deg, rgb(10 95 132 / .35), transparent 60%); }
.si-brand-copy { position: absolute; left: 56px; right: 56px; bottom: 56px; }
.si-brand-logo { width: 190px; margin-bottom: 28px; }
.si-brand-logo .st0 { fill: #fff; } .si-brand-logo .st1 { fill: var(--si-brand); }
.si-brand-line { margin: 0 0 12px; font-family: var(--si-display); font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.si-brand-sub { margin: 0; max-width: 420px; font-size: 16px; line-height: 1.5; color: rgb(231 240 243 / .85); }

/* The logo's pixel squares, drifting — the website's visual language. */
.si-brand-pixels i { position: absolute; display: block; background: var(--si-brand); opacity: .85; animation: si-float 9s ease-in-out infinite; }
.si-brand-pixels i:nth-child(1) { width: 22px; height: 22px; top: 12%; left: 14%; }
.si-brand-pixels i:nth-child(2) { width: 12px; height: 12px; top: 20%; left: 22%; background: #fff; opacity: .6; animation-delay: -3s; }
.si-brand-pixels i:nth-child(3) { width: 34px; height: 34px; top: 9%; right: 16%; animation-delay: -5s; }
.si-brand-pixels i:nth-child(4) { width: 8px; height: 8px; top: 24%; right: 26%; background: #fff; opacity: .5; animation-delay: -1s; }

@keyframes si-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes si-drift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1.1) translateX(-1.5%); } }
@media (prefers-reduced-motion: reduce) { .si-brand-photo, .si-brand-pixels i { animation: none; } }

/* ---- Form panel ----------------------------------------------------------- */
.si-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px 24px; background: var(--si-surface); }
.si-panel-top { display: none; }
/* margin-top:auto pairs with the footer's, so the card sits in the middle of the spare height. */
.si-card { width: 100%; max-width: 400px; margin-top: auto; }
.si-foot { margin-top: auto; padding-top: 40px; font-size: 13px; color: var(--si-muted); }
.si-foot a { color: var(--si-brand-ink); }

.si-step { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--si-brand-ink); }
.si-title { margin: 0 0 10px; font-family: var(--si-display); font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.si-lead { margin: 0 0 28px; line-height: 1.55; color: var(--si-muted); }
.si-lead strong { color: var(--si-ink); font-weight: 600; }

.si-form { display: flex; flex-direction: column; }
.si-label { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--si-ink); }
.si-input { width: 100%; height: 50px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--si-ink);
    background: var(--si-surface); border: 1.5px solid var(--si-line); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.si-input::placeholder { color: #9aaab1; }
.si-input:focus { outline: none; border-color: var(--si-brand); box-shadow: 0 0 0 4px rgb(48 175 223 / .18); }
.si-input.input-validation-error { border-color: var(--si-danger); }
.si-code { height: 64px; text-align: center; font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; font-size: 30px; font-weight: 700; letter-spacing: .45em; padding-left: .45em; }
.si-field-error { min-height: 20px; margin-top: 4px; font-size: 13px; color: var(--si-danger); }

.si-error:empty, .si-error.validation-summary-valid { display: none; }
.si-error { margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: #fdf0ee; color: var(--si-danger); font-size: 14px; }
.si-error ul { margin: 0; padding: 0; list-style: none; }
.si-info { margin: -12px 0 20px; padding: 12px 14px; border-radius: 10px; background: var(--si-soft); color: var(--si-brand-deep); font-size: 14px; }

.si-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-size: 14px; cursor: pointer; }
.si-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--si-brand-ink); }
.si-check small { display: block; margin-top: 2px; font-size: 12px; color: var(--si-muted); }

.si-button { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; margin-top: 6px;
    font: inherit; font-size: 16px; font-weight: 600; color: #fff; background: var(--si-brand-ink); border: 0; border-radius: 10px;
    cursor: pointer; transition: background .15s, transform .05s; }
.si-button:hover { background: var(--si-brand-deep); }
.si-button:active { transform: translateY(1px); }
.si-button:focus-visible { outline: 3px solid rgb(48 175 223 / .45); outline-offset: 2px; }
.si-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.si-button--quiet { width: 100%; color: var(--si-ink); background: var(--si-bg); border: 1px solid var(--si-line); }
.si-button--quiet:hover { background: var(--si-soft); }

.si-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.si-links form { margin: 0; }
.si-link { padding: 0; font: inherit; font-size: 14px; color: var(--si-brand-ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.si-link:hover { text-decoration: underline; }

.si-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--si-line); font-size: 13px; line-height: 1.55; color: var(--si-muted); }

.si-choices { display: flex; flex-direction: column; gap: 10px; }
.si-choices form { margin: 0; }
.si-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; font: inherit; text-align: left; color: var(--si-ink);
    background: var(--si-surface); border: 1.5px solid var(--si-line); border-radius: var(--si-radius); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.si-choice:hover, .si-choice:focus-visible { outline: none; border-color: var(--si-brand); box-shadow: 0 0 0 4px rgb(48 175 223 / .14); }
.si-choice-mark { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 9px; font-weight: 700; color: var(--si-brand-deep); background: var(--si-soft); }
.si-choice-name { flex: 1; font-weight: 600; }
.si-choice svg { width: 18px; height: 18px; fill: none; stroke: var(--si-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.si-dev { margin-top: 28px; padding: 14px 16px; border: 1px dashed #e0c36a; border-radius: 10px; background: #fffbea; font-size: 13px; }
.si-dev summary { cursor: pointer; font-weight: 600; color: #7a5c00; }
.si-dev p { color: var(--si-muted); }
.si-dev .si-input { height: 40px; margin-bottom: 10px; font-size: 14px; }

/* ---- Who this sign-in is for ---------------------------------------------
   A chip above the card ("Tenant sign in") and on the photo, so nobody signs in to the
   wrong place — tenants, suppliers and staff all meet the same design. */
.si-audience { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px 6px 10px;
    font-size: 13px; font-weight: 600; color: var(--si-brand-deep); background: var(--si-soft); border-radius: 999px; }
.si-audience::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--si-brand); }
.si-brand-audience { display: inline-block; margin: 0 0 16px; padding: 5px 12px; font-size: 13px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgb(48 175 223 / .35);
    border: 1px solid rgb(255 255 255 / .35); border-radius: 999px; backdrop-filter: blur(4px); }

/* ---- "Not the right place?" — the other sign-ins, below the form ----------
   Its own block outside the card, pushed down towards the footer (margin-top:auto shares the
   spare height with the card's), so it reads as a signpost, not part of the form. */
.si-elsewhere { width: 100%; max-width: 400px; margin-top: auto; padding: 14px 18px 8px; background: var(--si-bg); border-radius: var(--si-radius); }
.si-elsewhere + .si-foot { margin-top: 0; padding-top: 20px; }
.si-elsewhere a.si-elsewhere-link, .si-elsewhere a.si-elsewhere-link:hover { color: var(--si-ink); text-decoration: none; }
.si-elsewhere-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--si-muted); }
.si-elsewhere-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0;
    font-size: 14px; color: var(--si-ink); text-decoration: none; border-bottom: 1px dashed var(--si-line); }
.si-elsewhere-link:last-child { border-bottom: 0; }
.si-elsewhere-ask { color: var(--si-muted); }
.si-elsewhere-go { display: inline-flex; align-items: center; gap: 4px; flex: none; font-weight: 600; color: var(--si-brand-ink); }
.si-elsewhere-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .12s; }
.si-elsewhere-link:hover .si-elsewhere-go { color: var(--si-brand-deep); }
.si-elsewhere-link:hover .si-elsewhere-go svg { transform: translateX(2px); }

/* ---- Portal pages (Bootstrap forms inside the shared card) ---------------- */
.si-card--portal h1, .si-card--portal .h4 { margin-bottom: 10px !important; font-family: var(--si-display); font-size: 30px; line-height: 1.15;
    font-weight: 700; letter-spacing: -.02em; color: var(--si-ink); }
.si-card--portal .text-secondary { color: var(--si-muted) !important; line-height: 1.55; }
.si-card--portal .form-label { font-size: 13px; font-weight: 600; color: var(--si-ink); }
.si-card--portal .form-control, .si-card--portal .form-select { min-height: 50px; padding: 0 16px; font-size: 16px; border: 1.5px solid var(--si-line); border-radius: 10px; }
.si-card--portal .form-control-lg { min-height: 60px; }
.si-card--portal .form-control:focus, .si-card--portal .form-select:focus { border-color: var(--si-brand); box-shadow: 0 0 0 4px rgb(48 175 223 / .18); }
.si-card--portal .btn-primary { min-height: 50px; font-weight: 600; background: var(--si-brand-ink); border-color: var(--si-brand-ink); border-radius: 10px; }
.si-card--portal .btn-primary:hover, .si-card--portal .btn-primary:focus { background: var(--si-brand-deep); border-color: var(--si-brand-deep); }
.si-card--portal a, .si-card--portal .btn-link { color: var(--si-brand-ink); }
.si-card--portal .alert { border-radius: 10px; }
.si-card--portal .form-check-input:checked { background-color: var(--si-brand-ink); border-color: var(--si-brand-ink); }
/* From sleektech-portal.css, which this page doesn't load: the code box's monospace digits. */
.si-card--portal .stp-mono { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: .3em; }

/* ---- Phones and narrow windows ------------------------------------------ */
@media (max-width: 900px) {
    .si-shell { grid-template-columns: 1fr; }
    .si-brand { display: none; }
    .si-panel { justify-content: flex-start; padding: 0 22px 20px; background: var(--si-bg); }
    .si-panel-top { display: flex; align-items: center; width: calc(100% + 44px); height: 150px; margin: 0 -22px; padding: 0 22px;
        background: linear-gradient(180deg, rgb(15 28 35 / .25), rgb(15 28 35 / .8)), url("../img/signin/street.jpg") center / cover no-repeat; }
    .si-mobile-logo { width: 140px; }
    .si-mobile-logo .st0 { fill: #fff; } .si-mobile-logo .st1 { fill: var(--si-brand); }
    .si-card { max-width: 480px; margin-top: -18px; padding: 28px 22px; background: var(--si-surface); border-radius: 18px 18px var(--si-radius) var(--si-radius); box-shadow: 0 -6px 30px rgb(18 33 42 / .12); }
    .si-title { font-size: 28px; }
    .si-elsewhere { max-width: 480px; margin-top: 20px; background: var(--si-surface); }
}
