/* MDCare design foundation.
 *
 * Tokens first, taken from the brand kit: navy carries structure, teal is the
 * one accent (buttons, links, focus), and amber is reserved for attention -
 * which in this product means a maintenance overdue or a reading out of
 * limits, so it must never be spent on decoration. Type is the brand's own
 * system stack; nothing is fetched from a font CDN.
 *
 * Bootstrap stays underneath for layout and forms. Where it shows, these
 * variables restyle it rather than fighting it.
 */

:root {
  --md-navy: #0E2A47;
  --md-navy-deep: #0B1B2E;
  --md-teal: #0FA3A3;
  --md-teal-dark: #0B8484;
  --md-teal-soft: #E6F6F6;
  --md-amber: #F2A900;
  --md-amber-soft: #FFF4D6;
  --md-ink: #14212E;
  --md-slate: #5B6B7C;
  --md-slate-light: #A9B8C8;
  --md-line: #E1E7EE;
  --md-bg: #F4F7FA;
  --md-surface: #FFFFFF;
  --md-radius: 10px;
  --md-font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Bootstrap 5.3 reads these, so its own components pick up the brand. */
  --bs-font-sans-serif: var(--md-font);
  --bs-body-color: var(--md-ink);
  --bs-body-bg: var(--md-bg);
  --bs-link-color: var(--md-teal-dark);
  --bs-link-hover-color: var(--md-navy);
  --bs-border-color: var(--md-line);
}

body {
  font-family: var(--md-font);
  color: var(--md-ink);
  background: var(--md-bg);
  -webkit-font-smoothing: antialiased;
}

/* Buttons ------------------------------------------------------------- */

.btn-primary {
  --bs-btn-bg: var(--md-teal);
  --bs-btn-border-color: var(--md-teal);
  --bs-btn-hover-bg: var(--md-teal-dark);
  --bs-btn-hover-border-color: var(--md-teal-dark);
  --bs-btn-active-bg: var(--md-teal-dark);
  --bs-btn-active-border-color: var(--md-teal-dark);
  --bs-btn-focus-shadow-rgb: 15, 163, 163;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: .7rem;
  --bs-btn-border-radius: var(--md-radius);
}

.btn-outline-primary {
  --bs-btn-color: var(--md-teal-dark);
  --bs-btn-border-color: var(--md-teal);
  --bs-btn-hover-bg: var(--md-teal);
  --bs-btn-hover-border-color: var(--md-teal);
  --bs-btn-active-bg: var(--md-teal-dark);
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: var(--md-radius);
}

/* Forms --------------------------------------------------------------- */

.form-label {
  font-weight: 600;
  font-size: .875rem;
  color: var(--md-navy);
}

.form-control,
.form-select {
  border-color: var(--md-line);
  border-radius: var(--md-radius);
  padding: .65rem .85rem;
  color: var(--md-ink);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--md-teal);
  box-shadow: 0 0 0 .25rem rgba(15, 163, 163, .18);
}

.form-text { color: var(--md-slate); }

/* The authentication layout ----------------------------------------------
 * A brand panel and a form panel, side by side; stacked on a phone. Every
 * signed-out page - sign in, sign up, password reset, invitation - uses it,
 * so the first thing anyone sees of MDCare is the same thing.
 */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.auth-brand {
  background: var(--md-navy-deep);
  color: #fff;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  overflow: hidden;
}

/* A faint echo of the logo's arc, so the panel is not a flat block. */
.auth-brand::after {
  content: "";
  position: absolute;
  right: -18rem;
  bottom: -18rem;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  border: 3rem solid rgba(15, 163, 163, .10);
  pointer-events: none;
}

.auth-brand .logo { width: 220px; height: auto; display: block; }

.auth-brand h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0 0 .9rem;
}

.auth-brand .lede {
  color: var(--md-slate-light);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 34rem;
  margin: 0 0 1.8rem;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .85rem;
  max-width: 34rem;
}

.auth-points li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  line-height: 1.5;
  color: #E6EDF4;
}

.auth-points svg {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .15rem;
  color: var(--md-teal);
}

.auth-brand .brand-foot {
  font-size: .8125rem;
  color: var(--md-slate-light);
  position: relative;
}

.auth-brand .brand-foot a { color: #fff; text-decoration: none; }
.auth-brand .brand-foot a:hover { text-decoration: underline; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--md-surface);
}

.auth-card { width: 100%; max-width: 26rem; }

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--md-navy);
  margin-bottom: .35rem;
}

