/*
 * ============================================================
 *  WIX DESIGN SYSTEM — App-wide (Wix-inspired)
 *  All custom classes are prefixed with "WIX-" to prevent
 *  conflicts with Bootstrap, Tailwind, or legacy styles.
 *
 *  Usage: wrap a section in .WIX-root, then apply WIX classes.
 *  Example:
 *    <div class="WIX-root">
 *      <h1 class="WIX-text-h1">Title</h1>
 *      <button class="WIX-btn WIX-btn--primary">Save</button>
 *    </div>
 * ============================================================
 */

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

/* ──────────────────────────────────────────────────────────── */
/*  DESIGN TOKENS                                                */
/* ──────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --wix-color-black:        #000000;
  --wix-color-black-soft:   #111111;
  --wix-color-gray-900:     #212121;
  --wix-color-gray-800:     #333333;
  --wix-color-gray-700:     #4a4a4a;
  --wix-color-gray-600:     #666666;
  --wix-color-gray-500:     #888888;
  --wix-color-gray-400:     #aaaaaa;
  --wix-color-gray-300:     #cccccc;
  --wix-color-gray-200:     #e0e0e0;
  --wix-color-gray-100:     #f4f4f4;
  --wix-color-gray-50:      #fafafa;
  --wix-color-white:        #ffffff;

  --wix-color-blue-700:     #1a56db;
  --wix-color-blue-600:     #1d4ed8;
  --wix-color-blue-500:     #2563eb;
  --wix-color-blue-400:     #3b82f6;
  --wix-color-blue-300:     #93c5fd;
  --wix-color-blue-100:     #dbeafe;
  --wix-color-blue-50:      #eff6ff;

  --wix-color-primary:        var(--wix-color-blue-500);
  --wix-color-primary-hover:  var(--wix-color-blue-600);
  --wix-color-primary-dark:   var(--wix-color-blue-700);
  --wix-color-primary-light:  var(--wix-color-blue-100);
  --wix-color-success:        #16a34a;
  --wix-color-warning:        #d97706;
  --wix-color-danger:         #dc2626;
  --wix-color-info:           #0891b2;


  /* Typography */
  --wix-font-family:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wix-font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --wix-text-display:  3rem;
  --wix-text-h1:       2.25rem;
  --wix-text-h2:       1.75rem;
  --wix-text-h3:       1.375rem;
  --wix-text-h4:       1.125rem;
  --wix-text-body-lg:  1rem;
  --wix-text-body:     0.875rem;
  --wix-text-sm:       0.8125rem;
  --wix-text-xs:       0.75rem;

  --wix-leading-tight:   1.2;
  --wix-leading-snug:    1.4;
  --wix-leading-normal:  1.6;

  --wix-font-light:      300;
  --wix-font-normal:     400;
  --wix-font-medium:     500;
  --wix-font-semibold:   600;
  --wix-font-bold:       700;

  /* Spacing (8px base) */
  --wix-space-1:   0.25rem;
  --wix-space-2:   0.5rem;
  --wix-space-3:   0.75rem;
  --wix-space-4:   1rem;
  --wix-space-5:   1.25rem;
  --wix-space-6:   1.5rem;
  --wix-space-8:   2rem;
  --wix-space-10:  2.5rem;
  --wix-space-12:  3rem;
  --wix-space-16:  4rem;

  /* Borders & radius */
  --wix-radius-sm:   4px;
  --wix-radius:      8px;
  --wix-radius-md:   10px;
  --wix-radius-lg:   14px;
  --wix-radius-xl:   20px;
  --wix-radius-full: 9999px;

  --wix-border-color: var(--wix-color-gray-200);
  --wix-border-focus: var(--wix-color-primary);

  /* Shadows */
  --wix-shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08);
  --wix-shadow:     0 2px 8px rgba(0, 0, 0, 0.10);
  --wix-shadow-md:  0 4px 16px rgba(0, 0, 0, 0.12);
  --wix-shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.14);
  --wix-shadow-xl:  0 16px 48px rgba(0, 0, 0, 0.18);

  /* Motion */
  --wix-transition-fast: 150ms ease;
  --wix-transition:      250ms ease;
  --wix-transition-slow: 350ms ease;

  /* Z-index */
  --wix-z-dropdown: 1000;
  --wix-z-overlay:  1020;
  --wix-z-modal:    1050;
  --wix-z-toast:    1100;
}


/* ──────────────────────────────────────────────────────────── */
/*  ROOT SCOPE                                                   */
/* ──────────────────────────────────────────────────────────── */
.WIX-root,
.WIX-root * {
  box-sizing: border-box;
}

