@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #f3f5f9; --card: #fff; --line: #e7eaf0; --line2: #f0f2f6; --head: #f7f8fb;
  --text: #1b2232; --sub: #4b5565; --muted: #8a93a4;
  --primary: #2f6bff; --primary-d: #1f56e0; --pw: #ecf2ff;
  --danger: #e5484d; --dw: #fdecec; --ok: #12a150; --okw: #e7f7ee; --warn: #d97f00; --ww: #fff4e0;
  --brand: #ff5a1f; --brand-w: #fff0e9;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --radius: 14px; --side: 214px; --top: 56px;
}
/* 시스템 다크모드 (직접 고른 테마가 있으면 그쪽이 우선) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f131a; --card: #171c25; --line: #283040; --line2: #202633; --head: #1c222d;
  --text: #e8ecf3; --sub: #b8c0ce; --muted: #7f889a;
  --pw: #1c2a4a; --dw: #3a1d20; --okw: #15301f; --ww: #3a2c12; --brand-w: #3a2216;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f131a; --card: #171c25; --line: #283040; --line2: #202633; --head: #1c222d;
  --text: #e8ecf3; --sub: #b8c0ce; --muted: #7f889a;
  --pw: #1c2a4a; --dw: #3a1d20; --okw: #15301f; --ww: #3a2c12; --brand-w: #3a2216;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Pretendard, 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
svg.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hide { display: none !important; }
.muted { color: var(--muted); } .sub { color: var(--sub); }
.t-r { text-align: right; } .t-c { text-align: center; }
.blue { color: var(--primary); } .red { color: var(--danger); } .green { color: var(--ok); }
b, strong { font-weight: 700; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 20px 0 0; z-index: 40; }
.brand { width: var(--side); display: flex; align-items: center; gap: 8px; padding-left: 22px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.brand .logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #ff7a2f, #ff3d3d); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 900; }
.brand small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); margin-top: 1px; }
.top-search { flex: 0 1 370px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--head); border: 1px solid var(--line); color: var(--muted); }
.top-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 13px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-right .who { font-size: 13px; color: var(--muted); white-space: nowrap; }
.top-right .who b { color: var(--primary); }
.menu-toggle { display: none; }

/* ---------- side ---------- */
.side { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 10px 24px; z-index: 30; }
.side::-webkit-scrollbar { width: 6px; } .side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--sub); font-size: 14px; user-select: none; }
.nav-item:hover { background: var(--head); }
.nav-item.active { background: var(--pw); color: var(--text); font-weight: 600; }
.nav-item .chev { margin-left: auto; width: 13px; height: 13px; color: var(--muted); transition: transform .15s; }
.nav-item.open .chev { transform: rotate(90deg); }
.nav-item .dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.nav-item .cnt { margin-left: auto; font-size: 11px; background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.nav-sub { margin: 2px 0 6px 22px; border-left: 1px solid var(--line); padding-left: 6px; }
.nav-sub a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.nav-sub a:hover { color: var(--text); }
.nav-sub a.active { background: var(--pw); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--primary); }
.side-sep { height: 1px; background: var(--line); margin: 14px 2px; }
.banner { display: block; height: 66px; border-radius: 12px; margin: 10px 4px 0; padding: 10px 14px; position: relative; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 15% 120%, #b9d9a6 0, transparent 45%), radial-gradient(circle at 95% -20%, #cfe6bd 0, transparent 50%), linear-gradient(135deg, #f4f8ee, #e9f1df); color: #1d2a18; border: 1px solid #dfe9d3; }
.banner b { font-size: 16px; font-weight: 900; letter-spacing: -0.04em; display: block; }
.banner span { font-size: 10px; color: #4c5b45; }
.banner i { position: absolute; right: 10px; bottom: 9px; width: 26px; height: 26px; border-radius: 50%; background: #7cb342; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; }
.banner.orange { background: linear-gradient(135deg, #fff3ea, #ffe2cf); border-color: #ffd9c0; color: #5a2a0a; }
.banner.orange span { color: #8a5432; } .banner.orange i { background: var(--brand); }
.cs-box { margin: 12px 4px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.cs-box .lb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sub); }
.cs-box .tel { font-size: 17px; font-weight: 800; margin: 10px 0 6px; white-space: nowrap; }
.nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-box .hr { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.cs-box.acc .tel { font-size: 14px; }

/* ---------- main ---------- */
.main { margin-left: var(--side); padding: calc(var(--top) + 18px) 26px 26px; min-height: 100vh; }
.page-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-top h1 { font-size: 22px; margin: 8px 0 4px; font-weight: 800; letter-spacing: -0.03em; }
.page-top .desc { color: var(--muted); font-size: 13.5px; }
.page-top .crumb { font-size: 12.5px; color: var(--primary); font-weight: 700; }
.pill { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 12.5px; color: var(--muted); box-shadow: var(--shadow); white-space: nowrap; margin-left: auto; }
.pill b { color: var(--primary); }
.pill .ring { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--primary); border-right-color: var(--pw); }
.pill a:hover { color: var(--text); }
.footer { margin-top: 60px; background: var(--head); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; font-size: 12.5px; color: var(--muted); line-height: 2; }
.footer b { color: var(--text); font-size: 13.5px; }
.footer span { margin-right: 18px; } .footer span em { font-style: normal; color: var(--sub); margin-left: 6px; }
.footer .legal { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- card & filter ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card + .card, .card + .gap, .gap + .card { margin-top: 14px; }
.card-hd { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-hd h3 { margin: 0; font-size: 15px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin: 0 0 14px; }
.sec-title::before { content: ''; width: 3px; height: 15px; background: var(--primary); border-radius: 2px; }
.fbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.frow { display: flex; border-top: 1px solid var(--line); min-height: 58px; }
.frow:first-child { border-top: 0; }
.fl { width: 140px; flex: none; background: var(--head); display: flex; align-items: center; padding: 0 18px; font-size: 13px; color: var(--sub); }
.fv { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 18px; flex-wrap: wrap; min-width: 0; }
.frow .fl + .fv + .fl { border-left: 1px solid var(--line); }
.gap { height: 14px; }
.toolbar { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; flex-wrap: wrap; }
.toolbar .r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.note { font-size: 12.5px; color: var(--muted); }

/* ---------- inputs ---------- */
.inp, .sel, textarea.inp { height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: var(--card); outline: none; min-width: 0; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.inp:focus, .sel:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--pw); }
.inp.w-full { width: 100%; } .inp.w400 { width: 400px; max-width: 100%; } .inp.w200 { width: 200px; } .inp.w140 { width: 140px; } .inp.w90 { width: 90px; }
.sel { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; min-width: 130px; }
.date-box { display: inline-flex; align-items: center; gap: 6px; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: var(--card); font-weight: 600; font-size: 13px; }
.date-box input { border: 0; outline: 0; background: transparent; width: 112px; font-weight: 600; font-size: 13px; }
.date-box .ic { color: var(--primary); }
.chip { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--sub); font-size: 12.5px; cursor: pointer; }
.chip:hover { border-color: #c9d2e3; }
.chip.on { background: var(--head); color: var(--text); font-weight: 700; border-color: #cfd6e4; }
.radio, .check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-right: 12px; font-size: 13.5px; color: var(--sub); }
.radio input, .check input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.radio input:checked + span { color: var(--text); font-weight: 600; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: #c4cddd; background: var(--head); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); }
.btn.danger { color: var(--danger); }
.btn.danger.fill { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; font-weight: 600; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; font-weight: 700; }
.btn.excel .ic { color: #1f9d55; } .btn.img .ic { color: #9b7cf0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; position: relative; }
.icon-btn.plain { border: 0; background: transparent; }
.icon-btn .badge-dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

/* ---------- badges ---------- */
.bdg { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--head); color: var(--sub); white-space: nowrap; }
.bdg.blue { background: var(--pw); color: var(--primary); } .bdg.red { background: var(--dw); color: var(--danger); }
.bdg.green { background: var(--okw); color: var(--ok); } .bdg.orange { background: var(--ww); color: var(--warn); }
.bdg.dark { background: #2a3142; color: #fff; }

/* ---------- table ---------- */
.tbl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--head); font-weight: 700; font-size: 12.5px; padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: center; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line2); text-align: center; vertical-align: middle; }
.tbl td.l, .tbl th.l { text-align: left; } .tbl td.r, .tbl th.r { text-align: right; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--head) 60%, transparent); }
.tbl tr.clickable { cursor: pointer; }
.tbl .nowrap { white-space: nowrap; }
.tbl .ellip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.tbl .acts { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.empty { padding: 64px 20px; text-align: center; }
.empty .ei { width: 48px; height: 48px; border-radius: 12px; background: var(--pw); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ei .ic { width: 20px; height: 20px; }
.empty b { display: block; font-size: 15px; margin-bottom: 6px; }
.empty span { color: var(--muted); font-size: 13px; }
.tbl-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--head); border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pager { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 0 8px; }
.pager button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pager button:disabled { opacity: .5; cursor: default; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; }
.tabs button { height: 40px; padding: 0 20px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--head); color: var(--muted); cursor: pointer; font-size: 13.5px; }
.tabs button.on { background: var(--card); color: var(--text); font-weight: 700; }
.tabs + .tbl-card { border-top-left-radius: 0; }

/* ---------- stats cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12.5px; color: var(--sub); }
.kpi .v { font-size: 19px; font-weight: 800; margin-top: 8px; letter-spacing: -0.02em; }
.kpi.link { cursor: pointer; } .kpi.link:hover { border-color: var(--primary); }
.kpi .v small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }

/* ---------- products ---------- */
.cat-card { padding: 16px 18px 18px; }
.cat-bar { display: flex; align-items: center; gap: 4px; background: var(--head); border-radius: 12px; padding: 8px; flex-wrap: wrap; }
.cat-bar button { height: 38px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; color: var(--sub); font-size: 13.5px; }
.cat-bar button.on { background: var(--pw); color: var(--primary); font-weight: 700; }
.cat-bar button.srch { background: var(--card); border: 1px solid var(--line); border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); margin-right: 6px; }
.cat-bar .sbox { display: flex; gap: 6px; width: 100%; padding: 6px 2px 2px; }
.cat-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--sub); gap: 10px; flex-wrap: wrap; }
.cat-meta b { color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; margin-top: 16px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: var(--shadow); }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,30,60,.10); }
.pcard .thumb { position: relative; aspect-ratio: 1 / 1; }
.thumb-img { width: 100%; height: 100%; display: grid; place-items: center; font-size: 76px; overflow: hidden; }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .tl, .pcard .tr { position: absolute; top: 10px; }
.pcard .tl { left: 10px; } .pcard .tr { right: 10px; }
.pcard .tl .bdg { background: rgba(20,24,34,.82); color: #fff; }
.pcard .tr .bdg { background: rgba(255,255,255,.88); color: #5b6474; }
.pcard .self { position: absolute; left: 10px; bottom: 10px; }
.pcard .info { padding: 14px 13px 15px; }
.pcard .nm { font-weight: 700; font-size: 14.5px; margin-bottom: 14px; min-height: 20px; }
.pcard .ln { font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.pcard .ln b { color: var(--text); font-weight: 700; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15,20,30,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-hd b { font-size: 15px; }
.modal-bd { padding: 20px; overflow-y: auto; }
.modal-ft { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1d2433; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: fade .2s; }
.toast.err { background: var(--danger); } .toast.ok { background: #13874a; }

/* ---------- detail table (key/value) ---------- */
.kv { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.kv th { width: 130px; background: var(--head); text-align: left; padding: 13px 16px; font-weight: 700; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.desc-box { border: 1px solid var(--line); border-radius: 6px; padding: 14px; white-space: pre-wrap; line-height: 1.7; min-height: 80px; }
.pd-top { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.pd-top .thumb-img { border-radius: 14px; aspect-ratio: 1/1; height: auto; font-size: 120px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fbox.form .fl { width: 120px; } .fbox.form .frow { min-height: 64px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--sub); }
.field.full { grid-column: 1 / -1; }
.req::after { content: ' *'; color: var(--danger); }
.ac-wrap { position: relative; }
.ac { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); max-height: 340px; overflow-y: auto; z-index: 20; }
.ac div { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px solid var(--line2); }
.ac div:hover, .ac div.on { background: var(--pw); }
.ac div em { font-style: normal; color: var(--primary); font-weight: 700; white-space: nowrap; }
.sum-tbl { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sum-tbl th { width: 110px; text-align: left; background: var(--head); padding: 13px 16px; font-weight: 500; color: var(--sub); border-bottom: 1px solid var(--line); }
.sum-tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.sum-tbl tr:last-child th, .sum-tbl tr:last-child td { border-bottom: 0; }
.sum-tbl tr.total td { color: var(--primary); font-size: 16px; font-weight: 800; }

/* ---------- excel wizard ---------- */
.steps { display: flex; align-items: center; gap: 10px; }
.step { display: flex; align-items: center; gap: 8px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: var(--muted); background: var(--card); }
.step.on .n { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--pw); }
.step.done .n { background: var(--okw); color: var(--ok); border-color: transparent; }
.step b { font-size: 13px; display: block; } .step small { font-size: 11px; color: var(--muted); }
.step-line { width: 34px; height: 1px; background: var(--line); }
.xl-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.opt-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; margin-bottom: 8px; }
.opt-card input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }
.opt-card b { display: block; font-size: 13.5px; } .opt-card small { color: var(--muted); font-size: 12px; }
.opt-card.on { border-color: #b8ccff; background: var(--pw); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pw) 70%, transparent); }
.drop { border: 1.5px dashed #6cc49a; border-radius: 12px; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px; transition: background .15s; }
.drop.over { background: var(--okw); }
.drop .di { width: 74px; height: 74px; border-radius: 18px; border: 1px solid var(--line); display: grid; place-items: center; color: #1f9d55; background: var(--card); box-shadow: var(--shadow); }
.drop .di .ic { width: 30px; height: 30px; }
.drop h4 { margin: 8px 0 0; font-size: 18px; }
.ftags { display: flex; gap: 6px; } .ftags span { border: 1px solid #bfe5cf; color: #1f9d55; font-weight: 700; font-size: 11.5px; padding: 3px 10px; border-radius: 999px; }
.file-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--head); font-weight: 600; }
.info-bar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; font-size: 13px; color: var(--sub); line-height: 1.7; }
.info-bar b { color: var(--text); font-size: 13.5px; }
.info-bar code { background: var(--head); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.map-grid .field { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.map-grid .sel { width: 100%; height: 34px; }

/* ---------- misc ---------- */
.reply { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 8px; }
.reply.admin { background: var(--pw); border-color: transparent; }
.reply .rh { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.reply .rc { white-space: pre-wrap; line-height: 1.6; }
.code { background: #111725; color: #d7e1f5; border-radius: 10px; padding: 14px 16px; font-family: Consolas, monospace; font-size: 12.5px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.keybox code { background: var(--head); border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; font-family: Consolas, monospace; }
.chart-card { padding: 22px 22px 16px; margin-top: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--pw) 45%, var(--card)), var(--card) 40%); }
.chart-card .tr { font-size: 11.5px; letter-spacing: .12em; color: var(--primary); font-weight: 800; }
.chart-card h3 { margin: 4px 0 2px; font-size: 17px; }
.chart-box { height: 330px; margin-top: 10px; }
.opt-edit td { padding: 6px 6px; } .opt-edit .inp { height: 34px; width: 100%; }
.thumb-sm { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; font-size: 24px; }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.status-flow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.status-flow span { padding: 6px 12px; border-radius: 999px; background: var(--head); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.status-flow span.on { background: var(--primary); color: #fff; }
.status-flow i { color: var(--muted); font-style: normal; }
.side-mask { display: none; }

@media (max-width: 1100px) {
  .xl-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .brand { width: auto; padding-left: 8px; }
  .top-search, .top-right .who, .hide-m { display: none; }
  .topbar { padding-left: 10px; }
  .side { transform: translateX(-100%); transition: transform .2s; }
  body.side-open .side { transform: none; }
  body.side-open .side-mask { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(0,0,0,.3); z-index: 25; }
  .main { margin-left: 0; padding: calc(var(--top) + 14px) 14px 20px; }
  .frow { flex-direction: column; } .fl { width: auto; padding: 10px 14px; } .frow .fl + .fv + .fl { border-left: 0; }
  .pd-top { grid-template-columns: 1fr; }
  .pill { margin-left: 0; white-space: normal; flex-wrap: wrap; border-radius: 14px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media print { .topbar, .side, .footer, .pill { display: none; } .main { margin: 0; padding: 0; } }

/* 주문입력 폼: 라벨 고정폭 + 입력칸 채우기 */
.fbox.form .fl { width: 96px; padding: 0 14px; white-space: nowrap; font-size: 12.5px; }
.fbox.form .fv { flex-wrap: nowrap; padding: 10px 14px; }
.fbox.form .fv[style*="column"] { flex-wrap: wrap; }
.inp.grow { flex: 1 1 auto; width: 100%; min-width: 0; }
.nowrap { white-space: nowrap; flex: none; }
.fv .check { margin-right: 0; font-size: 12.5px; }

/* 고객 AI상담 */
.cs-box.ai { cursor: pointer; background: linear-gradient(160deg, var(--pw), var(--card) 70%); border-color: #c9d8ff; }
.cs-box.ai > b { display: block; font-size: 15px; margin: 8px 0 4px; }
.ai-av, .bot-av { width: 38px; height: 38px; border-radius: 12px; margin: 0 auto; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #fff; background: linear-gradient(135deg, #2f6bff, #8b5cf6); box-shadow: 0 4px 12px rgba(47,107,255,.3); }
.bot { position: fixed; left: calc(var(--side) + 16px); bottom: 16px; width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 90px); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(15,25,50,.22); z-index: 90; display: flex; flex-direction: column; animation: fade .15s; }
.bot-hd { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.bot-hd .bot-av { margin: 0; width: 34px; height: 34px; }
.bot-hd b { display: block; font-size: 14.5px; } .bot-hd small { color: var(--muted); font-size: 11.5px; }
.bot-hd .icon-btn { margin-left: auto; }
.bot-bd { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--card); border: 1px solid var(--line); font-size: 13px; line-height: 1.65; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 14px 14px 4px 14px; }
.bot-prod { border-top: 1px dashed var(--line); padding: 7px 0 3px; font-size: 12.5px; }
.bot-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 0; }
.bot-chips .chip { flex: none; border-radius: 999px; }
.bot-ft { display: flex; gap: 6px; padding: 10px 12px 12px; }
.bot-ft .inp { flex: 1; font-size: 13px; }
.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 900px) { .bot { left: 16px; } }

/* 발주서 변환기 */
.conv { max-width: 1080px; margin: 0 auto; }
.conv-hd { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.conv-hd h1 { margin: 0; font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -0.03em; }
.conv .desc { margin: 8px 0 26px; font-size: 14px; }
.conv-steps { justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.conv-steps .step b { font-size: 13.5px; color: var(--muted); } .conv-steps .step.on b { color: var(--primary); }
.conv-line { width: 110px; }
.conv-card { max-width: 680px; margin: 0 auto; }
.conv-t { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 18px; }
.conv-sep { height: 1px; background: var(--line); margin: 26px 0 18px; }
.conv-sample { width: 100%; border-color: var(--primary); color: var(--primary); border-radius: 12px; height: 42px; }
.conv-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 900px) { .conv-line { width: 24px; } .conv-hd h1 { font-size: 24px; } }

/* 축산물 시세 */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mk .k { display: flex; gap: 6px; align-items: center; } .mk .v { font-size: 22px; }
.mk.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--pw); }
.mk-ours { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.up { color: var(--danger); font-weight: 700; } .down { color: var(--primary); font-weight: 700; }

/* AI상담 기본 문답 */
.faq-box { margin-top: 10px; }
.faq { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--head); border-radius: 9px; padding: 7px 10px; margin-top: 5px; font-size: 12.5px; cursor: pointer; color: var(--text); }
.faq:hover { border-color: var(--primary); background: var(--pw); }
.kb-h { display: block; margin: 8px 0 2px; font-size: 12.5px; color: var(--primary); }
.kb { font-size: 12.5px; margin-top: 4px; } .kb-x { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; }
.pol-sec { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.pol-sec h4 { margin: 0 0 8px; font-size: 14.5px; }

/* 세부 카테고리 */
.sub-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding: 0 6px; }
.sub-bar span { font-size: 13px; margin-right: 4px; }
.sub-bar button { height: 32px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 13px; color: var(--sub); }
.sub-bar button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* 캐릭터 */
img.char { display: block; object-fit: contain; pointer-events: none; user-select: none; }
.thumb-img .thumb-char { width: 86%; height: 86%; margin: auto; filter: drop-shadow(0 8px 14px rgba(120,40,30,.18)); }
.thumb-sm .thumb-char { width: 100%; height: 100%; }
.pcard:hover .thumb-char { transform: translateY(-3px) rotate(-2deg); transition: transform .2s; }
.empty .empty-char { width: 130px; height: 120px; margin: 0 auto 10px; }
.sub-bar .sub-char { display: inline-block; width: 24px; height: 24px; margin: -4px 6px -6px -6px; vertical-align: middle; }
.sub-bar button { display: inline-flex; align-items: center; }
.ai-char { width: 86px; height: 86px; margin: -6px auto -4px; }
.bot-char { width: 40px; height: 40px; flex: none; }
.pop-char { width: 150px; height: 130px; margin: 0 auto 10px; }
.char-note { display: flex; align-items: center; gap: 14px; background: var(--ww); border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; font-size: 13.5px; }
.char-note.ok { background: var(--okw); }
.note-char { width: 92px; height: 70px; flex: none; }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin: 0 2px 1px 6px; box-shadow: 0 0 0 3px var(--okw); animation: blink 1.6s infinite; }

/* 상품리스트 가독성: 카드 크게, 상품명·공급가 강조 */
.grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 18px; }
.pcard { border-radius: 16px; }
.pcard .info { padding: 16px 16px 18px; }
.pcard .nm { font-size: 17px; font-weight: 800; margin-bottom: 12px; line-height: 1.35; letter-spacing: -0.02em; }
.pcard .ln { font-size: 13.5px; line-height: 1.9; }
.pcard .ln.price { font-size: 14px; color: var(--sub); }
.pcard .ln.price b { font-size: 19px; color: var(--primary); font-weight: 800; margin-right: 2px; }
.pcard .tl .bdg, .pcard .tr .bdg { height: 24px; font-size: 12px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } .pcard .nm { font-size: 15px; } .pcard .ln.price b { font-size: 16px; } }

/* 시연 전환 (협력사 ⇄ 관리자) — 로그인 붙이면 제거 */
.demo-switch { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(15,25,50,.16); font-size: 12.5px; }
.demo-switch span { padding: 0 8px 0 10px; color: var(--muted); font-weight: 700; }
.demo-switch a { padding: 7px 14px; border-radius: 999px; color: var(--sub); font-weight: 600; }
.demo-switch a.on { background: var(--primary); color: #fff; }

/* =====================================================================
   v2 화면 정리 — 색은 데이터·상태에만, 크롬은 무채색, 평평한 면
   얼굴: 몬스터커머스 로고의 오렌지를 공급가 같은 핵심 숫자에만 사용
   격자: 본문 좌우 여백 28px(폰 16px), 카드 간격 14px 하나로 통일
   ===================================================================== */
:root {
  --bg: #f6f6f4; --card: #ffffff; --line: #e6e6e3; --line2: #f0f0ee; --head: #f9f9f8;
  --text: #17181a; --sub: #44474d; --muted: #63666d;
  --primary: #1d1f20; --primary-d: #000000; --pw: #ececea;            /* 버튼·선택: 진회색 / 회색 */
  --accent: #c2410c; --accent-w: #fff1e8;                             /* 데이터 색: 로고 오렌지(글자용으로 진하게) */
  --info: #1d4ed8; --info-w: #e8efff;                                 /* 상태 알약 전용 파랑 */
  --danger: #c4242a; --dw: #ffedea; --ok: #247b50; --okw: #dcfae5; --warn: #92400e; --ww: #fff6e5;
  --shadow: none; --radius: 8px; --r-ctl: 6px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f0f10; --card: #18181a; --line: #2a2a2d; --line2: #222224; --head: #1d1d20;
  --text: #f2f2f2; --sub: #c4c4c6; --muted: #a0a0a4;
  --primary: #f2f2f2; --primary-d: #ffffff; --pw: #2a2a2d;
  --accent: #ff8a4c; --accent-w: #33211a; --info: #8fb0ff; --info-w: #1d2638;
  --danger: #f07178; --dw: #3a1d20; --ok: #4cc38a; --okw: #15301f; --warn: #f0b45a; --ww: #33280f; } }
:root[data-theme="dark"] {
  --bg: #0f0f10; --card: #18181a; --line: #2a2a2d; --line2: #222224; --head: #1d1d20;
  --text: #f2f2f2; --sub: #c4c4c6; --muted: #a0a0a4;
  --primary: #f2f2f2; --primary-d: #ffffff; --pw: #2a2a2d;
  --accent: #ff8a4c; --accent-w: #33211a; --info: #8fb0ff; --info-w: #1d2638;
  --danger: #f07178; --dw: #3a1d20; --ok: #4cc38a; --okw: #15301f; --warn: #f0b45a; --ww: #33280f;
}
body { font-variant-numeric: tabular-nums; }
.blue { color: var(--accent); }

/* 버튼·컨트롤: 하나의 높이, 6px 모서리, 진회색 주 버튼 */
.btn, .inp, .sel, .date-box, .icon-btn { border-radius: var(--r-ctl); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--card); }
.btn.primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
.btn:hover { background: var(--head); }
.inp:focus, .sel:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--pw); }
.sel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2363666d' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 12px center; background-size: 10px 6px; }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.chip { border-radius: 999px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--card); }
.pager button { border-radius: var(--r-ctl); }
.pager button.on { background: var(--primary); border-color: var(--primary); color: var(--card); }
.radio input, .check input, .tbl input[type=checkbox], .opt-card input { accent-color: var(--primary); }

/* 상단바·사이드바: 페이지 바탕과 같은 면, 선택은 회색 알약 */
.brand .logo { background: var(--brand); border-radius: 7px; }
.top-search { border-radius: var(--r-ctl); background: var(--bg); }
.top-right .who b { color: var(--text); }
.nav-item { border-radius: var(--r-ctl); }
.nav-item.active { background: var(--pw); color: var(--text); }
.nav-item .dot { background: var(--accent); }
.nav-sub a.active { background: var(--pw); box-shadow: none; }
.banner, .banner.orange { background: var(--head); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); height: auto; min-height: 58px; }
.banner b { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
.banner span, .banner.orange span { font-size: 12px; color: var(--muted); }
.banner i, .banner.orange i { background: var(--primary); color: var(--card); width: 22px; height: 22px; font-size: 11px; }
.banner:hover { border-color: var(--muted); }
.banner { display: flex; flex-direction: column; justify-content: center; padding: 10px 44px 10px 14px; min-height: 54px; }
.banner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner i { top: 50%; bottom: auto; transform: translateY(-50%); }
.cs-box { border-radius: var(--radius); }
.cs-box.ai { background: var(--accent-w); border-color: transparent; }
.ai-av, .bot-av { background: var(--brand); box-shadow: none; }
.pill { box-shadow: none; border-radius: var(--radius); }
.pill b { color: var(--text); }
.pill .ring { border-color: var(--accent); border-right-color: var(--accent-w); }

/* 카드·표: 그림자 없이 1px 선, 머리줄 띠 없음, 숫자는 오른쪽 정렬 */
.card, .fbox, .tbl-card, .kpi, .pcard, .info-bar, .footer { box-shadow: none; border-radius: var(--radius); }
.fl { background: var(--head); color: var(--sub); }
.tbl th { background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); }
.tbl td { border-bottom-color: var(--line2); }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl tbody tr:hover td { background: var(--head); }
.tbl-ft { background: transparent; }
.tabs button { border-radius: var(--radius) var(--radius) 0 0; }
.tabs button.on { color: var(--text); }
.bdg { border-radius: 4px; }
.bdg.blue { background: var(--info-w); color: var(--info); }
.empty .ei { background: var(--pw); color: var(--sub); border-radius: var(--radius); }

/* KPI: 칸마다 상자를 만들지 않고, 구분선으로 나눈 한 상자 (마지막 줄도 꽉 채움) */
.kpis { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpis > .kpi { flex: 1 1 140px; border: 0; border-radius: 0; background: var(--card); padding: 16px 18px; }
.kpi .k { color: var(--muted); }
.kpi .v { font-size: 22px; }
.kpi.link:hover { background: var(--head); border-color: transparent; }
.mk-grid { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mk-grid > .kpi { flex: 1 1 230px; border: 0; border-radius: 0; }
.mk.on { box-shadow: inset 0 0 0 2px var(--primary); }
.up { color: var(--danger); } .down { color: var(--info); }

/* 상품리스트 */
.cat-card { padding: 14px; }
.cat-bar { background: var(--head); border-radius: var(--radius); }
.cat-bar button { border-radius: var(--r-ctl); }
.cat-bar button { border: 1px solid transparent; }
.cat-bar button.on { background: var(--card); color: var(--text); border-color: var(--line); }
.cat-bar button.srch { border-radius: var(--r-ctl); }
.sub-bar button.on { background: var(--primary); border-color: var(--primary); color: var(--card); }
.pcard:hover { transform: translateY(-2px); box-shadow: none; border-color: var(--muted); }
.pcard .ln.price b { color: var(--accent); }
.pcard .ln.price small { font-size: 12.5px; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.pcard .ln.sub2 { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.thumb-img img { transition: transform .3s; } .pcard:hover .thumb-img img { transform: scale(1.03); }

/* 통계 차트·변환기·모달 */
.chart-card { background: var(--card); }
.chart-card .tr { display: none; }
.modal { border-radius: 12px; }
.step.on .n { background: var(--primary); border-color: var(--primary); color: var(--card); box-shadow: none; }
.opt-card.on { border-color: var(--primary); background: var(--head); box-shadow: none; }
.drop { border-color: var(--line); border-radius: var(--radius); }
.drop.over { background: var(--head); border-color: var(--primary); }
.drop .di { box-shadow: none; border-radius: var(--radius); }
.conv-hd h1 { color: var(--text); }
.conv-sample { border-color: var(--line); color: var(--text); }
.char-note { border-radius: var(--radius); }
.msg.me { background: var(--primary); border-color: var(--primary); color: var(--card); }
.reply.admin { background: var(--accent-w); }
.demo-switch { box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.demo-switch a.on { background: var(--primary); color: var(--card); }
.footer { background: var(--card); }

/* 폰: 여백 16px, 탭은 옆으로 넘김, 잔액 바는 2열 */
@media (max-width: 900px) {
  .main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .cat-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cat-bar::-webkit-scrollbar { display: none; }
  .cat-bar button { flex: none; }
  .cat-bar .sbox { flex: none; width: 100%; }
  .pill { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; width: 100%; padding: 12px 14px; }
  .pill .ring { display: none; }
  .demo-switch { font-size: 11.5px; padding: 4px; } .demo-switch span { display: none; } .demo-switch a { padding: 6px 10px; }
  .page-top h1 { font-size: 20px; }
}

/* 배너 광고 (B안): 큰 배너 2/3 + 옆 배너 1/3 */
.bn-area { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.bn-area.solo { grid-template-columns: 1fr; }
.bn { position: relative; display: flex; align-items: center; gap: 16px; border-radius: var(--radius); overflow: hidden; padding: 18px 20px; min-height: 124px; height: 100%; text-decoration: none; transition: transform .15s; }
.bn:hover { transform: translateY(-1px); } .bn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bn-tx { flex: 1; min-width: 0; position: relative; z-index: 1; }
.bn-tx b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.bn-tx span { display: block; font-size: 13px; margin-top: 5px; opacity: .85; line-height: 1.45; }
.bn-tx em { display: inline-block; font-style: normal; font-size: 12.5px; font-weight: 700; margin-top: 10px; padding: 5px 11px; border-radius: var(--r-ctl); background: rgba(0,0,0,.12); }
.bn img { width: 96px; height: 96px; object-fit: contain; flex: none; position: relative; z-index: 1; }
.bn.photo img { position: absolute; right: 0; top: 0; width: 46%; height: 100%; object-fit: cover; }
.bn.photo .bn-tx { max-width: 52%; }
.bn-ad { position: absolute; top: 9px; right: 11px; font-size: 11px; font-weight: 800; opacity: .55; z-index: 2; }
.bn.photo .bn-ad { color: #fff; opacity: .9; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.bn.big { min-height: 260px; padding: 30px 34px 52px; }
.bn.big .bn-tx b { font-size: 30px; } .bn.big .bn-tx span { font-size: 15.5px; } .bn.big .bn-tx em { font-size: 14px; padding: 8px 14px; margin-top: 16px; }
.bn.big img { width: 220px; height: 220px; }
.bn.big.photo img { width: 50%; height: 100%; }
.bn.pv { min-height: 120px; } .bn.big.pv { min-height: 180px; padding: 18px 20px 20px; } .bn.big.pv .bn-tx b { font-size: 20px; } .bn.big.pv img { width: 110px; height: 110px; }
.bn-hero { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 260px; }
.bn-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s; }
.bn-slide.on { opacity: 1; visibility: visible; position: relative; height: 100%; }
.bn-nav { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.32); color: #fff; border-radius: 999px; padding: 3px; }
.bn-nav .bn-count { font-size: 12px; font-weight: 700; padding: 0 6px; font-variant-numeric: tabular-nums; }
.bn-arrow { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.bn-arrow:hover { background: rgba(255,255,255,.18); }
.bn-dots { position: absolute; left: 34px; bottom: 20px; z-index: 3; display: flex; gap: 6px; }
.bn-dots button { width: 7px; height: 7px; border-radius: 4px; border: 0; padding: 0; background: rgba(0,0,0,.28); cursor: pointer; transition: width .2s; }
.bn-dots button.on { width: 22px; background: rgba(0,0,0,.62); }
.bn-side { display: grid; grid-template-rows: 1fr 1fr; gap: 14px; }
/* 광고 페이지 */
.ad-back { margin: 0 0 12px; } .ad-back a { display: inline-flex; align-items: center; gap: 4px; color: var(--sub); font-size: 13px; font-weight: 600; }
.ad-back .ic { transform: rotate(180deg); width: 14px; height: 14px; }
.ad-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 24px; border-radius: var(--radius); overflow: hidden; padding: 40px 44px; min-height: 340px; }
.ad-kicker { font-size: 14px; font-weight: 700; opacity: .8; }
.ad-hero h1 { font-size: 32px; line-height: 1.25; letter-spacing: -0.03em; margin: 10px 0 12px; text-wrap: balance; }
.ad-hero p { font-size: 16px; opacity: .88; margin: 0 0 22px; line-height: 1.6; }
.ad-img { display: grid; place-items: center; } .ad-img img { width: 100%; max-width: 320px; aspect-ratio: 1; object-fit: contain; }
.ad-img.photo img { max-width: none; object-fit: cover; border-radius: var(--radius); }
.ad-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.ad-p { font-size: 15px; line-height: 1.8; margin: 0 0 16px; max-width: 68ch; }
.ad-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ad-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.ad-points .ic { color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.ad-side .thumb-img { border-radius: var(--radius); aspect-ratio: 1; }
@media (max-width: 900px) {
  .bn-area { grid-template-columns: 1fr; gap: 10px; }
  .bn-hero { min-height: 200px; } .bn.big { min-height: 200px; padding: 20px 20px 46px; } .bn.big .bn-tx b { font-size: 21px; } .bn.big .bn-tx span { font-size: 13.5px; } .bn.big img { width: 120px; height: 120px; }
  .bn-dots { left: 20px; bottom: 18px; }
  .bn-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 10px; }
  .bn-side .bn { flex-direction: column; align-items: flex-start; min-height: 0; padding: 14px; } .bn-side .bn img { width: 56px; height: 56px; position: absolute; right: 8px; bottom: 8px; opacity: .9; }
  .bn-side .bn .bn-tx b { font-size: 14.5px; } .bn-side .bn .bn-tx span { font-size: 12px; padding-right: 40px; }
  .ad-hero { grid-template-columns: 1fr; padding: 26px 22px; min-height: 0; } .ad-hero h1 { font-size: 23px; } .ad-img img { max-width: 200px; }
  .ad-body { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .bn-slide, .bn { transition: none; } }

/* 한글 제목·배너는 단어 단위로 줄바꿈 */
.page-top h1, .ad-hero h1, .ad-hero p, .bn-tx b, .bn-tx span, .conv-hd h1, .sec-title, .empty b { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 900px) { .bn-side .bn img { width: 44px; height: 44px; right: 6px; bottom: 6px; } .bn-side .bn .bn-tx em { margin-top: 8px; } }

/* 공급사 센터 */
.ap-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ap-grid.two { grid-template-columns: 1fr 1fr; }
.ap-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.ap-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; align-items: start; }
.ap-steps li::before { content: counter(s); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--pw); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; }
.ap-steps b { font-size: 14px; } .ap-steps span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .ap-grid, .ap-grid.two { grid-template-columns: 1fr; } }

/* 배너 · 광고 페이지: 사진을 배경 전체로 (글자 쪽만 배너 색 스크림) */
.bn.cover { overflow: hidden; }
.bn.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: 0; }
.bn.cover::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bnbg) 96%, transparent) 0%, color-mix(in srgb, var(--bnbg) 82%, transparent) 34%, color-mix(in srgb, var(--bnbg) 0%, transparent) 66%); }
.bn.cover .bn-tx { max-width: 52%; }
.bn.cover .bn-ad { color: inherit; }
.ad-hero.cover { position: relative; overflow: hidden; grid-template-columns: 1fr; min-height: 380px; }
.ad-hero.cover .ad-bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.ad-hero.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bnbg) 96%, transparent) 0%, color-mix(in srgb, var(--bnbg) 80%, transparent) 38%, color-mix(in srgb, var(--bnbg) 0%, transparent) 70%); }
.ad-hero.cover .ad-copy { position: relative; z-index: 1; max-width: 560px; }
@media (max-width: 900px) {
  .bn.cover .bn-tx { max-width: 70%; }
  .bn.cover::before, .ad-hero.cover::before { background: linear-gradient(90deg, color-mix(in srgb, var(--bnbg) 95%, transparent) 0%, color-mix(in srgb, var(--bnbg) 75%, transparent) 55%, color-mix(in srgb, var(--bnbg) 20%, transparent) 100%); }
}

