/* 환경설정 화면 모양: 왼쪽 메뉴 170px, 오른쪽 내용 */
.settings { display: grid; contain: size; grid-template-columns: 170px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 6px; }
.settings-nav { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; }
.settings-group { background: #fff; border: 1px solid var(--line); padding: 2px 0 3px; flex: 0 0 auto; }
.settings-group-title { font-weight: 700; padding: 1px 6px 2px; white-space: nowrap; }
.settings-item { display: block; width: 100%; height: 22px; line-height: 20px; text-align: left; border: 1px solid transparent; background: none; padding: 0 4px 0 22px; cursor: pointer; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-item::before { content: ""; position: absolute; left: 11px; top: -1px; height: 11px; width: 8px; border-left: 1px dotted #7d8798; border-bottom: 1px dotted #7d8798; }
.settings-item:hover { background: var(--hover); }
.settings-item.on { background: var(--blue-soft); border-color: #a9c0e6; font-weight: 700; }
.settings-who { color: var(--muted); font-size: 11px; padding: 2px 6px; }

.settings-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.settings-view { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.settings-head { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); padding: 3px 6px; min-height: 32px; flex: 0 0 auto; }
.settings-title { font-weight: 700; font-size: 13px; white-space: nowrap; }
.settings-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.settings-cols { flex: 1 1 auto; display: flex; gap: 6px; min-height: 0; min-width: 0; }
.settings-narrow { display: flex; flex-direction: column; gap: 6px; width: 700px; max-width: 100%; }
.settings-msg { padding: 30px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.settings-foot { display: flex; gap: 4px; align-items: center; flex: 0 0 auto; background: #fff; border: 1px solid var(--line); padding: 4px 6px; }
.settings-btns { padding: 5px 6px; flex: 0 0 auto; }
.settings .grid-wrap { border: 0; }
.settings table.grid tr.settings-off td { color: var(--muted); }
.settings-clip { display: block; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; }
.settings-swatch { display: inline-block; width: 36px; height: 14px; border: 1px solid var(--line); vertical-align: middle; }
.settings-pre { margin: 0; white-space: pre-wrap; word-break: break-all; font: 11px/1.5 Consolas, monospace; max-height: 60vh; overflow: auto; }
.settings-ol { margin: 0; padding-left: 20px; line-height: 1.7; }

/* 목록 + 입력 칸 */
.settings-formbox { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.settings-formbox .settings-btns { padding: 2px 0; }
.settings-formtitle { font-weight: 700; border-bottom: 1px solid var(--line-soft); padding-bottom: 3px; }

/* 진료묶음버튼 */
.settings-treewrap { display: flex; flex-direction: column; height: 100%; }
.settings-search { padding: 4px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.settings-tree { flex: 1 1 auto; overflow-y: auto; padding: 2px 0; }
.settings-tabname { font-weight: 700; padding: 2px 6px; background: #f1f4f8; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.settings-node { display: flex; align-items: center; gap: 5px; width: 100%; height: 20px; text-align: left; border: 1px solid transparent; background: none; padding: 0 4px 0 16px; cursor: pointer; white-space: nowrap; overflow: hidden; }
.settings-node i { flex: 0 0 10px; height: 10px; border: 1px solid rgba(0, 0, 0, 0.25); }
.settings-node:hover { background: var(--hover); }
.settings-node.on { background: var(--sel); border-color: #e3b98a; font-weight: 700; }
.settings-node.off { color: var(--muted); }
.settings-bform { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.settings-bform input[type=color] { width: 44px; height: 24px; padding: 0 2px; border: 1px solid var(--line); background: #fff; }
.settings-kcd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 진료비 계산 규칙 */
.settings-rules th, .settings-rules td { padding: 2px 6px; }
.settings-rules .inp { min-height: 22px; }
.settings-tier { display: inline-block; width: 141px; color: var(--muted); }

/* 양식 만들기 */
.settings-fedit { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.settings-items td { vertical-align: top; padding: 2px 3px; }
.settings-items textarea.inp { resize: vertical; min-height: 24px; }
.settings-preview { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.settings-preview h3 { margin: 0 0 4px; font-size: 14px; text-align: center; }
.settings-pinfo { white-space: pre-wrap; border: 1px solid var(--line-soft); padding: 5px 7px; }
.settings-pitem { display: flex; flex-direction: column; gap: 3px; }