.auth-card .intro { color: var(--md-slate); margin-bottom: 1.75rem; }

.auth-card .muted-note { color: var(--md-slate); font-size: .875rem; }

/* Only shown on a phone, where the brand panel collapses to a strip. */
.auth-mobile-logo { display: none; }

.auth-lang { position: absolute; top: 1.25rem; right: 1.5rem; }
.auth-lang .form-select {
  padding: .3rem 1.9rem .3rem .6rem;
  font-size: .8125rem;
  width: auto;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { align-items: flex-start; padding-top: 2.5rem; }
  .auth-mobile-logo { display: block; width: 180px; height: auto; margin: 0 auto 2rem; }
  .auth-lang { position: static; display: flex; justify-content: flex-end; margin-bottom: 1rem; }
}

/* The application shell -----------------------------------------------
 * Navigation carries the brand; content sits on the soft background.
 */

.md-navbar {
  --bs-navbar-color: rgba(255, 255, 255, .78);
  --bs-navbar-hover-color: #fff;
  --bs-navbar-active-color: #fff;
  background: var(--md-navy);
}

.md-navbar .navbar-brand img { height: 30px; width: auto; display: block; }

.md-navbar .dropdown-menu {
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  box-shadow: 0 8px 24px rgba(14, 42, 71, .12);
}

.md-navbar .form-control,
.md-navbar .form-select {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.md-navbar .form-select option { color: var(--md-navy); background: #fff; }
.md-navbar .form-control::placeholder { color: rgba(255, 255, 255, .55); }

.md-navbar .form-control:focus {
  background: rgba(255, 255, 255, .14);
  border-color: var(--md-teal);
  color: #fff;
}

.md-navbar .btn-scan {
  --bs-btn-bg: var(--md-teal);
  --bs-btn-border-color: var(--md-teal);
  --bs-btn-hover-bg: var(--md-teal-dark);
  --bs-btn-hover-border-color: var(--md-teal-dark);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-font-weight: 600;
}

/* Page structure ---------------------------------------------------------
 * The shell owns vertical rhythm; pages own their content. A page that wants
 * the standard width uses .md-container; the dashboard and the settings
 * pages both do.
 */

.md-app { min-height: 100vh; display: flex; flex-direction: column; }
.md-page { flex: 1 0 auto; padding: 1.75rem 0 3rem; }
.md-container { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

.md-footer {
  border-top: 1px solid var(--md-line);
  padding: 1rem 0 1.25rem;
  font-size: .8125rem;
  color: var(--md-slate);
}
.md-footer a { color: var(--md-slate); text-decoration: none; }
.md-footer a:hover { color: var(--md-navy); text-decoration: underline; }

.md-alert { border-radius: var(--md-radius); }

/* Page header: a title, an optional line under it, actions to the right. */
.md-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: 1.5rem;
}
.md-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--md-navy);
  margin: 0;
}
.md-header .sub { color: var(--md-slate); margin: .25rem 0 0; }
.md-header .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Section heading inside a page. */
.md-section-title {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--md-slate);
  margin: 0 0 .75rem;
}

/* Surfaces ------------------------------------------------------------ */

.md-card {
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  padding: 1.25rem;
}

.md-card > .md-section-title:first-child { margin-top: -.15rem; }

/* Stat tile: the number is the point; the label explains it. */
.md-stat {
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  padding: 1rem 1.15rem;
  height: 100%;
  border-top: 3px solid var(--md-line);
}
.md-stat .value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--md-navy);
}
.md-stat .label { color: var(--md-slate); font-size: .875rem; margin-top: .2rem; }
.md-stat.is-good { border-top-color: var(--md-teal); }
.md-stat.is-warn { border-top-color: var(--md-amber); }
.md-stat.is-warn .value { color: #9A6B00; }
.md-stat.is-bad { border-top-color: var(--md-red); }
.md-stat.is-bad .value { color: var(--md-red); }

/* Attention list: a coloured rail says how bad, so the eye sorts it. */
.md-rows { display: flex; flex-direction: column; gap: .5rem; }
.md-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--md-surface);
  border: 1px solid var(--md-line);
  border-left: 4px solid var(--md-line);
  border-radius: var(--md-radius);
  padding: .8rem 1rem;
  color: var(--md-ink);
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
.md-row:hover { color: var(--md-ink); border-color: var(--md-slate-light); box-shadow: 0 2px 10px rgba(14, 42, 71, .08); }
.md-row.is-danger { border-left-color: var(--md-red); }
.md-row.is-warning { border-left-color: var(--md-amber); }
.md-row.is-info { border-left-color: var(--md-slate-light); }
/* The record buttons on the device page: big enough for a thumb in a corridor. */
.md-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.md-action { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; min-height: 6.5rem;
  background: var(--md-teal); color: #fff; border-radius: .9rem; text-decoration: none;
  box-shadow: 0 2px 10px rgba(14, 42, 71, .12); transition: transform .08s ease, box-shadow .08s ease; }
