@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================
   Promo Design System — promolocales.leadercore.net
   Standalone — sin main.css
   ============================================= */

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F1F5F9;
  color: #1E293B;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a:hover {
  text-decoration: none;
}

/* Variables CSS */
:root {
  --promo-primary: #034B98;
  --promo-primary-light: #0562BF;
  --promo-primary-dark: #023670;
  --promo-primary-bg: rgba(3, 75, 152, 0.08);
  --promo-amber: #D4A843;
  --promo-amber-bg: rgba(212, 168, 67, 0.10);
  --promo-slate: #1E293B;
  --promo-slate-light: #475569;
  --promo-slate-bg: rgba(30, 41, 59, 0.06);
  --promo-bg: #F1F5F9;
  --promo-white: #FFFFFF;
  --promo-danger: #DC3545;
  --promo-danger-bg: rgba(220, 53, 69, 0.08);
  --promo-border: #E2E8F0;
  --promo-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --promo-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --promo-radius: 10px;
  --promo-radius-sm: 6px;
  --promo-transition: all 0.25s ease;
}

/* =============================================
   Field Help Tooltips
   ============================================= */
.promo-field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  font-size: 12px;
  color: #94A3B8;
  cursor: help;
  position: relative;
  vertical-align: middle;
}
.promo-field-help:hover {
  color: var(--promo-primary);
}
.promo-field-help[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  transform: none;
  background: #1E293B;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  white-space: normal;
  max-width: 220px;
  width: max-content;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.promo-field-help[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 6px;
  transform: none;
  border: 5px solid transparent;
  border-top-color: #1E293B;
  z-index: 1000;
}

/* =============================================
   Page Header — Diagonal Split
   ============================================= */
.promo-page-header {
  background: var(--promo-white);
  color: var(--promo-slate);
  padding: 0;
  border-radius: var(--promo-radius);
  margin-bottom: 20px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: var(--promo-shadow-md);
  min-height: 64px;
  position: relative;
}
.promo-page-header .promo-ph-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  flex: 1;
  z-index: 1;
}
.promo-page-header h5 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--promo-slate);
  display: flex;
  align-items: center;
  gap: 10px;
}
.promo-page-header h5 i {
  font-size: 1.1rem;
  color: var(--promo-primary);
}
.promo-page-header .promo-ph-action {
  display: flex;
  align-items: center;
  padding: 18px 28px 18px 68px;
  background: linear-gradient(135deg, var(--promo-primary) 0%, var(--promo-primary-dark) 100%);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  min-width: 220px;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}
.promo-page-header .promo-ph-action:hover {
  opacity: 0.9;
  color: #fff;
  text-decoration: none;
}

/* =============================================
   Stat Cards
   ============================================= */
.promo-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.promo-stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--promo-white);
  border-radius: var(--promo-radius);
  padding: 18px 20px;
  box-shadow: var(--promo-shadow);
  border-left: 4px solid var(--promo-primary);
  transition: var(--promo-transition);
}
.promo-stat-card:hover {
  box-shadow: var(--promo-shadow-md);
  transform: translateY(-2px);
}
.promo-stat-card.amber {
  border-left-color: var(--promo-amber);
}
.promo-stat-card.slate {
  border-left-color: var(--promo-slate-light);
}
.promo-stat-card .promo-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--promo-slate-light);
  margin-bottom: 4px;
  font-weight: 600;
}
.promo-stat-card .promo-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--promo-slate);
  line-height: 1.2;
}

/* =============================================
   Buttons
   ============================================= */
.promo-btn-primary {
  background: linear-gradient(135deg, var(--promo-primary) 0%, var(--promo-primary-light) 100%);
  color: var(--promo-white) !important;
  border: none;
  padding: 10px 22px;
  border-radius: var(--promo-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--promo-transition);
  box-shadow: 0 2px 4px rgba(3, 75, 152, 0.3);
  cursor: pointer;
}
.promo-btn-primary:hover {
  background: linear-gradient(135deg, var(--promo-primary-light) 0%, var(--promo-primary) 100%);
  box-shadow: 0 4px 8px rgba(3, 75, 152, 0.35);
  transform: translateY(-1px);
  color: var(--promo-white) !important;
}
.promo-btn-primary:active {
  transform: translateY(0);
}

