/* content/oper page */

/* ── 페이지 래퍼 ─────────────────────────────────────────── */
.co-page-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── 상단 툴바 ───────────────────────────────────────────── */
.co-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--al-color-surface);
    border: 1px solid var(--al-color-border);
    border-radius: var(--al-radius-sm);
    padding: 10px 14px;
}

.co-toolbar__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-toolbar__left .form__field {
    min-width: 160px;
}

.co-toolbar__right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── 상태 탭 버튼 ─────────────────────────────────────────── */
.co-tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    background: var(--al-color-bg);
    border: 1px solid var(--al-color-border);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
    white-space: nowrap;
}

.co-tab-btn:hover {
    background: var(--al-color-surface-soft);
    border-color: var(--al-color-border);
}

.co-tab-btn__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #cbd5e1;
}

.co-tab-btn__label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1;
}

.co-tab-btn__count {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: var(--al-color-text);
    min-width: 20px;
    text-align: right;
}

/* 설정 탭 점 색상 */
.co-tab-btn--set   .co-tab-btn__dot { background: var(--al-color-success-text); }
.co-tab-btn--unset .co-tab-btn__dot { background: var(--al-color-danger-text); }

/* 설정/미설정 카운트 색상 */
.co-tab-btn--set   .co-tab-btn__count { color: var(--al-color-success-text); }
.co-tab-btn--unset .co-tab-btn__count { color: var(--al-color-danger-text); }

/* 전체 탭 활성 */
.co-tab-btn--all.active {
    background: var(--al-color-primary);
    border-color: var(--al-color-primary);
}
.co-tab-btn--all.active .co-tab-btn__dot  { background: rgba(255,255,255,0.6); }
.co-tab-btn--all.active .co-tab-btn__label,
.co-tab-btn--all.active .co-tab-btn__count { color: #fff; }

/* 설정 탭 활성 */
.co-tab-btn--set.active {
    background: var(--al-color-success-text);
    border-color: var(--al-color-success-text);
}
.co-tab-btn--set.active .co-tab-btn__dot  { background: rgba(255,255,255,0.6); }
.co-tab-btn--set.active .co-tab-btn__label,
.co-tab-btn--set.active .co-tab-btn__count { color: #fff; }

/* 미설정 탭 활성 */
.co-tab-btn--unset.active {
    background: var(--al-color-danger-text);
    border-color: var(--al-color-danger-text);
}
.co-tab-btn--unset.active .co-tab-btn__dot  { background: rgba(255,255,255,0.6); }
.co-tab-btn--unset.active .co-tab-btn__label,
.co-tab-btn--unset.active .co-tab-btn__count { color: #fff; }

/* ── 3패널 레이아웃 ─────────────────────────────────────── */
.co-layout {
    --co-layout-height: max(500px, calc((110vh - 300px) * 0.9));
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 10px;
    height: var(--co-layout-height);
    flex-shrink: 0;
}

/* ── 공통 패널 ───────────────────────────────────────────── */
.co-panel {
    display: flex;
    flex-direction: column;
    background: var(--al-color-surface);
    border: 1px solid var(--al-color-border);
    border-radius: var(--al-radius-sm);
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.co-panel__title {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--al-color-text-subtle);
    border-bottom: 1px solid var(--al-color-border);
    background: var(--al-color-surface-soft);
    letter-spacing: -0.01em;
}

/* 패널 타이틀 아이콘 */
.co-panel__title-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.55;
}

.co-panel__title-icon--text {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E");
}

.co-panel__title-icon--device {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cline x1='12' y1='18' x2='12.01' y2='18'/%3E%3C/svg%3E");
}

.co-panel__body {
    flex: 1;
    overflow: hidden;
}

.co-panel__footer {
    flex-shrink: 0;
    padding: 7px 11px;
    border-top: 1px solid var(--al-color-border);
    background: var(--al-color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.co-panel__footer .al-pagination {
    gap: 8px;
}

.co-panel__footer .al-pagination__pages {
    gap: 8px;
}

.co-panel__footer .al-pagination__nav {
    height: 24px;
    font-size: 13px;
}

.co-panel__footer .al-pagination__nav--prev::before,
.co-panel__footer .al-pagination__nav--next::after {
    width: 16px;
    height: 16px;
}

.co-panel__footer .al-pagination__page {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 13px;
}

.co-panel__footer .al-pagination__ellipsis {
    height: 24px;
    font-size: 13px;
}

/* ── 우측 패널 — 분할 ────────────────────────────────────── */
.co-panel--split {
    overflow: hidden;
}

.co-panel__section--bottom {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.co-panel__section--bottom .co-panel__body {
    flex: 1;
    overflow: hidden;
}

/* ── 검색박스 ────────────────────────────────────────────── */
.co-shared-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--al-color-border);
    flex-shrink: 0;
    background: var(--al-color-bg);
}

.co-search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--al-color-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--al-color-surface);
    transition: border-color 0.15s;
}

.co-search-box:focus-within {
    border-color: var(--al-color-primary);
}

.co-search-box input {
    flex: 1;
    height: 32px;
    padding: 0 10px;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: var(--al-color-text);
}

.co-search-box input::placeholder {
    color: #94a3b8;
}

.co-search-box .form__icon-btn,
.co-search-box .form__icon-btn--search {
    position: static;
    transform: none;
    top: auto;
    right: auto;
    width: 34px;
    min-width: 34px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--al-color-border);
    flex-shrink: 0;
}

