/* Garam — mobile-first CSS. No external fetches, system font stack. */

:root {
  --bg: #FDF8F3;
  --ink: #1C1917;
  --accent: #C2410C;
  --card: #FFFFFF;
  --muted: #78716C;
  --line: #E7E0D6;
  --normal: #059669;
  --low: #D97706;
  --verylow: #DC2626;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 110px;
}

/* ---------- Header ---------- */

header {
  margin-bottom: 8px;
}

header h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: -0.5px;
  color: var(--accent);
}

.tagline {
  margin: 4px 0 0;
  font-weight: 700;
}

.sample-note {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Tabs ---------- */

.tab {
  display: none;
}

.tab.active {
  display: block;
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  z-index: 10;
}

.tabbar .tabs {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
}

.tab-btn {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 4px calc(14px + env(safe-area-inset-bottom));
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.tab-btn.active {
  color: var(--accent);
}

/* ---------- Pressure tab ---------- */

.field-label {
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
}

.select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: #FFFFFF;
  color: var(--ink);
}

.status-chip {
  margin: 16px 0;
  padding: 20px 12px;
  border-radius: var(--radius);
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.12);
}

.alert {
  background: #FEF3C7;
  border: 1px solid var(--low);
  color: #92400E;
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 0.95rem;
}

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

.slot-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.slot-name {
  font-weight: 800;
}

.slot-time {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.slot-psi {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 8px 0;
}

.badge {
  display: inline-block;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

.section-title {
  margin: 26px 0 10px;
  font-size: 1.1rem;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px 10px;
}

.bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  min-height: 8px;
}

.chart-labels {
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
}

.chart-labels span {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Bachat tab ---------- */

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: #FFFFFF;
  color: var(--ink);
}

.fuel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.fuel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}

.fuel-name {
  font-size: 0.78rem;
  font-weight: 800;
}

.fuel-cost {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  margin-top: 6px;
}

.fuel-cost .per {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
}

.verdict {
  background: #FFFBEB;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.fine-print {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Checklist tab ---------- */

.progress-line {
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 14px;
  margin-bottom: 10px;
  font-weight: 600;
  cursor: pointer;
}

.check-row input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- Safety tab ---------- */

.emergency {
  background: linear-gradient(135deg, var(--verylow), var(--accent));
  color: #FFFFFF;
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0 8px;
}

.emergency h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.emergency ol {
  margin: 0;
  padding-left: 22px;
}

.emergency li {
  margin-bottom: 7px;
  font-weight: 700;
}

.checklist-static {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 14px 38px;
  margin: 0 0 18px;
}

.checklist-static li {
  margin-bottom: 7px;
}

.report-count-line {
  font-size: 1rem;
}

#report-form input,
#report-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: #FFFFFF;
  color: var(--ink);
  margin-bottom: 10px;
}

#report-form button {
  width: 100%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

#report-form button:active {
  opacity: 0.9;
}

.thanks {
  background: #ECFDF5;
  border: 1px solid var(--normal);
  color: #065F46;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  margin-top: 14px;
}

/* ---------- Footer ---------- */

footer {
  margin-top: 32px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
