/* 에이프레시 AFcompany — 디자인 기본틀
   색: 회색 단계 + 파랑 하나를 주색으로, 상태색(빨강·주황·노랑·초록·보라)은 옅은 바탕 + 진한 글자로만 쓴다. */
:root {
  --grey-50:#f9fafb; --grey-100:#f2f4f6; --grey-200:#e5e8eb; --grey-300:#d1d6db; --grey-400:#b0b8c1;
  --grey-500:#8b95a1; --grey-600:#6b7684; --grey-700:#4e5968; --grey-800:#333d4b; --grey-900:#191f28;
  --blue:#3182f6; --blue-strong:#1b64da; --blue-weak:#e8f3ff; --blue-faint:#f4f9ff;
  --red:#f04452; --red-text:#e42939; --red-weak:#ffeeee;
  --orange:#ff8a1f; --orange-text:#e46c00; --orange-weak:#fff1e2;
  --yellow-text:#a26a00; --yellow-weak:#fff7d6;
  --green:#03b26c; --green-text:#028a54; --green-weak:#e3f8ee;
  --purple-text:#7a3fd6; --purple-weak:#f3edff;
  --teal-text:#0a8c8e; --teal-weak:#e0f6f6;
  --bg:var(--grey-100); --surface:#fff;
  --r-sm:8px; --r:12px; --r-lg:20px;
  --shadow:0 1px 2px rgba(2,32,71,.04), 0 2px 8px rgba(2,32,71,.04);
  --shadow-lg:0 8px 28px rgba(2,32,71,.12);
  --side-w:256px;
  --font:"Pretendard Variable","Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic","맑은 고딕",system-ui,sans-serif;
}
*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font-family:var(--font); font-size:15px; line-height:1.6; color:var(--grey-800); background:var(--bg);
  -webkit-font-smoothing:antialiased; letter-spacing:-0.01em; }
a { color:var(--blue-strong); text-decoration:none; }
a:hover { color:var(--blue); }
h1 { font-size:26px; line-height:1.35; font-weight:700; letter-spacing:-0.03em; color:var(--grey-900); margin:0 0 6px; }
h1 small, h2 small { font-size:15px; font-weight:500; color:var(--grey-500); letter-spacing:-0.01em; margin-left:6px; }
h2 { font-size:18px; font-weight:700; letter-spacing:-0.02em; color:var(--grey-900); margin:0 0 14px; }
h3 { font-size:15px; font-weight:700; color:var(--grey-800); margin:18px 0 8px; }
p { margin:0 0 12px; }
small { font-weight:400; }
.ic { flex:none; display:inline-block; vertical-align:middle; }
.muted { color:var(--grey-500); } .small { font-size:13px; } .red { color:var(--red-text); } .strong { font-weight:700; color:var(--grey-900); }
.mono { font-family:"Cascadia Mono",Consolas,monospace; font-size:12.5px; letter-spacing:0; }
.pre { white-space:pre-wrap; }
.num { text-align:right !important; white-space:nowrap; font-variant-numeric:tabular-nums; }
.sub { color:var(--grey-600); font-size:15px; margin:0; }

/* ───── 앱 틀: 왼쪽 메뉴 + 본문 ───── */
.nav-toggle { position:absolute; opacity:0; pointer-events:none; }
.side { position:fixed; inset:0 auto 0 0; width:var(--side-w); background:var(--surface); border-right:1px solid var(--grey-200);
  display:flex; flex-direction:column; padding:20px 14px 16px; z-index:30; }