.WIX-root {
  font-family: var(--wix-font-family);
  font-size: var(--wix-text-body);
  line-height: var(--wix-leading-normal);
  color: var(--wix-color-gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.WIX-root a {
  color: var(--wix-color-primary);
  text-decoration: none;
  transition: color var(--wix-transition-fast);
}

.WIX-root a:hover {
  color: var(--wix-color-primary-hover);
}


/* ──────────────────────────────────────────────────────────── */
/*  TYPOGRAPHY                                                   */
/* ──────────────────────────────────────────────────────────── */
.WIX-text-display {
  font-size: var(--wix-text-display);
  font-weight: var(--wix-font-bold);
  line-height: var(--wix-leading-tight);
  letter-spacing: -0.02em;
  margin: 0;
}

.WIX-text-h1 {
  font-size: var(--wix-text-h1);
  font-weight: var(--wix-font-bold);
  line-height: var(--wix-leading-tight);
  letter-spacing: -0.01em;
  margin: 0;
}

.WIX-text-h2 {
  font-size: var(--wix-text-h2);
  font-weight: var(--wix-font-semibold);
  line-height: var(--wix-leading-snug);
  margin: 0;
}

.WIX-text-h3 {
  font-size: var(--wix-text-h3);
  font-weight: var(--wix-font-semibold);
  line-height: var(--wix-leading-snug);
  margin: 0;
}

.WIX-text-h4 {
  font-size: var(--wix-text-h4);
  font-weight: var(--wix-font-medium);
  line-height: var(--wix-leading-snug);
  margin: 0;
}

.WIX-text-body-lg { font-size: var(--wix-text-body-lg); line-height: var(--wix-leading-normal); }
.WIX-text-body    { font-size: var(--wix-text-body);    line-height: var(--wix-leading-normal); }
.WIX-text-sm      { font-size: var(--wix-text-sm);      line-height: var(--wix-leading-normal); }
.WIX-text-xs      { font-size: var(--wix-text-xs);      line-height: var(--wix-leading-snug); }

.WIX-text-muted    { color: var(--wix-color-gray-500); }
.WIX-text-light    { color: var(--wix-color-gray-400); }
.WIX-text-primary  { color: var(--wix-color-primary); }
.WIX-text-success  { color: var(--wix-color-success); }
.WIX-text-warning  { color: var(--wix-color-warning); }
.WIX-text-danger   { color: var(--wix-color-danger); }
.WIX-text-white    { color: var(--wix-color-white); }

.WIX-text-center { text-align: center; }
.WIX-text-right  { text-align: right; }
.WIX-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ──────────────────────────────────────────────────────────── */
/*  LAYOUT & PAGE SHELL                                          */
/* ──────────────────────────────────────────────────────────── */
.WIX-page {
  min-height: 100%;
  background-color: var(--wix-color-gray-50);
}

.WIX-container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--wix-space-8);
  padding-right: var(--wix-space-8);
}

.WIX-main {
  padding-top: var(--wix-space-8);
  padding-bottom: var(--wix-space-8);
}

.WIX-section {
  margin-bottom: var(--wix-space-8);
}

.WIX-stack {
  display: flex;
  flex-direction: column;
  gap: var(--wix-space-4);
}

.WIX-stack--sm { gap: var(--wix-space-2); }
.WIX-stack--lg { gap: var(--wix-space-6); }

.WIX-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wix-space-3);
}

.WIX-row--between {
  justify-content: space-between;
}

.WIX-row--end {
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .WIX-container {
    padding-left: var(--wix-space-4);
    padding-right: var(--wix-space-4);
  }

  .WIX-text-display { font-size: 2.25rem; }
  .WIX-text-h1       { font-size: 1.75rem; }
  .WIX-text-h2       { font-size: 1.375rem; }
}


/* ──────────────────────────────────────────────────────────── */
/*  GRID                                                         */
/* ──────────────────────────────────────────────────────────── */
.WIX-grid {
  display: grid;
  gap: var(--wix-space-6);
}

.WIX-grid--2 { grid-template-columns: repeat(2, 1fr); }
.WIX-grid--3 { grid-template-columns: repeat(3, 1fr); }
.WIX-grid--4 { grid-template-columns: repeat(4, 1fr); }

.WIX-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.WIX-grid__full {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .WIX-grid--4,
  .WIX-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .WIX-grid--4,
  .WIX-grid--3,
  .WIX-grid--2 { grid-template-columns: 1fr; }
}


/* ──────────────────────────────────────────────────────────── */
/*  PAGE HEADER                                                  */
/* ──────────────────────────────────────────────────────────── */
.WIX-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--wix-space-4);
  margin-bottom: var(--wix-space-8);
}

.WIX-page-header__title {
  font-size: var(--wix-text-h1);
  font-weight: var(--wix-font-bold);
  color: var(--wix-color-gray-900);
  margin: 0 0 var(--wix-space-1);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.WIX-page-header__subtitle {
  font-size: var(--wix-text-body);
  color: var(--wix-color-gray-500);
  margin: 0;
}

.WIX-page-header__actions {
  display: flex;
  align-items: center;
  gap: var(--wix-space-3);
  flex-wrap: wrap;
}


/* ──────────────────────────────────────────────────────────── */
/*  BREADCRUMB                                                   */
/* ──────────────────────────────────────────────────────────── */
.WIX-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--wix-space-2);
  font-size: var(--wix-text-sm);
  color: var(--wix-color-gray-500);
  margin-bottom: var(--wix-space-6);
  flex-wrap: wrap;
}

