/* =========================================================
   styles.css — Jan Awaaz: Indian-Culture Inspired Design
   ========================================================= */

/* ── CSS Variables ────────────────────────────────────── */
:root {
  --saffron: #FF9933;
  --saffron-light: #FFB74D;
  --saffron-dark: #E65100;
  --green: #138808;
  --green-light: #4CAF50;
  --navy: #000080;
  --white: #FFFFFF;
  --cream: #FFF8F0;
  --light-orange: #FFF3E0;
  --dark-text: #2D2D2D;
  --gray-text: #666;
  --gray-light: #E0E0E0;
  --gray-bg: #F5F5F5;
  --red: #D32F2F;
  --amber: #FFA000;
  --blue: #2196F3;
  --purple: #9C27B0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;

  /* Status colors */
  --status-reported: #FFA000;
  --status-progress: #2196F3;
  --status-claimed: #9C27B0;
  --status-verified: #4CAF50;
  --status-reopened: #F44336;
}

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  background: var(--cream);
  color: var(--dark-text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 80px; /* space for bottom nav */
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--saffron-dark); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--saffron-light); border-radius: 3px; }

/* ── Top Navbar ───────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-dark) 100%);
  color: var(--white);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.top-nav .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.top-nav .logo .material-icons { font-size: 28px; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.lang-toggle:hover { background: rgba(255,255,255,0.35); }

.user-handle {
  font-size: 0.75rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-link {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
}
.admin-link .material-icons { font-size: 20px; }

/* ── Tricolor Accent ──────────────────────────────────── */
.tricolor-bar {
  height: 4px;
  background: linear-gradient(to right, var(--saffron) 33%, var(--white) 33%, var(--white) 66%, var(--green) 66%);
}

/* ── Bottom Navigation ────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 10px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  border-top: 1px solid var(--gray-light);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--gray-text);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 12px;
  transition: var(--transition);
  min-width: 60px;
}

.nav-item .material-icons { font-size: 26px; transition: var(--transition); }

.nav-item.active { color: var(--saffron); }
.nav-item.active .material-icons { color: var(--saffron); }

.nav-item.primary-action {
  position: relative;
  top: -16px;
  background: var(--saffron);
  color: var(--white);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(255,153,51,0.4);
}
.nav-item.primary-action .material-icons { font-size: 30px; color: var(--white); }
.nav-item.primary-action span:last-child { display: none; }

/* ── Page Sections ────────────────────────────────────── */
.section { display: none; padding: 16px; max-width: 600px; margin: 0 auto; }
.section.active { display: block; }

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--saffron-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Map ──────────────────────────────────────────────── */
#map {
  width: 100%;
  height: 350px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  border: 2px solid var(--saffron-light);
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

/* ── Chips ─────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  color: var(--dark-text);
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover, .chip.active {
  background: var(--saffron);
  color: var(--white);
  border-color: var(--saffron);
}
.chip.shop-chip {
  background: var(--light-orange);
  border-color: var(--saffron-light);
}
.chip.shop-chip.active {
  background: var(--saffron);
  color: var(--white);
}

/* ── Search bar ───────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}
.search-bar input:focus { border-color: var(--saffron); }
.search-bar button {
  background: var(--saffron);
  color: var(--white);
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Gemma Status Indicator ───────────────────────────── */
.gemma-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.gemma-status.online { background: #E8F5E9; color: var(--green); }
.gemma-status.offline { background: #FFF3E0; color: var(--amber); }
.gemma-status .dot-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.gemma-status.online .dot-indicator { background: var(--green); }
.gemma-status.offline .dot-indicator { background: var(--amber); }

/* ── Report Cards ─────────────────────────────────────── */
.report-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: var(--transition);
}
.report-card:hover { box-shadow: var(--shadow-lg); }

.report-card-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  cursor: pointer;
}

.report-card-body { padding: 14px; }

.report-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--light-orange);
  color: var(--saffron-dark);
}

