/* Login page only (#26-01549) — Medacta Design System. Not loaded by any other page: mcs.css is not included here. */

/* =========================================================
   Tokens — Medacta Design System
   ========================================================= */
:root {
  --blue-medacta: #273a7c;
  --blue-medacta-hover: #1f2f66;
  --blue-medacta-deep: #1b2a5e;
  --cyan-medacta: #00b8f1;
  --yellow: #fdb913;
  --red: #ed1c24;

  --ink: #4d4d4f;            /* body text */
  --ink-secondary: #757879;  /* supporting text */
  --border: #e6e8ee;         /* card / header hairline */
  --border-input: #c9ccd1;
  --divider: #d7d7d7;

  --bg-page: #f6f7f9;
  --bg-card: #ffffff;
  --bg-card-subtle: #fafbfc;
  --bg-hover: #f1f3f8;

  --font-sans: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --font-condensed: 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;

  --radius-input: 6px;
  --radius-card: 16px;
  --radius-full: 999px;

  --shadow-card: 0 6px 18px rgba(20, 56, 127, 0.10);
  --focus-ring: 0 0 0 3px rgba(0, 184, 241, 0.18);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 160ms;
}

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

html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-medacta); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--cyan-medacta); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--cyan-medacta); outline-offset: 2px; border-radius: 2px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-header__logo { display: block; width: 240px; max-width: 70vw; height: auto; }
.site-header__rule { height: 4px; background: var(--blue-medacta); }

/* Environment badge — render ONLY on non-production environments */
.env-badge {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--blue-medacta-deep);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  white-space: nowrap;
}

/* =========================================================
   Layout
   ========================================================= */
.login-main {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 16px 64px;
}
@media (max-width: 600px) {
  .login-main { padding-top: 32px; }
}

/* =========================================================
   Card
   ========================================================= */
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.login-card__head { padding: 32px 32px 8px; }
.login-card__title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--blue-medacta);
}
.login-card__lead { margin: 0; font-size: 15px; color: var(--ink-secondary); }
.login-card__sso { padding: 24px 32px; }

/* Error / info message (optional — render when login fails) */
.alert {
  margin: 16px 32px 0;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  font-size: 14px;
  line-height: 1.4;
  background: #fdecec;
  color: #a3161c;
  border: 1px solid #f8b5ba;
}

/* =========================================================
   Buttons (Medacta DS "Button": pill, primary / secondary)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.25;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--cyan-medacta); outline-offset: 2px; }
.btn:active { opacity: 0.85; }
.btn--lg { font-size: 16px; padding: 14px 28px; min-height: 48px; }
.btn--md { font-size: 14px; padding: 10px 22px; min-height: 44px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--blue-medacta); color: #fff; }
.btn--primary:hover { background: var(--blue-medacta-hover); color: #fff; }

.btn--secondary { background: transparent; color: var(--blue-medacta); border-color: var(--blue-medacta); }
.btn--secondary:hover { background: var(--blue-medacta); color: #fff; }

.btn__icon { flex: none; }

/* =========================================================
   Username / password section (collapsible, native <details>)
   ========================================================= */
.creds {
  border-top: 1px solid var(--border);
  background: var(--bg-card-subtle);
}
.creds__toggle {
  list-style: none;
  min-height: 52px;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-medacta);
  transition: background var(--dur) var(--ease);
  user-select: none;
}
.creds__toggle::-webkit-details-marker { display: none; }
.creds__toggle:hover { background: var(--bg-hover); }
.creds__toggle:focus-visible { outline: 2px solid var(--cyan-medacta); outline-offset: -2px; }
.creds__chevron { flex: none; transition: transform 220ms var(--ease); }
.creds[open] .creds__chevron { transform: rotate(180deg); }

.creds__form {
  margin: 0;
  padding: 4px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--ink); }
.field__input {
  height: 44px;
  width: 100%;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field__input:hover { border-color: #919698; }
.field__input:focus { outline: none; border-color: var(--cyan-medacta); box-shadow: var(--focus-ring); }
.field__input[aria-invalid="true"] { border-color: var(--red); }

.creds__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.creds__forgot { font-size: 13px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: 24px 16px 32px; display: flex; justify-content: center; }
.help-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--ink);
}
.help-link:hover { color: var(--blue-medacta); }

/* =========================================================
   Small screens
   ========================================================= */
@media (max-width: 480px) {
  .login-card__head { padding: 24px 20px 4px; }
  .login-card__sso { padding: 20px; }
  .alert { margin-left: 20px; margin-right: 20px; }
  .creds__toggle { padding-left: 20px; padding-right: 20px; }
  .creds__form { padding-left: 20px; padding-right: 20px; }
}
