/* 찰떡상회 관리자 테마: Bootstrap 5 위에 기존 관리자(Ant Design 5)와 같은 모양을 입힌다 */

:root {
  --ant-primary: #1677ff;
  --ant-primary-hover: #4096ff;
  --ant-primary-bg: #e6f4ff;
  --ant-danger: #ff4d4f;
  --ant-success: #52c41a;
  --ant-cyan: #13c2c2;
  --ant-text: rgba(0, 0, 0, .88);
  --ant-text-2: rgba(0, 0, 0, .65);
  --ant-text-3: rgba(0, 0, 0, .45);
  --ant-disabled-bg: rgba(0, 0, 0, .04);
  --ant-disabled: rgba(0, 0, 0, .25);
  --ant-border: #d9d9d9;
  --ant-split: #f0f0f0;
  --ant-bg: #f5f5f5;
  --ant-radius: 6px;
  --ant-radius-lg: 8px;
  --sider-w: 250px;
  --sider-bg: #001529;
  --sider-sub-bg: #000c17;
  --sider-text: rgba(255, 255, 255, .85);
  --header-h: 64px;

  --bs-primary: var(--ant-primary);
  --bs-primary-rgb: 22, 119, 255;
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --bs-body-font-size: 14px;
  --bs-body-line-height: 1.5715;
  --bs-body-color: var(--ant-text);
  --bs-border-color: var(--ant-border);
  --bs-border-radius: var(--ant-radius);
  --bs-link-color: var(--ant-primary);
  --bs-link-color-rgb: 22, 119, 255;
}

body { background: var(--ant-bg); }
a { color: var(--ant-primary); text-decoration: none; }
a:hover { color: var(--ant-primary-hover); }

/* ── Ant Design 아이콘 (SVG를 글자색으로 칠함) ── */
.anticon {
  display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.125em;
  background-color: currentColor;
  -webkit-mask: var(--ai) center / contain no-repeat; mask: var(--ai) center / contain no-repeat;
}

/* ── 진행 막대 (ajax 화면 전환 중) ── */
#nav-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--ant-primary); z-index: 2000; opacity: 0;
  transition: width .3s ease, opacity .2s;
}
#nav-progress.on { opacity: 1; }

