/* The maintenance tech (Alex), 11/24 demo: his ticket list and one ticket.
   Built for one hand and direct sun: huge cards, 64px keys, high contrast, words on every color.
   Tokens only (app.css :root). */

.tk-chrome .hello { padding-bottom: 20px; }
.tk-hello-sub { margin-top: 10px; font: 750 17px/1.4 var(--font); color: var(--on-navy); }
.tk-body { padding-top: 14px; padding-bottom: calc(40px + var(--safe-b)); }
.tk-ro {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--amber-tint); color: var(--amber-ink); font: 750 15px/1.3 var(--font); box-shadow: inset 0 0 0 1.5px var(--amber-edge);
}
.tk-ro .ic { width: 20px; height: 20px; flex: none; }

/* ---------- groups ---------- */
.tk-group { margin-top: 22px; }
.tk-group:first-child, .tk-ro + .tk-group { margin-top: 4px; }
.tk-gh { display: grid; gap: 4px; margin-bottom: 10px; padding-left: 12px; border-left: 6px solid var(--navy-3); }
.tk-gh h2 { display: flex; align-items: center; gap: 10px; font: 900 21px/1.1 var(--font); letter-spacing: -.01em; color: var(--ink); }
.tk-gh p { font: 650 15px/1.35 var(--font); color: var(--ink-2); }
.tk-gn {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r-pill);
  background: var(--navy); color: var(--on-navy); font: 900 15px/1 var(--font); font-variant-numeric: tabular-nums;
}
.tk-gh.g-emergency { border-left-color: var(--red); }
.tk-gh.g-emergency .tk-gn { background: var(--red); }
.tk-gh.g-new { border-left-color: var(--amber); }
.tk-gh.g-new .tk-gn { background: var(--amber); color: var(--navy); }
.tk-gh.g-upcoming { border-left-color: var(--slate); }
.tk-gh.g-upcoming .tk-gn { background: var(--slate); }
.tk-list { display: grid; gap: 12px; }

/* ---------- one card = one ticket, the whole card is the tap ---------- */
.tk-card {
  position: relative; display: block; min-height: 120px; padding: 14px 48px 16px 20px;
  background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-xl); color: var(--ink);
  text-decoration: none; overflow: clip;
}
.tk-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--blue-edge); }
.tk-card.u-emergency { border-color: var(--red); }
.tk-card.u-emergency::before { background: var(--red); }
.tk-card.u-soon::before { background: var(--amber); }
.tk-card.is-done { background: var(--sunk); }
.tk-card.is-done::before { background: var(--green); }
.tk-card:active { background: var(--tray); }
.tk-top { display: flex; align-items: center; gap: 8px; }
.tk-no { font: 800 14.5px/1 var(--font); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tk-no.on-navy { color: var(--on-navy-2); }
.tk-addr { margin-top: 10px; font: 900 22px/1.15 var(--font); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tk-unit { margin-top: 3px; font: 800 17px/1.2 var(--font); color: var(--navy-3); }
.tk-what { margin-top: 8px; font: 700 18px/1.35 var(--font); color: var(--ink); overflow-wrap: anywhere; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font: 750 15.5px/1.25 var(--font); color: var(--ink-2); }
.tk-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tk-meta .ic { width: 18px; height: 18px; stroke-width: 2.4; color: var(--ink-3); }
.tk-pills { margin-top: 10px; }
.tk-go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.tk-go .ic { width: 26px; height: 26px; stroke-width: 2.6; }

.tk-urg {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 4px 10px; border-radius: var(--r-xs);
  font: 900 13.5px/1.1 var(--font); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.tk-urg .ic { width: 16px; height: 16px; stroke-width: 2.8; }
.tk-urg.u-emergency { background: var(--red); color: var(--on-navy); }
.tk-urg.u-soon { background: var(--amber); color: var(--navy); }
.tk-urg.u-whenever { background: var(--blue-tint); color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue-edge); }

.tk-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 11px; border-radius: var(--r-pill);
  font: 800 14.5px/1.2 var(--font);
}
.tk-pill .ic { width: 17px; height: 17px; stroke-width: 2.6; }
.tk-pill.t-ok { background: var(--green-tint); color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green-edge); }
.tk-pill.t-wait { background: var(--amber-tint); color: var(--amber-ink); box-shadow: inset 0 0 0 1.5px var(--amber-edge); }
.tk-pill.t-bad { background: var(--red-tint); color: var(--red-ink); box-shadow: inset 0 0 0 1.5px var(--red-edge); }

