/* AltaScribe portal: legacy colours and positions, modernised.
   Yellow bar #f4de71, brand #8D770A, button #2A6CC2 (hover #173D6E). */
:root {
  --bar: #f4de71;
  --brand: #8d770a;
  --btn: #2a6cc2;
  --btn-hover: #173d6e;
  --ink: #1f2933;
  --muted: #5f6c7b;
  --line: #d9dee5;
  --bg: #f7f8fa;
  --busy: #ffd800;
  --error: #c01f1f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  padding-top: 50px;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50px;
  background: var(--bar);
  border-bottom: 1px solid #e0cb5c;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 10;
}
.brand {
  color: var(--brand);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
}
.brand:hover { color: #6f5c08; }

/* ---------------------------------------------------------------- login */
.home-row {
  display: flex;
  justify-content: center;
  padding: 10vh 16px 32px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 24px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 24px rgba(16, 24, 40, .06);
}
.login-logo img { max-width: 100%; height: auto; }
#loginArea { margin-top: 18px; }
.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  text-align: left;
}
.input-row label { flex: 0 0 90px; font-weight: 600; color: var(--muted); }
.input-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid #b9c2cd;
  border-radius: 6px;
  background: #fff;
}
.input-row input:focus { outline: 2px solid var(--btn); outline-offset: 0; border-color: var(--btn); }
.input-row:last-of-type { justify-content: flex-start; padding-left: 102px; }

#btnLogin {
  background: var(--btn);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 9px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
#btnLogin:hover, #btnLogin:focus-visible { background: var(--btn-hover); }

.status { color: var(--error); font-size: 15px; font-style: italic; margin-top: 8px; }

#loginText {
  display: inline-block;
  margin-top: 20px;
  background: var(--busy);
  padding: .3em .6em;
  font-weight: 700;
  border-radius: 4px;
}

@media (max-width: 420px) {
  .input-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .input-row label { flex: none; }
  .input-row:last-of-type { padding-left: 0; }
}

/* ---------------------------------------------------------------- signed-in shell */
.body-content { padding: 0 16px 56px; max-width: 1400px; margin: 0 auto; }
#top-level-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 14px 0;
  border-bottom: 2px solid var(--bar);
}
#top-level-title { font-size: 22px; font-weight: 600; color: var(--brand); margin-right: auto; }
.section-links-band { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.section-link-common {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--btn);
  text-decoration: none;
  font-weight: 600;
}
.section-link-common:hover, .section-link-common:focus-visible { background: #e8f0fb; color: var(--btn-hover); }
.section-link-common.active { background: var(--bar); color: var(--brand); }
.section-link-logout { color: var(--muted); }

.grid-area, .notice {
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 240px;
  padding: 24px;
}
.grid-empty, .notice p { color: var(--muted); margin: 0; }

footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