.brand { display:flex; align-items:center; gap:10px; padding:4px 8px 18px; color:var(--grey-900); }
.brand:hover { color:var(--grey-900); }
.logo { display:inline-grid; place-items:center; width:38px; height:38px; border-radius:11px; color:#fff;
  background:linear-gradient(140deg,#4593fc 0%,#1b64da 100%); box-shadow:0 4px 12px rgba(49,130,246,.28); }
.logo.sm { width:26px; height:26px; border-radius:8px; box-shadow:none; }
.logo.lg { width:60px; height:60px; border-radius:18px; }
.brand-t { display:flex; flex-direction:column; line-height:1.2; }
.brand-t b { font-size:17px; letter-spacing:-0.03em; } .brand-t small { font-size:12.5px; color:var(--grey-500); margin-top:2px; }
.menu { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
.menu-label { font-size:12px; font-weight:600; color:var(--grey-500); margin:14px 12px 6px; }
.menu-label:first-child { margin-top:4px; }
/* 대분류 접기·펴기 (2026-11-11) */
.menu-group { display:flex; flex-direction:column; gap:2px; }
.menu { scrollbar-width:thin; }
.menu-group > summary.menu-label { list-style:none; cursor:pointer; display:flex; align-items:center; gap:6px; margin:8px 0 0;
  padding:7px 12px; border-radius:var(--r-sm); font-size:16px; font-weight:800; color:var(--grey-900); letter-spacing:-0.02em; user-select:none; }
/* 대분류(검고 크게)와 소분류(조금 작게, 안으로 들여서)가 한눈에 구분되게 (2026-11-11 대표 요청) */
.menu-group > a { margin-left:8px; font-size:14.5px; }
.menu-group > summary.menu-label::-webkit-details-marker { display:none; }
.menu-group > summary.menu-label span { flex:1; }
.menu-group > summary.menu-label:hover { background:var(--grey-100); color:var(--grey-900); }
.menu-group > summary .chev { color:var(--grey-700); transition:transform .15s; flex:none; }
.menu-group[open] > summary .chev { transform:rotate(90deg); }
.menu-group[open] > summary .count.sum { display:none; }
.menu-group > summary .count.sum { min-width:20px; height:20px; font-size:11.5px; }
.menu a { display:flex; align-items:center; gap:12px; height:44px; padding:0 12px; border-radius:var(--r); color:var(--grey-700);
  font-weight:500; transition:background .15s, color .15s; }
.menu a .ic { color:var(--grey-500); transition:color .15s; }
.menu a:hover { background:var(--grey-100); color:var(--grey-900); }
.menu a.on { background:var(--blue-weak); color:var(--blue-strong); font-weight:700; }
.menu a.on .ic { color:var(--blue); }
.menu a span { flex:1; }
.count { min-width:22px; height:22px; padding:0 7px; border-radius:11px; background:var(--red); color:#fff; font-size:12px;
  font-weight:700; display:inline-grid; place-items:center; font-variant-numeric:tabular-nums; }
.me { display:flex; align-items:center; gap:10px; padding:14px 8px 8px; border-top:1px solid var(--grey-100); }
.avatar { width:36px; height:36px; border-radius:50%; background:var(--grey-100); color:var(--grey-700); display:grid; place-items:center;
  font-weight:700; flex:none; }
.who { display:flex; flex-direction:column; line-height:1.3; min-width:0; }
.who b { color:var(--grey-900); font-size:14px; } .who small { color:var(--grey-500); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.me-actions { display:flex; gap:4px; padding:0 4px; }
.me-actions a, .me-actions .link { display:inline-flex; align-items:center; gap:5px; font-size:13px; color:var(--grey-600); padding:6px 8px;
  border-radius:var(--r-sm); height:auto; font-weight:500; }
.me-actions a:hover, .me-actions .link:hover { background:var(--grey-100); color:var(--grey-900); }
.me-actions form { margin:0; }
.scrim { display:none; }
.shell { margin-left:var(--side-w); min-height:100vh; display:flex; flex-direction:column; }
.mtop { display:none; }
main { width:100%; max-width:1240px; margin:0 auto; padding:36px 40px 24px; flex:1; }
main.wide { max-width:none; }
.foot { display:flex; align-items:center; justify-content:center; gap:6px; color:var(--grey-500); font-size:12px; padding:18px 20px 28px; }

/* ───── 페이지 머리 ───── */
.page-head, .head-row { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.head-row { align-items:center; margin-bottom:16px; }
.head-row h1 { margin:0; }
.page-head .actions, .head-row > div { display:flex; gap:8px; flex-wrap:wrap; }
/* 회색 바탕 위에 놓이는 보조 버튼은 흰 버튼으로 */
.page-head .btn:not(.primary):not(.on), .head-row .btn:not(.primary):not(.on), .head-row button:not(.primary):not(.link) {
  background:#fff; box-shadow:inset 0 0 0 1px var(--grey-200); }
.page-head .btn:not(.primary):not(.on):hover, .head-row .btn:not(.primary):not(.on):hover, .head-row button:not(.primary):not(.link):hover {
  background:var(--grey-50); box-shadow:inset 0 0 0 1px var(--grey-300); }
main > h1 { margin-bottom:16px; }
main > p.muted { margin:-6px 0 20px; }
.back { display:inline-flex; align-items:center; gap:2px; color:var(--grey-600); font-weight:500; font-size:14px; margin:-8px 0 12px -4px;
  padding:4px 8px 4px 4px; border-radius:var(--r-sm); }
.back:hover { background:var(--grey-200); color:var(--grey-900); }

/* ───── 카드 ───── */
.card { background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow); padding:24px; margin-bottom:16px; }
.card > :last-child { margin-bottom:0; }
.card.narrow { width:420px; max-width:100%; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.card-head h2 { margin:0; display:flex; align-items:center; gap:8px; }
.card-head .more { font-size:14px; color:var(--grey-500); display:inline-flex; align-items:center; font-weight:500; }
.card-head .more:hover { color:var(--grey-800); }
.cols { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.cols > .card { margin-bottom:0; }
p.card { color:var(--grey-700); }

/* ───── 토스트(알림 메시지) ───── */
.toasts { position:fixed; top:20px; left:50%; transform:translateX(-50%); z-index:60; display:flex; flex-direction:column; gap:8px;
  width:min(560px, calc(100vw - 32px)); pointer-events:none; }
.auth .toasts { position:static; transform:none; width:100%; margin-bottom:12px; }
.toast { pointer-events:auto; display:flex; align-items:flex-start; gap:10px; padding:14px 14px 14px 16px; border-radius:16px;
  background:rgba(25,31,40,.92); color:#fff; box-shadow:var(--shadow-lg); font-size:14.5px; line-height:1.5; font-weight:500;
  backdrop-filter:blur(8px); animation:toast-in .28s cubic-bezier(.2,.8,.2,1); }
.toast > .ic { margin-top:2px; }
.toast span { flex:1; word-break:keep-all; overflow-wrap:anywhere; }
.toast.ok > .ic { color:#4bdb9a; } .toast.error > .ic { color:#ff7b86; } .toast.warn > .ic { color:#ffc14d; } .toast.keep > .ic { color:#7cb4ff; }
.toast.keep { background:var(--grey-900); }
.toast-x { background:none; border:0; color:rgba(255,255,255,.6); padding:2px; height:auto; min-height:0; margin:0; }
.toast-x:hover { color:#fff; background:none; }
.toast.hide { opacity:0; transform:translateY(-8px); transition:opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity:0; transform:translateY(-10px) scale(.98); } to { opacity:1; transform:none; } }
.flash { padding:12px 14px; border-radius:var(--r); background:var(--blue-weak); color:var(--grey-800); font-size:14px; }
.flash.warn { background:var(--orange-weak); color:var(--orange-text); }

/* ───── 입력·버튼 ───── */
label { display:block; margin-bottom:14px; font-size:14px; font-weight:600; color:var(--grey-700); }
input, select, textarea { font:inherit; font-size:15px; color:var(--grey-900); height:44px; padding:0 14px; border:1px solid var(--grey-300);
  border-radius:var(--r); background:#fff; transition:border-color .15s, box-shadow .15s; letter-spacing:-0.01em; }
textarea { height:auto; padding:11px 14px; line-height:1.55; resize:vertical; }
select { padding-right:36px; appearance:none; cursor:pointer;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
input::placeholder, textarea::placeholder { color:var(--grey-400); }
input:hover, select:hover, textarea:hover { border-color:var(--grey-400); }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(49,130,246,.18); }
input[type=file] { height:auto; padding:9px 12px; border-style:dashed; background:var(--grey-50); cursor:pointer; font-size:14px; }
input[type=file]::file-selector-button { font:inherit; font-weight:600; border:0; border-radius:var(--r-sm); background:var(--grey-200); color:var(--grey-800);
  padding:6px 12px; margin-right:10px; cursor:pointer; }
input[type=checkbox] { width:20px; height:20px; padding:0; accent-color:var(--blue); cursor:pointer; }
input[type=date] { padding-right:10px; }
label input, label select, label textarea, textarea { display:block; width:100%; margin-top:6px; font-weight:400; }
button, .btn { font:inherit; font-size:15px; font-weight:600; letter-spacing:-0.01em; height:40px; padding:0 16px; border:0; border-radius:var(--r);
  background:var(--grey-100); color:var(--grey-800); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  white-space:nowrap; transition:background .15s, color .15s, transform .1s; vertical-align:middle; }
button:hover, .btn:hover { background:var(--grey-200); color:var(--grey-900); }
button:active, .btn:active { transform:scale(.97); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(49,130,246,.35); }
button.primary, .btn.primary { background:var(--blue); color:#fff; }
button.primary:hover, .btn.primary:hover { background:var(--blue-strong); color:#fff; }
button.danger { background:var(--red-weak); color:var(--red-text); }
button.danger:hover { background:#ffdcdf; }
button[disabled], button[disabled]:hover { background:var(--grey-100); color:var(--grey-400); cursor:not-allowed; transform:none; }
.is-sending { opacity:.55; pointer-events:none; cursor:progress; }  /* 보내는 중 (app.js 두 번 누르기 막기) */
button.primary[disabled] { background:#b6d4fb; color:#fff; }
button.link, .btn.link { background:none; height:auto; padding:4px 6px; color:var(--grey-600); font-weight:500; font-size:14px; border-radius:var(--r-sm); }
button.link:hover { background:var(--grey-100); color:var(--grey-900); }
button.lg, .btn.lg { height:52px; padding:0 22px; font-size:16px; border-radius:14px; }
.btn.on { background:var(--grey-900); color:#fff; }
.wide { width:100%; }
form.inline { display:inline-flex; align-items:center; gap:6px; margin:0; vertical-align:middle; flex-wrap:wrap; }
.chk { display:inline-flex; gap:8px; align-items:center; margin:0; font-weight:500; color:var(--grey-700); cursor:pointer; }
.chk input { margin:0; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; align-items:end; }
.grid2 .span2 { grid-column:span 2; }
.grid2 > button { margin-bottom:14px; }

/* ───── 배지 ───── */
.tag { display:inline-flex; align-items:center; height:24px; padding:0 8px; border-radius:7px; font-size:12.5px; font-weight:600;
  background:var(--grey-100); color:var(--grey-700); white-space:nowrap; vertical-align:middle; letter-spacing:-0.01em; }
.tag.hot { background:var(--yellow-weak); color:var(--yellow-text); }
.t-applied, .t-done, .t-approved, .s-done { background:var(--green-weak); color:var(--green-text); }
.t-pending, .t-question, .t-new, .s-doing { background:var(--orange-weak); color:var(--orange-text); }
.t-rejected, .t-cancelled, .t-ignored, .t-blocked { background:var(--grey-100); color:var(--grey-500); }
.t-error { background:var(--red-weak); color:var(--red-text); }
.s-todo { background:var(--blue-weak); color:var(--blue-strong); }
.k-change { background:var(--red-weak); color:var(--red-text); } .k-match { background:var(--blue-weak); color:var(--blue-strong); }
.k-vat, .k-unit { background:var(--purple-weak); color:var(--purple-text); } .k-inactive { background:var(--grey-100); color:var(--grey-600); }
.badge { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:var(--red); color:#fff;
  font-size:11.5px; font-weight:700; vertical-align:middle; }

/* ───── 표 ───── */
.tbl { width:100%; border-collapse:separate; border-spacing:0; background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow);
  overflow:hidden; font-variant-numeric:tabular-nums; margin-bottom:16px; }
.tbl th, .tbl td { padding:13px 16px; text-align:left; vertical-align:middle; border-bottom:1px solid var(--grey-100); }
.tbl th { font-size:13px; font-weight:600; color:var(--grey-600); background:var(--grey-50); border-bottom-color:var(--grey-200); white-space:nowrap; }
.tbl tr:last-child td { border-bottom:0; }
.tbl tr:hover td { background:var(--grey-50); }
.tbl td a { font-weight:600; color:var(--grey-900); }
.tbl td a:hover { color:var(--blue-strong); }
.tbl.small th, .tbl.small td { padding:9px 12px; font-size:13.5px; }
.card .tbl { box-shadow:none; border-radius:0; margin:0 0 4px; background:transparent; }
.card .tbl th { background:transparent; padding-top:8px; }
.card .tbl th:first-child, .card .tbl td:first-child { padding-left:0; }
.card .tbl th:last-child, .card .tbl td:last-child { padding-right:0; }
.card .tbl tr:hover td { background:transparent; }
.tbl tr.inactive td, .tbl tr.muted td, .tbl tr.muted td a { color:var(--grey-400); }
.tbl tr.new td { background:var(--blue-faint); }
.tbl tr.hot td { background:#fffbea; }
.tbl tr.red td { color:var(--red-text); }
td.diff { color:var(--yellow-text); font-weight:600; } td.diff:not(:empty) { background:var(--yellow-weak) !important; }
td.neg { color:var(--red-text) !important; font-weight:700; } td.low { color:var(--orange-text) !important; font-weight:600; }
td.promo { color:var(--purple-text); font-weight:600; }
.scroll { overflow-x:auto; }

/* 통합단가표: 매일 PRM식 묶음 머리글 + 고정 머리줄·제품 열 */
.toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.search { position:relative; flex:1 1 320px; max-width:440px; }
.search .ic { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--grey-500); pointer-events:none; }
.search input { width:100%; padding-left:42px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.chip { display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px; border-radius:18px; background:var(--surface);
  color:var(--grey-700); font-weight:600; font-size:14px; box-shadow:inset 0 0 0 1px var(--grey-200); transition:all .15s; }
.chip:hover { color:var(--grey-900); box-shadow:inset 0 0 0 1px var(--grey-400); }
.chip em { font-style:normal; font-weight:700; color:var(--grey-500); font-size:13px; font-variant-numeric:tabular-nums; }
.chip.on { background:var(--grey-900); color:#fff; box-shadow:none; }
.chip.on em { color:rgba(255,255,255,.7); }
.chip .dot { width:8px; height:8px; border-radius:50%; }
.dot.red { background:var(--red); } .dot.orange { background:var(--orange); } .dot.purple { background:#9b5cf0; }
.dot.yellow { background:#f5c400; } .dot.grey { background:var(--grey-400); }
.grid-wrap { background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow); overflow:auto; max-height:calc(100vh - 260px); min-height:320px; }
.grid { border-collapse:separate; border-spacing:0; width:100%; font-variant-numeric:tabular-nums; font-size:14px; }
.grid th, .grid td { padding:10px 14px; border-bottom:1px solid var(--grey-100); white-space:nowrap; text-align:left; vertical-align:middle; }
.grid thead th { position:sticky; top:0; z-index:2; background:var(--grey-50); color:var(--grey-600); font-size:12.5px; font-weight:600;
  border-bottom:1px solid var(--grey-200); }
.grid thead tr.grp th { height:34px; padding-top:0; padding-bottom:0; text-align:center; color:var(--grey-700); font-weight:700; font-size:12.5px;
  border-left:1px solid var(--grey-200); }
.grid thead tr.grp th.grp-buy { background:#eef5ff; color:var(--blue-strong); }
.grid thead tr + tr th { top:34px; }
.grid thead tr + tr th.c-first { border-left:1px solid var(--grey-200); }
.grid .sticky-col { position:sticky; left:0; z-index:1; background:var(--surface); box-shadow:1px 0 0 var(--grey-200); }
.grid thead .sticky-col { z-index:3; background:var(--grey-50); text-align:left; vertical-align:bottom; padding-bottom:10px; }
.grid tbody tr:hover td { background:var(--grey-50); }
.grid tbody tr:hover td.c-applied { background:#eaf3ff; }
.grid td.prod { min-width:260px; max-width:360px; white-space:normal; }
.grid td.prod a { color:var(--grey-900); font-weight:600; }
.grid td.prod a:hover { color:var(--blue-strong); }
.grid .meta { font-size:12.5px; color:var(--grey-500); margin-top:2px; line-height:1.4; }
.grid td.c-applied { background:var(--blue-faint); font-weight:700; color:var(--grey-900); font-size:15px; }
.grid th.c-applied { color:var(--blue-strong); }
.grid td.c-first { border-left:1px solid var(--grey-100); }
.grid tr.neg td.prod { box-shadow:inset 3px 0 0 var(--red), 1px 0 0 var(--grey-200); }
.grid tr.inactive td, .grid tr.inactive td a { color:var(--grey-400); }
.grid tr.hot td.prod { box-shadow:inset 3px 0 0 #f5c400, 1px 0 0 var(--grey-200); }
.grid .period { font-size:13px; color:var(--grey-600); }
.grid .period.red { color:var(--red-text); font-weight:600; }
.grid .empty { padding:60px 20px; text-align:center; color:var(--grey-500); white-space:normal; }
.legend { display:flex; flex-wrap:wrap; gap:6px 18px; margin:14px 4px 0; font-size:13px; color:var(--grey-600); }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.legend i { width:12px; height:12px; border-radius:4px; display:inline-block; }
.legend i.l-diff { background:var(--yellow-weak); box-shadow:inset 0 0 0 1px #f0d97a; }
.legend i.l-neg { background:var(--red); } .legend i.l-low { background:var(--orange); }
.legend i.l-applied { background:var(--blue-faint); box-shadow:inset 0 0 0 1px #cfe3fd; }
.legend i.l-special { background:#f5c400; }

/* ───── 홈 ───── */
.hero { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:28px; }
.eyebrow { font-size:14px; font-weight:600; color:var(--grey-500); margin:0 0 6px; }
.hero h1 { font-size:30px; margin:0; }
.hero h1 em { font-style:normal; color:var(--blue); }
.hero h1 em.red { color:var(--red); }
.hero .sub { margin-top:6px; }
.quick { display:grid; grid-template-columns:repeat(6, 1fr); background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow);
  padding:8px; margin-bottom:16px; }
.quick a { display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 6px 16px; border-radius:var(--r);
  color:var(--grey-800); font-weight:600; font-size:14px; transition:background .15s; text-align:center; }
.quick a:hover { background:var(--grey-50); color:var(--grey-900); }
.quick a:active { transform:scale(.97); }
.qi { width:52px; height:52px; border-radius:16px; display:grid; place-items:center; }
.qi.blue { background:var(--blue-weak); color:var(--blue); } .qi.red { background:var(--red-weak); color:var(--red); }
.qi.purple { background:var(--purple-weak); color:#8b4ff0; } .qi.teal { background:var(--teal-weak); color:#14a5a8; }
.qi.orange { background:var(--orange-weak); color:var(--orange); } .qi.green { background:var(--green-weak); color:var(--green); }
.stats { display:grid; grid-template-columns:repeat(5, 1fr); gap:12px; margin-bottom:16px; }
.stat { background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow); padding:20px 20px 18px; color:var(--grey-800);
  display:flex; flex-direction:column; gap:2px; position:relative; transition:transform .15s, box-shadow .15s; }
.stat:hover { transform:translateY(-2px); box-shadow:var(--shadow-lg); color:var(--grey-800); }
.stat .label { display:flex; align-items:center; gap:6px; font-size:14px; font-weight:600; color:var(--grey-600); }
.stat .value { font-size:32px; line-height:1.25; font-weight:700; letter-spacing:-0.03em; color:var(--grey-900); font-variant-numeric:tabular-nums; margin-top:6px; }
.stat .value small { font-size:16px; font-weight:600; color:var(--grey-500); margin-left:2px; }
.stat .hint { font-size:12.5px; color:var(--grey-500); }
.stat .go { position:absolute; right:16px; top:18px; color:var(--grey-300); }
.stat.is-red .value { color:var(--red); } .stat.is-red .label .ic { color:var(--red); }
.stat.is-orange .value { color:var(--orange-text); } .stat.is-orange .label .ic { color:var(--orange); }
.stat.is-blue .value { color:var(--blue); } .stat.is-blue .label .ic { color:var(--blue); }
.stat.zero .value { color:var(--grey-300); }
.list { margin:0; padding:0; list-style:none; }
.list > li, .list > a { display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--grey-100); color:var(--grey-800); }
.list > :last-child { border-bottom:0; }
.list > a:hover .l-main b { color:var(--blue-strong); }
.l-main { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.4; }
.l-main b { font-weight:600; color:var(--grey-900); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.l-main small { color:var(--grey-500); font-size:13px; }
.l-end { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; font-weight:600; color:var(--grey-900); }
.l-end small { display:block; font-size:12.5px; color:var(--grey-500); font-weight:500; }
.l-date { color:var(--grey-500); font-size:13px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.l-icon { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; flex:none; background:var(--grey-100); color:var(--grey-600); }
.l-icon.red { background:var(--red-weak); color:var(--red); } .l-icon.blue { background:var(--blue-weak); color:var(--blue); }
.l-icon.green { background:var(--green-weak); color:var(--green); } .l-icon.orange { background:var(--orange-weak); color:var(--orange); }
.empty-state { display:flex; flex-direction:column; align-items:center; gap:8px; padding:28px 12px; color:var(--grey-500); text-align:center; font-size:14px; }
.empty-state .ic { color:var(--grey-300); }
.sec-label { font-size:13px; font-weight:700; margin:14px 0 2px; display:flex; align-items:center; gap:6px; }
.sec-label.red { color:var(--red-text); } .sec-label.blue { color:var(--blue-strong); }
.sec-label:first-of-type { margin-top:0; }

/* ───── 키-값, 목록, 확인 요청 ───── */
.kv { border-collapse:collapse; margin-bottom:12px; font-variant-numeric:tabular-nums; }
.kv th { text-align:left; color:var(--grey-500); font-weight:500; padding:7px 16px 7px 0; white-space:nowrap; font-size:14px; vertical-align:top; }
.kv td { padding:7px 28px 7px 0; color:var(--grey-900); font-weight:500; }
.kv td.num { text-align:left !important; }
ul.plain { list-style:none; padding:0; margin:0; }
ul.plain li { padding:11px 0; border-bottom:1px solid var(--grey-100); }
ul.plain li:last-child { border-bottom:0; }
.qcard { padding:0; overflow:hidden; }
.qcard .qhead { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:20px 24px 0; }
.qcard .qhead b { font-size:17px; color:var(--grey-900); letter-spacing:-0.02em; }
.qcard .qhead .muted { width:100%; font-size:13px; }
.qbody { display:flex; gap:20px; justify-content:space-between; padding:14px 24px 18px; }
.qbody > div { flex:1; min-width:0; }
.qact { display:flex; gap:8px; flex-wrap:wrap; align-items:center; background:var(--grey-50); border-top:1px solid var(--grey-100); padding:14px 24px; }
.qact input { height:40px; }
.qact .pick { margin-left:8px; padding-left:16px; border-left:1px solid var(--grey-200); }
.qcard > p.muted { padding:12px 24px; margin:0; background:var(--grey-50); border-top:1px solid var(--grey-100); }
.snippet { margin-bottom:12px; }
.snippet > .muted { font-size:12px; font-weight:600; }
.snippet pre { background:var(--grey-50); border:1px solid var(--grey-200); border-radius:var(--r); padding:12px 14px; white-space:pre-wrap; margin:6px 0 0;
  font-size:13px; font-family:"Cascadia Mono",Consolas,monospace; color:var(--grey-800); }
.suggest { display:flex; gap:10px; align-items:flex-start; background:var(--blue-weak); color:var(--grey-800); border-radius:var(--r); padding:12px 14px;
  font-size:14.5px; margin:12px 0 0; }
.suggest .ic { color:var(--blue); margin-top:2px; }
.suggest b { color:var(--blue-strong); }
.thumb { width:220px; max-height:220px; object-fit:cover; border-radius:var(--r); border:1px solid var(--grey-200); display:block; }
.photo { max-width:100%; border-radius:var(--r); border:1px solid var(--grey-200); }
.comment { padding:12px 0; border-bottom:1px solid var(--grey-100); }
.comment p { margin:4px 0 0; color:var(--grey-800); }

/* ───── 로그인·처음 화면 ───── */
body.auth { min-height:100vh; display:flex; padding:32px 16px;
  background:radial-gradient(1200px 600px at 50% -10%, #e3efff 0%, rgba(227,239,255,0) 60%), var(--grey-100); }
.auth-wrap { width:420px; max-width:100%; display:flex; flex-direction:column; align-items:stretch; margin:auto; }
.auth-brand { display:flex; flex-direction:column; align-items:center; gap:14px; margin-bottom:24px; }
.auth-brand b { font-size:20px; letter-spacing:-0.03em; color:var(--grey-900); }
.auth .card { width:100%; padding:32px 28px 28px; border-radius:24px; box-shadow:0 2px 6px rgba(2,32,71,.04), 0 12px 32px rgba(2,32,71,.06); }
.auth .card h1 { font-size:22px; margin-bottom:6px; }
.auth .card > p.muted { margin-bottom:22px; font-size:14px; line-height:1.6; }
.auth .card form { margin-top:4px; }
.auth .card button.primary.wide { height:54px; font-size:16px; border-radius:14px; margin-top:8px; }
.auth .card input { height:50px; border-radius:14px; }
.auth-foot { display:flex; align-items:center; justify-content:center; gap:6px; font-size:12.5px; color:var(--grey-500); margin-top:20px; }
.hint { display:block; font-size:12.5px; color:var(--grey-500); font-weight:400; margin-top:6px; }
.pending-ic { width:64px; height:64px; border-radius:20px; background:var(--orange-weak); color:var(--orange); display:grid; place-items:center; margin:0 auto 16px; }
.center-text { text-align:center; }
.error-code { font-size:56px; font-weight:800; color:var(--grey-200); letter-spacing:-0.04em; line-height:1; margin-bottom:8px; }

/* ───── 반응형 ───── */
@media (max-width:1180px) {
  .stats { grid-template-columns:repeat(3, 1fr); }
}
@media (max-width:960px) {
  .side { transform:translateX(-100%); transition:transform .25s cubic-bezier(.2,.8,.2,1); box-shadow:none; }
  .nav-toggle:checked ~ .side { transform:none; box-shadow:var(--shadow-lg); }
  .nav-toggle:checked ~ .scrim { display:block; position:fixed; inset:0; background:rgba(0,12,30,.36); z-index:25; }
  /* 휴대폰 메뉴: 글씨·누르는 칸 크게 (2026-11-11 대표 요청) */
  .side { width:min(300px, 86vw); padding:18px 12px 14px; }
  .brand-t b { font-size:19px; } .brand-t small { font-size:13.5px; }
  .menu { gap:3px; }
  .menu a { height:50px; font-size:17px; gap:14px; padding:0 14px; }
  .menu-group > a { margin-left:10px; font-size:16.5px; }
  .menu a .ic { width:24px; height:24px; }
  .menu .count { min-width:26px; height:26px; font-size:14px; border-radius:13px; }
  .menu-group > summary.menu-label { font-size:19.5px; font-weight:800; padding:12px 14px; margin-top:10px; color:var(--grey-900); }
  .menu-group > summary .chev { width:20px; height:20px; }
  .menu-group > summary .count.sum { min-width:24px; height:24px; font-size:13px; }
  .who b { font-size:16px; } .who small { font-size:13.5px; }
  .avatar { width:42px; height:42px; font-size:17px; }
  .me-actions a, .me-actions .link { font-size:15px; padding:8px 10px; }
  .shell { margin-left:0; }
  .mtop { display:flex; align-items:center; justify-content:space-between; gap:8px; position:sticky; top:0; z-index:20; height:56px; padding:0 8px;
    background:rgba(255,255,255,.88); backdrop-filter:saturate(180%) blur(12px); border-bottom:1px solid var(--grey-200); }
  .icon-btn { width:44px; height:44px; display:grid; place-items:center; border-radius:var(--r); color:var(--grey-800); cursor:pointer; margin:0; }
  .icon-btn:active { background:var(--grey-100); }
  .mtop-brand { display:flex; align-items:center; gap:8px; font-weight:700; color:var(--grey-900); font-size:16px; }
  .mtop-q { display:flex; align-items:center; gap:4px; height:36px; padding:0 12px; border-radius:18px; background:var(--red-weak); color:var(--red-text); font-weight:700; font-size:14px; margin-right:6px; }
  main { padding:22px 16px 16px; }
  h1 { font-size:22px; }
  .hero h1 { font-size:24px; }
  .cols { grid-template-columns:1fr; }
  .quick { grid-template-columns:repeat(3, 1fr); }
  .stats { grid-template-columns:repeat(2, 1fr); gap:10px; }
  .stat { padding:16px; }
  .stat .value { font-size:26px; }
  .qbody { flex-direction:column; }
  .thumb { width:100%; max-height:280px; }
  .grid-wrap { max-height:calc(100vh - 140px); border-radius:16px; }
  .grid th, .grid td { padding:9px 10px; }
  .grid td.prod { min-width:150px; max-width:160px; font-size:13.5px; line-height:1.4; }
  .grid .meta { font-size:11.5px; }
  .grid td.c-applied { font-size:14px; }
  .chips { flex-wrap:nowrap; overflow-x:auto; margin:0 -16px 14px; padding:0 16px; scrollbar-width:none; }
  .chip { flex:none; }
  .page-head { margin-bottom:16px; }
  .qact .pick { margin-left:0; }
  .card { padding:20px; border-radius:18px; }
  .qcard { padding:0; }
  .tbl { display:block; overflow-x:auto; }
}
@media (max-width:520px) {
  .grid2 { grid-template-columns:1fr; } .grid2 .span2 { grid-column:auto; }
  .search { max-width:none; }
}

/* ───── 품목 상세 ───── */
.nowrap { white-space:nowrap; }
.k-promo { background:var(--purple-weak); color:var(--purple-text); }
.price-hero { display:flex; flex-direction:column; gap:2px; padding:2px 0 18px; border-bottom:1px solid var(--grey-100); margin-bottom:16px; }
.price-hero span { font-size:14px; font-weight:600; color:var(--grey-600); }
.price-hero b { font-size:36px; line-height:1.2; font-weight:700; letter-spacing:-0.03em; color:var(--grey-900); font-variant-numeric:tabular-nums; }
.price-hero b small { font-size:18px; color:var(--grey-500); margin-left:2px; font-weight:600; }
.mini-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:14px 12px; }
.mini-grid div { display:flex; flex-direction:column; gap:2px; }
.mini-grid span { font-size:13px; color:var(--grey-500); font-weight:500; }
.mini-grid b { font-size:17px; color:var(--grey-900); font-weight:700; font-variant-numeric:tabular-nums; }
.mini-grid b small { font-size:13px; color:var(--grey-500); font-weight:600; }
.mini-grid b.promo { color:var(--purple-text); } .mini-grid b.neg { color:var(--red-text); } .mini-grid b.low { color:var(--orange-text); }
.mini-grid b.diff { background:var(--yellow-weak); color:var(--yellow-text); border-radius:6px; padding:0 6px; align-self:flex-start; }

/* ───── 단산 ───── */
.t-dc { background:#ffeee0; color:#c2410c; }
button.dc { background:#fff; color:#c2410c; box-shadow:inset 0 0 0 1px #fed7aa; }
button.dc:hover { background:#fff4ec; color:#9a3412; }
.qact-end { display:inline-flex; align-items:center; gap:6px; margin-left:auto; }
.row-actions { display:flex; gap:4px; flex-wrap:wrap; margin-left:-6px; }

/* ───── 제조사 탭 (매일 PRM 상단 메뉴처럼) ───── */
.btabs { display:flex; gap:2px; overflow-x:auto; border-bottom:1px solid var(--grey-200); margin-bottom:16px; scrollbar-width:none; }
.btabs::-webkit-scrollbar { display:none; }
.btabs a { flex:none; display:inline-flex; align-items:center; gap:6px; padding:10px 14px 12px; color:var(--grey-600); font-weight:600; font-size:15px;
  border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; transition:color .15s, border-color .15s; }
.btabs a em { font-style:normal; font-size:12.5px; font-weight:600; color:var(--grey-400); font-variant-numeric:tabular-nums; }
.btabs a:hover { color:var(--grey-900); }
.btabs a.on { color:var(--grey-900); border-bottom-color:var(--grey-900); }
.btabs a.on em { color:var(--blue); }

/* 탭(확인 요청함) */
.seg { display:flex; gap:4px; background:var(--grey-200); padding:4px; border-radius:14px; margin-bottom:16px; width:max-content; max-width:100%; overflow-x:auto; }
.seg a { flex:none; display:inline-flex; align-items:center; gap:7px; height:40px; padding:0 16px; border-radius:11px; color:var(--grey-600); font-weight:600; font-size:14.5px; white-space:nowrap; }
.seg a .ic { color:var(--grey-500); }
.seg a em { font-style:normal; font-size:13px; font-weight:700; color:var(--grey-500); font-variant-numeric:tabular-nums; }
.seg a:hover { color:var(--grey-900); }
.seg a.on { background:#fff; color:var(--grey-900); box-shadow:0 1px 3px rgba(2,32,71,.1); }
.seg a.on .ic { color:var(--blue); } .seg a.on em { color:var(--red); }

/* 켜고 끄는 스위치 */
.switch { display:inline-flex; align-items:center; gap:10px; height:40px; padding:0 14px 0 10px; border-radius:var(--r); background:#fff; color:var(--grey-700);
  font-weight:600; font-size:14.5px; box-shadow:inset 0 0 0 1px var(--grey-200); }
.switch i { width:36px; height:22px; border-radius:11px; background:var(--grey-300); position:relative; transition:background .2s; flex:none; }
.switch i::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.2); transition:transform .2s; }
.switch.on { color:var(--grey-900); }
.switch.on i { background:var(--blue); } .switch.on i::after { transform:translateX(14px); }
.switch:hover { color:var(--grey-900); box-shadow:inset 0 0 0 1px var(--grey-300); }

/* 단가표 보조 표시 */
.tagline { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.t-next { background:var(--blue-weak); color:var(--blue-strong); }
b.up { color:var(--red-text); font-weight:700; } b.down { color:var(--blue); font-weight:700; }
.m-only { display:none; }
.sec-title { margin:24px 0 10px; }
p.note { margin-top:12px; }
.card.soon { display:flex; gap:14px; align-items:flex-start; padding:18px 20px; }
.card.soon p { margin:4px 0 0; }
.row-item { display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--grey-100); }
.list > .row-item:last-child { border-bottom:0; }
.row-item .l-main b a { color:var(--grey-900); } .row-item .l-main b a:hover { color:var(--blue-strong); }
.s2grid td.src { white-space:normal; min-width:160px; max-width:240px; color:var(--grey-500); }
.s2grid td.act { text-align:right; }

@media (max-width:960px) {
  /* 통합단가표·S2 수정: 폰에서는 카드 목록 */
  .pwrap, .grid-wrap:has(.s2grid) { max-height:none; overflow:visible; }
  .pgrid, .pgrid tbody, .s2grid, .s2grid tbody { display:block; }
  .pgrid thead, .s2grid thead { display:none; }
  .pgrid tr, .s2grid tr { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:14px 16px; border-bottom:1px solid var(--grey-100); }
  .pgrid tr:last-child, .s2grid tr:last-child { border-bottom:0; }
  .pgrid td, .s2grid td { display:none; padding:0; border:0; }
  .pgrid td.prod, .pgrid td.c-applied, .pgrid td.empty, .s2grid td.prod, .s2grid td.act { display:block; position:static; box-shadow:none !important; background:none !important; }
  .pgrid td.prod, .s2grid td.prod { flex:1; min-width:0; max-width:none; font-size:15px; }
  .pgrid td.empty { flex:1; }
  .pgrid td.c-applied { font-size:18px; font-weight:700; padding-top:1px; }
  .pgrid td.c-applied::after { content:"원"; font-size:13px; color:var(--grey-500); margin-left:1px; font-weight:600; }
  .pgrid tr.promo-row td.c-applied { color:var(--purple-text); }
  .pgrid .m-only, .s2grid .m-only { display:block; font-size:13px; color:var(--grey-600); margin-top:4px; }
  .m-only .promo { color:var(--purple-text); font-weight:600; }
  .m-only .hist { display:block; margin-top:2px; }
  .m-only .diffv { background:var(--yellow-weak); color:var(--yellow-text); border-radius:5px; padding:0 4px; font-weight:600; }
  .pgrid tr.neg td.prod, .pgrid tr.hot td.prod { box-shadow:none !important; }
  .seg { width:100%; }
  .seg a { padding:0 12px; font-size:14px; }
  .page-head .actions { width:100%; }
  .switch { flex:1; justify-content:center; }
}
.seg { scrollbar-width:none; } .seg::-webkit-scrollbar { display:none; }
@media (max-width:960px) {
  .seg a { flex:1 1 0; min-width:0; flex-direction:column; justify-content:center; gap:0; height:auto; padding:7px 4px; line-height:1.3;
    white-space:normal; text-align:center; font-size:13px; word-break:keep-all; }
  .seg a .ic { display:none; }
  .seg a em { font-size:15px; }
}
.k-orderlist { background:var(--orange-weak); color:var(--orange-text); } .k-policy { background:var(--purple-weak); color:var(--purple-text); }
.k-gap { background:var(--red-weak); color:var(--red-text); } .k-nosource, .k-general { background:var(--grey-100); color:var(--grey-700); }
.qbody .pre { color:var(--grey-800); line-height:1.75; }

/* ───── 할일 ───── */
.count.blue { background:var(--blue); }
.card.flush { padding:4px 24px; }
.todo-list .row-item { gap:14px; }
.todo-list .row-item.is-done .l-main b a { color:var(--grey-500); }
.todo-list small s { color:var(--grey-400); }
.todo-list small b.to { color:var(--blue-strong); font-weight:700; }
/* 할일 '완료하기': 아직 안 한 일이라는 게 보이게 회색 테두리 버튼. 누르면 완료 (2026-11-10 대표 요청) */
button.done-btn { height:36px; padding:0 12px; font-size:14px; background:#fff; color:var(--grey-700); border:1.5px solid var(--grey-300); display:inline-flex; align-items:center; gap:4px; }
button.done-btn:hover { background:var(--blue-weak); color:var(--blue-strong); border-color:var(--blue); }
button.undo-btn { height:32px; padding:0 10px; font-size:13px; background:transparent; color:var(--grey-600); border:1px solid var(--grey-200); display:inline-flex; align-items:center; gap:4px; }
button.undo-btn:hover { background:var(--grey-100); color:var(--grey-900); }
/* 사진 넣기 (할일·일정) */
.photo-pick { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.photo-btn { position:relative; display:inline-flex; align-items:center; gap:6px; height:40px; padding:0 14px; border:1.5px dashed var(--grey-300);
  border-radius:var(--r); color:var(--grey-700); font-weight:600; font-size:14px; cursor:pointer; background:#fff; }
.photo-btn:hover { border-color:var(--blue); color:var(--blue-strong); background:var(--blue-faint); }
.photo-btn input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.photo-pv { display:flex; flex-wrap:wrap; gap:6px; width:100%; }
.photo-pv:empty { display:none; }
.photo-pv img { width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--grey-200); }
.photo-pv .busy { font-size:13px; color:var(--grey-500); align-self:center; }
.photo-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:8px; margin:12px 0 4px; }
.photo-grid figure { margin:0; }
.photo-grid img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; border:1px solid var(--grey-200); display:block; background:var(--grey-50); }
.photo-grid .photo-del { margin-top:2px; }
.photo-grid .photo-del button { height:auto; padding:2px 0; font-size:12px; color:var(--grey-500); display:inline-flex; align-items:center; gap:2px; }
.comment-form { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.comment-form button.primary { align-self:flex-start; }
details.fold summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
details.fold summary::-webkit-details-marker { display:none; }
details.fold summary b { display:inline-flex; align-items:center; gap:6px; color:var(--grey-900); }
details.fold[open] summary { margin-bottom:16px; }
.btn-row { margin:0 0 10px; gap:6px; }
h2.mt { margin-top:22px; }
form.del { margin-left:8px; }
@media (max-width:960px) { .card.flush { padding:2px 16px; } }

/* ───── 설정 · 문자 알림 ───── */
.sub-title { margin:22px 0 6px; }
.days { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; margin:2px 0 14px; }
.days .on-off { margin-left:auto; padding-left:14px; border-left:1px solid var(--grey-200); }
#sms .tbl input:not([type=checkbox]) { height:38px; width:150px; }
#sms .tbl td { white-space:nowrap; }
#sms .tbl td.pre { white-space:pre-wrap; min-width:240px; }
#sms .card-head { flex-wrap:wrap; }
#sms .card-head h2 { white-space:nowrap; }
@media (max-width:520px) { .days .on-off { margin-left:0; padding-left:0; border-left:0; } }

/* ───── 일정 ───── */
.is-hidden { display:none !important; }
.l-icon.purple { background:var(--purple-weak); color:#8b4ff0; }
.ek-blue { background:var(--blue-weak); color:var(--blue-strong); }
.ek-orange { background:var(--orange-weak); color:var(--orange-text); }
.ek-purple { background:var(--purple-weak); color:var(--purple-text); }
.btn.sm { height:32px; padding:0 12px; font-size:13.5px; }
.cal-card { padding:20px 20px 16px; }
.cal-head { display:flex; align-items:center; gap:6px; margin-bottom:12px; flex-wrap:wrap; }
.cal-head h2 { margin:0 4px; min-width:120px; text-align:center; }
.cal-head .icon-btn { width:40px; height:40px; display:grid; place-items:center; border-radius:var(--r); color:var(--grey-700); }
.cal-head .icon-btn:hover { background:var(--grey-100); color:var(--grey-900); }
.legend { margin-left:auto; display:flex; gap:12px; font-size:13px; color:var(--grey-600); }
.legend span { display:inline-flex; align-items:center; gap:5px; }
.dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.dot.ek-blue { background:var(--blue); } .dot.ek-orange { background:var(--orange); } .dot.ek-purple { background:#8b4ff0; }
.cal { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); border-top:1px solid var(--grey-200); border-left:1px solid var(--grey-100); }
.cal-dow { text-align:center; font-size:13px; font-weight:600; color:var(--grey-600); padding:8px 0; border-right:1px solid var(--grey-100); border-bottom:1px solid var(--grey-200); }
.cal-dow.sun, .cal-day.sun .num { color:var(--red-text); }
.cal-dow.sat, .cal-day.sat .num { color:var(--blue-strong); }
.cal-day { min-height:104px; padding:6px; border-right:1px solid var(--grey-100); border-bottom:1px solid var(--grey-100); display:flex; flex-direction:column;
  gap:3px; color:var(--grey-800); min-width:0; }
.cal-day:hover { background:var(--grey-50); color:var(--grey-800); }
.cal-day .num { font-size:13.5px; font-weight:600; width:26px; height:26px; flex:none; display:grid; place-items:center; border-radius:50%; color:var(--grey-800); }
.cal-day.out { background:var(--grey-50); } .cal-day.out .num { color:var(--grey-400) !important; }
.cal-day.today .num { background:var(--blue); color:#fff !important; }
.cal-day.sel { box-shadow:inset 0 0 0 2px var(--blue); }
.cal .ev { display:block; font-size:12px; font-weight:600; line-height:1.3; padding:2px 6px; border-radius:5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal .ev.cont { opacity:.55; }
.ev-more { font-size:11.5px; color:var(--grey-500); padding-left:4px; }
.list.compact > li { padding:9px 0; }
.sms-preview { background:var(--grey-50); border-radius:var(--r); padding:12px 14px; font-size:14px; line-height:1.6; color:var(--grey-800); margin:6px 0 4px; }
.row-item.is-skip .l-main b { color:var(--grey-400); text-decoration:line-through; }
fieldset.box { border:1px solid var(--grey-200); border-radius:var(--r); padding:12px 16px 6px; margin:0 0 14px; min-width:0; }
fieldset.box legend { font-size:14px; font-weight:700; color:var(--grey-800); padding:0 6px; }
.opts { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin:0 0 14px; }
.pp-head { display:flex; align-items:center; gap:8px; margin:4px 0 2px; font-size:14px; }
.pp-group { font-size:13px; font-weight:600; color:var(--grey-500); margin:8px 0 6px; display:flex; gap:10px; align-items:center; }
.pp { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:6px; }
.chk.person { border:1px solid var(--grey-200); border-radius:10px; padding:8px 12px; font-size:14px; }
.chk.person:has(input:checked) { border-color:var(--blue); background:var(--blue-faint); }
.chk.person small { color:var(--grey-500); font-weight:400; }
.chk.person small.red { color:var(--red-text); }
.form-card { max-width:780px; }
.grid3 { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:0 12px; align-items:end; }
.grid3 > button { margin-bottom:14px; }
.ct-tbl input { height:38px; min-width:120px; }
.quick.q7 { grid-template-columns:repeat(7, 1fr); }
@media (max-width:960px) {
  .cal-card { padding:14px 8px 8px; }
  .cal-head h2 { flex:1; font-size:18px; min-width:0; }
  .legend { margin-left:0; width:100%; justify-content:center; order:5; margin-top:4px; }
  .cal-dow { font-size:12px; padding:6px 0; }
  .cal-day { min-height:62px; padding:4px 2px; align-items:center; gap:2px; }
  .cal .ev { width:70%; height:5px; padding:0; font-size:0; border-radius:3px; }   /* 폰에서는 색 막대로 */
  .cal .ev.ek-blue { background:var(--blue); } .cal .ev.ek-orange { background:var(--orange); } .cal .ev.ek-purple { background:#8b4ff0; }
  .ev-more { font-size:10.5px; padding:0; }
  .grid3 { grid-template-columns:1fr; }
  .quick.q7 { grid-template-columns:repeat(4, 1fr); }
}

/* ---- 직급·메뉴 (2026-11-10) ---- */
.quick.q3 { grid-template-columns:repeat(3, 1fr); }
.empty-state b { color:var(--grey-700); font-size:16px; }
.role-pick { display:inline-flex; gap:6px; align-items:center; }
.role-pick { white-space:nowrap; }
.role-pick select { padding:4px 8px; height:32px; min-width:96px; }
.menu a span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:-.02em; }
.menu a { gap:10px; }

/* ---- 영업관리·배송관리 (카페맵에서 옮겨 옴, 2026-11-10) ---- */
.banner { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 16px; border-radius:var(--r); background:var(--grey-100); color:var(--grey-700); font-size:14px; margin-bottom:16px; }
.banner.warn { background:var(--orange-weak); color:var(--orange-text); }
.banner .ic { flex:none; }
.banner span { flex:1; min-width:200px; }
.dot.t-purple { background:#9b5cf0; } .dot.t-blue { background:var(--blue); } .dot.t-green { background:var(--green); }
.dot.t-grey { background:var(--grey-400); } .dot.t-red { background:var(--red); }
.tag.st-purple { background:var(--purple-weak); color:var(--purple-text); } .tag.st-blue { background:var(--blue-weak); color:var(--blue-strong); }
.tag.st-green { background:var(--green-weak); color:var(--green-text); } .tag.st-grey { background:var(--grey-100); color:var(--grey-600); }
.tag.st-red { background:var(--red-weak); color:var(--red-text); }
.new-tag { display:inline-block; padding:0 5px; border-radius:5px; background:var(--red); color:#fff; font-size:10.5px; font-weight:800; line-height:16px; vertical-align:2px; }
.dt-tag { display:inline-block; padding:0 6px; margin-right:6px; border-radius:6px; font-size:12px; font-weight:700; line-height:20px; vertical-align:2px; }
.dt-dawn { background:#1f2a5c; color:#fff; } .dt-day { background:var(--yellow-weak); color:var(--yellow-text); }
.chip[aria-pressed=true] { background:var(--grey-900); color:#fff; box-shadow:none; }
.chip[aria-pressed=true] em { color:rgba(255,255,255,.7); }
.chip[aria-pressed=false] .dot { opacity:.35; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.map-filters { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; margin-bottom:12px; }
.map-opts { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.map-opts input[type=search] { width:180px; height:36px; margin:0; }
.drop { position:relative; }
.drop > summary { list-style:none; cursor:pointer; }
.drop > summary::-webkit-details-marker { display:none; }
.drop-panel { position:absolute; z-index:30; top:40px; left:0; background:var(--surface); box-shadow:var(--shadow-lg); border-radius:var(--r); padding:12px 14px; display:grid; gap:8px; min-width:160px; }
.map-layout { display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:16px; margin-bottom:16px; }
.map-box { position:relative; }
.map { width:100%; height:calc(100vh - 260px); min-height:420px; border-radius:var(--r-lg); overflow:hidden; background:var(--grey-100); box-shadow:var(--shadow); }
.map-loc { position:absolute; left:12px; bottom:12px; width:40px; height:40px; border-radius:12px; background:var(--surface); box-shadow:var(--shadow); display:grid; place-items:center; color:var(--grey-700); }
.map-hint { position:absolute; left:50%; top:12px; transform:translateX(-50%); margin:0; background:rgba(25,31,40,.85); color:#fff; font-size:13px; padding:6px 12px; border-radius:16px; white-space:nowrap; }
.map-note { background:var(--orange-weak); color:var(--orange-text); padding:10px 14px; border-radius:var(--r); font-size:14px; }
.map-list-card { margin:0; display:flex; flex-direction:column; max-height:calc(100vh - 260px); min-height:420px; }
.map-list-head { padding:14px 0 8px; border-bottom:1px solid var(--grey-100); }
.cafe-list { overflow-y:auto; flex:1; }
.cafe-list > a { gap:10px; padding:11px 0; }
.cafe-list .dot { width:10px; height:10px; border-radius:50%; flex:none; }
.cafe-list .l-main small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* 지도 핀 (네이버 지도 안에 들어가는 HTML) */
.pin { display:flex; align-items:center; gap:4px; white-space:nowrap; transform:translate(0, 0); cursor:pointer; }
.pin .dot { width:18px; height:18px; border-radius:50%; border:3px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.35); flex:none; }
.pin.t-purple .dot { background:#9b5cf0; } .pin.t-blue .dot { background:#3182f6; } .pin.t-green .dot { background:#03b26c; } .pin.t-grey .dot { background:#8b95a1; }
.pin .lbl { font-size:12px; font-weight:700; color:#191f28; background:rgba(255,255,255,.92); padding:1px 6px; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.pin .new-tag, .pin .dt-tag { margin:0; }
.pin.is-new .dot { box-shadow:0 0 0 3px rgba(240,68,82,.45), 0 1px 4px rgba(0,0,0,.35); }
.map.far .pin .lbl, .map.far .pin .dt-tag { display:none; }
.pick-map { width:100%; height:300px; border-radius:var(--r); overflow:hidden; background:var(--grey-100); margin:6px 0 14px; }
.search-row { display:flex; gap:8px; align-items:center; }
.search-row input { flex:1; margin:0; }
.search-row .btn { flex:none; }
.ns-results { display:grid; gap:6px; margin:-6px 0 14px; }
.ns-item { text-align:left; display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:10px; background:var(--grey-50); border:1px solid var(--grey-200); color:var(--grey-800); }
.ns-item:hover { border-color:var(--blue); background:var(--blue-faint); }
.ns-item small { color:var(--grey-500); }
.photos { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:0 0 12px; }
.cafe-photo img, img.pv { width:180px; height:135px; object-fit:cover; border-radius:10px; background:var(--grey-100); display:block; }
.opt { display:inline-flex; margin:0; cursor:pointer; }
.opt input { position:absolute; opacity:0; width:1px; height:1px; }
.opt span { display:inline-flex; align-items:center; height:36px; padding:0 14px; border-radius:18px; background:var(--grey-100); color:var(--grey-700); font-weight:600; font-size:14px; }
.opt input:checked + span { background:var(--grey-900); color:#fff; }
.opt input:focus-visible + span { outline:2px solid var(--blue); outline-offset:2px; }
.visit-form .opts, .opts.tight { gap:8px; }
.status-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.status-row .chip.on .dot { box-shadow:0 0 0 2px rgba(255,255,255,.6); }
.actions-row { display:flex; flex-wrap:wrap; gap:8px; }
.fold-in > summary { list-style:none; cursor:pointer; display:inline-flex; margin-bottom:12px; }
.fold-in > summary::-webkit-details-marker { display:none; }
.fold-in[open] > summary { margin-bottom:16px; }
.visit-form { padding:4px 0 16px; border-bottom:1px solid var(--grey-100); margin-bottom:8px; }
.inline-form { display:flex; gap:8px; align-items:center; margin-bottom:12px; }
.inline-form input { flex:1; margin:0; max-width:520px; }
.visits .l-main small { white-space:normal; }
@media (max-width:960px) {
  .map-layout { grid-template-columns:1fr; }
  .map { height:58vh; min-height:320px; }
  .map-list-card { max-height:none; min-height:0; }
  .cafe-list { max-height:none; }
  .map-opts input[type=search] { width:100%; }
  .map-filters { flex-direction:column; align-items:stretch; }
  .cafe-photo img, img.pv { width:46vw; height:34vw; }
}
.no-map .map-layout { grid-template-columns:1fr; }
.no-map .map-list-card { max-height:none; }
.no-map .cafe-list { max-height:70vh; }
.drop > summary.btn { display:inline-flex; align-items:center; gap:6px; }
[hidden] { display:none !important; }
/* 배송관리 (3단계) */
.orange-text { color:var(--orange-text); }
.dot.t-orange { background:var(--orange); }
.pin.t-orange .dot { background:#ff8a1f; }
.banner.danger { background:var(--red-weak); color:var(--red-text); font-size:15px; align-items:flex-start; }
.banner.danger b { font-size:16px; }
.map-legend { position:absolute; right:12px; bottom:12px; margin:0; display:flex; gap:10px; background:rgba(255,255,255,.92); padding:6px 10px; border-radius:10px; font-size:12px; color:var(--grey-700); box-shadow:var(--shadow); }
.map-legend span { display:inline-flex; align-items:center; gap:4px; }
.map-legend .dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.no-map .map-legend { display:none; }
/* 오늘 배송 (5단계) */
.tag.st-orange { background:var(--orange-weak); color:var(--orange-text); }
.day-chips { margin-bottom:16px; }
.day-chips .chip { text-decoration:none; }
.stops { list-style:none; margin:0; padding:0; counter-reset:stop; }
.stop { position:relative; padding:14px 0 14px 34px; border-top:1px solid var(--grey-100); counter-increment:stop; }
.stop:first-child { border-top:0; }
.stop::before { content:counter(stop); position:absolute; left:0; top:14px; width:24px; height:24px; border-radius:12px; background:var(--grey-900); color:#fff; font-size:12px; font-weight:700; display:grid; place-items:center; }
.stop-head { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-bottom:4px; }
.stop-head b { font-size:16px; }
.stop-note { margin:6px 0; padding:8px 10px; border-radius:10px; background:var(--blue-faint, #f2f7ff); font-size:14px; }
.stop-note.danger { background:var(--red-weak); color:var(--red-text); font-weight:600; }
.stop-addr { color:var(--grey-600); margin:4px 0 8px; }
.stop-items { list-style:none; margin:0 0 10px; padding:0; display:grid; gap:2px; }
.stop-items li { display:flex; justify-content:space-between; gap:12px; padding:5px 10px; background:var(--grey-50); border-radius:8px; font-size:14px; }
.stop-items b { font-variant-numeric:tabular-nums; white-space:nowrap; }
.set-dt { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; }
.load-sum { margin-top:12px; }
.tbl.compact td { padding:6px 10px; font-size:14px; }
/* 영업일지 (2026-11-10) */
.log-filters .chips { margin-bottom:12px; align-items:center; }
.log-form { display:flex; flex-wrap:wrap; gap:8px 10px; align-items:flex-end; }
.log-form label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--grey-600); margin:0; }
.log-form label.grow { flex:1 1 220px; }
.log-form select { min-width:110px; }
.log-sum { margin:14px 0 0; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.log-sum a.tag { text-decoration:none; }
.log-sum a.tag.on { box-shadow:0 0 0 2px var(--grey-900); }
.log-day { margin-bottom:12px; }
.log-date { display:flex; justify-content:space-between; align-items:center; margin:-4px -24px 0; padding:12px 24px; border-bottom:1px solid var(--grey-100); background:var(--grey-50); border-radius:var(--r-lg) var(--r-lg) 0 0; }
@media (max-width:960px) { .log-date { margin:-2px -16px 0; padding:12px 16px; } }
/* 휴대폰 앱 설치 안내 (2026-11-12) */
.install-sheet { position:fixed; inset:0; z-index:60; display:flex; align-items:flex-end; justify-content:center;
  background:rgba(0,12,30,0); transition:background .2s; }
.install-sheet.on { background:rgba(0,12,30,.38); }
.install-sheet[hidden] { display:none; }
.install-card { position:relative; width:100%; max-width:480px; background:#fff; border-radius:22px 22px 0 0; padding:22px 20px calc(18px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 30px rgba(0,0,0,.12); transform:translateY(100%); transition:transform .25s cubic-bezier(.2,.8,.2,1); }
.install-sheet.on .install-card { transform:none; }
.install-x { position:absolute; top:10px; right:10px; width:40px; height:40px; padding:0; background:transparent; color:var(--grey-500); }
.install-head { display:flex; align-items:center; gap:14px; margin:0 36px 16px 0; }
.install-head img { border-radius:14px; flex:none; }
.install-head b { display:block; font-size:19px; color:var(--grey-900); letter-spacing:-0.02em; }
.install-head small { display:block; font-size:14.5px; color:var(--grey-600); line-height:1.45; margin-top:2px; }
.install-body p { margin:0 0 12px; font-size:15.5px; line-height:1.55; }
.install-body .muted.small { margin:10px 0 0; text-align:center; }
.install-steps { margin:0; padding:0; list-style:none; counter-reset:st; display:flex; flex-direction:column; gap:10px; }
.install-steps li { counter-increment:st; position:relative; font-size:16px; line-height:1.5; padding:12px 14px 12px 52px;
  background:var(--grey-50); border-radius:12px; }
.install-steps li::before { content:counter(st); position:absolute; left:14px; top:50%; transform:translateY(-50%); width:26px; height:26px;
  border-radius:50%; background:var(--blue); color:#fff; font-weight:700; font-size:14px; display:grid; place-items:center; }
.install-steps .key { display:inline-block; padding:0 6px; border-radius:6px; background:#fff; box-shadow:inset 0 0 0 1px var(--grey-300); }
.install-foot { display:flex; justify-content:space-between; margin-top:14px; }
.install-foot .link { font-size:14.5px; color:var(--grey-600); height:auto; padding:8px 4px; }

/* 마트오픈 정보 (영업관리, 2026-11-17) */
.mart-filters .chips { margin-bottom:10px; }
.mart-sync { margin:4px 0 0; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.mart-apply { margin:10px 0 0; padding:10px 12px; border-radius:10px; background:var(--yellow-weak); color:var(--yellow-text); line-height:1.6; }
.mart-apply a { color:inherit; font-weight:700; text-decoration:underline; }
.mart-title { margin:24px 0 12px; }
.card.mart { margin-bottom:12px; }
.card.mart.seen { opacity:.8; }
.mart-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.mart-where { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; min-width:0; }
.mart-where > b { font-size:17px; color:var(--grey-900); }
.mart-where > small { flex-basis:100%; }
.mart-act { display:flex; align-items:center; gap:8px; }
.mart-act form { margin:0; }
.mart-permits > li { align-items:flex-start; padding:10px 0; }
.mart-permits .tag { flex:none; margin-top:1px; }
.mart-permits .l-main { min-width:0; }
.mart-permits .l-main small { overflow-wrap:anywhere; }
.mart-others { margin-top:4px; }
.mart-others[open] summary { margin-bottom:4px; }
.mart-marks { margin:8px 0 0; }
.mart-watch summary .muted { flex-basis:100%; }
@media (max-width:960px) { .mart-act { width:100%; } .mart-where > b { font-size:16px; } }
