/* Modal System */
.inventory-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  padding: 16px;
}

.inventory-modal.show {
  display: flex;
  opacity: 1;
  visibility: visible;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.inventory-modal-content {
  background: var(--surface, #ffffff);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.inventory-modal.show .inventory-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal Header */
.inventory-modal-header {
  padding: 20px 24px;
  padding-right: 60px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: linear-gradient(to bottom, var(--surface, #ffffff), var(--bg, #f9fafb));
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Modal Title */
.inventory-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #111827);
  margin: 0;
  line-height: 1.4;
}

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--table-row-bg, #f3f4f6);
  color: var(--muted, #6b7280);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background-color: #ef4444;
  color: white;
  transform: rotate(90deg);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-close i {
  font-size: 1rem;
}

/* Modal Body */
.inventory-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

/* Custom scrollbar for modal body */
.inventory-modal-body::-webkit-scrollbar {
  width: 6px;
}

.inventory-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.inventory-modal-body::-webkit-scrollbar-thumb {
  background: var(--muted, #9ca3af);
  border-radius: 3px;
}

.inventory-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary, #6b7280);
}

/* Modal Footer */
.inventory-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border, #e5e7eb);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface, #ffffff);
  flex-shrink: 0;
}

/* Modal Size Variants */
.inventory-modal-small .inventory-modal-content {
  max-width: 480px;
}

.inventory-modal-xlarge .inventory-modal-content {
  max-width: 1000px;
}

.inventory-modal-large .inventory-modal-content {
  max-width: 1200px;
}

/* Inventory Table Container */
.inventory-table-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--bg);
}

.inventory-table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.inventory-table-container::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

.inventory-table-container::-webkit-scrollbar-thumb {
  background-color: var(--muted);
  border-radius: 4px;
  border: 2px solid var(--bg);
}

.inventory-table-container::-webkit-scrollbar-thumb:hover {
  background-color: #6b7280;
}

/* Inventory Table (General) */
.inventory-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-table-header {
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.inventory-th {
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.inventory-th-product {
  width: 40%;
}

.inventory-th-quantity,
.inventory-th-check,
.inventory-th-status {
  width: 20%;
  text-align: center;
}

.inventory-table-body {
  background: var(--surface);
}

.inventory-table-body > tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.inventory-table-body > tr:hover {
  background-color: var(--table-row-bg);
}

.inventory-table-body > tr:last-child {
  border-bottom: none;
}

.inventory-table-body td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text);
  vertical-align: middle;
}

/* Inventory List Table */
.inventory-list-table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  table-layout: auto;
}

.inventory-list-table thead {
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.inventory-list-table th,
.inventory-list-table td {
  padding: 12px 10px;
  font-size: 0.875rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  text-align: left;
}

.inventory-list-table th {
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.inventory-list-table tbody tr {
  transition: background-color 0.2s ease;
}

.inventory-list-table tbody tr:hover {
  background-color: var(--table-row-bg);
}

.inventory-list-table td {
  color: var(--text);
}

.inventory-list-table tr:last-child td {
  border-bottom: none;
}

.inventory-list-table .loading,
.inventory-list-table .empty {
  padding: 32px 16px;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

/* Column Widths for Inventory Check List (8 columns) */
/* 1. Mã phiếu */
.inventory-list-table th:nth-child(1),
.inventory-list-table td:nth-child(1) {
  min-width: 140px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
}

/* 2. Nhân viên */
.inventory-list-table th:nth-child(2),
.inventory-list-table td:nth-child(2) {
  min-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Ngày kiểm */
.inventory-list-table th:nth-child(3),
.inventory-list-table td:nth-child(3) {
  min-width: 130px;
  white-space: nowrap;
  text-align: center;
}

/* 4. Tổng SP */
.inventory-list-table th:nth-child(4),
.inventory-list-table td:nth-child(4) {
  min-width: 90px;
  text-align: center;
  font-weight: 600;
}

/* 5. Không khớp */
.inventory-list-table th:nth-child(5),
.inventory-list-table td:nth-child(5) {
  min-width: 100px;
  text-align: center;
  font-weight: 600;
  color: #ef4444;
}

/* 6. Trạng thái */
.inventory-list-table th:nth-child(6),
.inventory-list-table td:nth-child(6) {
  min-width: 120px;
  text-align: center;
}

.inventory-list-table td:nth-child(6) i {
  font-size: 1.125rem;
}

.inventory-list-table td:nth-child(6) .fa-check-circle {
  color: #22c55e;
}

.inventory-list-table td:nth-child(6) .fa-times-circle {
  color: #ef4444;
}

.inventory-list-table td:nth-child(6) .fa-exclamation-triangle {
  color: #f59e0b;
}

/* 7. Ghi chú */
.inventory-list-table th:nth-child(7),
.inventory-list-table td:nth-child(7) {
  min-width: 150px;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 8. Thao tác */
.inventory-list-table th:nth-child(8),
.inventory-list-table td:nth-child(8) {
  min-width: 100px;
  text-align: center;
}

/* Inventory Check Table */
.inventory-check-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.inventory-check-table td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #374151;
  vertical-align: middle;
}

.inventory-check-table tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.inventory-check-table tr:hover {
  background-color: #f9fafb;
}

.inventory-check-table tr:last-child {
  border-bottom: none;
}

.actual-quantity {
  width: 64px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.actual-quantity:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.status .fa-check {
  color: #22c55e;
}

.status .fa-times {
  color: #ef4444;
}

.reason-row td {
  padding: 8px 16px;
}

.reason-input {
  width: 100%;
  max-width: 300px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  resize: vertical;
  min-height: 36px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reason-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Stock Transaction Selected Products */
.selected-products-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #374151;
  background: #f9fafb;
}

.selected-products-item:last-child {
  border-bottom: none;
}

.selected-products-item .remove-item {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.selected-products-item .remove-item:hover {
  color: #dc2626;
  transform: scale(1.1);
}

/* Form Controls */
.inventory-input,
.inventory-select,
.inventory-file-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inventory-input:focus,
.inventory-select:focus,
.inventory-file-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.inventory-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

/* Buttons */
.inventory-submit-btn,
.inventory-button,
.inventory-button-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.inventory-submit-btn {
  background-color: #3b82f6;
  color: #ffffff;
}

.inventory-submit-btn:hover:not(:disabled) {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.inventory-submit-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.inventory-button {
  background-color: #10b981;
  color: #ffffff;
}

.inventory-button:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.inventory-button-secondary {
  background-color: #e5e7eb;
  color: #374151;
}

.inventory-button-secondary:hover {
  background-color: #d1d5db;
  transform: translateY(-1px);
}

/* Form Group */
.inventory-form-group {
  margin-bottom: 16px;
  margin-top: 10px;
}

.inventory-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Selected Products */
.inventory-selected-products {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  min-height: 60px;
}

/* Inventory Settings Section */
.inventory-settings {
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.inventory-settings-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.inventory-settings-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.inventory-check-btn,
.inventory-transaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.inventory-check-btn {
  background-color: #3b82f6;
}

.inventory-check-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.inventory-transaction-btn {
  background-color: #10b981;
}

.inventory-transaction-btn:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.inventory-check-btn i,
.inventory-transaction-btn i {
  margin-right: 8px;
  font-size: 1rem;
}

.inventory-list-container {
  border-radius: 8px;
}

.inventory-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.inventory-list-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.inventory-column-settings-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  background-color: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inventory-column-settings-btn:hover {
  background-color: var(--table-row-bg);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.inventory-column-settings-btn i {
  font-size: 1rem;
}

/* Checkbox List for Column Settings */
.inventory-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inventory-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.inventory-checkbox-label:hover {
  background-color: var(--table-row-bg);
}

.inventory-checkbox-label input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.inventory-checkbox-label span {
  font-size: 0.9375rem;
  color: var(--text);
}

/* Mobile Optimization */
@media (max-width: 640px) {
  .inventory-modal {
    padding: 8px;
  }

  .inventory-modal-content {
    border-radius: 12px;
    max-height: calc(100vh - 16px);
  }

  .inventory-modal-header {
    padding: 16px;
    padding-right: 48px;
  }

  .inventory-modal-body {
    padding: 16px;
  }

  .inventory-modal-footer {
    padding: 12px 16px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .inventory-modal-footer button {
    flex: 1;
    min-width: 120px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .modal-close i {
    font-size: 0.875rem;
  }

  .inventory-th,
  .inventory-table-body td,
  .inventory-check-table td {
    padding: 8px;
    font-size: 0.75rem;
  }

  .inventory-modal-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .inventory-list-title {
    font-size: medium;
  }

  .inventory-submit-btn,
  .inventory-button,
  .inventory-button-secondary,
  .inventory-check-btn,
  .inventory-transaction-btn {
    width: 100%;
    padding: 12px;
  }

  .actual-quantity {
    width: 48px;
    padding: 1px;
  }

  .reason-input {
    max-width: 100%;
    padding: 2px;
  }

  .selected-products-item {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .inventory-settings {
    padding: 16px;
  }

  .inventory-settings-actions {
    gap: 6px;
  }

  .inventory-list-table {
    display: block;
    overflow-x: auto;
  }

  .inventory-list-table tr {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .inventory-list-table th,
  .inventory-list-table td {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    font-size: x-small;
    border-bottom: none;
  }

  .inventory-list-table th:nth-child(1),
  .inventory-list-table td:nth-child(1),
  .inventory-list-table th:nth-child(2),
  .inventory-list-table td:nth-child(2),
  .inventory-list-table th:nth-child(3),
  .inventory-list-table td:nth-child(3),
  .inventory-list-table th:nth-child(4),
  .inventory-list-table td:nth-child(4),
  .inventory-list-table th:nth-child(5),
  .inventory-list-table td:nth-child(5),
  .inventory-list-table th:nth-child(6),
  .inventory-list-table td:nth-child(6),
  .inventory-list-table th:nth-child(7),
  .inventory-list-table td:nth-child(7) {
    width: 15%; /* ID: compact */
    justify-content: center;
  }

  .inventory-list-table th:nth-child(8),
  .inventory-list-table td:nth-child(8) {
    width: 10%; /* Check Date: compact */
    justify-content: center;
  }

  .inventory-list-table .loading,
  .inventory-list-table .empty {
    display: block;
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .inventory-th,
  .inventory-table-body td,
  .inventory-list-table th,
  .inventory-list-table td,
  .inventory-check-table td {
    padding: 10px;
    font-size: 0.875rem;
  }
}

/* Hiệu ứng loading cho nút */
.inventory-submit-btn.loading,
.inventory-button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  cursor: not-allowed !important;
}

.inventory-submit-btn.loading::after,
.inventory-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Đảm bảo các nút có style nhất quán */
.inventory-submit-btn,
.inventory-button {
  transition: all 0.3s ease;
}

/* ==================== SETTINGS SECTION ==================== */

/* Settings Container */
.settings-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem;
}

.settings-content {
  width: 100%;
}

/* Settings Navigation Menu */
.settings-nav {
  margin-bottom: 2rem;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.settings-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid var(--border);
}

.settings-menu-item {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 8px 8px 0 0;
}

.settings-menu-item:hover {
  color: var(--primary);
  background: var(--table-row-bg);
}

.settings-menu-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg);
}

/* Settings Subsection Container */
.settings-subsection {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.settings-subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

/* Promo Tabs */
.promo-tabs-container {
  margin-bottom: 2rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 0.5rem;
}

.promo-tabs-list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.promo-tab-item {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: transparent;
  border: 2px solid transparent;
}

.promo-tab-item:hover {
  color: var(--primary);
  background: var(--surface);
}

.promo-tab-item.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Tab Content */
.promo-tab-content {
  animation: fadeIn 0.3s ease-in;
}

.promo-tab-content.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Action Buttons */
.settings-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.settings-action-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.settings-action-btn i {
  font-size: 1rem;
}

/* Form Container */
.settings-form-container {
  background: var(--bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.settings-form-container.hidden {
  display: none;
}

/* Form Elements */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  display: block;
}

.settings-form-input,
.settings-form-select,
.settings-form-textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  transition: all 0.3s ease;
}

.settings-form-input:focus,
.settings-form-select:focus,
.settings-form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.settings-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.settings-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

/* Checkbox Group */
.settings-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.settings-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-checkbox-item input[type='checkbox'] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.settings-checkbox-item label {
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

/* Form Actions */
.settings-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.settings-btn-primary {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.settings-btn-secondary {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--border);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-btn-secondary:hover {
  background: var(--muted);
  transform: translateY(-1px);
}

/* Promo/Voucher List */
.settings-items-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.settings-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.settings-item-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.settings-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.settings-item-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.settings-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
}

.settings-item-badge.active {
  background: #dcfce7;
  color: #16a34a;
}

.settings-item-badge.inactive {
  background: #fee2e2;
  color: #dc2626;
}

.settings-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.settings-item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.settings-item-info i {
  width: 1.25rem;
  color: var(--primary);
}

.settings-item-value {
  color: var(--text);
  font-weight: 500;
}

.settings-item-description {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.settings-item-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.settings-item-action {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.settings-item-action.edit {
  background: #dbeafe;
  color: #1e40af;
}

.settings-item-action.edit:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.settings-item-action.delete {
  background: #fee2e2;
  color: #991b1b;
}

.settings-item-action.delete:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

/* Empty State */
.settings-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.settings-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.settings-empty-state p {
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .settings-wrapper {
    padding: 0.25rem;
  }

  .settings-nav {
    padding: 0.75rem;
  }

  .settings-nav-list {
    gap: 0.25rem;
  }

  .settings-menu-item {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .settings-subsection {
    padding: 1rem;
  }

  .settings-subsection-title {
    font-size: 1.25rem;
  }

  .promo-tabs-container {
    padding: 0.25rem;
  }

  .promo-tab-item {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .settings-action-btn {
    width: 100%;
    justify-content: center;
  }

  .settings-form-container {
    padding: 1rem;
  }

  .settings-form-actions {
    flex-direction: column;
  }

  .settings-btn-primary,
  .settings-btn-secondary {
    width: 100%;
    text-align: center;
  }

  .settings-item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-item-footer {
    gap: 0.5rem;
  }

  .settings-item-action {
    flex: 1;
    justify-content: center;
    font-size: 0.75rem;
  }
}

@media (min-width: 769px) {
  .settings-items-list {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }
}

@media (min-width: 1024px) {
  .settings-wrapper {
    padding: 1rem;
  }

  .settings-subsection {
    padding: 2.5rem;
  }
}

/* ==================== INVENTORY PAGINATION ==================== */
#inventoryPagination {
  margin-top: 1rem;
}

#inventoryPagination .flex {
  display: flex;
  align-items: center;
}

#inventoryPagination button {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#inventoryPagination button:hover:not(:disabled) {
  background: var(--table-row-bg);
}

#inventoryPagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#inventoryPagination select {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

/* ==================== INVENTORY DETAIL TABLE ==================== */
.inventory-check-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-check-table thead {
  background: var(--bg);
}

.inventory-check-table th {
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 2px solid var(--border);
}

.inventory-check-table td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.inventory-check-table tbody tr:last-child td {
  border-bottom: none;
}

.inventory-check-table tbody tr:hover {
  background: var(--table-row-bg);
}

/* ==================== COLUMN SETTINGS MODAL ==================== */
.inventory-column-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

#inventoryColumnSettingsModal .space-y-3 > label {
  padding: 0.75rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

#inventoryColumnSettingsModal .space-y-3 > label:hover {
  background: var(--table-row-bg);
}

/* ==================== RESPONSIVE INVENTORY LIST ==================== */
@media (max-width: 768px) {
  .inventory-list-table th,
  .inventory-list-table td {
    font-size: 0.75rem;
    padding: 8px 4px;
  }

  #inventoryPagination .flex {
    flex-direction: column;
    gap: 0.75rem;
  }

  #inventoryPagination .text-sm {
    font-size: 0.75rem;
  }
}

/* ==================== VIEW BUTTON ==================== */
.view-inventory-btn {
  padding: 0.5rem;
  font-size: 1.125rem;
  transition: transform 0.2s ease;
}

.view-inventory-btn:hover {
  transform: scale(1.2);
}

/* ==================== GRID UTILITIES ==================== */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
  gap: 1rem;
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

/* ==================== TRANSACTION DETAIL MODAL ==================== */
#transactionDetailModal .inventory-modal-body {
  padding: 0;
}

#transactionDetailBody {
  padding: 24px;
}

#transactionDetailBody h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #111827);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border, #e5e7eb);
}

/* ==================== TRANSACTION DETAIL MODAL - MODERN ==================== */
#transactionDetailModal .inventory-modal-content {
  max-width: 600px;
}

#transactionDetailModal .inventory-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: none;
  padding: 20px 24px;
  padding-right: 56px;
}

#transactionDetailModal .inventory-modal-title {
  color: white;
  font-size: 1.125rem;
}

#transactionDetailModal .modal-close {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

#transactionDetailModal .modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: rotate(90deg);
}

#transactionDetailBody {
  padding: 0;
}

/* Header section với badge và mã phiếu */
#transactionDetailBody > .mb-6:first-child {
  padding: 20px 24px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid #e5e7eb;
}

#transactionDetailBody h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#transactionDetailBody h3 .transaction-type-badge {
  font-size: 0.6875rem;
}

#transactionDetailBody .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  background: white;
}

#transactionDetailBody .grid > div {
  padding: 16px 24px;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#transactionDetailBody .grid > div:nth-child(odd) {
  border-right: 1px solid #f3f4f6;
}

