/* ============================================================
   파트너사 협업 포털 — 디자인 시스템
   ============================================================ */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e3e6ec;
  --border-strong: #ccd2dc;
  --text: #1a1d24;
  --text-2: #5b6472;
  --text-3: #8b93a1;
  --brand: #312e81;
  --brand-soft: #eef0fb;
  --brand-line: #c9cdf0;
  --accent: #0f766e;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --info-soft: #eff8ff;
  --info: #175cd3;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', Roboto, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'D2Coding', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ---------- 부팅 ---------- */
.boot { display: grid; place-items: center; height: 100vh; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ 로그인 ============================ */
.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 24px; background:
  radial-gradient(1200px 600px at 10% -10%, #e8eaf8 0%, transparent 60%), var(--bg); }
.login-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 34px 32px; box-shadow: var(--shadow-lg);
}
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card .brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.login-card h1 { font-size: 19px; }
.login-card .sub { color: var(--text-2); font-size: 13px; margin: 4px 0 24px; }
.login-accounts {
  margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.login-accounts b { color: var(--text); font-weight: 600; }
.login-accounts .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.login-accounts button {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 9px; font-size: 12px; cursor: pointer; font-family: var(--mono);
}
.login-accounts button:hover { border-color: var(--brand-line); background: var(--brand-soft); }

/* ============================ 레이아웃 ============================ */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: #1c1b33; color: #c9cbe0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { padding: 18px 18px 14px; display: flex; align-items: center; gap: 10px; }
.sidebar .logo .mark {
  width: 30px; height: 30px; border-radius: 8px; background: #4f46e5; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}
.sidebar .logo .t { font-size: 13.5px; font-weight: 650; color: #fff; line-height: 1.25; }
.sidebar .logo .t small { display: block; font-weight: 400; font-size: 11px; color: #8f92b5; }
.sidebar nav { padding: 6px 10px 20px; flex: 1; }
.sidebar .sec { padding: 14px 10px 6px; font-size: 10.5px; letter-spacing: .08em; color: #7175a0; font-weight: 600; }
.sidebar a.item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px;
  font-size: 13.5px; color: #c9cbe0; margin-bottom: 1px;
}
.sidebar a.item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.item.active { background: #4f46e5; color: #fff; font-weight: 600; }
.sidebar a.item .ic { width: 16px; text-align: center; opacity: .9; flex: none; }
.sidebar a.item .cnt {
  margin-left: auto; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 0 6px; min-width: 18px; text-align: center;
}
.sidebar a.item.active .cnt { background: rgba(255,255,255,.28); }
.sidebar .foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.sidebar .foot .me { color: #fff; font-weight: 600; }
.sidebar .foot .org { color: #8f92b5; }
.sidebar .foot .acts { display: flex; gap: 10px; margin-top: 8px; }
.sidebar .foot a { color: #a9adcf; font-size: 12px; cursor: pointer; }
.sidebar .foot a:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 0 22px; height: 58px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.topbar h2 { font-size: 16px; }
.topbar .crumb { color: var(--text-3); font-size: 12.5px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.portal-tag {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: .02em;
}
.portal-tag.owner { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.portal-tag.partner { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.content { padding: 20px 22px 60px; flex: 1; min-width: 0; }

.menu-toggle { display: none; }

/* ============================ 카드 / 표 ============================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card > header {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.card > header h3 { font-size: 14px; }
.card > header .desc { font-size: 12px; color: var(--text-3); }
.card > header .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card .body { padding: 16px; }
.card .body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 15px; box-shadow: var(--shadow); }
.stat .lb { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.stat .sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.stat.alert { border-color: #fecdca; background: var(--danger-soft); }
.stat.alert .v { color: var(--danger); }
.stat.warn { border-color: #fedf89; background: var(--warn-soft); }
.stat.warn .v { color: var(--warn); }
.stat.good { border-color: #a6f4c5; background: var(--ok-soft); }
.stat.good .v { color: var(--ok); }
.stat.click { cursor: pointer; }
.stat.click:hover { border-color: var(--brand-line); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.tbl th {
  background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12px;
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.tbl td.r, table.tbl th.r { text-align: right; }
table.tbl td.c, table.tbl th.c { text-align: center; }
table.tbl tbody tr:hover { background: #f8f9fb; }
table.tbl tbody tr.click { cursor: pointer; }
table.tbl tr.exception td { background: var(--danger-soft); }
table.tbl tr.exception:hover td { background: #fee9e7; }
table.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--border-strong); }
.scroll-x { overflow-x: auto; }
.empty { padding: 40px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============================ 배지 / 칩 ============================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.badge.gray { background: #f2f4f7; color: #475467; border-color: #e4e7ec; }
.badge.blue { background: var(--info-soft); color: var(--info); border-color: #b2ddff; }
.badge.indigo { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.badge.green { background: var(--ok-soft); color: var(--ok); border-color: #a6f4c5; }
.badge.amber { background: var(--warn-soft); color: var(--warn); border-color: #fedf89; }
.badge.red { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.badge.teal { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }

.dd { font-size: 11.5px; font-weight: 700; }
.dd.over { color: var(--danger); }
.dd.near { color: var(--warn); }
.dd.ok { color: var(--text-3); }

.diff-pos { color: var(--ok); font-weight: 600; }
.diff-neg { color: var(--danger); font-weight: 600; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ============================ 폼 / 버튼 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #262261; border-color: #262261; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover:not(:disabled) { background: #05643c; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #97140c; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover:not(:disabled) { background: #eef0f4; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.block { width: 100%; }

.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input:disabled, select:disabled, textarea:disabled { background: #f4f5f7; color: var(--text-3); }
input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
input[data-num] { text-align: right; font-variant-numeric: tabular-nums; }
input[type=date] { cursor: pointer; }
textarea { resize: vertical; min-height: 72px; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline .field { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
.form-grid .span2 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.check input { width: auto; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .sp { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { padding: 5px 11px; background: var(--surface); border: 0; border-right: 1px solid var(--border); cursor: pointer; font-size: 12.5px; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; font-weight: 600; }

/* ============================ 모달 / 토스트 ============================ */
.modal-back {
  position: fixed; inset: 0; background: rgba(16,24,40,.5); display: grid; place-items: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
}
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1100px; }
.modal > header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal > header h3 { font-size: 15px; }
.modal > header .x { margin-left: auto; background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--text-3); line-height: 1; }
.modal .mbody { padding: 18px 20px; overflow-y: auto; }
/* 모달 본문은 자체 스크롤이라 sticky 헤더가 내용 위로 겹친다 */
.modal .mbody table.tbl th { position: static; }
.modal > footer { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 12px 12px; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: 400px; }
.toast {
  background: #111827; color: #fff; padding: 11px 15px; border-radius: 9px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: slide .2s ease; white-space: pre-line;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } }

/* ============================ 타임라인 ============================ */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-line);
}
.tl-item.hl::before { background: var(--brand); border-color: var(--brand); }
.tl-item .when { font-size: 11.5px; color: var(--text-3); }
.tl-item .what { font-size: 13px; font-weight: 600; margin-top: 1px; }
.tl-item .who { font-size: 12px; color: var(--text-2); }
.tl-item .det { font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; margin-top: 5px; white-space: pre-wrap; word-break: break-all; }

/* ============================ 상세 / 기타 ============================ */
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 7px 12px; font-size: 13px; }
.kv dt { color: var(--text-2); font-size: 12.5px; }
.kv dd { margin: 0; font-weight: 500; }
.section-title { font-size: 13px; font-weight: 650; margin: 0 0 9px; display: flex; align-items: center; gap: 7px; }
.notice { padding: 10px 13px; border-radius: 8px; font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.notice.info { background: var(--info-soft); color: #14468c; border: 1px solid #b2ddff; }
.notice.warn { background: var(--warn-soft); color: #93370d; border: 1px solid #fedf89; }
.notice.danger { background: var(--danger-soft); color: #912018; border: 1px solid #fecdca; }
.notice.ok { background: var(--ok-soft); color: #05603a; border: 1px solid #a6f4c5; }
.notice + .notice, .notice + .card, .card + .notice, .notice + .grid, .grid + .card, .card + .grid, .grid + .grid { margin-top: 14px; }

.flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 2px 0 4px; }
.flow .step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.flow .step .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #eceef3; color: var(--text-3); font-size: 11px; font-weight: 700; }
.flow .step.done .dot { background: var(--ok); color: #fff; }
.flow .step.done { color: var(--text); font-weight: 600; }
.flow .step.cur .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.flow .step.cur { color: var(--brand); font-weight: 700; }
.flow .bar { width: 22px; height: 2px; background: var(--border); margin: 0 7px; }
.flow .bar.done { background: var(--ok); }

.comment { border-bottom: 1px solid var(--border); padding: 10px 0; }
.comment:last-child { border-bottom: 0; }
.comment .h { display: flex; gap: 7px; align-items: center; font-size: 12px; }
.comment .h .nm { font-weight: 650; }
.comment .msg { margin-top: 3px; font-size: 13px; white-space: pre-wrap; }
.comment.internal { background: var(--warn-soft); border-radius: 6px; padding: 10px 11px; border: 1px solid #fedf89; margin: 6px 0; }

.filelist { display: flex; flex-direction: column; gap: 6px; }
.filerow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.filerow .nm { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filerow .sz { color: var(--text-3); font-size: 11.5px; margin-left: auto; white-space: nowrap; }

.bar-track { height: 7px; background: #eceef3; border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 20px; }
.bar-fill.ok { background: var(--ok); }
.bar-fill.warn { background: var(--warn); }

/* ============================ 반응형 (모바일 승인 UX) ============================ */
@media (max-width: 1100px) {
  .grid.k5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid.k4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 60; width: 250px; height: 100vh; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 14px 13px 60px; }
  .topbar { padding: 0 13px; }
  .grid.k5, .grid.k4, .grid.k3, .grid.k2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .stat .v { font-size: 19px; }
  .kv { grid-template-columns: 96px 1fr; }
  .modal { max-height: 92vh; }
}
@media (max-width: 520px) {
  .grid.k5, .grid.k4, .grid.k3, .grid.k2 { grid-template-columns: 1fr; }
  table.tbl th, table.tbl td { padding: 8px 9px; font-size: 12.5px; }
}

@media print {
  .sidebar, .topbar, .toolbar, .btn, .toasts { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- 공급요청 출고 진행 막대 ---------- */
.fulfill-track {
  position: relative; height: 10px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.fulfill-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; transition: width .25s ease; }
.fulfill-fill.ship { background: var(--brand); opacity: .38; }
.fulfill-fill.recv { background: var(--brand); }
.fulfill-legend {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin-top: 7px; font-size: 11.5px; color: var(--text-2);
}
.fulfill-legend i.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; background: var(--brand); vertical-align: -1px;
}
.fulfill-legend i.dot.ship { opacity: .38; }

/* ---------- 공유 상품 선택 ---------- */
.tbl tr.picked td { background: var(--brand-soft); }

/* ---------- 사이즈 묶음 ---------- */
.size-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.size-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 11.5px; line-height: 1.5;
  white-space: nowrap;
}
.size-chip b { font-weight: 600; }
.size-chip .n { color: var(--text-2); font-variant-numeric: tabular-nums; }
.size-chip.zero .n { color: var(--text-3); }
.size-chip.neg .n { color: var(--danger); font-weight: 600; }
.size-chip.shared { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
button.size-chip { cursor: pointer; }
button.size-chip:hover { border-color: var(--brand); }
.size-chip.picked { background: var(--brand); border-color: var(--brand); color: #fff; }
.size-chip.picked .n { color: #d8dbff; }
.size-chip.picked.shared { box-shadow: inset 0 0 0 1px #7fd1c8; }
.tbl tr.group-row td { vertical-align: middle; }
.tbl tr.sub-row td { background: var(--surface-2); font-size: 12.5px; padding-top: 6px; padding-bottom: 6px; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.prod-grid > .card { margin: 0; }
.size-matrix { font-size: 12px; }
.size-matrix th, .size-matrix td { text-align: center; min-width: 42px; padding: 5px 6px; }
.size-matrix th.l, .size-matrix td.l { text-align: left; min-width: 52px; }
.toggle-btn {
  width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text-2); font-size: 13px; line-height: 1; cursor: pointer;
}
.toggle-btn:hover { border-color: var(--brand); color: var(--brand); }
.tbl tr.group-row.clickable { cursor: pointer; }
.tbl tr.group-row.clickable:hover td { background: var(--surface-2); }
.tbl tr.group-row.open td { background: var(--brand-soft); }

/* ---------- 실시간 알림 카드 (우측 하단) ---------- */
.live-notis {
  position: fixed; right: 18px; bottom: 18px; z-index: 210;
  display: flex; flex-direction: column; gap: 10px; width: 340px; max-width: calc(100vw - 36px);
}
.live-noti {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 11px 13px 12px;
  animation: ln-in .22s ease;
}
.live-noti.more { border-left-color: var(--text-3); }
.live-noti.out { opacity: 0; transform: translateX(16px); transition: all .2s ease; }
@keyframes ln-in { from { opacity: 0; transform: translateY(10px); } }
.ln-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.ln-bell { font-size: 13px; }
.ln-time { color: var(--text-3); }
.ln-x { margin-left: auto; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--text-3); cursor: pointer; padding: 0 2px; }
.ln-x:hover { color: var(--text); }
.ln-title { font-weight: 600; font-size: 13.5px; margin-top: 6px; line-height: 1.4; }
.ln-body {
  font-size: 12.5px; color: var(--text-2); margin-top: 3px; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ln-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 9px; }
.live-noti.more .ln-actions { justify-content: space-between; }
.ln-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--brand-line); transition-property: width; transition-timing-function: linear; }
.ln-bar.run { width: 0; }
/* 토스트는 알림 카드 위로 올린다 */
.live-notis:not(:empty) ~ .toasts, body:has(.live-notis:not(:empty)) .toasts { bottom: auto; top: 70px; }
@media print { .live-notis { display: none !important; } }

/* ---------- 공지사항 ---------- */
.notice-list tr.unread .nt-title { font-weight: 600; }
.notice-list tr.pinned td { background: var(--surface-2); }
.nt-title { font-size: 13.5px; }
.nt-preview { font-size: 12px; margin-top: 2px; max-width: 640px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-new {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; vertical-align: 1px;
}
.nt-h { margin: 0; font-size: 19px; line-height: 1.4; }
.nt-body {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.75;
}
.dash-notices .dn-row { display: flex; gap: 8px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--border); cursor: pointer; }
.dash-notices .dn-row:first-child { border-top: 0; }
.dash-notices .dn-row:hover { background: var(--surface-2); }
.dash-notices .dn-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dash-notices .dn-row.unread .dn-title { font-weight: 600; }

/* ---------- 상품 선택 창 ---------- */
.pp-list { max-height: 44vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.pp-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); }
.pp-row:first-child { border-top: 0; }
.pp-row:hover { background: var(--surface-2); }
.pp-img { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.pp-name { flex: 0 0 280px; min-width: 0; font-size: 12.5px; line-height: 1.4; }
.pp-row .size-chips { flex: 1; }
.pp-picked { margin-top: 12px; }
.pp-picked-h { font-size: 13px; margin-bottom: 6px; }
.pp-picked input[data-num] { width: 100%; text-align: right; }
@media (max-width: 720px) { .pp-name { flex-basis: 160px; } }

/* ---------- 사용 매뉴얼 ---------- */
.manual-frame {
  display: block; width: 100%; height: calc(100vh - 150px); min-height: 520px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #f4f5f8;
}