.bn.cover .bn-tx { max-width: 44%; }
.bn.cover.big .bn-tx b { font-size: 28px; line-height: 1.28; }
.bn.cover::before { background: linear-gradient(90deg, color-mix(in srgb, var(--bnbg) 97%, transparent) 0%, color-mix(in srgb, var(--bnbg) 88%, transparent) 38%, color-mix(in srgb, var(--bnbg) 0%, transparent) 62%); }
@media (max-width: 900px) { .bn.cover .bn-tx { max-width: 72%; } .bn.cover.big .bn-tx b { font-size: 20px; } }

/* =====================================================================
   로그인 · 회원가입 · 약관 화면
   ===================================================================== */
.au-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.au-top { height: var(--top); display: flex; align-items: center; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--card); }
.au-main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 40px 28px 56px; }
.au-main.wide { max-width: 920px; }
.au-split { display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.au-hero { position: relative; background: #17181a; color: #f2f2f2; padding: 44px 40px; display: flex; flex-direction: column; min-height: 520px; overflow: hidden; }
.au-hero h1 { font-size: 30px; line-height: 1.3; margin: 0 0 14px; letter-spacing: -0.03em; word-break: keep-all; }
.au-hero p { margin: 0; color: #c4c4c6; line-height: 1.75; max-width: 34ch; word-break: keep-all; }
.au-hero .au-char { position: absolute; right: -10px; bottom: -6px; width: 230px; opacity: .95; }
.au-pts { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 12px; max-width: 62%; }
.au-pts li { border-top: 1px solid #2f3033; padding-top: 12px; display: grid; gap: 3px; }
.au-pts b { color: #ff8a4c; font-size: 13px; } .au-pts span { color: #c4c4c6; font-size: 13px; word-break: keep-all; }
.au-card { background: var(--card); padding: 44px 40px; }
.au-split .au-card { border: 0; }
.au-card:not(.au-split .au-card) { border: 1px solid var(--line); border-radius: var(--radius); }
.au-card h2 { font-size: 22px; margin: 0 0 20px; letter-spacing: -0.02em; }
.au-card .field { margin-bottom: 14px; } .au-card .field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--sub); }
.au-card .inp { width: 100%; height: 44px; }
.au-full { width: 100%; height: 46px; font-size: 15px; }
.au-row { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 14px; }
.au-link { color: var(--sub); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }
.au-err { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 6px; word-break: keep-all; }
.au-sub { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--muted); }
.au-sub a { color: var(--text); }
.au-demo { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.au-demo span { margin-right: auto; }
.au-alert { background: var(--ww); color: var(--warn); border-radius: var(--r-ctl); padding: 10px 14px; font-size: 13px; line-height: 1.6; margin-bottom: 16px; word-break: keep-all; }
.au-narrow { max-width: 440px; margin: 20px auto 0; }
.au-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--primary); color: var(--card); margin-bottom: 14px; }
.au-admin .au-top { background: #17181a; border-color: #17181a; color: #f2f2f2; }
.au-admin .brand small { color: #a0a0a4; }
.au-inline { display: flex; gap: 6px; }
.au-inline .inp { width: auto; }
.au-choose { display: grid; gap: 10px; }
.au-opt { display: grid; gap: 3px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.au-opt:hover { border-color: var(--primary); } .au-opt span { color: var(--muted); font-size: 13px; }
.au-foot { border-top: 1px solid var(--line); background: var(--card); padding: 18px 28px 24px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; word-break: keep-all; }
.au-links, .foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.au-links a, .foot-links a { color: var(--sub); }
.foot-links { justify-content: flex-start; margin: 12px 0 4px; font-size: 12.5px; }

/* 가입 단계 */
.su-card { padding: 36px 40px; }
.su-steps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.su-steps li { display: flex; align-items: center; gap: 8px; padding: 0 0 12px; color: var(--muted); font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.su-steps li i { font-style: normal; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--head); border: 1px solid var(--line); }
.su-steps li.on { color: var(--text); font-weight: 700; border-color: var(--primary); }
.su-steps li.on i { background: var(--primary); border-color: var(--primary); color: var(--card); }
.su-steps li.done i { background: var(--okw); border-color: var(--okw); color: var(--ok); }
.su-lead { margin: 0 0 18px; color: var(--sub); line-height: 1.7; word-break: keep-all; }
.su-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.su-role { position: relative; text-align: left; display: grid; gap: 6px; padding: 26px 24px 26px; min-height: 210px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; overflow: hidden; align-content: start; }
.su-role:hover { border-color: var(--primary); }
.su-role b { font-size: 20px; } .su-role span { color: var(--sub); line-height: 1.6; max-width: 60%; word-break: keep-all; } .su-role em { font-style: normal; font-size: 12.5px; color: var(--accent); margin-top: auto; }
.su-role .su-char { position: absolute; right: 6px; bottom: 0; width: 120px; }
.su-agree { display: flex; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--line2); cursor: pointer; font-size: 14px; }
.su-agree input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }
.su-agree > span { flex: 1; word-break: keep-all; }
.su-agree.all { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 14px 14px; background: var(--head); margin-bottom: 4px; }
.su-agree em { font-style: normal; font-size: 12px; font-weight: 700; margin-right: 6px; }
.req-t { color: var(--accent); } .opt-t { color: var(--muted); }
.su-box { margin: 4px 0 6px 32px; }
.su-tbl, .lg-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; border: 1px solid var(--line); }
.su-tbl th, .su-tbl td, .lg-tbl th, .lg-tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.6; word-break: keep-all; }
.su-tbl th, .lg-tbl th { background: var(--head); font-weight: 700; }
.su-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 8px 0 0; word-break: keep-all; }
.su-box .su-note { margin-bottom: 6px; }
.su-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.su-card .sec-title { margin: 22px 0 12px; } .su-card form > .sec-title:first-child { margin-top: 0; }
.su-card .field label { display: block; margin-bottom: 6px; }
.su-card .field .inp, .su-card .field .sel { width: 100%; }
.su-card .note { margin-top: 5px; }
.su-chs { display: flex; flex-wrap: wrap; gap: 10px 4px; }
.su-done { text-align: center; padding: 20px 0 10px; }
.su-done .su-char { width: 150px; }
.su-done h3 { font-size: 20px; margin: 10px 0 10px; } .su-done p { color: var(--sub); line-height: 1.7; margin: 0 0 8px; word-break: keep-all; }
.su-done .btn { margin-top: 14px; }