#transactionDetailBody .grid > div:last-child,
#transactionDetailBody .grid > div:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

#transactionDetailBody .grid > div[style*='grid-column'] {
  border-right: none;
  grid-column: 1 / -1;
  background: #fafbfc;
}

#transactionDetailBody .grid > div strong {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0;
}

/* Section headers */
#transactionDetailBody > .mb-6:nth-child(2),
#transactionDetailBody > div:last-child {
  padding: 0 24px 20px;
}

#transactionDetailBody h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  margin: 20px 0 12px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Product table */
#transactionDetailBody table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  margin: 0 0 8px;
}

#transactionDetailBody table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#transactionDetailBody table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  background: white;
}

#transactionDetailBody table tbody tr:last-child td {
  border-bottom: none;
}

#transactionDetailBody table tbody tr {
  transition: background 0.15s ease;
}

#transactionDetailBody table tbody tr:hover {
  background: #f8fafc;
}

/* Image section */
#transactionDetailBody img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin-top: 8px;
  border: 1px solid #e5e7eb;
}

/* Mobile responsive for transaction detail */
@media (max-width: 640px) {
  #transactionDetailModal .inventory-modal-content {
    max-width: 100%;
    margin: 8px;
    max-height: calc(100vh - 16px);
  }

  #transactionDetailModal .inventory-modal-header {
    padding: 16px;
    padding-right: 48px;
  }

  #transactionDetailModal .inventory-modal-title {
    font-size: 1rem;
  }

  #transactionDetailBody > .mb-6:first-child {
    padding: 16px;
  }

  #transactionDetailBody h3 {
    font-size: 0.8125rem;
  }

  #transactionDetailBody .grid {
    grid-template-columns: 1fr;
  }

  #transactionDetailBody .grid > div {
    padding: 12px 16px;
    border-right: none !important;
  }

  #transactionDetailBody .grid > div:last-child {
    border-bottom: none;
  }

  #transactionDetailBody .grid > div strong {
    font-size: 0.5625rem;
  }

  #transactionDetailBody > .mb-6:nth-child(2),
  #transactionDetailBody > div:last-child {
    padding: 0 16px 16px;
  }

  #transactionDetailBody h4 {
    font-size: 0.8125rem;
    margin: 16px 0 10px;
  }

  #transactionDetailBody table th,
  #transactionDetailBody table td {
    padding: 10px 12px;
    font-size: 0.8125rem;
  }

  #transactionDetailBody table th {
    font-size: 0.625rem;
  }
}

