/* Navy, teal and gold, matching the proposal set and the IceCoach platform. */
:root {
  --navy: #1b2a4a;
  --teal: #1f8a8c;
  --gold: #c9a227;
  --slate: #5a6a85;
  --paper: #f5f7fa;
  --line: #c7d0dd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Calibri, "Segoe UI", system-ui, sans-serif;
  color: #1c1c1c;
  background: var(--paper);
  line-height: 1.5;
}

.masthead {
  background: var(--navy);
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
}
.masthead h1 { margin: 0; font-size: 1.5rem; }
.tagline { margin: 0.25rem 0 0; color: #c7d0dd; font-size: 0.95rem; }

main { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.step h2 { margin-top: 0; color: var(--navy); font-size: 1.2rem; }
.hint { color: var(--slate); font-size: 0.92rem; }

.consent {
  background: var(--paper);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.consent h3 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--navy); }

.field { display: block; margin: 1rem 0; }
.field span { display: block; font-weight: 600; margin-bottom: 0.25rem; color: var(--navy); }
.field input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}
.field small { color: var(--slate); }

.consent-check { display: flex; gap: 0.5rem; align-items: flex-start; margin: 1rem 0; font-size: 0.95rem; }

button {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary { background: var(--teal); color: #fff; }
.secondary { background: #fff; color: var(--navy); border-color: var(--line); }

.status { min-height: 1.2rem; color: var(--slate); font-size: 0.92rem; }
.status.error { color: #a4243b; }

.documents { list-style: none; margin: 0; padding: 0; }
.documents li {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.documents .title { font-weight: 600; color: var(--navy); }
.documents .meta { color: var(--slate); font-size: 0.85rem; }
.badge { font-size: 0.78rem; padding: 0.15rem 0.5rem; border-radius: 999px; }
.badge.signed { background: #e6f2f2; color: var(--teal); }
.badge.waiting { background: #fff8e1; color: #8a6d1f; }

.camera-host { min-height: 12rem; border: 1px dashed var(--line); border-radius: 6px; margin: 1rem 0; }

.receipt { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; font-size: 0.92rem; }
.receipt dt { color: var(--slate); }
.receipt dd { margin: 0; }
.hash { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.78rem; word-break: break-all; }

footer { text-align: center; color: var(--slate); font-size: 0.85rem; padding-bottom: 2rem; }

.guardian {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 1rem 0.25rem;
  margin: 0 0 1rem;
  background: var(--paper);
}
.guardian legend { font-weight: 600; color: var(--navy); font-size: 0.95rem; padding: 0 0.35rem; }
.guardian select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

/* The way out for a computer with no usable camera. Set apart from the file
   picker above it so it reads as an alternative, not a second step. */
.handoff {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.qr-host {
  width: 220px;
  max-width: 100%;
  margin: 0.75rem 0;
}

.qr-host svg { width: 100%; height: auto; display: block; }

/* A URL nobody is expected to type, shown for the case where the camera will
   not scan. It must wrap rather than stretch the card. */
.handoff-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

/* A signed row keeps its badge and gains a way back into the document. */
.documents .actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.documents .actions button { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

/* The owner console. Wider than the signing card: it carries tables of keys
   and documents rather than one question at a time. */
body[data-page="console"] main { max-width: 46rem; }

.banner {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--slate);
  background: #eef1f7;
  font-size: 0.92rem;
  line-height: 1.5;
}

.banner.pending { border-left-color: var(--gold); background: #fdf7e6; }
.banner.approved { border-left-color: var(--teal); background: #eef7f6; }
.banner.rejected { border-left-color: #b3261e; background: #fbeceb; }

/* An API key, shown once. Monospace so the characters are unambiguous, and
   selectable in one gesture. */
.new-key {
  background: #1c2a4a;
  color: #e8ecf5;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  overflow-x: auto;
  user-select: all;
}