/* 마이페이지 */
.my-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.my-grid .field label { display: block; margin-bottom: 6px; } .my-grid .field .inp { width: 100%; }
.my-roles { display: grid; gap: 8px; }
.my-role { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.my-role span { color: var(--muted); font-size: 13px; margin-right: auto; } .my-role em { font-style: normal; font-size: 12px; color: var(--muted); }
.my-role.on b { color: var(--text); } .my-role:not(.on) b { color: var(--muted); }
.my-check { margin: 0 0 14px; padding-left: 18px; color: var(--sub); font-size: 13px; line-height: 1.9; }

/* 약관 문서 */
.lg-wrap { display: grid; gap: 0; }
.lg-tabs { margin-bottom: 0; } .lg-tabs a { height: 40px; padding: 0 20px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--head); color: var(--muted); font-size: 13.5px; }
.lg-tabs a.on { background: var(--card); color: var(--text); font-weight: 700; }
.lg-tabs + .card { border-top-left-radius: 0; }
.lg-doc h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -0.02em; }
.lg-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; margin: 18px 0 8px; padding: 14px 16px; background: var(--head); border-radius: var(--r-ctl); font-size: 13px; }
.lg-toc a { color: var(--sub); }
.lg-doc section { padding: 18px 0; border-bottom: 1px solid var(--line2); }
.lg-doc h2 { font-size: 15.5px; margin: 0 0 10px; }
.lg-body { color: var(--sub); line-height: 1.85; font-size: 14px; word-break: keep-all; }
.lg-body .lg-tbl { margin: 8px 0; }
.lg-modal .lg-doc h1 { display: none; }
.lg-modal .lg-doc > .muted:first-of-type { margin-top: 0; }