/* Dark mode for transaction detail */
body.mkt192-dark #transactionDetailModal .inventory-modal-header {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

body.mkt192-dark #transactionDetailBody > .mb-6:first-child {
  background: linear-gradient(to bottom, #1f2937, #111827);
  border-color: #374151;
}

body.mkt192-dark #transactionDetailBody h3 {
  color: #e5e7eb;
}

body.mkt192-dark #transactionDetailBody .grid {
  background: #111827;
}

body.mkt192-dark #transactionDetailBody .grid > div {
  border-color: #374151;
}

body.mkt192-dark #transactionDetailBody .grid > div[style*='grid-column'] {
  background: #1f2937;
}

body.mkt192-dark #transactionDetailBody .grid > div strong {
  color: #6b7280;
}

body.mkt192-dark #transactionDetailBody h4 {
  color: #e5e7eb;
}

body.mkt192-dark #transactionDetailBody table {
  border-color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.mkt192-dark #transactionDetailBody table th {
  background: #1f2937;
  color: #9ca3af;
  border-color: #374151;
}

body.mkt192-dark #transactionDetailBody table td {
  background: #111827;
  color: #d1d5db;
  border-color: #374151;
}

body.mkt192-dark #transactionDetailBody table tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

body.mkt192-dark #transactionDetailBody img {
  border-color: #374151;
}