.WIX-breadcrumb a {
  color: var(--wix-color-gray-500);
  text-decoration: none;
}

.WIX-breadcrumb a:hover {
  color: var(--wix-color-primary);
}

.WIX-breadcrumb__sep {
  color: var(--wix-color-gray-300);
}

.WIX-breadcrumb__current {
  color: var(--wix-color-gray-800);
  font-weight: var(--wix-font-medium);
}


/* ──────────────────────────────────────────────────────────── */
/*  BUTTONS                                                      */
/* ──────────────────────────────────────────────────────────── */
.WIX-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wix-space-2);
  padding: 0.5625rem var(--wix-space-5);
  border-radius: var(--wix-radius-full);
  font-family: var(--wix-font-family);
  font-size: var(--wix-text-body);
  font-weight: var(--wix-font-semibold);
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--wix-transition-fast),
              border-color var(--wix-transition-fast),
              color var(--wix-transition-fast),
              box-shadow var(--wix-transition-fast),
              transform var(--wix-transition-fast);
  white-space: nowrap;
  user-select: none;
}

.WIX-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.WIX-btn:active {
  transform: translateY(1px);
}

.WIX-btn--primary {
  background-color: var(--wix-color-primary);
  border-color: var(--wix-color-primary);
  color: var(--wix-color-white);
}

.WIX-btn--primary:hover {
  background-color: var(--wix-color-primary-hover);
  border-color: var(--wix-color-primary-hover);
  color: var(--wix-color-white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.30);
  text-decoration: none;
}

/* Anchor buttons must beat .WIX-root a link color */
.WIX-root a.WIX-btn--primary,
.WIX-root a.WIX-btn--primary:hover,
.WIX-root a.WIX-btn--primary:focus {
  color: var(--wix-color-white);
}

.WIX-btn--secondary {
  background-color: var(--wix-color-white);
  border-color: var(--wix-color-gray-300);
  color: var(--wix-color-gray-700);
}

.WIX-btn--secondary:hover {
  background-color: var(--wix-color-gray-100);
  border-color: var(--wix-color-gray-400);
  color: var(--wix-color-gray-900);
  text-decoration: none;
}

.WIX-btn--dark {
  background-color: var(--wix-color-black);
  border-color: var(--wix-color-black);
  color: var(--wix-color-white);
}

.WIX-btn--dark:hover {
  background-color: var(--wix-color-gray-800);
  border-color: var(--wix-color-gray-800);
  color: var(--wix-color-white);
  text-decoration: none;
}

.WIX-btn--ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--wix-color-primary);
}

.WIX-btn--ghost:hover {
  background-color: var(--wix-color-blue-50);
  color: var(--wix-color-primary-hover);
  text-decoration: none;
}

.WIX-btn--danger {
  background-color: var(--wix-color-danger);
  border-color: var(--wix-color-danger);
  color: var(--wix-color-white);
}

.WIX-btn--danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: var(--wix-color-white);
  text-decoration: none;
}

.WIX-btn--sm {
  padding: 0.375rem var(--wix-space-4);
  font-size: var(--wix-text-sm);
}

.WIX-btn--lg {
  padding: 0.75rem var(--wix-space-8);
  font-size: var(--wix-text-body-lg);
}

.WIX-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.WIX-btn--block {
  width: 100%;
}

.WIX-btn:disabled,
.WIX-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}


/* ──────────────────────────────────────────────────────────── */
/*  CARDS & PANELS                                               */
/* ──────────────────────────────────────────────────────────── */
.WIX-card {
  background-color: var(--wix-color-white);
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius-lg);
  box-shadow: var(--wix-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--wix-transition-fast);
}

.WIX-card--hover:hover {
  box-shadow: var(--wix-shadow-md);
}

.WIX-card--flat {
  box-shadow: none;
}

.WIX-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wix-space-3);
  padding: var(--wix-space-5) var(--wix-space-6);
  border-bottom: 1px solid var(--wix-border-color);
}

.WIX-card__title {
  font-size: var(--wix-text-h4);
  font-weight: var(--wix-font-semibold);
  color: var(--wix-color-gray-900);
  margin: 0;
}

.WIX-card__subtitle {
  font-size: var(--wix-text-sm);
  color: var(--wix-color-gray-500);
  margin: var(--wix-space-1) 0 0;
}

.WIX-card__body {
  padding: var(--wix-space-6);
  color: var(--wix-color-gray-700);
}

.WIX-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--wix-space-3);
  padding: var(--wix-space-4) var(--wix-space-6);
  border-top: 1px solid var(--wix-border-color);
  background-color: var(--wix-color-gray-50);
}

.WIX-panel {
  background-color: var(--wix-color-white);
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius-md);
  padding: var(--wix-space-5);
}


