/* ================================================================
   Bolt Industries – Daily Progress Report System
   Custom styles + utility classes (complements Tailwind CDN)
   ================================================================ */

:root {
  --brand-primary: #1e3a5f;
  --brand-accent:  #2563eb;
  --brand-light:   #eff6ff;
}

* { box-sizing: border-box; }

html, body {
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ── Page transition ─────────────────────────────────────────── */
.page-enter { animation: pageIn 0.22s ease-out; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar         { transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
#sidebar-overlay { transition: opacity 0.3s ease; }

/* ── Step wizard indicator ───────────────────────────────────── */
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.step-dot.active   { background: #1e3a5f; color: #fff; box-shadow: 0 0 0 3px rgba(30,58,95,.15); }
.step-dot.done     { background: #10b981; color: #fff; }
.step-dot.inactive { background: #e2e8f0; color: #64748b; }
.step-line { flex: 1; height: 2px; background: #e2e8f0; min-width: 8px; transition: background 0.3s; }
.step-line.done { background: #10b981; }

/* ── Form fields ─────────────────────────────────────────────── */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
}
.field-input:focus {
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}
.field-input::placeholder { color: #9ca3af; }
.field-input:disabled,
.field-input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* ── Section heading (report view) ──────────────────────────── */
.section-heading {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

/* ── Progress range slider ───────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  accent-color: #1e3a5f;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #1e3a5f;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(30,58,95,.35);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #1e3a5f;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(30,58,95,.35);
}

/* ── Card hover ──────────────────────────────────────────────── */
.card-hover {
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}
.card-hover:hover {
  box-shadow: 0 8px 28px rgba(30,58,95,.12);
  transform: translateY(-1px);
}

/* ── Weather chip ────────────────────────────────────────────── */
.weather-chip {
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  background: #fff;
  color: #374151;
}
.weather-chip:hover  { border-color: #1e3a5f; }
.weather-chip.active { border-color: #1e3a5f; background: #1e3a5f; color: #fff; }

/* ── Badge ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* ── Bottom navigation ───────────────────────────────────────── */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 4px;
  font-size: 10px; color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.bottom-nav-item.active { color: #1e3a5f; font-weight: 600; }
.bottom-nav-item i { font-size: 20px; margin-bottom: 2px; display: block; }

/* ── Toast notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed; top: 16px; right: 16px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 320px; width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.14);
  animation: toastIn 0.3s ease-out;
  display: flex; align-items: center; gap: 10px;
  pointer-events: auto;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(110%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(110%); }
}
.toast-out { animation: toastOut 0.3s ease-in forwards; }
.toast.success { background: #10b981; color: #fff; }
.toast.error   { background: #ef4444; color: #fff; }
.toast.info    { background: #1e3a5f; color: #fff; }
.toast.warning { background: #f59e0b; color: #fff; }

/* ── Loading spinner ─────────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #1e3a5f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Photo grid ──────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-thumb {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  display: block;
  transition: opacity 0.15s;
}
.photo-thumb:hover { opacity: .88; }
.photo-add-btn {
  aspect-ratio: 1;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #94a3b8; cursor: pointer;
  transition: all 0.15s;
  font-size: 12px; gap: 4px;
}
.photo-add-btn:hover { border-color: #1e3a5f; color: #1e3a5f; background: #eff6ff; }

/* ── Data table ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
  font-size: 11px; font-weight: 700;
  color: #64748b;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.data-table td {
  padding: 11px 12px;
  font-size: 14px; color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: #f8fafc; }

/* ── Number input – hide spinners ────────────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  #bottom-nav { display: none !important; }
  #app-header { display: none !important; }
  body { background: #fff; }
}

/* ── Desktop sidebar show/hide ───────────────────────────────── */
@media (max-width: 1023px) {
  #desktop-sidebar { display: none !important; }
}
@media (min-width: 1024px) {
  #bottom-nav { display: none !important; }
}

/* ── Sidebar link active state ───────────────────────────────── */
.sidebar-link.active,
.sidebar-link[data-active="true"] {
  background: rgba(255,255,255,.15);
  color: #fff !important;
  font-weight: 600;
}

/* ── Mobile form step min-height ─────────────────────────────── */
.mobile-step { min-height: calc(100vh - 180px); }

/* ── Utility: smooth transitions ─────────────────────────────── */
button { transition: background 0.15s, opacity 0.15s, transform 0.1s; }
button:active { transform: scale(0.97); }