/* ── 왼쪽 메뉴 (기존: 폭 250px, 어두운 남색, 흰 글자) ── */
/* Bootstrap의 offcanvas-lg는 넓은 화면에서 배경을 투명으로 바꾸므로 !important로 덮는다 */
.sider { background: var(--sider-bg) !important; color: var(--sider-text); }
@media (min-width: 992px) {
  .sider { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sider-w); overflow-y: auto; z-index: 100; }
  .layout { margin-left: var(--sider-w); }
}
@media (max-width: 991.98px) {
  .sider.offcanvas-lg { --bs-offcanvas-width: var(--sider-w); }
}
.sider-logo {
  height: var(--header-h); display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 20px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sider-logo a { color: #fff; }
.sider-menu { padding: 4px 0 24px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: calc(100% - 8px); margin: 4px;
  height: 40px; padding: 0 16px 0 24px; border: 0; border-radius: var(--ant-radius-lg);
  background: none; color: var(--sider-text); font-size: 15px; text-align: left;
}
.menu-item:hover { color: #fff; }
.menu-item.active { background: var(--ant-primary); color: #fff; }
.menu-item .anticon { font-size: 16px; }
.menu-group-title { justify-content: space-between; }
.menu-arrow { display: inline-flex; font-size: 12px; transition: transform .2s; }
.menu-group.open .menu-arrow { transform: rotate(180deg); }
.menu-sub { display: none; background: var(--sider-sub-bg); padding: 2px 0; }
.menu-group.open .menu-sub { display: block; }
.menu-sub .menu-item { padding-left: 48px; }

/* ── 머리 막대 ── */
.topbar {
  position: sticky; top: 0; z-index: 90; height: var(--header-h);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
}
.topbar-toggle { border: 0; background: none; padding: 0; font-size: 20px; color: var(--ant-text); display: inline-flex; }
.topbar-fold { font-size: 18px; color: var(--ant-text); }
.topbar-title { font-size: 18px; font-weight: 600; }
.topbar-user { margin-left: auto; }
/* 사용자 메뉴 (기존: 아바타 + "Admin", 누르면 로그아웃) */
.topbar-user-btn { display: flex; align-items: center; gap: 8px; font-weight: 500; border: 0; background: none; padding: 4px 8px; border-radius: 8px; color: inherit; transition: background .2s; }
.topbar-user-btn:hover, .topbar-user-btn[aria-expanded="true"] { background: #f5f5f5; }
.user-menu { min-width: 160px; padding: 4px; border: 0; border-radius: var(--ant-radius-lg); box-shadow: 0 6px 16px rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05); }
.user-menu .dropdown-item { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 4px; font-size: 14px; }
.user-menu .dropdown-item:active { background: rgba(0, 0, 0, .04); color: inherit; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.demo-ribbon {
  font-size: 12px; color: #d46b08; background: #fff7e6; border: 1px solid #ffd591;
  border-radius: 4px; padding: 0 8px; line-height: 22px;
}
@media (max-width: 575.98px) { .demo-ribbon { display: none; } .topbar { padding: 0 16px; } }

/* ── 본문 ── */
.content { padding: 24px; min-height: calc(100vh - var(--header-h)); }
.content > .page-box { background: #fff; border-radius: var(--ant-radius-lg); padding: 24px; min-height: calc(100vh - var(--header-h) - 48px); }
@media (max-width: 767.98px) {
  .content { padding: 12px; }
  .content > .page-box { padding: 12px; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.page-title { font-size: 24px; font-weight: 700; margin: 0; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 767.98px) { .page-title { font-size: 20px; } }

.card-ant {
  background: #fff; border-radius: var(--ant-radius-lg); border: 1px solid var(--ant-split);
  margin-bottom: 16px;
}
.card-ant > .card-head {
  display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 24px;
  border-bottom: 1px solid var(--ant-split); font-weight: 600; font-size: 16px;
}
.card-ant > .card-head .extra { margin-left: auto; font-weight: 400; font-size: 14px; }
.card-ant > .card-body { padding: 24px; }
.card-title-sm { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
@media (max-width: 767.98px) {
  .card-ant > .card-head { padding: 0 16px; }
  .card-ant > .card-body { padding: 16px; }
}

/* ── 버튼 (Ant: 높이 32, 아이콘 14px + 간격 8px) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--ant-radius); font-size: 14px; height: 32px; padding: 4px 15px; line-height: 1.5715; white-space: nowrap;
}
.btn .anticon { font-size: 16px; vertical-align: -.15em; } /* 선 아이콘(Hugeicons)이 14px 이면 가늘어 16px */
.btn-sm { height: 24px; padding: 0 7px; font-size: 14px; border-radius: 4px; gap: 4px; }
.btn-lg { height: 40px; padding: 6px 15px; font-size: 16px; }
.btn:disabled, .btn.disabled { opacity: 1; color: var(--ant-disabled) !important; background: var(--ant-disabled-bg) !important; border-color: var(--ant-border) !important; box-shadow: none; }
.btn-primary { --bs-btn-bg: var(--ant-primary); --bs-btn-border-color: var(--ant-primary); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--ant-primary-hover); --bs-btn-hover-border-color: var(--ant-primary-hover);
  --bs-btn-active-bg: #0958d9; --bs-btn-active-border-color: #0958d9;
  box-shadow: 0 2px 0 rgba(5, 145, 255, .1); }
.btn-default { background: #fff; border: 1px solid var(--ant-border); color: var(--ant-text); box-shadow: 0 2px 0 rgba(0, 0, 0, .02); }
.btn-default:hover { color: var(--ant-primary-hover); border-color: var(--ant-primary-hover); background: #fff; }
.btn-danger-ghost { background: #fff; border: 1px solid var(--ant-danger); color: var(--ant-danger); }
.btn-danger-ghost:hover { background: #fff; color: #ff7875; border-color: #ff7875; }
.btn-success { --bs-btn-bg: var(--ant-success); --bs-btn-border-color: var(--ant-success); --bs-btn-color: #fff;
  --bs-btn-hover-bg: #73d13d; --bs-btn-hover-border-color: #73d13d; }
.btn-cyan { background: var(--ant-cyan); border: 1px solid var(--ant-cyan); color: #fff; }
.btn-cyan:hover { background: #36cfc9; border-color: #36cfc9; color: #fff; }
.btn-blue { background: #1890ff; border: 1px solid #1890ff; color: #fff; }
.btn-blue:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.btn-link-ant { color: var(--ant-primary); padding: 0; height: auto; border: 0; background: none; }

/* ── 태그(배지): Ant Tag ── */
.ant-tag {
  display: inline-block; height: auto; padding: 0 7px; font-size: 12px; line-height: 20px;
  border: 1px solid; border-radius: 4px; white-space: nowrap;
}
.ant-tag-default { color: var(--ant-text); background: #fafafa; border-color: var(--ant-border); }
.ant-tag-blue { color: #0958d9; background: #e6f4ff; border-color: #91caff; }
.ant-tag-geekblue { color: #1d39c4; background: #f0f5ff; border-color: #adc6ff; }
.ant-tag-green { color: #389e0d; background: #f6ffed; border-color: #b7eb8f; }
.ant-tag-orange { color: #d46b08; background: #fff7e6; border-color: #ffd591; }
.ant-tag-red { color: #cf1322; background: #fff1f0; border-color: #ffa39e; }
.ant-tag-purple { color: #531dab; background: #f9f0ff; border-color: #d3adf7; }
.ant-tag-cyan { color: #08979c; background: #e6fffb; border-color: #87e8de; }
.ant-tag-gold { color: #d48806; background: #fffbe6; border-color: #ffe58f; }
.ant-tag-magenta { color: #c41d7f; background: #fff0f6; border-color: #ffadd2; }
.ant-tag-volcano { color: #d4380d; background: #fff2e8; border-color: #ffbb96; }
.ant-tag-closable { padding-right: 4px; }
.ant-tag-closable .x { margin-left: 3px; font-size: 10px; color: var(--ant-text-3); cursor: pointer; }
.new-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px; line-height: 18px; font-weight: 400;
  color: #fff; background: #eb2f96; border-radius: 9px; vertical-align: middle;
}

/* ── 입력 ── */
.form-control, .form-select { border-radius: var(--ant-radius); font-size: 14px; min-height: 32px; height: 32px; padding: 4px 11px; border-color: var(--ant-border); }
textarea.form-control { height: auto; }
.form-select { padding-right: 32px; background-size: 12px 12px; }
.form-control:hover, .form-select:hover { border-color: var(--ant-primary-hover); }
.form-control:focus, .form-select:focus { border-color: var(--ant-primary-hover); box-shadow: 0 0 0 2px rgba(5, 145, 255, .1); }
.form-control::placeholder { color: var(--ant-disabled); }
.form-label { font-size: 14px; margin-bottom: 8px; color: var(--ant-text-2); }
@media (max-width: 767.98px) { .form-control, .form-select { font-size: 16px; } } /* 아이폰 확대 방지 */
/* 입력칸 옆 단위 상자(원, %, 원 이상 무료): 입력칸과 같은 높이·글자 (Ant Design addon 모양).
   Bootstrap 기본(38px·16px)이 남아 입력칸(32px)보다 커서 칸이 어긋났다(2026-10-28) */
.input-group-text { height: 32px; padding: 0 11px; font-size: 14px; line-height: 1; background: rgba(0, 0, 0, .02); border-color: var(--ant-border); color: var(--ant-text); }

.form-switch .form-check-input { width: 44px; height: 22px; margin-top: 0; cursor: pointer; background-color: rgba(0, 0, 0, .25); border: 0;
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); }
.form-switch .form-check-input:checked { background-color: var(--ant-primary); }
.form-switch .form-check-input:focus { box-shadow: none; }
.form-check-input { width: 16px; height: 16px; border-radius: 4px; border-color: var(--ant-border); cursor: pointer; }
.form-check-input:checked { background-color: var(--ant-primary); border-color: var(--ant-primary); }

/* 날짜 범위 입력 (Ant RangePicker 모양) */
.range-picker {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px; width: 140px; max-width: 100%;
  border: 1px solid var(--ant-border); border-radius: var(--ant-radius); background: #fff; cursor: pointer;
}
.range-picker.wide { width: 230px; } /* 기간이 하루보다 길면 넓힌다 */
.range-picker:hover { border-color: var(--ant-primary-hover); }
.range-picker input { border: 0; outline: 0; width: 100%; min-width: 0; font-size: 14px; color: var(--ant-text); background: none; cursor: pointer; }
.range-picker .anticon { color: var(--ant-disabled); }
.flatpickr-calendar { border-radius: var(--ant-radius-lg); box-shadow: 0 6px 16px rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05); font-family: inherit; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--ant-primary); border-color: var(--ant-primary); }
.flatpickr-day.inRange { background: var(--ant-primary-bg); border-color: var(--ant-primary-bg); box-shadow: -5px 0 0 var(--ant-primary-bg), 5px 0 0 var(--ant-primary-bg); }
.flatpickr-day.today { border-color: var(--ant-primary); }
.range-shortcuts { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--ant-split); flex-wrap: wrap; }
.range-shortcuts .ant-tag { cursor: pointer; }

/* ── 탭(기간 등): Ant Tabs ── */
.ant-tabs { display: flex; gap: 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ant-tabs::-webkit-scrollbar { display: none; }
.ant-tabs a { padding: 8px 0; color: var(--ant-text); white-space: nowrap; border-bottom: 2px solid transparent; }
.ant-tabs a:hover { color: var(--ant-primary-hover); }
.ant-tabs a.active { color: var(--ant-primary); border-bottom-color: var(--ant-primary); }
@media (max-width: 767.98px) { .ant-tabs { gap: 20px; } }

/* ── 주문 관리 머리 카드 ── */
.orders-head { padding: 16px 24px 0; }
.orders-head .title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.orders-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.orders-toolbar .left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.orders-toolbar .right { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.orders-search { width: 300px; max-width: 100%; margin: 12px 0 16px; }
.head-divider { height: 2px; background: #000; margin: 0; }
@media (max-width: 767.98px) {
  .orders-head { padding: 12px 12px 0; }
  .orders-toolbar .right { margin-left: 0; justify-content: flex-start; }
  .orders-search { width: 100%; }
}

/* ── 상태 집계 (기존: 색 글씨 제목 줄 + 가는 줄 + 굵은 숫자 줄) ── */
.stat-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: center; }
.stat-table th { font-size: 14px; font-weight: 700; padding: 20px 4px 12px; border-bottom: 1px solid var(--ant-split); }
.stat-table td { font-size: 20px; font-weight: 700; padding: 14px 4px 20px; }
.stat-table a { color: inherit; display: block; border-radius: var(--ant-radius); }
.stat-table a:hover { background: #fafafa; }
.stat-table .active a { text-decoration: underline; text-underline-offset: 6px; }
.stat-wrap { padding: 0 24px 4px; }
@media (max-width: 767.98px) {
  .stat-wrap { padding: 0 8px; overflow-x: auto; }
  .stat-table { min-width: 460px; }
  .stat-table th { font-size: 13px; padding: 14px 2px 8px; }
  .stat-table td { font-size: 18px; padding: 10px 2px 14px; }
}
.c-total { color: var(--ant-text); } .c-pending { color: #1677ff; } .c-pickup { color: #722ed1; } .c-ship { color: #13c2c2; }
.c-shipping { color: #fa8c16; } .c-done { color: #52c41a; } .c-cancel { color: #f5222d; }

/* ── 필터 카드 ── */
.filter-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; }
.filter-result .count { font-weight: 600; }

/* ── 위쪽 페이지 이동 줄 (기존) ── */
.page-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }

/* ── 표: Ant Table ── */
.table-ant { width: 100%; margin: 0; font-size: 14px; border-collapse: separate; border-spacing: 0; }
.table-ant > thead > tr > th {
  position: relative; background: #fafafa; color: var(--ant-text); font-weight: 600; padding: 16px 8px;
  border-bottom: 1px solid var(--ant-split); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.table-ant > thead > tr > th:first-child { border-top-left-radius: var(--ant-radius-lg); }
.table-ant > thead > tr > th:last-child { border-top-right-radius: var(--ant-radius-lg); }
/* 머리글 사이 세로 구분선 (Ant) */
.table-ant > thead > tr > th:not(:last-child)::before {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 1.6em; background: rgba(0, 0, 0, .06);
}
.table-ant > tbody > tr > td { padding: 16px 8px; border-bottom: 1px solid var(--ant-split); vertical-align: middle; overflow: hidden; }
.table-ant > tbody > tr:hover > td { background: #fafafa; }
.table-ant > tbody > tr.selected > td { background: var(--ant-primary-bg); }
.table-ant > tbody > tr.selected:hover > td { background: #bae0ff; }
.table-ant tr[data-href] { cursor: pointer; }
.table-ant .sub { display: block; font-size: 12px; color: var(--ant-text-3); }
.table-ant .center { text-align: center; }
.table-ant .stack { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.table-ant .items { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 2px; }
.table-ant .items .qty { color: var(--ant-text-3); text-align: right; }
.table-ant .items .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-wrap { overflow-x: auto; }
.table-resizable { table-layout: fixed; }
.col-resizer { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 2; }
.col-resizer::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 1px; background: rgba(0, 0, 0, .25); }
.col-resizer:hover::after, .resizing .col-resizer::after { height: 100%; bottom: 0; width: 2px; right: 3px; background: var(--ant-primary); }
.resizing, .resizing * { cursor: col-resize !important; user-select: none; }

/* 휴대폰에서는 표의 한 줄을 카드 한 장으로 보여준다 (HTML은 한 벌) */
@media (max-width: 767.98px) {
  .table-cards { table-layout: auto !important; width: 100% !important; }
  .table-cards > colgroup, .table-cards > thead { display: none; }
  .table-cards, .table-cards > tbody, .table-cards > tbody > tr > td { display: block; width: 100%; }
  .table-cards > tbody > tr {
    background: #fff; border: 1px solid var(--ant-split); border-radius: var(--ant-radius-lg);
    margin-bottom: 12px; padding: 12px 14px; position: relative; display: flex; flex-direction: column;
  }
  .table-cards > tbody > tr.selected { border-color: #91caff; background: var(--ant-primary-bg); }
  .table-cards > tbody > tr:hover > td, .table-cards > tbody > tr.selected > td { background: none; }
  .table-cards > tbody > tr > td {
    border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; white-space: normal;
  }
  .table-cards > tbody > tr > td::before { content: attr(data-label); color: var(--ant-text-3); font-size: 13px; text-align: left; flex: none; }
  .table-cards > tbody > tr > td.card-check { position: absolute; top: 12px; left: 14px; width: auto; padding: 0; }
  .table-cards > tbody > tr > td.card-check::before, .table-cards > tbody > tr > td.card-title::before, .table-cards > tbody > tr > td.card-actions::before { content: none; }
  .table-cards > tbody > tr > td.card-title { padding-left: 28px; font-weight: 600; font-size: 15px; justify-content: flex-start; align-items: center; }
  .table-cards > tbody > tr > td.card-actions { order: 10; padding-top: 10px; }
  .table-cards > tbody > tr > td.card-actions .stack { flex-direction: row; width: 100%; }
  .table-cards > tbody > tr > td.card-actions .btn { flex: 1; height: 38px; }
  .table-cards .hide-mobile { display: none !important; }
  .table-cards .items { text-align: left; }
}

/* ── 선택 시 나타나는 일괄 처리 버튼 ── */
.sel-only { display: none !important; }
.has-selection .sel-only { display: inline-flex !important; }
@media (max-width: 767.98px) {
  .bulk-dock { display: none; }
  .has-selection .bulk-dock {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; gap: 8px; background: #fff;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 8px rgba(0, 0, 0, .08);
  }
  .has-selection .bulk-dock .btn { flex: 1; height: 38px; padding: 0 6px; }
  .has-selection .content { padding-bottom: 80px; }
}
@media (min-width: 768px) { .bulk-dock { display: none !important; } }
@media (max-width: 767.98px) { .has-selection .orders-toolbar .sel-only { display: none !important; } }

/* ── 아래쪽 페이지 번호: Ant Pagination ── */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 0 0; }
.pager .total { margin-right: 4px; }
.pager a, .pager span.cur, .pager span.dis {
  min-width: 32px; height: 32px; line-height: 30px; text-align: center; padding: 0 6px;
  border: 1px solid transparent; border-radius: var(--ant-radius); color: var(--ant-text); display: inline-flex; align-items: center; justify-content: center;
}
.pager a:hover { background: rgba(0, 0, 0, .06); color: var(--ant-text); }
.pager span.cur { border-color: var(--ant-primary); color: var(--ant-primary); font-weight: 600; background: #fff; }
.pager span.dis { color: var(--ant-disabled); }
.pager .form-select { width: auto; }

/* ── 설명 표 (주문 상세, Ant Descriptions bordered) ── */
.desc { width: 100%; border: 1px solid var(--ant-split); border-radius: var(--ant-radius-lg); border-collapse: separate; border-spacing: 0; overflow: hidden; table-layout: fixed; }
.desc th { background: #fafafa; font-weight: 400; color: var(--ant-text-2); padding: 12px 24px; border-bottom: 1px solid var(--ant-split); border-right: 1px solid var(--ant-split); }
.desc td { padding: 12px 24px; border-bottom: 1px solid var(--ant-split); border-right: 1px solid var(--ant-split); word-break: break-all; }
.desc tr:last-child th, .desc tr:last-child td { border-bottom: 0; }
.desc tr > :last-child { border-right: 0; }
@media (max-width: 767.98px) {
  .desc, .desc tbody, .desc tr, .desc th, .desc td { display: block; width: 100%; }
  .desc th { border-right: 0; padding: 8px 12px 2px; background: none; font-size: 13px; border-bottom: 0; }
  .desc td { border-right: 0; padding: 0 12px 10px; }
}
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
@media (max-width: 767.98px) { .detail-actions .btn { flex: 1; height: 38px; } }
.totals { text-align: right; line-height: 2; margin-top: 16px; }
.totals .final { font-size: 18px; font-weight: 700; }
.memo-table .memo-text { white-space: normal; word-break: break-all; font-family: Consolas, "D2Coding", monospace; font-size: 13px; }
.memo-add { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; }
.memo-add textarea { flex: 1; }
@media (max-width: 767.98px) {
  .memo-add { flex-direction: column; align-items: stretch; }
  .memo-table .memo-text { text-align: left; }
}
.pg-memo { background: #fafafa; border: 1px dashed var(--ant-border); border-radius: var(--ant-radius); padding: 12px 16px; font-family: Consolas, "D2Coding", monospace; font-size: 13px; white-space: pre-wrap; word-break: break-all; margin-bottom: 12px; }

/* ── 배송 단계 ── */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ant-primary); background: #fff; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--ant-split); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ant-success); border-color: var(--ant-success); }
.timeline .when { color: var(--ant-text-3); font-size: 12px; }
.steps { display: flex; justify-content: space-between; margin-bottom: 16px; }
.steps span { flex: 1; text-align: center; font-size: 13px; color: var(--ant-text-3); padding-top: 10px; border-top: 3px solid var(--ant-split); }
.steps span.on { color: var(--ant-primary); border-top-color: var(--ant-primary); font-weight: 600; }

/* ── 대시보드 (고객 시안 1. 대시보드.png) ── */
.refresh-time {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; font-size: 13px;
  background: #f5f5f5; border: 1px solid var(--ant-split); border-radius: var(--ant-radius); color: var(--ant-text-2);
}
.refresh-time .anticon { color: var(--ant-success); }
.dash-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 0 20px; }
.dash-period .dp-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dash-period .ant-tabs { flex: 1 1 auto; min-width: 0; }
.dash-period .ant-tabs a { padding: 14px 0 12px; }
.dash-period .range-picker { margin-left: auto; }
@media (max-width: 767.98px) {
  .dash-period { padding: 8px 12px; gap: 4px 12px; }
  .dash-period .ant-tabs { order: 3; flex-basis: 100%; }
  .dash-period .ant-tabs a { padding: 8px 0; }
}
.dash-card { margin-bottom: 16px; }
.dash-head .dash-note { margin-left: 4px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--ant-split); }
.dash-title { font-size: 18px; font-weight: 700; color: var(--ant-text); display: inline-flex; align-items: center; gap: 6px; }
a.dash-title:hover { color: var(--ant-primary); }
.dash-note { font-size: 12px; font-weight: 400; color: var(--ant-text-3); }
.dash-body { padding: 8px 20px 20px; }
.dash-body > .ant-tabs, .dash-body .ant-tabs { border-bottom: 1px solid var(--ant-split); margin-bottom: 16px; }
.chart-meta { font-size: 12px; color: var(--ant-text-3); display: inline-flex; align-items: center; gap: 8px; }
.sample-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--ant-text-2); }
@media (max-width: 767.98px) { .dash-head, .dash-body { padding-left: 12px; padding-right: 12px; } }

.stat-tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.stat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 16px 8px; border-radius: var(--ant-radius-lg); color: inherit; transition: transform .15s, box-shadow .15s;
}
.stat-tile:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.stat-tile .label { font-size: 15px; font-weight: 600; }
.stat-tile .value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.tone-gray { background: #f0f0f0; } .tone-gray .label, .tone-gray .value { color: var(--ant-text); }
.tone-blue { background: #e6f4ff; } .tone-blue .label, .tone-blue .value { color: #1677ff; }
.tone-purple { background: #f3eaff; } .tone-purple .label, .tone-purple .value { color: #722ed1; }
.tone-cyan { background: #e6fffb; } .tone-cyan .label, .tone-cyan .value { color: #13c2c2; }
.tone-orange { background: #fff4e6; } .tone-orange .label, .tone-orange .value { color: #fa8c16; }
.tone-green { background: #edfbe6; } .tone-green .label, .tone-green .value { color: #52c41a; }
.tone-red { background: #fff0f0; } .tone-red .label, .tone-red .value { color: #f5222d; }
@media (max-width: 1199.98px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 575.98px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-tiles .stat-tile:first-child { grid-column: span 2; }
  .stat-tile .value { font-size: 22px; }
}

/* 서버·연동 상태 1장 + 주문 접수 스위치 6장 = 7장. 넓은 화면 4줄씩(4+3) */
.switch-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.switch-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff;
  border: 1px solid var(--ant-split); border-radius: var(--ant-radius-lg); min-width: 0;
}
.sc-icon { flex: none; width: 44px; height: 44px; border-radius: var(--ant-radius-lg); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; }
.sc-icon.tone-blue { color: #1677ff; } .sc-icon.tone-cyan { color: #13c2c2; } .sc-icon.tone-orange { color: #fa8c16; } .sc-icon.tone-purple { color: #722ed1; } .sc-icon.tone-green { color: #52c41a; }
.sc-text { min-width: 0; flex: 1; }
.sc-title { font-weight: 700; font-size: 14px; white-space: nowrap; }
.sc-desc { font-size: 12px; color: var(--ant-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-side { flex: none; }
@media (max-width: 1199.98px) { .switch-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767.98px) { .switch-cards { grid-template-columns: 1fr; gap: 8px; } }

.chart-box { border: 1px solid var(--ant-split); border-radius: var(--ant-radius-lg); padding: 14px 16px; height: 100%; }
.chart-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.chart-area { position: relative; height: 280px; }
.chart-area.tall { height: 300px; }
@media (max-width: 767.98px) { .chart-area, .chart-area.tall { height: 240px; } }
.seg { display: inline-flex; border: 1px solid var(--ant-border); border-radius: var(--ant-radius); overflow: hidden; font-size: 12px; font-weight: 400; }
.seg a { padding: 2px 10px; color: var(--ant-text-2); }
.seg a.on { background: var(--ant-primary); color: #fff; }

.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; min-height: 280px; }
.donut { position: relative; width: 180px; height: 180px; flex: none; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center span { font-size: 12px; color: var(--ant-text-2); }
.donut-center strong { font-size: 16px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 190px; min-width: 190px; display: flex; flex-direction: column; gap: 12px; }
.donut-legend li { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend .nm { white-space: nowrap; }
.donut-legend .sw { width: 12px; height: 12px; border-radius: 2px; }
.donut-legend .vl { text-align: right; font-weight: 600; }
.donut-legend .vl small { display: block; font-weight: 400; color: var(--ant-text-3); }
@media (max-width: 575.98px) { .donut-wrap { flex-direction: column; } .donut-legend { width: 100%; } }

.pl-table { width: 100%; margin-top: 16px; font-size: 13px; border-top: 1px solid var(--ant-split); }
.pl-table th { font-weight: 400; color: var(--ant-text-2); padding: 8px 8px 8px 0; white-space: nowrap; }
.pl-table td { text-align: right; padding: 8px 16px 8px 0; white-space: nowrap; }
.pl-table .neg { color: var(--ant-danger); }
.pl-table tr.sum { border-top: 1px solid var(--ant-split); }

.part-loading { opacity: .5; pointer-events: none; transition: opacity .15s; } /* 한 영역만 다시 불러오는 중 */

/* ── 대시보드 공통 ── */
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.todo { display: block; padding: 14px 16px; border-radius: var(--ant-radius-lg); border: 1px solid var(--ant-split); color: inherit; background: #fff; }
.todo:hover { border-color: var(--ant-primary-hover); color: inherit; }
.todo .t { font-size: 13px; color: var(--ant-text-2); }
.todo .n { font-size: 26px; font-weight: 700; }
.todo.warn { background: #fff7e6; border-color: #ffd591; }
.todo.warn .n { color: #d46b08; }
.kpi .t { color: var(--ant-text-2); font-size: 13px; }
.kpi .n { font-size: 24px; font-weight: 700; }
.kpi .d { font-size: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--ant-split); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .s { font-size: 12px; color: var(--ant-text-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--ant-success); } .dot.warn { background: #faad14; }

/* ── 알림(메시지) ── */
.toast-area { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ant-message {
  background: #fff; padding: 9px 12px; border-radius: var(--ant-radius-lg); box-shadow: 0 6px 16px rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12);
  display: flex; align-items: center; gap: 8px; animation: msg-in .2s ease;
}
.ant-message .ok { color: var(--ant-success); } .ant-message .err { color: var(--ant-danger); } .ant-message .info { color: var(--ant-primary); }
@keyframes msg-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── 창(모달): 휴대폰에서는 전체 화면 ── */
.modal-content { border-radius: var(--ant-radius-lg); border: 0; }
.modal-header { border-bottom: 0; padding: 20px 24px 8px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-body { padding: 8px 24px; }
.modal-footer { border-top: 0; padding: 12px 24px 20px; }
@media (max-width: 575.98px) {
  .modal-dialog { margin: 0; max-width: none; min-height: 100%; }
  .modal-content { min-height: 100vh; border-radius: 0; }
}

.empty { text-align: center; color: var(--ant-text-3); padding: 48px 0; }
.empty .anticon { font-size: 40px; display: block; margin: 0 auto 8px; color: #d9d9d9; }

/* ── 확인 창: Ant Design Modal.confirm 모양 (Admin.confirm) ── */
.ant-confirm-wrap { position: fixed; inset: 0; z-index: 2000; display: flex; justify-content: center; align-items: flex-start; padding: 100px 16px 16px; }
.ant-confirm-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.ant-confirm { position: relative; width: 416px; max-width: 100%; background: #fff; border-radius: var(--ant-radius-lg); padding: 20px 24px; box-shadow: 0 6px 16px rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05); }
.ant-confirm-body { display: flex; gap: 12px; }
.ant-confirm-icon { color: #faad14; font-size: 22px; line-height: 1; flex: none; }
.ant-confirm-title { font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.ant-confirm-content p { margin: 0 0 6px; }
.ant-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ── 부드럽게 열고 닫기 (2026-10-28 사용자 요청) ──
   창(모달): 살짝 아래에서 커지며 나타남 / 서랍(offcanvas): 감속하며 미끄러짐 / 확인 창: 커지며 나타나고 닫을 때 사라짐
   펼침(메뉴·표 줄·할인 정책)은 admin.js 의 Admin.slide·slideClass */
.modal.fade { transition: opacity .22s ease; }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.97); transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.fade { transition: opacity .15s ease; } /* Bootstrap 은 배경이 다 어두워진 뒤 창을 띄우므로 짧게 */
@media (max-width: 575.98px) { .modal.fade .modal-dialog { transform: translateY(32px); } }
.offcanvas, .offcanvas-lg, .offcanvas-end { --bs-offcanvas-transition: transform .34s cubic-bezier(.22, 1, .36, 1); }
/* Bootstrap 은 윈도 "애니메이션 효과" 끔(prefers-reduced-motion)이면 창·서랍 움직임을 없앤다. 사용자 요청으로 그때도 움직이게 한다 */
@media (prefers-reduced-motion: reduce) {
  .offcanvas, .offcanvas-end, .offcanvas-lg { transition: var(--bs-offcanvas-transition); }
  .modal.fade { transition: opacity .22s ease; }
  .modal-backdrop.fade { transition: opacity .15s ease; }
  .modal.fade .modal-dialog { transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
}
.ant-confirm-mask { animation: fade-in .2s ease; }
.ant-confirm { animation: pop-in .26s cubic-bezier(.22, 1, .36, 1); }
.ant-confirm-wrap.closing .ant-confirm-mask { animation: fade-out .16s ease forwards; }
.ant-confirm-wrap.closing .ant-confirm { animation: pop-out .16s ease forwards; }
.slide-cell { overflow: hidden; } /* 표 줄 펼칠 때 칸 내용을 감싼 상자 */
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.97); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } }

.btn-danger-solid { background: var(--ant-danger); border: 1px solid var(--ant-danger); color: #fff; }
.btn-danger-solid:hover { background: #ff7875; border-color: #ff7875; color: #fff; }
.ant-message .warn { color: #faad14; }


/* ════════ 기존 관리자 화면 공통 모양 (판매 관리에서 맞춘 것, 모든 메뉴가 같이 쓴다) ════════
   pl-head: 큰 제목(Ant Title 2) + 버튼 / pl-card: Ant Card(안쪽 여백 24) / pl-filter: 현재 필터 칸
   pl-selbar: 선택 줄 / pl-ops: 표의 작업 글자 링크 / ant-switch, ant-collapse, ant-form, modal-600·700·900 */
/* 머리: 제목(Ant Title 2) + 버튼 */
.pl-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pl-title { font-size: 30px; font-weight: 600; line-height: 1.35; margin: 0; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-actions .js-refresh { min-width: 110px; }
.pl-actions .js-refresh.loading { background: #52c41a; border-color: #52c41a; }
@media (max-width: 767.98px) {
  .pl-actions { flex-direction: column; width: 100%; }
  .pl-actions .btn { width: 100%; }
}

/* 카드 (Ant Card: 안쪽 여백 24) */
.pl-card { padding: 24px; margin-bottom: 24px; }
@media (max-width: 767.98px) { .pl-card { padding: 8px; } }
.pl-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.pl-h4 { font-size: 20px; font-weight: 600; margin: 0; }
.pl-h5 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.form-extra { color: var(--ant-text-3); font-size: 14px; margin-top: 4px; }
.btn-sm-link { font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }

/* 현재 필터 칸 */
.pl-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px 24px; margin-bottom: 24px; background: #f0f5ff; border-color: #adc6ff; }
.ant-tag-lg { font-size: 14px; padding: 4px 12px; }

/* 접는 목록 (Ant Collapse) */
.ant-collapse { border: 1px solid var(--ant-border); border-radius: var(--ant-radius-lg); background: rgba(0, 0, 0, .02); }
.ant-collapse-item { border-bottom: 1px solid var(--ant-border); }
.ant-collapse-item:last-child { border-bottom: 0; }
.ant-collapse-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; }
.ant-collapse-arrow { font-size: 12px; transition: transform .2s; display: inline-flex; }
.ant-collapse-item.open .ant-collapse-arrow { transform: rotate(90deg); }
.ant-collapse-content { display: none; background: #fff; border-top: 1px solid var(--ant-border); padding: 16px; }
.ant-collapse-item.open .ant-collapse-content { display: block; }
.ant-collapse-item:last-child .ant-collapse-content { border-radius: 0 0 var(--ant-radius-lg) var(--ant-radius-lg); }
.table-small > thead > tr > th, .table-small > tbody > tr > td { padding: 8px; }

/* 선택 줄 (줄을 체크했을 때만) */
.pl-selbar { display: none; margin-bottom: 12px; padding: 12px 16px; background: #f0f5ff; border-radius: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.pl-selbar.show { display: flex; }
.pl-selbar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 767.98px) {
  .pl-selbar { padding: 10px 12px; align-items: flex-start; }
  .pl-selbar-btns { flex-direction: column; width: 100%; }
}

/* 작업: 글자 링크 (768px 미만은 위아래) */
.pl-ops { display: inline-flex; gap: 4px; }
.pl-ops .btn-link-ant { padding: 0 7px; font-size: 14px; }
@media (max-width: 767.98px) { .pl-ops { flex-direction: column; } }

/* Ant Switch (전시 ON/OFF, 활성/비활성) */
.ant-switch { position: relative; display: inline-flex; align-items: center; min-width: 44px; height: 22px; border: 0; border-radius: 100px; background: rgba(0, 0, 0, .25); padding: 0 8px 0 24px; color: #fff; font-size: 12px; cursor: pointer; transition: background .2s; vertical-align: middle; }
.ant-switch.on { background: var(--ant-primary); padding: 0 24px 0 8px; }
.ant-switch:disabled { opacity: .4; cursor: not-allowed; }
.ant-switch-handle { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 35, 11, .2); transition: left .2s; }
.ant-switch.on .ant-switch-handle { left: calc(100% - 20px); }
.ant-switch-inner { line-height: 22px; white-space: nowrap; }
.ant-switch-check { display: inline-block; cursor: pointer; }
.ant-switch-check input { position: absolute; opacity: 0; pointer-events: none; }

/* 창 크기 (기존: 600 / 700 / 900) */
.modal-600 { max-width: 600px; }
.modal-700 { max-width: 700px; }
.modal-900 { max-width: 900px; }
@media (min-width: 576px) { .modal-600, .modal-700, .modal-900 { margin-top: 100px; } }
.th-main, .th-sub { display: block; }
.th-sub { font-size: 11px; font-weight: 400; color: #999; }
.pl-empty { text-align: center; color: var(--ant-text-3); padding: 32px 8px !important; }
.table-ant .num { text-align: right; }
.table-ant .center { text-align: center; }

/* Ant Form: 필수 칸 이름 앞 빨간 *, 이름 글자색, 고르지 않은 선택 칸은 회색 */
.ant-form .req-label::before { content: "*"; color: var(--ant-danger); margin-right: 4px; font-family: SimSun, sans-serif; }
.ant-form .form-label { color: var(--ant-text); }
.ant-form select.is-empty { color: var(--ant-disabled); }
.ant-form select option { color: var(--ant-text); }
.dt-range { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ant-border); border-radius: var(--ant-radius); padding: 4px 11px; background: #fff; }
.dt-range input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 14px; background: none; }
.dt-range .anticon { color: var(--ant-disabled); }
