:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #292629;
  background: #f5f5f6;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body { min-height: 100vh; }
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 18px;
}
.login-panel {
  width: min(100%, 440px);
  padding: 42px 40px 38px;
  background: #fff;
  border: 1px solid #e2e8ed;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(20, 44, 62, .08);
}
.school-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #701b32;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
}
h1 { margin: 0; text-align: center; font-size: 27px; letter-spacing: .2px; }
.school-name { margin: 9px 0 32px; color: #687987; text-align: center; font-size: 14px; }
form { display: grid; gap: 12px; }
label { font-size: 14px; font-weight: 600; }
select, input, button {
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  font: inherit;
}
select, input {
  padding: 0 13px;
  color: #263b4b;
  background: #fff;
  border: 1px solid #cbd5dc;
}
input[readonly] { background: #f3f6f8; color: #596b78; }
select:focus, input:focus, button:focus-visible { outline: 3px solid rgba(112, 27, 50, .22); outline-offset: 2px; }
button {
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  background: #781d37;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: #581326; }
button.button-secondary { margin-top: 0; border: 1px solid #cbd5dc; background: #fff; color: #254052; }
button.button-secondary:hover { background: #f3f6f8; }
.form-error, .form-message { min-height: 18px; margin: 0; color: #b42318; font-size: 13px; line-height: 1.45; }
.field-help { margin: -6px 0 2px; color: #73818c; font-size: 12px; line-height: 1.4; }
.role-summary { margin: 0; color: #526574; font-size: 14px; }
.back-link { display: block; margin-top: 20px; color: #701b32; text-align: center; font-size: 13px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
footer { margin-top: 24px; color: #73818c; font-size: 12px; text-align: center; }
.device-message {
  display: none;
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f3f6f8;
}
.device-message[hidden] { display: none; }
.device-message__panel {
  max-width: 480px;
  padding: 32px;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 36px rgba(20, 44, 62, .08);
}
.device-message__panel h1 { font-size: 23px; }
.device-message__panel p { color: #526574; line-height: 1.6; }
/* Keep small-screen phones out while allowing tablet portrait and landscape. */
@media (max-width: 480px) {
  .page-shell { display: none; }
  .device-message { display: grid; }
}
@media (max-width: 420px) {
  .login-panel { padding: 34px 24px 28px; }
}

/* LBIS brand system: maroon red, cool grey and white */
:root{--lbis-maroon:#781d37;--lbis-maroon-dark:#591326;--lbis-maroon-soft:#f7edf0;--lbis-grey-900:#292629;--lbis-grey-700:#555158;--lbis-grey-500:#77727a;--lbis-grey-300:#d9d6d9;--lbis-grey-100:#f5f4f5;--lbis-white:#fff}
body{color:var(--lbis-grey-900);background:var(--lbis-grey-100)}
.login-panel{border-top:5px solid var(--lbis-maroon);box-shadow:0 14px 38px rgba(50,20,30,.09)}
.school-mark{background:var(--lbis-maroon);color:#fff}
h1{color:var(--lbis-grey-900)}
select:focus,input:focus,button:focus-visible{outline:3px solid rgba(120,29,55,.2);outline-offset:2px}
button{background:var(--lbis-maroon);color:#fff;min-height:44px;border-radius:7px}
button:hover{background:var(--lbis-maroon-dark)}
button.button-secondary{background:#fff;color:var(--lbis-maroon);border:1px solid var(--lbis-grey-300)}
button.button-secondary:hover{background:var(--lbis-maroon-soft)}


/* =========================================================
   LBIS SHARED DESIGN SYSTEM — LOGIN AND SHARED COMPONENTS
   Brand: maroon red, grey and white
   ========================================================= */
:root {
  --lbis-maroon: #781d37;
  --lbis-maroon-dark: #591326;
  --lbis-maroon-deep: #64172d;
  --lbis-maroon-soft: #f7edf0;
  --lbis-grey-900: #292629;
  --lbis-grey-700: #555158;
  --lbis-grey-500: #77727a;
  --lbis-grey-300: #d9d6d9;
  --lbis-grey-100: #f5f4f5;
  --lbis-white: #ffffff;
  --lbis-border: #e2dfe1;
  --lbis-focus: rgba(120, 29, 55, .18);
}
html { color-scheme: light; }
body {
  color: var(--lbis-grey-900);
  background: var(--lbis-grey-100);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.page-shell {
  padding: 30px 22px 18px;
  background: var(--lbis-grey-100);
}
.login-panel {
  width: min(100%, 450px);
  padding: 38px 38px 34px;
  background: var(--lbis-white);
  border: 1px solid var(--lbis-border);
  border-top: 5px solid var(--lbis-maroon);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(41, 38, 41, .07);
}
.school-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  background: var(--lbis-maroon);
  color: var(--lbis-white);
  font-size: 16px;
}
h1 {
  color: var(--lbis-grey-900);
  font-size: 25px;
  line-height: 1.25;
  font-weight: 700;
}
.school-name {
  margin: 8px 0 27px;
  color: var(--lbis-grey-500);
  font-size: 13px;
}
form { gap: 11px; }
label {
  color: var(--lbis-grey-700);
  font-size: 13px;
  font-weight: 700;
}
select, input, button {
  min-height: 44px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
}
select, input {
  padding: 9px 12px;
  color: var(--lbis-grey-900);
  background: var(--lbis-white);
  border: 1px solid var(--lbis-grey-300);
}
select:hover, input:hover { border-color: #b8aeb3; }
input[readonly] {
  background: var(--lbis-grey-100);
  color: var(--lbis-grey-700);
}
select:focus, input:focus, button:focus-visible {
  outline: 3px solid var(--lbis-focus);
  outline-offset: 2px;
  border-color: var(--lbis-maroon);
}
button {
  width: auto;
  min-height: 42px;
  margin-top: 6px;
  padding: 10px 18px;
  border: 1px solid var(--lbis-maroon);
  border-radius: 7px;
  background: var(--lbis-maroon);
  color: var(--lbis-white);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
button:hover {
  background: var(--lbis-maroon-dark);
  border-color: var(--lbis-maroon-dark);
}
.page-shell form button { width: 100%; }
button.button-secondary {
  margin-top: 0;
  border: 1px solid var(--lbis-grey-300);
  background: var(--lbis-white);
  color: var(--lbis-maroon);
}
button.button-secondary:hover {
  background: var(--lbis-maroon-soft);
  border-color: #c9aab4;
}
.form-error, .form-message {
  min-height: 18px;
  margin: 0;
  color: #a3263e;
  font-size: 12px;
  line-height: 1.5;
}
.field-help {
  margin: -5px 0 2px;
  color: var(--lbis-grey-500);
  font-size: 12px;
  line-height: 1.5;
}
.role-summary { color: var(--lbis-grey-700); font-size: 13px; }
.back-link {
  color: var(--lbis-maroon);
  font-size: 13px;
  font-weight: 600;
}
footer {
  color: var(--lbis-grey-500);
  font-size: 11px;
}
.device-message { background: var(--lbis-grey-100); }
.device-message__panel {
  border: 1px solid var(--lbis-border);
  border-top: 5px solid var(--lbis-maroon);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(41, 38, 41, .07);
}
.device-message__panel h1 { font-size: 22px; }
.device-message__panel p {
  color: var(--lbis-grey-700);
  font-size: 14px;
  line-height: 1.65;
}
@media (max-width: 480px) {
  .page-shell { padding: 22px 16px 16px; }
}
@media (max-width: 420px) {
  .login-panel { padding: 30px 22px 26px; }
}