/* ──────────────────────────────────────────────────────────── */
/*  STAT CARDS                                                   */
/* ──────────────────────────────────────────────────────────── */
.WIX-stat-card {
  background-color: var(--wix-color-white);
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius-lg);
  padding: var(--wix-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--wix-space-2);
  box-shadow: var(--wix-shadow-sm);
  transition: box-shadow var(--wix-transition-fast), transform var(--wix-transition-fast);
}

.WIX-stat-card:hover {
  box-shadow: var(--wix-shadow-md);
  transform: translateY(-1px);
}

.WIX-stat-card__label {
  font-size: var(--wix-text-sm);
  font-weight: var(--wix-font-medium);
  color: var(--wix-color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.WIX-stat-card__value {
  font-size: var(--wix-text-h2);
  font-weight: var(--wix-font-bold);
  color: var(--wix-color-gray-900);
  line-height: 1.1;
}

.WIX-stat-card__sub {
  font-size: var(--wix-text-sm);
  color: var(--wix-color-gray-500);
}


/* ──────────────────────────────────────────────────────────── */
/*  KPI STRIP                                                    */
/*  Compact summary cards. One --primary (blue, the headline     */
/*  number) and at most one --dark (the total) per strip.        */
/*  <div class="WIX-kpi-grid">                                   */
/*    <div class="WIX-kpi WIX-kpi--primary">                     */
/*      <div class="WIX-kpi__head">                              */
/*        <span class="WIX-kpi__icon"><i class="fas …"></i></span>*/
/*        <span class="WIX-kpi__label">This month</span>         */
/*      </div>                                                   */
/*      <div class="WIX-kpi__value">$1.67</div>                  */
/*      <div class="WIX-kpi__hint">Estimated</div>               */
/*    </div>                                                     */
/*  </div>                                                       */
/* ──────────────────────────────────────────────────────────── */
.WIX-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--wix-space-3);
}

.WIX-kpi-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 760px) {
  .WIX-kpi-grid,
  .WIX-kpi-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.WIX-kpi {
  background: var(--wix-color-white);
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius);
  padding: 0.9rem var(--wix-space-4);
}

.WIX-kpi--primary {
  border-color: var(--wix-color-blue-300);
  background: var(--wix-color-blue-50);
  box-shadow: inset 4px 0 0 var(--wix-color-primary);
}

.WIX-kpi--dark {
  background: var(--wix-color-gray-900);
  border-color: var(--wix-color-gray-900);
  color: var(--wix-color-white);
}

.WIX-kpi__head {
  display: flex;
  align-items: center;
  gap: var(--wix-space-2);
  margin-bottom: var(--wix-space-2);
}

.WIX-kpi__icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--wix-text-xs);
  background: var(--wix-color-gray-100);
  color: var(--wix-color-gray-700);
}

.WIX-kpi--primary .WIX-kpi__icon {
  background: var(--wix-color-primary);
  color: var(--wix-color-white);
}

.WIX-kpi--dark .WIX-kpi__icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--wix-color-white);
}

.WIX-kpi__label {
  font-size: var(--wix-text-xs);
  font-weight: var(--wix-font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wix-color-gray-600);
}

.WIX-kpi--primary .WIX-kpi__label { color: var(--wix-color-blue-700); }
.WIX-kpi--dark .WIX-kpi__label    { color: var(--wix-color-gray-300); }

.WIX-kpi__value {
  font-size: 1.4rem;
  font-weight: var(--wix-font-bold);
  line-height: 1.1;
  color: var(--wix-color-black-soft);
  font-variant-numeric: tabular-nums;
}

.WIX-kpi--primary .WIX-kpi__value { color: var(--wix-color-blue-700); }
.WIX-kpi--dark .WIX-kpi__value    { color: var(--wix-color-white); }

.WIX-kpi__value--muted {
  color: var(--wix-color-gray-400);
}

.WIX-kpi__hint {
  margin-top: 0.3rem;
  font-size: var(--wix-text-xs);
  color: var(--wix-color-gray-500);
}

.WIX-kpi--dark .WIX-kpi__hint { color: var(--wix-color-gray-400); }


/* ──────────────────────────────────────────────────────────── */
/*  FORMS                                                        */
/* ──────────────────────────────────────────────────────────── */
.WIX-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--wix-space-2);
  margin-bottom: var(--wix-space-4);
}

.WIX-label {
  font-size: var(--wix-text-sm);
  font-weight: var(--wix-font-medium);
  color: var(--wix-color-gray-700);
}

.WIX-label--required::after {
  content: ' *';
  color: var(--wix-color-danger);
}

.WIX-input,
.WIX-select,
.WIX-textarea {
  width: 100%;
  padding: 0.5625rem var(--wix-space-3);
  font-family: var(--wix-font-family);
  font-size: var(--wix-text-body);
  color: var(--wix-color-gray-900);
  background-color: var(--wix-color-white);
  border: 1px solid var(--wix-color-gray-300);
  border-radius: var(--wix-radius);
  transition: border-color var(--wix-transition-fast),
              box-shadow var(--wix-transition-fast);
}

.WIX-textarea {
  min-height: 96px;
  resize: vertical;
  line-height: var(--wix-leading-normal);
}