/* ====================== INVENTORY CHECK TABLE ====================== */
/* Canh giữa nội dung cột số lượng và trạng thái */
#inventoryCheckTable td:nth-child(2),
#inventoryCheckTable td:nth-child(4) {
  text-align: center;
  vertical-align: middle;
}

/* Tinh chỉnh padding và font cho table */
#inventoryCheckTable td,
#inventoryCheckTable th {
  font-size: 0.75rem;
  /* Text nhỏ hơn trên mobile */
}

@media (min-width: 640px) {
  #inventoryCheckTable td,
  #inventoryCheckTable th {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* ====================== INVENTORY TABS ====================== */
.inventory-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.inventory-tab-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -0.5rem;
}

.inventory-tab-btn:hover {
  color: #3b82f6;
}

.inventory-tab-btn.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.inventory-tab-content.hidden {
  display: none;
}

/* ====================== TRANSACTION FILTERS ====================== */
.transaction-filters {
  display: flex;
  gap: 5px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.transaction-filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transaction-filter-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.transaction-filter-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* Nút Refresh - Transaction & Inventory */
.transaction-refresh-btn,
.inventory-refresh-btn {
  padding: 5px 10px;
  font-size: x-small;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transaction-refresh-btn:hover,
.inventory-refresh-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.transaction-refresh-btn.loading i,
.inventory-refresh-btn.loading i {
  animation: spin 1s linear infinite;
}

.transaction-refresh-btn:disabled,
.inventory-refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ====================== TRANSACTION TABLE ====================== */
.transaction-table-container {
  overflow-x: auto;
  border-radius: 12px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.transaction-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.transaction-list-table thead {
  background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
  position: sticky;
  top: 0;
  z-index: 10;
}

.transaction-list-table th {
  padding: 1rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.transaction-list-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #4b5563;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.transaction-list-table tbody tr {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.transaction-list-table tbody tr:hover {
  background: linear-gradient(to right, #eff6ff, #f0fdf4);
  transform: scale(1.002);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.transaction-list-table tbody tr:active {
  transform: scale(0.998);
}

.transaction-type-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  gap: 4px;
}

.transaction-type-in {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  box-shadow: 0 1px 2px rgba(30, 64, 175, 0.1);
}

.transaction-type-out {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  box-shadow: 0 1px 2px rgba(153, 27, 27, 0.1);
}

.transaction-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9999px;
  gap: 4px;
}

.transaction-status-pending {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  animation: pulse-pending 2s ease-in-out infinite;
}

@keyframes pulse-pending {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.transaction-status-completed {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

/* Transaction Actions Cell & Wrapper */
.transaction-actions-cell {
  text-align: center;
}

.transaction-actions-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.transaction-action-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.transaction-action-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.transaction-action-btn:active {
  transform: translateY(0);
}

.transaction-action-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.transaction-approved-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  border-radius: 8px;
}

.transaction-delete-btn {
  background: #fef2f2;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.transaction-delete-btn:hover {
  background: #fee2e2;
  transform: scale(1.05);
}

.transaction-delete-btn:active {
  transform: scale(0.95);
}

.transaction-delete-btn i {
  font-size: 14px;
  color: #ef4444;
  transition: color 0.2s ease;
}

.transaction-delete-btn:hover i {
  color: #dc2626;
}

body.mkt192-dark .transaction-delete-btn {
  background: rgba(127, 29, 29, 0.3);
}

body.mkt192-dark .transaction-delete-btn:hover {
  background: rgba(127, 29, 29, 0.5);
}

body.mkt192-dark .transaction-delete-btn i {
  color: #fca5a5;
}

body.mkt192-dark .transaction-approved-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* ====================== RESPONSIVE TRANSACTION TABLE ====================== */
@media (max-width: 768px) {
  .transaction-table-container {
    border-radius: 16px;
    margin: 0;
    width: 100%;
    background: #f8fafc;
    box-shadow: none;
    border: none;
    padding: 8px;
  }

  .transaction-list-table {
    min-width: unset;
    background: transparent;
  }

  .transaction-list-table thead {
    display: none;
  }

  .transaction-list-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .transaction-list-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
  }

  .transaction-list-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
  }

  .transaction-list-table tbody tr:active {
    transform: scale(0.98);
  }

  .transaction-list-table td {
    padding: 12px 16px;
    border: none;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #f3f4f6;
  }

  .transaction-list-table td:last-child,
  .transaction-list-table td:nth-last-child(2) {
    border-bottom: none;
  }

  .transaction-list-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
  }

  /* Mã phiếu - full width, header style */
  .transaction-list-table td:nth-child(1) {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
  }

  .transaction-list-table td:nth-child(1)::before {
    color: #6b7280;
  }

  /* Loại và Ngày */
  .transaction-list-table td:nth-child(2) {
    border-right: 1px solid #f3f4f6;
  }

  /* Nhân viên và Trạng thái */
  .transaction-list-table td:nth-child(4) {
    border-right: 1px solid #f3f4f6;
  }

  /* Sản phẩm và Số lượng - cùng hàng */
  .transaction-list-table td:nth-child(6) {
    border-right: 1px solid #f3f4f6;
    background: #fafbfc;
  }

  .transaction-list-table td:nth-child(7) {
    background: #fafbfc;
    align-items: flex-end;
    text-align: right;
  }

  /* Thao tác - full width, canh phải */
  .transaction-list-table td:nth-child(8) {
    grid-column: 1 / -1;
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: none;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }

  .transaction-list-table td:nth-child(8)::before {
    display: none;
  }

  /* Actions wrapper on mobile */
  .transaction-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
  }

  .transaction-action-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .transaction-action-btn .btn-text {
    display: inline;
  }

  .transaction-approved-badge {
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .transaction-approved-badge .btn-text {
    display: inline;
  }

  .transaction-delete-btn {
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef2f2;
  }

  .transaction-delete-btn:hover {
    background: #fee2e2;
  }

  /* Badges nhỏ gọn hơn */
  .transaction-type-badge {
    font-size: 0.6875rem;
    padding: 6px 12px;
  }

  .transaction-status-badge {
    font-size: 0.6875rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .transaction-table-container {
    padding: 4px;
    border-radius: 12px;
  }

  .transaction-list-table tbody {
    gap: 10px;
  }

  .transaction-list-table tbody tr {
    border-radius: 12px;
  }

  .transaction-list-table td {
    padding: 10px 12px;
    font-size: 0.8125rem;
  }

  .transaction-list-table td::before {
    font-size: 0.5625rem;
    margin-bottom: 4px;
  }

  .transaction-type-badge,
  .transaction-status-badge {
    font-size: 0.625rem;
    padding: 5px 10px;
  }

  .transaction-action-btn {
    padding: 6px 10px;
    font-size: 0.6875rem;
  }

  .transaction-approved-badge {
    padding: 6px 10px;
    font-size: 0.6875rem;
  }

  .transaction-delete-btn {
    padding: 6px 8px;
  }

  .transaction-delete-btn i {
    font-size: 12px;
  }
}

/* Dark mode support for transaction table */
body.mkt192-dark .transaction-table-container {
  background: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.mkt192-dark .transaction-list-table {
  background: #1f2937;
}

body.mkt192-dark .transaction-list-table thead {
  background: linear-gradient(to bottom, #111827, #1f2937);
}

body.mkt192-dark .transaction-list-table th {
  color: #e5e7eb;
  border-bottom-color: #374151;
}

body.mkt192-dark .transaction-list-table td {
  color: #d1d5db;
  border-bottom-color: #374151;
}

body.mkt192-dark .transaction-list-table tbody tr:hover {
  background: linear-gradient(to right, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
}

@media (max-width: 768px) {
  body.mkt192-dark .transaction-table-container {
    background: #0f172a;
  }

  body.mkt192-dark .transaction-list-table tbody tr {
    background: #1e293b;
    border-color: #334155;
  }

  body.mkt192-dark .transaction-list-table td {
    border-color: #334155;
  }

  body.mkt192-dark .transaction-list-table td:nth-child(1) {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  }

  body.mkt192-dark .transaction-list-table td:nth-child(6) {
    background: #1e293b;
  }

  body.mkt192-dark .transaction-list-table td:nth-child(8),
  body.mkt192-dark .transaction-list-table td:nth-child(9) {
    background: #0f172a;
  }

  body.mkt192-dark .transaction-list-table tbody tr:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  body.mkt192-dark .transaction-list-table td::before {
    color: #64748b;
  }

  body.mkt192-dark .transaction-delete-btn {
    background: rgba(127, 29, 29, 0.3);
  }

  body.mkt192-dark .transaction-delete-btn:hover {
    background: rgba(127, 29, 29, 0.5);
  }
}
