/* ===== 성과관리 포털 공통 스타일 ===== */
:root {
  --navy: #0b1d44;
  --navy-2: #13295a;
  --blue: #0f5bd8;
  --blue-dark: #0a47ad;
  --accent: #2ecc9a;
  --bg: #eef1f5;
  --surface: #ffffff;
  --mega-bg: #f4f6f9;
  --line: #dfe3ea;
  --text: #1c2433;
  --muted: #6b7486;
  --danger: #d6453d;
  --ok: #1f9d6b;

  --side-w: 210px;   /* 메가메뉴 좌측 파란 영역 = 로고 영역 폭 */
  --col-w: 180px;    /* GNB 한 칸 = 메가메뉴 한 열 (.site-header 에서 화면 폭에 맞게 재계산) */
  --user-w: 230px;   /* 우측 사용자 영역 */
  --bar-h: 56px;     /* 상단 흰 바 */
  --gnb-h: 48px;     /* 남색 GNB 바 */
  --top-h: calc(var(--bar-h) + var(--gnb-h));
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #eef1f6; padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.container { max-width: 1880px; margin: 0 auto; padding: 0 16px; }   /* 1920x1080 모니터 기준으로 꽉 차게 */

/* ---------- 상단 (흰 바: 로고·검색·잔여시간·사용자 / 남색 바: GNB) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  /* GNB 한 칸 = 메가메뉴 한 열. 메뉴 개수(--cols)로 나눠 한 화면에 들어오게, 120~320px 사이
     (정보공시 항목 이름이 "제목-공시시기" 로 길어서 넓게) */
  --col-w: clamp(120px, calc((100vw - var(--side-w) * 2) / var(--cols, 8)), 320px);
}
.topbar {
  display: flex; align-items: center; gap: 24px; height: var(--bar-h);
  padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.logo {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 17px; color: var(--navy); white-space: nowrap;
}
.logo-mark {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 800;
}
.search-box { position: relative; flex: 0 1 580px; margin: 0 auto; }
.search-box input {
  width: 100%; height: 34px; padding: 0 40px 0 16px; border: 1px solid #5d6575; border-radius: 17px;
  font: inherit; font-size: 13px; color: var(--text); background: #fff;
}
.search-box input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.search-ico { position: absolute; right: 13px; top: 8px; width: 18px; height: 18px; color: #2a3140; cursor: pointer; }
.search-result {
  position: absolute; left: 0; right: 0; top: 40px; z-index: 120; margin: 0; padding: 6px 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 24px rgba(12, 24, 52, .18);
  max-height: 380px; overflow-y: auto;
}
.search-result li { display: flex; align-items: baseline; gap: 10px; padding: 7px 16px; cursor: pointer; }
.search-result li span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result li.sel { background: #e8f0fe; }
.search-result li.none { color: var(--muted); cursor: default; }
.user-box {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; font-size: 13px; color: #4a5366;
}
.user-box b { color: var(--text); }
.remain { border: 0; background: none; padding: 4px 6px; border-radius: 4px; font: inherit; color: #4a5366; cursor: pointer; }
.remain b { font-variant-numeric: tabular-nums; }
.remain:hover { background: #eef1f6; }
.remain.warn, .remain.warn b { color: var(--danger); }
.user-name { display: inline-flex; align-items: center; gap: 4px; }
.user-name svg { width: 16px; height: 16px; color: #2a3140; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; color: #2a3140; }
.icon-btn:hover { background: #eef1f6; }
.icon-btn svg { width: 19px; height: 19px; }

.gnb-bar { height: var(--gnb-h); background: var(--navy); color: #fff; padding-left: var(--side-w); overflow-x: auto; scrollbar-width: none; }
.gnb-bar::-webkit-scrollbar { display: none; }
.gnb { height: 100%; }
.gnb ul { display: flex; margin: 0; padding: 0; list-style: none; height: 100%; }
.gnb-item { width: var(--col-w); flex: 0 0 var(--col-w); }
.gnb-item > a {
  position: relative; display: flex; align-items: center; justify-content: center; height: 100%;
  font-size: clamp(14px, 1vw, 17px); font-weight: 700; letter-spacing: -0.2px; white-space: nowrap;
}
.gnb-item > a::after {
  content: ""; position: absolute; left: 28px; right: 28px; bottom: 4px; height: 3px;
  background: var(--accent); transform: scaleX(0); transition: transform .15s;
}
.gnb-item.hover > a::after, .gnb-item.active > a::after { transform: scaleX(1); }
.btn-logout { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }

/* ---------- 메가메뉴 ---------- */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--mega-bg); box-shadow: 0 10px 24px rgba(12, 24, 52, .18);
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility 0s .15s;
  overflow-x: auto;
}
.site-header.open .mega { visibility: visible; opacity: 1; transform: none; transition: opacity .15s, transform .15s; }
.mega-inner { display: flex; min-height: 300px; max-height: min(570px, calc(100vh - var(--top-h) - 20px)); }
.mega-side {
  flex: 0 0 var(--side-w); background: var(--blue); color: #fff; padding: 40px 0 0 46px;
}
.mega-side { position: relative; }
.mega-pin {
  position: absolute; left: 46px; bottom: 22px; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px 0 9px; border: 1px solid rgba(255,255,255,.45); border-radius: 15px;
  background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 12px; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.mega-pin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transform: rotate(35deg); transition: transform .15s; }
.mega-pin:hover { background: rgba(255,255,255,.18); border-color: #fff; }
.mega-pin:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mega-pin[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--blue); font-weight: 700; }
.mega-pin[aria-pressed="true"] svg { fill: currentColor; transform: none; }
/* 고정: 메가메뉴가 화면 흐름 안에 들어와 아래 작업 영역을 밀어 낸다 (덮지 않음) */
.site-header.pinned .mega { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: 0 2px 0 #c9ced6; }
.site-header.pinned + .mega-dim { visibility: hidden; opacity: 0; }
.site-header.pinned .mega-inner { min-height: 220px; max-height: 42vh; }
.site-header.pinned .mega-col { overflow-y: auto; }
.mega-side h2 {
  margin: 0; padding-top: 16px; border-top: 2px solid rgba(255,255,255,.85); width: 80px;
  font-size: 22px; font-weight: 600; white-space: nowrap;
}
.mega-cols { display: flex; }
.mega-col {
  width: var(--col-w); flex: 0 0 var(--col-w); padding: 10px 0 16px;
  border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin;
}
.mega-col.hover { background: #e9edf3; }
.mega-col ul { list-style: none; margin: 0; padding: 0; }
.lv2 .row { display: flex; align-items: center; }
.lv2 .row > a {
  flex: 1; padding: 5px 0 5px 8px; font-size: 14px; color: #2a3140;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lv2 .row > a:hover, .lv3 a:hover { color: var(--blue); text-decoration: underline; }
.lv2.current > .row > a, .lv3 .current > a { color: var(--blue); font-weight: 700; }
.tog {
  flex: 0 0 28px; height: 26px; margin-right: 6px; border: 0; background: none; color: #9aa3b2; cursor: pointer;
  display: grid; place-items: center; border-radius: 4px;
}
.tog:hover { background: #dde3ec; color: var(--text); }
.tog svg { width: 12px; height: 12px; transition: transform .15s; }
.lv2.open > .row .tog svg { transform: rotate(180deg); }
.lv3 { display: none; margin: 0 10px 4px 8px !important; padding: 4px 0 !important; border-left: 2px solid #cfd6e2 !important; }
.lv2.open > .lv3 { display: block; }
.lv3 a { display: block; padding: 3px 0 3px 12px; font-size: 13px; color: #4a5366; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 긴 이름은 한 줄 + … (전체 이름은 마우스를 올리면) */
/* 4레벨: 3레벨 항목 아래 한 번 더 펼침 */
.lv3g > .row { display: flex; align-items: center; }
.lv3g > .row > a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv3g > .row .tog { flex-basis: 24px; height: 22px; margin-right: 2px; }
.lv3g.open > .row .tog svg { transform: rotate(180deg); }
.lv4 { display: none; list-style: none; margin: 0 4px 4px 14px; padding: 2px 0; border-left: 2px dotted #cfd6e2; }
.lv3g.open > .lv4 { display: block; }
.lv4 a { padding: 2px 0 2px 10px; font-size: 12px; color: #5b6475; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv4 .current > a { color: var(--blue); font-weight: 700; }
.mega-dim {
  position: fixed; inset: 0; z-index: 90; background: rgba(10, 20, 40, .15);
  visibility: hidden; opacity: 0; transition: opacity .15s;
}
.site-header.open + .mega-dim { visibility: visible; opacity: 1; }

/* ---------- 버튼 / 알림 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: #f4f6fa; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-danger { background: #fff; border-color: #f0c4c1; color: var(--danger); }
.btn-danger:hover { background: #fdf1f0; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.alert { padding: 10px 14px; border-radius: 6px; margin: 0 0 16px; font-size: 13px; }
.alert-error { background: #fdecea; color: #a8322b; border: 1px solid #f5c6c2; }
.alert-ok { background: #e7f6ef; color: #16724e; border: 1px solid #bfe6d4; }

/* ---------- 로그인 ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy) 0%, #173a86 100%); padding: 16px; }
.login-wrap {
  display: grid; grid-template-columns: 1.1fr 1fr; width: min(880px, 100%);
  background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.login-visual { background: var(--blue); color: #fff; padding: 48px 40px; }
.login-visual .logo { padding: 0; margin-bottom: 64px; }
.login-visual .logo-mark { background: #fff; color: var(--blue); }
.login-visual h1 { font-size: 30px; line-height: 1.3; margin: 0 0 16px; }
.login-visual p { color: #d6e3ff; margin: 0; }
.login-card { padding: 48px 40px; }
.login-card h2 { margin: 0 0 4px; font-size: 22px; }
.login-card .muted { margin: 0 0 24px; }
.login-card label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.login-card input {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit;
}
.login-card input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.login-card .btn { margin-top: 24px; height: 46px; font-size: 15px; }
@media (max-width: 720px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { padding: 28px 24px; }
  .login-visual .logo { margin-bottom: 24px; }
  .login-visual h1 { font-size: 22px; }
  .login-card { padding: 28px 24px; }
}

/* ---------- 메인 ---------- */
.main-page { padding-top: 24px; padding-bottom: 40px; }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.hero {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: 10px; padding: 28px 32px; margin-bottom: 28px;
}
.hero-eyebrow { margin: 0 0 4px; color: var(--blue); font-weight: 700; font-size: 13px; }
.hero h1 { margin: 0 0 6px; font-size: 22px; }
.hero p { margin: 0; }
.section-title { font-size: 16px; margin: 0 0 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.quick-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; min-height: 96px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s;
}
.quick-card:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(15, 91, 216, .12); }
.quick-name { font-size: 16px; font-weight: 700; }
.quick-sub { font-size: 12px; color: var(--muted); }
.side-panels { display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head .panel-title { margin: 0; }
.panel-title { font-size: 16px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.panel-head .panel-title { border: 0; padding: 0; }
.panel-title small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.rank-list, .hist-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.rank-list a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list a:hover { color: var(--blue); }
.rank {
  flex: 0 0 20px; height: 20px; display: grid; place-items: center; border-radius: 50%;
  background: #8b93a3; color: #fff; font-size: 11px; font-weight: 700;
}
.rank-list li:first-child .rank { background: var(--blue); }
.date { font-size: 12px; color: var(--muted); }
.hist-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; }
.hist-list li .muted { flex: 1; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.badge.ok { background: #e3f5ec; color: var(--ok); }
.badge.ng { background: #fdecea; color: var(--danger); }
.badge.auto { background: #eef1f6; color: var(--muted); }   /* 자동으로 정해진 값 (예: AI 설정의 기본 모델 미지정) */
.empty { color: var(--muted); margin: 8px 0; }

/* ---------- 서브 레이아웃 ---------- */
.sub-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 40px; }
.lnb { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; align-self: start; }
.lnb-title { margin: 0; padding: 22px 20px; background: var(--blue); color: #fff; font-size: 18px; }
.lnb ul { list-style: none; margin: 0; padding: 0; }
.lnb > ul > li > a { display: block; padding: 11px 20px; border-bottom: 1px solid #eef0f4; font-weight: 500; }
.lnb > ul > li.on > a { color: var(--blue); font-weight: 700; }
.lnb li ul { background: #f6f8fb; padding: 6px 0; border-bottom: 1px solid #eef0f4; }
.lnb li ul a { display: block; padding: 5px 20px 5px 30px; font-size: 13px; color: var(--muted); }
.lnb li ul li.on a { color: var(--blue); font-weight: 600; }
.lnb a:hover { color: var(--blue); }
.content { min-width: 0; }
.sub-layout > .content:first-child { grid-column: 1 / -1; }   /* 좌측 메뉴가 없는 화면은 전체 폭 */
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb .sep { margin: 0 6px; }
.page-title { margin: 0 0 20px; font-size: 24px; }
.placeholder {
  background: var(--surface); border: 1px dashed #c7cfdc; border-radius: 10px; padding: 48px 32px; text-align: center;
}
.placeholder-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.meta-list { display: inline-grid; grid-template-columns: auto auto; gap: 4px 12px; margin: 20px 0 0; text-align: left; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; }

/* ---------- 관리 화면 ---------- */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.table-wrap { max-height: 640px; overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { position: sticky; top: 0; background: #f4f6f9; text-align: left; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid #eef0f4; white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:hover td { background: #f8fafc; }
.tbl tr.sel td { background: #e8f0fe; }
.tbl tr.off td { color: #a0a7b4; }
/* 제목 클릭 정렬 (ListSort) */
.tbl th.sort a { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.tbl th.sort a:hover { color: var(--blue); }
.tbl th.sort i { width: 8px; font-style: normal; font-size: 9px; color: #b4bac6; }
.tbl th.sort a:hover i::after { content: "▲"; }
.tbl th.sort.on { color: var(--blue); }
.tbl th.sort.on i { color: inherit; }
.tbl th.sort.asc i::after, .tbl th.sort.asc a:hover i::after { content: "▲"; }
.tbl th.sort.desc i::after, .tbl th.sort.desc a:hover i::after { content: "▼"; }
.tbl td.lvl1 { font-weight: 700; }
.tbl td.lvl2 { padding-left: 26px; }
.tbl td.lvl3 { padding-left: 44px; color: var(--muted); }
.tbl td.lvl4 { padding-left: 62px; color: var(--muted); font-size: 12px; }
/* 메뉴관리 목록: 폴더 아이콘으로 접기/펼치기 (assets/operation/js/menu.js) */
.mt-tools { display: flex; gap: 6px; }
.form-msg { margin: 12px 0 0; }
/* 공통코드관리: 왼쪽 그룹코드, 오른쪽 상세코드 (각각 목록 + 입력) */
.code-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.code-list { max-height: 340px; }
.stack { display: grid; gap: 20px; align-content: start; }   /* 한 칸에 패널 여러 개를 세로로 */
.sub-title { margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .code-grid { grid-template-columns: 1fr; } }
/* 테이블정보: 왼쪽 목록, 오른쪽 컬럼·인덱스·CREATE 문 */
.tbl-info-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.tbl-search { flex-wrap: wrap; align-items: center; }
.tbl-search input[name="q"] { flex: 1; min-width: 140px; }
.tbl-search .col-search { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; white-space: nowrap; cursor: pointer; }
.tbl-search .col-search input { flex: none; width: 14px; height: 14px; min-width: 0; margin: 0; padding: 0; }   /* .search-row input(높이 32px·늘어남)을 체크박스에서는 끈다 */
.tbl-by { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 10px; background: #f6f8fb; border-radius: 6px; }
.tbl-by-title { font-size: 12px; font-weight: 700; color: var(--muted); }
.tbl-info-list { max-height: calc(100vh - 230px); }
.tbl-info-list td.url { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.tbl-info-list .chk { width: 28px; padding-right: 0; }
.tbl-info-list .chk input { margin: 0; vertical-align: middle; cursor: pointer; }
.tbl-kind { display: inline-block; width: 16px; margin-right: 6px; border-radius: 3px; text-align: center; font-size: 10px; font-weight: 700; line-height: 16px; color: #fff; vertical-align: 1px; }
.tbl-kind.t { background: #5b7fd6; }
.tbl-kind.v { background: #2ea38a; }
.tbl-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 4px; font-size: 13px; }
.tbl-meta dt { color: var(--muted); }
.tbl-meta dd { margin: 0 0 0 -12px; font-weight: 600; }
.ddl-box { margin-top: 16px; }
.ddl-box summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.ddl-box pre { max-height: 360px; overflow: auto; margin: 8px 0 0; padding: 12px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 6px; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 1100px) { .tbl-info-grid { grid-template-columns: 1fr; } }
.menu-tree td { padding-top: 3px; padding-bottom: 3px; line-height: 1.8; }
.menu-tree td code { padding: 0 5px; }
.menu-tree td[class^="lvl"] { white-space: nowrap; }
.menu-tree td.lvl1 { padding-left: 6px; }
.menu-tree td.lvl2 { padding-left: 22px; }
.menu-tree td.lvl3 { padding-left: 38px; }
.menu-tree td.lvl4 { padding-left: 54px; }
.mt-tog, .mt-leaf { display: inline-flex; align-items: center; justify-content: flex-end; width: 34px; height: 20px; margin-right: 3px; vertical-align: middle; }
.mt-leaf { padding-right: 2px; }
.mt-tog { gap: 3px; padding: 0 2px 0 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
.mt-tog::before {   /* ▾ 펼침 / ▸ 접힘 */
  content: ""; width: 6px; height: 6px; border: solid #7d8798; border-width: 0 1.6px 1.6px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .12s;
}
.collapsed .mt-tog::before { transform: rotate(-45deg); }
.mt-tog:hover { background: #e6ebf3; }
.mt-tog svg { width: 18px; height: 18px; fill: #f2b544; stroke: #d9962a; stroke-width: .8; }
.mt-tog .f-open { display: inline; }
.mt-tog .f-closed { display: none; }
.collapsed .mt-tog .f-open { display: none; }
.collapsed .mt-tog .f-closed { display: inline; }
.mt-leaf svg { width: 15px; height: 15px; color: #a3abb8; }
.tbl tr.dev .mt-tog svg { opacity: .5; }
.tbl td a:hover { color: var(--blue); text-decoration: underline; }
.tbl .url { max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.link-sm { font-size: 12px; color: var(--blue); }
.form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
.form input:not([type=checkbox]):not([type=radio]), .form select {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff;
}
.form input[readonly] { background: #f4f6f9; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 16px 0 0; padding: 8px 12px 12px; }
.form legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.form label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 6px 16px 0 0; }
.form-actions { display: flex; gap: 8px; margin-top: 20px; }

.site-footer { padding: 20px 0 28px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .main-grid, .admin-grid { grid-template-columns: 1fr; }
  .sub-layout { grid-template-columns: 1fr; }
  .lnb { display: none; }
}
@media (max-width: 720px) {
  .user-box .user-name, .remain { display: none; }
  .logo span:last-child { display: none; }
  .mega-side { display: none; }
  .hero { padding: 20px; }
}

/* ---------- AI 분석보고서 ---------- */
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ai-head .page-title { margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-sub { margin: 0 0 18px; font-size: 13px; }
.ai-badge { font-size: 12px; font-weight: 700; color: var(--blue); background: #e8f0fe; padding: 3px 9px; border-radius: 10px; }
.ai-actions, .ai-admin, .ai-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-empty-actions { justify-content: center; margin-top: 18px; }
.inline { display: inline; margin: 0; }
.btn.busy { opacity: .6; pointer-events: none; }


/* 탭이 넘치면 가로로만 밀리고 스크롤바는 그리지 않는다. 밑줄은 음수 여백 대신 안쪽 그림자로 그려 세로로 넘치지 않게 한다 */
.ai-tabs {
  display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden;
  border-bottom: 2px solid var(--line); scrollbar-width: none;
}
.ai-tabs::-webkit-scrollbar { display: none; }
.ai-tab {
  flex: 0 0 auto; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted);
  padding: 10px 16px; cursor: pointer; white-space: nowrap;
}
.ai-tab:hover { color: var(--text); }
.ai-tab.on { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
.ai-frame-wrap { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.ai-frame { display: block; width: 100%; height: 600px; border: 0; border-radius: 0 0 10px 10px; }
/* 자료 보고서: 영역을 왼쪽 메뉴로 (report.jsp 의 DataReport) */
.ai-side-layout { display: flex; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ai-side { flex: 0 0 210px; align-self: stretch; display: flex; flex-direction: column; background: #1d3263; color: #fff; }
.ai-side-head { display: flex; flex-direction: column; gap: 3px; padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.ai-side-head strong { font-size: 16px; }
.ai-side-head span { font-size: 12px; color: #c9d4ec; }
.ai-side-head .ai-side-meta { font-size: 11px; color: #9fb0d4; }
.ai-side-badge { align-self: flex-start; font-size: 11px !important; font-weight: 800; color: #fff !important; background: #22b089; border-radius: 4px; padding: 2px 7px; margin-bottom: 6px; }
.ai-side nav { display: flex; flex-direction: column; padding: 6px 0 14px; }
.ai-side-group { margin: 14px 16px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #8fa3cf; }
.ai-side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; border: 0; border-left: 3px solid transparent;
  background: transparent; color: #dfe6f5; font: inherit; font-size: 14px; text-align: left; cursor: pointer; box-shadow: none; }
.ai-side-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.ai-side-item.on { background: rgba(255,255,255,.13); border-left-color: #22b089; color: #fff; font-weight: 700; box-shadow: none; }
.ai-side-item:focus-visible { outline: 2px solid #8fd8c2; outline-offset: -2px; }
.ai-side-dot { width: 7px; height: 7px; border-radius: 50%; background: #6f86bd; flex: none; }
.ai-side-item.on .ai-side-dot { background: #22b089; }
.ai-side-label { flex: 1; }
.ai-side-tag { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.16); color: #fff; }
.ai-side-item.on .ai-side-tag { background: #22b089; }
.ai-side-foot { margin-top: auto; padding: 12px 16px; font-size: 11px; line-height: 1.6; color: #9fb0d4; border-top: 1px solid rgba(255,255,255,.12); }
.ai-side-frame { flex: 1; min-width: 0; border: 0; border-radius: 0; }
.ai-side-frame .ai-frame { border-radius: 0; }
@media (max-width: 900px) {
  .ai-side-layout { flex-direction: column; }
  .ai-side { flex: none; width: 100%; }
  .ai-side nav { flex-direction: row; flex-wrap: wrap; padding: 6px; }
  .ai-side-group, .ai-side-foot { display: none; }
  .ai-side-item { width: auto; border-left: 0; border-bottom: 3px solid transparent; padding: 8px 12px; }
  .ai-side-item.on { border-bottom-color: #22b089; }
}

.ai-job { margin-bottom: 16px; border-left: 4px solid var(--blue); }
.ai-job .panel-title { display: flex; align-items: center; gap: 8px; }
.ai-job .panel-title small { margin-left: auto; }
.ai-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c9d6ef; border-top-color: var(--blue); display: none; }
.ai-job.running .ai-spin { display: inline-block; animation: ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-job.running .ai-spin { animation: none; } }
.ai-log { margin: 0; padding-left: 20px; font-size: 13px; max-height: 260px; overflow: auto; }
.ai-log li { padding: 2px 0; white-space: pre-wrap; word-break: break-all; }
.ai-log li.err { color: var(--danger); font-weight: 600; }
.ai-job-note { font-size: 12px; margin: 10px 0 0; }

.ai-dialog { border: 0; border-radius: 12px; padding: 24px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.ai-dialog::backdrop { background: rgba(11, 29, 68, .45); }
.ai-dialog h2 { margin: 0 0 6px; font-size: 19px; }
.ai-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; resize: vertical; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; display: flex; align-items: baseline; gap: 10px; min-width: 0; }   /* 제목 · 값 · 설명을 한 줄로 */
.stat-label { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.stat-value { flex: none; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-value.ng { color: var(--danger); }
.ai-check { margin-bottom: 14px; }
.ai-check .panel-title small { font-weight: 400; }
.ai-pre { background: #f6f8fb; border: 1px solid #e6eaf0; border-radius: 6px; padding: 10px 12px; font-size: 12px; line-height: 1.55; overflow-x: auto; white-space: pre; margin: 8px 0; }
.ai-pre.small { font-size: 11px; white-space: pre-wrap; word-break: break-all; }
.ai-check details summary { cursor: pointer; font-size: 13px; color: var(--blue); }

/* ---------- AI 보고서 생성 페이지 ---------- */
.ai-badge.admin { color: #9a3412; background: #ffedd5; }
.ai-select { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font: inherit; }
.alert-info { background: #e8f0fe; color: #1e40af; border: 1px solid #c7d7fb; }
.alert-info a { font-weight: 600; text-decoration: underline; margin-left: 6px; }
.stat-note { min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-value.sm { font-size: 16px; }
.stat-value.run { color: var(--blue); }
/* 화면 안 탭 (예: 보고서 생성 / 이력): <div class="page-tabs"><button data-tab="a" class="on">…</button></div> + <div class="page-tab" data-tab="a"> */
.page-tabs { display: flex; gap: 2px; border-bottom: 1px solid #c9d3e3; margin-bottom: 16px; }
.page-tabs button { min-width: 96px; height: 36px; padding: 0 18px; border: 1px solid #c9d3e3; border-bottom: 0; border-radius: 6px 6px 0 0;
  background: #eef1f6; color: #3a4252; font: inherit; font-size: 14px; cursor: pointer; }
.page-tabs button.on { background: #3f78c9; border-color: #3f78c9; color: #fff; font-weight: 600; }
.page-tabs button small { margin-left: 4px; font-size: 12px; opacity: .8; }
.page-tab > .panel + .panel { margin-top: 16px; }
.gen-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.gen-grid .panel > .panel-title { margin-bottom: 4px; }
.model-row { display: flex; align-items: center; gap: 16px; }   /* AI 공급자/모델 선택 + 코드 실행 도구 체크 한 줄 */
.model-row select { flex: 1; min-width: 0; }
.form .model-row label.check { flex: none; margin: 0; white-space: nowrap; }
.form .hint, .hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.form textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; resize: vertical; }
.form .form-actions { align-items: center; }
fieldset.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; padding: 0; margin: 12px 0 0; }
fieldset.mode legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.mode-opt { display: flex !important; gap: 10px; align-items: flex-start; margin: 0 !important; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400 !important; }
.mode-opt:has(input:checked) { border-color: var(--blue); background: #f3f7ff; }
.mode-opt.off { opacity: .5; cursor: not-allowed; }
.mode-opt input { margin-top: 3px; }
.mode-opt span { display: flex; flex-direction: column; gap: 2px; }
.mode-opt small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 8px 0 12px; font-size: 13px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; word-break: break-all; }
.ai-job-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; font-size: 12px; }
.row-actions { display: flex; gap: 12px; align-items: center; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--danger); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.badge.run { background: #e8f0fe; color: var(--blue); }
@media (max-width: 1100px) { .gen-grid, fieldset.mode { grid-template-columns: 1fr; } }
.link-btn.apply { color: var(--blue); font-weight: 600; }
.tbl tr.sel td { background: #eef4ff; }

/* ---------- 외부 주소 메뉴 (Spotfire 등 iframe) ---------- */
.ext-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ext-head .page-title { margin: 0; }
.ext-actions { display: flex; align-items: center; gap: 12px; }
.ext-note { font-size: 12px; }
.ext-frame-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
/* 대시보드는 한 화면에 맞춰 그려지므로 창 높이에 맞춘다 (상단 GNB·제목 줄 제외) */
.ext-frame { display: block; width: 100%; height: calc(100vh - 200px); min-height: 480px; border: 0; }
/* 창 전체를 대시보드에 쓴다 - 바닥글을 숨기고 아래 여백을 줄여 페이지 세로 스크롤이 생기지 않게 (높이는 ext.jsp 스크립트가 맞춤) */
body:has(.ext-page) .site-footer { display: none; }
.sub-layout:has(.ext-page) { padding-bottom: 12px; }

/* ---------- 프레임 (/main): 탭 · 위치 · 왼쪽 메뉴 ---------- */
.shell-body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.shell-body .site-footer { display: none; }
.shell { flex: 1; min-height: 0; display: flex; }
.work { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.tabbar { flex: 0 0 40px; display: flex; background: #dcdfe4; border-bottom: 1px solid #c9ced6; }
.tabbar button { border: 0; cursor: pointer; display: grid; place-items: center; }
.tabbar svg { width: 18px; height: 18px; }
.tab-home { flex: 0 0 46px; background: var(--navy); color: #fff; }
.tab-home:hover { background: #16306a; }
.tabs { flex: 1; min-width: 0; display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.tab {
  position: relative; flex: 0 0 auto; display: flex; align-items: center; max-width: 220px;
  padding: 0 26px 0 18px; background: #e6e8ec; border-right: 1px solid #c9ced6;
  font-size: 14px; color: #3a4252; cursor: pointer; user-select: none;
}
.tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab:hover { background: #f1f2f5; }
.tab.on { background: #1d3263; color: #fff; font-weight: 600; }
.tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.tabbar .tab-x {
  position: absolute; top: 1px; right: 2px; width: 18px; height: 18px;
  background: none; font-size: 15px; line-height: 1; color: #9aa1ad; border-radius: 3px;
}
.tabbar .tab-x:hover { color: var(--danger); background: rgba(0,0,0,.06); }
.tab.on .tab-x { color: #fff; }
/* 탭이 화면 폭을 넘으면 옆으로 밀지 않고 다음 줄로 (탭 높이 40px 고정, 줄마다 위 경계선) */
.tabbar { flex: 0 0 auto; min-height: 40px; }
.tabbar .tabs { flex-wrap: wrap; overflow-x: visible; align-content: flex-start; }
.tabbar .tab { height: 40px; box-sizing: border-box; border-bottom: 1px solid #c9ced6; margin-bottom: -1px; }
.tab-tools { display: flex; }
.tab-tools button { width: 46px; background: #c4cad3; color: #24324d; border-left: 1px solid #b3b9c3; }
.tab-tools button:hover { background: #b3bac5; }
.tab-tools button:last-child { background: #d3d7dd; }
.tab-tools button:last-child:hover { background: #c1c6ce; }

.locbar { flex: 0 0 38px; display: flex; align-items: center; background: #f3f4f6; border-bottom: 1px solid var(--line); }
.hamburger { flex: 0 0 46px; align-self: stretch; border: 0; background: #22b089; color: #fff; cursor: pointer; display: grid; place-items: center; }
.hamburger:hover, .side-open .hamburger { background: #1a9675; }
.hamburger svg { width: 20px; height: 20px; }
.loc { padding: 0 18px; font-size: 13px; color: #4a5366; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc .sep { margin: 0 8px; color: #9aa1ad; }
.loc .cur { color: var(--text); font-weight: 600; }

.panes { flex: 1; min-height: 0; position: relative; }
.pane { position: absolute; inset: 0; display: none; width: 100%; height: 100%; border: 0; }
.pane.on { display: block; }
.pane-home { overflow: auto; }
.pane-frame { background: var(--bg); }

.side-menu {
  flex: 0 0 auto; width: 0; overflow: hidden auto; background: #fff; border-right: 1px solid #c9ced6;
  transition: width .18s ease;
}
.side-open .side-menu { width: 270px; }
.side-title {
  margin: 0; height: 40px; display: grid; place-items: center; width: 270px;
  background: var(--blue); color: #fff; font-size: 16px; font-weight: 700;
}
.side-list { list-style: none; margin: 0; padding: 0; width: 270px; }
.side-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 0 16px; height: 42px; border: 0; border-bottom: 1px solid #3c4b66;
  background: #2b3850; color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer;
}
button.side-head::after {
  content: ""; width: 7px; height: 7px; border: solid #dfe5ef; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.side-group.open > button.side-head::after { transform: translateY(2px) rotate(-135deg); }
.side-head:hover, .side-group.cur > .side-head { background: #33435f; }
.side-group > ul { display: none; list-style: none; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.side-group.open > ul { display: block; }
.side-group li a { display: block; padding: 6px 16px 6px 18px; font-size: 14px; color: #2a3140; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-group li a:hover { color: var(--blue); background: #f2f5fa; }
.side-group li.cur a { color: var(--blue); font-weight: 700; background: #eaf1fd; }
.side-sub-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 6px 14px 6px 18px;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: #2a3140; text-align: left; cursor: pointer;
}
.side-sub-head::after { content: "+"; font-weight: 400; color: #8a93a3; }
.side-sub.open > .side-sub-head::after { content: "−"; }
.side-sub-head:hover { color: var(--blue); background: #f2f5fa; }
.side-sub > ul { display: none; list-style: none; margin: 0 0 4px 22px; padding: 0; border-left: 2px solid #e3e8f0; }
.side-sub.open > ul { display: block; }
.side-group .side-sub li a { padding: 4px 12px; font-size: 13px; color: #4a5366; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 개발중 메뉴 (메뉴관리 사용여부 = 개발중, 자신 또는 상위 메뉴): 연한 회색. 클릭은 그대로 된다 ---------- */
.gnb-item > a.dev, .side-head.dev { color: rgba(255, 255, 255, .45); }
.mega a.dev, .lnb a.dev, .side-group li a.dev, .side-sub-head.dev,
.search-result li.dev b, .quick-card.dev .quick-name { color: #b3b9c4 !important; }
.tbl tr.dev td, .tbl tr.dev td a { color: #b3b9c4; }

/* ---------- 탭(iframe) 안에서 열린 화면: 머리말·좌측메뉴·위치표시는 프레임이 그린다 ---------- */
.in-frame .site-header, .in-frame .mega-dim, .in-frame .lnb, .in-frame .breadcrumb, .in-frame .site-footer { display: none !important; }
.in-frame .container { max-width: none; }
.in-frame .sub-layout { grid-template-columns: minmax(0, 1fr); padding-top: 8px; }   /* 화면 제목을 숨기므로 위 여백은 조금만 */
.in-frame .sub-layout > .content { grid-column: 1 / -1; }
/* 탭 안에서는 위쪽 위치표시(메뉴 경로)에 메뉴명이 보이므로 화면 제목을 숨긴다 (AI 보고서처럼 다른 요소와 묶인 제목은 그대로) */
.in-frame .content > .page-title { display: none; }

/* ---------- 운영관리 > 사용자관리 ---------- */
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input, .search-row select {
  height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; background: #fff;
}
.search-row input { flex: 1; min-width: 0; }
.user-meta { margin-top: 18px; }

/* ---------- 메시지 상자 (common/js/dialog.js) ---------- */
.pd-overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(11, 22, 46, .42); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .15s ease;
}
.pd-overlay.on { opacity: 1; }
.pd-box {
  --pd-c: var(--blue); --pd-bg: #e8f0fe;
  width: min(420px, 100%); background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(11, 22, 46, .28), 0 2px 8px rgba(11, 22, 46, .12);
  transform: translateY(8px) scale(.97); transition: transform .16s ease;
}
.pd-overlay.on .pd-box { transform: none; }
.pd-success { --pd-c: var(--ok); --pd-bg: #e3f6ee; }
.pd-warning { --pd-c: #d98a00; --pd-bg: #fff4dc; }
.pd-danger  { --pd-c: var(--danger); --pd-bg: #fde8e7; }
.pd-head { display: flex; align-items: center; gap: 12px; padding: 22px 24px 4px; }
.pd-ico {
  flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--pd-bg); color: var(--pd-c);
}
.pd-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pd-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.pd-msg {
  margin: 0; padding: 10px 24px 22px 74px; font-size: 14px; line-height: 1.65; color: #3a4252;
  white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere;
}
.pd-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; background: #f6f8fb; border-top: 1px solid #edf0f5; }
.pd-btn {
  min-width: 84px; height: 38px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .12s, box-shadow .12s;
}
.pd-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(15, 91, 216, .3); }
.pd-cancel { background: #fff; border-color: #d3d9e3; color: #3a4252; }
.pd-cancel:hover { background: #eef1f6; }
.pd-ok { background: var(--blue); color: #fff; }
.pd-ok:hover { background: var(--blue-dark); }
.pd-ok-danger { background: var(--danger); }
.pd-ok-danger:hover { background: #b9372f; }
.pd-ok-danger:focus-visible { box-shadow: 0 0 0 3px rgba(214, 69, 61, .3); }

.pd-toasts { position: fixed; top: 116px; left: 50%; z-index: 1001; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.pd-toast {
  --pd-c: var(--ok); --pd-bg: #e3f6ee;
  display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 999px;
  background: #1f2a3d; color: #fff; font-size: 14px; box-shadow: 0 10px 28px rgba(11, 22, 46, .28);
  opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s;
}
.pd-toast.on { opacity: 1; transform: none; }
.pd-toast .pd-ico { width: 26px; height: 26px; }
.pd-toast .pd-ico svg { width: 16px; height: 16px; }
.pd-toast.pd-info { --pd-c: var(--blue); --pd-bg: #e8f0fe; }
.pd-toast.pd-warning { --pd-c: #d98a00; --pd-bg: #fff4dc; }
.pd-toast.pd-danger { --pd-c: var(--danger); --pd-bg: #fde8e7; }
@media (prefers-reduced-motion: reduce) {
  .pd-overlay, .pd-box, .pd-toast { transition: none; }
}

/* ---------- 정보공시 > 공시 항목 공통 화면 ---------- */
.pub-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pub-title .badge { font-size: 12px; }
.pub-table { max-height: calc(100vh - 260px); }
.pub-note { margin: 10px 0 0; font-size: 12px; }

/* ---------- 운영관리 > ETL (DB접속정보 · ETL관리) ---------- */
.kv-form { width: 100%; border-collapse: collapse; border-top: 2px solid var(--blue); font-size: 13px; }
.kv-form th { width: 130px; padding: 7px 10px; background: #f4f7fc; color: #33415c; font-weight: 600; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kv-form th.req::after { content: " *"; color: var(--danger); }
.kv-form td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.kv-form input, .kv-form select, .kv-form textarea {
  width: 100%; height: 30px; padding: 0 8px; border: 1px solid #cfd6e2; border-radius: 4px; font: inherit; font-size: 13px; background: #fff;
}
.kv-form input[readonly] { background: #f3f5f8; color: var(--muted); }
.kv-form textarea { height: auto; padding: 6px 8px; font: 12px/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.kv-form .pair { display: flex; gap: 6px; align-items: center; }
.kv-form .pair > * { flex: 1; min-width: 0; }
.kv-form .pair > .sep { flex: none; color: var(--muted); }
.kv-form .hint { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.kv-form .sec th { background: #dfe8f7; color: var(--blue); font-size: 13px; }
.etl-actions { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 10px; }
.etl-actions .left { margin-right: auto; display: flex; gap: 6px; align-items: center; }
.etl-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.etl-note code { font-size: 11px; }
.tbl .st { display: inline-block; min-width: 44px; text-align: center; }
.badge.fail { background: #fdecea; color: var(--danger); }
.tbl td.msg { max-width: 360px; white-space: normal; word-break: break-all; font-size: 12px; }
.tbl tr.off td { color: #a0a7b4; }
.etl-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.etl-filter select, .etl-filter input { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.etl-filter input[name="q"] { width: 220px; }
.etl-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.etl-cols .kv-form th { width: 140px; }
@media (max-width: 1100px) { .etl-cols { grid-template-columns: 1fr; } }
/* 스케줄러 관리 · 모니터링 */
.day-picks { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.day-picks .check { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; }
.day-picks .check input, .etl-filter .check input, #jobPick .chk input { width: auto; height: auto; margin: 0; }
.etl-filter .check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
#jobPick .ord { width: 60px; height: 26px; padding: 0 6px; border: 1px solid #cfd6e2; border-radius: 4px; font: inherit; font-size: 12px; }
.mon-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 1100px) { .mon-grid { grid-template-columns: 1fr; } }
/* 목록 전체를 펼쳐 페이지 스크롤 하나만 쓴다 (표 머리글은 화면 위에 붙어 따라온다) */
.table-wrap.full { max-height: none; overflow: visible; }
/* 줄 간격을 줄인 표 (한 화면에 더 많이) */
.tbl.compact td { padding: 3px 10px; line-height: 1.8; }
.tbl.compact .btn-sm { height: 26px; }
/* 쪽 번호 (로그·ETL관리 목록 공통) */
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.pager a {
  min-width: 32px; height: 32px; padding: 0 8px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; color: #3a4252;
}
.pager a:hover { border-color: var(--blue); color: var(--blue); }
.pager a.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.pager a.off { pointer-events: none; opacity: .4; }
.list-foot { position: relative; display: flex; justify-content: center; align-items: center; min-height: 32px; margin-top: 12px; }
.list-foot > .muted { position: absolute; left: 0; font-size: 12px; }
.list-foot .pager { margin: 0; }
/* ETL 그룹 상세: 왼쪽 대상 ETL ↔ 가운데 버튼 ↔ 오른쪽 그룹 등록 ETL */
.dual { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; margin-top: 16px; align-items: stretch; }
.dual-box { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.dual-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; margin-bottom: 8px; }
.dual-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.dual-head input { flex: 1; min-width: 160px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.dual-list { height: calc(100vh - 400px); min-height: 280px; max-height: none; }
.dual-list tbody tr { cursor: pointer; user-select: none; }
.dual-list .chk input { width: auto; height: auto; margin: 0; }
.dual-mid { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.dual-mid .btn { width: 120px; justify-content: center; }
.dual-mid .btn:nth-child(3) { margin-top: 18px; }
@media (max-width: 1100px) { .dual { grid-template-columns: 1fr; } .dual-mid { flex-direction: row; flex-wrap: wrap; } }
/* 정보공시설정 (우리 대학교·주요비교대학) */
.univ-filter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.univ-filter input[type=text], .univ-filter input:not([type]) { flex: 1; min-width: 160px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.univ-filter select { flex: none; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.univ-filter .check { flex: none; display: inline-flex; align-items: center; gap: 4px; margin: 0 2px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.univ-filter .check input { width: 14px; height: 14px; min-width: 0; margin: 0; padding: 0; }
.warn-note { color: #b26a00; }
/* 스케줄에 연결된 ETL 그룹 표시 */
.link-chip { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: 10px; background: #e8f0fe; color: var(--blue); font-size: 12px; }
.link-chip small { color: var(--muted); }
.link-chip.off { background: #f0f2f5; color: #a0a7b4; text-decoration: line-through; }
.sched-sel { height: 32px; min-width: 320px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
/* ETL 화면 공통: 왼쪽 목록, 오른쪽 등록·수정 */
.etl-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.etl-split .table-wrap.list { max-height: calc(100vh - 230px); min-height: 200px; }
.etl-split .kv-form th { width: 112px; }
.etl-split .tbl td .sub { display: block; font-size: 11px; color: var(--muted); }
.etl-split .tbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.etl-split .panel-head { gap: 8px; flex-wrap: wrap; }
.etl-split .head-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.etl-split .etl-filter input[name="q"] { width: 160px; }
.etl-split .etl-cols { grid-template-columns: 1fr; }
@media (max-width: 1100px) { .etl-split { grid-template-columns: 1fr; } }
