/* 웜그레이 기본 디자인 — 2026-11-11 사용자 승인, 로컬 검토용.
   AGENTS.md: 디자인은 기능을 침범하지 않는다.
   원본 구조·버튼 포맷·크기·위치·클릭 영역·동작을 유지하고 시각 표현만 적용한다.
   index.html에서 app.css/auth.css/admin.css 뒤에 읽는다. */
:root {
  --bg: #e8e6e3;
  --card: #f7f5f2;
  --surface2: #eeebe6;
  --line: rgba(76, 66, 55, .12);
  --line-soft: rgba(76, 66, 55, .065);
  --line-strong: rgba(76, 66, 55, .25);
  --fg: #383532;
  --head: #383532;
  --text: #4d4741;
  --muted: #6c655f;
  --gray: #6c655f;
  --dim: #6d665e;
  --rail-bg: #49413b;
  --rail-line: rgba(76, 66, 55, .12);
  --rail-text: #706961;
  --accent: #75685f;
  --accent-dark: #5e5249;
  --accent-soft: #e8e1d9;
  --primary: #75685f;
  --blue: #5c6d7a;
  --green: #537158;
  --red: #a34e43;
  --cyan: #5b777c;
  --amber: #805c3b;
  --purple: #74657a;
  --warm-chat: #ded9d3;
  --warm-head: #ece7e1;
  --warm-received: #faf7f3;
  --warm-sent: #cfc5bb;
  --warm-chat-line: #bdb4aa;
  --warm-caption: #51483f;
}

/* 담당 버튼·검색·삭제·접기: 원본 알약/원형 포맷과 이벤트를 보존. */
.chat, .chat-body, .chat-input { background: var(--warm-chat); }
.chat { box-shadow: inset 0 0 0 1px var(--warm-chat-line); }
.chat-head { background: var(--warm-head); }
.chat-head .hd-who, .chat-head .hd-tools button {
  background: var(--warm-received);
  border-color: var(--line);
  box-shadow: 0 2px 6px rgba(76, 66, 55, .045);
}
.chat-head .hd-who.me:hover, .chat-head .hd-tools button:hover { background: #e2dbd2; }
.chat-head .who b { color: #39342f; }
.chat-head .state { color: var(--warm-caption); }
.chat-head .state.bad { color: var(--red); }

/* 대화·보고·카드·시각·검색·최신 이동 포맷은 변경하지 않는다. */
.msg:not(.me):not(.err) .bubble {
  background: var(--warm-received);
  border-color: transparent;
  color: #39342f;
  box-shadow: 0 1px 1px rgba(76, 66, 55, .04);
}
.msg.me .bubble { background: var(--warm-sent); border-color: transparent; color: #39342f; }
.msg .bubble .time, .msg.me .bubble .time { color: var(--warm-caption); }
.msg.err .bubble { background: #f3e8e4; border-color: #dbbdb5; color: #884437; }
.msg.err .bubble .time { color: #884437; }
.chat-input .box { background: var(--warm-received); border-color: var(--warm-chat-line); }
.chat-input .box:focus-within { border-color: var(--accent); }
.chat-input textarea::placeholder, .chat-input .hint { color: var(--warm-caption); }
.chat .to-end { background: var(--warm-received); color: var(--accent); }

/* 메뉴: 오른쪽 위 위치, 기존 5개 묶음·펼침·권한·탭 열기 그대로. */
.menu { background: rgba(247, 245, 242, .96); box-shadow: 0 12px 36px rgba(76, 66, 55, .13); }
.mi:hover, .msub button:hover { background: #e8e1d9; }
.mi .tile { background: #e4ddd4 !important; color: #695c50; box-shadow: none; }
.agent .av.tile, .chat-head .av.tile { color: #695c50; }

/* 탭: 기존 목업의 연속된 면과 상단 강조선. 열기·닫기·순서 변경은 원본 그대로. */
.desk, .tabs { background: #dfdcd8; }
.tab.on { background: var(--card); border-color: transparent; box-shadow: inset 0 2px 0 #75685f; }
.tab:not(.on):hover { background: #e8e3dd; }
.tab.on .tab-open { font-weight: 600; }
.tabbody { border-top-color: transparent; }
.tab.dragging { box-shadow: 0 8px 20px rgba(76, 66, 55, .14); }

/* 대시보드·리스트·설정 창: 구성과 데이터, 경고 의미를 유지하며 톤만 통일. */
.dcard { background: var(--card); }
.dcard .dh svg { color: var(--accent); }
.dp.w { background: #eee3d7; }
.dbig .dl.up { background: #e5eadd; }
.btn:not(.btn-green):not(.btn-accent):not(:hover), .badge { background: var(--card); }
.badge.wait { background: #eee3d7; color: var(--amber); }
.vgrid, .vtbl td.plate { background: var(--card); }
.vtbl th, .vtbl th.plate { background: var(--surface2); }
.vtbl th.plate.asc, .vtbl th.plate.desc { background: #e3ddd6; }
.tbl tbody tr:hover td, .vtbl tbody tr:hover td.plate, .vtbl tr.vrow.open td.plate { background: #efebe5; }
.day-div.today::before, .day-div.today::after { background: var(--line-strong); }
.rm-box, .rm-fld input, .rm-btns .rm-cancel, .pf-pic .rm-cancel { background: var(--card); }
.rail-menu { background: rgba(247, 245, 242, .97); }
.page.rv { --red: #a34e43; --green: #537158; }
