/* Mobile-first, duże cele dotykowe — apka do obsługi jedną ręką na hali targowej */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 14px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.view { min-height: 100dvh; padding: 16px; max-width: 480px; margin: 0 auto; }
.hidden { display: none !important; }

/* --- Logowanie --- */
.login-box { display: flex; flex-direction: column; gap: 10px; padding-top: 12vh; }
.login-box h1 { font-size: 2rem; text-align: center; }
.subtitle { text-align: center; color: var(--muted); margin-bottom: 24px; }
label { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

input, select, textarea {
  font-size: 1.1rem;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: var(--surface);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
#login-pin { letter-spacing: 8px; text-align: center; font-size: 1.4rem; }

/* --- Przyciski --- */
.btn {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  touch-action: manipulation;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-dark); }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-big { width: 100%; padding: 20px; font-size: 1.25rem; margin: 16px 0; }
.btn-link { background: none; border: none; color: var(--accent); font-size: 0.95rem; cursor: pointer; padding: 8px; }
.btn-danger-state { background: var(--danger) !important; color: #fff; }

/* --- Główny --- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 12px; }
.fair-name { display: block; font-size: 0.8rem; color: var(--muted); }
.banner {
  background: #fef3c7; color: #92400e;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 0.9rem; margin-bottom: 8px;
}
.queue-header { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.queue-header h2 { font-size: 1.05rem; }

.queue-list { list-style: none; margin-top: 8px; }
.queue-list li {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.lead-info strong { display: block; }
.lead-info time { font-size: 0.8rem; color: var(--muted); }

.status { font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status-sent { background: #dcfce7; color: var(--ok); }
.status-queued { background: #fef3c7; color: var(--warn); }
.status-sending { background: #e0f2fe; color: var(--accent); }
.status-error { background: #fee2e2; color: var(--danger); }

/* --- Dodaj kontakt --- */
.form { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.card-required { border: 2px solid var(--accent); }
.card-title { font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.optional { font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.required { font-size: 0.75rem; color: var(--accent); font-weight: 700; }

#photo-preview { width: 100%; border-radius: 10px; }
#audio-preview { width: 100%; }
.record-timer { font-variant-numeric: tabular-nums; font-size: 1.2rem; color: var(--danger); text-align: center; }

.error { color: var(--danger); font-size: 0.9rem; text-align: center; }
.hint { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 12px; line-height: 1.5; }
