/* Task cards (Card.tsx, fields.tsx, ToDo.tsx). Big targets, dark words on white: a building site, dusty hands, bright sun. */

/* ── To do on the Tasks tab ── */
.cd-todo {
  padding: 4px 16px 6px;
}
.cd-todo .tk-gh {
  padding: 10px 2px 8px;
}
.cd-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow1);
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.cd-row[data-state="sent"] {
  opacity: 0.6;
}
.cd-row > .ico {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ink3);
}
.cd-verb {
  flex: none;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 99px;
  background: #d4e85c;
  color: #0b3d2e;
  font-size: 0.8rem;
  font-weight: 750;
  text-align: center;
}
.cd-rt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cd-rt b {
  font-size: 1rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-rt span {
  font-size: 0.82rem;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-starts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.cd-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--line2);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
}
.cd-start .ico {
  width: 18px;
  height: 18px;
  color: #0b3d2e;
}

/* ── the card ── */
.cd {
  padding: 4px 16px 24px;
}
.cd h2 {
  margin: 6px 0 4px;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cd-help {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--ink2);
}
/* What the giver wrote with the task, on the card the person opens. */
.cd-brief {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  white-space: pre-wrap;
}
.cd-brief span {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink2);
}
/* A calm line: something could not be done, nothing is wrong with the person's answers. */
.cd-calm {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem;
}
.cd-sub {
  margin: 16px 0 8px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink2);
}
.cd-fine {
  margin: 8px 2px 0;
  font-size: 0.82rem;
  color: var(--ink2);
}
.cd-why {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(217, 75, 61, 0.1);
  color: #9c2f24;
  font-size: 0.92rem;
  font-weight: 600;
}
.cd-dots {
  display: flex;
  gap: 5px;
  margin: 4px 0 10px;
}
.cd-dots i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--line2);
}
.cd-dots i[data-on] {
  background: #0b3d2e;
}

/* taps */
.cd-taps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cd-tap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 18px;
  border: 2px solid var(--line2);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
}
.cd-tap .ico {
  width: 18px;
  height: 18px;
}
.cd-tap[data-on] {
  border-color: #0b3d2e;
  background: #0b3d2e;
  color: #fff;
}
.cd-taps-big {
  flex-direction: column;
}
.cd-taps-big .cd-tap {
  width: 100%;
  min-height: 60px;
  font-size: 1.08rem;
}
.cd-taps-big .cd-tap[data-kind="pass"][data-on] {
  background: #d4e85c;
  border-color: #d4e85c;
  color: #0b3d2e;
}
.cd-taps-big .cd-tap[data-kind="issue"][data-on] {
  background: #b2392c;
  border-color: #b2392c;
}

/* the number pad */
.cd-pad {
  margin-bottom: 12px;
}
.cd-num {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow1);
  margin-bottom: 10px;
}
.cd-num b {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.cd-num span {
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--ink2);
}
.cd-num small {
  font-size: 0.95rem;
  color: var(--ink2);
}
.cd-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cd-key {
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow1);
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cd-key:active {
  background: var(--bg2);
}
.cd-key .ico {
  width: 24px;
  height: 24px;
}

/* ticks */
.cd-ticks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-tick {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow1);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  text-align: left;
}
.cd-box {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid var(--line2);
  display: grid;
  place-items: center;
}
.cd-tick[data-on] .cd-box {
  background: #0b3d2e;
  border-color: #0b3d2e;
  color: #d4e85c;
}
.cd-box .ico {
  width: 18px;
  height: 18px;
}

/* words */
.cd-words textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 2px solid var(--line2);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  resize: vertical;
}
.cd-words textarea:focus {
  outline: none;
  border-color: #0b3d2e;
}
.cd-mic {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 99px;
  background: #0b3d2e;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cd-mic .ico {
  width: 22px;
  height: 22px;
  color: #d4e85c;
}
.cd-mic[data-live] {
  background: #b2392c;
}
.cd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink2);
}
.cd-field input {
  height: 52px;
  padding: 0 14px;
  border: 2px solid var(--line2);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

/* check and send */
.cd-said {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow1);
  overflow: hidden;
}
.cd-said li + li {
  border-top: 1px solid var(--line);
}
.cd-said button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.cd-said span {
  flex: none;
  width: 34%;
  font-size: 0.86rem;
  color: var(--ink2);
}
.cd-said b {
  flex: 1;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 650;
}
.cd-said .ico {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ink3);
}

/* the foot */
.cd-foot {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.cd-go {
  flex: 1;
  height: 58px;
  border: 0;
  border-radius: 99px;
  background: #0b3d2e;
  color: #fff;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 750;
}
.cd-go:disabled {
  opacity: 0.4;
}
.cd-back {
  flex: none;
  width: 110px;
  height: 58px;
  border: 2px solid var(--line2);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
}

/* sent, saved or not sent */
.cd-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 8px 16px;
}
.cd-done-ic {
  width: 72px;
  height: 72px;
  border-radius: 36px;
  display: grid;
  place-items: center;
  background: #d4e85c;
  color: #0b3d2e;
}
.cd-done[data-state="waiting"] .cd-done-ic,
.cd-done[data-state="sending"] .cd-done-ic {
  background: var(--bg2);
  color: var(--ink2);
}
.cd-done[data-state="failed"] .cd-done-ic {
  background: rgba(217, 75, 61, 0.14);
  color: #b2392c;
}
.cd-done-ic .ico {
  width: 34px;
  height: 34px;
}
.cd-done b {
  font-size: 1.4rem;
  font-weight: 800;
}
.cd-done p {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--ink2);
}
.cd-done .cd-go {
  width: 100%;
  flex: none;
}
.cd-fix {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: left;
}
.cd-fix span {
  flex: none;
  padding: 8px 14px;
  border-radius: 99px;
  background: #b2392c;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 750;
}

/* A small tag on a tap: a material named at the gate, waiting for the office. */
.cd-tag {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink2);
  font-size: 0.74rem;
  font-weight: 650;
}
.cd-tap[data-on] .cd-tag {
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
}
.cd-wide {
  width: 100%;
  margin-top: 10px;
}
/* Goods in to confirm: the facts as plain lines, the reason box, Reject. */
.cd-facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
}
.cd-arrival {
  font-weight: 650;
}
.cd-field textarea {
  padding: 12px 14px;
  border: 2px solid var(--line2);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  resize: vertical;
}
.cd-go.cd-no {
  background: #9c2f24;
}
.cd-brief .cd-tag {
  align-self: flex-start;
  margin: 6px 0 0;
}

/* Haulage (cards/Haulage.tsx): a decision row inside the sheet, not the sheet's own foot. */
.cd-foot.cd-inline {
  padding: 10px 0 0;
  background: none;
  border-top: 0;
}
.cd-haulage .cd-tag {
  margin-left: 6px;
}

/* Contractors (cards/Measured.tsx): a choice of plots or of how it was measured, and a materials or cap flag. */
.cd-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.cd-seg button {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--line2);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}
.cd-seg button[data-on] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--card);
}
.cd-flag {
  margin-top: 8px;
}
.cd-measured .cd-tag,
.cd-account .cd-tag {
  margin-left: 6px;
}

/* A yes or no under a field (haulage: "the supplier brought it at its own cost", 2026-10-24.4). */
.cd-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 10px;
  font-size: 14px;
  line-height: 1.35;
}
.cd-check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--ink, currentColor);
}
