/* ============================================================
   IEUM OMS Design System - custom.css
   ============================================================ */

/* number input spinner 제거 */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* 주문완료 행 배경 + 호버 비활성화 */
.bg-ordered { background-color: #f8f9fa !important; }
.bg-ordered:hover td { background-color: #f8f9fa !important; }

/* === 1. DESIGN TOKENS === */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css');

:root {
  /* Primary Blue Palette */
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;
  --primary-deeper: #1e40af;
  --primary-subtle: #dbeafe;
  --primary-bg: #eff6ff;
  --primary-ring: rgba(37, 99, 235, 0.08);

  /* Neutral Gray Scale */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic Colors */
  --success-bg: #ecfdf5;  --success-text: #07ab79;  --success-border: #bbf7d0;
  --warning-bg: #fff7ed;  --warning-text: #d97706;  --warning-border: #fde68a;
  --danger-bg: #fef2f2;   --danger-text: #ef4444;   --danger-border: #fecaca;
  --info-bg: #eff6ff;     --info-text: #2563eb;     --info-border: #bfdbfe;

  /* Surface */
  --sidebar-dark: #1a1c23;
  --bg-color: var(--gray-100);
  --surface: #ffffff;
  --surface-alt: var(--gray-50);
  --border-color: var(--gray-200);

  /* Text */
  --text-main: var(--gray-900);
  --text-sub: var(--gray-500);
  --text-muted: var(--gray-400);

  /* Legacy aliases */
  --primary-blue: var(--primary);
  --white: #ffffff;
  --dg-orange: #ff7e36;
  --dg-dark: #1e293b;
}

/* === 2. RESET & GLOBAL === */
* { box-sizing: border-box; }

html, body {
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  margin: 0; padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-color);
  font-family: 'Pretendard', -apple-system, sans-serif;
  color: var(--text-main);
  font-size: 14px;
  display: flex;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* === 3. TYPOGRAPHY === */
.text-2xs  { font-size: 10px !important; }
.text-xs   { font-size: 11px !important; }
.text-sm   { font-size: 12px !important; }
.text-smd  { font-size: 12.5px !important; }
.text-13   { font-size: 13px !important; }
.text-base { font-size: 14px !important; }
.text-md   { font-size: 15px !important; }
.text-lg   { font-size: 1rem !important; }
.text-xl   { font-size: 1.1rem !important; }
.text-2xl  { font-size: 1.25rem !important; }
.text-3xl  { font-size: 1.4rem !important; }
.text-4xl  { font-size: 1.6rem !important; }
.text-5xl  { font-size: 2rem !important; }
.text-icon-lg { font-size: 36px !important; }

.fw-extrabold { font-weight: 800 !important; }
.fw-black { font-weight: 900 !important; }

.tracking-tight { letter-spacing: -0.5px; }
.tracking-tighter { letter-spacing: -1px; }

/* === 4. LAYOUT === */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin-left 0.3s ease, width 0.3s ease;
}

.container-scroll {
  flex: 1;
  padding: 30px 40px;
  overflow-y: auto;
}

/* Sidebar */
.sidebar-container {
  width: 260px;
  height: 100vh;
  background: var(--sidebar-dark) !important;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 1060;
  height: -webkit-fill-available;
  height: 100dvh;
  position: fixed;
  top: 0; left: 0;
}

.sidebar-brand { padding: 30px 24px; display: flex; align-items: center; gap: 12px; }

.logo-box {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white;
}

.brand-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.5px; color: white; }
.brand-name span { color: var(--primary-light); }

.sidebar-nav { flex: 1; padding: 0 16px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 10px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }
.section-title { font-size: 11px; color: var(--gray-500); font-weight: 700; margin: 20px 0 12px 8px; }

.sidebar-nav li + li { margin-top: 3px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; color: var(--gray-400); border-radius: 10px;
  font-size: 14px; font-weight: 600; transition: 0.2s;
}

.sidebar-nav li.active a,
.sidebar-nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sidebar-nav li.active i { color: var(--primary-light); }

.sidebar-footer {
  padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; gap: 12px;
}

