/* ==============================================================================
   🎌 ANT DESIGN ADMIN DESIGN SYSTEM - GIÁM ĐỊNH TRANH CUỘN NHẬT BẢN
   ============================================================================== */

/* Layout Shell */
.antd-admin-container {
  background: #141b18;
  color: #e5dfd7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(223, 184, 91, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 1.5rem 0 3rem 0;
}

/* Admin Top Bar */
.antd-admin-header {
  background: #0f1513;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(223, 184, 91, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.antd-admin-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.antd-admin-header-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary, #dfb85b);
  margin: 0;
  letter-spacing: 0.5px;
}

.antd-admin-badge {
  background: rgba(223, 184, 91, 0.15);
  color: #dfb85b;
  border: 1px solid rgba(223, 184, 91, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Two-column Layout: Sider (Left) + Content (Right) */
.antd-admin-layout {
  display: flex;
  min-height: 680px;
}

/* Sider Menu */
.antd-admin-sider {
  width: 250px;
  background: #111714;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.antd-admin-menu {
  list-style: none;
  padding: 0.75rem 0.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.antd-admin-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  color: #a8b3af;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}

.antd-admin-menu-item:hover {
  background: rgba(223, 184, 91, 0.08);
  color: #ffffff;
}

.antd-admin-menu-item.active {
  background: rgba(223, 184, 91, 0.2);
  color: #dfb85b;
  border-left: 3px solid #dfb85b;
}

.antd-admin-menu-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content Area */
.antd-admin-content {
  flex: 1;
  background: #141b18;
  padding: 1.5rem;
  overflow-y: auto;
}

.antd-module-view {
  display: none;
}

.antd-module-view.active {
  display: block;
}

/* Module Header */
.antd-page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.antd-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.antd-page-desc {
  font-size: 0.84rem;
  color: #8c9b96;
  margin: 0;
}

/* Ant Design Card */
.antd-card {
  background: #18221e;
  border: 1px solid rgba(223, 184, 91, 0.22);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.antd-card-head {
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.antd-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #dfb85b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.antd-card-body {
  padding: 1.25rem;
}

/* Form Controls */
.antd-form-group {
  margin-bottom: 1rem;
}

.antd-form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cfd8d4;
  margin-bottom: 6px;
}

.antd-input, .antd-select, .antd-textarea {
  width: 100%;
  background: #111714;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.antd-input:focus, .antd-select:focus, .antd-textarea:focus {
  border-color: #dfb85b;
}

.antd-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Ant Design Buttons */
.antd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.antd-btn-primary {
  background: #dfb85b;
  color: #141b18;
  border-color: #dfb85b;
}

.antd-btn-primary:hover:not(:disabled) {
  background: #eed588;
  border-color: #eed588;
  box-shadow: 0 4px 12px rgba(223, 184, 91, 0.3);
}

.antd-btn-default {
  background: rgba(255, 255, 255, 0.06);
  color: #e5dfd7;
  border-color: rgba(255, 255, 255, 0.2);
}

.antd-btn-default:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: #dfb85b;
}

.antd-btn-success {
  background: #237804;
  color: #ffffff;
  border-color: #237804;
}

.antd-btn-success:hover:not(:disabled) {
  background: #389e0d;
}

.antd-btn-danger {
  background: rgba(245, 34, 45, 0.15);
  color: #ff7875;
  border-color: rgba(245, 34, 45, 0.4);
}

.antd-btn-danger:hover:not(:disabled) {
  background: rgba(245, 34, 45, 0.25);
  border-color: #ff4d4f;
}

.antd-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.antd-btn-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.antd-btn-lg {
  padding: 10px 22px;
  font-size: 0.95rem;
}

/* Ant Design Tags & Badges */
.antd-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #d0c8be;
}

.antd-tag-gold {
  color: #dfb85b;
  border-color: rgba(223, 184, 91, 0.4);
  background: rgba(223, 184, 91, 0.12);
}

.antd-tag-success {
  color: #52c41a;
  border-color: rgba(82, 196, 26, 0.4);
  background: rgba(82, 196, 26, 0.12);
}

.antd-tag-warning {
  color: #faad14;
  border-color: rgba(250, 173, 20, 0.4);
  background: rgba(250, 173, 20, 0.12);
}

.antd-tag-blue {
  color: #1890ff;
  border-color: rgba(24, 144, 255, 0.4);
  background: rgba(24, 144, 255, 0.12);
}

.antd-tag-red {
  color: #ff4d4f;
  border-color: rgba(255, 77, 79, 0.4);
  background: rgba(255, 77, 79, 0.12);
}

/* Category Tabs */
.antd-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.antd-tab-item {
  padding: 8px 16px;
  border-radius: 6px 6px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #a8b3af;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.antd-tab-item:hover {
  color: #ffffff;
}

.antd-tab-item.active {
  color: #dfb85b;
  border-bottom-color: #dfb85b;
  background: rgba(223, 184, 91, 0.08);
}

.antd-tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  color: inherit;
}