.promo-btn-outline {
  background: transparent;
  color: var(--promo-slate-light) !important;
  border: 1.5px solid var(--promo-border);
  padding: 10px 22px;
  border-radius: var(--promo-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--promo-transition);
  cursor: pointer;
}
.promo-btn-outline:hover {
  border-color: var(--promo-slate-light);
  background: var(--promo-slate-bg);
  color: var(--promo-slate) !important;
}

.promo-btn-danger-outline {
  background: transparent;
  color: var(--promo-danger) !important;
  border: 1.5px solid var(--promo-danger);
  padding: 10px 22px;
  border-radius: var(--promo-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--promo-transition);
  cursor: pointer;
}
.promo-btn-danger-outline:hover {
  background: var(--promo-danger-bg);
}

/* =============================================
   Table
   ============================================= */
.promo-table-wrapper {
  background: var(--promo-white);
  border-radius: var(--promo-radius);
  box-shadow: var(--promo-shadow);
  padding: 0;
  overflow: hidden;
}
.promo-table-wrapper .table {
  margin-bottom: 0;
  border-collapse: collapse;
}
.promo-table-wrapper .table thead th {
  background: var(--promo-bg);
  color: var(--promo-slate);
  font-size: 0.73rem;
  text-transform: none;
  font-weight: 700;
  border-bottom: 1px solid var(--promo-border);
  border-top: none;
  padding: 12px 18px;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}
.promo-table-wrapper .table>:not(:last-child)>:last-child>* {
  border-bottom-color: rgb(3, 75, 152);
}
/* Hide default DataTables ::before sorting icons (we use only ::after) */
.promo-table-wrapper .table thead th.sorting::before,
.promo-table-wrapper .table thead th.sorting_asc::before,
.promo-table-wrapper .table thead th.sorting_desc::before {
  display: none !important;
}
/* DataTables sorting icons */
.promo-table-wrapper .table thead th.sorting,
.promo-table-wrapper .table thead th.sorting_asc,
.promo-table-wrapper .table thead th.sorting_desc {
  padding-right: 32px;
  background-image: none !important;
  overflow: hidden;
}
.promo-table-wrapper .table thead th.sorting::after,
.promo-table-wrapper .table thead th.sorting_asc::after,
.promo-table-wrapper .table thead th.sorting_desc::after {
  position: absolute !important;
  right: 8px !important;
  top: 14px !important;
  bottom: auto !important;
  transform: none !important;
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 900 !important;
  font-size: 0.75rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 1 !important;
  z-index: 1;
}
.promo-table-wrapper .table thead th.sorting::after {
  content: '\f0dc' !important;
  color: #94A3B8;
  opacity: 0.5 !important;
}
.promo-table-wrapper .table thead th.sorting:hover::after {
  opacity: 0.8 !important;
  background: #E2E8F0;
  color: #475569;
}
.promo-table-wrapper .table thead th.sorting_asc::after {
  content: '\f0de' !important;
  color: var(--promo-primary);
  background: rgba(3, 75, 152, 0.1);
  opacity: 1 !important;
}
.promo-table-wrapper .table thead th.sorting_desc::after {
  content: '\f0dd' !important;
  color: var(--promo-primary);
  background: rgba(3, 75, 152, 0.1);
  opacity: 1 !important;
}
.promo-table-wrapper .table thead th:first-child {
  padding-left: 24px;
  width: 50px;
}
.promo-table-wrapper .table tbody td {
  padding: 0 18px;
  height: 40px;
  vertical-align: middle;
  color: var(--promo-slate);
  font-size: 0.855rem;
  border-bottom: 1px solid #f0f3f7;
  border-top: none;
  line-height: 1.3;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.promo-table-wrapper .table tbody td:first-child {
  padding-left: 24px;
  color: var(--promo-slate-light);
  font-size: 0.8rem;
  width: 50px;
  max-width: none;
  overflow: visible;
}
.promo-table-wrapper .table tbody td:last-child {
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
}
.promo-table-wrapper .table tbody tr {
  transition: background 0.15s ease;
}
.promo-table-wrapper .table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.promo-table-wrapper .table tbody tr:hover {
  background: #e8f0fa;
}
.promo-table-wrapper .table tbody tr:last-child td {
  border-bottom: none;
}

/* DataTables Responsive — Child Rows */
.promo-table-wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
.promo-table-wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
  background-color: var(--promo-primary) !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.promo-table-wrapper table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before,
.promo-table-wrapper table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control::before {
  background-color: var(--promo-danger) !important;
}
.promo-table-wrapper table.dataTable > tbody > tr.child ul.dtr-details {
  width: 100%;
}
.promo-table-wrapper table.dataTable > tbody > tr.child ul.dtr-details > li {
  padding: 6px 12px;
  border-bottom: 1px solid #f0f3f7;
}
.promo-table-wrapper table.dataTable > tbody > tr.child span.dtr-title {
  font-weight: 600;
  color: var(--promo-slate);
  min-width: 80px;
}
.promo-table-wrapper table.dataTable > tbody > tr.child span.dtr-data {
  color: var(--promo-slate-light);
}

/* =============================================
   DataTables Controls — Custom DOM Layout
   ============================================= */
.promo-table-wrapper .dataTables_wrapper {
  padding: 0;
}

/* Top toolbar */
.promo-dt-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--promo-border);
  background: var(--promo-white);
}
.promo-dt-toolbar .dataTables_filter {
  margin-left: auto;
}

