/* =============================================
   다크 네이비 테마 오버라이드
   로그인 페이지 컬러 기준: #080c18 ~ #161c30
   ============================================= */

/* ── CSS Variables ── */
:root {
    --bg-base: #0a0f1c;
    --bg-card: #182035;
    --bg-card-hover: #1e2840;
    --bg-input: #141c30;
    --bg-elevated: #222e48;
    --bg-surface: #1c2640;

    --border-subtle: rgba(90, 120, 180, 0.35);
    --border-medium: rgba(80, 110, 170, 0.25);
    --border-strong: rgba(90, 120, 180, 0.35);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 1);
    --text-muted: rgba(255, 255, 255, 1);
    --text-on-accent: #ffffff;

    --accent-blue: rgba(70, 110, 180, 0.5);
    --accent-blue-hover: rgba(80, 125, 200, 0.6);
    --accent-blue-glow: rgba(50, 90, 160, 0.15);
    --accent-gradient: linear-gradient(135deg, #1a5cd6 0%, #2468e0 50%, #1b58c8 100%);

    --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.3);
    --shadow-popup: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ── Body & Page Background ── */
body {
    background: var(--bg-base) !important;
    color: black;
}

#s_wrap {
    background: var(--bg-base) !important;
}

#m_wrap {
    background: var(--bg-base) !important;
}

/* ── Sub Header (Dashboard Header) ── */
#sub_header {
    align-items: center;
    background:
        radial-gradient(ellipse 80% 120% at 100% 50%, rgba(15, 50, 115, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 50% 20%, rgba(10, 35, 85, 0.35) 0%, transparent 60%),
        linear-gradient(90deg, #070c1a 0%, #0c1530 40%, #0f2040 100%) !important;
    border-bottom: 1px solid rgba(50, 80, 150, 0.25);
}

#sub_header h1 {
    background: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    color: var(--text-primary);
    margin-right: auto;
}

#sub_header #gnb span {
    color: var(--text-secondary);
    text-decoration: none;
}

#sub_header #gnb ul li {
    position: relative;
    margin-right: 0 !important;
    padding: 0 25px;
}

#sub_header #gnb ul li a {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
}

#sub_header #gnb ul li a.gnb_sub_select {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
}

#sub_header #gnb ul li a.gnb_sub_select::after {
    display: none !important;
}

#sub_header #gnb ul li:has(a.gnb_sub_select)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #1a5cd6, #4b8bf5);
    border-radius: 2px 2px 0 0;
}

#sub_header #gnb ul li a:hover {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
    text-decoration: none;
}

/* ── Header 로고 이미지 ── */
#sub_header > h1 a img {
    height: 40px;
}

/* ── Header 유저 메뉴 (마이페이지/로그아웃) ── */
.header-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
}

.header-user-actions a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 400;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(70, 95, 150, 0.15);
    transition: all 0.2s ease;
}

.header-user-actions a img,
.header-user-actions a i {
    width: 14px;
    height: 14px;
    font-size: 13px;
}

.header-user-actions a:hover {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(70, 95, 150, 0.35);
}

/* ── GNB Dropdown ── */
#gnb ul li.gnb-dropdown {
    position: relative;
}
#sub_header #gnb ul li.gnb-dropdown .gnb-dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 0 6px;
    min-width: 190px;
    box-shadow: var(--shadow-popup);
    z-index: 2000;
    list-style: none;
    margin: 0;
}
#sub_header #gnb ul li.gnb-dropdown:hover .gnb-dropdown-menu {
    display: flex !important;
}
#sub_header #gnb ul li.gnb-dropdown .gnb-dropdown-menu li {
    line-height: normal;
    font-size: 16px;
    width: 100%;
}
#sub_header #gnb ul li.gnb-dropdown .gnb-dropdown-menu li a {
    display: block !important;
    justify-content: flex-start;
    padding: 9px 0;
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
}
#sub_header #gnb ul li.gnb-dropdown .gnb-dropdown-menu li a:hover {
    background: var(--bg-elevated);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
#sub_header #gnb ul li.gnb-dropdown .gnb-dropdown-menu li a.dropdown-active {
    color: #4b8bf5 !important;
    -webkit-text-fill-color: #4b8bf5 !important;
}

/* ── Sidebar ── */
.sub_sidebar ul li {
    background: var(--bg-card);
    border: none;
    color: var(--text-muted);
}

.sub_sidebar ul li:hover {
    background: var(--bg-card-hover) !important;
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
    color: var(--text-primary);
}

.sub_sidebar ul li:hover a {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
}

.sub_sidebar ul li.side_open,
.sub_sidebar ul li.side_open:hover {
    background: var(--accent-gradient) !important;
    border-color: transparent;
    color: var(--text-on-accent);
}

.sub_sidebar ul li.side_open a {
    color: var(--text-on-accent) !important;
    -webkit-text-fill-color: var(--text-on-accent) !important;
}

.sub_sidebar ul li a {
    color: var(--text-muted) !important;
    -webkit-text-fill-color: var(--text-muted) !important;
    background: none !important;
}

/* ── Filter Panel ── */
.filter {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-popup);
}

.filter_menu {
    border-bottom-color: var(--border-subtle) !important;
}

.filter_menu ul {
    background-color: var(--bg-input);
}

.filter_menu ul li {
    color: var(--text-muted) !important;
}

