/* Shared styles for the tracking page (/jalgi/) and the technician's work view (/worklist/).
   Builds on styles.css. */
.app-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.app-header .header-inner { gap: 16px; }
.app-user { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.app-main { padding: 48px 0 80px; }
.narrow { max-width: 560px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: grid; gap: 18px;
}
.card h1 { font-size: 1.8rem; }
.card h2 { font-size: 1.25rem; }
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hidden { display: none !important; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 0.9rem; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; width: 100%;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.code-input { font-family: var(--mono) !important; font-size: 1.4rem !important; letter-spacing: 0.3em; }

.btn-small { padding: 10px 14px; font-size: 0.92rem; }
.btn:disabled { opacity: .5; cursor: wait; }
.cf-turnstile { min-height: 65px; }

.note { font-size: 0.9rem; color: var(--muted); margin: 0; }
.note.error { color: var(--accent-ink); }
.test-box {
  border: 1.5px dashed var(--accent); background: #fff4ee; color: var(--accent-ink);
  border-radius: var(--radius); padding: 12px 14px; font-size: 0.92rem;
}
.test-box strong { font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.1em; }
.big-code { font-family: var(--mono); font-size: 2.6rem; font-weight: 500; letter-spacing: 0.15em; text-align: center; }

.mono { font-family: var(--mono); }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem; padding: 3px 8px;
  border-radius: 99px; border: 1px solid var(--line); background: #fff; white-space: nowrap;
}
.badge-uus { border-color: var(--accent); color: var(--accent-ink); }
.badge-valmis { border-color: var(--ok); color: var(--ok); }
.badge-uleantud, .badge-tuhistatud { color: var(--muted); }

/* Progress steps on the tracking page */
.progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.progress li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding-bottom: 14px; position: relative; color: var(--muted); }
.progress li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--paper); margin: 5px 0 0 7px; z-index: 1;
}
.progress li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 20px; bottom: -2px; width: 2px; background: var(--line); }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--ok); border-color: var(--ok); }
.progress li.done::after { background: var(--ok); }
.progress li.current { color: var(--ink); font-weight: 600; }
.progress li.current::before { background: var(--accent); border-color: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.timeline time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); display: block; }
.timeline .internal { color: var(--muted); font-style: italic; }

/* Work view */
.work-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 24px; align-items: start; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.toolbar input { flex: 1; min-width: 140px; font: inherit; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.tabs { display: flex; gap: 4px; }
.tabs button {
  font: 500 0.88rem var(--sans); padding: 8px 12px; border: 1.5px solid var(--line); background: #fff;
  border-radius: var(--radius); cursor: pointer;
}
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job-list button {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  display: grid; gap: 4px;
}
.job-list button:hover { border-color: var(--ink-2); }
.job-list button[aria-current="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.job-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.job-meta { font-size: 0.85rem; color: var(--muted); }
.details dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0; }
.details dt { color: var(--muted); font-size: 0.9rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.description { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.login-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-methods button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  .work-grid { grid-template-columns: 1fr; }
  .details dl { grid-template-columns: 1fr; gap: 2px; }
  .details dd { margin-bottom: 8px; }
}
