
    :root{
      --bg:#0b1220;
      --panel:#0f1b33;
      --panel2:#0c1730;
      --text:#e8f0ff;
      --muted:#a7b7d6;
      --accent:#70d6ff;
      --accent2:#7CFF6B;
      --danger:#ff5a7a;
      --dot:#ffcc00;
      --dot2:#ff6b6b;
      --shadow: 0 12px 28px rgba(0,0,0,.35);
      --radius: 14px;
      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    }

    *{box-sizing:border-box}
    body{
      margin:0;
      background: radial-gradient(1200px 800px at 20% 0%, #182a52 0%, var(--bg) 55%, #070b14 100%);
      color:var(--text);
      font-family:var(--sans);
      line-height:1.35;
    }

    header{
      padding:16px 18px;
      display:flex;
      gap:14px;
      align-items:center;
      justify-content:space-between;
      border-bottom:1px solid rgba(255,255,255,.08);
      background: linear-gradient(180deg, rgba(15,27,51,.92) 0%, rgba(11,18,32,.75) 100%);
      position:sticky;
      top:0;
      z-index:50;
      backdrop-filter: blur(10px);
    }

    .brand{
      display:flex; align-items:center; gap:12px;
      min-width: 280px;
    }
    .pill{
      padding:6px 10px;
      border-radius:999px;
      background: rgba(112,214,255,.12);
      border:1px solid rgba(112,214,255,.35);
      color:var(--accent);
      font-weight:700;
      letter-spacing:.2px;
      font-size:12px;
      white-space:nowrap;
    }
    h1{
      margin:0;
      font-size:16px;
      letter-spacing:.2px;
    }
    .sub{
      margin:2px 0 0;
      font-size:12px;
      color:var(--muted);
    }

    .toolbar{
      display:flex;
      flex-wrap:wrap;
      gap:10px;
      align-items:center;
      justify-content:flex-end;
    }

    button, input, select, textarea{
      font-family:inherit;
      color:inherit;
    }

    button{
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.14);
      padding:9px 11px;
      border-radius:10px;
      cursor:pointer;
      transition: transform .04s ease, background .15s ease, border-color .15s ease;
      box-shadow: 0 4px 14px rgba(0,0,0,.18);
      display:inline-flex;
      align-items:center;
      gap:8px;
      font-weight:650;
      font-size:13px;
    }
    button:hover{
      background: rgba(255,255,255,.10);
      border-color: rgba(255,255,255,.24);
    }
    button:active{ transform: translateY(1px); }
    button.primary{
      background: rgba(112,214,255,.16);
      border-color: rgba(112,214,255,.45);
      color: var(--accent);
    }
    button.success{
      background: rgba(124,255,107,.14);
      border-color: rgba(124,255,107,.4);
      color: var(--accent2);
    }
    button.danger{
      background: rgba(255,90,122,.12);
      border-color: rgba(255,90,122,.38);
      color: var(--danger);
    }

    .layout{
      display:grid;
      grid-template-columns: 1.2fr .8fr;
      gap:16px;
      padding:16px;
      align-items:start;
    }

    @media (max-width: 980px){
      .layout{ grid-template-columns: 1fr; }
      .brand{ min-width: unset; }
    }

    .card{
      background: linear-gradient(180deg, rgba(15,27,51,.78) 0%, rgba(12,23,48,.62) 100%);
      border:1px solid rgba(255,255,255,.10);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow:hidden;
    }
    .card .card-hd{
      padding:12px 14px;
      border-bottom:1px solid rgba(255,255,255,.08);
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
    }
    .card .card-hd strong{
      font-size:13px;
      letter-spacing:.2px;
    }
    .card .card-bd{
      padding:14px;
    }

    .hint{
      color:var(--muted);
      font-size:12px;
    }

    /* Map Stage */
    .stage-wrap{
      position:relative;
      width:100%;
      overflow:auto;
      max-height: calc(100vh - 140px);
      background: rgba(0,0,0,.15);
    }

    .stage{
      position:relative;
      display:inline-block;
      transform-origin: 0 0;
      user-select:none;
    }

    .map-img{
      display:block;
      max-width:none; /* we control via zoom */
      width: 900px;   /* starting width; zoom changes scale */
      height:auto;
    }

    .dot{
      position:absolute;
      width:18px;
      height:18px;
      border-radius:999px;
      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.8) 0%, rgba(255,255,255,.18) 18%, rgba(0,0,0,.10) 35%, rgba(0,0,0,.22) 100%),
                  linear-gradient(180deg, rgba(255,204,0,1) 0%, rgba(255,160,0,1) 100%);
      border: 2px solid rgba(0,0,0,.35);
      box-shadow: 0 10px 22px rgba(0,0,0,.35);
      transform: translate(-50%, -50%);
      cursor: pointer;
      display:flex;
      align-items:center;
      justify-content:center;
      font-size:10px;
      font-weight:900;
      color:#1b1300;
    }
    .dot.alt{
      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.8) 0%, rgba(255,255,255,.18) 18%, rgba(0,0,0,.10) 35%, rgba(0,0,0,.22) 100%),
                  linear-gradient(180deg, rgba(255,107,107,1) 0%, rgba(255,60,120,1) 100%);
      color:#25000c;
    }
    .dot.selected{
      outline: 3px solid rgba(112,214,255,.7);
      outline-offset: 2px;
    }

    /* Side panel forms */
    label{
      display:block;
      font-size:12px;
      color: var(--muted);
      margin:10px 0 6px;
    }
    input[type="text"], textarea, select{
      width:100%;
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.14);
      border-radius:10px;
      padding:10px 10px;
      font-size:13px;
      outline:none;
    }
    textarea{ min-height: 110px; resize: vertical; }

    .row{
      display:grid;
      grid-template-columns: 1fr 1fr;
      gap:10px;
    }
    .row3{
      display:grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap:10px;
    }
    .kpi{
      display:flex; gap:10px; flex-wrap:wrap;
      margin-top:10px;
    }
    .kpi .chip{
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.12);
      border-radius:999px;
      padding:7px 10px;
      font-size:12px;
      color:var(--muted);
    }
    .chip b{ color:var(--text); }

    .list{
      margin-top:12px;
      border-top:1px solid rgba(255,255,255,.08);
      padding-top:12px;
      display:grid;
      gap:8px;
      max-height: 260px;
      overflow:auto;
    }
    .item{
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:10px;
      padding:10px 10px;
      border-radius:12px;
      background: rgba(255,255,255,.05);
      border:1px solid rgba(255,255,255,.10);
      cursor:pointer;
    }
    .item:hover{ background: rgba(255,255,255,.08); }
    .item strong{ font-size:13px; }
    .item small{ color:var(--muted); display:block; margin-top:2px; }
    .item .tag{
      font-size:11px;
      padding:4px 8px;
      border-radius:999px;
      border:1px solid rgba(112,214,255,.35);
      color:var(--accent);
      background: rgba(112,214,255,.10);
      white-space:nowrap;
    }

    .footer-actions{
      display:flex;
      gap:10px;
      flex-wrap:wrap;
      margin-top:12px;
    }
    .mono{
      font-family: var(--mono);
      font-size:12px;
      color:var(--muted);
      overflow:auto;
      max-height: 180px;
      white-space: pre;
      background: rgba(0,0,0,.25);
      border:1px solid rgba(255,255,255,.10);
      border-radius: 12px;
      padding:10px;
    }

    .toast{
      position: fixed;
      right: 14px;
      bottom: 14px;
      background: rgba(15,27,51,.92);
      border:1px solid rgba(255,255,255,.12);
      box-shadow: var(--shadow);
      border-radius: 12px;
      padding:10px 12px;
      color: var(--text);
      font-size: 13px;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity .18s ease, transform .18s ease;
      z-index: 999;
      pointer-events:none;
    }
    .toast.show{
      opacity: 1;
      transform: translateY(0);
    }