.filter_menu ul li.select {
    background-color: var(--bg-elevated) !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.filter_menu ul li.select span {
    background: var(--accent-gradient) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.filter_menu ul li:hover {
    background-color: var(--bg-elevated) !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.filter_menu ul li:hover span {
    background: var(--accent-gradient) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ── Filter Buttons ── */
.filter_btn ul li {
    background-color: var(--bg-surface);
    border: none;
    color: var(--text-muted) !important;
}

.filter_btn ul li:hover {
    background-color: var(--bg-elevated) !important;
    background-image: none !important;
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
    color: var(--text-primary) !important;
}

.filter_btn ul li.select {
    background: rgba(30, 60, 120, 0.6);
    border-color: rgba(60, 110, 200, 0.4);
    color: #fff !important;
    font-weight: bold;
}

.filter_cont li.select {
    background: rgba(30, 60, 120, 0.6) !important;
    background-image: none !important;
    background-clip: border-box !important;
    border: 1px solid rgba(60, 110, 180, 0.4);
    color: #fff !important;
    font-weight: bold;
}

.filter_cont li.select:hover {
    background: rgba(35, 70, 140, 0.7) !important;
    background-image: none !important;
    background-clip: border-box !important;
    color: #fff !important;
}

/* ── Selector Box ── */
.sel_box h3 {
    color: white;
}

.select_section {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle);;
}

.select_section p {
    color: var(--text-secondary);
}

.select_section:hover {
    background-color: var(--bg-elevated) !important;
    background-image: none !important;
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
}

.select_section:hover p {
    color: white;
}

.sel_box.open .select_section {
    background-color: var(--bg-elevated) !important;
    background-image: none !important;
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
}

.sel_box.open p {
    color: var(--text-primary);
}

.sel_box.active p {
    color: var(--text-primary);
}

/* ── Select Tab (Dropdown) ── */
.select_tab {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-popup);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.select_tab h4 {
    color: var(--text-primary);
}

.select_tab select {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.select_tab select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.select_tab ul li {
    color: var(--text-secondary);
}

.select_tab ul li:hover {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

.select_tab ul li.select {
    color: var(--text-primary);
    font-weight: bold;
}

.under_line {
    border-bottom-color: var(--border-subtle) !important;
}

/* ── Search Button ── */
.search_btn {
    background: rgba(25, 50, 100, 0.5);
    color: #fff;
    border: 1px solid rgba(60, 110, 200, 0.3);
    box-shadow: none;
}

.search_btn:hover {
    background: rgba(30, 60, 120, 0.65);
    border-color: rgba(70, 120, 210, 0.45);
}

.search_btn p {
    color: #fff;
}

/* ── Filter Hide Button ── */
.filter .btn_hide {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.filter .btn_hide::after {
    color: var(--text-muted);
}

.filter.hide .btn_hide {
    border: 1px solid rgba(75, 139, 245, 0.4);
}

.filter.hide {
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ── Chart Sidebar ── */
.chart_bar {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-popup);
    border-left: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.chart_bar .btn_hide,
.float_chart .btn_hide {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.chart_bar .btn_hide::after,
.float_chart .btn_hide::after {
    color: var(--text-muted);
}

.chart_bar.hide .btn_hide,
.float_chart.hide .btn_hide {
    border: 1px solid rgba(75, 139, 245, 0.4);
}

.chart_bar h3,
.chart_bar h4 {
    color: var(--text-primary);
}

.chart_bar ul,
.float_chart ul {
    background-color: var(--bg-card);
}

.chart_bar .tabList li,
.float_chart .tabList li {
    color: var(--text-muted);
}

.chart_bar .tabList li.select,
.float_chart .tabList li.select {
    background-color: var(--bg-elevated);
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
}

.chart_bar .tabList li.select span,
.float_chart .tabList li.select span {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.chart_bar .tabList li:hover,
.float_chart .tabList li:hover {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

.chart_bar .tabList li:hover span,
.float_chart .tabList li:hover span {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

/* ── Cards & Panels ── */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.card-block,
.card-body {
    color: var(--text-primary);
}

/* ── Sub Content Areas ── */
.sub_right {
    background: var(--bg-base);
}

.sub_title {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.sub_title h2 {
    color: var(--text-primary);
}

/* ── Filter Gubn ── */
.filterGubn .filter_gubn_cont {
    background: var(--bg-card);
}

.filterGubn .filter_gubn_cont li {
    color: var(--text-muted);
    background: var(--bg-surface);
}

.filterGubn .filter_gubn_cont li.select {
    background: var(--accent-gradient) !important;
    color: var(--text-on-accent);
}

.filterGubn .filter_gubn_cont li:not(.select):hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ── Tables ── */
table,
.table {
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.table td,
.table th {
    border-color: var(--border-subtle);
}

.table tbody tr {
    background: var(--bg-card);
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

.table-bordered {
    border-color: var(--border-subtle);
}

/* ── Modals ── */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.modal-header {
    border-bottom-color: var(--border-subtle) !important;
    color: var(--text-primary);
}

.modal-header .modal-title {
    color: var(--text-primary);
}

.modal-header .close {
    color: white;
    text-shadow: none;
}

.modal-footer {
    border-top-color: var(--border-subtle) !important;
}

.modal-backdrop.show {
    opacity: 0.85;
    background-color: #000;
}

/* ── Buttons ── */
.btn-primary,
.btn-no-color {
    background: var(--accent-gradient) !important;
    border: none;
    color: var(--text-on-accent);
}

.btn-primary:hover,
.btn-no-color:hover {
    box-shadow: 0 2px 12px var(--accent-blue-glow);
}

/* 시뮬레이션 모달 조회하기 버튼 너비 (수정·삭제 버튼은 글자 폭 그대로) */
.modalView {
    min-width: 70px;
}

/* ── Chart Box ── */
.chart_scroll {
    gap: 5px;
}

.chart_box.col6,
.sub_chart_box.col6 {
    width: calc(50% - 3px);
}

.chart_box.col12 {
    width: 100%;
}

/* ── Chart Box ── */
.chart_box,
.sub_chart_box {
    padding: 6px;
    background-color: var(--bg-card);
    border-radius: 10px;
    border: 1px solid #4b8bf5;
    box-sizing: border-box;
}

.chart_content,
.sub_chart_content {
    background-color: var(--bg-card);
    border-radius: 8px;
}

.chart_box h3.title,
.sub_chart_box h3.title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.chart_graph,
.sub_chart_graph {
    background-color: var(--bg-elevated);
    border-radius: 6px;
}

.chart_graph canvas,
.sub_chart_graph canvas,
.chart_graph > div,
.sub_chart_graph > div {
    background-color: transparent !important;
    border-radius: 6px;
}

.chart_box h3,
.chart_box .chart_content,
.chart_box .chart_graph,
.chart_box .chart_remark,
.chart_box .chart_title_wrap,
.sub_chart_box h3,
.sub_chart_box .sub_chart_content,
.sub_chart_box .sub_chart_graph,
.sub_chart_box .sub_chart_title_wrap {
    color: var(--text-primary);
}

.chart_box .chart_source,
.sub_chart_box .sub_chart_source {
    color: var(--text-muted);
    font-size: 10px;
}

/* titleTab */
.chart_bar .titleTab li,
.float_chart .titleTab li {
    background-color: var(--bg-elevated);
}

.chart_bar .titleTab li span,
.float_chart .titleTab li span {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: rgba(80, 110, 170, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(80, 110, 170, 0.5);
}

/* ── Inputs (System pages) ── */
.form-control {
    background-color: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(36, 104, 224, 0.1);
}

/* ── Select time input ── */
.select_time,
.select_minute,
.select_busNum {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-subtle);
    color-scheme: dark;
}

/* ── Value wheel (traffic 시 / 배차간격 분 등 단일 컬럼 휠) ── */
.value_wheel {
    position: relative;
    height: 160px;
    padding: 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.value_wheel_col {
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    text-align: center;
    position: relative;
    outline: none;
}

.value_wheel_col::-webkit-scrollbar { display: none; }

.value_wheel_col ul {
    list-style: none;
    margin: 0;
    padding: 62px 0; /* (160 - 36) / 2 = 62px — 첫·마지막 li를 중앙에 둘 수 있게 */
    display: block;
}

.value_wheel_col li {
    height: 36px;
    line-height: 36px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s, font-weight 0.15s, font-size 0.15s;
}

.value_wheel_col li span {
    display: block;
    pointer-events: none;
}

.value_wheel_col li:hover { color: var(--text-secondary); }

.value_wheel_col li.select {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}

.value_wheel_highlight {
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 36px;
    transform: translateY(-50%);
    border-top: 1px solid rgba(75, 139, 245, 0.5);
    border-bottom: 1px solid rgba(75, 139, 245, 0.5);
    background: rgba(75, 139, 245, 0.08);
    pointer-events: none;
    border-radius: 4px;
}

/* ── Time wheel (시나리오 생성/노선 관리 운영시간 iOS 풍 휠) ── */
/* JS 상수 TIME_WHEEL_ITEM_H = 36과 동기 필요. li height와 ul padding이 한 세트. */
.time_wheel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
    height: 180px;
    padding: 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.time_wheel_col {
    flex: 1;
    overflow-y: auto;
    /* scroll-snap은 의도적으로 빼둠 — 중앙 스냅 위치에 마우스가 있을 때 휠이 무시되는 현상 회피.
       대신 wheel 이벤트를 JS가 가로채 한 칸씩 부드럽게 이동시키고, 터치 드래그는 native scroll 후
       debounce된 scroll 핸들러가 가까운 li로 자동 정렬. */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    text-align: center;
    position: relative;
    outline: none;
}

.time_wheel_col:focus {
    /* tabindex로 focus 받지만 outline은 highlight bar로 충분 */
    outline: none;
}

.time_wheel_col::-webkit-scrollbar { display: none; }

.time_wheel_col ul {
    list-style: none;
    margin: 0;
    padding: 72px 0; /* (180 - 36) / 2 = 72px, 첫·마지막 항목을 중앙으로 스냅 가능하게 */
    display: block;
}

.time_wheel_col li {
    height: 36px;
    line-height: 36px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s, font-weight 0.15s, font-size 0.15s;
}

.time_wheel_col li span {
    display: block;
    pointer-events: none;
}

.time_wheel_col li:hover {
    color: var(--text-secondary);
}

.time_wheel_col li.select {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}

.time_wheel_colon {
    align-self: center;
    color: var(--text-secondary);
    font-size: 22px;
    font-weight: 700;
}

.time_wheel_highlight {
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 36px;
    transform: translateY(-50%);
    border-top: 1px solid rgba(75, 139, 245, 0.5);
    border-bottom: 1px solid rgba(75, 139, 245, 0.5);
    background: rgba(75, 139, 245, 0.08);
    pointer-events: none;
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s;
}

/* focus 시각 표시 — 컬럼 배경 + box-shadow inset로 강조 */
.time_wheel_col:focus,
.value_wheel_col:focus {
    background: rgba(75, 139, 245, 0.06);
    box-shadow: inset 0 0 0 2px rgba(75, 139, 245, 0.5);
    border-radius: 4px;
}

/* sel_box 펼침 시 시간 휠이 다른 영역(기존노선 테이블 등) 위로 올라오도록.
   .filter 자식 레벨에서 stacking context 우선순위 확보는 .filter 자체에
   position:relative + z-index를 부여하여 처리(아래 #rmLeftPanel.scenario_create .filter 참고).
   여기는 .select_tab 자체의 z-index만. */
.sel_box.open .select_tab {
    z-index: 9999 !important;
}

/* ── Filter select dividers ── */
.filter_select {
    border-bottom-color: var(--border-subtle) !important;
}

/* ── Route Table Container ── */
#routeTableContainer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

#routeTableContainer .toggleBtn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

#routeTableContainer .toggleBtn::after {
    color: var(--text-muted);
}

.route-buttons button {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    padding: 8px 16px;
}

.route-buttons button:hover {
    box-shadow: 0 2px 12px var(--accent-blue-glow);
}

#routeTableContainer table {
    color: var(--text-primary);
}

#routeTable th,
#routeTable td {
    border: 1px solid var(--border-strong);
    padding: 8px;
}

#routeTable tbody tr {
    background: var(--bg-card);
}

#routeTable tbody tr:hover {
    background: var(--bg-elevated);
}

#routeTable .loadRouteBtn {
    background: rgba(26, 92, 214, 0.3);
    color: #fff;
    border: 1px solid rgba(75, 139, 245, 0.4);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
}

#routeTable .loadRouteBtn:hover {
    background: rgba(26, 92, 214, 0.5);
}

/* ── Layer Toggle ── */
#layerToggleContainer > div {
    color: black;
}

/* ── Map Control Panel (우상단: 미선택 정류장 토글 + 노선 목록) ── */
.map-control-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    width: 235px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-size: 14px;
    overflow: hidden;
}

.map-control-panel .map-control-section {
    padding: 10px 12px;
}

.map-control-panel .map-control-section + .map-control-section {
    border-top: 1px solid var(--border-subtle);
}

.map-control-panel .map-control-section-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.4px;
}

/* 정류장 + 유동인구 토글 가로 배치 행 */
.map-control-panel .map-control-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.map-control-panel .map-control-row .map-control-item {
    flex: 0 0 auto;   /* 내용 너비만큼 (한 줄에 나란히) */
}

.map-control-panel .map-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-primary);
    transition: background 0.15s ease, opacity 0.15s ease;
    user-select: none;
}

.map-control-panel .map-control-item:hover {
    background: var(--bg-card-hover);
}

.map-control-panel .map-control-item:not(.active) {
    opacity: 0.45;
}

.map-control-panel .map-control-item:not(.active) .map-control-icon {
    filter: grayscale(1);
}

.map-control-panel .map-control-icon {
    width: 16px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* 유동인구 히트맵 토글 스와치 — 히트맵 범례색(중심 빨강 → 바깥 파랑)의 원형.
   비활성 시 위 .map-control-item:not(.active) .map-control-icon 의 grayscale 필터가 함께 적용됨. */
.map-control-panel .map-control-icon.mc-heat-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff0000 0%, #ff2a00 26%, #ffae00 48%, #d8e000 60%, #18d800 78%, #0090ff 100%);
}

/* 04·06 레이어 패널: 우측 상단(JS가 사이드차트·탭이 열리면 그 왼쪽으로 비켜 재배치) + 제목줄 드래그 */
#mapLayerPanel {
    top: 10px;
    right: 10px;
    width: auto;
}
#mapLayerPanel.lp-ready {
    transition: left 0.3s, top 0.3s;
}
#mapLayerPanel.lp-jump {
    transition: none;
}
#mapLayerPanel.lp-dragging {
    transition: none;
    opacity: 0.92;
}
#mapLayerPanel .map-control-section-title {
    cursor: grab;
    touch-action: none;
    user-select: none;
}
#mapLayerPanel.lp-dragging .map-control-section-title {
    cursor: grabbing;
}
#mapLayerPanel .map-control-section-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 12px;
    margin-right: 8px;
    vertical-align: -2px;
    opacity: 0.55;
    background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 0 0 / 4px 4px;
}