.tk-empty { display: grid; justify-items: center; gap: 6px; margin-top: 8px; padding: 28px 20px; border: var(--bw) dashed var(--edge); border-radius: var(--r-xl); text-align: center; }
.tk-empty .ic { width: 40px; height: 40px; color: var(--green); stroke-width: 2.4; }
.tk-empty b { font: 850 19px/1.2 var(--font); }
.tk-empty p { font: 600 15.5px/1.45 var(--font); color: var(--ink-2); }
.tk-done-tog {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; margin-bottom: 8px; padding: 0 4px; border: 0; background: none;
  font: 850 17px/1 var(--font); color: var(--ink-2);
}
.tk-done-tog .ic { width: 22px; height: 22px; }

/* ---------- one ticket: header ---------- */
.tk-head { padding: 0 var(--gutter) 20px; }
.tk-back { margin-left: -4px; }
.tk-head-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.tk-st {
  display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: var(--r-xs);
  background: var(--glass-16); color: var(--on-navy); box-shadow: inset 0 0 0 1.5px var(--glass-30); font: 850 14px/1.1 var(--font);
}
.tk-head h1 { margin-top: 12px; font: 900 29px/1.1 var(--font); letter-spacing: -.025em; overflow-wrap: anywhere; }
.tk-head-unit { margin-top: 4px; font: 800 19px/1.2 var(--font); color: var(--amber); }
.tk-head-what { margin-top: 10px; font: 750 19px/1.35 var(--font); color: var(--on-navy); overflow-wrap: anywhere; }

/* ---------- what the tenant said ---------- */
.tk-detail { display: grid; gap: 14px; }
.tk-detail > .hsec { margin: 10px 0 -4px; }
.tk-said-box { padding: 16px; background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-xl); }
.tk-said-head { display: flex; align-items: center; gap: 12px; }
.tk-said-head b { display: block; font: 850 17px/1.2 var(--font); }
.tk-said-head span { display: block; margin-top: 3px; font: 650 14.5px/1.25 var(--font); color: var(--ink-2); }
.tk-av { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-2); font: 900 15px/1 var(--font); }
.tk-quote {
  margin-top: 12px; padding: 13px 15px; border-radius: 4px 16px 16px 16px; background: var(--sunk);
  font: 550 17px/1.5 var(--font); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
}
.tk-quote.none { color: var(--ink-2); }
.tk-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.tk-ph { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--r-md); overflow: clip; background: var(--photo-bg); }
.tk-ph img { width: 100%; height: 100%; object-fit: cover; }
.tk-ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px var(--photo-ring); }
.tk-loading { margin-top: 10px; font: 600 15px/1.4 var(--font); color: var(--ink-3); }
.tk-facts { display: grid; gap: 0; margin-top: 14px; border-top: var(--bw-hair) solid var(--hair); }
.tk-fact { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: var(--bw-hair) solid var(--hair); }
.tk-fact:last-child { border-bottom: 0; padding-bottom: 0; }
.tk-fact > .ic { flex: none; width: 24px; height: 24px; color: var(--navy-3); stroke-width: 2.3; }
.tk-fact span { display: block; font: 800 13px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tk-fact b { display: block; margin-top: 2px; font: 800 17px/1.3 var(--font); color: var(--ink); }
.tk-fact.warn > .ic { color: var(--amber-ink); }
.tk-fact.warn b { color: var(--amber-ink); }

/* ---------- the tenant's answer and the visit ---------- */
.tk-ans { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border-radius: var(--r-lg); border: var(--bw) solid; }
.tk-ans > .ic { flex: none; width: 26px; height: 26px; margin-top: 1px; stroke-width: 2.5; }
.tk-ans b { display: block; font: 900 19px/1.25 var(--font); }
.tk-ans p { margin-top: 4px; font: 650 16px/1.4 var(--font); overflow-wrap: anywhere; }
.tk-ans.t-ok { background: var(--green-tint); border-color: var(--green-edge); color: var(--green); }
.tk-ans.t-ok b, .tk-ans.t-ok p { color: var(--ink); }
.tk-ans.t-wait { background: var(--amber-tint); border-color: var(--amber-edge); color: var(--amber-ink); }
.tk-ans.t-wait b, .tk-ans.t-wait p { color: var(--amber-ink); }
.tk-ans.t-bad { background: var(--red-tint); border-color: var(--red-edge); color: var(--red); }
.tk-ans.t-bad b, .tk-ans.t-bad p { color: var(--red-ink); }
.tk-ans.t-go { background: var(--blue-tint); border-color: var(--blue-edge); color: var(--blue); }
.tk-ans.t-go b, .tk-ans.t-go p { color: var(--ink); }
.tk-ans.t-new { background: var(--card); border-color: var(--amber); color: var(--amber-ink); }
.tk-ans.t-new b { color: var(--ink); }
.tk-ans.t-new p { color: var(--ink-2); }

/* ---------- the big keys, always in the same order ---------- */
.tk-keys { display: grid; gap: 10px; }
.tk-key { width: 100%; min-height: var(--h-key); justify-content: flex-start; gap: 14px; padding: 8px 18px; border-radius: var(--r-lg); text-align: left; }
.tk-key .ic { width: 26px; height: 26px; flex: none; }
.tk-key-t { display: grid; gap: 3px; }
.tk-key-t b { font: 850 19px/1.15 var(--font); }
.tk-key-t small { font: 650 14px/1.2 var(--font); opacity: .82; }
.tk-key.is-next { min-height: 76px; box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--amber-ring); }
.tk-key.btn-navy.is-next, .tk-key.btn-green.is-next { box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--navy-edge); }
.tk-key.btn-line { border-color: var(--line); }
.tk-key.btn-line .ic { color: var(--navy-3); }

