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

  html, body {
    height: 100%;
    overflow: hidden;
    background: #0d1117;
    font-family: 'Segoe UI', Tahoma, sans-serif;
  }

  /* ── Login screen ── */
  #login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #0d1117;
  }
  .login-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 40px;
    width: 340px;
    text-align: center;
  }
  .login-box h1 { font-size: 1.4rem; margin-bottom: 6px; color: #58a6ff; }
  .login-box p  { font-size: 0.85rem; color: #8b949e; margin-bottom: 28px; }
  .login-box input {
    width: 100%; padding: 10px 14px; margin-bottom: 14px;
    background: #0d1117; border: 1px solid #30363d; border-radius: 6px;
    color: #e6edf3; font-size: 0.95rem; text-align: right;
  }
  .login-box input:focus { outline: none; border-color: #58a6ff; }
  .login-box button {
    width: 100%; padding: 10px; background: #238636; border: none;
    border-radius: 6px; color: #fff; font-size: 1rem; cursor: pointer;
  }
  .login-box button:hover { background: #2ea043; }
  #login-error { color: #f85149; font-size: 0.85rem; margin-top: 10px; min-height: 18px; }

  /* ── Full-screen map ── */
  #map {
    position: fixed;
    inset: 0;
    z-index: 1;
  }

  /* ── Side panel ── */
  #panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    z-index: 10;
    background: rgba(13, 17, 23, 0.92);
    border-left: 1px solid #30363d;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .panel-header {
    flex: 0 0 auto;
    padding: 18px 16px 14px;
    border-bottom: 1px solid #21262d;
  }
  .panel-header .incident-id {
    font-size: 1.3rem;
    font-weight: 700;
    color: #58a6ff;
    letter-spacing: 0.04em;
  }
  .panel-header .incident-meta {
    font-size: 0.82rem;
    color: #8b949e;
    margin-top: 4px;
  }

  .panel-body {
    flex: 1 1 0;
    overflow-y: auto;
    padding: 14px 16px;
  }
  .panel-body::-webkit-scrollbar { width: 4px; }
  .panel-body::-webkit-scrollbar-track { background: transparent; }
  .panel-body::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }

  .section-title {
    font-size: 0.70rem;
    color: #484f58;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    margin-top: 16px;
  }
  .section-title:first-child { margin-top: 0; }

  .info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid #161b22;
    font-size: 0.85rem;
    color: #e6edf3;
  }
  .info-row .label { color: #8b949e; font-size: 0.78rem; }

  /* Threat items */
  .threat-item {
    padding: 7px 10px;
    margin-bottom: 6px;
    background: #161b22;
    border-radius: 6px;
    border-right: 3px solid #ff8c00;
    font-size: 0.82rem;
  }
  .threat-name { color: #e6edf3; font-weight: 600; margin-bottom: 2px; }
  .threat-meta { color: #8b949e; font-size: 0.75rem; }
  .risk-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.70rem;
    font-weight: 700;
    float: left;
  }
  .risk-5 { background: #3d0f0f; color: #ff4444; }
  .risk-4 { background: #3d200f; color: #ff8c00; }
  .risk-3 { background: #2d2d0f; color: #ffd700; }
  .risk-2 { background: #0f2d0f; color: #3fb950; }
  .risk-1 { background: #1c2128; color: #8b949e; }

  /* AI report */
  .ai-text {
    font-size: 0.82rem;
    color: #c9d1d9;
    line-height: 1.7;
    background: #161b22;
    border-radius: 6px;
    padding: 10px 12px;
    border-right: 3px solid #58a6ff;
  }

  /* ── Incident markers ── */
  .start-marker, .start-marker-drone, .start-marker-event {
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    text-align: center;
    line-height: 1.1;
  }
  .start-marker       { background: #22c55e; }
  .start-marker-drone { background: #9333ea; }
  .start-marker-event { background: #f97316; font-size: 8px; }

  /* ── Error state ── */
  #error-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20;
    background: #0d1117;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: #8b949e;
    text-align: center;
  }
  #error-screen .err-icon { font-size: 3rem; }
  #error-screen .err-title { font-size: 1.2rem; color: #f85149; }
  #error-screen .err-sub   { font-size: 0.85rem; }