/* 전체 정류장·히트맵 데이터 로딩 중 */
.map-control-panel .map-control-item.loading {
    cursor: progress;
}
.map-control-panel .map-control-item.loading .map-control-icon {
    animation: mc-loading-pulse 0.9s ease-in-out infinite;
}
@keyframes mc-loading-pulse {
    50% { opacity: 0.25; }
}

/* 지도 위 비차단 안내 문구 */
#mapNotice {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 9px 16px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-popup);
    color: var(--text-primary);
    font-size: 13px;
    pointer-events: none;
}

.map-control-panel .map-control-legend-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
    overflow-y: auto;
}

.map-control-panel .map-control-legend-list:empty::before {
    content: "데이터 없음";
    color: var(--text-muted);
    font-size: 12px;
}

/* ── 가상 정류장 생성 드래그 마커 (우하단) ── */
.vbn-drag-marker {
    position: absolute;
    z-index: 15;
    bottom: 24px;
    right: 16px;
    width: 140px;
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vbn-drag-marker:hover {
    border-color: rgba(120, 160, 220, 0.55);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.vbn-drag-marker-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text-primary);
    text-align: center;
}

.vbn-drag-marker-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
}

.vbn-drag-marker-icon .draggable_marker {
    width: 28px;
    height: auto;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: element;
}

.vbn-drag-marker-icon .draggable_marker:active {
    cursor: grabbing;
}

.vbn-drag-marker-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.2px;
}

/* ── AG Grid (System Pages) ── */
.ag-theme-balham {
    --ag-background-color: var(--bg-card);
    --ag-header-background-color: var(--bg-elevated);
    --ag-odd-row-background-color: var(--bg-surface);
    --ag-row-hover-color: var(--bg-card-hover);
    --ag-foreground-color: var(--text-primary);
    --ag-header-foreground-color: var(--text-primary);
    --ag-border-color: var(--border-subtle);
}

/* ── Left Sidebar (pcoded) — danl/sys 페이지 모두 자체 GNB(#sub_header)를 쓰고 이 사이드바는 안 씀.
   header.jsp의 인라인 style="width:0px"만으로는 overflow 미지정이라 자식(.main-menu-content 등)이
   안 잘려서, head.jsp 하단 스크립트가 폭을 247px로 되돌리기 전까지 잠깐 그대로 노출됨(메뉴 이동 시
   헤더가 밀려 내려가며 흰 배경이 보이는 현상의 원인) — JS 타이밍과 무관하게 항상 숨김. */
.pcoded-navbar {
    display: none !important;
    background: var(--bg-card);
}

.pcoded-navbar .pcoded-item > li > a {
    color: var(--text-secondary);
}

.pcoded-navbar .pcoded-item > li:hover > a,
.pcoded-navbar .pcoded-item > li.active > a {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.pcoded-navbar .pcoded-submenu {
    background: var(--bg-surface);
}

.pcoded-navbar .pcoded-submenu li a {
    color: var(--text-muted);
}

.pcoded-navbar .pcoded-submenu li:hover a,
.pcoded-navbar .pcoded-submenu li.active a {
    color: var(--text-primary);
}

/* ── Dropdown menus ── */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

.dropdown-item {
    color: var(--text-secondary);
}

.dropdown-item:hover {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

/* ── Alert / Notification ── */
.show-notification {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

/* ── Tooltip ── */
.layerTooltip {
    position: absolute;
    background-color: rgba(10, 15, 28, 0.9);
    color: var(--text-primary);
    padding: 5px;
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-size: 12px;
    display: none;
    pointer-events: none;
    z-index: 20;
}

.light-tooltip {
    position: absolute;
    background-color: rgba(10, 15, 28, 0.9);
    color: var(--text-primary);
    padding: 12px 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-size: 12px;
    display: none;
    pointer-events: none;
    z-index: 9999;
}

/* ── Bus Simulation Slider ── */
#busSliderContainer {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(calc(-50% + var(--bus-shift, 0px)));
    width: 70%;
    max-width: var(--bus-maxw, 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(10, 15, 28, 0.5);
    padding: 22px 30px 5px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    z-index: 100;
    overflow: visible;
    transition: transform 0.3s ease, max-width 0.3s ease;
}

.bus-slider-row {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    position: relative;
}

#busStartTime, #busEndTime {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 13px;
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
}

#busSlider {
    flex: 1;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #7c3aed, #06b6d4);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

#busSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 70px;
    background: url('/images/bus.png') no-repeat center center;
    background-size: contain;
    cursor: pointer;
    border: none;
    margin-top: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

#busSlider::-moz-range-thumb {
    width: 50px;
    height: 50px;
    background: url('/images/bus.png') no-repeat center center;
    background-size: contain;
    cursor: pointer;
    border: none;
}

#busTimeDiv {
    position: absolute;
    color: var(--text-primary);
    font-weight: bold;
    font-size: 13px;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.bus-sim-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    position: relative;
    z-index: 200;
}

#busPlayBtn, #busSpeedBtn, #busFollowBtn, #buildingToggleBtn {
    background: rgba(10, 15, 28, 0.85);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 3px 24px;
    font-size: 15px;
    cursor: pointer;
    min-width: 72px;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#busPlayBtn:hover, #busSpeedBtn:hover, #busFollowBtn:hover, #buildingToggleBtn:hover {
    background: var(--bg-elevated);
}

#busPlayBtn.paused {
    background: #ffffff;
    color: #111111;
    border-color: #ffffff;
}

#busFollowBtn.active, #buildingToggleBtn.active {
    background: linear-gradient(135deg, #1a5cd6 0%, #4b8bf5 100%);
    color: #ffffff;
    border-color: #1a5cd6;
}

/* ── Bottom Bar ── */
#bottomBar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10, 15, 28, 0.6);
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--border-subtle);
    z-index: 100;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease;   /* 패널 토글 시 부드러운 이동 (열림·닫힘 양방향) */
}

/* 좌측 패널 열림 시: 바를 보이는 지도 영역[패널우측~화면우측] 중앙으로 이동 */
body.rm-panel-open #bottomBar {
    transform: translateX(calc(-50% + 215px));
    gap: 8px;
}

#bbMapChange {
    display: flex;
    gap: 3px;
    align-items: center;
}

.bb-map-btn {
    padding: 5px 11px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s, color 0.15s;
    margin: 0;
    color: var(--text-secondary);
}

.bb-map-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.bb-map-btn.active {
    background: linear-gradient(135deg, #1a5cd6 0%, #4b8bf5 100%);
    color: #fff;
}

.bb-sep {
    width: 1px;
    height: 16px;
    background: white;
    flex-shrink: 0;
}

.bb-zoom {
    display: flex;
    gap: 5px;
    align-items: center;
}

.bb-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 30%;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s;
    user-select: none;
}

.bb-zoom-btn:hover {
    color: var(--text-primary);
}

#bbCameraHeight {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

#bbLonlatView {
    display: flex;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-direction: column;
}

#bbLonlatView span {
    white-space: nowrap;
}

.bb-scale-wrap {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.bb-scale-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#bbScalebar {
    display: block;
    width: 80px;
    height: 3px;
    background: var(--text-primary);
    border-left: 2px solid var(--text-primary);
    border-right: 2px solid var(--text-primary);
    flex-shrink: 0;
}

#bbScalebartag {
    white-space: nowrap;
    font-size: 12px;
}

.bb-marker-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

#bbIconSizeSlider {
    width: 70px;
    height: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-subtle);
    border-radius: 2px;
    outline: none;
}

#bbIconSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4b8bf5;
    cursor: pointer;
}

#bbIconSizeSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4b8bf5;
    cursor: pointer;
    border: none;
}

#bbPickAltitude {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    margin: 0;
}

#bbOpen {
    cursor: pointer;
    padding: 2px 6px;
    color: var(--text-secondary);
    transition: color 0.15s;
    font-size: 16px;
    font-weight: bold;
    user-select: none;
}

#bbOpen:hover {
    color: var(--text-primary);
}

.bb-label {
    color: var(--text-muted);
    font-size: 10px;
}

/* ── Bus Info Panel ── */
#busInfoPanel {
    position: fixed;
    bottom: 130px;
    right: 20px;
    background: #ffffff;
    color: #111111;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Pretendard', sans-serif;
    z-index: 200;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    line-height: 1.8;
}

.bus-info-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid #e0e0e0;
    color: #111111;
    text-align: center;
}

.bus-info-row {
    color: #333333;
    font-size: 13px;
}

/* ── Text color overrides ── */
.text-inverse {
    color: var(--text-secondary);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: black;
}

a {
    color: var(--accent-blue);
}

a:hover {
    color: var(--accent-blue-hover);
}

/* ── 3D Cesium Container ── */
.cesium-container {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
}


/* 3D 모드 활성 시 OL 레이어 캔버스 강제 숨김
   ol-cesium standalone 빌드가 외부 OL 인스턴스를 인식 못 해서
   OL 캔버스 자동 숨김이 동작 안 함 → CSS로 강제 처리 */
.cesium-3d-active .ol-layers {
    display: none !important;
}