.md-action:hover, .md-action:focus-visible { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(14, 42, 71, .18); }
.md-action .kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.md-action .label { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.md-action .due { margin-top: auto; font-size: .8125rem; opacity: .9; }
.md-action.is-overdue { background: var(--md-amber); color: var(--md-navy); }
.md-action.is-overdue:hover, .md-action.is-overdue:focus-visible { color: var(--md-navy); }
.md-action.is-other { background: #fff; color: var(--md-navy); border: 1px dashed var(--md-slate-light); box-shadow: none; }
.md-action.is-other:hover, .md-action.is-other:focus-visible { color: var(--md-navy); }
/* Weekday ticks: the widget's wrapper and inputs share this class; a row of ticks, not a form-check. */
div.weekday-list { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
div.weekday-list > div { display: flex; align-items: center; }
div.weekday-list label { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; cursor: pointer; }
input.weekday-list { width: 1.1rem; height: 1.1rem; accent-color: var(--md-teal); }
/* The schedule table: seven columns, each select wide enough to read. */
.md-schedule th, .md-schedule td { white-space: nowrap; }
.md-schedule select, .md-schedule input { min-width: 8rem; }
.md-schedule td:nth-child(1) select { min-width: 12rem; }
.md-schedule td:nth-child(4) select { min-width: 14rem; }
.md-schedule td:nth-child(5) input { min-width: 4.5rem; width: 4.5rem; }
.md-schedule td:nth-child(6) input { min-width: 10rem; }
/* Dashboard: tiles that filter, alarms with their action, the week. */
.md-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (max-width: 767px) { .md-tiles { grid-template-columns: repeat(2, 1fr); } }
.md-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left;
  background: #fff; border: 1px solid var(--md-border, #E1E7EE); border-left: 4px solid var(--md-slate-light);
  border-radius: .75rem; padding: .9rem 1rem; cursor: pointer; transition: box-shadow .1s ease, transform .1s ease; }
.md-tile:hover { box-shadow: 0 4px 14px rgba(14, 42, 71, .1); transform: translateY(-1px); }
.md-tile .value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--md-navy); }
.md-tile .label { font-size: .8125rem; color: var(--md-slate); }
.md-tile.is-good { border-left-color: var(--md-teal); }
.md-tile.is-warn { border-left-color: var(--md-amber); }
.md-tile.is-bad { border-left-color: var(--md-red); }
.md-tile.is-info { border-left-color: var(--md-slate-light); }
.md-tile.is-active { outline: 2px solid var(--md-teal); outline-offset: 1px; }
.md-alarms { display: flex; flex-direction: column; gap: .5rem; }
.md-alarm { display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--md-border, #E1E7EE); border-left: 4px solid var(--md-slate-light);
  border-radius: .75rem; padding: .85rem 1rem; }
.md-alarm.is-danger { border-left-color: var(--md-red); }
.md-alarm.is-warning { border-left-color: var(--md-amber); }
.md-alarm .title { font-weight: 600; color: var(--md-navy); }
.md-alarm .detail { color: var(--md-slate); font-size: .875rem; margin-top: .15rem; }
.md-alarm .act { display: flex; gap: .4rem; flex-shrink: 0; }
.md-alarm .act form { margin: 0; }
@media (max-width: 575px) {
  .md-alarm { flex-direction: column; align-items: stretch; }
  .md-alarm .act { justify-content: flex-start; }
}
.md-allclear { display: flex; gap: 1rem; align-items: center; background: var(--md-teal-soft);
  border-radius: .75rem; padding: 1rem 1.2rem; }