/* Bottom footer */
.promo-dt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid var(--promo-border);
  background: var(--promo-white);
}
.promo-dt-footer .dataTables_paginate {
  margin-left: auto !important;
  flex-shrink: 0;
}

/* Length Selector */
.promo-table-wrapper .dataTables_length label {
  font-size: 0;
  margin: 0;
  display: flex;
  align-items: center;
}
.promo-table-wrapper .dataTables_length select {
  border: 1.5px solid var(--promo-border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.82rem;
  color: var(--promo-slate);
  background: var(--promo-white);
  outline: none;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
  min-width: 58px;
  font-family: inherit;
}
.promo-table-wrapper .dataTables_length select:focus {
  border-color: var(--promo-primary);
  box-shadow: 0 0 0 2px rgba(3, 75, 152, 0.12);
}

/* Export Buttons */
.promo-table-wrapper .dt-buttons,
.promo-dt-toolbar .dt-buttons {
  display: flex;
  gap: 0;
}
.promo-table-wrapper .dt-buttons .btn,
.promo-table-wrapper .dt-buttons .dt-button,
.promo-dt-toolbar .dt-buttons .btn,
.promo-dt-toolbar .dt-buttons .dt-button {
  background: var(--promo-white);
  color: var(--promo-slate-light);
  border: 1.5px solid var(--promo-border);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  transition: var(--promo-transition);
  line-height: 1.4;
  border-radius: 0;
  font-family: inherit;
  cursor: pointer;
}
.promo-table-wrapper .dt-buttons .btn:hover,
.promo-table-wrapper .dt-buttons .dt-button:hover,
.promo-dt-toolbar .dt-buttons .btn:hover,
.promo-dt-toolbar .dt-buttons .dt-button:hover {
  background: var(--promo-primary);
  color: var(--promo-white);
  border-color: var(--promo-primary);
}
.promo-table-wrapper .dt-buttons .btn:first-child,
.promo-table-wrapper .dt-buttons .dt-button:first-child,
.promo-dt-toolbar .dt-buttons .btn:first-child,
.promo-dt-toolbar .dt-buttons .dt-button:first-child {
  border-radius: 6px 0 0 6px;
}
.promo-table-wrapper .dt-buttons .btn:last-child,
.promo-table-wrapper .dt-buttons .dt-button:last-child,
.promo-dt-toolbar .dt-buttons .btn:last-child,
.promo-dt-toolbar .dt-buttons .dt-button:last-child {
  border-radius: 0 6px 6px 0;
}
.promo-table-wrapper .dt-buttons .btn:only-child,
.promo-table-wrapper .dt-buttons .dt-button:only-child,
.promo-dt-toolbar .dt-buttons .btn:only-child,
.promo-dt-toolbar .dt-buttons .dt-button:only-child {
  border-radius: 6px;
}
.promo-table-wrapper .dt-buttons .btn + .btn,
.promo-table-wrapper .dt-buttons .dt-button + .dt-button,
.promo-table-wrapper .dt-buttons .btn + .dt-button,
.promo-table-wrapper .dt-buttons .dt-button + .btn,
.promo-dt-toolbar .dt-buttons .btn + .btn,
.promo-dt-toolbar .dt-buttons .dt-button + .dt-button {
  border-left: none;
}

/* Search Input */
.promo-table-wrapper .dataTables_filter label {
  font-size: 0;
  margin: 0;
  display: flex;
}
.promo-table-wrapper .dataTables_filter input {
  border: 1.5px solid var(--promo-border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  transition: var(--promo-transition);
  outline: none;
  min-width: 180px;
  background: var(--promo-bg);
  font-family: inherit;
}
.promo-table-wrapper .dataTables_filter input:focus {
  border-color: var(--promo-primary);
  box-shadow: 0 0 0 2px rgba(3, 75, 152, 0.12);
  background: var(--promo-white);
}
.promo-table-wrapper .dataTables_filter input::placeholder {
  color: var(--promo-slate-light);
  opacity: 0.6;
}

/* Info Text */
.promo-table-wrapper .dataTables_info {
  font-size: 0.78rem;
  color: var(--promo-slate-light);
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

/* Pagination — Bootstrap 5 DataTables */
.promo-table-wrapper .dataTables_paginate {
  margin: 0;
  padding: 0;
}
.promo-table-wrapper .dataTables_paginate .pagination {
  margin: 0;
  gap: 4px;
  justify-content: flex-end;
}
.promo-table-wrapper .dataTables_paginate .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
  box-shadow: none;
}
.promo-table-wrapper .dataTables_paginate .page-item .page-link:hover {
  background: rgba(3, 75, 152, 0.08);
  border-color: #034B98;
  color: #034B98;
  z-index: 1;
}
.promo-table-wrapper .dataTables_paginate .page-item .page-link:focus {
  box-shadow: none;
  outline: none;
}
.promo-table-wrapper .dataTables_paginate .page-item.active .page-link {
  background: #034B98;
  border-color: #034B98;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(3, 75, 152, 0.35);
  z-index: 2;
}
.promo-table-wrapper .dataTables_paginate .page-item.active .page-link:hover {
  background: #023670;
  border-color: #023670;
  color: #fff;
}
.promo-table-wrapper .dataTables_paginate .page-item.disabled .page-link {
  opacity: 0.35;
  cursor: default;
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #94A3B8;
}
.promo-table-wrapper .dataTables_paginate .page-item.previous .page-link,
.promo-table-wrapper .dataTables_paginate .page-item.next .page-link {
  width: auto;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 0.8rem;
  font-weight: 600;
}
.promo-table-wrapper .dataTables_paginate .page-item.previous .page-link:hover,
.promo-table-wrapper .dataTables_paginate .page-item.next .page-link:hover {
  background: rgba(3, 75, 152, 0.08);
  color: #034B98;
  border: none;
}

/* Scrollbar visible & drag-to-scroll */
.promo-table-wrapper .table-responsive,
.promo-table-wrapper .dataTables_scrollBody {
  cursor: grab;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.promo-table-wrapper .table-responsive.grabbing,
.promo-table-wrapper .dataTables_scrollBody.grabbing {
  cursor: grabbing;
  user-select: none;
}
.promo-table-wrapper .table-responsive::-webkit-scrollbar,
.promo-table-wrapper .dataTables_scrollBody::-webkit-scrollbar {
  height: 8px;
}
.promo-table-wrapper .table-responsive::-webkit-scrollbar-track,
.promo-table-wrapper .dataTables_scrollBody::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}
.promo-table-wrapper .table-responsive::-webkit-scrollbar-thumb,
.promo-table-wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
  transition: background 0.2s;
}
.promo-table-wrapper .table-responsive::-webkit-scrollbar-thumb:hover,
.promo-table-wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
  background: #034B98;
}
/* Firefox */
.promo-table-wrapper .table-responsive,
.promo-table-wrapper .dataTables_scrollBody {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

/* =============================================
   Action Icons
   ============================================= */
.promo-action-icons {
  display: flex;
  gap: 2px;
  align-items: center;
}
.promo-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--promo-slate-light);
  transition: var(--promo-transition);
  text-decoration: none !important;
  font-size: 0.85rem;
}
.promo-action-icon:hover {
  background: var(--promo-primary-bg);
  color: var(--promo-primary);
}
.promo-action-icon.danger:hover {
  background: var(--promo-danger-bg);
  color: var(--promo-danger);
}