/* ── Bus stop loaded area ── */
#loadArea {
    color: var(--text-primary);
}

.vbn-stop-empty {
    color: var(--text-muted);
    font-weight: normal;
}

#busStop_loaded_ul:empty {
    min-height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#busStop_loaded_ul:empty::before {
    content: "미지정";
    color: var(--text-muted);
    font-weight: normal;
}

.busStop_loaded_area {
    width: 100%;
    margin: 14px;
}

.busStop_loaded_area h3 {
    font-weight: bold;
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.scroll_container {
    width: 100%;
    max-height: 225px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    padding: 5px;
    border-radius: 10px;
    min-height: 150px;
}

.station_item {
    position: relative;
    width: 100%;
    padding: 8px 12px;
    border-radius: 40px;
    border: 1px solid var(--border-subtle);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px 0;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-weight: bold;
    text-align: center;
    height: 34px;
}

#busStop_loaded_ul li {
    position: relative;
    width: 100%;
    padding: 8px 12px;
    border-radius: 40px;
    border: 1px solid var(--border-strong);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    transition: 0.2s;
}

/* ── Simulation station items ── */
.station-item {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

.station-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ── Filter scroll ── */
.scroll_style,
.scroll_auto {
    scrollbar-color: rgba(80, 110, 170, 0.3) var(--bg-input);
}

/* ── Select style overrides ── */
.select_style,
.select_style2 {
    background-color: var(--bg-surface);
    border: none;
    border-radius: 30px;
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
}

.select_style select,
.select_style2 select {
    background-color: transparent;
    color: #fff;
    border: none;
}

/* ── Row tab list items ── */
.row_tab li {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.row_tab li:hover {
    background: var(--bg-elevated);
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
    color: var(--text-primary);
}

.row_tab li.select {
    background: rgba(30, 60, 120, 0.6) !important;
    background-image: none !important;
    background-clip: border-box !important;
    border: none;
    outline: 2px solid #4b8bf5;
    outline-offset: -1px;
    color: #fff;
    box-shadow: none;
}

/* ── Marker popup ── */
.marker-popup {
    background: var(--bg-card);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

/* ── 건물 정보 팝업 ── */
#buildingPopup {
    position: fixed;
    z-index: 9999;
    width: 260px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-popup);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    pointer-events: auto;
}
#buildingPopup .bp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px 9px;
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    word-break: keep-all;
}
#buildingPopup .bp-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 0 2px 0;
}
#buildingPopup .bp-close:hover { color: #fff; }
#buildingPopup .bp-body { padding: 8px 14px 6px; }
#buildingPopup .bp-row {
    display: flex;
    gap: 10px;
    padding: 3px 0;
    font-size: 12.5px;
    line-height: 1.4;
}
#buildingPopup .bp-label {
    flex: 0 0 62px;
    color: var(--text-secondary, #94a3b8);
}
#buildingPopup .bp-val { flex: 1; word-break: break-all; }
#buildingPopup .bp-foot {
    padding: 6px 14px 9px;
    border-top: 1px solid var(--border-subtle);
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
}

/* ── 정류장 팝업 ── */
#stationPopup {
    position: fixed;
    z-index: 9999;
    width: 260px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-popup);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    pointer-events: auto;
}
#stationPopup .sp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 9px;
    background: linear-gradient(90deg, #1a5cd6 0%, #4b8bf5 100%);
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
#stationPopup .sp-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 0 2px 0;
}
#stationPopup .sp-close:hover { color: #fff; }
#stationPopup .sp-weather-grid {
    display: flex;
    background: var(--bg-input);
    margin: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-medium);
}
#stationPopup .sp-weather-cell {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 8px 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}
#stationPopup .sp-weather-cell + .sp-weather-cell {
    border-left: 1px solid var(--border-medium);
}
#stationPopup .sp-weather-cell i {
    font-size: 14px;
}
#stationPopup .sp-weather-cell .fa-sun { color: #f59e0b; }
#stationPopup .sp-weather-cell .fa-thermometer-half { color: #ef4444; }
#stationPopup .sp-weather-cell .fa-tint { color: #3b82f6; }
#stationPopup .sp-cong-text {
    color: #f97316;
    font-weight: bold;
    font-size: 11px;
}
#stationPopup .sp-body {
    padding: 9px 14px 13px;
    border-top: 1px solid var(--border-subtle);
}
#stationPopup .sp-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 0;
    font-size: 12.5px;
    line-height: 1.4;
}
#stationPopup .sp-donut {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #4ade80;
    flex-shrink: 0;
}
#stationPopup .sp-triangle {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 12px solid #facc15;
    flex-shrink: 0;
}
#stationPopup .sp-cross {
    position: relative;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
#stationPopup .sp-cross::before,
#stationPopup .sp-cross::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ef4444;
    border-radius: 2px;
}
#stationPopup .sp-cross::before { transform: translateY(-50%) rotate(45deg); }
#stationPopup .sp-cross::after  { transform: translateY(-50%) rotate(-45deg); }
#stationPopup .sp-badge {
    background: var(--accent-blue);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
    color: #fff;
}

/* ── 정류장 팝업 내용 — 좌측 패널 내 재사용 ── */
#rmScenarioInfo .sp-weather-grid {
    display: flex;
    background: var(--bg-input);
    margin: 0 0 8px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-medium);
}
#rmScenarioInfo .sp-weather-cell {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 5px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}
#rmScenarioInfo .sp-weather-cell + .sp-weather-cell { border-left: 1px solid var(--border-medium); }
#rmScenarioInfo .sp-weather-cell i { font-size: 12px; }
#rmScenarioInfo .sp-weather-cell .fa-sun { color: #f59e0b; }
#rmScenarioInfo .sp-weather-cell .fa-thermometer-half { color: #ef4444; }
#rmScenarioInfo .sp-weather-cell .fa-tint { color: #3b82f6; }
#rmScenarioInfo .sp-cong-text { color: #f97316; font-weight: bold; font-size: 11px; }
#rmScenarioInfo .sp-body { padding: 4px 0; }
#rmScenarioInfo .sp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 14px;
    line-height: 1.4;
    color: white;
}
#rmScenarioInfo .sp-donut {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid #4ade80;
    flex-shrink: 0;
}
#rmScenarioInfo .sp-triangle {
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 9px solid #facc15;
    flex-shrink: 0;
}
#rmScenarioInfo .sp-cross {
    position: relative;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}
#rmScenarioInfo .sp-cross::before,
#rmScenarioInfo .sp-cross::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ef4444;
    border-radius: 2px;
}
#rmScenarioInfo .sp-cross::before { transform: translateY(-50%) rotate(45deg); }
#rmScenarioInfo .sp-cross::after  { transform: translateY(-50%) rotate(-45deg); }
#rmScenarioInfo .sp-badge {
    background: var(--accent-blue);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 9.5px;
    font-weight: bold;
    flex-shrink: 0;
    color: #fff;
}

/* ── 가상노선관리: filter7 우측 배치 ── */
.filter[data-id="filter7"] {
    left: auto;
    right: 10px;
}
.filter[data-id="filter7"] .select_tab {
    left: auto;
    right: calc(100% + 10px);
}
.filter[data-id="filter7"] .select_section {
    pointer-events: none;
    cursor: default;
}

/* ── 가상노선관리: 우측 필터 정류장 목록 ── */
#routeStopListArea {
    display: none;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
    margin-top: 6px;
}
#routeStopListArea.visible {
    display: block;
}
.rm-stop-list-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
    font-weight: 600;
}
.rm-stop-terminal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(30, 60, 120, 0.4);
    border: 1px solid rgba(75, 139, 245, 0.4);
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: #4b8bf5;
    margin: 4px 0;
}
.rm-stop-terminal::before {
    content: "◉";
    font-size: 10px;
}
.rm-stop-scroll {
    max-height: 200px;
    overflow-y: auto;
    border-left: 2px solid rgba(75, 139, 245, 0.3);
    margin: 4px 0 4px 14px;
    padding: 4px 0;
}
.rm-stop-scroll::-webkit-scrollbar { width: 4px; }
.rm-stop-scroll::-webkit-scrollbar-track { background: transparent; }
.rm-stop-scroll::-webkit-scrollbar-thumb { background: rgba(75, 139, 245, 0.4); border-radius: 2px; }
#rm-stopList {
    list-style: none;
    padding: 0;
    margin: 0;
}
#rm-stopList li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 12px;
    position: relative;
}
#rm-stopList li::before {
    content: "─";
    position: absolute;
    left: -10px;
    color: rgba(75, 139, 245, 0.5);
    font-size: 10px;
}
#rm-stopList .rm-stop-empty {
    color: var(--text-muted);
    font-style: italic;
}

/* ── 가상노선관리: 좌측 정보 패널 ── */
#rmLeftPanel {
    position: absolute;
    width: 650px;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    z-index: 101;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-popup);
    display: flex;
    flex-direction: column;
}
.scenario_create {
    width: 440px !important;
}
#rmLeftPanel.hide {
    transform: translate(calc(-100%), 0);
}
.btn_rm_toggle {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
}
.btn_rm_toggle::after {
    content: "◀";
}
#rmLeftPanel.hide .btn_rm_toggle::after {
    content: "▶";
}
.rm-panel-header {
    padding: 12px 16px 10px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}
