/* ══════════ دکمه شناور گزارش میدانی ══════════ */
.field-report-fab {
  position: fixed;
  z-index: 8500;
  bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(239,68,68,0.45);
  transition: all 0.3s;
  animation: fabPulse 2s ease-in-out infinite;
}
.field-report-fab.show { display: flex; }
.field-report-fab:hover { transform: translateX(-50%) scale(1.05); }
.field-report-fab::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 30px;
  border: 2px solid rgba(239,68,68,0.6);
  animation: fabRing 2s ease-out infinite;
  pointer-events: none;
}
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(239,68,68,0.45); }
  50% { box-shadow: 0 8px 32px rgba(239,68,68,0.7); }
}
@keyframes fabRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ══════════ مودال فرم گزارش ══════════ */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}
.report-modal.show { display: flex; }
.report-dialog {
  width: min(100%, 520px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1a2940, #0f2027);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  animation: modalPop 0.3s ease;
  overflow: hidden;
}
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
}
.report-header h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.report-header .rh-location { font-size: 0.7rem; opacity: 0.6; margin-top: 3px; font-weight: 400; }
.report-close {
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%; background: rgba(255,255,255,0.06); color: #fff;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background 0.2s;
}
.report-close:hover { background: rgba(255,255,255,0.15); }
.report-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.report-body::-webkit-scrollbar { width: 5px; }
.report-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.report-field { margin-bottom: 18px; }
.report-field label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 8px; opacity: 0.85; }
.report-field .rf-hint { font-size: 0.68rem; opacity: 0.55; font-weight: 400; margin-top: 4px; display: block; }
.chip-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; background: rgba(255,255,255,0.04);
  color: #fff; font-family: inherit; font-size: 0.72rem; cursor: pointer; transition: all 0.2s;
  text-align: center; position: relative;
}
.chip:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }
.chip .chip-icon { font-size: 1.4rem; line-height: 1; }
.chip.selected { border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 700; box-shadow: 0 4px 12px rgba(0,180,219,0.35); }
.chip.selected.danger { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 12px rgba(239,68,68,0.4); }
.chip.selected.warning { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgba(245,158,11,0.4); }
.chip.selected.success { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 12px rgba(34,197,94,0.4); }
.photo-upload-area { border: 2px dashed rgba(255,255,255,0.2); border-radius: 14px; padding: 20px; text-align: center; cursor: pointer; transition: all 0.25s; background: rgba(255,255,255,0.03); }
.photo-upload-area:hover { border-color: var(--accent); background: rgba(0,180,219,0.06); }
.photo-upload-area .pua-icon { font-size: 2rem; margin-bottom: 6px; opacity: 0.7; }
.photo-upload-area .pua-text { font-size: 0.78rem; opacity: 0.7; }
.photo-preview { position: relative; margin-top: 10px; border-radius: 12px; overflow: hidden; display: none; }
.photo-preview.show { display: block; }
.photo-preview img { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.photo-preview .remove-photo { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(239,68,68,0.9); color: #fff; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.report-textarea { width: 100%; min-height: 80px; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; background: rgba(0,0,0,0.25); color: #fff; font-family: inherit; font-size: 0.85rem; line-height: 1.7; resize: vertical; outline: none; }
.report-textarea:focus { border-color: var(--accent); background: rgba(0,0,0,0.4); }
.report-actions { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.25); }
.report-btn { flex: 1; padding: 13px 18px; border: none; border-radius: 12px; font-family: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.25s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.report-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.report-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,180,219,0.4); }
.report-btn.primary:disabled { opacity: 0.5; cursor: wait; transform: none; }
.report-btn.secondary { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; }
.report-btn.secondary:hover { background: rgba(255,255,255,0.15); }

/* ══════════ تاریخچه گزارش‌ها و مارکرها ══════════ */
.reports-history-section { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 24px; padding: 22px; margin-bottom: 18px; backdrop-filter: blur(10px); }
.reports-history-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.reports-history-header .rh-title { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.reports-history-header .rh-count { font-size: 0.72rem; opacity: 0.65; padding: 4px 10px; background: rgba(255,255,255,0.06); border-radius: 20px; }
.reports-history-list { display: flex; flex-direction: column; gap: 10px; max-height: 500px; overflow-y: auto; padding-right: 4px; }
.reports-history-list::-webkit-scrollbar { width: 5px; }
.reports-history-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.report-card { position: relative; display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; padding: 14px; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; background: rgba(255,255,255,0.04); transition: all 0.2s; overflow: hidden; }
.report-card::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 4px; background: var(--report-color, #22c55e); }
.report-card:hover { background: rgba(255,255,255,0.08); }
.report-card .rc-photo, .report-card .rc-photo-placeholder { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.report-card .rc-photo-placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.report-card .rc-content { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.report-card .rc-time { font-size: 0.7rem; opacity: 0.6; display: flex; align-items: center; gap: 6px; }
.report-card .rc-summary { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.78rem; }
.report-card .rc-summary span { display: inline-flex; align-items: center; gap: 4px; }
.report-card .rc-note { font-size: 0.72rem; opacity: 0.7; font-style: italic; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-card .rc-badge { padding: 5px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; white-space: nowrap; align-self: flex-start; }
.report-card .rc-delete { position: absolute; bottom: 8px; left: 8px; width: 24px; height: 24px; border: none; border-radius: 50%; background: rgba(239,68,68,0.2); color: #fca5a5; cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.report-card .rc-delete:hover { background: rgba(239,68,68,0.5); }
.reports-empty { text-align: center; padding: 30px 20px; font-size: 0.85rem; opacity: 0.55; }
.field-report-marker { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.5); cursor: pointer; transition: transform 0.2s; }
.field-report-marker:hover { transform: rotate(-45deg) scale(1.15); }
.field-report-marker .marker-inner { transform: rotate(45deg); display: flex; align-items: center; justify-content: center; }
.field-report-marker.dry { background: #22c55e; }
.field-report-marker.wet { background: #3b82f6; }
.field-report-marker.slippery { background: #f59e0b; }
.field-report-marker.icy { background: #ef4444; }
.field-report-marker.snow { background: #a5b4fc; }
.bias-report-content { white-space: pre-wrap; }
@media (max-width: 700px) {
  .field-report-fab { bottom: calc(115px + env(safe-area-inset-bottom, 0px)); font-size: 0.82rem; padding: 10px 16px; }
  .report-card { grid-template-columns: 50px 1fr; gap: 10px; }
  .report-card .rc-photo, .report-card .rc-photo-placeholder { width: 50px; height: 50px; }
  .report-card .rc-badge { grid-column: 2; justify-self: flex-start; }
  .chip-group { grid-template-columns: repeat(2, 1fr); }
}
