/* 환자상담 화면 모양: 치료비용계획(왼쪽 480px, 오른쪽 현황 표)과 상담 보드 */
.consult { display: grid; grid-template-columns: 480px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 6px; }
.consult.board { grid-template-columns: 300px minmax(0, 1fr); }
.consult-left { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.consult-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 4px; margin-bottom: 6px; flex: 0 0 auto; }
.consult-left-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.consult-p1 { flex: 0 0 172px; }
.consult-p2 { flex: 0 0 148px; }
.consult-p3 { flex: 1 1 0; }
.consult-p1 .grid-wrap, .consult-p2 .grid-wrap { border: 0; }
.consult-clip { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.consult-clip.wide { max-width: 330px; }
.consult-todo { background: #f4f6f9; min-height: 100%; padding: 6px; }
.consult-tx { background: #fff; border: 1px solid var(--line); margin-bottom: 6px; }
.consult-tx-head { display: flex; gap: 6px; align-items: center; padding: 3px 6px; border-bottom: 1px solid var(--line-soft); min-height: 26px; }
.consult-tx-row { display: flex; gap: 6px; align-items: center; padding: 2px 6px; min-height: 24px; border-bottom: 1px solid #edf0f4; }
.consult-tx-row:last-child { border-bottom: 0; }

.consult-status > .panel-body { display: flex; flex-direction: column; overflow: hidden; }
.consult-status-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.consult-filter { flex: 0 0 auto; }
.consult-filter th { width: 64px; }
.consult-filter td { padding: 2px 6px; }
.consult-filter .inp { width: auto; }
.consult-filter label.row { gap: 3px; cursor: pointer; white-space: nowrap; }
.consult-filter-btns { width: 92px; text-align: center; vertical-align: middle; }
.consult-filter-btns .btn { display: block; width: 100%; margin: 2px 0; }
.consult-status-table { flex: 1 1 auto; min-height: 0; }
.consult-status-table .grid-wrap { border-width: 1px 0; }
.consult-status-table table.grid td, .consult-p1 table.grid td, .consult-p2 table.grid td { white-space: nowrap; }
.consult-foot { flex: 0 0 auto; padding: 3px 6px; min-height: 24px; background: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 비용 설명을 쓰는 창 */
.consult-plan { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 8px; height: 520px; max-height: 70vh; }
.consult-plan-left { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.consult-fees { flex: 1 1 auto; min-height: 0; overflow-y: auto; border: 1px solid var(--line); }
.consult-fee-cat { background: var(--head); padding: 2px 6px; font-weight: 700; color: var(--orange); border-bottom: 1px solid var(--line-soft); }
.consult-fee { display: flex; justify-content: space-between; gap: 6px; width: 100%; border: 0; border-bottom: 1px solid #edf0f4; background: #fff; padding: 2px 8px; min-height: 24px; cursor: pointer; text-align: left; }
.consult-fee:hover { background: var(--blue-soft); }
.consult-fee:disabled { color: var(--muted); cursor: default; background: #fff; }
.consult-plan-right { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.consult-plan-items { flex: 1 1 auto; min-height: 90px; border-color: var(--line); }
.consult-plan-items td { padding: 1px 2px; }
.consult-plan-items .inp { border-color: transparent; }
.consult-plan-items .inp:focus { border-color: var(--blue); }
.consult-plan-items .inp.num, .consult-plan-sum .inp.num { text-align: right; }
.consult-plan-sum th { width: 110px; }
.consult-plan-sum td { width: 150px; }

/* 상담 보드 */
.consult-talk-panel { flex: 1 1 auto; min-height: 0; }
.consult-talk-list { display: flex; flex-wrap: wrap; gap: 3px; }
.consult-talk { border: 1px solid var(--line-soft); padding: 4px 8px 8px; line-height: 1.6; }
.consult-talk h2 { font-size: 12px; margin: 8px 0 2px; color: var(--primary); }
.consult-talk .small { font-size: 11px; color: var(--muted); margin-top: 8px; }
.consult-steps { margin: 0; padding-left: 20px; }
.consult-board-panel > .panel-body { display: flex; flex-direction: column; overflow: hidden; }
.consult-board { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.consult-strip { flex: 0 0 62px; display: flex; gap: 3px; align-items: center; padding: 3px; overflow-x: auto; overflow-y: hidden; background: #2b313b; color: #cfd6e2; }
.consult-strip .muted { color: #aab3c2; padding: 0 8px; white-space: nowrap; }
.consult-thumb { flex: 0 0 76px; height: 54px; border: 1px solid #5d6b82; background: #11151b; color: #dfe5ee; padding: 0; cursor: pointer; position: relative; overflow: hidden; font-size: 11px; }
.consult-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.consult-thumb span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); padding: 0 2px; white-space: nowrap; overflow: hidden; text-align: left; }
.consult-thumb.on { outline: 2px solid #ffb347; outline-offset: -2px; }
.consult-board-main { flex: 1 1 auto; min-height: 0; display: flex; }
.consult-stage { flex: 1 1 auto; min-width: 0; min-height: 0; position: relative; background: #1b1f26; overflow: hidden; }
.consult-stage canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.consult-ink { cursor: crosshair; touch-action: none; }
.consult-stage-info { position: absolute; left: 6px; top: 4px; color: #e8edf5; font-size: 11px; background: rgba(0, 0, 0, 0.45); padding: 0 5px; pointer-events: none; }
.consult-tools { flex: 0 0 66px; display: flex; flex-direction: column; gap: 3px; padding: 4px; background: #f4f6f9; border-left: 1px solid var(--line); overflow-y: auto; }
.consult-tools .btn { padding: 1px 2px; }
.consult-tool-label { font-size: 11px; color: var(--muted); margin-top: 5px; }
.consult-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.consult-color { height: 20px; border: 1px solid #6d7a90; cursor: pointer; padding: 0; }
.consult-color.on { outline: 2px solid var(--blue); outline-offset: 1px; }
.consult-p1 table.grid, .consult-p2 table.grid { table-layout: fixed; }
.consult-p1 table.grid td, .consult-p2 table.grid td { overflow: hidden; text-overflow: ellipsis; }
.consult-p1 .consult-clip, .consult-p2 .consult-clip { display: block; max-width: none; }
/* 내용 높이가 화면 틀의 높이 계산에 번지지 않게 한다(번지면 맨 위 제목 줄이 눌린다) */
.consult { contain: size; }