.user-info .u-name { font-size: 13px; font-weight: 700; margin: 0; color: white; }
.user-info .u-role { font-size: 11px; color: var(--gray-500); margin: 0; }

/* Header */
.app-header {
  height: 50px;
  z-index: 1020;
}

/* === 5. COMPONENTS === */

/* 5a. Cards */
.card-custom {
  background: var(--surface);
  border-radius: 10px; border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  padding: 25px; margin-bottom: 16px;
}
.card-section-title { margin-bottom: 16px; font-size: 16px; font-weight: 600; }

/* 5b. Buttons */
.btn-custom {
  padding: 10px 20px; border-radius: 10px;
  font-weight: 500; font-size: 14px; transition: 0.3s;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; white-space: nowrap;
}

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
}

/* 5c. Forms */
.form-control-custom, .form-select-custom {
  height: 48px; border-radius: 10px; border: 1px solid var(--border-color);
  background-color: var(--surface-alt) !important; padding: 0 16px; font-size: 14px;
  width: 100%; transition: 0.2s; vertical-align: middle;
}
.form-control-custom { line-height: 48px; }
.form-control-custom:focus, .form-select-custom:focus {
  background: white; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring); outline: none;
}
.form-label-custom {
  font-size: 12px; font-weight: 800; color: var(--text-sub);
  text-transform: uppercase; margin-bottom: 8px; display: block;
}
.form-validation-error {
  color: var(--danger-text);
  font-weight: 500;
  padding-top: 2px;
}