/* Sub-pane chuyển đổi trong module Cấu hình: Ẩn mặc định, chỉ hiện tab active */
.antd-config-pane {
  display: none !important;
}

.antd-config-pane.active {
  display: block !important;
  animation: antdFadeIn 0.22s ease forwards;
}

/* Batch Toolbar / Action Bar */
.antd-action-bar {
  background: #111714;
  border: 1px solid rgba(223, 184, 91, 0.3);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.antd-action-bar-left, .antd-action-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Folder Selection Modal & Drawers */
.antd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.antd-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.antd-modal {
  background: #18221e;
  border: 1px solid rgba(223, 184, 91, 0.35);
  border-radius: 10px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.antd-modal-backdrop.open .antd-modal {
  transform: translateY(0);
}

.antd-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.antd-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #dfb85b;
}

.antd-modal-close {
  background: none;
  border: none;
  color: #8c9b96;
  font-size: 1.3rem;
  cursor: pointer;
  transition: color 0.2s;
}

.antd-modal-close:hover {
  color: #ffffff;
}

.antd-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.antd-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #141b18;
  border-radius: 0 0 10px 10px;
}

/* Ant Design Drawer (Right Slide) */
.antd-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.antd-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.antd-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 90vw;
  background: #18221e;
  border-left: 1px solid rgba(223, 184, 91, 0.35);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.antd-drawer-edit {
  width: 650px;
}

.antd-drawer-backdrop.open .antd-drawer {
  transform: translateX(0);
}

.antd-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.antd-drawer-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #dfb85b;
}

.antd-drawer-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.antd-drawer-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #141b18;
}

/* Folder Preview Cards Grid - Compact Modern Design */
.antd-folder-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.antd-folder-preview-card {
  position: relative;
  background: #111714;
  border: 1px solid rgba(223, 184, 91, 0.25);
  border-radius: 8px;
  padding: 10px 8px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: all 0.2s ease;
}

.antd-folder-preview-card:hover {
  border-color: #dfb85b;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.antd-folder-compact-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
  line-height: 1;
}

.antd-folder-compact-remove:hover {
  background: #ff4d4f;
  border-color: #ff4d4f;
  transform: scale(1.1);
}

.antd-folder-compact-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: #0a0e0c;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.antd-folder-compact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.antd-folder-compact-count {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #dfb85b;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.antd-folder-compact-sku {
  font-size: 0.88rem;
  font-weight: 800;
  color: #dfb85b;
  letter-spacing: 0.5px;
  font-family: monospace, sans-serif;
  padding: 2px 8px;
  background: rgba(223, 184, 91, 0.12);
  border: 1px solid rgba(223, 184, 91, 0.25);
  border-radius: 4px;
  width: 100%;
}

/* Queue Item State */
.antd-queue-item {
  background: #111714;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.antd-queue-item.done {
  border-color: rgba(82, 196, 26, 0.35);
  background: rgba(82, 196, 26, 0.04);
}

.antd-queue-item.running {
  border-color: rgba(223, 184, 91, 0.5);
  background: rgba(223, 184, 91, 0.06);
}

