.checkpoint-map-root {
    --cm-primary: #006196;
    --cm-ink: #2A2C31;
    --cm-ink-3: #5F707F;
    --cm-hair: #E7EEF4;
    --cm-border: #D2D7E3;
    --cm-surface: #FFF;
}

.checkpoint-map-card { overflow: hidden; }

.checkpoint-map-root .cm-wrap { display: flex; flex-direction: column; }

.checkpoint-map-root .cm-map {
    position: relative;
    height: 420px;
    min-height: 260px;
    background: #EEF4F8;
}

.col-sm-6 > .checkpoint-map-card .cm-map { height: 360px; }

.checkpoint-map-root .cm-float {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    display: flex;
    padding: 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 4px 16px rgba(0, 40, 70, .12);
}

.checkpoint-map-root .cm-seg-btn {
    padding: 3px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--cm-ink-3);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.checkpoint-map-root .cm-seg-btn.on { background: var(--cm-primary); color: #FFF; }

.checkpoint-map-root .cm-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 8px 14px;
    border-top: 1px solid var(--cm-hair);
    font-size: 12px;
}

.checkpoint-map-root .cm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--cm-ink-3); }
.checkpoint-map-root .cm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.checkpoint-map-root .cm-foot-right { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--cm-ink-3); }

.checkpoint-map-root .cm-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cm-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.cm-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; }

.checkpoint-map-root .cm-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 160px;
    color: var(--cm-ink-3);
    font-size: 13px;
}

.checkpoint-map-root .cm-state.error { color: #D9363E; }

.checkpoint-map-root .cm-loader {
    width: 18px;
    height: 18px;
    border: 2px solid var(--cm-hair);
    border-top-color: var(--cm-primary);
    border-radius: 50%;
    animation: cm-spin .8s linear infinite;
}

@keyframes cm-spin { to { transform: rotate(360deg); } }

.cm-tooltip {
    min-width: 220px;
    max-width: 320px;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(42, 44, 49, .95);
    box-shadow: 0 6px 18px rgba(0, 40, 70, .25);
    color: #FFF;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
}

.cm-tooltip .cm-tt-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.cm-tooltip .cm-tt-sub { margin-top: 2px; color: #C9D3DC; }
.cm-tooltip .cm-tt-rows { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .14); }
.cm-tooltip .cm-tt-row { display: flex; align-items: baseline; gap: 8px; }
.cm-tooltip .cm-tt-row > span:first-child { flex: none; color: #C9D3DC; }
.cm-tooltip .cm-tt-row b { flex: 1; text-align: right; font-weight: 600; }
.cm-tooltip .cm-tt-row .cm-dot { align-self: center; }
.cm-tooltip .cm-tt-name { color: #FFF !important; }
.cm-tooltip .cm-tt-hint { margin-top: 7px; color: #98A6AD; font-size: 11px; }
.cm-tooltip .country-flag { margin-right: 4px; }

.cm-portal .cm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(20, 30, 40, .45);
}

.cm-portal .cm-modal {
    position: fixed;
    z-index: 2000;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    width: 560px;
    max-width: calc(100vw - 32px);
    max-height: min(85vh, 760px);
    border-radius: 14px;
    background: #FFF;
    box-shadow: 0 16px 48px -12px rgba(0, 40, 70, .28);
    color: #2A2C31;
    transform: translate(-50%, -50%);
}

.cm-portal .cm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #E7EEF4;
}

.cm-portal .cm-modal-title { font-size: 16px; font-weight: 700; }
.cm-portal .cm-modal-title span { margin-left: 6px; color: #5F707F; font-weight: 600; }

.cm-portal .cm-close {
    border: 0;
    background: none;
    color: #5F707F;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cm-portal .cm-modal-body { padding: 4px 0; overflow-y: auto; }
.cm-portal .cm-obj { padding: 14px 20px; }
.cm-portal .cm-obj + .cm-obj { border-top: 1px solid #E7EEF4; }
.cm-portal .cm-obj-head { display: flex; align-items: flex-start; gap: 10px; }
.cm-portal .cm-obj-head .cm-dot { margin-top: 6px; }
.cm-portal .cm-obj-main { flex: 1; min-width: 0; }
.cm-portal .cm-obj-name { font-size: 15px; font-weight: 600; }
.cm-portal .cm-obj-meta { margin-top: 2px; color: #5F707F; font-size: 12px; }
.cm-portal .cm-obj-body { margin: 10px 0 0 19px; }

.cm-portal .cm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.cm-portal .cm-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: #EEF2F7;
    color: #434A54;
    font-size: 12px;
    font-weight: 600;
}

.cm-portal .cm-props { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.cm-portal .cm-props dt { color: #5F707F; font-weight: 500; }
.cm-portal .cm-props dd { margin: 0; }

.cm-portal .cm-load { margin-top: 12px; }
.cm-portal .cm-load-title { margin-bottom: 6px; color: #5F707F; font-size: 12px; font-weight: 600; }
.cm-portal .cm-squares { display: flex; flex-wrap: wrap; gap: 4px; }

.cm-portal .cm-square {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    cursor: default;
}

.cm-portal .cm-square-day { color: #5F707F; font-size: 9px; line-height: 12px; }
.cm-portal .cm-square.zag-level-1 .cm-square-day,
.cm-portal .cm-square.zag-level-2 .cm-square-day { color: #FFF; }

.cm-portal .cm-obj-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cm-portal .cm-obj a:not(.btn) { color: #006196; font-weight: 600; }
