body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f6f8;
}

.layout {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 240px;
  background: #f8fafc;
  padding: 20px 16px;
  border-right: 1px solid #e5e7eb;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.logo strong {
  font-size: 18px;
}

.logo small {
  display: block;
  font-size: 12px;
  color: #9ca3af;
}

/* Menu */
.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Item */
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  transition: 0.2s;
}

/* Иконки */
.menu-item .icon {
  width: 18px;
  height: 18px;
  stroke: #6b7280;
  stroke-width: 2;
  fill: none;
}

/* Hover */
.menu-item:hover {
  background: #f1f5f9;
}

/* Active */
.menu-item.active {
  background: #e6f4ea;
  color: #166534;
}

.menu-item.active .icon {
  stroke: #16a34a;
}
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

#map {
  height: 320px;
  border-radius: 12px;
}

canvas {
  width: 100%;
  height: 320px !important;
}

.select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}
/* Main */

.main {
  flex: 1;
  padding: 20px;

  display: flex;
  flex-direction: column;
}
/* Header */
.stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}




/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
}

.number {
  font-size: 28px;
  font-weight: bold;
}

.red { color: red; }
.green { color: green; }

/* Map */
.map {
  margin-top: 30px;
}

.map-placeholder {
  height: 300px;
  background: #ddd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}/* Header */
.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

/* Left */
.stat-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-btn {
  font-size: 20px;
  background: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.subtitle {
  font-size: 14px;
  color: gray;
  margin-top: 2px;
}

/* Right */
.stat-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Date */
.date {
  background: white;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
}

/* Notifications */
.notifications {
  position: relative;
  font-size: 18px;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
}

/* User */
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 6px 10px;
  border-radius: 10px;
}

.avatar {
  width: 35px;
  height: 35px;
  background: #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-info small {
  display: block;
  color: gray;
  font-size: 12px;
}/* Section header */
.section-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 15px;
}

.section-stat a {
  font-size: 14px;
  text-decoration: none;
  color: #16a34a;
}

/* Grid */
.detection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Card */
.detection-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Image */
.image-wrapper {
  position: relative;
}

.image-wrapper img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* Label */
.label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: white;
}

.label.orange {
  background: orange;
}

.label.red {
  background: red;
}

/* Info */
.info {
  padding: 15px;
}

.info strong {
  display: block;
}

.info small {
  color: gray;
  font-size: 12px;
  display: block;
  margin: 5px 0 10px;
}

.info button {
  width: 100%;
  padding: 8px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  cursor: pointer;
}

#map {
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 10px;
}
.card-container {
  background: white;
  padding: 20px;
  border-radius: 14px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
/* Footer */
.footer {
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.footer-card {
  background: white;
  padding: 18px;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: 0.2s;
}

.footer-card:hover {
  transform: translateY(-2px);
}

.footer-bottom {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
}



/* Карточки */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Новая карточка */
.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* Иконка */
.icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Цвета */
.icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.icon.orange {
  background: #fef3c7;
  color: #f59e0b;
}

.icon.red {
  background: #fee2e2;
  color: #ef4444;
}

.icon.blue {
  background: #dbeafe;
  color: #3b82f6;
}

/* Текст */
.stat-card h3 {
  font-size: 14px;
  color: #666;
}

.number {
  font-size: 26px;
  font-weight: bold;
}

.change {
  font-size: 13px;
}

.change.green {
  color: #16a34a;
}

.change.orange {
  color: #f59e0b;
}

.change.red {
  color: #ef4444;
}/* Sidebar */
.grid-2-equal {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

/* EVENTS */
.events {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.event-item img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.event-info {
  flex: 1;
}

.event-info span {
  display: block;
  font-size: 13px;
  color: gray;
}

.event-info small {
  font-size: 12px;
  color: #9ca3af;
}

/* Status */
.event-status {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.event-status.new {
  background: #fef3c7;
  color: #f59e0b;
}

.event-status.danger {
  background: #fee2e2;
  color: #ef4444;
}

/* Link */
.more-link {
  display: block;
  margin-top: 15px;
  font-size: 14px;
  color: #16a34a;
  text-decoration: none;
}

/* Detection grid */
.detection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
/* Контейнер */
.header-container {
  background: white;
  border-radius: 14px;
  padding: 20px 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Left */
.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.subtitle {
  font-size: 13px;
  color: #9ca3af;
}

/* Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Date */
.date {
  background: #f9fafb;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}

/* Notifications */
.notifications {
  position: relative;
  font-size: 16px;
}

.badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: red;
  color: white;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 50%;
}

/* User */
.user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  padding: 5px 10px;
  border-radius: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  background: #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}html, body {
  height: 100%;
}


.user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.logout-btn i {
    pointer-events: none;
}

.logout-btn:hover {
    color: #dc2626;
}