.md-allclear .tick { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--md-teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.md-week { list-style: none; margin: 0; padding: 0; }
.md-week li { display: grid; grid-template-columns: 6rem 1fr auto; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--md-border, #E1E7EE); }
.md-week li:last-child { border-bottom: 0; }
.md-week .day { color: var(--md-slate); font-size: .875rem; }
.md-week .when { font-size: .875rem; color: var(--md-slate); white-space: nowrap; }
.md-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .25rem 2rem; }
.md-facts li { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--md-border, #E1E7EE); font-size: .875rem; }
a.md-alarm-link { text-decoration: none; color: inherit; }
a.md-alarm-link:hover { box-shadow: 0 4px 14px rgba(14, 42, 71, .1); }
/* Departments: a tree of cards, worst first. */
.md-tree-root { display: inline-block; background: var(--md-navy); color: #fff; font-weight: 700; border-radius: .6rem; padding: .5rem 1rem; }
.md-tree-branches { list-style: none; margin: 0 0 0 1.1rem; padding: .75rem 0 0 1.4rem; border-left: 2px solid var(--md-line); display: flex; flex-direction: column; gap: .9rem; }
.md-dept { position: relative; background: #fff; border: 1px solid var(--md-line); border-left: 4px solid var(--md-teal); border-radius: .8rem; padding: 1rem 1.2rem; }
.md-dept::before { content: ""; position: absolute; left: calc(-1.4rem - 2px); top: 1.6rem; width: 1.4rem; border-top: 2px solid var(--md-line); }
.md-dept.is-watch { border-left-color: var(--md-amber); }
.md-dept.is-act { border-left-color: var(--md-red, #B42318); }
.md-dept-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.md-dept-name { font-size: 1.15rem; font-weight: 700; color: var(--md-navy); margin: 0 0 .35rem; }
.md-dept-people { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.md-person { display: inline-flex; align-items: center; gap: .4rem; font-size: .875rem; color: var(--md-ink); }
.md-person .initials { width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--md-teal-soft); color: var(--md-teal-dark); font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.md-dept-badge { font-size: .75rem; font-weight: 600; white-space: nowrap; color: var(--md-slate); }
.md-dept.is-act .md-dept-badge { color: var(--md-red, #B42318); }
.md-dept.is-watch .md-dept-badge { color: #8a6d00; }
.md-score { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin: .9rem 0 0; }
@media (max-width: 767px) { .md-score { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.md-score dt { font-size: .72rem; font-weight: 500; color: var(--md-slate); text-transform: uppercase; letter-spacing: .04em; }
.md-score dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--md-navy); }
.md-score dd.bad { color: var(--md-red, #B42318); }
.md-score .trend.up { color: var(--md-teal-dark); }
.md-score .trend.down { color: var(--md-red, #B42318); }
.md-why { margin: .6rem 0 0; font-size: .875rem; color: var(--md-ink); }
.md-dept-devices { margin-top: .7rem; }
.md-dept-devices summary { cursor: pointer; font-size: .875rem; color: var(--md-teal-dark); }
.md-dept-devices ul { list-style: none; margin: .5rem 0 0; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.md-dept-devices li { padding: .2rem 0; break-inside: avoid; font-size: .9rem; }
.md-dept-devices .dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--md-teal); }
.md-dept-devices .dot.is-bad { background: var(--md-red, #B42318); }
.md-dept-devices .dot.is-warn { background: var(--md-amber); }
.md-dept-devices .dot.is-none { background: var(--md-slate-light); }
/* The fold on the device form: closed when registering, open when editing. */
.md-more { margin-bottom: 1.5rem; }
.md-more > summary { cursor: pointer; font-weight: 600; color: var(--md-navy); padding: .75rem 0; list-style: none; }
.md-more > summary::-webkit-details-marker { display: none; }
.md-more > summary::before { content: 'B8'; display: inline-block; width: 1.1rem; color: var(--md-teal); }
.md-more[open] > summary::before { content: 'BE'; }

.md-row .title { font-weight: 600; color: var(--md-navy); }
.md-row .detail { color: var(--md-slate); font-size: .875rem; margin-top: .15rem; }
.md-row .when { color: var(--md-slate); font-size: .8125rem; white-space: nowrap; padding-top: .15rem; }

/* Tables -------------------------------------------------------------- */

.md-table { --bs-table-bg: transparent; margin-bottom: 0; }
.md-table > thead th {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--md-slate);
  border-bottom: 1px solid var(--md-line);
  padding: .5rem .75rem;
}
.md-table > tbody td { padding: .6rem .75rem; border-bottom: 1px solid var(--md-line); vertical-align: middle; }
.md-table > tbody tr:last-child td { border-bottom: 0; }
.md-table > tbody tr.md-group th {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--md-slate);
  background: var(--md-bg);
  padding: .4rem .75rem;
}

/* Meaning colours. Amber is attention, red is a limit crossed, teal is
 * fine. Bootstrap's own semantic classes are remapped so existing templates
 * inherit the palette without being rewritten.
 */

:root { --md-red: #B42318; --md-red-soft: #FDECEA; }

.badge.bg-warning, .badge.text-bg-warning { background-color: var(--md-amber) !important; color: #2B2000 !important; }
.badge.bg-danger,  .badge.text-bg-danger  { background-color: var(--md-red) !important; }
.badge.bg-success, .badge.text-bg-success { background-color: var(--md-teal) !important; }
.badge.bg-secondary { background-color: var(--md-slate) !important; }
.text-danger { color: var(--md-red) !important; }
.text-success { color: var(--md-teal-dark) !important; }
.alert-success { --bs-alert-bg: var(--md-teal-soft); --bs-alert-border-color: #BFE6E6; --bs-alert-color: #0B5E5E; }
.alert-warning { --bs-alert-bg: var(--md-amber-soft); --bs-alert-border-color: #F6DDA0; --bs-alert-color: #6B4A00; }
.alert-danger  { --bs-alert-bg: var(--md-red-soft);   --bs-alert-border-color: #F5C2BC; --bs-alert-color: #7A1A12; }

/* Settings sidebar (console) ------------------------------------------- */

.md-sidenav .list-group-item {
  border: 0;
  border-radius: 8px;
  color: var(--md-ink);
  background: transparent;
  padding: .55rem .8rem;
  margin-bottom: 2px;
}
.md-sidenav .list-group-item:hover { background: var(--md-surface); }
.md-sidenav .list-group-item.active {
  background: var(--md-teal-soft);
  color: var(--md-teal-dark);
  font-weight: 600;
}

/* Generic Bootstrap surfaces used by older pages, softened to the palette. */
.card { border-color: var(--md-line); border-radius: var(--md-radius); }
.list-group-item { border-color: var(--md-line); }
.btn-outline-secondary {
  --bs-btn-color: var(--md-navy);
  --bs-btn-border-color: var(--md-line);
  --bs-btn-hover-bg: var(--md-surface);
  --bs-btn-hover-color: var(--md-navy);
  --bs-btn-hover-border-color: var(--md-slate-light);
  --bs-btn-border-radius: var(--md-radius);
}

/* Forms on pages -------------------------------------------------------- */

.md-field { margin-bottom: 1rem; }
.md-field .req { color: var(--md-amber); font-weight: 700; }
.md-field .md-error { color: var(--md-red); font-size: .8125rem; margin-top: .3rem; }
.md-field.has-error .form-control,
.md-field.has-error .form-select { border-color: var(--md-red); }
.md-field .current-file { font-size: .8125rem; color: var(--md-slate); margin-top: .3rem; }
.md-form-section { margin-bottom: 1.75rem; }
.md-form-section > .md-section-title { margin-bottom: 1rem; }
.md-form-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.md-form-actions .spacer { flex: 1; }

/* Facts about a thing: label left, value right; stacks on a phone. */
.md-dl { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .45rem 1rem; margin: 0; }
.md-dl dt { color: var(--md-slate); font-size: .875rem; font-weight: 500; }
.md-dl dd { margin: 0; }
.md-dl dd:empty::before, .md-dl dd.empty { content: "—"; color: var(--md-slate-light); }
@media (max-width: 600px) { .md-dl { grid-template-columns: 1fr; gap: .1rem 0; } .md-dl dd { margin-bottom: .6rem; } }

/* Status pills. */
.md-pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--md-bg); color: var(--md-slate); border: 1px solid var(--md-line); vertical-align: middle; }
.md-pill.is-good { background: var(--md-teal-soft); color: var(--md-teal-dark); border-color: #BFE6E6; }
.md-pill.is-warn { background: var(--md-amber-soft); color: #6B4A00; border-color: #F6DDA0; }
.md-pill.is-bad { background: var(--md-red-soft); color: #7A1A12; border-color: #F5C2BC; }
.md-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; color: var(--md-slate); }

/* A result page: one clear statement and the ways out. */
.md-notice { max-width: 34rem; }
.md-notice h1 { font-size: 1.35rem; font-weight: 700; color: var(--md-navy); letter-spacing: -.02em; }