/* 5d. Tables */
.table-custom-wrapper {
  background: white; border-radius: 10px; border: 1px solid var(--border-color);
  overflow-x: auto; overflow-y: hidden; margin-bottom: 20px;
}
.table-custom { border-collapse: collapse; width: 100%; }
.table-custom th {
  background: var(--surface-alt); color: var(--text-sub); font-weight: 800;
  font-size: 14px; padding: 12px 10px; border-bottom: 1px solid var(--border-color);
  text-align: center; vertical-align: middle;
}
.table-custom td {
  padding: 12px 10px; border-bottom: 1px solid var(--border-color);
  font-size: 14px; vertical-align: middle; text-align: center; color: var(--text-main);
}
.table-custom tr:hover td { background-color: #fbfcfe; }
.table-custom tr:last-child td { border-bottom: none; }

.table-total { background-color: var(--surface-alt); font-weight: 800; border-top: 2px solid var(--gray-200); }
.table-total td { color: var(--gray-900) !important; }

/* 5e. Badges */
.badge-custom { padding: 5px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 500; display: inline-block; width: fit-content; }
.platform-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-weight: 700; font-size: 10px; line-height: 1; }
.badge-a { background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-subtle); }
.badge-b { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.badge-c { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }

/* 5f. Stat Cards */
.stat-card { background: var(--surface); border-radius: 10px; padding: 24px; border: 1px solid #edf2f7; height: 100%; }
.stat-label { font-size: 13px; font-weight: 700; color: #718096; margin-bottom: 10px; display: block; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.5px; }
.stat-unit { font-size: 14px; font-weight: 600; color: #a0aec0; margin-left: 2px; }

/* 5g. Pagination */
.pagination-wrapper {
  padding: 20px 8px 12px;
  border-top: 1px solid #edf2f7;
}
.pagination-wrapper .pagination-info {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: -0.2px;
}
.pagination .page-item .page-link {
  border: none;
  color: #64748b;
  padding: 6px 12px;
  margin: 0 1px;
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  transition: all 0.15s ease;
  min-width: 34px;
  text-align: center;
}
.pagination .page-item .page-link:focus {
  box-shadow: none;
}
.pagination .page-item.active .page-link {
  background-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.pagination .page-item:not(.active):not(.disabled):hover .page-link {
  background-color: var(--primary-bg);
  color: var(--primary);
}
.pagination .page-item.disabled .page-link {
  color: #cbd5e1;
  background: transparent;
}

/* 5h. Multi-Select Plugin */
.ms-container {
  display: flex !important; align-items: center; gap: 20px;
  width: 100% !important; background: transparent !important;
}
.ms-container .ms-selectable,
.ms-container .ms-selection {
  flex: 1; background: #ffffff !important;
  border: 1px solid #dee2e6 !important; border-radius: 10px !important;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 0 !important;
}
.ms-container .ms-selectable::before {
  content: '선택 가능 목록'; display: block; padding: 10px;
  background: var(--surface-alt); border-bottom: 1px solid #dee2e6;
  font-size: 12px; font-weight: 700; color: #6c757d; text-align: center;
}
.ms-container .ms-selection::before {
  content: '선택된 목록'; display: block; padding: 10px;
  background: var(--sidebar-dark); border-bottom: 1px solid var(--sidebar-dark);
  font-size: 12px; font-weight: 700; color: #ffffff; text-align: center;
}
.ms-container .ms-list {
  height: 250px !important; border: none !important;
  padding: 8px !important; box-shadow: none !important;
}
.ms-container .ms-list .ms-elem-selectable,
.ms-container .ms-list .ms-elem-selection {
  padding: 10px 15px !important; margin-bottom: 4px !important;
  border: 1px solid #f1f1f1 !important; border-radius: 10px !important;
  font-size: 13px !important; color: #495057 !important;
  transition: all 0.2s ease; cursor: pointer;
}
.ms-container .ms-list .ms-elem-selectable:hover {
  background-color: var(--surface-alt) !important;
  color: var(--sidebar-dark) !important; border-color: #dee2e6 !important;
}
.ms-container .ms-list .ms-elem-selection {
  background-color: var(--primary-bg) !important;
  color: var(--primary) !important; font-weight: 600;
}
.ms-list::-webkit-scrollbar { width: 5px; }
.ms-list::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 10px; }

/* 5i. Bottom Bar */
.sell-bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1040; border-top: 1px solid rgba(0,0,0,0.1); border-radius: 0;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

/* 5j. Offcanvas */
.offcanvas-container { z-index: 1050; }

/* 5k. Button States */
.btn-check:checked + .btn .text-dark,
.btn-check:checked + .btn .text-secondary,
.btn-check:checked + .btn .text-primary {
  color: #fff !important;
}

/* === 6. COMPONENT PATTERNS === */

/* Search Label */
.search-label {
  font-size: 12px; font-weight: 800; color: var(--text-sub);
  text-transform: uppercase; white-space: nowrap;
  min-width: 60px; margin-bottom: 0;
}

/* Search Type Select */
.search-type-select { max-width: 120px; }

/* Avatar Circle */
.avatar-circle {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-sm  { width: 36px;  height: 36px; }
.avatar-md  { width: 40px;  height: 40px; }
.avatar-lg  { width: 56px;  height: 56px; }
.avatar-xl  { width: 72px;  height: 72px; }

/* Product Thumbnail */
.product-thumb {
  width: 40px; height: 40px;
  border-radius: 10px; object-fit: cover;
  flex-shrink: 0;
}

/* Form Section Title */
.form-section-title {
  font-size: 1rem; font-weight: 600;
  color: var(--text-main); margin-bottom: 12px;
}

/* Success Icon Circle (order-complete) */
.success-icon-circle {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Login Page */
.login-bg {
  background: linear-gradient(135deg, var(--primary-subtle) 0%, var(--gray-50) 100%);
}
.login-card { max-width: 440px; }

/* Background Blocks */
.bg-muted-block {
  background: var(--surface-alt);
  border-radius: 10px;
}
.bg-warning-block {
  background: var(--warning-bg);
}

/* Product Detail Image */
.product-detail-img {
  width: 100%; 
  aspect-ratio: 16 / 9;
}
.product-thumb-mobile {
  width: 80px; height: 80px;
}
.product-thumb-mobile-full {
  width: 100%; aspect-ratio: 4 / 3;
}

/* Product Carousel */
.product-carousel { position: relative; }
.product-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  border: none; background: rgba(0,0,0,.35); color: #fff; width: 26px; height: 26px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; opacity: 0; transition: opacity .2s; margin: 0 4px;
}
.product-carousel:hover .product-carousel-btn { opacity: 1; }
.product-carousel-indicator {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: rgba(0,0,0,.5); color: #fff; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 10px; pointer-events: none;
}

/* Product Preview Box */
.product-preview-box { min-height: 240px; }

/* Date Input Width */
.date-input-w { width: 124px; }

/* Account Info Bar */
.account-info-bar {}

/* === 7. CATALOG STYLES === */
.catalog-card {
  cursor: pointer;
  border: 1px solid #e8edf3;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08) !important;
}
.catalog-img-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  background: #f5f7fa;
  overflow: hidden;
}
.catalog-img-wrapper img { transition: transform 0.3s ease; }
.catalog-card:hover .catalog-img-wrapper img { transform: scale(1.05); }
.catalog-stock-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; padding: 3px 8px;
  border-radius: 10px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.stock-in { background: rgba(16,185,129,0.12); color: #059669; }
.stock-low { background: rgba(245,158,11,0.12); color: #d97706; }
.stock-out { background: rgba(239,68,68,0.15); color: #dc2626; }
.catalog-card.sold-out .catalog-img-wrapper::after {
  content: '품절';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff; font-size: 1.25rem; font-weight: 700; letter-spacing: 2px;
}
.catalog-option-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 2px 0;
}
.catalog-option-row + .catalog-option-row { border-top: none; }

/* === 8. UTILITIES === */
.text-active { color: var(--primary) !important; font-weight: 600; }
.text-date { font-family: 'Pretendard', sans-serif; color: #6b7280; font-size: 13px; }
.cursor-pointer { cursor: pointer; }
.text-blue { color: var(--primary) !important; }
.fs-7 { font-size: 14px; }

.max-w-sm  { max-width: 100px; }
.max-w-md  { max-width: 120px; }
.max-w-lg  { max-width: 250px; }
.max-w-xl  { max-width: 440px; }
.max-w-2xl { max-width: 580px; }
.min-w-80  { min-width: 80px; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pb-bottom-bar { padding-bottom: 100px; }
.pb-bottom-bar-lg { padding-bottom: 140px; }
.form-hidden { display: none; }

/* === 9. RESPONSIVE === */

/* 9a. Desktop (lg+) */
@media (min-width: 992px) {
  .sidebar-container.offcanvas-lg {
    position: fixed !important; left: 0 !important; top: 0 !important;
    height: 100vh !important; width: 260px !important;
    visibility: visible !important; transform: none !important; z-index: 1030;
  }
  body.sidebar-collapsed .sidebar-container.offcanvas-lg {
    transform: translateX(-100%) !important; visibility: hidden !important;
  }
  .main-content { margin-left: 260px !important; width: calc(100% - 260px) !important; }
  body.sidebar-collapsed .main-content { margin-left: 0 !important; width: 100% !important; }
  .offcanvas-backdrop.show { display: none !important; }

  header.sticky-top { height: 70px !important; }
  .app-header { height: 70px; }
  .w-lg-auto { width: auto !important; }
  .h-lg-100 { height: 100% !important; }
  .table-responsive-card thead { display: table-header-group !important; }

  .sell-bottom-bar {
    position: static;
    z-index: auto;
    border-top: none;
    border-radius: 10px;
    padding-bottom: 0;
    margin-bottom: 1rem;
  }

  /* PC typography scale-up */
  .text-2xs  { font-size: 11px !important; }
  .text-xs   { font-size: 12px !important; }
  .text-sm   { font-size: 13px !important; }
  .text-smd  { font-size: 13.5px !important; }
  .text-13   { font-size: 14px !important; }
  .text-base { font-size: 15px !important; }
  .text-md   { font-size: 16px !important; }
  .text-lg   { font-size: 1.125rem !important; }
  .text-xl   { font-size: 1.25rem !important; }
  .text-2xl  { font-size: 1.4rem !important; }
  .text-3xl  { font-size: 1.6rem !important; }
  .text-4xl  { font-size: 1.85rem !important; }
  .text-5xl  { font-size: 2.25rem !important; }

  .form-label-custom { font-size: 13px; }
  .form-section-title { font-size: 16px; }
}

/* 9b. Mobile */
@media (max-width: 991.98px) {
  .main-content { margin-left: 0 !important; width: 100% !important; }
  .container-scroll { padding: 16px !important; padding-bottom: 140px !important; }

  .btn:active, .btn-group .btn:active {
    transform: scale(0.98) !important;
    filter: brightness(0.9) !important;
  }

  /* 모바일: 인라인 검색 버튼 숨김 (하단 버튼으로 대체) */
  #search-form .input-group > button[type="submit"],
  #search-form > .d-flex > button[type="submit"] {
    display: none !important;
  }
  /* 검색 버튼 숨김 후 input-group 라운드 보정 */
  #search-form .input-group > .form-control:last-of-type,
  #search-form .input-group > .form-control-custom:last-of-type {
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
  }

  /* Mobile card table */
  .table-custom-wrapper:has(.table-responsive-card) {
    background: transparent; border: none; box-shadow: none !important;
    border-radius: 0; margin: 0; overflow-x: visible;
  }
  .table-responsive-card { min-width: 0 !important; }
  .table-responsive-card thead { display: none !important; }
  .table-responsive-card tbody tr {
    display: block !important; background: #ffffff !important;
    border: 1px solid #edf2f7 !important; border-radius: 10px !important;
    padding: 0 !important; margin-bottom: 1.25rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden; cursor: default !important;
  }
  .table-responsive-card tbody tr:last-child { margin-bottom: 0 !important; }
  .table-responsive-card tbody td {
    display: flex !important; justify-content: flex-start !important;
    align-items: center !important; padding: .675rem .875rem !important;
    border: none !important; width: 100% !important;
    border-bottom: 1px solid var(--gray-100) !important;
  }
  .table-responsive-card td[data-label]::before {
    content: attr(data-label); font-weight: 700; color: var(--gray-500);
    font-size: 12px; text-align: left !important; min-width: 64px !important; margin-right: 15px;
  }
  .table-responsive-card tbody td:last-child { border-bottom: none !important; }
  .table-total-row { border: 2px solid var(--primary) !important; background: var(--primary-bg) !important; }

  /* Mobile component sizing */
  .form-control-custom, .form-select-custom {
    height: 36px; font-size: 12.5px; padding: 0 10px; border-radius: 10px;
  }
  .form-control, .form-select { font-size: 12.5px; }
  .form-control-custom { line-height: 36px; }
  .form-label-custom { font-size: 11px; margin-bottom: 4px; }
  .form-check-label { font-size: 12.5px; }
  .card-custom { border-radius: 10px; }
  .card-section-title { font-size: 14px; }
  .btn-sm { font-size: 11px; padding: 4px 8px; border-radius: 8px; }
  .btn-group .btn-sm { font-size: 11px; padding: 4px 8px; }
  .form-select-custom { height: 36px; font-size: 12.5px; padding: 0 8px; }
  .search-type-select { max-width: 80px; min-width: 80px; padding-right: 20px !important; }
  .btn-custom { padding: 8px 14px; border-radius: 10px; font-size: 12px; gap: 4px; }
  .table-custom td { font-size: 12.5px; }
  .table-custom th { font-size: 12.5px; }
  .h4, h4 { font-size: 1.1rem; }

  .fs-7 { font-size: 12px; }
  .search-label { font-size: 11px; min-width: unset !important; }

  /* 모바일: 필터 라벨 상단 이동 + 좌측 정렬 */
  .card-custom .d-flex.align-items-center.gap-3:has(> .search-label) {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .card-custom .d-flex.align-items-center.gap-3:has(> .search-label) > .search-label {
    margin-bottom: 0;
  }

  /* 모바일: 체크박스/라디오 필터 그룹 박스 */
  .card-custom .d-flex.align-items-center.gap-3:has(> .search-label) > .d-flex.flex-wrap {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px 12px;
    width: 100%;
  }

  /* 모바일: 날짜 입력 세로 중앙정렬 및 포맷 표시 */
  .card-custom input[type="date"] {
    font-size: 13px;
    padding: 6px 4px;
    min-width: 0;
    text-align: center;
  }
  .card-custom .d-flex.align-items-center.gap-2:has(> input[type="date"]) {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  .fixed-bottom-safe {
    position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    z-index: 1040; padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    background: white; border-top: 1px solid rgba(0,0,0,0.1); border-radius: 0 !important;
  }

  /* Account Info Bar (payment/list) */
  .account-info-bar {
    border-radius: 10px !important;
    margin-bottom: 0.5rem !important;
    border: 1px solid #dee2e6 !important;
    background-color: #fff !important;
  }
}

/* 9c. Small Mobile */
@media (max-width: 575.98px) {
  .card-custom { padding: 14px 12px; }
  .btn-custom { padding: 8px 14px; border-radius: 10px; font-size: 12px; gap: 4px; }
}

/* Point History */
.text-point-plus { color: #0d6efd !important; }
.text-point-minus { color: #dc3545 !important; }

/* Checkout Bottom Bar */
.checkout-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--gray-300);
  padding: 16px 40px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1050;
}

@media (max-width: 991.98px) {
  .has-checkout-bottom .container-scroll {
    padding-bottom: 100px;
  }
}

@media (max-width: 991.98px) {
  .checkout-bottom-bar {
    left: 0;
    padding: 14px 16px;
  }
}

/* 모바일 필터 접기/펼치기 (주문확인 등) */
.filter-toggle-bar {
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
}
.filter-toggle-bar .filter-summary,
.filter-summary {
  font-size: 11px;
  font-weight: 600;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}
.filter-toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--gray-400);
}
.filter-toggle-bar[aria-expanded="true"] .filter-toggle-icon {
  transform: rotate(180deg);
}
.filter-toggle-bar[aria-expanded="true"] {
  border-bottom: 1px solid var(--gray-200);
}
.filter-toggle-bar[aria-expanded="false"] {
  border-bottom: none;
}
/* 필터 펼침 시 카드 아웃라인 활성화 */
.filter-toggle-bar[aria-expanded="true"] {
  color: var(--primary);
}
.card-custom:has(.filter-toggle-bar[aria-expanded="true"]),
form.card-custom:has(.filter-toggle-bar[aria-expanded="true"]) {
  border: 1.5px solid rgba(37, 99, 235, 0.5) !important;
  box-shadow: 0 0 0 3px var(--primary-ring) !important;
}

/* 필터 영역 체크박스/라디오 */
.form-check-input[type="checkbox"],
.form-check-input[type="radio"] {
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 0 !important;
  transition: background-color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
}
.form-check-input[type="radio"] {
  border-radius: 50% !important;
}
.form-check-input:checked {
  background-color: transparent !important;
  border-color: #0d6efd !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230d6efd' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
  animation: checkPop 0.12s ease;
}
.form-check-input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%230d6efd'/%3e%3c/svg%3e") !important;
}
@keyframes checkPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* 선택 태그 X 버튼 */
.filter-tag-x {
  width: 16px;
  height: 16px;
  font-size: 1rem;
  line-height: 1;
  border-radius: 2px;
}


.sortable::after {
  content: "";
  padding: 2px 9px;
  background-image: url("../../img/sort/sort_both.svg");
}

.sorted-desc::after {
  content: "";
  padding: 2px 9px;
  background-image: url("../../img/sort/sort_desc.svg");
}

.sorted-asc::after {
  content: "";
  padding: 2px 9px;
  background-image: url("../../img/sort/sort_asc.svg");
}

.dropzone {
  border: 1px dashed #2d78b1;
  border-radius: 10px;
  background: #f3f8fa;
  position: relative;
}

.dropzone .dz-message .dz-button {
  font-size: 24px !important;
  font-weight: 600 !important;
  color: #A8C1D8 !important;
  height: 100%;
  margin: auto;
  word-break: keep-all;
}

.dropzone .dz-preview.dz-image-preview {
  background: none;
}

.dropzone .dz-preview .dz-image {
  background: #fff;
}

.dropzone .dz-preview .dz-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone .dz-preview .dz-remove {
  margin-top: 12px;
  font-size: 18px;
  text-align: center;
  display: block;
  cursor: pointer;
  border: none;
}