.WIX-input::placeholder,
.WIX-textarea::placeholder {
  color: var(--wix-color-gray-400);
}

.WIX-input:hover,
.WIX-select:hover,
.WIX-textarea:hover {
  border-color: var(--wix-color-gray-400);
}

.WIX-input:focus,
.WIX-select:focus,
.WIX-textarea:focus {
  outline: none;
  border-color: var(--wix-border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.WIX-input:disabled,
.WIX-select:disabled,
.WIX-textarea:disabled {
  background-color: var(--wix-color-gray-100);
  color: var(--wix-color-gray-500);
  cursor: not-allowed;
}

.WIX-input--error,
.WIX-select--error,
.WIX-textarea--error {
  border-color: var(--wix-color-danger);
}

.WIX-input--error:focus,
.WIX-select--error:focus,
.WIX-textarea--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.WIX-help-text {
  font-size: var(--wix-text-xs);
  color: var(--wix-color-gray-500);
}

.WIX-error-text {
  font-size: var(--wix-text-xs);
  color: var(--wix-color-danger);
}

.WIX-checkbox-row,
.WIX-radio-row {
  display: flex;
  align-items: center;
  gap: var(--wix-space-2);
  font-size: var(--wix-text-body);
  color: var(--wix-color-gray-700);
  cursor: pointer;
}

.WIX-checkbox,
.WIX-radio {
  width: 16px;
  height: 16px;
  accent-color: var(--wix-color-primary);
  cursor: pointer;
}


/* ──────────────────────────────────────────────────────────── */
/*  TABLES                                                       */
/* ──────────────────────────────────────────────────────────── */
.WIX-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius-lg);
  background-color: var(--wix-color-white);
}

.WIX-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wix-text-body);
}

.WIX-table thead {
  background-color: var(--wix-color-gray-50);
}

.WIX-table th {
  padding: var(--wix-space-3) var(--wix-space-4);
  text-align: left;
  font-size: var(--wix-text-xs);
  font-weight: var(--wix-font-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wix-color-gray-600);
  border-bottom: 1px solid var(--wix-border-color);
  white-space: nowrap;
}

.WIX-table td {
  padding: var(--wix-space-3) var(--wix-space-4);
  color: var(--wix-color-gray-700);
  border-bottom: 1px solid var(--wix-color-gray-100);
  vertical-align: middle;
}

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

.WIX-table tbody tr:hover {
  background-color: var(--wix-color-blue-50);
}

.WIX-table--compact th,
.WIX-table--compact td {
  padding-top: var(--wix-space-2);
  padding-bottom: var(--wix-space-2);
}

/* Ledger: dense money/transaction lists. Black header rule,
   zebra rows, blue hover, single-line cells. */
.WIX-table--ledger {
  font-size: var(--wix-text-sm);
}

.WIX-table--ledger thead {
  background-color: var(--wix-color-white);
}

.WIX-table--ledger th {
  padding: 0.65rem 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--wix-color-gray-700);
  border-bottom: 2px solid var(--wix-color-gray-900);
}

.WIX-table--ledger td {
  padding: 0.7rem 0.6rem;
  color: var(--wix-color-gray-800);
  white-space: nowrap;
}

.WIX-table--ledger th:first-child,
.WIX-table--ledger td:first-child { padding-left: var(--wix-space-4); }

.WIX-table--ledger th:last-child,
.WIX-table--ledger td:last-child { padding-right: var(--wix-space-4); }

.WIX-table--ledger tbody tr:nth-child(even) td {
  background-color: var(--wix-color-gray-50);
}

.WIX-table--ledger tbody tr:hover td {
  background-color: var(--wix-color-blue-50);
}

/* Cell helpers (any WIX-table) */
.WIX-table .WIX-td-num    { text-align: right; font-variant-numeric: tabular-nums; }
.WIX-table .WIX-td-muted  { color: var(--wix-color-gray-500); }
.WIX-table .WIX-td-strong { font-weight: var(--wix-font-semibold); color: var(--wix-color-black-soft); }
.WIX-table .WIX-td-mono   { font-family: var(--wix-font-mono); font-size: 0.78rem; }
.WIX-table .WIX-td-accent { font-weight: var(--wix-font-bold); color: var(--wix-color-blue-700); }
.WIX-table .WIX-td-wrap   { white-space: normal; }

.WIX-table .WIX-td-empty {
  padding: var(--wix-space-10) var(--wix-space-4);
  text-align: center;
  color: var(--wix-color-gray-500);
  background-color: var(--wix-color-white);
}

.WIX-table .WIX-td-empty > i {
  display: block;
  margin-bottom: var(--wix-space-2);
  font-size: 1.6rem;
  color: var(--wix-color-gray-300);
}


/* ──────────────────────────────────────────────────────────── */
/*  DATA PANEL                                                   */
/*  Card wrapping a toolbar (title + count + filters), a table,  */
/*  and a pager. Table goes directly inside, no WIX-table-wrap   */
/*  border needed — use .WIX-data-panel__scroll instead.         */
/* ──────────────────────────────────────────────────────────── */
.WIX-data-panel {
  background: var(--wix-color-white);
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius);
  overflow: hidden;
}