.severity-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
}
.severity-badge.high { background: var(--red); }
.severity-badge.medium { background: var(--amber); }
.severity-badge.low { background: var(--green-light); }

.status-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white);
}
.status-badge.reported { background: var(--status-reported); }
.status-badge.in_progress { background: var(--status-progress); }
.status-badge.claimed_done { background: var(--status-claimed); }
.status-badge.verified_done { background: var(--status-verified); }
.status-badge.reopened { background: var(--status-reopened); }

.report-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--dark-text);
  margin-bottom: 10px;
}

.report-location {
  font-size: 0.78rem;
  color: var(--gray-text);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.report-location .material-icons { font-size: 16px; color: var(--saffron); margin-top: 1px; }

.report-authority {
  font-size: 0.75rem;
  background: #E3F2FD;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.report-authority .material-icons { font-size: 18px; color: var(--blue); }
.report-authority a { color: var(--blue); font-weight: 600; }

.report-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--gray-light);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--gray-light);
  background: var(--white);
  color: var(--gray-text);
  transition: var(--transition);
}
.action-btn:hover { background: var(--light-orange); border-color: var(--saffron-light); }
.action-btn.liked { background: #E8F5E9; color: var(--green); border-color: var(--green-light); }
.action-btn.disliked { background: #FFEBEE; color: var(--red); border-color: var(--red); }
.action-btn.reposted { background: #E3F2FD; color: var(--blue); border-color: var(--blue); }
.action-btn .material-icons { font-size: 18px; }

.action-btn.share-btn { background: #E8F5E9; color: var(--green); border-color: var(--green-light); margin-left: auto; }

.report-time {
  font-size: 0.7rem;
  color: #999;
  margin-top: 8px;
}
.verification-note { font-size: 0.72rem; color: #8a5b00; margin: -3px 0 9px 20px; }
.verification-note.verified { color: var(--green); }

/* ── Report Flow (Camera/Location/Analysis) ───────────── */
.report-step { display: none; }
.report-step.active { display: block; }

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gray-light);
  transition: var(--transition);
}
.step-dot.active { background: var(--saffron); width: 28px; border-radius: 5px; }
.step-dot.done { background: var(--green); }

.camera-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 16px;
}

#camera-preview {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

#captured-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: none;
}
#claim-camera-preview, #claim-captured-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.camera-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--white);
  border: 4px solid var(--white);
  margin: 16px auto;
  box-shadow: 0 4px 12px rgba(255,153,51,0.4);
  transition: var(--transition);
}
.camera-btn:hover { transform: scale(1.05); }
.camera-btn .material-icons { font-size: 32px; }

.gps-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #E8F5E9;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.gps-indicator.error { background: #FFEBEE; color: var(--red); }
.gps-indicator .material-icons { font-size: 18px; }

.location-info {
  background: var(--white);
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.location-address {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.shop-chips-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 12px 0 8px;
  color: var(--saffron-dark);
}

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.landmark-input-group {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.landmark-input-group input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  outline: none;
}
.landmark-input-group input:focus { border-color: var(--saffron); }

.mic-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.mic-btn.recording { background: var(--red); animation: pulse 1s infinite; }
.mic-btn .material-icons { font-size: 22px; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ── AI Analysis Results ──────────────────────────────── */
.analysis-card {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border-left: 4px solid var(--saffron);
}

.analysis-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.analysis-type-icon { font-size: 2rem; }

.analysis-description {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 10px;
  background: var(--light-orange);
  border-radius: var(--radius-sm);
}

.edit-description {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  resize: vertical;
  outline: none;
  font-size: 0.9rem;
}
.edit-description:focus { border-color: var(--saffron); }

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--saffron);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(255,153,51,0.3);
}
.btn-primary:hover { background: var(--saffron-dark); }
.btn-primary:disabled { background: var(--gray-light); color: var(--gray-text); box-shadow: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  background: var(--white);
  color: var(--saffron-dark);
  border: 2px solid var(--saffron);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--light-orange); }