/* =============================================
   Modal
   ============================================= */
.promo-modal-header {
  background: linear-gradient(135deg, var(--promo-primary) 0%, var(--promo-primary-dark) 100%);
  color: var(--promo-white);
  border-radius: var(--promo-radius) var(--promo-radius) 0 0;
  padding: 18px 24px;
}
.promo-modal-header .modal-title {
  color: var(--promo-white);
  font-weight: 600;
  font-size: 1rem;
}
.promo-modal-header .close,
.promo-modal-header .btn-close {
  color: var(--promo-white);
  opacity: 0.8;
  filter: brightness(0) invert(1);
}
.modal-content {
  border: none;
  border-radius: var(--promo-radius);
  overflow: hidden;
}
.modal-footer {
  border-top: 1px solid var(--promo-border);
}

/* =============================================
   Form Card
   ============================================= */
.promo-form-card {
  border: none;
  border-radius: var(--promo-radius);
  box-shadow: var(--promo-shadow);
  overflow: visible;
}
.promo-form-card .card-body {
  padding: 24px;
}

/* Labels */
.promo-form-card label {
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: 0.2px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 6px;
  display: block;
}

/* Inputs & Selects */
.promo-form-card .form-control,
.promo-form-card select.form-control {
  border: 1.5px solid var(--promo-border);
  border-radius: var(--promo-radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--promo-slate);
  background: #FAFBFC;
  transition: var(--promo-transition);
  font-family: inherit;
  height: auto;
}
.promo-form-card .form-control:focus {
  border-color: var(--promo-primary);
  box-shadow: 0 0 0 3px rgba(3, 75, 152, 0.12);
  background: #fff;
  color: #1E293B;
}
.promo-form-card .form-control::placeholder {
  color: #94A3B8;
}

