/* Fullerton Pines inspection response form.
   Deliberately large type and high contrast: the two people filling this in
   are working on phones in the field, and Curtis reviews it with limited
   eyesight. Nothing here should require squinting. */

:root {
  --ink: #14181f;
  --ink-soft: #48515f;
  --line: #d5dae2;
  --paper: #ffffff;
  --bg: #eef1f5;
  --navy: #16365d;
  --navy-soft: #e8eef7;
  --green: #12693f;
  --green-soft: #e2f4ea;
  --amber: #8a5a00;
  --red: #9c1c1c;
  --red-soft: #fdeaea;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--navy); }

/* ---------------------------------------------------------------- login */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: var(--paper);
  width: 100%;
  max-width: 460px;
  padding: 40px 36px;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(20, 30, 50, .14);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--navy);
}

.login-card h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.2; }

.lede { margin: 0 0 26px; color: var(--ink-soft); }

.login-card label {
  display: block;
  margin: 18px 0 7px;
  font-weight: 600;
  font-size: 17px;
}

.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"] {
  width: 100%;
  padding: 15px 14px;
  font-size: 19px;
  font-family: inherit;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.login-card input:focus {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}

.show-pw {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 16px 0 26px !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  color: var(--ink-soft);
}

.show-pw input { width: 20px; height: 20px; }

.login-card button {
  width: 100%;
  padding: 16px;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.login-card button:hover { background: #0f2743; }

.alert {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--red-soft);
  border-left: 5px solid var(--red);
  border-radius: 6px;
  color: var(--red);
  font-weight: 600;
}

.foot {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- topbar */

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 16px 0;
}

.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.topbar .eyebrow { color: #a9c4e6; margin-bottom: 2px; }
.topbar h1 { margin: 0; font-size: 23px; font-weight: 700; line-height: 1.25; }

.whoami {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.who-name { font-size: 16px; color: #cfe0f4; }

.btn-ghost {
  display: inline-block;
  padding: 9px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

.autosave-banner {
  background: var(--green-soft);
  border-bottom: 2px solid #b8e0cb;
  color: var(--green);
  text-align: center;
  padding: 14px 24px;
  font-size: 17px;
}

/* ---------------------------------------------------------------- sheet */

.sheet {
  max-width: 900px;
  margin: 28px auto 60px;
  padding: 0 24px;
}

.assignment-note {
  background: var(--navy-soft);
  border-left: 6px solid var(--navy);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 30px;
}

.assignment-note p { margin: 0; }

.mandatory-header {
  margin: 34px 0 -6px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--red);
}

.item {
  background: var(--paper);
  border-radius: 12px;
  padding: 26px 28px 28px;
  margin: 22px 0;
  box-shadow: 0 2px 10px rgba(20, 30, 50, .08);
  border-left: 8px solid var(--line);
}

.item-mine { border-left-color: var(--navy); }
.item-other { opacity: .92; }

.item-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}

.item-code {
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  white-space: nowrap;
}

.item-titlewrap {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.item-title { margin: 0; font-size: 21px; line-height: 1.3; }

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-you { background: var(--green); color: #fff; }
.chip-other { background: #e7eaef; color: var(--ink-soft); }

.item-body { margin: 12px 0 20px; color: var(--ink); }

.item-body mark { background: #fff275; padding: 0 2px; }

.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.photo {
  display: block;
  line-height: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.photo img {
  display: block;
  height: 180px;
  width: auto;
  max-width: 100%;
  object-fit: cover;
}

.response {
  border-top: 2px solid var(--line);
  padding-top: 20px;
}

.response-label {
  display: block;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
}

.response-input {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  font-family: inherit;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  background: #fffdf5;
  border: 2px solid #c9a227;
  border-radius: 9px;
  resize: vertical;
  overflow: hidden;
}

.response-input:focus {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
  background: #fff;
}

.response-input::placeholder { color: #9aa2ae; }

.save-status {
  margin: 9px 0 0;
  min-height: 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

.save-status.saving { color: var(--amber); }
.save-status.saved { color: var(--green); }
.save-status.saved::before { content: "✓ "; }
.save-status.error { color: var(--red); }

/* Shown when the last answer on an item came from the other person, so nobody
   types over a colleague's work without noticing. */
.other-editor {
  margin: 6px 0 0;
  padding: 9px 13px;
  background: #fff8e1;
  border-left: 4px solid #c9a227;
  border-radius: 6px;
  font-size: 15px;
  color: var(--amber);
  font-weight: 600;
}

.other-editor.hidden { display: none; }

.response-readonly {
  padding: 15px 16px;
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
}

.response-readonly .empty { color: #77808e; font-style: italic; }

.sheet-foot {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
}

.sheet-foot p { margin: 0; }

/* ---------------------------------------------------------------- toast */

.save-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 90px);
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
  z-index: 50;
}

.save-toast.show { transform: translate(-50%, 0); opacity: 1; }
.save-toast.bad { background: var(--red); }

@media (max-width: 620px) {
  body { font-size: 17px; }
  .sheet { padding: 0 14px; }
  .item { padding: 20px 18px 22px; border-left-width: 6px; }
  .photo img { height: 140px; }
  .topbar h1 { font-size: 20px; }
}