.rm-left-panel-inner {
    display: flex;
    overflow-y: auto;
    padding: 12px 16px;
    flex-direction: column;
    gap: 5px;
}
.rm-left-panel-inner::-webkit-scrollbar { width: 4px; }
.rm-left-panel-inner::-webkit-scrollbar-track { background: transparent; }
.rm-left-panel-inner::-webkit-scrollbar-thumb { background: rgba(75, 139, 245, 0.4); border-radius: 2px; }
.rm-empty-msg {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 24px;
    line-height: 1.7;
}
.rm-section-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 0 8px;
    font-weight: 600;
}
.rm-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 8px;
}
.rm-info-item:last-child {
    border-bottom: none;
}
.rm-info-label {
    color: var(--text-muted);
    font-size: 11.5px;
    flex-shrink: 0;
}
.rm-info-value {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

/* ── 조회하기: 우측 정류장 목록 패널 ── */
#rmRightStopPanel {
    position: absolute;
    right: 10px;
    top: 60px;
    width: 240px;
    max-height: 290px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    z-index: 2;
    box-shadow: var(--shadow-popup);
    display: none;
    padding: 5px;
}
#rmRightStopPanel::-webkit-scrollbar { width: 4px; }
#rmRightStopPanel::-webkit-scrollbar-track { background: transparent; }
#rmRightStopPanel::-webkit-scrollbar-thumb { background: rgba(75, 139, 245, 0.4); border-radius: 2px; }
.rm-view-stop-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer; /* 클릭 시 해당 정류장 위치로 버스 이동(2026-09-27) */
}
.rm-view-stop-item:hover {
    background: rgba(75, 139, 245, 0.08);
}
.rm-view-stop-item:last-child {
    border-bottom: none;
}
.rm-view-stop-terminal {
}
.rm-view-stop-name {
    text-align: left;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.rm-view-stop-meta {
    display: flex;
    align-items: center;
    font-size: 11px;
    justify-content: space-around;
}
.rm-view-stop-time {
    color: var(--text-muted);
    font-size: 11px;
}
.rm-view-badge {
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
}
.rm-view-badge-board { background: #ef4444; }
.rm-view-badge-alight { background: #4b8bf5; }

/* ── 가상노선관리(routeManagement.do) 전용: 우측 패널 드래그 이동 + 리사이즈 ──
   JS(_rmEnsureMovable / setupMovablePanels)가 .rm-movable-panel 클래스를 부여한 요소에만 적용.
   이 클래스는 이 페이지에서만 붙으므로 다른 페이지/공통 컴포넌트에 영향 없음. */
.rm-movable-panel {
    /* 리사이즈 핸들이 박스 경계 밖(-5px)에 위치 → root 는 overflow:visible 유지 (클리핑 금지) */
    overflow: visible;
}
.rm-movable-panel.ui-draggable-dragging,
.rm-movable-panel.ui-resizable-resizing {
    cursor: move;
    -webkit-user-select: none;
    user-select: none;
    /* filter7 은 .filter{transition:all 0.3s}(main.css) 때문에 드래그/리사이즈가 0.3s 이징으로 따라옴
       → 인터랙션 중에만 transition 해제 (collapse 애니메이션은 보존). 다른 패널엔 무해. */
    transition: none !important;
}

/* jquery-ui.css 미로드 → 리사이즈 핸들 치수/커서를 직접 정의.
   없으면 .ui-resizable-* 핸들이 0x0 이라 리사이즈 자체가 동작하지 않음 (스타일이 아니라 동작 요건). */
.rm-movable-panel > .ui-resizable-handle {
    position: absolute;
    display: block;
    font-size: 0.1px;
    touch-action: none;
    z-index: 10;
}
.rm-movable-panel > .ui-resizable-n  { cursor: n-resize;  height: 8px;  width: 100%; top: -5px;    left: 0; }
.rm-movable-panel > .ui-resizable-s  { cursor: s-resize;  height: 8px;  width: 100%; bottom: -5px; left: 0; }
.rm-movable-panel > .ui-resizable-e  { cursor: e-resize;  width: 8px;   right: -5px; top: 0; height: 100%; }
.rm-movable-panel > .ui-resizable-w  { cursor: w-resize;  width: 8px;   left: -5px;  top: 0; height: 100%; }
.rm-movable-panel > .ui-resizable-se { cursor: se-resize; width: 16px;  height: 16px; right: 0;    bottom: 0; }
.rm-movable-panel > .ui-resizable-sw { cursor: sw-resize; width: 12px;  height: 12px; left: -5px;  bottom: -5px; }
.rm-movable-panel > .ui-resizable-ne { cursor: ne-resize; width: 12px;  height: 12px; right: -5px; top: -5px; }
.rm-movable-panel > .ui-resizable-nw { cursor: nw-resize; width: 12px;  height: 12px; left: -5px;  top: -5px; }
/* SE 코너 시각 힌트 (은은하게) */
.rm-movable-panel > .ui-resizable-se::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--border-strong, rgba(120, 140, 180, 0.7));
    border-bottom: 2px solid var(--border-strong, rgba(120, 140, 180, 0.7));
    opacity: 0.75;
}

/* 크기 축소 시 텍스트 ellipsis (요소별 — root 는 overflow:visible 유지) */
.rm-movable-panel .sel_box h3,
.rm-movable-panel .select_section p,
.rm-movable-panel .rm-view-stop-name,
.rm-movable-panel .bus-info-title,
.rm-movable-panel .bus-info-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* rmRightStopPanel: 세로 스크롤을 내부 wrapper(.rm-stop-body)로 이동.
   root 는 리사이즈 핸들 보존을 위해 overflow:visible 유지, flex 로 내부 body 가 높이를 채움. */
#rmRightStopPanel.rm-movable-panel {
    display: flex;
    flex-direction: column;
    overflow: visible;
}
#rmRightStopPanel .rm-stop-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
#rmRightStopPanel .rm-stop-body::-webkit-scrollbar { width: 4px; }
#rmRightStopPanel .rm-stop-body::-webkit-scrollbar-track { background: transparent; }
#rmRightStopPanel .rm-stop-body::-webkit-scrollbar-thumb { background: rgba(75, 139, 245, 0.4); border-radius: 2px; }

/* filter7: 세로 축소 시 내부 콘텐츠(.cont_wrap)가 스크롤되도록. root 는 핸들 보존 위해 overflow:visible. */
.filter[data-id="filter7"].rm-movable-panel {
    display: flex;
    flex-direction: column;
    overflow: visible;
}
.filter[data-id="filter7"].rm-movable-panel > .cont_wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* busInfoPanel: CSS min-width:200 floor 해제(가로 축소 허용) + 세로 스크롤을 .rm-scroll-body(JS 래핑)로 이동.
   루트 padding 을 0 으로 하고 내부 래퍼로 옮김 → box-sizing:border-box 에서 resizable 시작 시
   jQuery .width()(콘텐츠폭)를 border-box 폭으로 재적용하며 padding(좌우40·상하28)만큼 툭 줄어드는 스냅 방지. */
#busInfoPanel.rm-movable-panel {
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-width: 0;
    padding: 0;
    /* 우측 간격을 filter7/rmRightStopPanel(right:10px)과 동일선상으로 정렬 (기본 20px → 10px).
       기본 상태는 right 앵커 유지 → 모든 해상도에서 정렬 유지. 드래그 시 JS 가 left 로 정규화. */
    right: 10px;
}
#busInfoPanel.rm-movable-panel > .rm-scroll-body {
    padding: 14px 20px;
}

/* 공통 내부 스크롤 래퍼 (busInfoPanel 등 자체 래퍼가 없는 패널을 JS 가 이걸로 감쌈).
   세로 축소→스크롤, 세로 확대→flex 로 콘텐츠 영역이 패널을 채움(뒷배경만 늘어나는 문제 해결). */
.rm-movable-panel > .rm-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.rm-movable-panel > .rm-scroll-body::-webkit-scrollbar { width: 4px; }
.rm-movable-panel > .rm-scroll-body::-webkit-scrollbar-track { background: transparent; }
.rm-movable-panel > .rm-scroll-body::-webkit-scrollbar-thumb { background: rgba(75, 139, 245, 0.4); border-radius: 2px; }

/* ── 가상노선관리: 좌측 패널 3-섹션 레이아웃 ── */
.rmlp-section {
    padding: 12px 0;
}
.rmlp-section:last-child { border-bottom: none; }
.rmlp-section-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.rmlp-outLine-section {
    border: 1px solid #4b8bf5;
    border-radius: 10px;
}
/* 계수·가정 근거를 값 옆에 알리는 작은 설명 — 대시보드_수정요청_20260923.md #7(탄소 배출량 계수 가정) */
.rmlp-assumption-note {
    font-size: 9px; font-weight: 400; text-transform: none; letter-spacing: 0;
    color: var(--text-muted); opacity: 0.75; margin-left: 6px;
}

/* 좌측 3섹션 sortable (재배치) */
.rmlp-section-label { cursor: move; }
.rmlp-section-placeholder {
    border: 2px dashed #4b8bf5;
    border-radius: 10px;
    background: rgba(75, 139, 245, 0.08);
    margin: 12px 0;
}
/* 섹션 1: 정류장/노선 정보 */
.rmlp-stop-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 10px 10px 0 10px;
}
.rmlp-stop-body {
    display: flex;
    gap: 5px;
    align-items: flex-start;
    margin: 10px 10px 5px 10px;
}
.rmlp-stop-left {
    flex: 0 0 42%;
    max-width: 42%;
}
.rmlp-stop-right { flex: 1; min-width: 0; }
.rmlp-warn { color: #f97316; }
/* 탭 */
.rmlp-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 6px;
}
.rmlp-tab {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s;
}
.rmlp-tab:hover { color: var(--text-primary); }
.rmlp-tab.active {
    color: #4b8bf5;
    font-weight: 700;
    border-bottom: 2px solid #4b8bf5;
    margin-bottom: -1px;
}
.rmlp-tab-panels { height: 148px; }
.rmlp-tp { display: none; height: 100%; }
.rmlp-tp.active { display: block; }
.rmlp-tp canvas { width: 100% !important; height: 100% !important; }
/* 섹션 2: 수소 하이브리드 버스 — 네온 대시보드 */
/* Pretendard는 head.jsp에서 로드 */
.hb-neon { box-shadow: 0 0 12px rgba(0,229,255,0.1), inset 0 0 12px rgba(0,229,255,0.02); }
.hb-area1-title {
    width: 100%; font-size: 14px; font-weight: 700; color: #fff;
    letter-spacing: 1.0px;
    padding: 0 4px 6px; margin-bottom: 2px;
}
/* 영역1: 3열 */
.hb-area1 {
    display: flex; flex-direction: column; margin: 0 8px; padding: 10px;
    background: linear-gradient(180deg, rgba(10,10,15,0.95), rgba(13,17,23,0.95));
    border-radius: 8px; border: 1px solid rgba(0,229,255,0.1);
}
.hb-area1-cols { display: flex; gap: 4px; min-height: 130px; }
.hb-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; }
/* 좌: 버스 + 배지 */
.hb-col-bus { gap: 4px; }
.hb-badge-row { display: flex; gap: 4px; width: 100%; }
.hb-badge {
    flex: 1; padding: 4px 6px; background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06); border-radius: 5px; text-align: center;
}
.hb-badge-label { font-size: 9px; color: rgba(255,255,255,1); text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 2px; }
.hb-badge-val { font-family: 'Pretendard', sans-serif; font-size: 13px; font-weight: 700; display: block; }
/* 실측 아님(합성/추정값) 표시 배지 — 대시보드_수정요청_20260923.md #7·#8 공통(수소버스 패널, 혼잡도·종합평가,
   station-panel 캐시미스 폴백). console.warn만으로는 화면에서 실측/합성 구분이 안 되던 문제를 해소. */
