/* Dopaking Admin Dashboard - Clean Light Theme */

:root {
  --sidebar-width: 260px;

  /* Light theme colors */
  --bg-body: #f8f9fa;
  --bg-white: #ffffff;
  --bg-light: #f1f3f5;
  --bg-hover: #e9ecef;

  /* Border colors */
  --border-light: #e9ecef;
  --border-color: #dee2e6;

  /* Text colors */
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --text-light: #adb5bd;

  /* Accent colors */
  --accent-primary: #4263eb;
  --accent-primary-light: #edf2ff;
  --accent-success: #20c997;
  --accent-success-light: #e6fcf5;
  --accent-warning: #fab005;
  --accent-warning-light: #fff9db;
  --accent-danger: #f03e3e;
  --accent-danger-light: #fff5f5;
  --accent-info: #339af0;
  --accent-info-light: #e7f5ff;

  /* Sidebar */
  --sidebar-bg: #ffffff;
  --sidebar-text: #495057;
  --sidebar-active: #4263eb;
}

* {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* Wrapper */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.3s ease;
  border-right: 1px solid var(--border-light);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

.sidebar-header img {
  max-height: 36px;
}

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
  margin: 0;
}

.sidebar-nav .nav-section {
  padding: 16px 20px 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sidebar-nav .nav-item {
  margin: 2px 10px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-nav .nav-link:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.sidebar-nav .nav-link.active {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
}

.sidebar-nav .nav-link i {
  font-size: 18px;
  width: 24px;
  margin-right: 10px;
  opacity: 0.8;
}

.sidebar-nav .nav-link.active i {
  opacity: 1;
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
}

.content-wrapper {
  flex: 1;
  padding: 24px;
  max-width: 1600px;
}

/* Navbar */
.navbar {
  height: 60px;
  background: var(--bg-white) !important;
  border-bottom: 1px solid var(--border-light) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.navbar .btn-link {
  color: var(--text-secondary) !important;
}

.navbar .dropdown-menu {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.navbar .dropdown-item {
  color: var(--text-secondary);
  padding: 8px 16px;
}

.navbar .dropdown-item:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

/* Page header */
.page-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

/* Input group */
.input-group-text {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Stat cards */
.stat-card {
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-card.primary { border-left: 4px solid var(--accent-primary); }
.stat-card.success { border-left: 4px solid var(--accent-success); }
.stat-card.warning { border-left: 4px solid var(--accent-warning); }
.stat-card.info { border-left: 4px solid var(--accent-info); }

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card.primary .stat-icon {
  background: var(--accent-primary-light);
  color: var(--accent-primary);
}
.stat-card.success .stat-icon {
  background: var(--accent-success-light);
  color: var(--accent-success);
}
.stat-card.warning .stat-icon {
  background: var(--accent-warning-light);
  color: var(--accent-warning);
}
.stat-card.info .stat-icon {
  background: var(--accent-info-light);
  color: var(--accent-info);
}

.stat-card .stat-icon i {
  font-size: 22px;
}

.stat-card .stat-info h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.stat-card .stat-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* Cards */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: 12px 12px 0 0 !important;
}

.card-body {
  padding: 20px;
}

.card-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  padding: 16px 20px;
  border-radius: 0 0 12px 12px !important;
}

/* Tables */
.table {
  margin: 0;
  color: var(--text-primary);
}

.table th {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-light) !important;
  border-top: none !important;
  padding: 12px 16px;
  background: var(--bg-light);
}

.table td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light) !important;
  color: var(--text-secondary);
}

.table tbody tr:last-child td {
  border-bottom: none !important;
}

.table-hover tbody tr:hover {
  background-color: var(--bg-light);
}

.table-hover tbody tr:hover td {
  color: var(--text-primary);
}

.bg-light {
  background: var(--bg-light) !important;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.15s ease;
}
/* btn-sm/btn-lg는 Bootstrap 크기 유지. :where로 우선순위를 .btn과 같게 둔다 */
.btn:where(:not(.btn-sm):not(.btn-lg)) { padding: 8px 16px; }
/* outline 외 변형만 테두리 투명 (변수만 바꿔서 .btn-light 등 개별 border는 유지) */
.btn:not([class*="btn-outline"]) {
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-border-color: transparent;
}

.btn-sm {
  padding: 5px 12px; /* 테두리 1px 보정 → form-select-sm과 같은 높이(≈31px) */
  font-size: 13px;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #364fc7;
  color: #fff;
}

.btn-success {
  background: var(--accent-success);
  color: #fff;
}

.btn-success:hover {
  background: #12b886;
  color: #fff;
}

.btn-warning {
  background: var(--accent-warning);
  color: #212529;
}

.btn-warning:hover {
  background: #f59f00;
  color: #212529;
}

.btn-danger {
  background: var(--accent-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #e03131;
  color: #fff;
}

.btn-info {
  background: var(--accent-info);
  color: #fff;
}

.btn-info:hover {
  background: #228be6;
  color: #fff;
}

.btn-outline-primary {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--accent-primary);
  color: #fff;
}

.btn-outline-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--bg-light);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-light {
  background: var(--bg-light);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-light:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-group .btn {
  border: 1px solid var(--border-color);
}

.btn-group .btn.active,
.btn-group .btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* Forms */
.form-control,
.form-select {
  background-color: var(--bg-white); /* background 단축 속성은 Bootstrap select 화살표(background-image)까지 지움 */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* -sm/-lg는 Bootstrap 크기 유지, select는 화살표 자리(2.25rem) 확보 */
.form-control:where(:not(.form-control-sm):not(.form-control-lg)),
.form-select:where(:not(.form-select-sm):not(.form-select-lg)) { padding: 10px 14px; }
.form-select:where(:not(.form-select-sm):not(.form-select-lg)) { padding-right: 2.25rem; }

.form-control::placeholder {
  color: var(--text-light);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-white);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.15);
  color: var(--text-primary);
}

