* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid #e5e5e7;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid #e5e5e7;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
}

.logo-title {
  font-weight: 700;
  font-size: 16px;
}

.logo-subtitle {
  font-size: 10px;
  color: #86868b;
  font-weight: 500;
}

.nav {
  flex: 1;
  padding: 20px 0;
}

.nav-header {
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  padding: 0 20px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #1d1d1f;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: #f5f5f7;
}

.nav-item.active {
  background: #f5f5f7;
  border-left: 3px solid #667eea;
  color: #667eea;
}

.nav-item .icon {
  font-size: 16px;
}

.user-section {
  padding: 20px;
  border-top: 1px solid #e5e5e7;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  margin-bottom: 10px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 11px;
  color: #86868b;
}

.logout-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid #e5e5e7;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.logout-btn:hover {
  background: #f5f5f7;
}

.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 30px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.subtitle {
  color: #86868b;
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-orange {
  background: #ff9500;
  color: white;
}

.btn-orange:hover {
  background: #e08600;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

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

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
}

.stat-value.green {
  color: #34c759;
}

.stat-value.red {
  color: #ff3b30;
}

.stat-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  opacity: 0.3;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.content-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.chart-card, .map-card, .table-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #1d1d1f;
}

.card-subtitle {
  font-size: 11px;
  color: #86868b;
  margin-top: 2px;
}

.card-controls {
  display: flex;
  gap: 10px;
}

.select {
  padding: 6px 12px;
  border: 1px solid #e5e5e7;
  border-radius: 6px;
  font-size: 13px;
  background: white;
}

.map-placeholder {
  height: 300px;
  background: linear-gradient(180deg, #e8f0ff 0%, #f5f5f7 100%);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.map-stats {
  width: 100%;
}

.map-stat {
  margin-bottom: 10px;
}

.map-stat-value {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table tr {
  border-bottom: 1px solid #f5f5f7;
}

.data-table td {
  padding: 12px 0;
  font-size: 13px;
}

.data-table td:first-child {
  font-weight: 500;
}

.data-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: #667eea;
}

.progress-bar {
  height: 6px;
  background: #f5f5f7;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
}

.progress-fill.green {
  background: #34c759;
}

.progress-fill.red {
  background: #ff3b30;
}

.block-reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.block-reason-item {
  background: #f5f5f7;
  padding: 15px;
  border-radius: 8px;
}

.block-reason-name {
  font-size: 12px;
  color: #1d1d1f;
  margin-bottom: 8px;
  font-weight: 500;
}

.block-reason-count {
  font-size: 24px;
  font-weight: 700;
  color: #ff3b30;
}

.block-reason-label {
  font-size: 10px;
  color: #86868b;
}

.footer {
  text-align: center;
  padding: 30px;
  color: #86868b;
  font-size: 11px;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .content-grid.three-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 200px;
  }
  
  .main-content {
    margin-left: 200px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
