/* Ciemny motyw, bo intake robi się w warsztacie, często wieczorem.
   Wszystkie elementy dotykowe mają co najmniej 48 px wysokości — palec
   w rękawicy roboczej nie trafia w małe przyciski. */

:root {
  --bg: #111822;
  --panel: #1b2534;
  --line: #2b3a4f;
  --text: #e8eef7;
  --muted: #93a3ba;
  --accent: #f0b03e;
  --ok: #56bea0;
  --bad: #e2725b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.bar h1 { font-size: 18px; margin: 0; font-weight: 600; }

.status { font-size: 13px; color: var(--muted); }
.status[data-state="ok"] { color: var(--ok); }
.status[data-state="bad"] { color: var(--bad); }

main { padding: 16px; max-width: 640px; margin: 0 auto; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }

input[type="text"], textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

textarea { min-height: 96px; resize: vertical; }

.actions { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #17202c; }

.dictate { margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--panel); }
.dictate summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.dictate textarea { margin: 10px 0; background: var(--bg); }
.dictate .btn { width: 100%; }

.hint { color: var(--muted); font-size: 14px; }
.hint em { color: var(--text); font-style: normal; }

.queue h2 { font-size: 16px; display: flex; gap: 10px; align-items: baseline; }
.counts { font-size: 13px; color: var(--muted); font-weight: 400; }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg);
}

.item .glyph {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.item .meta { min-width: 0; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { font-size: 13px; color: var(--muted); }

.tag { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag[data-status="pending"] { color: var(--accent); border-color: var(--accent); }
.tag[data-status="committed"] { color: var(--ok); border-color: var(--ok); }
.tag[data-status="rejected"] { color: var(--bad); border-color: var(--bad); }
.tag[data-status="failed"] { color: var(--bad); border-color: var(--bad); }

.retry { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--bad); background: transparent; color: var(--bad); font: inherit; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

.toast[data-kind="bad"] { border-color: var(--bad); }
