/* ============================================
   Maîtrise & Livraison - Transport de Fonds
   Styles Mobile-First
   ============================================ */

:root {
  --primary-color: #1a237e;
  --primary-light: #3949ab;
  --secondary-color: #ff6f00;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --warning-color: #ff9800;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-primary: #212121;
  --text-secondary: #757575;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0);
}

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

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   SPLASH SCREEN
   ============================================ */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.splash-content {
  text-align: center;
  color: white;
}

.splash-content h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.splash-content p {
  opacity: 0.9;
  margin-bottom: 2rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.login-container {
  width: 100%;
  max-width: 360px;
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo h1 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:active {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--bg-color);
  color: var(--text-primary);
}

.btn-secondary:active {
  background: var(--border-color);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-block {
  width: 100%;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  text-align: center;
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ============================================
   APP CONTAINER
   ============================================ */
.app-container {
  min-height: 100vh;
  padding-bottom: calc(70px + var(--safe-area-bottom));
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--primary-color);
  color: white;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.app-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.icon-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--secondary-color);
  border-radius: 50%;
}

/* ============================================
   SIDE MENU
   ============================================ */
.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: white;
  z-index: 1100;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.side-menu.open {
  transform: translateX(280px);
}

.menu-header {
  background: var(--primary-color);
  padding: 1.5rem;
  color: white;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-details span:first-child {
  font-weight: 600;
}

.user-details span:last-child {
  font-size: 0.85rem;
  opacity: 0.8;
}

.menu-list {
  list-style: none;
  padding: 1rem 0;
}

.menu-list li {
  padding: 0;
}

.menu-item {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s;
}

.menu-item:hover,
.menu-item.active {
  background: var(--bg-color);
  color: var(--primary-color);
}

.menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 1rem;
}

/* ============================================
   OVERLAY
   ============================================ */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-top: 56px;
  padding: 1rem;
  min-height: calc(100vh - 56px - 70px);
}

.page {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.current-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  margin-bottom: 1.5rem;
}

.section h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.action-btn {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-icon {
  font-size: 1.5rem;
}

.action-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ============================================
   VEHICLES STATUS GRID
   ============================================ */
.vehicles-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.vehicle-status-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.vehicle-status-item.assigned {
  border-left: 3px solid var(--secondary-color);
}

.vehicle-id {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.vehicle-status {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  margin-top: 0.25rem;
  display: inline-block;
}

.vehicle-status.ok {
  background: rgba(76, 175, 80, 0.2);
  color: var(--success-color);
}

.vehicle-status.nok {
  background: rgba(244, 67, 54, 0.2);
  color: var(--danger-color);
}

.vehicle-status.assigned {
  background: rgba(255, 111, 0, 0.2);
  color: var(--secondary-color);
}

/* ============================================
   TRANSPORTS LIST
   ============================================ */
.transports-list,
.points-list,
.vehicles-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.transport-card,
.point-card,
.vehicle-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.transport-card {
  border-left: 4px solid var(--primary-color);
}

.transport-card.pending {
  border-left-color: var(--warning-color);
}

.transport-card.in-progress {
  border-left-color: var(--secondary-color);
}

.transport-card.completed {
  border-left-color: var(--success-color);
}

.transport-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.transport-number {
  font-weight: 600;
  color: var(--primary-color);
}

.transport-status {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-color);
}

.transport-route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.transport-route .arrow {
  color: var(--text-secondary);
}

.transport-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* ============================================
   SUMMARY CARD
   ============================================ */
.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.summary-card h3 {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.amounts {
  display: flex;
  gap: 2rem;
}

.amount {
  display: flex;
  flex-direction: column;
}

.amount-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.amount-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================
   POINTS LIST
   ============================================ */
.point-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.point-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.point-amounts {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.point-status {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-color);
}

.point-status.validated {
  background: rgba(76, 175, 80, 0.2);
  color: var(--success-color);
}

.point-actions {
  display: flex;
  align-items: center;
}

.btn-small {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--primary-color);
  color: white;
}

/* Badges de montants */
.amounts-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.amount-badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.amount-badge.usd {
  background: rgba(26, 35, 126, 0.1);
  color: var(--primary-color);
}

.amount-badge.cdf {
  background: rgba(255, 111, 0, 0.1);
  color: var(--secondary-color);
}

.amount-badge.eq {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.transport-status.requested {
  background: rgba(255, 152, 0, 0.2);
  color: var(--warning-color);
}

.transport-status.rejected {
  background: rgba(244, 67, 54, 0.2);
  color: var(--danger-color);
}

.collecte-section {
  background: linear-gradient(135deg, rgba(26,35,126,0.05) 0%, rgba(255,111,0,0.05) 100%);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.5rem 0;
}

.collecte-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-color);
  border: none;
  border-radius: 20px;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
}

