.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
}
.container h1 {
    display: none;
}

#roadsMap {
    position: relative;
    height: 82vh;
    min-height: 600px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
}

.object-details-panel {
    width: 100%;
    margin-top: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: white;
    overflow: hidden;
}

.object-details-panel.hidden {
    display: none;
}

.camera-details-panel {
    width: 100%;
    margin-top: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: white;
    overflow: hidden;
}

.camera-details-panel.hidden {
    display: none;
}

.camera-details-container {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.camera-stream-container {
    flex: 0 0 50%;
    min-width: 0;
}

.camera-stream-container video {
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #000;
}

.camera-info-container {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.camera-info-container table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.camera-info-container td {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.camera-info-container td:first-child {
    font-weight: 600;
    width: 40%;
    color: #555;
}

.details-panel-generic {
    width: 100%;
    margin-top: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: white;
    overflow: hidden;
}

.details-panel-generic.hidden {
    display: none;
}

.details-panel-generic table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.details-panel-generic td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.details-panel-generic td:first-child {
    font-weight: 600;
    width: 35%;
    color: #555;
}

/* =========================================
   UNIFIED MAP INFO CARD — below the map inside .map-wrapper
   ========================================= */
.map-info-card {
    width: 100%;
    margin-top: 12px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #cdd4db;
    /* slide-in animation */
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s ease, margin-top 0.25s ease;
    pointer-events: none;
}

.map-info-card:not(.hidden) {
    max-height: 8000px;
    opacity: 1;
    pointer-events: auto;
}

.map-info-card.hidden {
    display: block !important;
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    pointer-events: none !important;
}

/* --- Header --- */
.mic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #2c3e50;
    color: #fff;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.mic-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.mic-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.mic-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 440px;
    line-height: 1.25;
    letter-spacing: 0.2px;
}

.mic-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mic-close {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.mic-close:hover { background: rgba(255,255,255,0.25); }

/* --- Body --- */
.mic-body {
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c8d6f0 #f5f7fa;
}

.mic-body::-webkit-scrollbar { width: 5px; }
.mic-body::-webkit-scrollbar-track { background: #f5f7fa; }
.mic-body::-webkit-scrollbar-thumb { background: #c8d6f0; border-radius: 999px; }

.mic-row {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 16px;
    gap: 16px;
    transition: background 0.12s;
}

.mic-row:last-child { border-bottom: none; }
.mic-row:hover { background: #f9fafb; }

.mic-row-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    min-width: 130px;
    flex-shrink: 0;
    padding-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mic-row-value {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    flex: 1;
    word-break: break-word;
    line-height: 1.5;
}

.mic-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.mic-badge-blue   { background: #e8f0fe; color: #1967d2; }
.mic-badge-green  { background: #e6f4ea; color: #1e8e3e; }
.mic-badge-orange { background: #fff0e6; color: #d4580f; }
.mic-badge-red    { background: #fce8e6; color: #c5221f; }
.mic-badge-grey   { background: #f1f3f4; color: #5f6368; }
.mic-badge-purple { background: #f3e8fd; color: #7b1fa2; }

/* loading */
.mic-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 18px;
    color: #8a9ab8;
    font-size: 13px;
}

.mic-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e8f5;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: mic-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes mic-spin { to { transform: rotate(360deg); } }

/* video slot */
.mic-video-slot {
    border-top: 1px solid #f0f4f8;
    background: #0d0d0d;
}
.mic-video-slot.hidden { display: none !important; }

/* video header bar */
.mic-video-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mic-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    animation: live-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}

.mic-video-label {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mic-video-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.mic-video-fullscreen:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
}

.mic-video-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    position: relative;
}
.mic-video-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.mic-video-no-stream {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    min-height: 120px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

/* gallery */
.mic-gallery {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow-x: auto;
    scrollbar-width: thin;
}
.mic-gallery.hidden { display: none !important; }
.mic-gallery a img {
    height: 120px;
    width: 180px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    object-fit: cover;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: zoom-in;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.mic-gallery a img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ---- Type colour variants ---- */
.mic-header.type-road     { background: #1f2937; } /* gray-800 */
.mic-header.type-camera   { background: #7f1d1d; } /* red-900 */
.mic-header.type-bridge   { background: #1e3a8a; } /* blue-900 */
.mic-header.type-tunnel   { background: #312e81; } /* indigo-900 */
.mic-header.type-building { background: #14532d; } /* green-900 */
.mic-header.type-culvert  { background: #134e4a; } /* teal-900 */
.mic-header.type-sign     { background: #78350f; } /* amber-900 */
.mic-header.type-utility  { background: #4c1d95; } /* violet-900 */
.mic-header.type-marking  { background: #164e63; } /* cyan-900 */
.status-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.8);
}
.container-camera {
    width: 100%;
    margin: 10px auto;
    padding: 0 15px;
}
.map_box {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.map-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.map-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}
.sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1000;
}

.layers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.layers-header h5 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #334155;
}

.sidebar .collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  transition: all 0.2s;
}

.sidebar .collapse-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sidebar .layer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
}

.sidebar .layer-item:hover {
  background: rgba(0,0,0,0.03);
}

.sidebar .layer-item label {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  margin: 0;
  flex: 1;
  user-select: none;
}

/* Custom Checkbox */
.sidebar .layer-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  margin: 0;
}

.sidebar .layer-item input[type="checkbox"]:checked {
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.sidebar .layer-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.collapse-btn svg { display:block; transition: transform 200ms ease; transform-origin: center; }
.sidebar.collapsed .collapse-btn svg { transform: rotate(180deg); }
.sidebar.collapsed { width: 60px; padding: 16px 8px; }
.sidebar.collapsed .layers-header { border-bottom: none; padding-bottom: 0; margin-bottom: 0; justify-content: center; }
.sidebar.collapsed h5, .sidebar.collapsed .layer-item label { display: none; }
.sidebar.collapsed .layer-item { justify-content: center; padding: 12px 0; }

.filters-sidebar.hidden {
  display: none;
}
.panel-wrapper {
    width: 100%;
    margin-top: 12px;
    min-height: 350px;
    display: none;
}
.panel-wrapper.hidden {
    display: none;
}
.panel-wrapper:not(.hidden) {
  display: block;
}
.camera-stream-panel {
    width: 100%;
    margin-top: 12px;
    display: none;
}
.camera-stream-panel.hidden {
    display: none;
}
.camera-stream-panel:not(.hidden) {
  display: block;
}
.video {
  width: 100%;
  height: 400px;
}
.map-filter {
  background: rgba(255,255,255,0.9);
  padding: 2px 5px 2px 5px;
  border-radius: 8px;
}

.map-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  background: transparent;
  color: #000;

  padding: 6px 32px 6px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  min-width: 140px;
}

.map-filter::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #000;
  font-size: 15px;
}
.map-change {
  padding: 4px;
  background: #fff;
  border-radius: 8px;
}
.osm-btn {
  background: #fff;
  border: 2px solid #fff;
  color: #b6b6b6;
  padding: 6px 25px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: 0.4s;
}
.osm-btn:hover {
  border: 2px solid #0d6efd;
  color: #0d6efd;
}

.osm-btn.active {
  background: rgba(0, 123, 255, 0.13);
  border: 2px solid #0d6efd;
  color: #0d6efd;
}

.layer-toggle-btn {
  padding: 8px 14px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}
.layer-toggle-btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
}
.layer-panel {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  max-width: 100%;
  overflow-x: auto;
}
.layer-panel.open {
  display: flex;
}
.layer-panel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  min-width: 72px;
}
.layer-panel-item:hover {
  background: #e9ecef;
}
.layer-panel-item.active {
  background: rgba(0, 123, 255, 0.1);
  border-color: #0d6efd;
}
.layer-panel-item .preview {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  margin-bottom: 4px;
}
.layer-panel-item .label {
  font-size: 11px;
  text-align: center;
  color: #333;
  line-height: 1.2;
}
.layer-panel-item.active .label {
  color: #0d6efd;
  font-weight: 600;
}

@media (max-width: 1060px) {
  #roadsMap {
    height: 55vh;
    min-height: 400px;
  }
  .video {
    height: 350px;
  }
}
@media (max-width: 510px) {
  #roadsMap {
    height: 50vh;
    min-height: 300px;
  }
  .video {
    height: 280px;
  }
}
/* Filters sidebar (slides in from left when any layer is selected) */
.filters-sidebar {
  position: fixed;
  left: 0;
  top: 12px; /* below header */
  bottom: 12px;
  width: 240px;
  background: rgba(255,255,255,0.95);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.12);
  font-size: 14px;
  transition: transform 220ms ease, width 220ms ease;
  position: relative;
  transform: translateX(-300%);
  z-index: 1200;
  overflow-y: auto;
}
.filters-sidebar.open {
  transform: translateX(0);
}
.filters-sidebar h5 { margin: 0 0 8px 0; font-size:16px; }
.filters-sidebar .fp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.filters-sidebar .fp-header h5 { margin: 0; }
.filters-sidebar .fp-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 18px;
}
.filters-sidebar .fp-section { margin-bottom:12px; }
.filters-sidebar label { font-weight:600; font-size:13px; }
.filters-sidebar select, .filters-sidebar input[type="text"] { 
  width:100%; 
  padding:6px 8px; 
  border-radius:6px; 
  border:1px solid #ddd;
  font-size: 14px;
}
.filters-sidebar.collapsed {
  width: 56px;
}
.filters-sidebar.collapsed h5,
.filters-sidebar.collapsed .fp-section label,
.filters-sidebar.collapsed .fp-section select,
.filters-sidebar.collapsed .fp-section input[type="text"] {
  display: none;
}

/* Registry table component (FE-005) */
.registry-section {
  margin-top: 24px;
}
.registry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.registry-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.registry-footer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.registry-page-size-select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 13px;
}
.registry-table-wrapper {
  position: relative;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  background: #fff;
  overflow: hidden;
}
.registry-table-scroll {
  width: 100%;
  overflow-x: auto;
}
.registry-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}
.registry-table thead {
  background: #f8f9fa;
}
.registry-table th,
.registry-table td {
  padding: 8px 12px;
  white-space: nowrap;
  border-bottom: 1px solid #eee;
}
.registry-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
}
.registry-table tbody tr:nth-child(even) {
  background: #fafafa;
}
.registry-table tbody tr:hover {
  background: #e9f3ff;
  cursor: pointer;
}
.registry-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.registry-status-active {
  background: rgba(25,135,84,0.12);
  color: #198754;
}
.registry-status-draft {
  background: rgba(13,110,253,0.08);
  color: #0d6efd;
}
.registry-status-archived {
  background: rgba(108,117,125,0.12);
  color: #6c757d;
}
.registry-empty-state {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #777;
}
.registry-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: #444;
}
.registry-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #555;
  z-index: 3;
}
.registry-loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  border-top-color: #0d6efd;
  animation: registry-spin 0.8s linear infinite;
  margin-right: 8px;
}
@keyframes registry-spin {
  to { transform: rotate(360deg); }
}
.registry-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  background: #fafafa;
}
.registry-pagination-info {
  color: #666;
}
.registry-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.registry-page-btn {
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #dee2e6;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}
.registry-page-btn:disabled {
  opacity: 0.5;
  cursor: default;
  background: #f8f9fa;
}
.registry-page-indicator {
  font-size: 12px;
  color: #555;
}

/* Road Repairs CSS */
.mic-extra-slot {
  padding: 0;
  border-top: 1px solid #d1d5db;
  background: #f9fafb;
}
.mic-repairs-container {
  padding: 12px 16px;
}
.mic-repairs-title {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mic-repair-year {
  margin-bottom: 16px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  overflow: hidden;
}
.mic-repair-year:last-child { margin-bottom: 0; }
.mic-repair-year-header {
  background: #f3f4f6;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #d1d5db;
  text-transform: uppercase;
}
.mic-table-wrapper {
  overflow-x: auto;
}
.mic-repair-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.mic-repair-table th, .mic-repair-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f3f5;
  text-align: left;
}
.mic-repair-table th {
  color: #6c757d;
  font-weight: 500;
  background: #f8f9fa;
  white-space: nowrap;
}
.mic-repair-table th.num, .mic-repair-table td.num {
  text-align: right;
  white-space: nowrap;
}
.mic-repair-table td.pos { color: #2e7d32; font-weight: 500; }
.mic-repair-table td.neg { color: #c62828; font-weight: 500; }
.mic-repair-total td {
  font-weight: 600;
  background: #fafafa;
  border-top: 1px solid #e0e0e0;
  border-bottom: none;
}
.mic-repair-empty {
  padding: 12px 16px;
  color: #777;
  font-size: 13px;
  font-style: italic;
  text-align: center;
}

/* ==========================
   GPS CAR ICON & LAYER STYLES
   ========================== */
.gps-car-icon {
    background: transparent !important;
    border: none !important;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.40));
}

/* GPS layer item in sidebar — highlighted */
.sidebar .layer-item.gps-layer-item {
    background: linear-gradient(135deg, rgba(192,57,43,0.08) 0%, rgba(41,128,185,0.08) 100%);
    border: 1px solid rgba(192,57,43,0.25);
    border-radius: 8px;
    margin-top: 4px;
}

.sidebar .layer-item.gps-layer-item label {
    color: #922b21;
    font-weight: 600;
}

.sidebar .layer-item.gps-layer-item input[type="checkbox"]:checked {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* ==========================
   GPS STATS PANEL
   ========================== */
.gps-stats-panel {
    margin-top: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.gps-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.gps-stats-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.gps-stats-live {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
    letter-spacing: 0.5px;
}

.gps-live-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: gps-live-blink 1.5s infinite ease-in-out;
}

@keyframes gps-live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.gps-stats-cards {
    display: flex;
    padding: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.gps-stat-card {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gps-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gps-stat-total .gps-stat-icon { background: #eff6ff; color: #3b82f6; }
.gps-stat-tracked .gps-stat-icon { background: #f0fdf4; color: #22c55e; }
.gps-stat-untracked .gps-stat-icon { background: #fef2f2; color: #ef4444; }
.gps-stat-speed .gps-stat-icon { background: #f8fafc; color: #475569; }

.gps-stat-body {
    display: flex;
    flex-direction: column;
}

.gps-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.gps-stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.gps-stat-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.gps-badge-green { background: #dcfce7; color: #166534; }
.gps-badge-red { background: #fee2e2; color: #991b1b; }

