.table,
.kv-grid-table {
  background: #fff;
  border: 1px solid var(--ay-line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0;
  width: 100%;
}

/* Soften Bootstrap table-bordered (prevents harsh/black outer box on lists) */
.admin-page .table.table-bordered,
.admin-page .table {
  border: 1px solid var(--ay-line) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 14px;
  overflow: hidden;
}
.admin-page .table.table-bordered > thead > tr > th,
.admin-page .table.table-bordered > tbody > tr > th,
.admin-page .table.table-bordered > tfoot > tr > th,
.admin-page .table.table-bordered > thead > tr > td,
.admin-page .table.table-bordered > tbody > tr > td,
.admin-page .table.table-bordered > tfoot > tr > td,
.admin-page .table > thead > tr > th,
.admin-page .table > tbody > tr > td {
  border-color: var(--ay-line) !important;
}
.admin-page .table-responsive,
.admin-page [class*="-list-scroll"] {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.table > thead > tr > th,
.kv-grid-table > thead > tr > th {
  border-bottom: 1px solid var(--ay-line);
  border-top: 0;
  color: var(--ay-muted);
  background: var(--ay-surface-soft);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
}

.table > tbody > tr > td,
.kv-grid-table > tbody > tr > td {
  border-top: 1px solid var(--ay-line);
  vertical-align: middle;
  padding: 14px;
  color: var(--ay-ink);
}

.table-hover > tbody > tr:hover,
.kv-grid-table > tbody > tr:hover {
  background: #fbf8f4;
}

.table-responsive {
  border: 0;
  border-radius: 14px;
  background: #fff;
  padding: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #b8bbb6 #f1f0ec;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f0ec;
  border-radius: 999px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #b8bbb6;
  border-radius: 999px;
}

.admin-list-scroll,
.admin-list-scroll .grid-view,
.coupon-index .table-responsive {
  max-width: 100%;
  min-width: 0;
  width: 100%;
  overflow-x: auto !important;
}

.admin-list-scroll .table,
.coupon-index .table-responsive .table {
  overflow: visible;
  margin-bottom: 0;
}

.coupon-index .coupon-list-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 0 !important;
  outline: none;
  box-shadow: none;
  background: transparent;
  padding-bottom: 0;
  margin-bottom: 12px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #8f948f #eef0ec;
}

.coupon-index .coupon-list-scroll::-webkit-scrollbar {
  height: 10px;
}

.coupon-index .coupon-list-scroll::-webkit-scrollbar-track {
  background: #eef0ec;
  border-radius: 999px;
  margin: 0 8px;
}

.coupon-index .coupon-list-scroll::-webkit-scrollbar-thumb {
  background: #8f948f;
  border-radius: 999px;
  border: 2px solid #eef0ec;
}

.coupon-index .coupon-list-scroll::-webkit-scrollbar-thumb:hover {
  background: #6f756f;
}

.coupon-index .coupon-list-table,
.anniversary-offer-index .offer-list-table {
  width: 100%;
  min-width: 100%;
  max-width: none;
  border: 1px solid var(--ay-line) !important;
  border-radius: 14px;
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
  margin-bottom: 0;
  white-space: nowrap;
}

.coupon-index .coupon-list-table > thead > tr > th,
.coupon-index .coupon-list-table > tbody > tr > td,
.anniversary-offer-index .offer-list-table > thead > tr > th,
.anniversary-offer-index .offer-list-table > tbody > tr > td {
  white-space: nowrap;
  border-color: var(--ay-line) !important;
}

.anniversary-offer-index,
.anniversary-offer-index .card,
.anniversary-offer-index .card .body,
.anniversary-offer-index .admin-grid-wrap,
.anniversary-offer-index .grid-view {
  max-width: 100%;
  min-width: 0;
}

.anniversary-offer-index {
  overflow-x: hidden;
}

.anniversary-offer-index .offer-list-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden;
  border: 0 !important;
  outline: none;
  box-shadow: none;
  background: transparent;
  margin-bottom: 12px;
}

.anniversary-offer-index .offer-list-scroll .kv-grid-container,
.anniversary-offer-index .offer-list-scroll .table-responsive {
  overflow: visible !important;
  max-width: none;
  width: max-content;
  min-width: 100%;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent;
}

.pagination {
  margin: 16px 0 0;
}