/* ── 좌측 — 텍스트 목록 ──────────────────────────────────── */
.co-text-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.co-text-list__empty {
    padding: 40px 14px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    list-style: none;
}

.co-text-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    height: calc((var(--co-layout-height, 500px) - 84px) / 10);
    min-height: 36px;
    border-bottom: 1px solid var(--al-color-border);
    cursor: pointer;
    transition: background 0.12s;
    gap: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.co-text-list__item:last-child { border-bottom: none; }

.co-text-list__item:hover {
    background: var(--al-color-bg);
}

.co-text-list__item.active {
    background: var(--al-color-secondary);
    border-left: 3px solid var(--al-color-primary);
    padding-left: 11px;
    padding-right: 14px;
}

.co-text-list__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--al-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.co-text-list__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.co-text-list__site {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    text-align: right;
}

.co-text-list__count {
    font-size: 12px;
    font-weight: 500;
    color: var(--al-color-primary);
    background: rgba(28, 140, 244, 0.08);
    padding: 1px 7px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── 가운데 — 지도 ───────────────────────────────────────── */
.co-map-wrap {
    position: relative;
    border-radius: var(--al-radius-sm);
    overflow: hidden;
    border: 1px solid var(--al-color-border);
    background: var(--al-color-bg);
    height: 100%;
    box-sizing: border-box;
}

.co-map-wrap .co-map {
    width: 100%;
    height: 100%;
}

.co-map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(249, 250, 252, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.co-map-overlay__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.co-map-overlay__icon {
    display: block;
    width: 52px;
    height: 52px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52' fill='none'%3E%3Ccircle cx='26' cy='26' r='26' fill='%23f0f4f8'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M26 13C21.029 13 17 17.03 17 22c0 7.25 9 17 9 17s9-9.75 9-17c0-4.97-4.03-9-9-9zm0 12a3 3 0 100-6 3 3 0 000 6z' fill='%2394A3B8'/%3E%3C/svg%3E") no-repeat center / contain;
}

.co-map-overlay__text {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    line-height: 1.7;
    margin: 0;
}

.co-map-tooltip {
    position: relative;
    background: var(--al-color-surface);
    color: var(--al-color-primary);
    border: 1px solid var(--al-color-tertiary-bg);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    line-height: 1.4;
}

.co-map-tooltip__arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 7px solid transparent;
    border-top-color: var(--al-color-tertiary-bg);
}

.co-map-tooltip__arrow::after {
    content: '';
    position: absolute;
    top: -9px;
    left: -6px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-color: var(--al-color-surface);
}

/* ── 우측 — 단말 목록 ────────────────────────────────────── */
.co-shared-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.co-shared-list__empty {
    padding: 30px 14px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    list-style: none;
}

.co-shared-list__item {
    padding: 0 14px;
    height: calc((var(--co-layout-height, 500px) - 133px) / 10);
    min-height: 36px;
    border-bottom: 1px solid var(--al-color-border);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.12s;
    box-sizing: border-box;
    flex-shrink: 0;
}

.co-shared-list__item:last-child { border-bottom: none; }

.co-shared-list__item:hover {
    background: var(--al-color-bg);
}

.co-shared-list__item.active {
    background: var(--al-color-secondary);
    border-left: 3px solid var(--al-color-primary);
    padding-left: 11px;
    padding-right: 14px;
}

.co-shared-list__num {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    width: 18px;
    text-align: right;
}

.co-shared-list__info {
    flex: 1;
    min-width: 0;
}

.co-shared-list__name {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0;
}

.co-shared-list__station {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--al-color-text);
    white-space: nowrap;
}

.co-shared-list__sep {
    flex-shrink: 0;
    color: #cbd5e1;
    white-space: nowrap;
    font-size: 13px;
    padding: 0 3px;
}

.co-shared-list__install {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}