/* Textarea */
.promo-form-card textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Fieldset */
.promo-form-card fieldset {
  border: none;
  padding: 0;
  margin: 20px 0 8px;
}
.promo-form-card fieldset legend {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--promo-primary);
  text-transform: none;
  letter-spacing: 0.3px;
  padding: 0;
  margin-bottom: 12px;
  width: auto;
  float: none;
  border-bottom: none;
}

/* Separator */
.promo-form-card ~ hr,
.promo-form-card + hr {
  border: none;
  border-top: 1px solid var(--promo-border);
  margin: 24px 0 20px;
}

/* Form action buttons row */
.promo-form-card ~ .row,
.promo-form-card + hr + .row {
  gap: 12px;
}

/* Select2 Bootstrap 5 overrides */
.select2-container--bootstrap-5 .select2-selection {
  border: 1.5px solid var(--promo-border) !important;
  border-radius: var(--promo-radius-sm) !important;
  padding: 6px 10px !important;
  min-height: 42px !important;
  font-size: 0.88rem !important;
  background: #FAFBFC !important;
  transition: var(--promo-transition);
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--promo-primary) !important;
  box-shadow: 0 0 0 3px rgba(3, 75, 152, 0.12) !important;
  background: #fff !important;
}
.select2-container--bootstrap-5 .select2-dropdown {
  border: 1.5px solid var(--promo-border);
  border-radius: var(--promo-radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background-color: rgba(3, 75, 152, 0.1) !important;
  color: var(--promo-primary) !important;
}
.select2-container--bootstrap-5 .select2-results__option--selected {
  background-color: var(--promo-primary) !important;
  color: #fff !important;
}

/* Validation feedback */
.promo-form-card .was-validated .form-control:invalid,
.promo-form-card .form-control.is-invalid {
  border-color: var(--promo-danger);
}
.promo-form-card .was-validated .form-control:invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.promo-form-card .invalid-feedback {
  font-size: 0.75rem;
  color: var(--promo-danger);
  margin-top: 4px;
}

/* =============================================
   Empty State
   ============================================= */
.promo-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--promo-white);
  border-radius: var(--promo-radius);
  box-shadow: var(--promo-shadow);
}
.promo-empty-state i {
  font-size: 3rem;
  color: #CBD5E1;
  margin-bottom: 16px;
  display: block;
}
.promo-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--promo-slate);
  margin-bottom: 8px;
}
.promo-empty-state p {
  font-size: 0.88rem;
  color: var(--promo-slate-light);
  margin-bottom: 20px;
}

