:root {
  --red: #E4002B;
  --red-dark: #A80020;
  --red-soft: #FDECEE;
  --ink: #14161A;
  --gray: #64697A;
  --gray-soft: #98A0B3;
  --line: #E7E9EF;
  --surface: #FFFFFF;
  --bg: #F6F7FA;
  --bg-2: #EEF0F5;
  --mint: #0F8F5F;
  --mint-soft: #E7F7EF;
  --gold: #B07A11;
  --gold-soft: #FBF3E1;
  --blue: #2457C5;
  --blue-soft: #EAF0FD;
  --shadow: 0 8px 20px -10px rgba(20,22,26,0.12);
  --shadow-sm: 0 2px 6px -2px rgba(20,22,26,0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-mark {
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

input, select {
  font-family: inherit;
}

select {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

select option {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 6px 10px;
}

::selection {
  background: var(--red);
  color: white;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon svg {
  width: 100%;
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------- LOGO MARK ---------------- */
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo-word {
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.01em;
  line-height: 1;
}

.logo-word small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 9.5px;
  opacity: 0.65;
  margin-top: 3px;
}

/* ---------------- BUTTONS ---------------- */
.primary-btn {
  width: 100%;
  background: var(--ink);
  color: white;
  padding: 14px 0;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background .15s ease, transform .1s ease, opacity .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn:hover {
  background: var(--red);
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.primary-btn.btn-auto {
  width: auto;
  padding: 12px 22px;
}

.primary-btn.btn-modal {
  width: auto;
  padding: 11px 20px;
}

.ghost-btn {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ghost-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.danger-btn {
  background: var(--surface);
  color: var(--red-dark);
  border: 1.5px solid #F3C4C9;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background .15s ease;
}

.danger-btn:hover {
  background: #FDEBEC;
}

.warning-btn {
  background: var(--surface);
  color: #B45309;
  border: 1.5px solid #FCD34D;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.warning-btn:hover {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}

.success-btn {
  background: var(--surface);
  color: #0B6E49;
  border: 1.5px solid #A7F3D0;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.success-btn:hover {
  background: var(--mint-soft);
  border-color: #10B981;
  color: #065F46;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------- APP LAYOUT ---------------- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page {
  padding: 16px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.page > *:last-child {
  margin-bottom: 0 !important;
}

.page-head {
  padding: 0 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head .eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.page-head h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.page-head p {
  color: var(--gray);
  font-size: 13.5px;
  margin-top: 6px;
  max-width: 560px;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---------------- FORMS & INPUTS ---------------- */
.field {
  margin-bottom: 16px;
}

.form-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
  margin-bottom: 7px;
}

.field input, .field select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  height: auto;
  line-height: 1.4;
}

.field input:focus, .field select:focus {
  border-color: var(--red);
}

.field-hint {
  font-size: 11.5px;
  color: var(--gray-soft);
  margin-top: 6px;
}

.search-input {
  padding: 9px 14px 9px 34px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  outline: none;
  width: 230px;
  background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2398A0B3" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="7"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 12px center / 14px 14px;
}

.search-input:focus {
  border-color: var(--red);
}

/* ---------------- FILTER BAR ---------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.filter-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-label .icon {
  width: 14px;
  height: 14px;
  color: var(--gray-soft);
}

.select-input {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 30px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364697A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center / 13px 13px;
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-width: 160px;
  width: auto;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 38px;
  height: 38px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.select-input:hover,
.select-input:focus,
.select-input:active {
  border-color: #E4002B;
  color: #E4002B;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E4002B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  box-shadow: none;
  outline: none;
}

.select-input option {
  background: var(--surface);
  color: var(--ink);
}

/* --- CUSTOM DROPDOWN LIST WITH HOVER BORDER & MATCHING WIDTH --- */
.custom-select-wrapper {
  position: relative;
  display: inline-block;
  min-width: 160px;
}

.custom-select-trigger {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 30px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364697A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center / 13px 13px;
  color: var(--ink);
  cursor: pointer;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  user-select: none;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
  border-color: #E4002B;
  color: #E4002B;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E4002B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  box-shadow: none;
}

/* The opened list container - exactly matches the dropdown box width */
.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  padding: 5px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-wrapper.open .custom-select-menu {
  display: block;
}

/* Hover border on the opened list */
.custom-select-menu:hover {
  border-color: #E4002B;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.12);
}

/* Individual items in the list */
.custom-select-option {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
}

.custom-select-option:hover {
  background: #FFF5F5;
  border-color: #E4002B;
  color: #E4002B;
  font-weight: 600;
}

.custom-select-option.selected {
  background: var(--bg);
  font-weight: 700;
  color: var(--red);
}

.range-group {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.range-btn {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  background: transparent;
  cursor: pointer;
}

.range-btn.active {
  background: var(--ink);
  color: white;
}

.filter-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}

.filter-bar-tail {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.clear-filters-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--red-dark);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: none;
}

.clear-filters-btn:hover {
  text-decoration: underline;
}

/* ---------------- KPI CARDS ---------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-row.grid-5col {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1180px) {
  .kpi-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .kpi-row.grid-4col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 820px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .kpi-row.grid-4col {
    grid-template-columns: 1fr !important;
  }
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px;
  box-shadow: var(--shadow-sm);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-soft);
  color: var(--red-dark);
}

.kpi-icon .icon {
  width: 17px;
  height: 17px;
}

.kpi-icon.mint {
  background: var(--mint-soft);
  color: #0B6E49;
}

.kpi-icon.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.kpi-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.kpi-card .k-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gray);
  margin-top: 14px;
}

.kpi-card .k-num {
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.01em;
}

.kpi-card .k-delta {
  font-size: 12px;
  color: var(--mint);
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-card .k-delta.flat {
  color: var(--gray);
}

.kpi-card .k-delta .icon {
  width: 12px;
  height: 12px;
}

.sparkline {
  margin-top: 12px;
  height: 26px;
}

.sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------------- STORE MANAGEMENT FORM ---------------- */
.add-store-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 8px;
}

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

.add-store-form .field {
  margin-bottom: 0;
}

.add-store-form .field input {
  padding: 11px 13px;
  font-size: 13.5px;
}

.add-store-form .add-btn-wrap {
  grid-column: span 4;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .add-store-form .add-btn-wrap {
    grid-column: span 2;
  }
}

.add-store-form.settings-2col {
  grid-template-columns: repeat(2, 1fr);
}

.add-store-form.settings-2col .add-btn-wrap {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .add-store-form.settings-2col {
    grid-template-columns: 1fr;
  }
  .add-store-form.settings-2col .add-btn-wrap {
    grid-column: span 1;
  }
}

.select-input.settings-select {
  width: 100%;
  padding: 13px 30px 13px 14px;
}

/* ---------------- PANELS & TABLES ---------------- */
.panel,
.kpi-card,
.chart-card,
.filter-bar {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover,
.kpi-card:hover,
.chart-card:hover,
.filter-bar:hover {
  border-color: #E4002B;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
  position: relative;
  z-index: 5;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-head h3 {
  font-size: 16.5px;
  font-weight: 800;
}

.panel-head .sub {
  font-size: 12.5px;
  color: var(--gray);
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
}

thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--line);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

thead th:first-child,
tbody td:first-child {
  padding-left: 0;
}

thead th:last-child,
tbody td:last-child {
  padding-right: 0;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--bg);
}

.clickable-row {
  cursor: pointer;
}

tr.clickable-row:hover {
  background: var(--bg-2);
}

.store-cell {
  font-weight: 600;
}

.store-cell .loc {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--gray);
  margin-top: 2px;
}

/* ---------------- BADGES & TAGS ---------------- */
.pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

.pill.redeemed {
  background: var(--mint-soft);
  color: #0B6E49;
}

.pill.rejected {
  background: var(--red-soft);
  color: var(--red-dark);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-badge.live {
  background: var(--mint-soft);
  color: #0B6E49;
}

.status-badge.inactive {
  background: #FEE2E2;
  color: #DC2626;
}

.status-badge.inactive .dot {
  background: #DC2626;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0F8F5F;
}

.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray);
}

.country-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.pin-tag {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* ---------------- GENERAL UTILITIES ---------------- */
.pos-relative { position: relative; }
.z-index-2 { z-index: 2; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.gap-18 { gap: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.w-auto { width: auto; }
.flex-1 { flex: 1; }
.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
.mt-22 { margin-top: 22px; }
.mb-0 { margin-bottom: 0; }
.mb-6 { margin-bottom: 6px; }
.mb-14 { margin-bottom: 14px; }
.mb-18 { margin-bottom: 16px; }
.mb-22 { margin-bottom: 16px; }
.color-gray { color: var(--gray); }
.color-ink { color: var(--ink); }
.color-red { color: var(--red); }
.spacer-6 { height: 6px; }
.spacer-16 { height: 16px; }
.nowrap { white-space: nowrap; }
.cursor-pointer { cursor: pointer; }

/* =========================================================
   COMPREHENSIVE RESPONSIVE STYLES (TABLET & MOBILE)
========================================================== */
@media (max-width: 900px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .filter-divider {
    display: none !important;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .filter-group .select-input {
    max-width: 100% !important;
    width: 100% !important;
  }

  .filter-bar-tail {
    margin-left: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: stretch !important;
  }

  .filter-bar .search-input,
  .coupon-filter-bar .search-input,
  .search-input {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 640px) {
  .filter-bar-tail {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .filter-bar-tail .search-input {
    width: 100% !important;
  }

  .filter-bar-tail button,
  .filter-bar-tail .ghost-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .panel-head {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .panel-head-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .panel-head-actions .select-input,
  .panel-head-actions .search-input {
    max-width: 100% !important;
    width: 100% !important;
  }

  .field input, .field select {
    font-size: 14px !important;
    padding: 11px 12px !important;
  }
}

/* --- Responsive Table Pagination Navigation (All Tables) --- */
@media (max-width: 768px) {
  .pagination-bar {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 0 4px !important;
  }

  .pagination-info {
    font-size: 11.5px !important;
    text-align: center !important;
  }

  .pagination-btns {
    display: flex !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .pagination-btns button {
    padding: 5px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
  }

  .pagination-btns .page-num {
    padding: 5px 8px !important;
    min-width: 44px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }
}