.btn-green {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(19,136,8,0.3);
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.btn-row > * { flex: 1; }

/* ── Chatbot ──────────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 170px);
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: fadeInUp 0.3s ease;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: var(--light-orange);
  color: var(--dark-text);
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--saffron);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.bubble-time {
  font-size: 0.6rem;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.chat-action-btn-wrap {
  align-self: flex-start;
  margin: 4px 0;
}
.chat-create-report {
  width: auto !important;
  padding: 10px 20px !important;
  font-size: 0.85rem !important;
}

#chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
}

.quick-reply-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--saffron-light);
  background: var(--white);
  color: var(--saffron-dark);
  cursor: pointer;
  transition: var(--transition);
}
.quick-reply-chip:hover { background: var(--saffron); color: var(--white); }

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
}
.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: 24px;
  outline: none;
}
.chat-input-bar input:focus { border-color: var(--saffron); }

#chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Typing indicator */
.typing-indicator .bubble-content { display: flex; gap: 4px; padding: 4px 0; }
.typing-indicator .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--saffron);
  animation: typing 1.4s infinite;
}
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ── Profile Section ──────────────────────────────────── */
.profile-card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 2rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-item {
  text-align: center;
}
.stat-number { font-size: 1.3rem; font-weight: 700; color: var(--saffron-dark); }
.stat-label { font-size: 0.72rem; color: var(--gray-text); }

/* ── Admin Section ────────────────────────────────────── */
.admin-login-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 400px;
  margin: 40px auto;
}

.admin-login-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--saffron-dark);
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark-text);
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 1rem;
}
.form-group input:focus { border-color: var(--saffron); }

.admin-dashboard { display: none; }
.admin-dashboard.active { display: block; }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dash-stat-card {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 3px solid var(--saffron);
}
.dash-stat-card .number { font-size: 1.8rem; font-weight: 700; color: var(--saffron-dark); }
.dash-stat-card .label { font-size: 0.75rem; color: var(--gray-text); margin-top: 4px; }

.dash-stat-card:nth-child(2) { border-top-color: var(--green); }
.dash-stat-card:nth-child(2) .number { color: var(--green); }
.dash-stat-card:nth-child(3) { border-top-color: var(--blue); }
.dash-stat-card:nth-child(3) .number { color: var(--blue); }
.dash-stat-card:nth-child(4) { border-top-color: var(--red); }
.dash-stat-card:nth-child(4) .number { color: var(--red); }

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-filters select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.85rem;
}

#admin-map { width: 100%; height: 300px; border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow); }

.admin-table-wrap { overflow-x: auto; margin-bottom: 16px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th {
  background: var(--saffron);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--light-orange); }

.admin-table select {
  padding: 4px 8px;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  font-size: 0.78rem;
}

/* ── Modal ────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-light);
  position: sticky;
  top: 0;
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h3 { font-size: 1rem; color: var(--saffron-dark); }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-body { padding: 16px; }

.modal-body img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* ── Duplicate Warning ────────────────────────────────── */
.duplicate-warning {
  background: #FFF3E0;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.duplicate-warning .material-icons { font-size: 40px; color: var(--amber); }
.duplicate-warning h4 { margin: 8px 0; color: var(--saffron-dark); }

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark-text);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Loading Spinner ──────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,248,240,0.9);
  z-index: 2500;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}
.loading-overlay.active { display: flex; }

.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--gray-light);
  border-top-color: var(--saffron);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 0.9rem; color: var(--saffron-dark); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 20px 16px;
  font-size: 0.75rem;
  color: var(--gray-text);
  margin-bottom: 60px;
}
.footer strong { color: var(--saffron-dark); }

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-text);
}
.empty-state .material-icons { font-size: 48px; color: var(--gray-light); }
.empty-state p { margin-top: 8px; font-size: 0.9rem; }