.rmlp-mock-badge {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.3px;
    padding: 1px 6px; border-radius: 8px; margin-left: 6px; vertical-align: middle;
    background: rgba(255,179,0,0.15); color: #ffb300; border: 1px solid rgba(255,179,0,0.35);
}
.hb-green { color: #00e676; text-shadow: 0 0 6px rgba(0,230,118,0.3); }
.hb-amber { color: #ffb300; text-shadow: 0 0 6px rgba(255,179,0,0.3); }
.hb-cyan { color: #00e5ff; text-shadow: 0 0 6px rgba(0,229,255,0.3); }
.hb-green-light { color: #86efac; text-shadow: 0 0 6px rgba(134,239,172,0.3); }
.hb-yellow-light { color: #fde047; text-shadow: 0 0 6px rgba(253,224,71,0.3); }
.hb-blue-light { color: #93c5fd; text-shadow: 0 0 6px rgba(147,197,253,0.3); }
.hb-bus-svg-wrap { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; }
.hb-bus-img { width: 100%; max-height: 140px; object-fit: contain; filter: brightness(1.1) drop-shadow(0 2px 10px rgba(0,229,255,0.15)); }
/* 중앙: 속도계 */
.hb-col-speed { align-items: center; }
.hb-speedo { position: relative; width: 140px; height: 140px; }
.hb-speedo-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 4px rgba(0,229,255,0.3)); }
.hb-speedo-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    text-align: center; line-height: 1.1; padding-top: 5px;
}
.hb-speedo-label { display: block; font-size: 14px; color: rgba(255,255,255,1); margin-bottom: 2px; }
.hb-speedo-val { display: block; font-family: 'Pretendard', sans-serif; font-size: 28px; font-weight: 800; color: #00e5ff; text-shadow: 0 0 15px rgba(0,229,255,0.4); }
.hb-speedo-val small { font-size: 10px; font-weight: 400; color: #00e5ff; }
.hb-speedo-bottom {
    display: flex; justify-content: space-between; width: 100%; margin-top: -12px; gap: 2px;
}
.hb-speedo-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hb-speedo-range { font-size: 10px; color: #00e5ff; opacity: 0.6; margin-bottom: 0; }
.hb-speedo-pill {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 12px; background: var(--bg-card); border-radius: 8px;
    border: 1px solid rgba(0,229,255,0.12);
}
.hb-pill-label { font-size: 10px; color: rgba(255,255,255,1); text-transform: uppercase; }
.hb-pill-val { font-size: 13px; font-weight: 700; color: #00e5ff; }
/* 우: 전력 흐름도 — neon_bus_clean(셰브론 제거본) 위에 흐르는 셰브론 애니메이션 */
.hb-col-flow { align-items: center; justify-content: space-between; }
.hb-flow-wrap { position: relative; width: 100%; max-width: 275px; margin: 0 auto; aspect-ratio: 802 / 437; }
.hb-flow-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
/* 흐르는 셰브론 트랙: mask=셰브론 모양, background-color=흐름색, mask-position 애니=흐름.
   요소 클래스(.hb-flow-fc/motor/batt)는 그대로라 기존 _flow() JS가 supply/regen/off 부여. */
.hb-flow-track {
    position: absolute; pointer-events: none; opacity: 0.22;
    background-color: rgba(255,255,255,0.55);
    transition: background-color .3s ease, opacity .3s ease;
}
/* 수평(Motor/Battery): 오른쪽향 셰브론 타일 — 좌향 흐름은 scaleX(-1)로 뒤집음 */
.hb-flow-motor, .hb-flow-batt {
    top: 51%; height: 16px; transform: translateY(-50%);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3 3 L11 8 L3 13' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3 3 L11 8 L3 13' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
    -webkit-mask-size: 16px 16px; mask-size: 16px 16px;
    -webkit-mask-position: 0 center; mask-position: 0 center;
}
.hb-flow-motor { left: 31%; width: 18%; }   /* 중앙→Motor(좌) 코리도어 */
.hb-flow-batt  { left: 50%; width: 21%; }   /* 중앙→Battery(우) 코리도어 */
/* 수직(Fuel Cell): 아래향 셰브론 — 중앙으로 하강 */
.hb-flow-fc {
    left: 47%; width: 6%; top: 22%; height: 21%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3 3 L8 11 L13 3' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3 3 L8 11 L13 3' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat-y; mask-repeat: repeat-y;
    -webkit-mask-size: 16px 16px; mask-size: 16px 16px;
    -webkit-mask-position: center 0; mask-position: center 0;
}
/* 상태별 색·방향 (JS _flow 가 supply/regen/off 부여 — 기존 부호 로직 그대로) */
.hb-flow-off { opacity: 0.16; animation: none !important; }
/* 일시정지·종료·정지 시 흐름 멈춤(셰브론은 그대로 두고 애니메이션만 정지) */
.hb-flow-frozen .hb-flow-track { animation: none !important; }
/* 수평 공급(소비/방전)=모터쪽 좌향 시안 / 회생·충전=우향 초록 */
.hb-flow-motor.hb-flow-supply, .hb-flow-batt.hb-flow-supply {
    background-color: #00e5ff; opacity: 0.95;
    transform: translateY(-50%) scaleX(-1); animation: hbFlowX 0.7s linear infinite;
}
.hb-flow-motor.hb-flow-regen, .hb-flow-batt.hb-flow-regen {
    background-color: #86efac; opacity: 0.95; animation: hbFlowX 0.7s linear infinite;
}
/* 수직 Fuel Cell 공급=하향 빨강 */
.hb-flow-fc.hb-flow-supply {
    background-color: #ff5a5a; opacity: 0.95; animation: hbFlowY 0.7s linear infinite;
}
@keyframes hbFlowX {
    from { -webkit-mask-position: 0 center; mask-position: 0 center; }
    to   { -webkit-mask-position: 16px center; mask-position: 16px center; }
}
@keyframes hbFlowY {
    from { -webkit-mask-position: center 0; mask-position: center 0; }
    to   { -webkit-mask-position: center 16px; mask-position: center 16px; }
}
/* 네온 버스 위 읽기용 라벨 칩 — 이미지 baked 텍스트가 흐려 덧댐. 박스 위 고정, 정적(상태는 셰브론이 표시). */
.hb-flow-name {
    position: absolute; transform: translate(-50%, -50%);
    font-size: 12px; color: #fff; white-space: nowrap;
    padding: 1px 6px; background: rgba(0,160,180,1); border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4); pointer-events: none;
}
.hb-flow-name-fc    { top: 16%; left: 51%; }   /* Fuel Cell 박스 중심 */
.hb-flow-name-motor { top: 50%; left: 21%; }   /* Motor 박스 중심 */
.hb-flow-name-batt  { top: 50%; left: 83%; }   /* Battery 박스 중심 */
/* ③ 탄소 섹션 부제(수소 생산 기준 표기) */
.rmlp-section-sub { font-size: 10px; font-weight: 400; opacity: 0.6; margin-left: 2px; }
/* 전력 지표 행 */
.hb-power-row {
    display: flex; gap: 3px; width: 100%; margin-top: 6px;
}
/* min-width:0(균등폭 유지) + white-space:nowrap 조합은 셀이 내용보다 좁아져도 안 늘어나 넘침 발생 →
   값/단위를 2줄로 분리(아래 small의 display:block)해 한 줄 폭 요구치를 숫자만으로 줄여 해소(폰트 축소 없이). */
.hb-pstat { flex: 1; min-width: 0; text-align: center; padding: 5px 0; }
.hb-pstat-label { display: block; font-size: 9px; color: rgba(255,255,255,1); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px; }
.hb-pstat-val { display: block; font-family: 'Pretendard', sans-serif; font-size: 14px; font-weight: 700; color: #00e5ff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-pstat-val small { display: block; font-size: 11px; font-weight: 500; opacity: 1; margin-left: 0; margin-top: 1px; }   /* 단위를 값 아래 줄로 분리 — 한 줄 폭 계산에서 단위 폭 제외 */
/* 영역2,3: Battery + Fuel Cell */
.hb-bottom { display: flex; padding: 0 8px 8px; }
.hb-panel-batt { flex: 1; }
.hb-panel-fc { flex: 2; }
.hb-panel {
    background: rgba(10,10,15,0.8); border-radius: 8px; padding: 8px;
    border: 1px solid rgba(0,229,255,0.1);
    box-shadow: 0 0 8px rgba(0,229,255,0.05);
}
.hb-panel-head { display: flex; justify-content: space-between; align-items: center; }
.hb-panel-title { font-family: 'Pretendard', sans-serif; font-size: 14px; font-weight: 700; color: #ffffff; letter-spacing: 1px; }
.hb-temp-badge { font-size: 10px; color: #ffb300; padding: 3px 8px; background: rgba(255,179,0,0.12); border-radius: 8px; }
/* 원형 게이지 */
.hb-gauge-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 0;
}
.hb-gauge-sm, .hb-gauge-md { width: 130px; height: 130px; }
.hb-gauge-svg { width: 100%; height: 100%; }
.hb-gauge-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.hb-gauge-icon { font-size: 14px; }
.hb-gauge-title { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.hb-gauge-val { font-family: 'Pretendard', sans-serif; font-size: 20px; font-weight: 800; line-height: 1; }
.hb-gauge-val small { font-size: 12px; font-weight: 500; }
.hb-gauge-val-sm { font-size: 16px; }
.hb-gauge-val-sm small { font-size: 11px; font-weight: 500; }
/* Fuel Cell 2열 */
.hb-fc-dual { display: flex; gap: 6px; margin-bottom: 4px; }
.hb-fc-sub { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.hb-fc-sub .hb-spec-row { width: 100%; }   /* 스펙 행을 서브 폭 가득 채움(기존 align-items:center로 셀이 쪼그라들던 것 해소 → 단위 키울 여유 확보) */
/* 공통 스펙 행 */
.hb-spec-row { display: flex; gap: 4px; }
.hb-spec {
    flex: 1; min-width: 0; text-align: center; padding: 6px 5px;
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 5px;
}
.hb-spec-k { display: block; font-size: 9px; color: rgba(255,255,255,1); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px; }
.hb-spec-v { display: block; font-family: 'Pretendard', sans-serif; font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-spec-v small { font-size: 11px; font-weight: 500; opacity: 1; margin-left: 2px; }   /* 단위: 키우고 색 full(흐림 제거) */
.hb-spec-wide { flex: 1.5; white-space: nowrap; }
.hb-spec-wide .hb-spec-k { white-space: nowrap; }   /* 라벨 한 줄(짤림은 아래 셀 넓힘으로 해소) */
.hb-spec-reg    { flex: 2.2; padding-left: 5px; padding-right: 5px; }   /* Regulated Pres. — 더 넓게+좌우패딩 축소로 라벨 한 줄 확보(폰트 유지) */
.hb-spec-reg .hb-spec-k { letter-spacing: 0; }                          /* 자간 0 → 한 줄 여유 */
.hb-spec-narrow { flex: 1; }   /* Status — 짧아 좁게 */
.rmlp-hb-spec {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 1px; padding: 4px 2px; background: var(--bg-elevated); border-radius: 4px;
}
.rmlp-hb-spec-k { font-size: 8px; color: rgba(255,255,255,0.4); text-transform: uppercase; }
.rmlp-hb-spec-v { font-size: 10px; color: var(--text-primary); font-weight: 600; }
/* 섹션 3: 탄소 배출량 */
.rmlp-carbon-body {
    display: flex;
    gap: 10px;
    margin: 10px;
    align-items: stretch;
}
.rmlp-carbon-chart {
    flex: 1;
    height: 160px;
}
.rmlp-carbon-chart canvas { width: 100% !important; height: 100% !important; }
.rmlp-carbon-stats {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rmlp-cs-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    flex: 1;
}
.rmlp-cs-card-time {
    background: rgba(50,110,30,1);
    border: 1px solid rgba(140,230,80,0.25);
    box-shadow: 0 0 12px rgba(120,220,60,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.rmlp-cs-card-carbon {
    background: rgba(150,80,10,1);
    border: 1px solid rgba(255,170,50,0.25);
    box-shadow: 0 0 12px rgba(255,150,30,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.rmlp-cs-card-top { text-align: left; }
.rmlp-cs-card-mid { text-align: center; }
.rmlp-cs-card-bot { text-align: right; }
.rmlp-cs-card-label {
    font-size: 14px;
    color: rgba(255,255,255,1);
}
.rmlp-cs-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.rmlp-cs-card-unit {
    font-size: 14px;
    color: rgba(255,255,255,1);
}

/* ══════ 시나리오 생성 페이지 ══════ */
#scLeftPanel {
    position: absolute; left: 0; top: 0; width: 380px; height: 100%;
    background: var(--bg-card); border-right: 1px solid var(--border-subtle);
    z-index: 101; display: flex; flex-direction: column;
    box-shadow: var(--shadow-popup); overflow-y: auto;
}
.sc-section { padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.sc-form-group { margin-bottom: 10px; }
.sc-label {
    display: block; font-size: 12px; color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}
.sc-input {
    width: 100%; padding: 8px 10px; font-size: 13px;
    background: var(--bg-input); color: #fff;
    border: 1px solid var(--border-subtle); border-radius: 6px;
    outline: none; transition: border-color 0.2s;
}
.sc-input:focus { border-color: #4b8bf5; }
.sc-input::placeholder { color: rgba(255,255,255,0.3); }
.sc-select-wrap {
    background: var(--bg-input); border: 1px solid var(--border-subtle);
    border-radius: 6px; max-height: 100px; overflow-y: auto;
}
.sc-select-list { list-style: none; padding: 4px; margin: 0; }
.sc-select-list li {
    padding: 6px 10px; font-size: 12px; color: rgba(255,255,255,0.7);
    border-radius: 4px; cursor: pointer; transition: background 0.15s;
}
.sc-select-list li:hover { background: var(--bg-elevated); color: #fff; }
.sc-select-list li.select {
    background: rgba(30, 60, 120, 0.6); color: #fff; font-weight: 600;
    border: 1px solid rgba(60, 110, 200, 0.4);
}
/* 정류장 목록 */
.sc-station-section { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sc-station-list {
    flex: 1; overflow-y: auto; background: var(--bg-base);
    border-radius: 6px; padding: 8px;
}
.sc-station-empty { font-size: 14px; color: rgba(255,255,255,0.3); text-align: center; padding: 20px 0; }
.sc-station-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; font-size: 12px; color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sc-station-item.sc-terminal { color: #4b8bf5; font-weight: 600; }
.sc-station-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.3); flex-shrink: 0;
}
.sc-terminal .sc-station-dot { background: #4b8bf5; }
/* 생성 버튼 */
.sc-btn-area { padding: 12px 16px; }

.sc-create-btn:hover { opacity: 0.85; }
/* 패널 휠 스크롤 시 지도 줌 방지 */
#scLeftPanel { overscroll-behavior: contain; }

/* ── 제거노선 / 대상노선 패널 ── */
.sc-route-panel {
    z-index: 101; display: flex; flex-direction: column; gap: 5px;
}
.sc-route-section {
    background: var(--bg-card); border: 1px solid #4b8bf5;
    border-radius: 10px; padding: 12px; box-shadow: var(--shadow-popup);
}
.sc-route-section .sc-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.sc-route-list {
    max-height: 135px; overflow-y: auto; height: 135px;
    background: var(--bg-base); border-radius: 6px; padding: 6px;
}
.sc-route-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 8px; font-size: 12px; color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer;
}
.sc-route-item:hover { background: var(--bg-elevated); color: #fff; }
.sc-route-item .sc-route-name { flex: 1; }
.sc-route-item .sc-route-action {
    font-size: 10px; color: #4b8bf5; cursor: pointer;
}
.sc-route-table-wrap {
    max-height: 130px;
    overflow-y: auto;
    border-radius: 6px;
    background: var(--bg-base);
}
.sc-route-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}
.sc-route-table colgroup col:nth-child(1) { width: 35%; }
.sc-route-table colgroup col:nth-child(2) { width: 25%; }
.sc-route-table colgroup col:nth-child(3) { width: 25%; }
.sc-route-table colgroup col:nth-child(4) { width: 15%; }
.sc-route-table thead tr {
    background: linear-gradient(90deg, #1a5cd6 0%, #4b8bf5 100%);
    color: white;
}
.sc-route-table thead th {
    padding: 5px;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sc-route-table tbody td {
    padding: 6px 6px;
    border: 1px solid var(--border-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}
.sc-route-table tbody tr[data-value] {
    cursor: pointer;
    transition: background 0.15s, border-left 0.15s;
    background: var(--bg-card);
}
.sc-route-table tbody tr[data-value]:hover {
    background: rgba(75, 139, 245, 0.10);
}
.sc-route-table tbody tr[data-value].select {
    background: rgba(75, 139, 245, 0.22);
    border-left: 3px solid #4b8bf5;
    box-shadow: inset 0 0 0 1px rgba(75, 139, 245, 0.35);
}
.sc-route-table tbody tr[data-value].select td {
    color: #fff;
}
.sc-route-table tbody tr[data-value].select td:first-child {
    padding-left: 3px;
}

/* 노선명 2줄 표기 — 318 / (~방면) */
.route-name-num {
    display: block;
    font-weight: 700;
    color: inherit;
    line-height: 1.2;
}
.route-name-dir {
    display: block;
    font-size: 0.79em;
    color: rgba(255,255,255,0.55);
    line-height: 1.15;
    margin-top: 1px;
}
.sc-route-table tbody tr[data-value].select .route-name-dir,
#routeTable tbody tr[data-value].select .route-name-dir {
    color: rgba(255,255,255,0.85);
}
/* 노선명 셀은 2줄 표기 허용 */
.sc-route-table tbody td.route-name-cell,
#routeTable tbody td.route-name-cell {
    white-space: normal;
    line-height: 1.2;
    padding-top: 4px;
    padding-bottom: 4px;
}
/* 필터 패널의 li도 2줄 배지 형태 */
.select_route_select li .route-name-num,
.select_route_select li .route-name-dir {
    display: block;
    text-align: center;
}

/* 시나리오 정류장 팝업 — 헤더/차트/지표는 vbn-popup-* 규칙 공유, 노선 뱃지 행만 고유 */
#scStationPopup .sc-popup-routes {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
#scStationPopup .sc-popup-route-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
#scStationPopup .sc-popup-route-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(74,139,245,0.15);
    border: 1px solid rgba(74,139,245,0.3);
    border-radius: 4px;
    padding: 2px 6px;
    text-align: center;
}
#scStationPopup .sc-popup-route-virtual {
    background: rgba(0,201,167,0.12);
    border-color: rgba(0,201,167,0.35);
}
#scStationPopup .sc-popup-route-virtual em {
    font-style: normal;
    font-size: 9px;
    color: #00c9a7;
    font-weight: 400;
}

/* scenarioCreate: 패널 내부 filter/노선영역 absolute 제거 */
#rmLeftPanel.scenario_create .filter {
    position: static;
}
#rmLeftPanel.scenario_create .sel_box h3 {
    margin-left: 0;
}
#rmLeftPanel.scenario_create .sc-route-panel {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    box-sizing: border-box;
    /* base .sc-route-panel { z-index:101 } 을 낮춤 — 같은 #rmLeftPanel 부모 stacking 안에서
       .select_tab(absolute, z-index:9999)이 자연스럽게 위에 그려지게. */
    z-index: 1;
}
#rmLeftPanel.scenario_create .sc-route-panel .sc-route-section {
    padding: 12px 16px;
}

/* 가상 버스 네트워크 생성(simulation): 상단 필터 + 하단 노선 테이블 50:50 */
#rmLeftPanel.vbn-create {
    width: 440px;
}
#rmLeftPanel.vbn-create .rm-left-panel-inner {
    flex: 1 1 auto;
    height: calc(100% - 0px);
    gap: 5px;
    overflow: hidden;
    padding: 12px 16px;
}
#rmLeftPanel.vbn-create .vbn-filter-section {
    flex: 1 1 65%;
    min-height: 0;
    overflow-y: auto;
    border-bottom: 1px solid var(--border-subtle);
    box-sizing: border-box;
    background: var(--bg-card);
    border: 1px solid #4b8bf5;
    border-radius: 10px;
    box-shadow: var(--shadow-popup);
    padding: 5px;
}
#rmLeftPanel.vbn-create .vbn-route-section {
    flex: 1 1 35%;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
#rmLeftPanel.vbn-create .vbn-route-title {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}
#rmLeftPanel.vbn-create .filter {
    position: static;
    width: 100%;
    height: auto;
    top: auto;
    left: auto;
    border-radius: 0;
}
#rmLeftPanel.vbn-create .sel_box h3 {
    margin-left: 0;
}
#rmLeftPanel.vbn-create .sel_box:has(.scroll_container) h3 {
    align-self: flex-start;
    padding-top: 8px;
}
.vbn-load-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.vbn-load-btn {
    flex: 1;
    height: 36px;
    font-weight: 600;
    border-radius: 18px;
    border: 1px solid rgba(60, 110, 200, 0.3);
    background: var(--bg-surface);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
    pointer-events: none; /* 기능 추가 후 수정 필요 */
}
.vbn-load-btn:hover {
    background: var(--bg-elevated);
    border-color: rgba(70, 120, 210, 0.5);
}
#rmLeftPanel.vbn-create #routeTableContainer {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100%;
    padding: 0;
    transform: none !important;
    overflow-y: auto;
}
#rmLeftPanel.vbn-create #routeTableContainer.collapsed {
    transform: none !important;
}
#rmLeftPanel.vbn-create #routeTableContainer .toggleBtn {
    display: none;
}
#rmLeftPanel.vbn-create .tableContent.sc-route-table-wrap {
    height: auto;
    max-height: 100%;
    overflow-y: auto;
    background: var(--bg-base);
    border-radius: 6px;
}
#rmLeftPanel.vbn-create #routeTable {
    width: 100%;
}
#rmLeftPanel.vbn-create .route-buttons {
    margin-bottom: 8px;
}
#rmLeftPanel.vbn-create .route-buttons button {
    padding: 6px 12px;
    font-size: 12px;
}