/* =============================================
   Badge
   ============================================= */
.promo-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
}
.promo-badge.blue {
  background: var(--promo-primary-bg);
  color: var(--promo-primary);
}
.promo-badge.amber {
  background: var(--promo-amber-bg);
  color: #9A7B30;
}

/* =============================================
   Mobile Cards
   ============================================= */
.promo-mobile-list {
  display: none;
}
.promo-mobile-card {
  background: var(--promo-white);
  border-radius: var(--promo-radius);
  box-shadow: var(--promo-shadow);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--promo-primary);
  transition: var(--promo-transition);
}
.promo-mobile-card:active {
  box-shadow: var(--promo-shadow-md);
}
.promo-mobile-card .promo-mc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.promo-mobile-card .promo-mc-title {
  font-weight: 600;
  color: var(--promo-slate);
  font-size: 0.95rem;
}
.promo-mobile-card .promo-mc-subtitle {
  font-size: 0.8rem;
  color: var(--promo-slate-light);
  margin-top: 2px;
}
.promo-mobile-card .promo-mc-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.promo-mobile-card .promo-mc-actions {
  display: flex;
  gap: 6px;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  /* Constrain parent containers so DataTables Responsive can detect overflow */
  .content-w,
  .content-i,
  .content-box {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .promo-page-header {
    flex-direction: column;
  }
  .promo-page-header .promo-ph-title {
    padding: 16px 20px;
  }
  .promo-page-header .promo-ph-action {
    clip-path: none;
    min-width: auto;
    width: 100%;
    padding: 14px 20px;
    justify-content: center;
  }

  /* Stat cards */
  .promo-stats-row {
    flex-direction: column;
    gap: 10px;
  }
  .promo-stat-card {
    min-width: auto;
  }

  /* Desktop/Mobile list toggle */
  .promo-desktop-table {
    display: none !important;
  }
  .promo-mobile-list {
    display: block;
  }

  /* Table wrapper — let DataTables Responsive handle column collapsing */
  .promo-table-wrapper {
    overflow: hidden;
  }
  .promo-table-wrapper .table tbody td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  .promo-table-wrapper .table thead th {
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  /* Hide per-column search inputs on mobile */
  .promo-table-wrapper .table thead th input[type="text"],
  .promo-table-wrapper .table thead th label {
    display: none;
  }

  /* DataTables toolbar — stack vertically */
  .promo-dt-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .promo-dt-toolbar .dataTables_length {
    order: 1;
  }
  .promo-dt-toolbar .dataTables_filter {
    margin-left: 0;
    order: 2;
  }
  .promo-dt-toolbar .dataTables_filter input {
    width: 100%;
    min-width: auto;
  }
  .promo-dt-toolbar .dt-buttons {
    order: 3;
    flex-wrap: wrap;
    gap: 0;
  }
  .promo-dt-toolbar .dt-buttons .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.7rem;
    padding: 6px 8px;
  }

  /* DataTables footer — stack vertically */
  .promo-dt-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px;
  }
  .promo-dt-footer .dataTables_info {
    text-align: center;
    font-size: 0.75rem;
  }
  .promo-dt-footer .dataTables_paginate {
    margin-left: 0 !important;
    display: flex;
    justify-content: center;
  }
  .promo-dt-footer .dataTables_paginate .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
  .promo-dt-footer .dataTables_paginate .page-item .page-link {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  /* Select2 full width */
  .promo-select-wrapper .select2-container,
  .promo-select-wrapper .form-control {
    width: 100% !important;
  }

  /* Primary button */
  .promo-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .promo-dt-toolbar .dt-buttons .btn {
    font-size: 0.65rem;
    padding: 5px 6px;
  }
  .promo-dt-footer .dataTables_paginate .page-item .page-link {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }
}

/* =============================================
   Toast Notifications
   ============================================= */
.promo-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 48px);
}
.promo-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--promo-radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  pointer-events: all;
  animation: promoToastIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Inter', sans-serif;
  border-left: 4px solid transparent;
  opacity: 0;
  transform: translateX(40px);
}
.promo-toast.hiding {
  animation: promoToastOut 0.3s ease forwards;
}
.promo-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.promo-toast-body {
  flex: 1;
  min-width: 0;
}
.promo-toast-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 2px;
  line-height: 1.3;
}
.promo-toast-message {
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.85;
  word-break: break-word;
}
.promo-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-size: 1rem;
  opacity: 0.4;
  transition: opacity 0.2s;
  flex-shrink: 0;
  margin-top: -2px;
}
.promo-toast-close:hover {
  opacity: 1;
}
.promo-toast-progress {
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 0;
  height: 3px;
  border-radius: 0 0 var(--promo-radius) var(--promo-radius);
  transform-origin: left;
}