@media (max-width: 900px) {
  .au-main { padding: 20px 16px 40px; }
  .au-top { padding: 0 16px; }
  .au-split { grid-template-columns: 1fr; }
  .au-hero { min-height: 0; padding: 28px 22px 30px; }
  .au-hero h1 { font-size: 23px; } .au-hero .au-char { width: 120px; right: -6px; bottom: auto; top: 18px; opacity: .9; }
  .au-hero h1, .au-hero p { max-width: 72%; }
  .au-pts { max-width: none; margin-top: 22px; }
  .au-card, .su-card { padding: 26px 20px; }
  .su-steps { grid-template-columns: repeat(4, auto); gap: 10px; overflow-x: auto; }
  .su-steps li { font-size: 12.5px; white-space: nowrap; }
  .su-roles { grid-template-columns: 1fr; }
  .su-role { min-height: 170px; }
  .su-box { margin-left: 0; overflow-x: auto; }
  .my-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .au-split .au-card { order: -1; } .au-hero .au-char { display: none; } .au-hero h1, .au-hero p { max-width: none; } }

/* 공급사 상품리스트 */
.sp-pcard { cursor: default; }
.sp-pcard .sp-act { margin-top: 10px; }
.sp-pcard .sp-act .btn { width: 100%; }
.sp-cta { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; line-height: 1.7; }
.sp-cta .btn { margin-left: auto; }
.sp-swap { display: flex; gap: 6px 18px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
