/* Magic Orb 관리자 화면 공통 스타일 (화면 시안 색·크기를 따라요) */
:root {
  --bg: #F5F4EF;
  --surface: #FFFFFF;
  --line: #E2E0D8;
  --line-strong: #CFCCC2;
  --text: #1B1F1D;
  --muted: #5B625E;
  --faint: #A9A69B;
  --primary: #1C5D4B;
  --primary-hover: #17493B;
  --primary-soft: #E3EEE8;
  --side-bg: #14231E;
  --side-active: #24382F;
  --side-text: #B9C7BF;
  --side-title: #E3EEE8;
  --ok: #15613B;
  --ok-soft: #DCF0E3;
  --danger: #D64545;
  --danger-soft: #FBE7E7;
  --warn-soft: #FDEBD3;
  --warn: #9A5A0B;
  --info: #1F4FA3;
  --info-soft: #E3ECFB;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }

/* ---------- 틀 ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 240px; flex: none; background: var(--side-bg); color: var(--side-text);
  padding: 22px 16px 32px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-user { display: flex; align-items: center; gap: 12px; padding: 0 6px; margin-bottom: 22px; min-height: 44px; }
.side-user .avatar { width: 40px; height: 40px; }
.side-user .who small { display: block; font-size: 12px; color: var(--side-text); line-height: 1.2; }
.side-user .who strong { display: block; font-size: 16px; color: #fff; font-weight: 700; line-height: 1.35; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side-group { margin: 16px 14px 4px; font-size: 17px; font-weight: 700; color: var(--side-title); }
.side-link {
  display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 14px;
  border-radius: 10px; color: var(--side-text); font-size: 15px; font-weight: 500;
}
.side-link.indent { padding-left: 24px; }
.side-link:hover { background: rgba(255, 255, 255, .06); }
.side-link.active { background: var(--side-active); color: #fff; font-weight: 700; }
.side-link .badge { margin-left: auto; }

.main { flex: 1; min-width: 0; padding: 32px 40px 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.head-actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: #FAFAF7; }
.icon-btn .badge { position: absolute; top: -6px; right: -6px; }

.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger);
  color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.badge[hidden] { display: none; }

/* ---------- 알림 ---------- */
.bell { position: relative; }
.bell-panel {
  position: absolute; right: 0; top: 54px; width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 35, 30, .16); z-index: 30; overflow: hidden;
}
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; font-weight: 700; }
.bell-head button { background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 13px; }
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-item { display: block; padding: 12px 18px 12px 34px; position: relative; border-top: 1px solid var(--line); }
.bell-item.unread { background: #EEF3F0; }
.bell-item.unread::before {
  content: ''; position: absolute; left: 16px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
.bell-item strong { display: block; font-size: 14px; font-weight: 700; }
.bell-item span { display: block; font-size: 13px; color: var(--muted); }
.bell-empty { padding: 24px 18px 28px; color: var(--muted); text-align: center; }

/* ---------- 카드·표 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.card-pad { padding: 24px 28px; }
.card + .card { margin-top: 24px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 16px 20px 12px;
  white-space: nowrap; border-bottom: 1px solid var(--line);
}
.tbl th a { display: inline-flex; align-items: center; gap: 4px; }
.tbl td { padding: 14px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr:first-child td { border-top: 0; }
.tbl tr.dim td { color: var(--faint); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- 이름 표기 ---------- */
.person { display: flex; align-items: center; gap: 12px; }
.person .avatar { width: 40px; height: 40px; }
.person .tl { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.person .nm { display: block; font-weight: 700; line-height: 1.35; }
.person .em { display: block; font-size: 12px; color: var(--muted); }
.avatar {
  border-radius: 50%; background: #DDDAD0; overflow: hidden; display: inline-flex; align-items: flex-end; justify-content: center; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 사진을 올리면 뒤 회색 동그라미를 빼요(투명 PNG 구슬 등이 회색 테두리로 보이던 문제, 2026-10-18 폐하 지시) */
.avatar:has(img) { background: transparent; }
.avatar svg { width: 100%; height: 100%; display: block; }
.orb { width: 40px; height: 40px; flex: none; object-fit: contain; border: 0; background: transparent; filter: none; box-shadow: none; }   /* 원본 투명 구슬(GPT 시안 그대로) */

/* ---------- 버튼·폼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #FAFAF7; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: #EBC1C1; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; height: 52px; font-size: 16px; }
.btn-link { background: none; border: 0; color: var(--primary); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.input, select.input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
}
.input:focus, select.input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
select.input-sm { height: 40px; width: auto; min-width: 88px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.error { color: var(--danger); font-size: 13px; margin-top: 6px; font-weight: 500; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.search { position: relative; width: 320px; }
.search .input { height: 44px; padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 12px; color: var(--muted); }

/* ---------- 탭·알약 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab {
  height: 40px; padding: 0 18px; border-radius: 999px; background: var(--surface); font-weight: 700;
  display: inline-flex; align-items: center; color: var(--text); border: 1px solid transparent;
}
.tab.on { background: var(--primary); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .tabs { margin-bottom: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: #EFEDE6; color: var(--muted); white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.hbars { display: flex; gap: 2px; align-items: center; }
.hbar { width: 5px; height: 16px; border-radius: 2px; background: var(--line); }
.hbar.ok { background: var(--ok); }
.hbar.slow { background: var(--warn); }
.hbar.down { background: var(--danger); }
.tag-system {
  display: inline-block; padding: 1px 10px; border: 1.5px solid var(--danger); border-radius: 6px; color: var(--danger); font-weight: 700;
}

/* ---------- 직원·권한 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.info-grid h3 { font-size: 15px; margin-bottom: 8px; }
.info-grid p { color: var(--muted); font-size: 13.5px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }
.perm-layout { display: grid; grid-template-columns: 300px 1fr; gap: 32px; margin-top: 20px; }
.leader-pick { display: flex; flex-direction: column; gap: 10px; }
.leader-pick a {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong); font-weight: 700; background: #fff;
}
.leader-pick a.on { background: var(--primary-soft); border-color: var(--primary); }
.perm-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.perm-item input { width: 22px; height: 22px; accent-color: var(--primary); margin-top: 2px; flex: none; }
.perm-item strong { display: block; }
.perm-item span { color: var(--muted); font-size: 13.5px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; }
.section-title h2 { font-size: 20px; }

/* ---------- 모달(간단) ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(20, 35, 30, .3); }
dialog::backdrop { background: rgba(20, 35, 30, .45); }
.dlg-body { padding: 28px; }
.dlg-body h2 { font-size: 20px; margin-bottom: 4px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- 로그인 ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 40px; }
.auth-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #EDEAE2; font-size: 13px; font-weight: 700; }
.auth-step::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head img.logo { height: 56px; margin: 18px 0 14px; display: block; margin-left: auto; margin-right: auto; }
.auth-head img.logo + .auth-site { margin-bottom: 14px; }   /* 관리자 로그인: 로고 아래 "매직오브 홈페이지"(2026-10-02) */
.auth-head h1 { font-size: 24px; }
.auth-head p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.auth-links { text-align: center; margin-top: 18px; font-size: 14px; }
.shield { width: 56px; height: 56px; border-radius: 50%; background: #E3EEE8; color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 16px auto 10px; }
.code-boxes { display: flex; gap: 8px; margin-bottom: 18px; }
.code-boxes input { width: 100%; min-width: 0; height: 56px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 10px; }
.code-boxes input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { width: 200px; height: 200px; }
.secret-key { text-align: center; font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; font-weight: 700; background: #F1EFE8; padding: 10px; border-radius: 10px; word-break: break-all; }
.codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.codes-grid div { background: #F1EFE8; padding: 10px; text-align: center; border-radius: 8px; }

/* ---------- 프로필 ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.profile-photo { display: flex; gap: 20px; align-items: center; }
.profile-photo .avatar { width: 120px; height: 120px; }
.chat-preview { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 12px; }
.chat-row { display: flex; gap: 10px; margin-bottom: 12px; }
.chat-row.me { flex-direction: row-reverse; text-align: right; }
.chat-row .avatar { width: 36px; height: 36px; }
.chat-row small { display: block; color: var(--muted); font-size: 12px; }
.bubble { display: inline-block; padding: 10px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); margin-top: 2px; }
.chat-row.me .bubble { background: #DCEBE3; border-color: #DCEBE3; }

/* ---------- 오류·준비 중 ---------- */
.center-msg { text-align: center; padding: 80px 24px; }
.center-msg .code { font-size: 72px; font-weight: 700; color: var(--primary); line-height: 1; }
.center-msg h1 { font-size: 24px; margin: 16px 0 8px; }
.center-msg p { color: var(--muted); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px 24px; }
.stat small { color: var(--muted); font-weight: 500; }
.stat strong { display: block; font-size: 28px; margin-top: 4px; }

/* 전체 현황 "오늘 할 일"(엔에스골든몰 관리자 메인에서 가져옴): 0보다 크면 주황 테두리, 누르면 처리 화면 */
.todo-title { font-size: 16px; margin: 0 0 12px; }
.todo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }
.todo { display: block; padding: 18px 20px; color: inherit; text-decoration: none; border: 2px solid transparent; }
.todo:hover { border-color: var(--line-strong); }
.todo small { color: var(--muted); font-weight: 500; }
.todo strong { display: block; font-size: 26px; margin-top: 4px; color: var(--faint); }
.todo-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.todo.hot { border-color: var(--warn); background: var(--warn-soft); }
.todo.hot strong { color: var(--warn); }

/* ---------- 임직원 모바일: 하단 탭 + 더보기 ---------- */
.mobile-tabs { display: none; }
.mobile-more { display: none; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { display: none; }
  .main { padding: 16px 16px 88px; }
  .mobile-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--side-bg); border-top: 1px solid rgba(255,255,255,.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mtab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; border-radius: 10px; color: var(--side-text); font-size: 11px; font-weight: 600;
    background: none; border: none; cursor: pointer;
  }
  .mtab.on { color: #fff; }
  .mtab .badge { position: absolute; margin-top: -18px; margin-left: 14px; }
  .mobile-more:not([hidden]) {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 50;
    background: var(--side-bg); overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .mobile-more-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .mobile-more-head strong { color: #fff; font-size: 18px; }
  .mobile-more-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
  .info-grid, .stat-grid, .todo-grid { grid-template-columns: 1fr 1fr; }
  .perm-layout, .two-col { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .search { width: 100%; }
  /* 휴대폰에서는 종이 왼쪽에 있어 오른쪽 맞춤 창이 화면 밖으로 나가요 → 화면 좌우 16px 안에 고정(2026-10-21) */
  .bell-panel { position: fixed; left: 16px; right: 16px; top: 76px; width: auto; }
  .bell-list { max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
}

/* ---------- 단계 2: 고객사·담당 배정 ---------- */
.row-closed td { background: #FCEFEA; }
.link-under { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; text-decoration: underline dotted; text-underline-offset: 4px; color: var(--text); }
.link-under:hover { color: var(--primary); }
dialog.wide { width: min(760px, calc(100vw - 32px)); background: var(--bg); }
.assign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.assign-col { display: flex; flex-direction: column; gap: 10px; }
.assign-head { padding: 18px 20px; }
.assign-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.assign-stats small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.assign-stats strong { font-size: 18px; }
.assign-client { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; cursor: pointer; }
.assign-client:has(input:checked) { background: #EAF3EE; border-color: var(--primary); }
.assign-client input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.assign-client-name { flex: 1; min-width: 0; }
.assign-client-name strong { display: block; font-size: 15px; }
.assign-client-name small { color: var(--muted); font-size: 12.5px; }
.assign-empty { padding: 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 12px; }
.assign-bar {
  position: sticky; bottom: 16px; margin-top: 28px; background: var(--side-bg); color: #fff; border-radius: 16px;
  padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; z-index: 20;
}
.assign-bar[hidden] { display: none; }
.assign-bar-text { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }

/* ---------- 단계 3: 고객 화면·직접 수정·수정 요청 ---------- */
.login-mail { text-align: right; line-height: 1.25; }
.login-mail small { display: block; font-size: 12px; color: var(--muted); }
.login-mail strong { font-size: 15px; }
.side-status { margin: 22px 6px 0; padding: 14px 16px; border-radius: 12px; background: #1B2E27; }
.side-status small { display: block; font-size: 12px; color: var(--side-text); }
.side-status strong { color: #fff; font-size: 14px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 4px; }
.dot.ok { background: #46C081; }
.dot.warn { background: #F0A030; }
.quota-num { margin: 10px 0 8px; }
.quota-num b { font-size: 40px; color: var(--primary); }
.quota-num span { color: var(--muted); }
.quota-bar { display: flex; gap: 6px; }
.quota-bar i { flex: 1; height: 8px; border-radius: 4px; background: #E2E0D8; }
.quota-bar i.on { background: var(--primary); }
.req-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.req-row:first-of-type { margin-top: 10px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; border: 1.5px dashed var(--line-strong); border-radius: 14px; cursor: pointer; text-align: center; color: var(--muted); }
.dropzone input { display: none; }
.tip { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #E3EEE8; color: var(--primary); font-size: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #EAE8E0; }
.photo-grid figcaption { display: flex; flex-direction: column; font-size: 13px; word-break: break-all; }

/* 수정 요청·대화 */
.req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.req-layout.narrow { grid-template-columns: minmax(0, 1fr) 360px; }
.req-list-item { display: block; padding: 16px 20px; border-top: 1px solid var(--line); }
.req-list-item:first-child { border-top: 0; }
.req-list-item.on { background: #EEF3F0; }
.req-list-item .head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2a5fd0; margin-right: 6px; }
.chip { display: inline-block; padding: 1px 10px; border-radius: 6px; background: #EFEDE6; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.chip.info { background: var(--info-soft); color: var(--info); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; background: #fff; }
.radio-card:has(input:checked) { background: #E3EEE8; border-color: var(--primary); }
.radio-card input { margin-top: 4px; accent-color: var(--primary); }
.radio-card strong { display: block; }
.radio-card span { font-size: 12.5px; color: var(--muted); }
.chat { margin-top: 16px; }
.chat-box { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.msg { display: flex; gap: 10px; max-width: 92%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg.mine .who { text-align: right; }
.msg .bubble { display: inline-block; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.msg.mine .bubble { background: #DCEBE3; border-color: #DCEBE3; }
.msg.memo { max-width: 100%; align-self: stretch; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; background: transparent; display: block; }
.msg.memo strong { font-size: 12.5px; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; }
.chat-form textarea { flex: 1; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; resize: vertical; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 14px 0; }
.steps div { font-size: 13px; color: var(--muted); }
.steps b { display: block; color: var(--text); }
.readonly-note { padding: 12px 14px; border-radius: 12px; background: #E3EEE8; color: var(--primary); font-size: 14px; margin-top: 14px; }
@media (max-width: 900px) { .req-layout { grid-template-columns: 1fr; } }

/* ---------- 회원가입·대기·신규 제작중 ---------- */
.auth-card.wide, .auth-page:has(.grid2) .auth-card { max-width: 700px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.check { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.steps-box { background: #F3F1EA; border-radius: 14px; padding: 16px 20px; }
.steps-box .step { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0; position: relative; }
.steps-box .step i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; flex: none; margin-top: 2px; }
.steps-box .step.done i { background: var(--primary); border-color: var(--primary); }
.steps-box .step.now i { border-color: #B26A00; box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 9px #B26A00; }
.steps-box .step strong { display: block; }
.steps-box .step span { font-size: 13px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 110px 1fr; margin: 14px 0; }
.kv dt, .kv dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { text-align: right; font-weight: 700; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- 약관 문서 ---------- */
.legal { max-width: 820px; margin: 0 auto; padding: 40px 20px 60px; }
.legal h1 { font-size: 28px; margin: 18px 0 4px; }
.legal-body { margin-top: 20px; line-height: 1.75; }
.legal-body h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-body p, .legal-body li { margin: 6px 0; }
.legal-body ol, .legal-body ul { padding-left: 22px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14.5px; }
.legal-table th, .legal-table td { border: 1px solid var(--line-strong); padding: 9px 12px; text-align: left; vertical-align: top; background: #fff; }
.legal-table thead th, .legal-table tbody th { background: #F1EFE8; width: 30%; }
.check a { text-decoration: underline; color: var(--primary); margin-left: 6px; font-weight: 700; }

/* ---------- 직접 수정(왼쪽: ◀ 구역 고르기 ▶ + 고칠 칸, 오른쪽: 미리보기) ---------- */
.de-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.de-bar > span { margin-right: auto; }
.de-layout { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
.de-h { font-size: 19px; margin: 0 0 4px; }
.de-panel form { margin-top: 16px; }
.de-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.de-sns { padding: 14px 0; border-top: 1px solid var(--line); }
.de-sns:first-of-type { border-top: 0; padding-top: 0; }
.de-check { display: flex !important; align-items: center; gap: 8px; margin-bottom: 8px !important; cursor: pointer; }
.de-ic { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; }
.de-ic.naver { background: #03C75A; color: #fff; }
.de-ic.kakao { background: #FEE500; color: #3A1D1D; }
.de-ic.insta { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); color: #fff; }
.de-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.de-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.de-designs form { margin: 0; }
.de-design { width: 100%; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); font: inherit; text-align: left; }
.de-design img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.de-design span { display: block; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.de-design:hover { border-color: var(--line-strong); }
.de-design.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.de-preview { position: sticky; top: 20px; }
.de-frame { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; height: calc(100vh - 150px); min-height: 560px; box-shadow: 0 10px 30px rgba(20, 35, 30, .08); }
.de-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.de-preview p { margin: 8px 4px 0; }
.de-foot { align-items: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 20px; }
.de-foot > .card { margin: 0; }
@media (max-width: 1100px) { .de-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .de-layout { grid-template-columns: 1fr; } .de-preview { position: static; } .de-frame { height: 680px; } }
@media (max-width: 700px) { .de-grid2, .de-foot { grid-template-columns: 1fr; } .de-frame { height: 560px; } }
.de-site { display: inline-flex; flex-wrap: wrap; gap: 4px 18px; }
.de-site a { color: inherit; text-decoration: underline; }
.de-video { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.de-video[hidden] { display: none; }
.de-video video { width: 220px; max-width: 100%; border-radius: 10px; background: #000; }
.de-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) 160px; gap: 8px; align-items: center; margin-bottom: 8px; }
.de-step-no { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 560px) { .de-step { grid-template-columns: 26px minmax(0, 1fr); } .de-step select { grid-column: 2; } }

/* 직접 수정: 저장하기 한 곳, 저장 안 한 수정 표시, 템플릿 고르기 */
.de-dirty { font-size: 13px; font-weight: 700; color: #B54708; }
.de-design-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.de-design-acts form { margin: 0; }
.de-errors { margin: 0; padding-left: 18px; }
.de-upload .btn { cursor: pointer; }

/* 덧붙인 텍스트 칸 */
.de-blocks { margin-bottom: 10px; }
.de-block-list { display: grid; gap: 10px; }
.de-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); display: grid; gap: 8px; }
.de-block-head { display: flex; align-items: center; gap: 8px; }
.de-block-tools { margin-left: auto; display: flex; gap: 4px; }
.de-block-tools button { height: 28px; min-width: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 12px; }
.de-block-opts { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13px; font-weight: 700; margin-top: 8px; }
.de-block-opts select { height: 34px; width: auto; padding: 0 10px; font-size: 13px; }
.de-block-opts label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.de-block-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.de-view { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.de-view button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.de-view button.on { background: var(--primary); color: #fff; }
.de-frame.mobile { border-radius: 28px; border-width: 8px; border-color: #1f2a26; }
.de-hist { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.de-hist:last-child { border-bottom: 0; }
.de-hist form { margin: 0; flex: none; }
.de-mobile-note { display: none; }
@media (max-width: 900px) {
  .de-pc-only { display: none !important; }
  .de-mobile-note { display: block; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #FDEBD3; color: #7A4708; font-size: 13px; line-height: 1.6; }
}

/* 직접 수정 3단계(2026-09-29): 팝업 없이 왼쪽 칸 + 미리보기에서 끌기·키우기 */
.de-selbar { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.de-selname { flex: 1; }
.de-frame { position: relative; }
.de-frame iframe { transform-origin: 0 0; }
.de-menu-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.de-menu-row .de-menu-url { grid-column: 2 / 4; }
.de-req { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: #FDEBD3; color: #B54708; font-size: 11px; font-weight: 800; vertical-align: middle; }
.de-flash { box-shadow: 0 0 0 3px #E8590C !important; transition: box-shadow .3s; }
.de-zone .de-h { margin-bottom: 2px; }
.de-pick-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.de-pick-thumb { width: 72px; height: 54px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.de-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.de-pick-now .btn { cursor: pointer; margin: 0; }
.de-zonenav { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.de-zonenav select { flex: 1; height: 40px; }
.de-zonenav button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 16px; }
.de-zone .de-grid2 { grid-template-columns: 1fr; }

/* ---- 워드처럼 고치는 글 칸(2026-09-29): 글 칸 + 바로 오른쪽 세로 도구 ---- */
.de-rt { display: flex; flex-direction: column; gap: 6px; }
.de-rt > .input, .de-rt > .de-grid2, .de-rt > .de-ed { width: 100%; min-width: 0; }
.de-ed { min-height: 46px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #222; font-size: 15px; font-weight: 400; line-height: 1.5; outline: none; overflow-wrap: anywhere; cursor: text; }
.de-ed.is-multi { min-height: 96px; }
.de-ed:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.de-ed { position: relative; }
.de-ed.is-empty::before { content: attr(data-placeholder); color: #A9A69B; position: absolute; top: 11px; left: 14px; pointer-events: none; }
.de-ed ul { margin: 2px 0; padding-left: 20px; }
.de-ed.de-flash { box-shadow: 0 0 0 3px #F59F00; }
.de-tb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.de-tb-row { display: flex; gap: 4px; }
.de-tb-row .de-tb-btn { flex: 1; }
.de-tb-btn { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--text); white-space: nowrap; }
.de-tb-btn:hover { border-color: var(--primary); }
.de-tb-btn b, .de-tb-btn s { font-size: 12px; }
.de-tb-row .de-tb-btn { padding: 0 4px; }
.de-tb-a { font-style: normal; font-weight: 800; border-bottom: 3px solid #E03131; line-height: 1; }
.de-tb-size { height: 32px; width: auto; min-width: 84px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; }
.de-tb-clear { font-weight: 500; color: var(--muted); }
.de-cpick { display: inline-flex; }
.de-cbtn i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.de-cbtn i.is-empty { background: linear-gradient(135deg, #fff 45%, #E03131 45%, #E03131 55%, #fff 55%); }
.de-block-opts .de-cbtn { height: 34px; }
.de-palette { position: fixed; z-index: 1000; width: 196px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.de-palette[hidden] { display: none; }
.de-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.de-swatches button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.de-swatches button:hover { transform: scale(1.12); }
.de-pal-more { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 6px; font-size: 12px; font-weight: 700; }
.de-pal-more input { width: 40px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.de-pal-reset { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; cursor: pointer; }
.de-rt-top { align-items: flex-start; }
.de-tb-sep { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.de-cbtn i.is-none { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.de-pal-none { margin-bottom: 6px; }
.de-pal-none[hidden] { display: none; }
/* 미리보기에서 누른 것만 보이기(2026-09-29) */
.de-show-all { display: none; margin: 4px 0 10px; }
.de-panel.is-focus .de-show-all { display: inline-flex; }
.de-panel.is-focus .de-zone-body :is(.field, .de-block, .de-blocks, .de-grid2, .de-block-add):not(.is-focused) { display: none; }
.de-tb-lab { margin-left: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
/* 사진·영상 칸의 단추들을 같은 높이·같은 줄 가운데로(label 단추가 아래로 처지던 것 고침) */
.field .de-pick-now label.btn, .field .de-upload label.btn { display: inline-flex; align-items: center; margin: 0; font-size: 13px; }
.de-pick-now .btn, .de-upload .btn, .de-video .btn { height: 38px; padding: 0 14px; line-height: 1; }
.de-pick-thumb { flex: none; }
.de-ic.chat { background: #1C5D4B; color: #fff; font-size: 10px; }
.tbl .num { text-align: right; white-space: nowrap; }
/* 좁은 표(2026-10-13 방문자 날짜별): 칸이 많아도 본문 폭 안에 들어가게 */
.tbl.tight th, .tbl.tight td { padding-left: 10px; padding-right: 10px; }
.tbl.tight th:first-child, .tbl.tight td:first-child { padding-left: 20px; }
.tbl.tight th:last-child, .tbl.tight td:last-child { padding-right: 20px; }

/* 비밀번호 칸 오른쪽 눈 단추(보기/가리기, 2026-10-14) */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { padding-right: 48px; }
.pw-eye { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--text); background: var(--bg); }
.pw-eye:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.pw-eye[aria-pressed="true"] { color: var(--primary); }

/* 방문자 표 좌우 간격(2026-10-14 폐하 지시): 첫 칸(이름·날짜)은 고정 폭, 나머지 칸은 똑같은 폭에 숫자를 가운데로 */
table.tbl.vis-even { table-layout: fixed; }
.tbl.vis-even th.num, .tbl.vis-even td.num { text-align: center; }
.tbl.vis-even col.vis-head { width: 190px; }
.tbl.vis-even.vis-daily { min-width: 1080px; }
.tbl.vis-even.vis-daily col.vis-head { width: 120px; }
@media (max-width: 640px) { .tbl.vis-even col.vis-head { width: 120px; } .tbl.vis-even:not(.vis-daily) { min-width: 520px; } }
.tbl.vis-even.vis-daily th { white-space: normal; word-break: keep-all; line-height: 1.35; vertical-align: bottom; }
.de-layout > *, .de-main, .de-preview { min-width: 0; }

/* ---------- AI 챗봇(2026-10-18, GPT 시안 "AI 상담") ---------- */
.cb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cb-top .tabs { margin-bottom: 0; }
.cb-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; flex-wrap: wrap; }
.cb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.cb-stats > .cb-stat { margin: 0; padding: 22px 26px; display: flex; flex-direction: column; gap: 8px; }
.cb-stat span { color: var(--muted); font-size: 14px; }
.cb-stat b { font-size: 34px; line-height: 1.1; color: var(--primary); }
.cb-filter { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.cb-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.cb-seg a { height: 40px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: 9px; font-weight: 700; color: var(--text); }
.cb-seg a.on { background: var(--primary); color: #fff; }
.cb-search { flex: 1; min-width: 200px; width: auto; }
.cb-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.cb-split > .card { margin: 0; }
.cb-list { padding: 8px 8px 0; }
.cb-list-head, .cb-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 10px; }
.cb-list-head h2, .cb-detail-head h2 { font-size: 19px; margin: 0; }
.cb-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.cb-item:last-of-type { border-bottom: 0; }
.cb-item:hover { background: #FAFAF7; }
.cb-item.on { background: var(--ok-soft); border-bottom-color: transparent; }
.cb-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #B9B6AC; margin-top: 8px; }
.cb-dot.new { background: #1C8F5E; }
.cb-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cb-item-body strong { font-size: 16px; }
.cb-item-sub { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-item .pill { margin-top: 22px; }
.cb-list-foot { padding: 14px 18px; }
.cb-pager { padding: 0 18px 14px; }
.cb-empty { color: var(--muted); padding: 28px 18px; margin: 0; line-height: 1.7; }
.cb-detail { padding: 8px 24px 20px; }
.cb-detail-head { padding-left: 0; padding-right: 0; }
.cb-detail-head p { margin: 4px 0 0; }
.cb-back { display: none; }
.cb-sum { background: #EEF6F1; border: 1px solid #CFE5D8; border-radius: 14px; padding: 18px 20px; }
.cb-sum-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cb-sum-head h3 { margin: 0; font-size: 17px; color: var(--primary); }
.cb-sum dl { margin: 0; background: #fff; border-radius: 10px; overflow: hidden; }
.cb-sum dl > div { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--line); }
.cb-sum dl > div:first-child { border-top: 0; }
.cb-sum dt { padding: 11px 14px; color: var(--muted); background: #F7F7F3; font-size: 14px; }
.cb-sum dd { padding: 11px 14px; margin: 0; word-break: break-word; }
.cb-actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.cb-actions form { margin: 0; }
.cb-log-title { font-size: 17px; margin: 0 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.cb-log { display: flex; flex-direction: column; gap: 12px; }
.cb-msg { max-width: 86%; }
.cb-msg.is-bot { align-self: flex-start; }
.cb-msg.is-user { align-self: flex-start; }
.cb-who { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cb-who small { color: var(--faint); font-weight: 400; margin-left: 4px; }
.cb-msg p { margin: 0; padding: 10px 14px; border-radius: 12px; background: #F1F0EB; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.cb-msg.is-bot p { background: #E5F2EA; color: #134A3B; }
.cb-msg.is-bot .cb-who { color: var(--primary); }
.cb-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.cb-info { background: var(--info-soft); color: var(--info); }
.cb-know { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.cb-know > .card { margin: 0; }
.cb-h { font-size: 18px; margin: 0 0 16px; }
.cb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-check { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 4px; }
.cb-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.cb-check + .hint { margin-bottom: 16px; }
.cb-check:not(:has(+ .hint)) { margin-bottom: 16px; }
.cb-ta, .cb-embed textarea { height: auto; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.cb-file { padding: 10px 14px; height: auto; }
.cb-embed { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.cb-embed h3 { font-size: 15px; margin: 0 0 4px; }
.cb-embed textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; margin-top: 8px; }
.cb-faqs { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.cb-faq { border: 1px solid var(--line); border-radius: 12px; background: #FCFCFA; }
.cb-faq summary { padding: 12px 14px; cursor: pointer; font-weight: 500; }
.cb-faq summary b { color: var(--primary); }
.cb-faq form { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.cb-faq-btns { display: flex; gap: 8px; }
.cb-docs { list-style: none; padding: 0; margin: 18px 0 0; }
.cb-docs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.cb-docs form { margin: 0; }
.cb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cb-cards > .cb-card { margin: 0; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; color: var(--text); }
.cb-card:hover { border-color: var(--primary); }
.cb-card strong { font-size: 17px; }
.cb-inline { display: flex; gap: 10px; }
.cb-inline .input { flex: 1; }
@media (max-width: 1100px) {
  .cb-split { grid-template-columns: 1fr; }
  .cb-split.has-pick .cb-list { display: none; }   /* 휴대폰·태블릿: 고르면 요약이 먼저, "목록으로"로 돌아가요 */
  .cb-split:not(.has-pick) .cb-detail { display: none; }
  .cb-back { display: inline-flex; }
}
@media (max-width: 700px) {
  .cb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cb-stats > .cb-stat { padding: 16px 18px; }
  .cb-stat b { font-size: 28px; }
  .cb-seg { width: 100%; }
  .cb-seg a { flex: 1; justify-content: center; }
  .cb-detail { padding: 4px 16px 16px; }
  .cb-sum { padding: 14px; }
  .cb-sum dl > div { grid-template-columns: 92px 1fr; }
  .cb-row2 { grid-template-columns: 1fr; }
  .cb-know { grid-template-columns: 1fr; }
  .cb-msg { max-width: 100%; }
}
.cb-sum dt, .cb-sum dd { word-break: keep-all; overflow-wrap: anywhere; }
.cb-know .card > .hint { margin-bottom: 16px; }

/* =====================================================================
   2026-10-19 관리자 화면 개편 — GPT 시안(magicorb-admin-concept) 색·모양
   남색 메뉴 #0C172C · 강조 파랑 #315CCE · 밝은 업무 바탕 #F3F6FB. 기능·문구·메뉴 순서는 그대로예요.
   ===================================================================== */
:root {
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --line: #DBE3EF;
  --line-strong: #C9D4E4;
  --text: #17243B;
  --muted: #58677E;
  --faint: #93A1B5;
  --primary: #315CCE;
  --primary-hover: #284FB5;
  --primary-soft: #E7EEFF;
  --side-bg: #0C172C;
  --side-active: #284C96;
  --side-text: #C5D2E7;
  --side-title: #9FB3D3;
  --ok: #146244;
  --ok-soft: #E7F5EE;
  --danger: #A42B39;
  --danger-soft: #FFF0F0;
  --warn: #80500C;
  --warn-soft: #FFF1DB;
  --info: #2C51A9;
  --info-soft: #EAF0FF;
}
body { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; }

/* 왼쪽 메뉴 */
.side { width: 228px; padding: 23px 16px 32px; scrollbar-width: thin; scrollbar-color: #536383 transparent; }
.side-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .01em; padding: 0 4px; }
.side-brand img { width: 34px; height: 34px; object-fit: contain; }
.side-user { margin: 19px 0 14px; padding: 16px 4px; border-top: 1px solid #29364D; border-bottom: 1px solid #29364D; }
.side-user .avatar { background: #DCE6F8; }
.side-user .who small { font-size: 11px; color: #B4C6E2; }
.side-user .who strong { font-size: 15px; }
.side-group { margin: 16px 10px 6px; font-size: 11px; font-weight: 600; color: var(--side-title); letter-spacing: .06em; }
.side-link { height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; gap: 11px; }
.side-link.indent { padding-left: 10px; }
.side-link svg { width: 17px; height: 17px; }
.side-link:hover { background: rgba(255, 255, 255, .07); }
.side-link.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 #9AB8FF; }
.side-link .badge, .mtab .badge { background: #EBEFFF; color: #254DBA; border-radius: 6px; font-size: 11px; min-width: 20px; height: 18px; }
.side-status { background: transparent; border: 1px solid #3B4C68; border-radius: 10px; }
.side-status small { color: #B7C7DF; }

/* 위쪽: 경로 + 제목 */
.main { padding: 26px 36px 56px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumb i { font-style: normal; margin: 0 6px; color: var(--faint); }
.m-brand { display: none; }
.page-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.03em; }
.icon-btn { border-radius: 10px; width: 42px; height: 42px; border-color: var(--line); }
.icon-btn:hover, .btn:not(.btn-primary):hover { background: #F7F9FD; }   /* 파란 단추는 빼요: 흰 글자 위가 하얗게 떠 안 보이던 문제(2026-10-21) */
.icon-btn .badge { background: var(--primary); }

/* 카드·버튼·탭·알약·표 */
.card { border-color: var(--line); border-radius: 13px; box-shadow: 0 3px 10px rgba(23, 36, 59, .03); }
.btn { border-radius: 8px; border-color: var(--line-strong); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.tab { background: transparent; color: var(--muted); border-radius: 8px; height: 38px; padding: 0 14px; font-size: 14px; }
.tab.on { background: var(--primary-soft); color: #244EB5; }
.pill { border-radius: 6px; font-size: 12px; height: 26px; padding: 0 10px; }
.pill::before { display: none; }
.tbl th { background: #F5F7FC; font-weight: 600; }
.input, select.input, select.input-sm { border-color: var(--line-strong); }
.input:focus, select.input:focus { outline-color: var(--primary); border-color: var(--primary); }
.alert-ok { background: var(--ok-soft); }
.bell-item.unread { background: #EEF3FF; }

/* AI 챗봇 화면도 같은 색으로 */
.cb-sum { background: #EEF3FF; border-color: #CAD8FA; }
.cb-sum-head h3, .cb-msg.is-bot .cb-who { color: var(--primary); }
.cb-sum dt { background: #F5F7FC; }
.cb-item.on { background: var(--primary-soft); }
.cb-dot.new { background: var(--primary); }
.cb-msg.is-bot p { background: #EEF3FF; color: #1D3A7A; }
.cb-seg a.on { background: var(--primary); }

/* 격자 안 카드는 위 여백 없이(카드가 들쭉날쭉하던 것 바로잡음) */
[class*="-grid"] > .card + .card, .req-layout > .card + .card { margin-top: 0; }
.req-layout.req-half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* 휴대폰: 위에 브랜드 줄, 아래 흰 탭 줄(파란 강조) */
@media (max-width: 900px) {
  .req-layout.req-half { grid-template-columns: 1fr; }
  .main { padding: 0 16px 92px; }
  .m-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin: 0 -16px 16px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); }
  .m-brand img { width: 28px; height: 28px; object-fit: contain; }
  .crumb { display: none; }
  .page-head { padding-bottom: 16px; margin-bottom: 18px; }
  .page-head h1 { font-size: 25px; }
  .mobile-tabs { background: #fff; border-top: 1px solid var(--line); }
  .mtab { color: #53647E; }
  .mtab.on { color: var(--primary); font-weight: 700; }
}
.tbl td { word-break: keep-all; }
.side-brand img.word { width: auto; height: 19px; object-fit: contain; }
.m-brand img.word { width: auto; height: 17px; object-fit: contain; }
.todo-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .todo-grid.four { grid-template-columns: 1fr 1fr; } }