/* Toast variants */
.promo-toast.success {
  background: rgba(240, 253, 244, 0.95);
  border-left-color: #16a34a;
  color: #14532d;
}
.promo-toast.success .promo-toast-icon { background: rgba(22,163,74,0.12); color: #16a34a; }
.promo-toast.success .promo-toast-progress { background: #16a34a; }

.promo-toast.error {
  background: rgba(254, 242, 242, 0.95);
  border-left-color: var(--promo-danger);
  color: #7f1d1d;
}
.promo-toast.error .promo-toast-icon { background: rgba(220,53,69,0.12); color: var(--promo-danger); }
.promo-toast.error .promo-toast-progress { background: var(--promo-danger); }

.promo-toast.warning {
  background: rgba(255, 251, 235, 0.95);
  border-left-color: #d97706;
  color: #78350f;
}
.promo-toast.warning .promo-toast-icon { background: rgba(217,119,6,0.12); color: #d97706; }
.promo-toast.warning .promo-toast-progress { background: #d97706; }

.promo-toast.info {
  background: rgba(239, 246, 255, 0.95);
  border-left-color: var(--promo-primary);
  color: var(--promo-primary-dark);
}
.promo-toast.info .promo-toast-icon { background: var(--promo-primary-bg); color: var(--promo-primary); }
.promo-toast.info .promo-toast-progress { background: var(--promo-primary); }

@keyframes promoToastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes promoToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px) scale(0.95); }
}
@keyframes promoProgressShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* =============================================
   Confirm Modal
   ============================================= */
.promo-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: promoFadeIn 0.2s ease;
}
.promo-confirm-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.08);
  max-width: 420px;
  width: calc(100% - 40px);
  overflow: hidden;
  animation: promoScaleIn 0.25s cubic-bezier(0.21, 1.02, 0.73, 1);
  font-family: 'Inter', sans-serif;
}
.promo-confirm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 0;
}
.promo-confirm-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 1.05rem;
}
.promo-confirm-header-icon.send { background: rgba(3,75,152,0.1); color: var(--promo-primary); }
.promo-confirm-header-icon.danger { background: rgba(220,53,69,0.1); color: var(--promo-danger); }
.promo-confirm-header-icon.warning { background: rgba(217,119,6,0.1); color: #d97706; }
.promo-confirm-header-icon.info { background: rgba(3,75,152,0.1); color: var(--promo-primary); }
.promo-confirm-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--promo-slate);
  line-height: 1.3;
}
.promo-confirm-body {
  padding: 14px 24px 0;
  font-size: 0.88rem;
  color: var(--promo-slate-light);
  line-height: 1.55;
}
.promo-confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px;
}
.promo-confirm-footer .promo-cbtn {
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.promo-cbtn-cancel {
  background: #F1F5F9;
  color: var(--promo-slate-light);
}
.promo-cbtn-cancel:hover {
  background: #E2E8F0;
  color: var(--promo-slate);
}
.promo-cbtn-confirm {
  color: #fff;
}
.promo-cbtn-confirm.primary { background: var(--promo-primary); }
.promo-cbtn-confirm.primary:hover { background: var(--promo-primary-dark); }
.promo-cbtn-confirm.danger { background: var(--promo-danger); }
.promo-cbtn-confirm.danger:hover { background: #b91c1c; }

.promo-confirm-overlay.hiding {
  animation: promoFadeOut 0.2s ease forwards;
}
.promo-confirm-overlay.hiding .promo-confirm-box {
  animation: promoScaleOut 0.2s ease forwards;
}

@keyframes promoFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes promoFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes promoScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes promoScaleOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.92); }
}

@media (max-width: 480px) {
  .promo-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}
