/*
Rapport common sign-in (rapport.saisolutions.org/login).
Copy of the regional app's login page (AuthLayout + LoginForm, shadcn tokens):
photo on the left, the form on the right; on mobile the form sits in a card
over the photo. Served under the edge CSP (style-src/img-src 'self'), so no
inline styles and no external fonts. Always light: the page does not follow
the device's dark mode.
*/
:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #020817;
  --muted-foreground: #5d6b80;
  --border: #e2e8f0;
  --accent: #f1f5f9;
  --ring: #020817;
  --input: #e2e8f0;
  --primary: #0f172a;
  --primary-foreground: #f8fafc;
  --destructive: #ef4444;
  --logo: #444750;
  --radius: 0.5rem;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Layout: one column on mobile, photo | choice from 1024px. */
.page { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.photo {
  position: relative; display: none; padding: 2rem;
  background: #18181b url("login.jpg") center / cover no-repeat;
}
.photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgb(0 0 0 / .5), transparent, rgb(0 0 0 / .4));
}
.photo .logos { position: relative; color: #ffffff; }
.panel {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 1rem;
  background: var(--background);
}
/* Mobile: the photo fills the screen and the choice sits in a card on top. */
.panel::before {
  content: ""; position: absolute; inset: 0;
  background: url("login.jpg") center / cover no-repeat;
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 1.5rem;
  width: 100%; max-width: 24rem; padding: 1.5rem;
  background: var(--background); border-radius: .75rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
}
@media (min-width: 1024px) {
  .page { grid-template-columns: 1fr 1fr; }
  .photo { display: block; }
  .panel { padding: 1.5rem; }
  .panel::before { display: none; }
  .card { padding: 0; border-radius: 0; box-shadow: none; }
  .card .mobile-badge { display: none; }
}

/* Logos (the app's BrandLogos, size lg): SAI badge + "rapport". */
.logos { display: flex; align-items: center; gap: .5rem; }
.logos svg { display: block; width: auto; }
.logo-badge { height: 3rem; }
.logo-text { height: 1.75rem; }
.mobile-badge { justify-content: center; color: var(--logo); }

/* Header (the app's AuthPage). */
.header { display: flex; flex-direction: column; gap: .25rem; text-align: center; }
h1 { margin: 0; font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -.01em; }
.subtitle { margin: 0; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* The form (the app's LoginForm: Input, Button, FormError). */
form { display: flex; flex-direction: column; gap: .75rem; }
input {
  width: 100%; min-width: 0; height: 2.25rem; padding: .25rem .75rem;
  font: inherit; font-size: .875rem; line-height: 1.25rem; color: var(--foreground);
  background: var(--background); border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted-foreground); }
input:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }
button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.25rem; padding: .5rem 1rem; border: 0; border-radius: calc(var(--radius) - 2px);
  font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.25rem;
  color: var(--primary-foreground); background: var(--primary); cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
button:hover:enabled { background: color-mix(in srgb, var(--primary) 90%, transparent); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }
button:disabled { opacity: .5; cursor: default; }
#status, #recovery-status { margin: 0; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }
#status:empty, #recovery-status:empty { display: none; }
#status[data-state="error"], #recovery-status[data-state="error"] { color: var(--destructive); }
.note { margin: 0; text-align: center; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }

form[hidden] { display: none; }
.recovery-link { align-self: center; color: var(--foreground); font-size: .875rem; }