.WIX-data-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--wix-space-3) var(--wix-space-4);
  padding: 0.85rem var(--wix-space-4);
  background: var(--wix-color-gray-100);
  border-bottom: 1px solid var(--wix-border-color);
}

.WIX-data-panel__title {
  display: flex;
  align-items: center;
  gap: var(--wix-space-2);
  font-size: var(--wix-text-body);
  font-weight: var(--wix-font-semibold);
  color: var(--wix-color-gray-900);
}

.WIX-data-panel__title > i {
  color: var(--wix-color-primary);
}

.WIX-data-panel__count {
  min-width: 22px;
  padding: 0.05rem 0.45rem;
  border-radius: var(--wix-radius-full);
  background: var(--wix-color-gray-900);
  color: var(--wix-color-white);
  font-size: 0.7rem;
  text-align: center;
}

.WIX-data-panel__count:empty {
  display: none;
}

.WIX-data-panel__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wix-space-3);
}

.WIX-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.WIX-filter-field__label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: var(--wix-font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wix-color-gray-600);
}

.WIX-select--sm {
  width: auto;
  min-width: 160px;
  height: 34px;
  padding: 0 2rem 0 0.7rem;
  border-radius: var(--wix-radius-sm);
  font-size: var(--wix-text-sm);
  cursor: pointer;
}

.WIX-select--sm:focus {
  box-shadow: 0 0 0 3px var(--wix-color-blue-100);
}

.WIX-data-panel__scroll {
  overflow-x: auto;
}


/* ──────────────────────────────────────────────────────────── */
/*  PAGER                                                        */
/* ──────────────────────────────────────────────────────────── */
.WIX-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wix-space-4);
  padding: var(--wix-space-3) var(--wix-space-4);
  background: var(--wix-color-gray-50);
  border-top: 1px solid var(--wix-border-color);
}

.WIX-pager__info {
  font-size: var(--wix-text-sm);
  color: var(--wix-color-gray-600);
}

.WIX-pager__btns {
  display: flex;
  gap: var(--wix-space-2);
}

.WIX-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.85rem;
  border: 1px solid var(--wix-color-gray-300);
  border-radius: var(--wix-radius-sm);
  background: var(--wix-color-white);
  font-family: var(--wix-font-family);
  font-size: var(--wix-text-sm);
  font-weight: var(--wix-font-medium);
  color: var(--wix-color-gray-900);
  cursor: pointer;
  transition: border-color var(--wix-transition-fast), color var(--wix-transition-fast);
}

.WIX-pager__btn:hover:not(:disabled) {
  border-color: var(--wix-color-primary);
  color: var(--wix-color-primary);
}

.WIX-pager__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.WIX-pager__btn > i {
  font-size: 0.65rem;
}


/* ──────────────────────────────────────────────────────────── */
/*  BADGES & TAGS                                                */
/* ──────────────────────────────────────────────────────────── */
.WIX-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--wix-radius-full);
  font-size: var(--wix-text-xs);
  font-weight: var(--wix-font-semibold);
  line-height: 1.4;
  white-space: nowrap;
}