/* 가상 버스 네트워크 정류장 팝업 (#scStationPopup 시나리오 팝업과 공유) */
#vbnStationPopup,
#scStationPopup {
    position: fixed;
    z-index: 9999;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    width: 480px;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    overflow: hidden;
}
#vbnStationPopup .vbn-popup-header,
#scStationPopup .vbn-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
}
#vbnStationPopup .vbn-popup-station-name,
#scStationPopup .vbn-popup-station-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#vbnStationPopup .vbn-popup-close,
#scStationPopup .vbn-popup-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
}
#vbnStationPopup .vbn-popup-close:hover,
#scStationPopup .vbn-popup-close:hover { color: var(--text-primary); }

#vbnStationPopup .vbn-popup-name-edit {
    display: none;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
}
#vbnStationPopup .vbn-popup-name-edit input {
    width: 100%;
    padding: 4px 8px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 12px;
    box-sizing: border-box;
}

#vbnStationPopup .vbn-popup-body,
#scStationPopup .vbn-popup-body {
    display: flex;
    height: 200px;
}
#vbnStationPopup .vbn-popup-chart-wrap,
#scStationPopup .vbn-popup-chart-wrap {
    flex: 3;
    padding: 8px 10px 8px 12px;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
#vbnStationPopup .vbn-popup-section-label,
#scStationPopup .vbn-popup-section-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#vbnStationPopup .vbn-popup-chart,
#scStationPopup .vbn-popup-chart {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}
#vbnStationPopup .vbn-popup-chart canvas,
#scStationPopup .vbn-popup-chart canvas {
    width: 100% !important;
    height: 100% !important;
}
#vbnStationPopup .vbn-popup-metrics,
#scStationPopup .vbn-popup-metrics {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    gap: 8px;
    min-width: 0;
}
#vbnStationPopup .vbn-popup-metric,
#scStationPopup .vbn-popup-metric {
    flex: 1;
    background: rgba(74, 139, 245, 0.08);
    border: 1px solid rgba(74, 139, 245, 0.25);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    overflow: hidden;
}
#vbnStationPopup .vbn-popup-metric-label,
#scStationPopup .vbn-popup-metric-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
#vbnStationPopup .vbn-popup-metric-val,
#scStationPopup .vbn-popup-metric-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#vbnStationPopup .vbn-popup-metric-val em,
#scStationPopup .vbn-popup-metric-val em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 2px;
}