.antd-queue-item.error {
  border-color: rgba(255, 77, 79, 0.4);
  background: rgba(255, 77, 79, 0.06);
}

/* Analyzed Paintings Grid - 4 Cột mỗi hàng chuẩn Desktop */
.antd-analyzed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1280px) {
  .antd-analyzed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .antd-analyzed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


.antd-painting-card {
  background: #18221e;
  border: 1px solid rgba(223, 184, 91, 0.2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
}

.antd-painting-card:hover {
  transform: translateY(-2px);
  border-color: #dfb85b;
}

.antd-painting-card.selected {
  border-color: #dfb85b;
  box-shadow: 0 0 0 1px #dfb85b;
}

.antd-painting-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #dfb85b;
}

.antd-painting-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #0d1210;
  display: block;
}

.antd-painting-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.antd-painting-sku {
  font-weight: 700;
  color: #dfb85b;
  font-size: 0.85rem;
}

.antd-painting-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.antd-painting-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ff4d4f;
  margin-top: auto;
  padding-top: 4px;
}


/* Config Sub-Panes Isolation (Chỉ hiển thị 1 sub-tab được chọn) */
.antd-config-pane {
  display: none !important;
}

.antd-config-pane.active {
  display: block !important;
}

.antd-config-subtab-btn {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.antd-config-subtab-btn:hover {
  color: #dfb85b;
}

.antd-config-subtab-btn.active {
  color: #dfb85b;
  border-bottom: 2px solid #dfb85b;
  font-weight: 700;
}

/* Ant Design Dark Pagination Bar */
.antd-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #141b18;
  border: 1px solid rgba(223, 184, 91, 0.2);
  border-radius: 8px;
  margin-top: 1.5rem;
}

.antd-pagination-info {
  font-size: 0.85rem;
  color: #8c9b96;
}

.antd-pagination-info strong {
  color: #dfb85b;
}

.antd-pagination-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.antd-page-btn {
  background: #18221e;
  border: 1px solid rgba(223, 184, 91, 0.25);
  color: #d6d0c7;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.antd-page-btn:hover:not(.disabled) {
  border-color: #dfb85b;
  color: #dfb85b;
  background: rgba(223, 184, 91, 0.1);
  transform: translateY(-1px);
}

.antd-page-btn.active {
  background: #dfb85b;
  color: #0f1513;
  border-color: #dfb85b;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(223, 184, 91, 0.35);
}

.antd-page-btn.disabled,
.antd-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
}

.antd-page-ellipsis {
  color: #8c9b96;
  padding: 0 4px;
  font-size: 0.85rem;
}

/* ==============================================================================
   📱 CHUYÊN BIỆT GIAO DIỆN ĐIỆN THOẠI & THIẾT BỊ DI ĐỘNG (RESPONSIVE MOBILE)
   ============================================================================== */