/* ── Status Timeline ──────────────────────────────────── */
.status-timeline {
  position: relative;
  padding-left: 24px;
  margin: 16px 0;
}
.status-timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--gray-light);
}
.timeline-item {
  position: relative;
  padding-bottom: 16px;
  font-size: 0.82rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gray-light);
  border: 2px solid var(--white);
}
.timeline-item.active::before { background: var(--saffron); }
.timeline-item.done::before { background: var(--green); }

/* ── Responsive ───────────────────────────────────────── */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  
  .bottom-nav {
    position: static;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border-radius: var(--radius) var(--radius) 0 0;
  }
  
  .section { padding: 20px; }
  #feed-section, #admin-section { max-width: 1040px; }
  
  #map { height: 450px; }
  
  .dashboard-stats { grid-template-columns: repeat(4, 1fr); }
}

/* ── Rangoli-inspired decorative border ───────────────── */
.rangoli-border {
  position: relative;
  padding: 4px;
}
.rangoli-border::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: repeating-conic-gradient(var(--saffron) 0% 25%, transparent 0% 50%) 50% / 12px 12px;
  border-radius: inherit;
  z-index: -1;
  opacity: 0.3;
}

/* ── Utility ──────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.hidden { display: none !important; }

/* ── Demo entry page additions ────────────────────────── */
.top-nav .logo { color: inherit; }
.top-nav .logo small { display: block; font-size: 0.62rem; font-weight: 500; opacity: 0.9; line-height: 1.1; }
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(130deg, #fff1df, #fffaf4);
  border-left: 5px solid var(--saffron);
}
.welcome-banner h1 { color: var(--saffron-dark); font-size: 1.25rem; line-height: 1.35; }
.welcome-banner p, .eyebrow { font-size: 0.82rem; color: var(--gray-text); }
.eyebrow { color: var(--green); font-weight: 700; }
.welcome-mark { color: rgba(19, 136, 8, 0.15); font-size: 3.5rem; font-weight: 700; }
.control-label { font-size: 0.82rem; font-weight: 700; color: var(--gray-text); margin-right: 4px; }
.radius-controls { margin-top: 10px; }
.section-title { line-height: 1.35; }
.step-title { color: var(--saffron-dark); font-size: 1.1rem; margin: 8px 0 12px; }
.helper-text { font-size: 0.82rem; color: var(--gray-text); margin: 6px 0 12px; }
.camera-container { min-height: 190px; }
#camera-preview { background: #161616; }
.step-next { margin-top: 12px; }
.shop-other > label { font-size: 0.84rem; font-weight: 600; }
.duplicate-warning .report-card { text-align: left; margin-top: 12px; }
.admin-login-card h1 { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--saffron-dark); font-size: 1.25rem; margin-bottom: 16px; }
.admin-login-card .helper-text { text-align: center; }
.demo-credentials { margin-top: 12px; text-align: center; color: var(--gray-text); font-size: 0.78rem; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compact-btn { width: auto; padding: 8px 14px; font-size: 0.82rem; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); border-top: 3px solid var(--saffron); font-size: 0.76rem; color: var(--gray-text); }
.stat-card strong { font-size: 1.45rem; color: var(--saffron-dark); }
.stat-card:nth-child(2) { border-color: var(--green); }
.stat-card:nth-child(3) { border-color: var(--blue); }
.stat-card:nth-child(4) { border-color: var(--red); }
.admin-table td small { color: var(--gray-text); }
.footer small { display: inline-block; margin-top: 5px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(33, 150, 243, 0.45); outline-offset: 2px; }

@media (max-width: 480px) {
  .top-nav { padding: 9px 10px; }
  .top-nav .logo { font-size: 0.95rem; }
  .user-handle { display: none; }
  .welcome-banner { padding: 16px; }
  .map-controls { gap: 6px; }
  .chip { padding: 7px 11px; }
  .report-actions { justify-content: space-between; }
  .action-btn { padding: 7px 9px; }
  .toast { max-width: calc(100vw - 24px); white-space: normal; text-align: center; }
}