/* ============================================
   VEHICLE CARD
   ============================================ */
.vehicle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.vehicle-plate {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.vehicle-actions {
  display: flex;
  gap: 0.5rem;
}

.toggle-status {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-status.ok {
  background: var(--success-color);
  color: white;
}

.toggle-status.nok {
  background: var(--danger-color);
  color: white;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1rem;
}

.profile-role {
  color: var(--primary-color);
  font-weight: 500;
}

.profile-email {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  display: flex;
  flex-direction: column;
  background: white;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-content > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.modal-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-large {
  max-height: 95vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section h4 {
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  background: white;
}

.modal-actions .btn {
  flex: 1;
}

/* Signature */
.signature-container {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  margin: 1rem 0;
  background: var(--bg-color);
}

#signature-pad {
  width: 100%;
  height: 200px;
  touch-action: none;
}

.gps-info {
  background: var(--bg-color);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.gps-info span {
  font-family: monospace;
  color: var(--primary-color);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding-bottom: var(--safe-area-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-icon {
  font-size: 1.25rem;
}

.nav-label {
  font-size: 0.7rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
  pointer-events: auto;
}

.toast.success {
  background: var(--success-color);
}

.toast.error {
  background: var(--danger-color);
}

.toast.warning {
  background: var(--warning-color);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   WORKFLOW STEPS
   ============================================ */
.workflow-steps {
  margin: 1rem 0;
}

.workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.workflow-step:last-child {
  border-bottom: none;
}

.step-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.step-indicator.pending {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
}

.step-indicator.completed {
  background: var(--success-color);
  color: white;
}

.step-indicator.current {
  background: var(--secondary-color);
  color: white;
  animation: pulse 2s infinite;
}

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

.step-content {
  flex: 1;
}

.step-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.step-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.step-actions {
  margin-top: 0.5rem;
}

.btn-validate-step {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .vehicles-status-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .modal-content {
    border-radius: var(--radius);
    margin: 2rem;
    max-height: calc(100vh - 4rem);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .app-header,
  .bottom-nav,
  .side-menu,
  .btn {
    display: none !important;
  }

  .main-content {
    margin-top: 0;
    padding: 0;
  }
}

/* ============================================
   AJOUTS: incident, OTP, badges
   ============================================ */
.panic-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #d32f2f;
  color: #fff;
  font-size: 1.5rem;
  border: none;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.5);
  z-index: 900;
  cursor: pointer;
}
.panic-btn:active { transform: scale(0.92); }

.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
  margin-bottom: 0.75rem;
}

.badge-confirmed { color: #2e7d32; font-weight: 600; }
.badge-waiting { color: #ef6c00; font-weight: 600; }

.incident-card {
  background: #fff;
  border-left: 4px solid #d32f2f;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.incident-card.resolved { border-left-color: #2e7d32; opacity: 0.7; }
.incident-card .incident-meta { font-size: 0.8rem; color: #666; }

.list-card {
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.list-card .list-card-info { flex: 1; min-width: 0; }
.list-card .list-card-info h4 { margin: 0 0 0.25rem 0; }
.list-card .list-card-info p { margin: 0; font-size: 0.8rem; color: #666; word-break: break-word; }

/* Cartes Leaflet */
.map-container {
  width: 100%;
  height: 380px;
  border-radius: 8px;
  border: 1px solid #ddd;
  z-index: 1;
}
#route-map { height: 320px; }

.offline-status {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 76px;
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #263238;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
}
.offline-status.hidden { display: none; }
.offline-event { padding: 0.65rem 0; border-bottom: 1px solid var(--border-color); }
.offline-event:last-child { border-bottom: 0; }
.offline-event-error { color: #b71c1c; font-size: 0.8rem; }
.offline-event-actions { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
@media (min-width: 768px) {
  .offline-status { left: auto; right: 20px; bottom: 20px; max-width: 440px; }
}

#signature-pad { touch-action: none; width: 100%; }
.bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0); }
.main-content { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0)); }
.panic-btn { bottom: calc(80px + env(safe-area-inset-bottom, 0)); }
.offline-status { bottom: calc(76px + env(safe-area-inset-bottom, 0)); }
@media (min-width: 768px) {
  .offline-status { bottom: 20px; }
}
