/* twaircastServer 공통 보정 (Color Admin v6 위에) */

/* 로그인 */
.twa-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #2d353c; }
.twa-login-box { width: 380px; max-width: calc(100% - 32px); }

/* 페이지 머리 */
.twa-head { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; min-height: 38px; }
.twa-head .page-header { margin: 0; font-size: 1.375rem; }
.twa-head .page-header small { font-size: .875rem; margin-left: .5rem; color: var(--bs-secondary-color); font-weight: 400; }
.twa-head .actions { margin-left: auto; display: flex; gap: .5rem; }

/* 카드 */
.twa-card { border: 0; border-radius: .5rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 1rem; }
.twa-card > .card-header { background: none; font-weight: 600; padding: .75rem 1rem; border-bottom: 1px solid var(--bs-border-color); display: flex; align-items: center; gap: .5rem; }
.twa-card > .card-header .actions { margin-left: auto; display: flex; gap: .5rem; }
.twa-card > .card-body { padding: 1rem; }
.twa-card > .card-footer { background: none; padding: .75rem 1rem; display: flex; justify-content: flex-end; gap: .5rem; }

/* 검색바: 라벨 없이 한 줄 */
.twa-search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.twa-search .form-control, .twa-search .form-select { width: auto; min-width: 160px; }
.twa-search .grow { flex: 1 1 260px; }

/* 표 */
.twa-table { margin-bottom: 0; }
.twa-table thead th { background: var(--bs-tertiary-bg); font-weight: 600; white-space: nowrap; font-size: .8125rem; }
.twa-table td, .twa-table th { vertical-align: middle; }
.twa-table td.ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.twa-table .col-act { width: 1%; white-space: nowrap; text-align: right; }

/* 폼 */
.form-label { font-weight: 600; font-size: .8125rem; margin-bottom: .25rem; }
.pre-line { white-space: pre-line; }

/* 자동완성 */
.suggest-box { position: absolute; z-index: 1050; left: 0; right: 0; top: 100%; max-height: 320px; overflow-y: auto; }
.suggest-box .list-group-item { cursor: pointer; }
.suggest-box small { display: block; }

.app-header .brand .brand-logo { display: flex; align-items: center; gap: 8px; }
.twa-logo { height: 22px; width: auto; }
.twa-logo-sub { font-size: 13px; font-weight: 600; color: #6c757d; padding-left: 8px; border-left: 1px solid #dee2e6; white-space: nowrap; }

/* 화면 도움말 */
.twa-help { font-size: 12.5px; line-height: 1.65; color: var(--bs-secondary-color, #6c757d); }
ul.twa-help, ol.twa-help { padding-left: 1.1rem; }
.twa-help b { color: var(--bs-body-color, #212529); font-weight: 600; }


/* 상태 배지 (스펙 09 §4 NORMAL/WARNING/ERROR) */
.st-NORMAL { background: #00acac; color: #fff; }
.st-WARNING { background: #f59c1a; color: #fff; }
.st-ERROR { background: #ff5b57; color: #fff; }

/* 지역 관리 Tree (08 §13) */
.twa-tree-wrap { max-height: calc(100vh - 260px); min-height: 420px; overflow: auto; }
.twa-tree-wrap .jstree-anchor { font-size: .875rem; }
.twa-tree-wrap .node-count { color: var(--bs-secondary-color); font-size: .75rem; margin-left: .25rem; }
.jstree-default .jstree-search { color: #348fe2; font-style: normal; font-weight: 600; }
.twa-scope { font-size: .8125rem; color: var(--bs-secondary-color); }
.twa-scope b { color: var(--bs-body-color); }

/* 사이드바 준비 메뉴 */
.app-sidebar .menu-item.disabled .menu-link { opacity: .45; cursor: default; }
.app-sidebar .menu-badge-soon { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.15); margin-left: auto; }

/* 통계 카드 */
.twa-stat { border-radius: .5rem; padding: 1rem 1.25rem; color: #fff; height: 100%; }
.twa-stat .label { font-size: .8125rem; opacity: .85; }
.twa-stat .value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.twa-stat a { color: #fff; opacity: .85; font-size: .8125rem; text-decoration: none; }
.twa-stat a:hover { opacity: 1; }

/* 대시보드 (08 §3) */
.twa-dash-tree { max-height: 460px; overflow: auto; font-size: .8125rem; }
.twa-map { height: 520px; width: 100%; }

/* 방송 제어 대상 선택 (08 §5) */
.twa-target-box { max-height: 420px; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .25rem .5rem; font-size: .8125rem; }
.twa-target-box .form-check { margin-bottom: 0; }

/* 스케줄 예정표 (08 §11.4) */
.twa-week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: .5rem; overflow-x: auto; }
.twa-week .day { border: 1px solid var(--bs-border-color); border-radius: .375rem; min-height: 140px; font-size: .75rem; }
.twa-week .day .dh { padding: .35rem .5rem; border-bottom: 1px solid var(--bs-border-color); font-weight: 600; background: var(--bs-light-bg-subtle, rgba(0,0,0,.02)); }
.twa-week .day.today .dh { background: #348fe2; color: #fff; }
.twa-week .ev { margin: .35rem .4rem; padding: .25rem .4rem; border-left: 3px solid #348fe2; background: rgba(52,143,226,.08); border-radius: 2px; }
.twa-week .ev .t { font-weight: 600; }
.twa-week .ev.done { border-color: #00acac; } .twa-week .ev.fail { border-color: #ff5b57; }
.twa-pick { max-height: 260px; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .25rem .5rem; font-size: .8125rem; }