@media (max-width: 900px) {
  .antd-admin-layout {
    flex-direction: column;
    min-height: auto;
  }
  .antd-admin-sider {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(223, 184, 91, 0.2);
    background: #0f1513;
  }
  .antd-admin-sider > div:last-child {
    display: none !important; /* Ẩn footer bản quyền của Sider khi nằm ngang */
  }
  .antd-admin-menu {
    flex-direction: row;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0.75rem;
    gap: 8px;
  }
  .antd-admin-menu::-webkit-scrollbar {
    display: none;
  }
  .antd-admin-menu-item {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.65rem 0.95rem;
    font-size: 0.84rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px;
  }
  .antd-admin-menu-item.active {
    border-left: none;
    border-bottom-color: #dfb85b;
    background: rgba(223, 184, 91, 0.15);
  }
  .antd-analyzed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .antd-admin-container {
    margin: 0.5rem 0 2rem 0;
    border-radius: 6px;
    border-left: none;
    border-right: none;
  }

  .antd-admin-header {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .antd-admin-header-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .antd-admin-header-title h2 {
    font-size: 1rem;
    line-height: 1.35;
  }

  .antd-admin-badge {
    align-self: flex-start;
  }

  .antd-admin-header > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    width: 100%;
  }

  .antd-admin-header > div:last-child button {
    width: 100%;
    justify-content: center;
  }

  .antd-admin-content {
    padding: 1rem 0.75rem;
  }

  .antd-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .antd-page-header button {
    width: 100%;
    justify-content: center;
  }

  .antd-page-title {
    font-size: 1.1rem;
  }

  .antd-page-desc {
    font-size: 0.78rem;
  }

  /* Action Bar on Mobile (Module 1 Execution Bar & Module 2 Bulk Bar) */
  .antd-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
  }

  .antd-action-bar-left {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .antd-action-bar-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .antd-action-bar-right .antd-btn {
    width: 100%;
    justify-content: center;
  }

  /* Category tabs touch scroll */
  .antd-tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 6px;
  }

  .antd-tabs-bar::-webkit-scrollbar {
    display: none;
  }

  .antd-tab-item {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* 2 Cột trên màn hình điện thoại cho lưới tranh đã phân tích */
  .antd-analyzed-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .antd-painting-img {
    height: 140px;
  }

  .antd-painting-info {
    padding: 8px;
    gap: 4px;
  }

  .antd-painting-sku {
    font-size: 0.75rem;
  }

  .antd-painting-name {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }

  .antd-painting-price {
    font-size: 0.85rem;
    padding-top: 2px;
  }

  .antd-painting-checkbox {
    width: 18px;
    height: 18px;
    top: 6px;
    left: 6px;
  }

  /* Pagination Bar on Mobile */
  .antd-pagination-bar {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.5rem;
    text-align: center;
  }

  .antd-pagination-nav {
    justify-content: center;
    width: 100%;
    gap: 4px;
  }

  .antd-page-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: 0.8rem;
  }

  /* Drawer on Mobile: chiếm trọn 100% màn hình chiều rộng */
  .antd-drawer,
  .antd-drawer-edit {
    width: 100vw !important;
    max-width: 100vw !important;
    border-left: none;
  }

  .antd-drawer-header {
    padding: 1rem 1.15rem;
  }

  .antd-drawer-header h3 {
    font-size: 1.05rem;
  }

  .antd-drawer-body {
    padding: 1rem 1.15rem;
  }

  .antd-drawer-footer {
    padding: 0.85rem 1.15rem;
    flex-direction: column;
    gap: 8px;
  }

  .antd-drawer-footer button {
    width: 100%;
  }

  /* Modal on Mobile */
  .antd-modal-backdrop {
    padding: 0.4rem;
  }

  .antd-modal {
    max-height: 95vh;
    border-radius: 8px;
    width: 100%;
  }

  .antd-modal-header {
    padding: 0.85rem 1rem;
  }

  .antd-modal-header h3 {
    font-size: 0.95rem;
  }

  .antd-modal-body {
    padding: 0.85rem 1rem;
  }

  .antd-modal-footer {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .antd-modal-footer button {
    width: 100%;
    justify-content: center;
  }

  #adminFolderPickerCountText {
    text-align: center;
    margin-right: 0 !important;
    margin-bottom: 4px;
  }

  /* Form Elements in Drawer */
  .antd-drawer-body [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #editPhotosStrip {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }

  /* Tránh auto-zoom iOS Safari */
  .antd-input,
  .antd-select,
  .antd-textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .antd-admin-header-title h2 {
    font-size: 0.92rem;
  }

  .antd-card-head {
    padding: 0.65rem 0.85rem;
  }

  .antd-card-body {
    padding: 0.85rem 0.75rem;
  }

  .antd-folder-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 6px;
  }

  .antd-folder-compact-thumb-wrap {
    max-width: 65px;
  }

  .antd-folder-compact-sku {
    font-size: 0.75rem;
  }
}

@media (max-width: 360px) {
  .antd-analyzed-grid {
    grid-template-columns: 1fr !important;
  }
  .antd-painting-img {
    height: 180px;
  }
}

