/* ============================================================
   BCRM 전체 CSS — 큰 형태(셸 · 토큰 · 컴포넌트 · 테마)
   디자인 기준: ref/design "셀폰ERP" 목업
   원칙: 여기엔 공통/큰 형태만. 세부는 각 폴더의 css 로.
   ============================================================ */

/* ── 폰트 (자체호스팅, CDN 금지) ───────────────────────────── */
@font-face{
  font-family:'Paperlogy';
  src:url('/_lib/Paperlogy-Regular.woff2') format('woff2');
  font-weight:400;          /* 단일 Regular. 700/800 은 브라우저 합성(faux-bold).
                               필요 시 _lib 에 Paperlogy-SemiBold/Bold woff2 추가 후 @font-face 확장 */
  font-style:normal;
  font-display:swap;
}

/* ── 디자인 토큰 ──────────────────────────────────────────── */
:root{
  --accent:#3E6CA6;            /* primary (테마별 override) */
  --accent-soft:#EAF0F7;
  --header-bg:#2A3340;         /* 다크 상단바 */
  --header-bg2:#222A35;
  --header-line:#3C4655;

  --bg:#F4F6F8;               /* 페이지 배경(surface) */
  --card:#ffffff;
  --border:#E1E5EB;
  --border-strong:#CDD3DC;
  --input-border:#D7DCE3;
  --divider:#ECEEF2;
  --row-line:#F1F3F6;
  --thead-bg:#F7F9FB;
  --hover:#F1F4F8;

  --text:#2B333F;
  --heading:#222A35;
  --muted:#6A7480;
  --muted2:#7E8898;
  --muted3:#9AA3AF;

  --success:#4E8A6B; --success-soft:#EFF3EF; --success-text:#43795C;
  --warning:#B5853C; --warning-soft:#F4EEE3; --warning-text:#94702F;
  --danger:#B0564E;  --danger-soft:#F7EBE9;  --danger-border:#EAD3CF; --danger-text:#A1483F;

  --radius:12px;
  --radius-btn:8px;
  --radius-sm:7px;
  --cell-y:12px;               /* density: compact 8 / normal 12 / comfortable 16 */

  --font:'Paperlogy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
         'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

/* ── 폴더(큰 메뉴)별 테마 — 메뉴가 바뀌면 색이 조금씩 달라진다 ── */
.theme-blue  { --accent:#3E6CA6; --accent-soft:#EAF0F7; }
.theme-green { --accent:#4E7C68; --accent-soft:#E8F0EB; }
.theme-indigo{ --accent:#5A5E86; --accent-soft:#ECEDF4; }
.theme-purple{ --accent:#7A5C7D; --accent-soft:#F1EAF1; }
.theme-teal  { --accent:#456B7C; --accent-soft:#E8F0F4; }
.theme-orange{ --accent:#C1703C; --accent-soft:#F6ECE1; }   /* 알뜰폰(MVNO) */

/* ── 알뜰폰(MVNO) 포털 — 상단바를 따뜻한 다크+오렌지로 확실히 구분 ── */
body.portal-mvno{
  --accent:#C1703C; --accent-soft:#F6ECE1;
  --header-bg:#3A2A1E; --header-bg2:#31241A; --header-line:#4A3826;
}
body.portal-mvno .topnav a.is-active{ background:#5A3D24; }

.density-compact{ --cell-y:8px; }
.density-comfortable{ --cell-y:16px; }

/* ── 리셋/베이스 ──────────────────────────────────────────── */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{
  font-family:var(--font);
  font-size:13px;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{ color:inherit; text-decoration:none; }
input,select,button,textarea{ font-family:inherit; font-size:13px; }
h1,h2,h3{ margin:0; color:var(--heading); }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:#CDD3DC; border-radius:6px; border:2px solid var(--bg); }
::-webkit-scrollbar-track{ background:transparent; }

/* ── 버튼 ─────────────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:38px; padding:0 16px; border-radius:var(--radius-btn);
  font-size:13px; font-weight:700; line-height:1;
  border:1px solid transparent; background:transparent; color:var(--text);
  cursor:pointer; white-space:nowrap; transition:filter .12s ease, background .12s ease, border-color .12s ease;
}
.btn:disabled,.btn.is-disabled{ cursor:not-allowed; background:#F2F4F7; color:#B5BCC6; border-color:#E6E9EE; }
.btn svg{ width:15px; height:15px; }
.btn-block{ width:100%; }
.btn-sm{ height:30px; padding:0 13px; border-radius:var(--radius-sm); font-size:12px; }
.btn-lg{ height:46px; padding:0 24px; border-radius:9px; font-size:14px; }

.btn-primary{ background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 1px 2px rgba(0,0,0,.12); }
.btn-primary:hover{ filter:brightness(.94); }
.btn-soft{ background:var(--accent-soft); border-color:var(--accent-soft); color:var(--accent); }
.btn-soft:hover{ filter:brightness(.97); }
.btn-outline{ background:#fff; border-color:var(--border-strong); color:#3A4654; }
.btn-outline:hover{ background:var(--bg); border-color:#B9C1CC; }
.btn-ghost{ background:transparent; color:var(--muted); font-weight:600; }
.btn-ghost:hover{ background:#EAEEF3; }
.btn-success{ background:var(--success); border-color:#4A8264; color:#fff; }
.btn-success:hover{ filter:brightness(.95); }
.btn-danger-soft{ background:var(--danger-soft); border-color:var(--danger-border); color:var(--danger-text); }
.btn-danger-soft:hover{ filter:brightness(.97); }
.btn-danger{ background:var(--danger); border-color:#A85248; color:#fff; }
.btn-danger:hover{ filter:brightness(.95); }

.iconbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:var(--radius-btn);
  border:1px solid var(--border-strong); background:#fff; color:#5A6573; cursor:pointer;
}
.iconbtn:hover{ background:var(--bg); }
.iconbtn svg{ width:16px; height:16px; }

/* ── 폼 필드 ──────────────────────────────────────────────── */
.field{ margin-bottom:14px; }
.label{ display:block; font-size:11.5px; font-weight:600; color:var(--muted2); margin-bottom:6px; }
.label .req{ color:var(--danger); }
.input,.select,.textarea{
  width:100%; height:38px; padding:0 12px;
  border:1px solid var(--input-border); border-radius:var(--radius-btn);
  background:#fff; color:var(--text); font-size:13px; font-weight:500; outline:none;
  transition:border-color .12s ease, box-shadow .12s ease;
}
.textarea{ height:auto; min-height:92px; padding:11px 13px; line-height:1.6; resize:vertical; }
.input:focus,.select:focus,.textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.input::placeholder,.textarea::placeholder{ color:var(--muted3); }
/* iOS Safari: 폼요소 font-size<16px 이면 포커스 시 화면이 자동 확대됨 → 모바일에서 16px 로 고정(확대 방지).
   ≥16px 이 유일한 안정적 해법(iOS 는 viewport user-scalable=no 를 무시함). */
@media (max-width: 768px){
  /* iOS 는 폼컨트롤 font-size<16px 이면 포커스 시 자동 확대 → 모바일에선 무조건 16px.
     컴포넌트별 작은 font-size(.pr-bulk .input 등 높은 우선순위)를 이기려면 !important 필요. */
  input, select, textarea, .input, .select, .textarea,
  .stl-fl .input, .stl-fl .select, .inv-flt .select, .wo-formcard .input, .wo-formcard .select,
  .pr-bulk .input, .mp-keyrow .input, .mp-keyinput, .si-table input.input, .si-table select.select,
  .stlm-fmgrid .stl-fl .input, .stlm-frow input.stlm-fval, .mpick-search{ font-size:16px !important; }
}

/* ── 상태 뱃지 ────────────────────────────────────────────── */
.badge{
  display:inline-flex; align-items:center; gap:6px;
  height:28px; padding:0 11px; border-radius:var(--radius-sm);
  font-size:12px; font-weight:600;
}
.badge .dot{ width:6px; height:6px; border-radius:50%; }
.badge-success{ background:var(--success-soft); color:var(--success-text); }
.badge-success .dot{ background:var(--success); }
.badge-warning{ background:var(--warning-soft); color:var(--warning-text); }
.badge-danger{ background:var(--danger-soft); color:var(--danger-text); }
.badge-muted{ background:#F1F4F8; color:#5A6573; }

/* ── 카드 ─────────────────────────────────────────────────── */
.card{ background:var(--card); border:1px solid var(--border); border-radius:var(--radius); }
.card-pad{ padding:18px 20px; }
.card-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:15px 20px; border-bottom:1px solid var(--divider);
}
.card-head h2{ font-size:15px; font-weight:700; }

/* ── 테이블 = div-grid (★ <table> 아님 / DataTables 미사용) ── */
.grid-table{ width:100%; }
.grid-scroll{ overflow-x:auto; }
.grid-table .gt-head,
.grid-table .gt-row{ display:grid; align-items:center; }
.grid-table .gt-head{
  background:var(--thead-bg); color:var(--muted2);
  font-size:12px; font-weight:600; border-bottom:1px solid var(--divider);
}
.grid-table .gt-row{ border-bottom:1px solid var(--row-line); font-size:12.5px; }
.grid-table .gt-row:hover{ background:#FAFBFC; }
.grid-table .gt-cell{ padding:var(--cell-y) 16px; }
.grid-table .num{ text-align:right; font-variant-numeric:tabular-nums; }
.grid-table .center{ text-align:center; }
.grid-empty{ padding:40px 16px; text-align:center; color:var(--muted3); }

/* 페이저 (게시판·목록 공용) */
.bd-paging{ display:flex; justify-content:center; gap:4px; padding:16px; }
.bd-page{ min-width:32px; height:32px; padding:0 8px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border); border-radius:7px; color:var(--muted); font-size:12.5px; font-weight:600; }
.bd-page:hover{ background:var(--hover); }
.bd-page.is-active{ background:var(--accent); border-color:var(--accent); color:#fff; }

/* ── 앱 셸 (상단바 + 사이드바 + 메인) ─────────────────────── */
.app{ height:100vh; display:flex; flex-direction:column; }

.topbar{
  height:52px; flex-shrink:0; background:var(--header-bg);
  display:flex; align-items:center; gap:18px; padding:0 18px; color:#EAEDF1;
}
.topbar .brand{ display:flex; align-items:center; gap:9px; }
.brand-mark{
  width:26px; height:26px; border-radius:6px; background:var(--accent);
  display:inline-flex; align-items:center; justify-content:center;
}
.brand-word{ color:#EAEDF1; font-weight:700; font-size:14.5px; letter-spacing:-.2px; }

/* ── 로고 포털 스위처 (BCRM · 알뜰폰 세그먼트 토글, 둘 다 표시) ── */
.brand-toggle{ gap:11px; flex-shrink:0; }   /* 겸업(BCRM/알뜰폰) 브랜드영역: 폭이 좁아져도 줄지 않음 */
.portal-toggle{
  display:inline-flex; flex-shrink:0; white-space:nowrap; gap:2px; padding:2px;   /* 세그먼트 토글: 어떤 폭에서도 줄바꿈 금지 */
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.14); border-radius:8px;
}
.pt-opt{
  display:inline-flex; align-items:center; line-height:1; white-space:nowrap;   /* BCRM/알뜰폰 라벨 줄바꿈 금지 */
  padding:5px 12px; border-radius:6px; font-size:12.5px; font-weight:700; color:#A4AEBD;
}
.pt-opt:hover{ color:#EAEDF1; }
.pt-opt.is-on{ color:#fff; background:var(--accent); box-shadow:0 1px 2px rgba(0,0,0,.22); }
/* 포털 스위처: PC=세그먼트 토글 / 모바일=Select(공간 절약). 기본(PC)은 select 숨김 */
.portal-select{ display:none; position:relative; margin:0; }
.topbar .sep{ width:1px; height:22px; background:var(--header-line); }
.topnav{ display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; }
.topnav::-webkit-scrollbar{ display:none; }
.topnav a{ padding:7px 13px; border-radius:6px; color:#A4AEBD; font-weight:500; font-size:12.5px; white-space:nowrap; }
.topnav a:hover{ color:#EAEDF1; }
.topnav a.is-active{ color:#fff; font-weight:600; background:#384354; }
.topbar .spacer{ flex:1; }
.topbtn{
  display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 11px; border-radius:7px;
  border:1px solid var(--header-line); background:var(--header-bg2); color:#A4AEBD;
  font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap;
}
.topbtn:hover{ color:#EAEDF1; }
.topbtn svg{ width:15px; height:15px; }
.topuser{ display:flex; align-items:center; gap:8px; }
.topuser .avatar{
  width:32px; height:32px; border-radius:50%; background:var(--accent); color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px;
}
.topuser .who{ line-height:1.3; }
.topuser .who .nm{ color:#E6E9EE; font-weight:600; font-size:12.5px; }
.topuser .who .sub{ color:#7E8898; font-size:11px; }
/* 상단 통합검색(사용자명 자리) */
.topsearch{ display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:8px; padding:0 10px; height:32px; }
.topsearch-ic{ display:inline-flex; color:#9AA3AF; }
.topsearch-ic svg{ width:14px; height:14px; }
.topsearch-in{ background:transparent; border:0; outline:none; color:#E6E9EE; font-size:12.5px; width:160px; height:100%; padding:0; }
.topsearch-in::placeholder{ color:#7E8898; }

.shell-body{ flex:1; display:flex; min-height:0; }

.sidebar{
  width:212px; flex-shrink:0; background:#fff; border-right:1px solid var(--border);
  display:flex; flex-direction:column; padding:14px 12px; overflow-y:auto;
}
.side-section{ font-size:10.5px; font-weight:700; color:var(--muted3); letter-spacing:.6px; padding:6px 10px 8px; }
.side-section + .side-item{ margin-top:0; }
.side-item{
  display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:8px;
  color:#5A6573; font-weight:500; margin-bottom:2px;
}
.side-item svg{ width:17px; height:17px; }
.side-item:hover{ background:var(--hover); }
.side-item.is-active{ color:#fff; background:var(--accent); font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.18); }
.side-hr{ height:1px; background:var(--border); margin:8px 8px; }

/* 처리 대기 건수 배지 — 메인 탭(nav-badge=폴더 합계) + 서브메뉴(side-badge=페이지별). 0이면 숨김, 실시간 토글 */
.topnav a{ position:relative; }
.nav-badge{ display:none; min-width:17px; height:17px; padding:0 5px; margin-left:5px; border-radius:9px;
  background:#e5484d; color:#fff; font-size:10.5px; font-weight:700; line-height:17px; text-align:center;
  vertical-align:middle; box-sizing:border-box; }
.nav-badge.is-on{ display:inline-block; }
.side-item{ position:relative; }
.side-badge{ display:none; margin-left:auto; min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:#e5484d; color:#fff; font-size:11px; font-weight:700; line-height:18px; text-align:center; box-sizing:border-box; }
.side-badge.is-on{ display:inline-block; }
.side-spacer{ flex:1; }

.main{ flex:1; min-width:0; overflow-y:auto; padding:20px 32px 40px 24px; scrollbar-gutter:stable; }
.breadcrumb{ font-size:11.5px; color:var(--muted3); margin-bottom:5px; }
.breadcrumb .sep{ margin:0 6px; color:#C7CDD6; }
.page-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }   /* 권한설정(_permission.php) 등 자체 페이지에서 제목+액션 */
.page-title{ font-size:21px; font-weight:800; letter-spacing:-.5px; }
.page-actions{ display:flex; gap:8px; }

/* 셸 헤더: 큰 제목(h1) 제거 → breadcrumb 한 줄만. 톱니(super)만 우측에 얹어 상단 여백 없이 본문이 위로. */
.main-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.main-head .breadcrumb{ margin-bottom:0; }

/* 준비중(미구현 페이지) placeholder */
.page-placeholder{ padding:48px 24px; text-align:center; }
.page-placeholder .pp-icon{
  width:54px; height:54px; margin:0 auto 14px; border-radius:14px;
  background:var(--accent-soft); color:var(--accent);
  display:flex; align-items:center; justify-content:center;
}
.page-placeholder .pp-icon svg{ width:26px; height:26px; }
.page-placeholder h2{ font-size:17px; font-weight:800; margin-bottom:6px; }
.page-placeholder p{ color:var(--muted); margin:0; }

/* ── 로그인 성공 임시 랜딩(작업1) ─────────────────────────── */
.placeholder-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.placeholder-card{ max-width:520px; width:100%; padding:32px 30px; text-align:center; }
.placeholder-badge{
  display:inline-block; background:var(--accent-soft); color:var(--accent);
  font-weight:700; font-size:12px; padding:5px 12px; border-radius:999px; margin-bottom:14px;
}
.placeholder-title{ font-size:20px; font-weight:800; margin-bottom:8px; }
.placeholder-sub{ color:var(--muted); margin:0 0 6px; }
.placeholder-note{ color:var(--muted3); font-size:12px; margin:0 0 20px; }

/* ── 모달 (레이어 팝업) ─────────────────────────────── */
.modal{ position:fixed; inset:0; z-index:1000; display:flex; align-items:flex-start; justify-content:center;
  padding:48px 16px; overflow:auto; }
.modal[hidden]{ display:none; }
.modal-overlay{ position:fixed; inset:0; background:rgba(20,28,40,.46); }
.modal-dialog{ position:relative; z-index:1; width:100%; max-width:760px; background:var(--card);
  border-radius:14px; box-shadow:0 24px 64px rgba(15,23,42,.28); animation:modal-in .14s ease-out;
  display:flex; flex-direction:column; max-height:calc(100vh - 96px); }   /* 뷰포트보다 커지지 않게 — 내부 스크롤 */
@keyframes modal-in{ from{ transform:translateY(8px); opacity:0; } to{ transform:none; opacity:1; } }
.modal-x{ position:absolute; top:14px; right:14px; z-index:3; width:32px; height:32px; border:0; background:transparent;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; line-height:1; cursor:pointer; color:var(--muted3); border-radius:8px; }
.modal-x:hover{ background:var(--hover); color:var(--text); }
.modal-body{ padding:18px 20px; overflow-y:auto; min-height:0; }   /* 내용이 길면 여기서 스크롤(다이얼로그 높이는 뷰포트 이내) */
.modal-loading{ padding:48px 0; text-align:center; color:var(--muted); }
body.modal-open{ overflow:hidden; }

/* ── 권한설정 (.perm-*) ─────────────────────────────── */
.perm-wrap{ max-width:760px; margin:0 auto; padding:28px 20px; }
.perm-head{ margin-bottom:16px; }
.perm-note{ margin-bottom:16px; }
.perm-note p{ margin:0; color:var(--muted); }
.perm-sec{ margin-bottom:16px; }
.perm-err{ margin-bottom:12px; color:var(--danger-text); font-size:12.5px; }
.perm-ok{ margin-bottom:12px; padding:9px 12px; border-radius:8px; background:var(--success-soft); color:var(--success-text); font-size:12.5px; }

/* 공개/비공개 토글 */
.perm-toggle{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.perm-state{ font-size:13px; color:var(--text); }
.perm-toggle-btns{ display:flex; gap:8px; }

/* 항상 허용 (super) */
.perm-always{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.perm-always-label{ font-weight:700; color:var(--accent); font-size:12.5px; white-space:nowrap; }
.perm-always-names{ color:var(--text); font-size:13px; }

/* 허용 회원 목록 + 검색 */
.perm-grant{ margin-bottom:16px; }
.perm-grant .gt-head, .perm-grant .gt-row{ grid-template-columns:1fr 1fr 80px; }
.perm-search{ display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; }
.perm-search .field{ margin:0; flex:1; min-width:200px; }
.perm-search .input{ width:100%; }
.perm-results{ margin-top:12px; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.perm-result-row{ display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:9px 12px; border-bottom:1px solid var(--row-line); }
.perm-result-row:last-child{ border-bottom:none; }
.perm-result-who{ font-size:13px; color:var(--text); }
.perm-result-who em{ color:var(--muted3); font-style:normal; font-size:12px; margin-left:7px; }

/* ── 모바일: 메뉴만 대응(내용은 데스크톱 그대로) ───────────── */
@media (max-width: 768px){
  /* 상단바: 폴더 메뉴가 남은 폭 차지 + 가로 스크롤(드래그), 우측은 아이콘만 */
  .topbar{ height:50px; gap:8px; padding:0 10px; }
  .topbar .brand{ gap:6px; }
  .topbar .brand-word{ display:none; }   /* 상단바 전용(로그인 .login-brand 는 영향 없게 스코프) */
  /* 모바일: BCRM/알뜰폰 세그먼트 → Select 로 전환(가로 공간 절약) */
  .portal-toggle{ display:none; }
  .portal-select{ display:inline-flex; align-items:center; }
  .portal-select::after{ content:''; position:absolute; right:9px; top:50%; margin-top:-2px; pointer-events:none;
    border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid #A4AEBD; }
  .portal-select select{ -webkit-appearance:none; appearance:none; cursor:pointer;
    height:30px; padding:0 24px 0 10px; border-radius:7px; color:#EAEDF1; font-size:12.5px; font-weight:700;
    background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.18); }
  .portal-select select:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .topbar .sep{ display:none; }
  .topbar .spacer{ display:none; }
  .topnav{ flex:1 1 auto; min-width:0; }
  .topuser{ gap:0; }
  .topuser .who{ display:none; }              /* 회원이름/역할 텍스트 숨김 → 아바타만 */
  .topsearch{ display:none; }                 /* 모바일: 상단 통합검색 숨김 */
  .topbtn{ width:32px; padding:0; gap:0; justify-content:center; }
  .topbtn-label{ display:none; }              /* 로그아웃 텍스트 숨김 → 아이콘만(모바일) */

  /* 사이드바(현재 폴더 페이지): 가로 스크롤 바로 전환 */
  .shell-body{ flex-direction:column; }
  .sidebar{ width:100%; height:auto; flex-direction:row; align-items:center;
    overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
    border-right:none; border-bottom:1px solid var(--border); padding:8px 10px; gap:6px; }
  .sidebar::-webkit-scrollbar{ display:none; }
  .side-section{ display:none; }
  .side-item{ flex:0 0 auto; white-space:nowrap; margin-bottom:0; padding:8px 12px; }
  .side-spacer{ display:none; }

  /* 본문은 그대로(모바일 전용 제작 안 함) — 패딩만 축소, 넘치면 자체 가로 스크롤 */
  .main{ padding:16px 14px 32px; scrollbar-gutter:auto; }
}

/* Daum 우편번호 레이어 팝업(전역, 모달 위) */
.daum-postlayer{ position:fixed; inset:0; z-index:11000; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:20px; }
.daum-postbox{ width:480px; max-width:96vw; height:560px; max-height:92vh; background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.35); display:flex; flex-direction:column; }
.daum-postbar{ display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid #e5e7eb; font-size:14px; font-weight:700; color:#0f172a; }
/* 기기/요금제 선택 팝업 — 넓게 + 검색 입력 디자인 보장(app.css=양 사이드 캐시버스팅·높은 특이도로 MobileSale.css 스테일 캐시 방어) */
.daum-postbox.wo-addonbox{ width:680px; height:auto; max-height:88vh; }
.daum-postbox.wo-addonbox .mpick-search{ width:calc(100% - 16px); height:38px; margin:8px 8px 6px; padding:0 12px; border:1px solid var(--input-border); border-radius:var(--radius-btn,8px); background:#fff; color:var(--text); font-size:13px; box-sizing:border-box; }
.daum-postbox.wo-addonbox .mpick-search:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); outline:none; }
.daum-postbox.wo-addonbox .wo-bothsearch{ display:flex; gap:8px; align-items:stretch; padding:8px 8px 6px; }
.daum-postbox.wo-addonbox .wo-bothsearch .mpick-search{ flex:1 1 auto; width:auto; margin:0; }
.daum-postclose{ appearance:none; border:0; background:none; font-size:22px; line-height:1; cursor:pointer; color:#64748b; padding:0 4px; }
.daum-postclose:hover{ color:#ef4444; }
.daum-postwrap{ flex:1; min-height:0; }

/* 개통신청서 첨부 편집 목록(order_file_edit_list) — 파일명 열기 + 이미지 hover 미리보기 + ✕삭제 */
.wo-flist{ display:flex; flex-direction:column; gap:5px; margin-top:8px; }
.wo-flist-empty{ color:var(--muted3); font-size:12px; }
.wo-fitem{ display:inline-flex; align-items:center; gap:6px; max-width:100%; }
.wo-fname{ text-decoration:none; color:var(--accent); font-size:12.5px; word-break:break-all; }
.wo-fname:hover{ text-decoration:underline; }
.wo-fdel{ flex:0 0 auto; border:0; background:transparent; color:var(--muted3); cursor:pointer; font-size:12px; line-height:1; padding:2px 5px; border-radius:5px; }
.wo-fdel:hover{ color:#dc2626; background:var(--hover); }
.wo-fdel:disabled{ opacity:.4; cursor:default; }
.wo-fview{ flex:0 0 auto; border:0; background:transparent; color:var(--muted2); cursor:pointer; font-size:13px; line-height:1; padding:2px 5px; border-radius:5px; }
.wo-fview:hover{ color:var(--accent); background:var(--hover); }
/* 👁 클릭 → 라이트박스(전체화면 오버레이, 클릭/Esc 로 닫힘). 링크를 가리지 않도록 hover 아닌 click 방식 */
.wo-fprev{ display:none; }
.wo-fprev.is-open{ display:flex; position:fixed; inset:0; z-index:12000; align-items:center; justify-content:center; padding:20px; background:rgba(15,23,42,.72); cursor:zoom-out; }
.wo-fprev.is-open > img{ max-width:92vw; max-height:88vh; width:auto; height:auto; border-radius:8px; box-shadow:0 12px 48px rgba(0,0,0,.5); }

/* 개통 상세(읽기전용: 개통조회·통합검색·리스트 상세모달) 첨부: 파일명(다운로드) + 새창열기 + 이미지 인라인 미리보기 */
/* 첨부만 보는 모달: .wd(섹션 그리드) 대신 전체폭 블록 → 갤러리가 한 열에 갇히지 않음. 넓은 모달에서도 적정폭 중앙정렬 */
.wd-attach{ max-width:840px; margin:0 auto; }
/* 반응형 갤러리(그리드): 이미지는 최소 180px 타일로 자동 배치(좁으면 2열, 넓으면 여러 열) → 옆으로 나란히. 일반 파일은 한 줄 전체 */
.wd-files{ display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:12px; align-items:start; }
.wd-fitem{ display:flex; flex-direction:column; gap:5px; min-width:0; }
.wd-fitem:not(.is-img){ grid-column:1 / -1; }          /* 일반 파일: 한 줄 전체 */
.wd-fitem.is-img .wd-file{ overflow-wrap:anywhere; }   /* 긴 파일명이 타일 폭을 넘치지 않도록 */
.wd-frow{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.wd-fopen{ font-size:12px; text-decoration:none; color:var(--muted2); border:1px solid var(--row-line); border-radius:6px; padding:2px 9px; white-space:nowrap; }
.wd-fopen:hover{ color:var(--accent); border-color:var(--accent); }
.wd-fprev{ display:block; line-height:0; }
.wd-fprev > img{ display:block; width:100%; max-height:280px; object-fit:contain; border-radius:8px; border:1px solid var(--row-line); background:var(--bg,#f6f7f9); }
/* 첨부 PDF 정적 미리보기(pdfpreview.js) — 페이지별 canvas→PNG 썸네일, 컨테이너 너비에 맞춤 */
.wd-fpdf{ display:flex; flex-direction:column; gap:10px; margin-top:2px; }
.pdfprev-pagewrap{ position:relative; border:1px solid var(--row-line); border-radius:8px; overflow:hidden; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.pdfprev-page{ display:block; width:100%; height:auto; }
.pdfprev-pnum{ position:absolute; bottom:6px; right:8px; font-size:11px; font-weight:600; background:rgba(20,28,40,.6); color:#fff; padding:1px 8px; border-radius:999px; pointer-events:none; }
.pdfprev-status, .pdfprev-more{ font-size:12px; color:var(--muted3); padding:6px 2px; }
.pdfprev-more{ text-align:center; }

/* 개통철회/전취소 재고 입고위치 선택 팝업 */
.wo-retchoice{ text-align:center; padding:6px 4px; }
.wo-retchoice > h3{ margin:0 0 8px; font-size:16px; color:var(--heading); }
.wo-retchoice > p{ margin:0 0 16px; font-size:13px; color:var(--muted); }
.wo-retbtns{ display:flex; flex-direction:column; gap:8px; }
/* 할당취소 안내문(할당 이전 복원 버튼 아래) — 구분선으로 '기본 / 수동지정' 을 나눈다 */
.wo-rethint{ margin:8px 0 14px; padding-bottom:14px; border-bottom:1px solid var(--divider, var(--row-line));
  font-size:12px; line-height:1.5; color:var(--muted2); text-align:left; }
.wo-retfoot{ margin-top:12px; }

/* 교품 재고 선택 팝업 */
.wo-exch > h3{ margin:0 0 6px; font-size:16px; color:var(--heading); }
.wo-exch > p{ margin:0 0 12px; font-size:12.5px; color:var(--muted); }
.wo-exchlist{ display:flex; flex-direction:column; gap:6px; max-height:50vh; overflow:auto; }
.wo-exchrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; text-align:left; border:1px solid var(--row-line); background:var(--card); border-radius:8px; padding:9px 12px; cursor:pointer; }
.wo-exchrow:hover{ border-color:var(--accent); background:var(--hover); }
.wo-exchrow > b{ font-size:13px; color:var(--heading); }
.wo-exchrow > span{ font-size:12px; color:var(--muted2); }
.wo-exchfoot{ margin-top:12px; text-align:center; }

/* 처리이력 타임라인(order_hist_li — 무선/유선 상세·모달 공용) */
.wo-histbox > h4{ margin:0 0 14px; font-size:15px; font-weight:800; color:var(--heading); }
.wd-hist{ list-style:none; margin:0; padding:0; }
.mh-item{ position:relative; padding:9px 0 9px 20px; border-left:2px solid var(--row-line); }
.mh-item::before{ content:""; position:absolute; left:-6px; top:14px; width:10px; height:10px; border-radius:50%; background:var(--accent); border:2px solid var(--card); box-shadow:0 0 0 1px var(--row-line); }
.mh-item:last-child{ border-left-color:transparent; }
.mh-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mh-trans{ display:inline-flex; align-items:center; gap:4px; }
.mh-trans > i{ color:var(--muted3); font-style:normal; font-size:12px; }
.mh-act{ font-size:11px; font-weight:700; color:var(--accent); background:var(--accent-soft); border-radius:5px; padding:1px 7px; }
.mh-meta{ margin-left:auto; font-size:11.5px; color:var(--muted2); white-space:nowrap; }
.mh-note{ margin-top:6px; display:flex; flex-wrap:wrap; gap:5px; }
.mh-chg{ font-size:11.5px; color:var(--heading); background:var(--hover); border:1px solid var(--row-line); border-radius:6px; padding:2px 8px; }
.mh-txt{ display:block; font-size:12px; color:var(--muted); background:var(--hover); border-radius:6px; padding:6px 10px; }

/* 매장(_shop) 날짜입력을 브라우저 언어와 무관하게 '연도. 월. 일.' 로 표시(manager.js kEnh 가 감쌈).
   보이는 필드=.kdate-disp / 실제 date 입력은 완전 투명(opacity:0)하게 위에 겹침 → 네이티브 yyyy.mm.dd 는 절대 안 보임, 클릭 시 달력만 열림. */
.kdate{ position:relative; display:block; }
.kdate > .kdate-disp{
  display:flex; align-items:center; height:38px; padding:0 34px 0 12px;
  border:1px solid var(--input-border); border-radius:var(--radius-btn); background:#fff no-repeat right 11px center;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  color:var(--text); font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; cursor:pointer;
}
.kdate > .kdate-disp.is-ph{ color:var(--muted2); font-weight:400; }
.kdate > input[type="date"]{ position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; border:0; background:transparent; opacity:0; cursor:pointer; }

/* ══════════════════════════════════════════════════════════
   게시판(.bd-*) — 공용 컴포넌트 (구 _manager/Dashboard/Dashboard.css).
   공지/정책/메뉴얼/개발자노트 + 영업 회의록 등 모든 게시판 페이지 공용.
   ══════════════════════════════════════════════════════════ */
/* ── 목록 ─────────────────────────────────────────────── */
.bd-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border-bottom:1px solid var(--divider); flex-wrap:wrap; }
.bd-search{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bd-search .select{ width:auto; min-width:130px; }
.bd-search-input{ width:240px; max-width:48vw; }

.bd-row{ cursor:pointer; color:inherit; }
.bd-row .bd-subject{ font-weight:600; color:var(--heading); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bd-notice{ background:var(--accent-soft); }
.bd-notice-txt{ color:var(--accent); font-weight:700; font-size:12px; white-space:nowrap; }
.bd-notice .bd-subject strong{ color:var(--accent); }
.bd-badge-cmt{ display:inline-block; margin-left:6px; padding:0 7px; height:18px; line-height:18px;
  border-radius:9px; background:var(--accent-soft); color:var(--accent); font-size:11px; font-weight:700; vertical-align:middle; }
.bd-badge-file{ margin-left:6px; font-size:12px; }
.bd-badge-file[data-bd-dl]{ cursor:pointer; border-radius:5px; padding:0 2px; }   /* 클릭 시 첨부 바로 다운로드 */
.bd-badge-file[data-bd-dl]:hover{ background:var(--hover); }
.bd-row.is-current{ background:var(--accent-soft); box-shadow:inset 3px 0 0 var(--accent); }
.bd-row.is-current .bd-subject{ color:var(--accent); }

/* 리스트 행 메타(제목 아래 이름·날짜) — 데스크톱은 숨김, 모바일에서 노출 */
.bd-rmeta{ display:none; }
.bd-rmeta .bd-rn{ color:var(--muted2); font-weight:600; }
.bd-rmeta .bd-rn::after{ content:'·'; margin:0 5px; color:var(--muted3); font-weight:400; }
.bd-rmeta .bd-rd{ color:var(--muted3); font-variant-numeric:tabular-nums; }

/* 게시판 리스트 모바일: 그리드 행 → 카드(제목 + 이름·날짜). .bd-list 로 스코프(전역 .grid-table 영향 없음) */
@media (max-width:640px){
  .bd-list .grid-table .gt-head{ display:none; }
  .bd-list .grid-table .gt-row{ display:flex; flex-direction:column; align-items:stretch; gap:2px; padding:11px 14px; }   /* flex → 인라인 grid-template-columns 무시 */
  .bd-list .grid-table .gt-row > .gt-cell{ display:none; padding:0; }
  .bd-list .grid-table .gt-row > .gt-cell.bd-subject{ display:block; white-space:normal; overflow:visible; text-overflow:clip; font-size:14px; line-height:1.45; font-weight:600; }
  .bd-list .grid-table .gt-row > .gt-cell.bd-subject > strong{ font-weight:700; }
  .bd-list .bd-notice .bd-subject::before{ content:'[공지] '; color:var(--accent); font-weight:700; }
  .bd-list .bd-reply-row .bd-subject{ padding-left:20px; }
  .bd-rmeta{ display:flex; align-items:baseline; flex-wrap:wrap; margin-top:5px; font-size:11.5px; }
}

/* 글 보기 화면 하단에 이어 붙는 목록 간격 */
.bd-view + .bd-list{ margin-top:16px; }


/* ── 단일 글 보기 ─────────────────────────────────────── */
.bd-view-head{ padding:20px 22px 16px; border-bottom:1px solid var(--divider); }
.bd-view-titles{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.bd-view-title{ font-size:19px; font-weight:800; letter-spacing:-.3px; }
.bd-view-meta{ display:flex; gap:14px; color:var(--muted2); font-size:12px; }

.bd-attach{ padding:14px 22px; border-bottom:1px solid var(--divider); display:flex; flex-direction:column; gap:8px; background:var(--thead-bg); }
.bd-attach-item{ display:inline-flex; align-items:center; gap:8px; color:var(--text); font-size:12.5px; width:fit-content; }
.bd-attach-item:hover{ color:var(--accent); text-decoration:underline; }
.bd-attach-item svg{ width:15px; height:15px; color:var(--muted2); }
.bd-attach-item em{ color:var(--muted3); font-style:normal; font-size:11.5px; }

.bd-content{ padding:22px; min-height:160px; color:var(--text); font-size:14px; line-height:1.75; word-break:break-word; }
.bd-content img{ max-width:100%; height:auto; }
.bd-content table{ border-collapse:collapse; max-width:100%; }
.bd-content table td, .bd-content table th{ border:1px solid var(--border-strong); padding:6px 9px; }
.bd-content a{ color:var(--accent); text-decoration:underline; }
.bd-content h1,.bd-content h2,.bd-content h3{ margin:14px 0 8px; }
.bd-content ul,.bd-content ol{ padding-left:22px; margin:8px 0; }
.bd-content p{ margin:0 0 10px; }
.bd-locked{ color:var(--muted); text-align:center; padding:30px 0; }

.bd-view-actions{ display:flex; align-items:center; gap:8px; padding:16px 22px; border-top:1px solid var(--divider); }
.bd-inline-form{ display:inline; }

/* ── 댓글 ─────────────────────────────────────────────── */
.bd-comments{ padding:18px 22px 22px; border-top:1px solid var(--divider); background:#FCFCFD; }
.bd-comments-title{ font-weight:700; color:var(--heading); margin-bottom:12px; }
.bd-comment{ padding:11px 0; border-bottom:1px solid var(--row-line); }
.bd-comment-head{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.bd-comment-who{ font-weight:700; font-size:12.5px; color:var(--heading); }
.bd-comment-date{ color:var(--muted3); font-size:11.5px; }
.bd-comment-del{ background:none; border:none; color:var(--muted3); font-size:11.5px; cursor:pointer; padding:0; }
.bd-comment-del:hover{ color:var(--danger); }
.bd-comment-body{ font-size:13px; color:var(--text); line-height:1.6; }
.bd-comment-form{ display:flex; gap:8px; align-items:flex-end; margin-top:14px; }
.bd-comment-form .textarea{ flex:1; min-height:48px; }
/* 답글: 작성배너 / 대댓글(들여쓰기) / 답글토글 / 목록 답글행 */
.bd-reply-banner{ background:var(--hover); border:1px solid var(--row-line); border-radius:8px; padding:8px 12px; font-size:12.5px; color:var(--muted2); margin-bottom:12px; }
.bd-reply-banner strong{ color:var(--heading); }
.bd-comment-reply{ margin-left:24px; border-left:2px solid var(--row-line); padding-left:12px; background:#FAFBFC; }
.bd-reply-toggle{ margin:2px 0 6px; }
.bd-reply-toggle > summary{ display:inline-block; cursor:pointer; font-size:11.5px; color:var(--accent); list-style:none; padding:2px 0; }
.bd-reply-toggle > summary::-webkit-details-marker{ display:none; }
.bd-reply-toggle[open] > summary{ color:var(--muted3); }
.bd-reply-form{ margin:6px 0 10px 24px; }
.bd-reply-row{ background:#FCFDFE; }
.bd-reply-mark{ color:var(--muted3); font-weight:700; }
.bd-reply-row .bd-subject{ color:var(--muted2); padding-left:28px; position:relative; }
.bd-reply-row .bd-subject::before{ content:'└'; position:absolute; left:10px; color:var(--muted3); }
/* 게시판 관리(설정) 패널 */
.bd-config-h{ font-size:16px; font-weight:700; color:var(--heading); margin:0 0 16px; }
.bd-cfg-sec{ padding:14px 0; border-bottom:1px solid var(--row-line); }
.bd-cfg-sec:last-of-type{ border-bottom:0; }
.bd-cfg-sec h3{ font-size:13px; font-weight:700; color:var(--heading); margin:0 0 10px; }
.bd-config-form .bd-check, .bd-config-form .bd-radio{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text); margin-right:18px; cursor:pointer; }
.bd-cfg-users{ margin-top:8px; }
.bd-userselect{ min-width:280px; max-width:440px; height:auto; }
.bd-cfg-hint{ font-size:11.5px; color:var(--muted3); margin-top:4px; }
.bd-cfg-row{ display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap; margin-top:8px; }
.bd-cfg-row .field{ display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted2); }
.bd-cfg-grow{ flex:1 1 260px; } .bd-cfg-grow .input{ width:100%; }
/* 글쓰기 + 톱니(관리) 붙은 그룹, 톱니는 다른 색(슬레이트) */
.bd-write-group{ display:inline-flex; align-items:stretch; }
.bd-write-group .btn:not(:last-child){ border-top-right-radius:0; border-bottom-right-radius:0; }
.bd-write-group .btn:not(:first-child){ border-top-left-radius:0; border-bottom-left-radius:0; margin-left:-1px; }
.bd-gear{ display:inline-flex; align-items:center; justify-content:center; padding:0 11px; background:#334155; color:#fff; border:1px solid #334155; }
.bd-gear:hover{ background:#1e293b; color:#fff; }
.bd-gear svg{ display:block; }
.bd-perm-sec{ margin-top:14px; }
/* 관리 패널: 권한자 즉시 토글 + AJAX(리로드 없음) */
.bd-perm{ padding:14px 0; border-bottom:1px solid var(--row-line); }
.bd-perm:last-of-type{ border-bottom:0; }
.bd-perm > h3{ font-size:13px; font-weight:700; color:var(--heading); margin:0 0 8px; }
.bd-perm-mgr{ margin-top:10px; padding:12px; border:1px solid var(--row-line); border-radius:10px; background:var(--hover); }
.bd-perm-mgr[hidden]{ display:none; }
.bd-perm-list{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; min-height:4px; }
.bd-perm-empty{ font-size:12px; color:var(--muted3); }
.bd-chip{ display:inline-flex; align-items:center; gap:6px; padding:4px 6px 4px 11px; border-radius:14px; background:var(--accent-soft, #eef2ff); color:var(--accent); font-size:12.5px; }
.bd-chip b{ font-weight:700; } .bd-chip em{ font-style:normal; color:var(--muted2); }
.bd-chip-x{ appearance:none; border:0; background:none; cursor:pointer; color:var(--accent); font-size:15px; line-height:1; padding:0 2px; }
.bd-chip-x:hover{ color:var(--danger,#dc2626); }
.bd-perm-search{ position:relative; max-width:340px; }
.bd-perm-search .input{ width:100%; }
.bd-perm-results{ position:absolute; z-index:20; left:0; right:0; top:calc(100% + 3px); background:var(--card); border:1px solid var(--border); border-radius:10px; box-shadow:0 10px 30px rgba(15,23,42,.16); max-height:240px; overflow-y:auto; padding:6px; display:none; }
.bd-perm-results.is-open{ display:block; }
.bd-perm-ritem{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 8px; border-radius:7px; cursor:pointer; font-size:13px; }
.bd-perm-ritem:hover{ background:var(--hover); }
.bd-perm-ritem em{ font-style:normal; color:var(--muted3); font-size:11.5px; margin-left:6px; }
.bd-perm-rempty{ padding:10px; text-align:center; color:var(--muted3); font-size:12.5px; }
.bd-cfg-toast{ position:fixed; right:18px; bottom:18px; background:#16894a; color:#fff; padding:10px 16px; border-radius:8px; font-size:13px; box-shadow:0 8px 24px rgba(0,0,0,.2); opacity:0; transform:translateY(8px); transition:.2s; z-index:9999; }
.bd-cfg-toast.is-on{ opacity:1; transform:none; }
/* 카테고리 관리(참조): 이름 인라인 수정 + 삭제 + 추가 */
.bd-catlist{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; min-height:4px; }
.bd-catchip{ display:inline-flex; align-items:center; gap:2px; padding:2px 2px 2px 4px; border:1px solid var(--row-line); border-radius:8px; background:var(--card); }
.bd-catname{ width:120px; height:30px; border:0; background:transparent; font-size:13px; }
.bd-catname:focus{ background:var(--hover); outline:0; }
.bd-catadd{ display:flex; gap:8px; max-width:320px; }
.bd-catadd .input{ flex:1; }

/* ── 작성/수정 폼 ─────────────────────────────────────── */
.bd-form-row{ display:flex; gap:12px; flex-wrap:wrap; }
.bd-col-cat{ width:180px; }
.bd-col-sub{ flex:1; min-width:240px; }
.bd-form-opts{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin:4px 0 14px; }
.bd-check{ display:inline-flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text); cursor:pointer; }
.bd-pub{ display:inline-flex; align-items:center; gap:8px; }
.bd-pub .input{ width:auto; }
.bd-filelist{ display:flex; flex-direction:column; gap:6px; }
.bd-fileitem{ display:inline-flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text); }
.bd-fileitem em{ color:var(--muted3); font-style:normal; }
.bd-form-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }

/* Summernote 가독성 보정 (자체호스팅 CSS와 함께) */
.note-editor.note-frame{ border-color:var(--input-border); border-radius:var(--radius-btn); }
.note-editor .note-editing-area .note-editable{ font-family:var(--font); font-size:14px; line-height:1.75; }
.gt-row.bd-row, a.gt-row{ color:inherit; cursor:pointer; text-decoration:none; }
a.gt-row:hover{ background:var(--hover); }

/* ══════ 검색 셀렉트(.mpick-*) — 공용 컴포넌트 (구 Inventory/MobileSale.css) ══════ */
.mpick{ position:relative; }
.mpick-btn{ display:inline-flex; align-items:center; gap:6px; justify-content:space-between; height:36px; padding:0 11px; min-width:160px;
  border:1px solid var(--input-border); border-radius:var(--radius-btn); background:var(--card); color:var(--text); font-size:13px; cursor:pointer; }
.mpick-btn::after{ content:'▾'; font-size:10px; color:var(--muted3); }
.mpick-panel{ display:none; position:absolute; z-index:30; top:calc(100% + 4px); left:0; width:300px; max-width:82vw;
  background:var(--card); border:1px solid var(--border); border-radius:10px; box-shadow:0 10px 30px rgba(15,23,42,.18); padding:8px; }
.mpick.is-open .mpick-panel{ display:block; }
.mpick-single .mpick-btn{ justify-content:space-between; }
.mpick-search{ width:100%; height:32px; margin-bottom:6px; }
.mpick-list{ max-height:300px; overflow-y:auto; display:flex; flex-direction:column; }
.mpick-item{ display:flex; align-items:center; gap:8px; padding:6px 7px; border-radius:6px; font-size:12.5px; color:var(--text); cursor:pointer; }
.mpick-item:hover{ background:var(--hover, var(--bg)); }
.mpick-item > span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mpick-empty{ padding:14px 6px; text-align:center; color:var(--muted3); font-size:12px; }

/* ══════ 판매점명 옆 정보복사 버튼(.stcp) — 전 페이지 공통 ══════
   행(tr) 클릭 영역과 확실히 구분되도록 "테두리 있는 아이콘 칩" 형태. */
.stcp-wrap{ display:inline; }   /* 이름은 평소대로 흐르고(줄바꿈 유지) 버튼만 인라인 칩 */
.stcp{ display:inline-flex; align-items:center; justify-content:center; flex:none; box-sizing:border-box;
  width:21px; height:21px; margin-left:5px; padding:0; line-height:0; vertical-align:middle;
  border:1px solid var(--border-strong); border-radius:6px; background:var(--card); color:var(--muted2);
  cursor:pointer; user-select:none; -webkit-user-select:none; box-shadow:0 1px 1px rgba(15,23,42,.05);
  transition:background .15s ease, color .15s ease, border-color .15s ease; }
.stcp:hover{ background:var(--accent); border-color:var(--accent); color:#fff; }
.stcp:active{ transform:translateY(1px); }
.stcp:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }

/* 복사 완료 토스트 — 재고 외 페이지에서도 뜨도록 공통(구 Inventory.css) */
.inv-toast{ position:fixed; left:50%; bottom:32px; transform:translateX(-50%) translateY(8px);
  background:var(--heading,#0f172a); color:#fff; padding:10px 18px; border-radius:8px; font-size:13px;
  z-index:9999; opacity:0; transition:opacity .25s ease, transform .25s ease; pointer-events:none;
  box-shadow:0 6px 20px rgba(0,0,0,.25); white-space:pre-line; }
.inv-toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ── [임시] 알림톡 디버그 패널(admin2 전용) — 추후 삭제 ── */
.bt-dbg{ position:fixed; left:12px; bottom:12px; z-index:9999; max-width:min(600px,92vw); max-height:64vh; overflow:auto;
  background:#0f172a; color:#e2e8f0; border:1px solid #334155; border-radius:10px; padding:10px 12px;
  box-shadow:0 12px 44px rgba(0,0,0,.45); font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:12px; line-height:1.5; }
.bt-dbg-h{ font-weight:700; color:#93c5fd; margin-bottom:6px; }
.bt-dbg-a2{ font-weight:400; font-size:11px; color:#94a3b8; }   /* admin2 전체 로그 표시 배지 */
.bt-dbg-l{ white-space:pre-wrap; word-break:break-all; padding:2px 0; border-top:1px solid #1e293b; }