.pagination > li > a,
.pagination > li > span {
  border-radius: 10px !important;
  margin: 0 3px;
  border-color: var(--ay-line);
  color: var(--ay-ink);
  min-width: 36px;
  text-align: center;
}

.pagination > .active > a,
.pagination > .active > span {
  background: var(--ay-sage);
  border-color: var(--ay-sage);
  color: #fff;
}

.pagination > li > a:hover {
  background: var(--ay-sage-soft);
  border-color: var(--ay-peach-strong);
  color: var(--ay-sage);
}

.summary {
  color: var(--ay-muted);
  font-size: 13px;
}

.grid-view .filters input.form-control {
  min-width: 0;
  width: 100%;
}

.grid-view .filters input.form-control::placeholder {
  color: var(--ay-muted);
  opacity: 1;
}

.ay-status-cell {
  white-space: nowrap;
}

.ay-status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.ay-status-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ay-status-toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #d8ddd3;
  transition: background 0.2s ease;
  flex: 0 0 auto;
}

.ay-status-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.ay-status-toggle-input:checked + .ay-status-toggle-track {
  background: var(--ay-sage);
}

.ay-status-toggle-input:checked + .ay-status-toggle-track::after {
  transform: translateX(20px);
}

.ay-status-toggle-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ay-muted);
  min-width: 64px;
}

.ay-status-toggle-input:checked ~ .ay-status-toggle-text {
  color: var(--ay-sage);
}

.ay-grid-toolbar,
.kv-grid-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  position: relative;
  z-index: 5;
  clear: both;
}

.ay-grid-toolbar::after,
.kv-grid-toolbar::after {
  content: none;
}

.ay-grid-toolbar .btn-group,
.kv-grid-toolbar .btn-group {
  position: relative;
  float: none !important;
  margin-left: 0;
}

.kv-grid-toolbar .btn-group .btn,
.kv-grid-toolbar .dropdown-toggle {
  border-radius: 10px !important;
  border-color: var(--ay-line);
  color: var(--ay-ink);
  font-weight: 600;
  min-height: 38px;
  padding: 8px 14px;
  background: #fff;
  box-shadow: none;
}

.kv-grid-toolbar .btn-group .btn:hover,
.kv-grid-toolbar .dropdown-toggle:hover,
.kv-grid-toolbar .btn-group.open .dropdown-toggle {
  background: var(--ay-sage-soft);
  border-color: var(--ay-sage);
  color: var(--ay-sage);
}

/* Legacy theme.css pulls all dropdowns up; reset inside admin grids. */
.admin-page .grid-view .dropdown-menu,
.admin-page .grid-view .kv-grid-toolbar .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  display: none;
  float: none;
  min-width: 180px;
  margin-top: 6px !important;
  padding: 6px;
  border: 1px solid var(--ay-line);
  border-radius: 12px;
  box-shadow: var(--ay-shadow-lg);
  background: #fff;
  z-index: 1060;
}

.admin-page .grid-view .btn-group.open > .dropdown-menu,
.admin-page .grid-view .btn-group.show > .dropdown-menu {
  display: block;
}

.admin-page .grid-view .dropdown-menu > li > a {
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ay-ink);
  white-space: nowrap;
}

.admin-page .grid-view .dropdown-menu > li > a:hover,
.admin-page .grid-view .dropdown-menu > li > a:focus {
  background: var(--ay-sage-soft);
  color: var(--ay-sage);
}

.admin-grid-wrap,
.admin-grid-wrap .grid-view {
  overflow: visible;
}

.admin-grid-wrap .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.admin-page .grid-view .action-column {
  white-space: nowrap !important;
  width: 1%;
  min-width: 180px;
  text-align: center;
}

.admin-page .grid-view .action-column a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 1px;
  padding: 0;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: var(--ay-sage, #4a6b4f);
  text-decoration: none !important;
  vertical-align: middle;
  line-height: 1;
  box-shadow: none !important;
  outline: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.admin-page .grid-view .action-column a:hover,
.admin-page .grid-view .action-column a:focus {
  background: var(--ay-sage-soft, #f0f4ef);
  color: var(--ay-sage, #4a6b4f);
  text-decoration: none !important;
  outline: none;
  box-shadow: none !important;
}

.admin-page .grid-view .action-column a.action-join {
  color: #2f8f4e;
}

.admin-page .grid-view .action-column .material-icons,
.admin-page .grid-view .action-column .material-icons-outlined {
  font-size: 20px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  display: block;
  font-weight: normal;
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
