.cgm-root{
  --cgm-white:#ffffff;
  --cgm-border:#e3e5e8;
  --cgm-text:#1f1a1f;
  --cgm-muted:#6d737b;
  --cgm-red:#b3181e;
  --cgm-red-dark:#8f1116;
  --cgm-coal:#1b171b;
  --cgm-shadow:0 12px 32px rgba(27,23,27,.06);
  margin:28px 0 36px;
  font-family:Inter, Arial, Helvetica, sans-serif;
  color:var(--cgm-text);
}

.cgm-root *{ box-sizing:border-box; }

.cgm-shell{
  background:var(--cgm-white);
  border:1px solid var(--cgm-border);
  border-radius:18px;
  padding:22px;
  box-shadow:var(--cgm-shadow);
}

.cgm-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.cgm-mini-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  border-radius:999px;
  border:1px solid #e7d6d7;
  background:#fff7f7;
  color:var(--cgm-red);
  font-size:11px;
  line-height:1;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom:10px;
}

.cgm-heading h2{
  margin:0 0 8px;
  font-size:30px;
  line-height:1.1;
  color:var(--cgm-coal);
}

.cgm-heading p{
  margin:0;
  font-size:14px;
  line-height:1.5;
  color:var(--cgm-muted);
}

.cgm-port-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}

.cgm-filter-btn{
  appearance:none;
  border:1px solid var(--cgm-border);
  background:#fff;
  color:var(--cgm-coal);
  border-radius:999px;
  padding:10px 13px;
  font-size:12px;
  line-height:1;
  cursor:pointer;
  transition:.2s ease;
}

.cgm-filter-btn:hover{
  border-color:#d0d4d9;
  transform:translateY(-1px);
}

.cgm-filter-btn.is-active{
  background:var(--cgm-red);
  border-color:var(--cgm-red);
  color:#fff;
}

.cgm-map-panel,
.cgm-selected-box,
.cgm-port-table-wrap{
  background:#fff;
  border:1px solid var(--cgm-border);
  border-radius:16px;
}

.cgm-map-panel{
  padding:14px;
  margin-bottom:16px;
}

.cgm-leaflet-map{
  width:100%;
  height:var(--cgm-map-height, 520px);
  border:1px solid #eceef1;
  border-radius:14px;
  overflow:hidden;
  background:#f7f8fa;
}

.cgm-map-note{
  margin-top:10px;
  font-size:12px;
  color:#8a9098;
}

.cgm-map-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.cgm-legend-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid #eceef1;
  border-radius:999px;
  background:#fff;
  color:#5e6570;
  font-size:12px;
  line-height:1;
}

.cgm-legend-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  flex:0 0 10px;
}

.cgm-bottom-area{ display:grid; gap:14px; }

.cgm-selected-box{
  padding:18px;
  position:relative;
  overflow:hidden;
}

.cgm-selected-box::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:var(--selected-color, var(--cgm-red));
}

.cgm-selected-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.cgm-region-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  font-size:11px;
  line-height:1;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:var(--selected-soft, #fff5f5);
  color:var(--selected-color, var(--cgm-red));
  border:1px solid var(--selected-border, #f1d4d5);
}

.cgm-selected-note{
  font-size:11px;
  line-height:1;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:#9aa0a8;
}

.cgm-selected-box h3{
  margin:0 0 10px;
  font-size:32px;
  line-height:1.05;
  color:var(--cgm-coal);
}

.cgm-selected-box p{
  margin:0;
  font-size:14px;
  line-height:1.7;
  color:#4f5560;
}

.cgm-port-table-wrap{ overflow:hidden; }

.cgm-port-table-head{
  display:grid;
  grid-template-columns:170px 220px minmax(0,1fr);
  gap:16px;
  padding:14px 18px;
  background:#f8f9fb;
  border-bottom:1px solid #e9edf1;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7c8490;
}

.cgm-port-row{
  appearance:none;
  width:100%;
  border:0;
  background:#fff;
  display:grid;
  grid-template-columns:170px 220px minmax(0,1fr);
  gap:16px;
  padding:16px 18px;
  text-align:left;
  border-bottom:1px solid #edf0f3;
  cursor:pointer;
  transition:.2s ease;
}

.cgm-port-row:last-child{ border-bottom:0; }
.cgm-port-row:hover{ background:#fafbfc; }
.cgm-port-row.is-active{ background:#fcf6f6; }
.cgm-port-row.is-active .cgm-port-name{ color:var(--cgm-red); }

.cgm-port-region-cell{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.cgm-port-region-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  flex:0 0 10px;
  background:var(--item-color, var(--cgm-red));
}

.cgm-port-region-text{
  font-size:12px;
  line-height:1.3;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--item-color, var(--cgm-red));
}

.cgm-port-name{ 
  margin:0; 
  font-size:17px; 
  line-height:1.2; 
  font-weight:700; 
  color:var(--cgm-coal); 
}

.cgm-port-code{ 
  margin-top:5px; 
  font-size:12px; 
  line-height:1.3; 
  color:#8a9098; 
}

.cgm-port-detail{
  margin:0;
  font-size:13px;
  line-height:1.6;
  color:#5e6670;
}

.cgm-popup-title{
  margin:0 0 4px;
  font-size:13px;
  font-weight:700;
  color:#1b171b;
}

.cgm-popup-text{
  margin:0;
  font-size:12px;
  line-height:1.45;
  color:#58606a;
}

.cgm-port-marker-wrap{
  background:transparent !important;
  border:none !important;
}

.cgm-port-pin{
  position:relative;
  width:18px;
  height:18px;
  border-radius:50%;
  border:3px solid #ffffff;
  box-shadow:0 0 0 1px rgba(27,23,27,.08), 0 4px 10px rgba(27,23,27,.18);
  pointer-events:auto;
}

.cgm-port-pin::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#ffffff;
  transform:translate(-50%,-50%);
}

.cgm-port-pin.is-active{
  width:22px;
  height:22px;
}

.cgm-port-pin.is-active::before{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius:50%;
  background:currentColor;
  opacity:.16;
  animation:cgmPinPulse 1.9s infinite;
}

@keyframes cgmPinPulse{
  0%{ transform:scale(.72); opacity:.22; }
  70%{ transform:scale(1.28); opacity:0; }
  100%{ transform:scale(1.28); opacity:0; }
}

.cgm-root .leaflet-control-attribution{ font-size:11px; }

@media (max-width: 991px){
  .cgm-selected-box h3{ font-size:28px; }
  .cgm-port-table-head,
  .cgm-port-row{ grid-template-columns:140px 180px minmax(0,1fr); }
}

@media (max-width: 767px){
  .cgm-shell{ padding:14px; border-radius:14px; }
  .cgm-heading h2{ font-size:24px; }
  .cgm-selected-box h3{ font-size:24px; }
  .cgm-port-table-head{ display:none; }
  .cgm-port-row{ grid-template-columns:1fr; gap:10px; padding:14px; }
  .cgm-port-name{ font-size:16px; }
  .cgm-port-detail{ font-size:13px; line-height:1.55; }
}
