/* ATX Firefighter Moving - Material Tracker
   Mobile-first, clean, firefighter red accents */

:root {
  --red: #DC2626;
  --red-dark: #B91C1C;
  --red-soft: #FEE2E2;
  --green: #059669;
  --green-soft: #D1FAE5;
  --orange: #D97706;
  --blue: #2563EB;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --nav-h: 68px;
  --header-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body, #root {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior: none;
}

/* Loading */
.app-loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gray-500);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* App shell */
.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: var(--gray-50);
  position: relative;
  box-shadow: 0 0 0 1px var(--gray-200);
}

.app-header {
  height: var(--header-h);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  font-size: 28px;
  line-height: 1;
}
.company {
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.user-line {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge {
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  text-transform: uppercase;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:active { background: var(--gray-200); }

.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: none;
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}
.nav-item.active {
  color: var(--red);
}
.nav-icon {
  font-size: 20px;
  line-height: 1;
}
.nav-label {
  letter-spacing: 0.01em;
}

/* Page common */
.page {
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.page-header {
  margin-bottom: 20px;
}
.page-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-sub {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}
.back-btn {
  border: none;
  background: none;
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
  padding: 0 0 8px;
  cursor: pointer;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--red);
  color: white;
}
.btn.primary:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
  transform: none;
}
.btn.secondary {
  background: white;
  color: var(--gray-800);
  border: 1px solid var(--gray-300);
}
.btn.ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn.danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}
.btn.big {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  border-radius: var(--radius);
}
.btn.full { width: 100%; }
.link-btn {
  border: none;
  background: none;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

/* Inputs */
.input {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;
  background: white;
  color: var(--gray-900);
  outline: none;
  transition: border 0.15s;
}
.input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.input.small { padding: 8px 10px; font-size: 14px; }
.input.textarea { resize: vertical; min-height: 64px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.inline-num {
  width: 48px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
  text-align: center;
}

/* Login */
.login-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1F2937 0%, #111827 50%, #7F1D1D 100%);
  color: white;
  padding: 24px 20px 40px;
}
.login-hero {
  text-align: center;
  padding: 40px 0 32px;
}
.login-hero.small {
  padding: 20px 0 16px;
  text-align: left;
}
.login-logo {
  font-size: 64px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.login-hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-sub {
  margin: 6px 0 0;
  opacity: 0.7;
  font-size: 15px;
}
.login-card {
  background: white;
  color: var(--gray-900);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow-lg);
  flex: 1;
}
.login-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}
.crew-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crew-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border 0.15s;
}
.crew-btn:active, .crew-btn:hover {
  background: var(--red-soft);
  border-color: #FECACA;
}
.crew-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.crew-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 22px;
}
.crew-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}
.crew-name {
  font-weight: 600;
  font-size: 16px;
  flex: 1;
}
.role-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 2px 8px;
  border-radius: 99px;
}
.login-footer {
  text-align: center;
  margin-top: 20px;
  opacity: 0.5;
  font-size: 13px;
}
.selected-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.selected-user .name {
  font-weight: 700;
  font-size: 18px;
}
.selected-user .role {
  opacity: 0.7;
  font-size: 13px;
}
.pin-card {
  text-align: center;
}
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 12px;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: transparent;
  transition: all 0.15s;
}
.dot.filled {
  background: var(--red);
  border-color: var(--red);
}
.pin-error {
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 16px auto 0;
}
.key {
  aspect-ratio: 1.4;
  border: none;
  border-radius: 16px;
  background: var(--gray-100);
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-900);
}
.key:active { background: var(--gray-200); }
.key.empty { background: transparent; cursor: default; }
.pin-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--gray-400);
}