.WIX-badge--blue   { background: var(--wix-color-blue-100);  color: var(--wix-color-blue-700); }
.WIX-badge--gray   { background: var(--wix-color-gray-200);  color: var(--wix-color-gray-700); }
.WIX-badge--green  { background: #dcfce7; color: #15803d; }
.WIX-badge--yellow { background: #fef9c3; color: #a16207; }
.WIX-badge--red    { background: #fee2e2; color: #b91c1c; }
.WIX-badge--dark   { background: var(--wix-color-gray-800); color: var(--wix-color-white); }

/* Status pill: badge with a leading dot, for row states
   (Paid / Accrued / Failed …). */
.WIX-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--wix-radius-full);
  font-size: 0.72rem;
  font-weight: var(--wix-font-semibold);
  white-space: nowrap;
}

.WIX-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.WIX-pill--success { background: #dcfce7; color: #15803d; }
.WIX-pill--info    { background: var(--wix-color-blue-100); color: var(--wix-color-blue-700); }
.WIX-pill--warning { background: #fef9c3; color: #a16207; }
.WIX-pill--danger  { background: #fee2e2; color: #b91c1c; }
.WIX-pill--neutral { background: var(--wix-color-gray-200); color: var(--wix-color-gray-700); }


/* ──────────────────────────────────────────────────────────── */
/*  ALERTS                                                       */
/* ──────────────────────────────────────────────────────────── */
.WIX-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--wix-space-3);
  padding: var(--wix-space-4);
  border-radius: var(--wix-radius-md);
  font-size: var(--wix-text-body);
  border: 1px solid transparent;
}

.WIX-alert--info    { background: var(--wix-color-blue-50);  border-color: var(--wix-color-blue-100); color: #1e40af; }
.WIX-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.WIX-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.WIX-alert--danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Accent bar on the left edge; combine with a color modifier. */
.WIX-alert--accent { border-left-width: 4px; }
.WIX-alert--accent.WIX-alert--info    { border-left-color: var(--wix-color-primary); }
.WIX-alert--accent.WIX-alert--success { border-left-color: var(--wix-color-success); }
.WIX-alert--accent.WIX-alert--warning { border-left-color: var(--wix-color-warning); }
.WIX-alert--accent.WIX-alert--danger  { border-left-color: var(--wix-color-danger); }

.WIX-alert__icon { margin-top: 0.15rem; }
.WIX-alert--info .WIX-alert__icon    { color: var(--wix-color-primary); }
.WIX-alert--success .WIX-alert__icon { color: var(--wix-color-success); }
.WIX-alert--warning .WIX-alert__icon { color: var(--wix-color-warning); }
.WIX-alert--danger .WIX-alert__icon  { color: var(--wix-color-danger); }


/* ──────────────────────────────────────────────────────────── */
/*  EMPTY STATE                                                  */
/* ──────────────────────────────────────────────────────────── */
.WIX-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--wix-space-16) var(--wix-space-8);
  text-align: center;
  color: var(--wix-color-gray-500);
}

.WIX-empty__icon {
  font-size: 3rem;
  color: var(--wix-color-gray-300);
  margin-bottom: var(--wix-space-4);
}

.WIX-empty__title {
  font-size: var(--wix-text-h3);
  font-weight: var(--wix-font-semibold);
  color: var(--wix-color-gray-700);
  margin: 0 0 var(--wix-space-2);
}

.WIX-empty__body {
  font-size: var(--wix-text-body);
  color: var(--wix-color-gray-500);
  margin: 0 0 var(--wix-space-6);
  max-width: 400px;
}


/* ──────────────────────────────────────────────────────────── */
/*  DIVIDER & SEPARATOR                                          */
/* ──────────────────────────────────────────────────────────── */
.WIX-divider {
  border: none;
  border-top: 1px solid var(--wix-border-color);
  margin: var(--wix-space-6) 0;
}

.WIX-divider--sm {
  margin: var(--wix-space-4) 0;
}


/* ──────────────────────────────────────────────────────────── */
/*  DROPDOWN (static markup)                                     */
/* ──────────────────────────────────────────────────────────── */
.WIX-dropdown-menu {
  min-width: 200px;
  background-color: var(--wix-color-white);
  border: 1px solid var(--wix-border-color);
  border-radius: var(--wix-radius-md);
  box-shadow: var(--wix-shadow-lg);
  padding: var(--wix-space-2) 0;
}

.WIX-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--wix-space-3);
  padding: var(--wix-space-2) var(--wix-space-4);
  color: var(--wix-color-gray-700);
  font-size: var(--wix-text-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--wix-transition-fast),
              color var(--wix-transition-fast);
}

.WIX-dropdown-item:hover {
  background-color: var(--wix-color-gray-100);
  color: var(--wix-color-gray-900);
  text-decoration: none;
}

.WIX-dropdown-item--danger:hover {
  background-color: #fef2f2;
  color: var(--wix-color-danger);
}


/* ──────────────────────────────────────────────────────────── */
/*  MODAL SHELL                                                  */
/* ──────────────────────────────────────────────────────────── */
.WIX-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--wix-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wix-space-4);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.WIX-modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--wix-color-white);
  border-radius: var(--wix-radius-lg);
  box-shadow: var(--wix-shadow-xl);
  border: 1px solid var(--wix-border-color);
}

.WIX-modal--lg { max-width: 800px; }
.WIX-modal--xl { max-width: 1024px; }

.WIX-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wix-space-3);
  padding: var(--wix-space-5) var(--wix-space-6);
  border-bottom: 1px solid var(--wix-border-color);
}

.WIX-modal__title {
  font-size: var(--wix-text-h4);
  font-weight: var(--wix-font-semibold);
  margin: 0;
}

.WIX-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--wix-radius);
  background: transparent;
  color: var(--wix-color-gray-500);
  cursor: pointer;
  transition: background-color var(--wix-transition-fast),
              color var(--wix-transition-fast);
}

.WIX-modal__close:hover {
  background-color: var(--wix-color-gray-100);
  color: var(--wix-color-gray-900);
}

.WIX-modal__subtitle {
  margin: 0.2rem 0 0;
  font-size: var(--wix-text-sm);
  color: var(--wix-color-gray-500);
}

/* Dark header: black → charcoal band with a blue icon tile.
   Use for large data/finance modals; keep form modals light. */
.WIX-modal__header--dark {
  justify-content: flex-start;
  gap: var(--wix-space-4);
  background: linear-gradient(135deg, var(--wix-color-black-soft) 0%, var(--wix-color-gray-800) 100%);
  border-bottom: none;
  color: var(--wix-color-white);
}

.WIX-modal__header--dark .WIX-modal__title    { color: var(--wix-color-white); }
.WIX-modal__header--dark .WIX-modal__subtitle { color: var(--wix-color-gray-300); }