.form-select option {
  background: var(--bg-white);
  color: var(--text-primary);
}

.form-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 13px;
}

.form-check-input {
  background-color: var(--bg-white);
  border-color: var(--border-color);
}

.form-check-input:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.form-check-label {
  color: var(--text-secondary);
}

.form-text {
  color: var(--text-muted);
  font-size: 12px;
}

/* Badges */
.badge {
  padding: 5px 10px;
  font-weight: 500;
  border-radius: 6px;
  font-size: 12px;
}

.badge.bg-primary { background: var(--accent-primary) !important; color: #fff; }
.badge.bg-success { background: #087f5b !important; color: #fff; }
.badge.bg-warning { background: var(--accent-warning) !important; color: #212529; }
.badge.bg-danger { background: var(--accent-danger) !important; color: #fff; }
.badge.bg-info { background: #1971c2 !important; color: #fff; }
.badge.bg-secondary { background: #6c757d !important; color: #fff; }
.badge.bg-light { background: var(--bg-light) !important; color: var(--text-secondary); }

/* Alerts */
.alert {
  border-radius: 8px;
  border: none;
  padding: 14px 18px;
}

.alert-danger {
  background: var(--accent-danger-light);
  color: #c92a2a;
}

.alert-success {
  background: var(--accent-success-light);
  color: #087f5b;
}

.alert-warning {
  background: var(--accent-warning-light);
  color: #e67700;
}

.alert-info {
  background: var(--accent-info-light);
  color: #1971c2;
}

/* Modal */
.modal-content {
  background: var(--bg-white);
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 16px 20px;
}

.modal-header .modal-title {
  font-weight: 600;
}

.modal-header .btn-close {
  opacity: 0.5;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-body {
  color: var(--text-secondary);
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding: 16px 20px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay .spinner-border {
  width: 48px;
  height: 48px;
  color: var(--accent-primary);
}

.loading-overlay p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Copy button */
.copy-btn {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  color: var(--text-muted);
}

.copy-btn:hover {
  background: var(--bg-light);
  color: var(--accent-primary);
}

.copy-btn.copied {
  color: var(--accent-success);
}

/* Detail card */
.detail-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.detail-card h6 {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.detail-card .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-card .detail-row:last-child {
  border-bottom: none;
}

.detail-card .detail-label {
  color: var(--text-muted);
  font-size: 13px;
}

.detail-card .detail-value {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

/* Stat mini card (for user detail) */
.stat-mini-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.stat-mini-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-mini-card .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Responsive */
/* 본문 칸은 내용(긴 표·줄바꿈 없는 글)에 맞춰 늘어나지 않게 — 안 그러면 휴대폰에서 화면 전체가 옆으로 밀린다 */
.main-content { min-width: 0; }

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.18);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

/* 휴대폰 */
@media (max-width: 767.98px) {
  .content-wrapper { padding: 12px; }
  .navbar { height: 52px; padding-left: 8px !important; padding-right: 8px !important; }
  .navbar .dropdown-toggle { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-header { margin-bottom: 14px; }
  .page-header h4 { font-size: 18px; white-space: nowrap; }
  .page-header > :not(h4):not(div) { flex: 1 1 100%; }
  /* 제목 옆 버튼 글자가 세로로 쪼개지지 않게 */
  .page-header .btn, .content-wrapper > .d-flex > .btn, .content-wrapper > .d-flex > div > .btn { white-space: nowrap; }
  .card-header { flex-wrap: wrap; gap: 6px; }
  .card-body { padding: 12px; }

  /* 표는 화면 안에서 옆으로 밀어 보게 (바깥 페이지는 안 밀림) */
  .table-responsive, .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { font-size: 12.5px; }
  .table td, .table th { white-space: nowrap; padding: 8px 10px !important; vertical-align: middle; }

  /* 입력칸·버튼 줄 정리 */
  .form-control, .form-select { font-size: 16px; }   /* iOS 확대 방지 */
  .btn-group { flex-wrap: wrap; }
  .modal-dialog { margin: 8px; }

  /* 통계 카드 — 두 칸, 작게 */
  .stat-card { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-card .stat-icon { width: 34px; height: 34px; border-radius: 8px; }
  .stat-card .stat-icon i { font-size: 17px; }
  .stat-card .stat-info { min-width: 0; width: 100%; }
  .stat-card .stat-info h3 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat-card .stat-info p { font-size: 12px; }
  .stat-breakdown { font-size: 11px; white-space: normal !important; }

  /* 페이지 제목 옆 버튼·탭 묶음은 아래 줄로 내려 화면 폭을 다 쓴다 */
  .page-header > div:not(:first-child) { max-width: 100%; flex-wrap: wrap; }
  /* 배송 상태 탭 — 글자가 세로로 쪼개지지 않게, 넘치면 옆으로 밀기 */
  .ship-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .ship-tab { flex: none; white-space: nowrap; }

  /* 가챠별 HIT 목록 — 제목 한 줄, 등급 배지는 아래 줄 */
  .list-group-item.d-flex.justify-content-between { flex-wrap: wrap; gap: 6px; }
  .list-group-item.d-flex.justify-content-between > span:first-child { flex: 1 1 100%; }
  /* 입력 묶음(셀렉트+입력칸 여러 개)은 줄바꿈 */
  .input-group:has(> select + input + input) { flex-wrap: wrap; }
  .input-group:has(> select + input + input) > * { max-width: none !important; }
  .input-group:has(> select + input + input) > input:last-child { flex: 1 1 100%; border-radius: 6px !important; margin-top: 6px; }
  /* 요약 숫자 카드 글씨 */
  .card.text-white h4, .card.text-dark h4 { font-size: 20px; }
  .card.text-white h6, .card.text-dark h6 { font-size: 12px; }

  /* 가챠 목록 — 표 대신 카드: [이미지][제목·설명] / 가격·판매·상태·기간 / 버튼 */
  #gachaTable thead, #itemTable thead { display: none; }
  #gachaTable, #gachaTable tbody, #itemTable, #itemTable tbody { display: block; }
  #itemTable tr.item-row {
    display: grid; grid-template-columns: 60px 1fr auto; column-gap: 10px; row-gap: 6px;
    grid-template-areas: "img info info" "img price status" "sales sales period" "sales sales actions";
    padding: 12px; border-bottom: 1px solid var(--border-light);
  }
  #itemTable tr.item-row td { display: block; padding: 0; border: 0; white-space: normal; }
  #itemTable .gl-img { grid-area: img; } #itemTable .gl-img img, #itemTable .gl-img > div { width: 60px !important; height: 60px !important; }
  #itemTable .gl-info { grid-area: info; min-width: 0; } #itemTable .gl-info a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #itemTable .gl-price { grid-area: price; } #itemTable .gl-status { grid-area: status; text-align: right; }
  #itemTable .gl-sales { grid-area: sales; font-size: 12px; } #itemTable .gl-period { grid-area: period; text-align: right; }
  #itemTable .gl-period small { display: inline !important; } #itemTable .gl-actions { grid-area: actions; text-align: right; }
  #gachaTable tr.gacha-row {
    display: grid; grid-template-columns: 60px 1fr auto; column-gap: 10px; row-gap: 6px;
    grid-template-areas: "img info info" "img price status" "sales sales period" "cat cat actions";
    padding: 12px; border-bottom: 1px solid var(--border-light);
  }
  #gachaTable tr.gacha-row td, #itemTable tr.item-row td { display: block; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; white-space: normal; }
  #gachaTable .gl-img { grid-area: img; }
  #gachaTable .gl-img img, #gachaTable .gl-img > div { width: 60px !important; height: 60px !important; }
  #gachaTable .gl-info { grid-area: info; min-width: 0; }
  #gachaTable .gl-info a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #gachaTable .gl-info .d-flex { min-width: 0; flex-wrap: wrap; }
  #gachaTable .gl-price { grid-area: price; font-size: 14px; }
  #gachaTable .gl-status { grid-area: status; text-align: right; }
  #gachaTable .gl-sales { grid-area: sales; }
  #gachaTable .gl-sales .d-flex { flex-direction: row !important; align-items: center; gap: 8px; }
  #gachaTable .gl-sales .progress { width: 56px !important; flex: none; }
  #gachaTable .gl-sales small, #gachaTable .gl-period small { font-size: 11px; }
  #gachaTable .gl-sales small { white-space: nowrap; }
  #gachaTable .gl-period { grid-area: period; text-align: right; }
  #gachaTable .gl-period small { display: inline !important; }
  #gachaTable .gl-cat { grid-area: cat; font-size: 12px; align-self: center; }
  #gachaTable .gl-actions { grid-area: actions; text-align: right; }

  /* 접속자·신규·탈퇴 — 세 칸, 아이콘 숨김 */
  .stat-card-mini { padding: 10px !important; }
  .stat-card-mini .stat-mini-icon-wrapper { display: none !important; }
  .stat-card-mini .stat-mini-value { font-size: 20px !important; }
  .stat-card-mini .stat-mini-label { font-size: 11px !important; line-height: 1.3; }
}

/* Chart container */
.chart-container {
  position: relative;
  height: 300px;
}

/* Text colors */
.text-primary-custom { color: var(--accent-primary) !important; }
/* 글자색은 진한 톤(--tx-*), 연한 accent는 배경·아이콘에만 */
.text-success { color: var(--tx-success) !important; }
.text-warning { color: var(--tx-warning) !important; }
.text-danger { color: var(--tx-danger) !important; }
.text-info { color: var(--tx-info) !important; }
.text-muted { color: var(--tx-muted) !important; }

/* Link colors */
a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  color: #364fc7;
  text-decoration: underline;
}

/* HR */
hr {
  border-color: var(--border-light);
  opacity: 1;
}

/* Tab navigation */
.nav-tabs {
  border-bottom: 1px solid var(--border-light);
}

.nav-tabs .nav-link {
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-tabs .nav-link:hover {
  color: var(--text-primary);
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--accent-primary);
  background: transparent;
  border-bottom-color: var(--accent-primary);
}

/* Nav pills (filter buttons) */
.nav-pills .nav-link {
  color: var(--text-secondary);
  background: var(--bg-light);
  border-radius: 8px;
  padding: 8px 16px;
  margin-right: 8px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-pills .nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-pills .nav-link.active {
  background: var(--accent-primary);
  color: #fff;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* User avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 14px;
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.success { background: var(--accent-success); }
.status-dot.warning { background: var(--accent-warning); }
.status-dot.danger { background: var(--accent-danger); }
.status-dot.info { background: var(--accent-info); }

/* Pagination */
.pagination {
  margin: 0;
}

.pagination .page-link {
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  margin: 0 2px;
  border-radius: 6px;
}

.pagination .page-link:hover {
  background: var(--bg-light);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.toast {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  border-radius: 8px 8px 0 0;
}

.toast-body {
  color: var(--text-secondary);
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 16px;
}

.breadcrumb-item {
  font-size: 13px;
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item a:hover {
  color: var(--accent-primary);
}

.breadcrumb-item.active {
  color: var(--text-secondary);
}

/* List group */
.list-group-item {
  border-color: var(--border-light);
  color: var(--text-secondary);
  padding: 12px 16px;
}

.list-group-item:hover {
  background: var(--bg-light);
}

.list-group-item.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Progress bar */
.progress {
  height: 8px;
  background: var(--bg-light);
  border-radius: 4px;
}

.progress-bar {
  background: var(--accent-primary);
  border-radius: 4px;
}

/* Dropdown */
.dropdown-menu {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 8px;
}

.dropdown-item {
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.dropdown-item:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--accent-primary);
  color: #fff;
}

.dropdown-divider {
  border-color: var(--border-light);
  margin: 8px 0;
}

/* Tooltip */
.tooltip-inner {
  background: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
}

/* Action buttons in table */
.table .btn-action {
  padding: 4px 8px;
  font-size: 12px;
  margin: 0 2px;
}

/* Card with gradient header */
.card-gradient-header {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #5c7cfa 100%);
  color: #fff;
  border-radius: 12px 12px 0 0 !important;
}

.card-gradient-header .card-title {
  color: #fff;
  margin: 0;
}

/* Login page specific */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-card {
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-card .logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .logo img {
  max-height: 48px;
}

.login-card h4 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 700;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Utility classes */
.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.rounded-lg {
  border-radius: 12px !important;
}

.border-0 {
  border: none !important;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #5c7cfa 100%) !important;
}

.bg-gradient-success {
  background: linear-gradient(135deg, var(--accent-success) 0%, #38d9a9 100%) !important;
}

/* Stat card mini (for dashboard user stats) */
.stat-card-mini {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.stat-card-mini:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-card-mini .stat-mini-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card-mini .stat-mini-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card-mini .stat-mini-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Online users - green/teal */
.stat-card-mini.online {
  border-left: 4px solid #20c997;
}

.stat-card-mini .stat-mini-icon-wrapper.online {
  background: linear-gradient(135deg, #e6fcf5 0%, #c3fae8 100%);
  color: #0ca678;
}

.stat-card-mini.online .stat-mini-value {
  color: #0ca678;
}

/* New users - blue */
.stat-card-mini.new-user {
  border-left: 4px solid #4263eb;
}

.stat-card-mini .stat-mini-icon-wrapper.new-user {
  background: linear-gradient(135deg, #edf2ff 0%, #dbe4ff 100%);
  color: #3b5bdb;
}

.stat-card-mini.new-user .stat-mini-value {
  color: #3b5bdb;
}

/* Withdrawn users - red/orange */
.stat-card-mini.withdrawn {
  border-left: 4px solid #f03e3e;
}

.stat-card-mini .stat-mini-icon-wrapper.withdrawn {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
  color: #e03131;
}

.stat-card-mini.withdrawn .stat-mini-value {
  color: #e03131;
}

/* Pulse animation for online indicator */
@keyframes pulse-online {
  0% {
    box-shadow: 0 0 0 0 rgba(32, 201, 151, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(32, 201, 151, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(32, 201, 151, 0);
  }
}

.stat-card-mini.online .stat-mini-icon-wrapper.online {
  animation: pulse-online 2s infinite;
}


/* ── 결제 화폐 구분: 현금(원) · 코인 · 다이아 ───────────────────────── */
.pay-cash-txt { color: #0ca678 !important; font-weight: 600; }
.pay-coin-txt { color: #e8590c !important; font-weight: 600; }
.pay-dia-txt  { color: #7048e8 !important; font-weight: 600; }
.pay-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pay-chip.pay-cash { background: #e6fcf5; color: #0ca678; }
.pay-chip.pay-coin { background: #fff4e6; color: #e8590c; }
.pay-chip.pay-dia  { background: #f3f0ff; color: #7048e8; }
.pay-method { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pay-method-cash   { background: #e7f5ff; color: #1971c2; }
.pay-method-coin   { background: #fff4e6; color: #e8590c; }
.pay-method-dia    { background: #f3f0ff; color: #7048e8; }
.pay-method-ticket { background: #f1f3f5; color: #495057; }
.pay-method-charge { background: #ebfbee; color: #2b8a3e; }

/* 표 머리글은 줄바꿈하지 않는다 (좁은 화면에서 '현/금' 처럼 쪼개지던 문제) */
.table thead th { white-space: nowrap; }

/* ===== 공통 규칙 (fmt.js와 짝) ===== */
:root {
  --won:#087f5b; --won-bg:#e6fcf5; --coin:#b35c00; --coin-bg:#fff4e6; --dia:#6741d9; --dia-bg:#f3f0ff;
  --tx-success:#087f5b; --tx-warning:#b35c00; --tx-info:#1971c2; --tx-danger:#c92a2a; --tx-muted:#6c757d;
}
/* 금액: 단위별 고정 색 */
.amt{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.amt-won{color:var(--won)} .amt-coin{color:var(--coin)} .amt-diamond{color:var(--dia)}
.amt-ticket,.amt-coupon{color:var(--text-secondary)} .amt-zero{color:var(--tx-muted)}
/* 숫자 열 */
.num{text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}
/* 결제 구분 */
.kind{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.kind-gacha{background:#edf2ff;color:#364fc7} .kind-coin_charge{background:var(--coin-bg);color:var(--coin)}
.kind-diamond_charge{background:var(--dia-bg);color:var(--dia)} .kind-shop{background:var(--won-bg);color:var(--won)}
.kind-delivery{background:#f1f3f5;color:#495057}
/* 상태 (F.statusBadge) */
.st{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.st-ok{background:#d3f9d8;color:#2b8a3e} .st-wait{background:#fff3bf;color:#8f5f00}
.st-bad{background:#ffe3e3;color:#c92a2a} .st-off{background:#e9ecef;color:#495057}
/* 가챠 라인 (F.lineBadge) — 전 페이지 동일 */
.line-badge{display:inline-block;min-width:30px;padding:2px 6px;border-radius:4px;font-size:12px;font-weight:700;text-align:center;color:#fff;line-height:1.4}
.line-S{background:#e8590c} .line-A{background:#c2255c} .line-B{background:#1971c2} .line-C{background:#2b8a3e}
.line-D{background:#5f3dc4} .line-E{background:#495057} .line-LAST{background:#212529}
.line-MID{background:#fff;color:#e8590c;border:1px dashed #e8590c} .line-X{background:#adb5bd}
/* 순위 (금·은·동, 빨강 금지) */
.rank{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;font-size:12px;font-weight:700;background:#e9ecef;color:#495057}
.rank-1{background:#f5d76e;color:#5c4400} .rank-2{background:#d6dbe0;color:#343a40} .rank-3{background:#e3b58a;color:#5a3412}
/* KPI 타일 */
.kpi{background:var(--bg-white);border:1px solid var(--border-light);border-radius:12px;padding:14px 16px;height:100%}
.kpi-label{font-size:13px;color:var(--text-secondary)}
.kpi-value{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.3;margin-top:2px}
.kpi-sub{font-size:12px;color:var(--tx-muted);margin-top:2px} .kpi-sub .amt{font-weight:500}
/* 용어 줄 / 상한 경고 */
.glossary{font-size:12px;color:var(--text-secondary);background:var(--bg-light);border-radius:8px;padding:6px 10px;margin-bottom:12px}
.limit-note{font-size:12px;color:var(--tx-warning)}
/* 통계 허브 iframe */
.embed-mode .content-wrapper{padding:0 4px;max-width:none}
.embed-mode .page-title{display:none}
.table-sm th,.table-sm td{padding:6px 10px}

/* ═══════════════════════════════════════════════════════════════════
   디자인 시스템 (ds-) — 실물 재고 관리·체크, 관리자 관리 등 새 화면 공용
   규칙: 무채색 바탕 + 강조색 하나(인디고) + 의미색(입고 초록 / 출고·오류 빨강 / 경고 주황)
   숫자는 tabular-nums 로 자리 맞춤, 테두리 1px, 그림자 거의 없음
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --ds-line: #e8eaef; --ds-line-2: #f1f3f6;
  --ds-text: #111827; --ds-text-2: #4b5563; --ds-text-3: #8b93a1;
  --ds-accent: #4f46e5; --ds-accent-soft: #eef2ff;
  --ds-pos: #059669; --ds-pos-soft: #e8f7f0; --ds-neg: #dc2626; --ds-neg-soft: #fdeeee;
  --ds-warn: #c2410c; --ds-warn-soft: #fff4e6;
  --ds-r: 12px; --ds-r-sm: 8px;
}
.ds { color: var(--ds-text); font-variant-numeric: tabular-nums; }
.ds-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ds-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--ds-text); }
.ds-sub { font-size: 13px; color: var(--ds-text-3); margin-top: 2px; }
.ds-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 버튼 */
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--ds-r-sm); border: 1px solid var(--ds-line); background: #fff; color: var(--ds-text); font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; line-height: 1; transition: background .12s, border-color .12s; }
.ds-btn:hover { background: #f8f9fb; border-color: #dcdfe5; color: var(--ds-text); }
.ds-btn:disabled { opacity: .5; cursor: not-allowed; }
.ds-btn-primary { background: var(--ds-text); border-color: var(--ds-text); color: #fff; }
.ds-btn-primary:hover { background: #1f2937; border-color: #1f2937; color: #fff; }
.ds-btn-accent { background: var(--ds-accent); border-color: var(--ds-accent); color: #fff; }
.ds-btn-accent:hover { background: #4338ca; border-color: #4338ca; color: #fff; }
.ds-btn-in { background: var(--ds-pos-soft); border-color: transparent; color: var(--ds-pos); }
.ds-btn-in:hover { background: #d5f1e4; border-color: transparent; color: var(--ds-pos); }
.ds-btn-out { background: var(--ds-neg-soft); border-color: transparent; color: var(--ds-neg); }
.ds-btn-out:hover { background: #fadada; border-color: transparent; color: var(--ds-neg); }
.ds-btn-danger { color: var(--ds-neg); }
.ds-btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.ds-btn-icon { width: 36px; padding: 0; }
.ds-btn-sm.ds-btn-icon { width: 30px; }
.ds-btn .count { background: var(--ds-neg); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; line-height: 18px; }

/* KPI 카드 */
.ds-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ds-kpi { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r); padding: 14px 16px; min-width: 0; }
.ds-kpi-label { font-size: 12.5px; color: var(--ds-text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ds-kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ds-text); }
.ds-kpi-value small { font-size: 14px; font-weight: 600; color: var(--ds-text-2); margin-left: 2px; }
.ds-kpi-sub { font-size: 12px; color: var(--ds-text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-kpi a { color: inherit; }
.ds-up { color: var(--ds-pos) !important; }
.ds-down { color: var(--ds-neg) !important; }

/* 확인 필요 알약 (필터 토글) */
.ds-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.ds-pills-label { font-size: 12px; color: var(--ds-text-3); font-weight: 600; margin-right: 2px; white-space: nowrap; }
.ds-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--ds-line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ds-text-2); cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.ds-pill b { color: var(--ds-text); font-weight: 700; }
.ds-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ds-text-3); }
.ds-pill.neg .dot { background: var(--ds-neg); }
.ds-pill.warn .dot { background: #f59e0b; }
.ds-pill.accent .dot { background: var(--ds-accent); }
.ds-pill.pos .dot { background: var(--ds-pos); }
.ds-pill:hover { border-color: #d5d9e0; }
.ds-pill.active { background: var(--ds-text); border-color: var(--ds-text); color: #fff; }
.ds-pill.active b { color: #fff; }

/* 패널 */
.ds-panel { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r); }
.ds-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--ds-line-2); }
.ds-panel-title { font-size: 15px; font-weight: 700; margin: 0; color: var(--ds-text); }
.ds-panel-title .muted { color: var(--ds-text-3); font-weight: 500; margin-left: 4px; }

/* 툴바: 세그먼트 · 검색 · 칩 */
.ds-toolbar { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ds-line-2); }
.ds-toolbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.ds-seg { display: inline-flex; background: #f1f3f6; border-radius: 9px; padding: 3px; gap: 2px; flex: 0 0 auto; }
.ds-seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ds-text-2); white-space: nowrap; }
.ds-seg button.active { background: #fff; color: var(--ds-text); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.ds-search { position: relative; flex: 1 1 240px; min-width: 0; }
.ds-search input { width: 100%; height: 36px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-sm); padding: 0 34px; font-size: 14px; background: #fff; color: var(--ds-text); }
.ds-search input:focus { outline: none; border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); }
.ds-search > .bi-search { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ds-text-3); pointer-events: none; }
.ds-search .ds-clear { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ds-text-3); width: 28px; height: 28px; border-radius: 6px; }
.ds-search .ds-clear:hover { background: #f1f3f6; }
.ds-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.ds-chips::-webkit-scrollbar { display: none; }
.ds-chip { flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ds-line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ds-text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ds-chip:hover { border-color: #d5d9e0; }
.ds-chip.active { background: var(--ds-accent-soft); border-color: #c7d2fe; color: var(--ds-accent); }
.ds-chip .n { color: var(--ds-text-3); font-weight: 500; }

/* 표 */
.ds-table-wrap { overflow-x: auto; }
.ds-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; color: var(--ds-text); }
.ds-table th { background: #fafbfc; color: var(--ds-text-3); font-size: 12px; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ds-line); white-space: nowrap; }
.ds-table th.sortable { cursor: pointer; user-select: none; }
.ds-table th.sorted { color: var(--ds-text); }
.ds-table td { padding: 12px; border-bottom: 1px solid var(--ds-line-2); vertical-align: middle; }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table tbody tr:hover td { background: #fafbff; }
.ds-table .num { text-align: right; white-space: nowrap; }
.ds-table .muted { color: var(--ds-text-3); font-size: 12.5px; }
.ds-table .strong { font-weight: 700; }

/* 상품/사람 셀: 썸네일 + 이름 + 메타 */
.ds-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ds-thumb { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: var(--ds-text-3); overflow: hidden; font-size: 16px; }
.ds-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ds-item-body { min-width: 0; }
.ds-item-name { font-weight: 600; color: var(--ds-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.ds-item-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--ds-text-3); }
.ds-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--ds-text-3); }

/* 배지 */
.ds-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: #f1f3f6; color: var(--ds-text-2); }
.ds-badge.jp { background: #fdecec; color: #c0262d; }
.ds-badge.kr { background: #e8f0fe; color: #1d4ed8; }
.ds-badge.cn { background: #fff3e0; color: #b45309; }
.ds-badge.en { background: #e8f6ee; color: #047857; }
.ds-badge.grade { background: #111827; color: #fff; }
.ds-badge.neg { background: var(--ds-neg-soft); color: var(--ds-neg); }
.ds-badge.warn { background: var(--ds-warn-soft); color: var(--ds-warn); }
.ds-badge.pos { background: var(--ds-pos-soft); color: var(--ds-pos); }
.ds-badge.accent { background: var(--ds-accent-soft); color: var(--ds-accent); }

.ds-empty { text-align: center; color: var(--ds-text-3); padding: 48px 16px; font-size: 14px; }
.ds-pager { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 12px; flex-wrap: wrap; }
.ds-pager button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; font-size: 13px; font-weight: 600; color: var(--ds-text-2); }
.ds-pager button.active { background: var(--ds-text); color: #fff; }
.ds-pager button:hover:not(.active):not(:disabled) { background: #f1f3f6; }
.ds-pager button:disabled { opacity: .35; }

/* 휴대폰 목록 카드 */
.ds-mcard { padding: 14px 16px; border-bottom: 1px solid var(--ds-line-2); }
.ds-mcard:last-child { border-bottom: 0; }
.ds-mstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.ds-mstat { background: #f8f9fb; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.ds-mstat .l { font-size: 11.5px; color: var(--ds-text-3); }
.ds-mstat .v { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-mbtns { display: flex; gap: 8px; }
.ds-mbtns .ds-btn { flex: 1; height: 40px; }
.ds-mbtns .ds-btn-icon { flex: 0 0 40px; width: 40px; }

@media (max-width: 767.98px) {
  .ds-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ds-kpi { padding: 12px; }
  .ds-kpi-value { font-size: 20px; }
  .ds-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ds-pills::-webkit-scrollbar { display: none; }
  .ds-title { font-size: 20px; }
  .ds-actions { width: 100%; }
  .ds-actions .ds-btn { height: 38px; flex: 1 1 auto; }
  .ds-toolbar, .ds-panel-head { padding: 12px; }
  .ds-search { flex-basis: 100%; }
  .ds-search input { font-size: 16px; height: 40px; }
  .ds-item-name { max-width: none; white-space: normal; }
}