#vbnStationPopup .vbn-popup-footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-card);
    gap: 8px;
}
#vbnStationPopup .vbn-popup-footer-left,
#vbnStationPopup .vbn-popup-footer-right {
    display: flex;
    gap: 6px;
}
#vbnStationPopup .vbn-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
}
#vbnStationPopup .vbn-btn-start,
#vbnStationPopup .vbn-btn-end {
    background: var(--bg-base);
    border-color: var(--border-subtle);
}
#vbnStationPopup .vbn-btn-start:hover,
#vbnStationPopup .vbn-btn-end:hover {
    background: rgba(74, 139, 245, 0.15);
    border-color: rgba(74, 139, 245, 0.4);
}
#vbnStationPopup .vbn-btn-save {
    background: #1a5cd6;
    color: #fff;
}
#vbnStationPopup .vbn-btn-save:hover { background: #1449a8; }
#vbnStationPopup .vbn-btn-delete {
    background: rgba(158, 158, 158, 0.8);
    color: #fff;
}
#vbnStationPopup .vbn-btn-delete:hover { background: #7a7a7a; }

/* === Map loading overlay === */
.map-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(0,0,0,0.5); /* 뒷배경(지도) 보이도록 투명 */
    pointer-events: all;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.map-loading-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}
.map-loading-overlay .map-loading-spinner {
    width: 66px;
    height: 66px;
    border: 5px solid var(--border-subtle);
    border-top-color: #4b8bf5;
    border-radius: 50%;
    animation: map-loading-spin 0.9s linear infinite;
}
.map-loading-overlay .map-loading-label {
    font-size: 18px;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85); /* 밝은 지도 위에서도 가독성 확보 */
}
@keyframes map-loading-spin {
    to { transform: rotate(360deg); }
}

/* 사이드 차트 비활성 탭 (정류장 클릭 전 등) */
.tab_chart .tabList li.disabled {
    opacity: 0.4;
    cursor: pointer;
}

/* === Session Warning Modal === */
.session-warn-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.session-warn-overlay.show {
    display: flex;
}
.session-warn-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 28px 28px 22px;
    width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.session-warn-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.session-warn-msg {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 22px;
}
.session-warn-msg .session-warn-countdown {
    color: #4b8bf5;
    font-weight: 700;
}
.session-warn-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.session-warn-btn {
    padding: 8px 18px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.session-warn-btn:hover {
    background: var(--bg-card-hover);
}
.session-warn-btn.primary {
    background: var(--accent-gradient);
    border-color: transparent;
    color: var(--text-on-accent);
}
.session-warn-btn.primary:hover {
    opacity: 0.92;
}

/* 사이드 차트 로딩 오버레이 (createSideChart fetch 진행 중 — 화면 전체) */
#sidechart-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.55);
    transition: opacity 0.18s ease;
}
#sidechart-loading-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#sidechart-loading-overlay .sidechart-loading-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.18);
    border-top-color: #4b8bf5;
    border-radius: 50%;
    animation: sidechartLoadingSpin 0.8s linear infinite;
}
#sidechart-loading-overlay .sidechart-loading-label {
    font-size: 18px;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}
@keyframes sidechartLoadingSpin { to { transform: rotate(360deg); } }

/* 04 데이터 기준일 — 선택할 수 없는 표시 전용 */
.sel_box.date_fixed .select_section { pointer-events: none; cursor: default; }
.sel_box.date_fixed .select_section img { display: none; }
