    body { margin: 0; padding: 0; overflow: hidden; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
    #map { flex:1 1 auto; min-height:0; width:100%; }
    
    .cursor-pan { cursor: grab !important; }
    .cursor-pan:active { cursor: grabbing !important; }
    .cursor-route { cursor: crosshair !important; }
    .cursor-asset { cursor: pointer !important; }

    .leaflet-routing-container { display: none !important; }
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: #0f172a; }
    ::-webkit-scrollbar-thumb { background: #f97316; border-radius: 3px; }
    
    .a3-page {
      width: 410mm;
      height: 287mm;
      page-break-after: always;
      break-after: page;
      box-sizing: border-box;
      background: #ffffff;
      color: #0f172a;
    }

    .a4-page {
      width: 200mm;
      height: 287mm;
      page-break-after: always;
      break-after: page;
      box-sizing: border-box;
      background: #ffffff;
      color: #0f172a;
    }

    .print-map-instance {
      width: 100%;
      height: 100%;
      background: #ffffff;
    }

    #customContextMenu {
      display: none;
      position: absolute;
      z-index: 1000;
      background: #ffffff;
      border: 1px solid #cbd5e1;
      border-radius: 6px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      padding: 4px 0;
      min-width: 180px;
    }
    #customContextMenu button {
      width: 100%;
      text-align: left;
      padding: 6px 12px;
      background: transparent;
      color: #1e293b;
      font-size: 11px;
      font-weight: 600;
      border: none;
      cursor: pointer;
    }
    #customContextMenu button:hover {
      background: #f97316;
      color: #ffffff;
    }

    .rotate-btn { background: #334155; }
    .rotate-btn:hover { background: #475569; }
    .rotate-btn.active { background: #f97316; }

    .floating-dialog {
      display: none;
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 420px;
      max-height: calc(100vh - 80px);
      background: #ffffff;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
      z-index: 9999;
      overflow: hidden;
      flex-direction: column;
      color: #1e293b;
      font-size: 12px;
    }

    .dialog-drag-header {
      background: linear-gradient(135deg, #0f172a, #1e3a8a);
      color: #ffffff;
      padding: 12px 16px;
      cursor: move;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 3px solid #f97316;
      user-select: none;
    }

    .dialog-body {
      padding: 16px;
      overflow-y: auto;
      max-height: calc(100vh - 150px);
    }

    #previewModal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(15, 23, 42, 0.85);
      z-index: 9999;
      overflow-y: auto;
    }

    .excel-table input, .excel-table select {
      background: #ffffff;
      border: 1px solid #cbd5e1;
      border-radius: 3px;
      padding: 2px 4px;
      font-size: 10px;
      color: #0f172a;
      width: 100%;
    }
    .excel-table input:focus, .excel-table select:focus {
      border-color: #f97316;
      outline: none;
    }

/* ===== App header / toolbar ===== */
.app-header { display:flex; align-items:center; justify-content:space-between; gap:16px; height:64px; padding:0 16px; flex-shrink:0; z-index:30;
  background:linear-gradient(180deg,#0b1f4d 0%,#0a1a40 100%); border-bottom:2px solid #f97316; box-shadow:0 2px 10px rgba(0,0,0,.45); }
.brand { display:flex; align-items:center; gap:12px; min-width:0; flex-shrink:0; }
.brand-logo { width:40px; height:40px; flex-shrink:0; }
.brand-row { display:flex; align-items:center; gap:10px; }
.brand-title { font-size:14px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:#fff; white-space:nowrap; }
.brand-sub { font-size:11px; font-weight:600; letter-spacing:.03em; color:#fb923c; white-space:nowrap; }
.file-chip { display:inline-flex; align-items:center; gap:5px; max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:10px; font-weight:700; color:#fdba74; background:rgba(30,58,138,.55); border:1px solid rgba(249,115,22,.4); padding:2px 9px; border-radius:999px; }
.file-chip .tb-ico { width:11px; height:11px; }

.search-box { display:flex; align-items:center; flex:1 1 260px; max-width:380px; min-width:180px; height:36px; padding:0 4px 0 10px;
  background:rgba(2,6,23,.65); border:1px solid #334155; border-radius:8px; transition:border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color:#f97316; box-shadow:0 0 0 3px rgba(249,115,22,.18); }
.search-ico { display:flex; color:#64748b; }
.search-ico .tb-ico { width:15px; height:15px; }
.search-box input { flex:1; min-width:0; background:transparent; border:0; outline:0; color:#f1f5f9; font-size:12px; padding:0 8px; }
.search-box input::placeholder { color:#64748b; }
.search-crs { display:none; flex:0 0 auto; width:86px; height:26px; margin-left:6px; padding:0 2px; font-size:11px; color:#f1f5f9;
  background:transparent; border:0; border-right:1px solid #334155; outline:0; cursor:pointer; }
.search-crs.show { display:block; }
.search-crs option { background:#1e293b; color:#f1f5f9; }
.search-btn { height:28px; padding:0 12px; border-radius:6px; background:#ea580c; color:#fff; font-size:11px; font-weight:700; letter-spacing:.02em; transition:background .15s; }
.search-btn:hover { background:#f97316; }

.toolbar { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.tb-group { display:flex; align-items:center; gap:2px; padding:3px; background:rgba(2,6,23,.35); border:1px solid rgba(100,116,139,.35); border-radius:9px; }
.tb-btn { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 11px; border-radius:6px; font-size:11.5px; font-weight:600; color:#e2e8f0;
  white-space:nowrap; transition:background .15s, color .15s, transform .05s; }
.tb-btn:hover { background:rgba(148,163,184,.2); color:#fff; }
.tb-btn:active { transform:translateY(1px); }
.tb-btn:focus-visible { outline:2px solid #fb923c; outline-offset:1px; }
.tb-ico { width:15px; height:15px; flex-shrink:0; }
.tb-primary { background:#1d4ed8; color:#fff; } .tb-primary:hover { background:#2563eb; }
.tb-success { background:#059669; color:#fff; } .tb-success:hover { background:#10b981; }
.tb-accent  { background:#ea580c; color:#fff; } .tb-accent:hover  { background:#f97316; }

.autosave { display:inline-flex; align-items:center; gap:6px; font-size:10.5px; font-weight:600; color:#94a3b8; white-space:nowrap; }
.autosave-dot { width:7px; height:7px; border-radius:50%; background:#10b981; box-shadow:0 0 0 3px rgba(16,185,129,.2); }

@media (max-width:1500px) { .brand-sub, .autosave { display:none; } }
@media (max-width:1560px) { .file-chip { display:none; } }
@media (max-width:1400px) {  .brand-title { font-size:12px; letter-spacing:.05em; } .search-box { min-width:140px; flex-basis:150px; } .tb-btn { padding:0 9px; gap:5px; } }
@media (max-width:1180px) { .tb-btn span { display:none; } .tb-btn { padding:0 9px; } .file-chip { display:none; } }
@media (max-width:1000px) { .brand-title { display:none; } }
/* ===== Left sidebar ===== */
.sidebar { width:304px; flex-shrink:0; z-index:20; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:10px; font-size:12px;
  background:linear-gradient(180deg,#0a1a40 0%,#081433 100%); border-right:1px solid #1e3a8a; }
.sidebar::-webkit-scrollbar { width:6px; }
.sb-card { background:rgba(15,23,42,.72); border:1px solid rgba(59,89,152,.55); border-radius:10px; box-shadow:0 1px 3px rgba(0,0,0,.3); flex-shrink:0; }
.sb-title { display:flex; align-items:center; gap:8px; padding:9px 12px; font-size:11px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:#fb923c;
  list-style:none; user-select:none; border-radius:10px; }
.sb-title::-webkit-details-marker { display:none; }
summary.sb-title { cursor:pointer; } summary.sb-title:hover { background:rgba(255,255,255,.04); }
.sb-title > span:not(.sb-num) { flex:1; }
.sb-num { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:#f97316; color:#fff; font-size:10px; font-weight:800; letter-spacing:0; flex-shrink:0; }
.sb-ico { width:15px; height:15px; flex-shrink:0; }
.sb-caret { width:7px; height:7px; border-right:2px solid #64748b; border-bottom:2px solid #64748b; transform:rotate(45deg); transition:transform .15s; margin-right:2px; }
details[open] > summary .sb-caret { transform:rotate(225deg); }
.sb-body { padding:2px 12px 12px; display:flex; flex-direction:column; gap:10px; }
.sb-stack { gap:7px; }
.sb-field label { display:block; margin-bottom:4px; font-size:10.5px; font-weight:600; letter-spacing:.02em; color:#94a3b8; }
.sb-row { display:flex; align-items:center; justify-content:space-between; }
.sb-row label { margin:0; } .sb-gap { gap:10px; margin-top:6px; justify-content:flex-start; }
.sb-input { width:100%; height:30px; padding:0 9px; font-size:12px; color:#f1f5f9; background:#0f1b36; border:1px solid #334155; border-radius:6px; transition:border-color .15s, box-shadow .15s; }
select.sb-input { padding-right:4px; }
.sb-input:hover { border-color:#475569; }
.sb-input:focus { outline:0; border-color:#f97316; box-shadow:0 0 0 3px rgba(249,115,22,.18); }
.sb-hint { font-size:10.5px; line-height:1.45; color:#94a3b8; padding:7px 9px; background:rgba(2,6,23,.4); border-left:2px solid #f97316; border-radius:0 6px 6px 0; }

.mode-seg { display:grid; grid-template-columns:repeat(3,1fr); gap:3px; padding:3px; background:rgba(2,6,23,.5); border:1px solid #334155; border-radius:8px; }
.mode-btn { display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 0 6px; border-radius:6px; font-size:10.5px; font-weight:700; color:#94a3b8; transition:background .15s, color .15s; }
.mode-btn .sb-ico { width:17px; height:17px; }
.mode-btn:hover { background:rgba(148,163,184,.15); color:#e2e8f0; }
.mode-btn.active { background:#ea580c; color:#fff; box-shadow:0 1px 4px rgba(234,88,12,.5); }

.sb-btn { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; height:34px; padding:0 10px; border-radius:7px; font-size:11.5px; font-weight:700; color:#fff; transition:background .15s, transform .05s; }
.sb-btn:active { transform:translateY(1px); }
.sb-btn-accent { background:#ea580c; } .sb-btn-accent:hover { background:#f97316; }
.sb-btn-success { background:#059669; } .sb-btn-success:hover { background:#10b981; }
.sb-btn-ghost { background:transparent; color:#fdba74; border:1px solid rgba(249,115,22,.45); } .sb-btn-ghost:hover { background:rgba(249,115,22,.12); }

.time-chip { font-family:ui-monospace,Consolas,monospace; font-size:11px; font-weight:700; color:#fb923c; background:rgba(249,115,22,.12); border:1px solid rgba(249,115,22,.35); padding:1px 8px; border-radius:999px; }
.play-btn { display:inline-flex; align-items:center; gap:5px; height:28px; padding:0 11px; border-radius:6px; background:#ea580c; color:#fff; font-size:11px; font-weight:700; flex-shrink:0; transition:background .15s; }
.play-btn:hover { background:#f97316; } .play-btn .sb-ico { width:11px; height:11px; }
.play-btn.is-playing { background:#dc2626; } .play-btn.is-playing:hover { background:#ef4444; }
.sb-range { flex:1; min-width:0; accent-color:#f97316; cursor:pointer; }

.sb-summary { background:linear-gradient(180deg,rgba(30,58,138,.45),rgba(15,23,42,.7)); border-color:rgba(249,115,22,.4); }
.kpi-regime { display:flex; justify-content:space-between; align-items:center; font-size:11px; color:#cbd5e1; padding-bottom:8px; border-bottom:1px solid rgba(100,116,139,.3); }
.kpi-val { font-weight:700; }
.kpi-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.kpi { display:flex; flex-direction:column; gap:2px; padding:7px 9px; background:rgba(2,6,23,.45); border:1px solid rgba(100,116,139,.25); border-radius:7px; }
.kpi span { font-size:9.5px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:#94a3b8; }
.kpi b { font-size:13px; font-weight:800; color:#fff; font-variant-numeric:tabular-nums; }
.kpi-wide { grid-column:1 / -1; }

.brand-link { display:inline-flex; flex-shrink:0; border-radius:10px; transition:transform .15s, box-shadow .15s; }
.brand-link:hover { transform:scale(1.06); box-shadow:0 0 0 2px #f97316; }
.brand-link:focus-visible { outline:2px solid #fb923c; outline-offset:2px; }
.brand-logo { border-radius:10px; object-fit:cover; display:block; }