/* Home */
.greeting {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.sub {
  margin: 0 0 20px;
  color: var(--gray-500);
  font-size: 15px;
}
.big-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.action-card {
  border: none;
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: left;
  cursor: pointer;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.action-card:active { transform: scale(0.97); }
.action-card.out {
  background: linear-gradient(145deg, #DC2626, #B91C1C);
}
.action-card.in {
  background: linear-gradient(145deg, #059669, #047857);
}
.action-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.action-title {
  font-weight: 700;
  font-size: 16px;
}
.action-desc {
  font-size: 12px;
  opacity: 0.85;
}

.alert-card {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.alert-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: #92400E;
}
.alert-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.alert-chip {
  background: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: #92400E;
}

.section {
  margin-bottom: 24px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stock-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid var(--gray-100);
  cursor: pointer;
}
.stock-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.stock-icon { font-size: 24px; }
.stock-qty {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
}
.stock-qty.low { color: var(--red); }
.stock-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.stock-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s;
}
.stock-unit {
  font-size: 11px;
  color: var(--gray-400);
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tx-item {
  display: flex;
  gap: 12px;
  background: white;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  align-items: center;
}
.tx-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: 10px;
  flex-shrink: 0;
}
.tx-item.out .tx-icon { background: var(--red-soft); }
.tx-item.in .tx-icon { background: var(--green-soft); }
.tx-body { flex: 1; min-width: 0; }
.tx-main {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}
.tx-job {
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-meta {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--gray-400);
  font-size: 14px;
  background: white;
  border-radius: var(--radius);
  border: 1px dashed var(--gray-200);
}

/* Form pages (Out / In) */
.form-page .page-header {
  margin-bottom: 16px;
}
.form-section {
  margin-bottom: 20px;
}
.equip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.equip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: white;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}
.equip-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.equip-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.equip-name {
  font-weight: 600;
  font-size: 15px;
}
.equip-stock {
  font-size: 12px;
  color: var(--gray-500);
}
.equip-stock .expected {
  color: var(--blue);
  font-weight: 600;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--gray-100);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.step-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-btn:disabled {
  color: var(--gray-300);
  cursor: not-allowed;
}
.step-btn:not(:disabled):active {
  background: var(--gray-200);
}
.step-input {
  width: 42px;
  height: 40px;
  border: none;
  background: white;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  -moz-appearance: textfield;
}
.step-input::-webkit-outer-spin-button,
.step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-footer {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
}
.total-line {
  text-align: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--gray-600);
}

/* Out chips for CheckIn */
.out-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.out-chip {
  text-align: left;
  border: 1px solid var(--gray-200);
  background: white;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}
.out-chip:active { background: var(--gray-50); }
.chip-job {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
.chip-meta {
  font-size: 12px;
  color: var(--gray-500);
}
.selected-out {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--green-soft);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.selected-out .meta {
  font-size: 12px;
  color: var(--gray-600);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  animation: fadeIn 0.15s;
}
.modal {
  background: white;
  border-radius: 20px 20px 16px 16px;
  padding: 24px 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}
.modal p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 15px;
}
.confirm-list {
  margin: 0 0 20px;
  padding: 0 0 0 4px;
  list-style: none;
  font-size: 15px;
}
.confirm-list li {
  padding: 4px 0;
}
.confirm-list .diff {
  color: var(--orange);
  font-size: 13px;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions .btn {
  flex: 1;
}

/* Inventory */
.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.inv-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--gray-100);
}
.inv-card.low {
  border-color: #FECACA;
  background: #FFFBFB;
}
.inv-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.inv-icon { font-size: 28px; }
.inv-info { flex: 1; min-width: 0; }
.inv-name {
  font-weight: 700;
  font-size: 16px;
}
.inv-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.inv-qty {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  min-width: 48px;
  text-align: right;
}
.inv-qty.low { color: var(--red); }
.inv-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.inv-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-400);
}
.add-section {
  margin-top: 8px;
}
.add-form {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--gray-200);
}
.add-form h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.add-form .row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.add-form .row .input { flex: 1; }

/* History */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-chip {
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
}
.filter-chip.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.filter-chip.danger {
  border-color: #FECACA;
  color: var(--red);
  margin-left: auto;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border-left: 4px solid var(--gray-300);
  cursor: pointer;
  transition: background 0.1s;
}
.history-card.out { border-left-color: var(--red); }
.history-card.in { border-left-color: var(--green); }
.history-card.open {
  background: var(--gray-50);
}
.hc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.hc-type {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}
.history-card.out .hc-type { color: var(--red); }
.history-card.in .hc-type { color: var(--green); }
.hc-time {
  font-size: 12px;
  color: var(--gray-400);
}
.hc-job {
  font-weight: 600;
  font-size: 15px;
}
.hc-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}
.hc-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
  font-size: 14px;
}
.hc-details ul {
  margin: 0 0 8px;
  padding-left: 0;
  list-style: none;
}
.hc-details li { padding: 3px 0; }
.hc-notes {
  background: var(--gray-100);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-700);
}
.hc-related {
  margin-top: 6px;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
}

/* Settings */
.settings-section {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--gray-100);
}
.settings-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}
.settings-section .hint {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 12px;
}
.crew-view, .crew-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.crew-edit-row, .add-crew-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.crew-edit-row .input, .add-crew-row .input {
  flex: 1;
}
.crew-edit-row .pin, .add-crew-row .pin {
  width: 70px;
  flex: none;
  text-align: center;
}
.about p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: white;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  max-width: 90%;
  text-align: center;
}
.toast-error {
  background: var(--red);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Utilities */
.row {
  display: flex;
  gap: 10px;
}
.row .btn { flex: 1; }

/* iOS safe areas & PWA */
@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(var(--safe-bottom), 0px);
  }
}

/* Prevent zoom on inputs iOS */
@media screen and (max-width: 480px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}