.WIX-modal__header-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--wix-radius);
  background: var(--wix-color-primary);
  color: var(--wix-color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.WIX-modal__close--on-dark {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--wix-color-white);
}

.WIX-modal__close--on-dark:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--wix-color-white);
}

.WIX-modal__body {
  padding: var(--wix-space-6);
  overflow-y: auto;
}

.WIX-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--wix-space-3);
  padding: var(--wix-space-4) var(--wix-space-6);
  border-top: 1px solid var(--wix-border-color);
  background-color: var(--wix-color-gray-50);
}


/* ──────────────────────────────────────────────────────────── */
/*  TABS                                                         */
/* ──────────────────────────────────────────────────────────── */
.WIX-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wix-space-1);
  border-bottom: 1px solid var(--wix-border-color);
  margin-bottom: var(--wix-space-6);
}

.WIX-tab {
  padding: var(--wix-space-3) var(--wix-space-4);
  font-size: var(--wix-text-body);
  font-weight: var(--wix-font-medium);
  color: var(--wix-color-gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color var(--wix-transition-fast),
              border-color var(--wix-transition-fast);
}

.WIX-tab:hover {
  color: var(--wix-color-gray-800);
}

.WIX-tab--active {
  color: var(--wix-color-primary);
  border-bottom-color: var(--wix-color-primary);
}


/* ──────────────────────────────────────────────────────────── */
/*  LIST                                                         */
/* ──────────────────────────────────────────────────────────── */
.WIX-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.WIX-list-item {
  display: flex;
  align-items: center;
  gap: var(--wix-space-3);
  padding: var(--wix-space-3) var(--wix-space-4);
  border-bottom: 1px solid var(--wix-color-gray-100);
  color: var(--wix-color-gray-700);
  transition: background-color var(--wix-transition-fast);
}

.WIX-list-item:last-child {
  border-bottom: none;
}

.WIX-list-item:hover {
  background-color: var(--wix-color-gray-50);
}

.WIX-list-item--clickable {
  cursor: pointer;
}

.WIX-list-item--active {
  background-color: var(--wix-color-blue-50);
  color: var(--wix-color-primary);
}


/* ──────────────────────────────────────────────────────────── */
/*  SPINNER                                                      */
/* ──────────────────────────────────────────────────────────── */
.WIX-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(37, 99, 235, 0.25);
  border-top-color: var(--wix-color-primary);
  border-radius: 50%;
  animation: WIX-spin 0.7s linear infinite;
}

.WIX-spinner--sm {
  width: 14px;
  height: 14px;
}

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


/* ──────────────────────────────────────────────────────────── */
/*  UTILITIES                                                    */
/* ──────────────────────────────────────────────────────────── */
.WIX-hidden   { display: none !important; }
.WIX-sr-only  { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.WIX-bg-white { background-color: var(--wix-color-white); }
.WIX-bg-soft  { background-color: var(--wix-color-gray-50); }

.WIX-border   { border: 1px solid var(--wix-border-color); }
.WIX-rounded  { border-radius: var(--wix-radius); }
.WIX-rounded-lg { border-radius: var(--wix-radius-lg); }
.WIX-shadow   { box-shadow: var(--wix-shadow); }
.WIX-shadow-sm { box-shadow: var(--wix-shadow-sm); }

.WIX-p-0  { padding: 0; }
.WIX-p-2  { padding: var(--wix-space-2); }
.WIX-p-4  { padding: var(--wix-space-4); }
.WIX-p-6  { padding: var(--wix-space-6); }
.WIX-p-8  { padding: var(--wix-space-8); }

.WIX-m-0  { margin: 0; }
.WIX-mb-2 { margin-bottom: var(--wix-space-2); }
.WIX-mb-4 { margin-bottom: var(--wix-space-4); }
.WIX-mb-6 { margin-bottom: var(--wix-space-6); }
.WIX-mb-8 { margin-bottom: var(--wix-space-8); }

.WIX-gap-2 { gap: var(--wix-space-2); }
.WIX-gap-3 { gap: var(--wix-space-3); }
.WIX-gap-4 { gap: var(--wix-space-4); }
.WIX-gap-6 { gap: var(--wix-space-6); }

.WIX-w-full { width: 100%; }
.WIX-flex   { display: flex; }
.WIX-flex-col { flex-direction: column; }
.WIX-items-center { align-items: center; }
.WIX-justify-between { justify-content: space-between; }
.WIX-justify-end { justify-content: flex-end; }
.WIX-flex-1 { flex: 1 1 auto; }
.WIX-flex-wrap { flex-wrap: wrap; }

/* Locked Select2 (pre-selected client on create forms) */
.ch-locked-select2 {
  pointer-events: none;
  cursor: not-allowed;
}

.ch-locked-select2 .select2-selection--single {
  background-color: var(--wix-color-gray-100, #f3f4f6) !important;
  border-color: var(--wix-border-color, #e5e7eb) !important;
}

.ch-locked-select2 .select2-selection__arrow {
  display: none;
}