/* ---------- notes ---------- */
.tk-log { display: grid; gap: 10px; }
.tk-log-row { padding: 12px 14px; background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r-lg); }
.tk-log-row.from-tenant { background: var(--teal-tint); border-color: var(--teal-edge); }
.tk-log-top { display: flex; justify-content: space-between; gap: 10px; font: 650 14px/1.3 var(--font); color: var(--ink-2); }
.tk-log-top b { font: 850 15.5px/1.3 var(--font); color: var(--ink); }
.tk-log-row p { margin-top: 5px; font: 550 16px/1.45 var(--font); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Pick a time sheet ---------- */
.tk-said { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--sunk); box-shadow: inset 0 0 0 1.5px var(--hair); }
.tk-said > .ic { flex: none; width: 22px; height: 22px; color: var(--navy-3); }
.tk-said b { display: block; font: 800 15px/1.3 var(--font); color: var(--ink-2); }
.tk-said p { margin-top: 2px; font: 750 17px/1.35 var(--font); color: var(--ink); overflow-wrap: anywhere; }
.tk-said.t-bad { background: var(--red-tint); box-shadow: inset 0 0 0 1.5px var(--red-edge); }
.tk-said.t-bad > .ic, .tk-said.t-bad b { color: var(--red-ink); }
.tk-lbl { margin-top: 16px; }
.tk-chips { display: grid; gap: 8px; }
.tk-chips.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-chip {
  position: relative; display: grid; align-content: center; justify-items: center; gap: 3px; min-height: 64px; padding: 6px 4px;
  border: var(--bw) solid var(--edge); border-radius: var(--r-md); background: var(--card); color: var(--ink); text-align: center;
}
.tk-chip b { font: 850 17.5px/1.1 var(--font); }
.tk-chip span { font: 650 13.5px/1.15 var(--font); color: var(--ink-2); }
.tk-chip[aria-checked="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.tk-chip[aria-checked="true"] span { color: var(--on-navy-2); }
.tk-chip:disabled { opacity: .38; text-decoration: line-through; }
.tk-slot { min-height: 56px; }
.tk-chip-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; font-size: 16px; }
.tk-chip-date:focus-within { box-shadow: var(--focus); }
.tk-other { display: flex; align-items: center; gap: 12px; margin-top: 10px; font: 800 15.5px/1.2 var(--font); color: var(--ink-2); }
.tk-other span { flex: none; }
.tk-time { flex: 1; min-width: 0; }
.tk-go-btn:disabled { opacity: .55; filter: grayscale(.4); }
.tk-said-head > .tk-av { display: grid; margin-top: 0; color: var(--teal-2); font: 900 15px/1 var(--font); }
