/* =============================================================================
   Custom Component Styles (Cleaned — Step 9 UX Pivot)
   =============================================================================
   Only styles that can't be replaced by Tailwind/Flowbite utility classes.
   Sections removed: navbar, button, form, card, box, notification, tag/badge,
   gap utilities, sr-only, transition utilities, background text contrast.
   ============================================================================= */

/* =============================================================================
   Report Section Component (payload inspector, report detail)
   ============================================================================= */
.report-section {
  padding: 0 !important;
}

.report-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .report-section__header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.report-section__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.report-section__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.report-section__icon--primary { background: rgba(79, 70, 229, 0.1);   color: #4F46E5; }
.report-section__icon--info    { background: rgba(14, 165, 233, 0.1);  color: #0EA5E9; }
.report-section__icon--warning { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }
.report-section__icon--success { background: rgba(16, 185, 129, 0.1);  color: #10B981; }
.report-section__icon--danger  { background: rgba(239, 68, 68, 0.1);   color: #EF4444; }

.report-section__heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
  line-height: 1.3;
}

.dark .report-section__heading { color: #F1F5F9; }

.report-section__count {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: 0;
}

.report-section__body {
  padding: 0.5rem 0;
}

/* Report Row */
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  transition: background-color 0.1s ease;
}

.report-row:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

.dark .report-row:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.report-row__left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.report-row__status { font-size: 0.75rem; }
.report-row__status--mapped   { color: #10B981; }
.report-row__status--unmapped { color: #F59E0B; }

.report-row__name {
  font-size: 0.9rem;
  color: #1E293B;
}

.dark .report-row__name { color: #E2E8F0; }

.report-row__amount {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1E293B;
  font-variant-numeric: tabular-nums;
}

.dark .report-row__amount { color: #E2E8F0; }

.report-row__amount--negative { color: #EF4444; }

.report-row--total {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .report-row--total { border-top-color: rgba(255, 255, 255, 0.08); }

.report-row--total .report-row__name {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #94A3B8;
}

.report-row--total .report-row__amount {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Adjustment Row */
.adjustment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  transition: background-color 0.1s ease;
}

.adjustment-row:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.dark .adjustment-row:not(:last-child) {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.adjustment-row:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

.dark .adjustment-row:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.adjustment-row__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #1E293B;
}

.dark .adjustment-row__left { color: #E2E8F0; }

.adjustment-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.adjustment-row__icon--danger  { background: rgba(239, 68, 68, 0.1);   color: #EF4444; }
.adjustment-row__icon--success { background: rgba(16, 185, 129, 0.1);  color: #10B981; }
.adjustment-row__icon--warning { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }
.adjustment-row__icon--muted   { background: rgba(148, 163, 184, 0.08); color: #94A3B8; }

.adjustment-row__value {
  font-size: 0.9rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.adjustment-row__value--danger { color: #EF4444; }

/* Sync Row */
.sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
}

.sync-row:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.dark .sync-row:not(:last-child) {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.sync-row__label {
  font-size: 0.85rem;
  color: #94A3B8;
  font-weight: 500;
}

.sync-row__value {
  font-size: 0.9rem;
  color: #1E293B;
  text-align: right;
}

.dark .sync-row__value { color: #E2E8F0; }

.sync-row__code {
  font-size: 0.8rem;
  padding: 0.15em 0.5em;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  font-family: monospace;
}

.dark .sync-row__code {
  background: rgba(255, 255, 255, 0.06);
}

/* =============================================================================
   Payload Inspector
   ============================================================================= */
.payload-inspector__header { margin-bottom: 1rem; }

.payload-inspector__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: rgba(30, 41, 59, 0.08);
  color: #1E293B;
  font-size: 0.8rem;
  margin-right: 0.6rem;
}

.dark .payload-inspector__title-icon {
  background: rgba(241, 245, 249, 0.08);
  color: #F1F5F9;
}

.payload-inspector__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.dark .payload-inspector__title { color: #F1F5F9; }

.payload-inspector__grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payload-inspector__section {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.dark .payload-inspector__section {
  border-color: rgba(255, 255, 255, 0.08);
}

.payload-inspector__section:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.payload-inspector__section[open] { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); }

.dark .payload-inspector__section:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.dark .payload-inspector__section[open] { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3); }

.payload-inspector__section[open] .payload-inspector__chevron {
  transform: rotate(180deg);
}

.payload-inspector__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.1s ease;
}

.payload-inspector__summary::-webkit-details-marker { display: none; }

.payload-inspector__summary:hover { background-color: rgba(0, 0, 0, 0.02); }
.dark .payload-inspector__summary:hover { background-color: rgba(255, 255, 255, 0.03); }

.payload-inspector__summary-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.payload-inspector__summary-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.payload-inspector__section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: rgba(14, 165, 233, 0.08);
  color: #0EA5E9;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.payload-inspector__section-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.dark .payload-inspector__section-label { color: #F1F5F9; }

.payload-inspector__section-desc {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: 0;
}

.payload-inspector__size {
  font-size: 0.75rem;
  font-weight: 500;
  color: #0EA5E9;
  background: rgba(14, 165, 233, 0.08);
  padding: 0.15em 0.55em;
  border-radius: 0.25rem;
}

.payload-inspector__chevron {
  color: #E2E8F0;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.dark .payload-inspector__chevron { color: #475569; }

.payload-inspector__content {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 1.1rem 1.1rem;
}

.dark .payload-inspector__content { border-top-color: rgba(255, 255, 255, 0.08); }

.payload-inspector__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.payload-inspector__code {
  max-height: 400px;
  overflow: auto;
  background: #1a1d23;
  color: #c9d1d9;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* =============================================================================
   Stat Card Components
   ============================================================================= */
.stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card--primary { border-left: 4px solid #4F46E5; }
.stat-card--info    { border-left: 4px solid #0EA5E9; }
.stat-card--warning { border-left: 4px solid #F59E0B; }
.stat-card--success { border-left: 4px solid #10B981; }
.stat-card--danger  { border-left: 4px solid #EF4444; }

/* Hero stat card */
.stat-card-hero {
  position: relative;
  border-left: 5px solid #0EA5E9;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.stat-card-hero__label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 0.25rem;
}

.stat-card-hero__value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: #1E293B;
}

.dark .stat-card-hero__value { color: #F1F5F9; }

.stat-card-hero__subtitle {
  font-size: 0.9rem;
  color: #94A3B8;
  margin-top: 0.35rem;
}

.stat-card-hero__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* =============================================================================
   Stats Strip
   ============================================================================= */
.stats-strip {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  padding: 0.6rem 0;
  overflow-x: auto;
}

.dark .stats-strip {
  background: #1F2937;
  border-color: rgba(255, 255, 255, 0.08);
}

.stats-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 0.25rem 0.75rem;
  min-width: 0;
}

.stats-strip__value {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: #1E293B;
}

.dark .stats-strip__value { color: #F1F5F9; }

.stats-strip__label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94A3B8;
  white-space: nowrap;
  margin-top: 0.15rem;
}

.stats-strip__divider {
  width: 1px;
  height: 2rem;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.dark .stats-strip__divider { background: rgba(255, 255, 255, 0.08); }

/* =============================================================================
   Quick Links
   ============================================================================= */
.quick-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-links__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1E293B;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s ease;
}

.dark .quick-links__item {
  color: #E2E8F0;
  background: #1F2937;
  border-color: rgba(255, 255, 255, 0.1);
}

.quick-links__item:hover {
  border-color: #4F46E5;
  color: #4F46E5;
  background: rgba(79, 70, 229, 0.03);
}

.dark .quick-links__item:hover {
  border-color: #A5B4FC;
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.08);
}

.quick-links__item--primary {
  background: #4F46E5;
  color: white;
  border-color: #4F46E5;
}

.quick-links__item--primary:hover {
  background: #4338CA;
  color: white;
  border-color: #4338CA;
}

/* =============================================================================
   Client Card Linkings
   ============================================================================= */
.client-card-linkings__row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0;
  flex-wrap: wrap;
}

.client-card-linkings__row:not(:last-child) {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
  padding-bottom: 0.35rem;
  margin-bottom: 0.1rem;
}

.dark .client-card-linkings__row:not(:last-child) {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.client-card-linkings__clover,
.client-card-linkings__qbo {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: #1E293B;
}

.dark .client-card-linkings__clover,
.dark .client-card-linkings__qbo {
  color: #E2E8F0;
}

.client-card-linkings__clover i,
.client-card-linkings__qbo i {
  font-size: 0.6rem;
  flex-shrink: 0;
}

.client-card-linkings__clover { font-weight: 600; }
.client-card-linkings__qbo   { font-weight: 500; color: #94A3B8; }
.client-card-linkings__arrow  { color: #E2E8F0; font-size: 0.45rem; flex-shrink: 0; }

.dark .client-card-linkings__arrow { color: #475569; }

/* =============================================================================
   Inline Name Edit
   ============================================================================= */
.inline-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.inline-name__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 0.3rem;
  color: #94A3B8;
  font-size: 0.7rem;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dark .inline-name__edit {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.inline-name__edit:hover {
  color: #4F46E5;
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.2);
}

.dark .inline-name__edit:hover {
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

.inline-name__form {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* =============================================================================
   Report Navigation
   ============================================================================= */
.report-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
}

.dark .report-nav { background: rgba(255, 255, 255, 0.03); }

.report-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4F46E5;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.dark .report-nav__link { color: #A5B4FC; }

.report-nav__link:hover {
  background: rgba(79, 70, 229, 0.08);
  color: #4338CA;
}

.dark .report-nav__link:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #C7D2FE;
}

.report-nav__link--disabled {
  color: #E2E8F0;
  cursor: default;
  pointer-events: none;
}

.dark .report-nav__link--disabled { color: #475569; }

.report-nav__current {
  font-size: 0.8rem;
  font-weight: 500;
  color: #94A3B8;
  letter-spacing: 0.02em;
}

/* =============================================================================
   Report Table
   ============================================================================= */
.report-table__date-link {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.35;
}

.report-table__date-link:hover .report-table__date { color: #4F46E5; }
.dark .report-table__date-link:hover .report-table__date { color: #A5B4FC; }

.report-table__date {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1E293B;
  transition: color 0.1s ease;
}

.dark .report-table__date { color: #F1F5F9; }

.report-table__day {
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 400;
}

.report-table__currency {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.report-table td,
.report-table th {
  vertical-align: middle !important;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.report-table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94A3B8;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.dark .report-table thead th { border-bottom-color: rgba(255, 255, 255, 0.08); }

.report-table tbody tr { transition: background-color 0.1s ease; }

.report-table tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.02) !important;
}

.dark .report-table tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.06) !important;
}

/* =============================================================================
   Mapping Table
   ============================================================================= */
.mapping-table {
  border-collapse: separate;
  border-spacing: 0;
}

.mapping-table thead th {
  background-color: #F8FAFC;
  border-bottom: 2px solid #E2E8F0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94A3B8;
}

.dark .mapping-table thead th {
  background-color: #1F2937;
  border-bottom-color: #374151;
}

.mapping-table tbody tr { transition: background-color 0.15s ease; }

.mapping-table tbody tr:nth-child(even) { background-color: #F8FAFC; }
.dark .mapping-table tbody tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.02); }

.mapping-table tbody tr:hover { background-color: rgba(14, 165, 233, 0.04); }
.dark .mapping-table tbody tr:hover { background-color: rgba(14, 165, 233, 0.08); }

.mapping-table .source-cell { border-left: 3px solid #4F46E5; }
.mapping-table .destination-cell { background-color: rgba(16, 185, 129, 0.04); }

.mapping-table .destination-text {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.65em;
  background-color: rgba(16, 185, 129, 0.08);
  border-radius: 4px;
  font-weight: 500;
}

.mapping-table .mapping-arrow {
  color: #10B981;
  font-size: 1.25rem;
  opacity: 0.7;
}

.mapping-table .mapping-table__external-id {
  font-size: 0.7rem;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  background-color: #F1F5F9;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.dark .mapping-table .mapping-table__external-id {
  background-color: #374151;
}

.mapping-table__col-source      { width: 40%; }
.mapping-table__col-arrow       { width: 5%; text-align: center; }
.mapping-table__col-destination { width: 40%; }
.mapping-table__col-status      { width: 15%; text-align: center; }
.mapping-table__col-type        { width: 12%; text-align: center; }

/* =============================================================================
   Report Generation Banner
   ============================================================================= */
.report-generation-banner { border-left: 4px solid #4F46E5; }

.report-generation-banner .progress {
  height: 6px;
  border-radius: 3px;
  margin-bottom: 0;
}

.report-row-new {
  animation: reportRowFlash 1.5s ease-out;
}

@keyframes reportRowFlash {
  0%   { background-color: rgba(16, 185, 129, 0.25); }
  100% { background-color: transparent; }
}

/* =============================================================================
   Row Indicator (status color bar)
   ============================================================================= */
.row-indicator     { padding: 0 !important; width: 8px; }
.row-indicator--danger  { background-color: #EF4444; }
.row-indicator--warning { background-color: #F59E0B; }
.row-indicator--success { background-color: #10B981; }
.row-indicator--muted   { background-color: #E2E8F0; }
.dark .row-indicator--muted { background-color: #374151; }
.th-indicator { width: 8px; padding: 0; }

/* =============================================================================
   Kaminari Pagination
   ============================================================================= */
nav.pagination[role="navigation"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

nav.pagination[role="navigation"] span.page,
nav.pagination[role="navigation"] span.first,
nav.pagination[role="navigation"] span.prev,
nav.pagination[role="navigation"] span.next,
nav.pagination[role="navigation"] span.last,
nav.pagination[role="navigation"] span.gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

nav.pagination[role="navigation"] span.page a,
nav.pagination[role="navigation"] span.first a,
nav.pagination[role="navigation"] span.prev a,
nav.pagination[role="navigation"] span.next a,
nav.pagination[role="navigation"] span.last a,
nav.pagination[role="navigation"] span.gap a,
nav.pagination[role="navigation"] span.page.current,
nav.pagination[role="navigation"] span.first.current,
nav.pagination[role="navigation"] span.prev.current,
nav.pagination[role="navigation"] span.next.current,
nav.pagination[role="navigation"] span.last.current,
nav.pagination[role="navigation"] span.gap.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

nav.pagination[role="navigation"] span.page a,
nav.pagination[role="navigation"] span.first a,
nav.pagination[role="navigation"] span.prev a,
nav.pagination[role="navigation"] span.next a,
nav.pagination[role="navigation"] span.last a,
nav.pagination[role="navigation"] span.gap a {
  color: #94A3B8;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
}

.dark nav.pagination[role="navigation"] span.page a,
.dark nav.pagination[role="navigation"] span.first a,
.dark nav.pagination[role="navigation"] span.prev a,
.dark nav.pagination[role="navigation"] span.next a,
.dark nav.pagination[role="navigation"] span.last a,
.dark nav.pagination[role="navigation"] span.gap a {
  color: #94A3B8;
  border-color: rgba(255, 255, 255, 0.1);
  background: #1F2937;
}

nav.pagination[role="navigation"] span.page a:hover,
nav.pagination[role="navigation"] span.first a:hover,
nav.pagination[role="navigation"] span.prev a:hover,
nav.pagination[role="navigation"] span.next a:hover,
nav.pagination[role="navigation"] span.last a:hover,
nav.pagination[role="navigation"] span.gap a:hover {
  color: #4F46E5;
  border-color: #4F46E5;
  background: rgba(79, 70, 229, 0.04);
}

.dark nav.pagination[role="navigation"] span.page a:hover,
.dark nav.pagination[role="navigation"] span.first a:hover,
.dark nav.pagination[role="navigation"] span.prev a:hover,
.dark nav.pagination[role="navigation"] span.next a:hover,
.dark nav.pagination[role="navigation"] span.last a:hover,
.dark nav.pagination[role="navigation"] span.gap a:hover {
  color: #A5B4FC;
  border-color: #A5B4FC;
  background: rgba(99, 102, 241, 0.08);
}

nav.pagination[role="navigation"] span.current {
  color: white;
  background: #4F46E5;
  border: 1px solid #4F46E5;
  font-weight: 600;
}

nav.pagination[role="navigation"] span.gap {
  color: #E2E8F0;
  min-width: 2rem;
  text-align: center;
}

.dark nav.pagination[role="navigation"] span.gap { color: #475569; }

nav.pagination[role="navigation"] span.prev a,
nav.pagination[role="navigation"] span.next a,
nav.pagination[role="navigation"] span.first a,
nav.pagination[role="navigation"] span.last a {
  font-size: 0.8rem;
  color: #94A3B8;
}

/* =============================================================================
   Billing Settings Components
   ============================================================================= */
.billing-settings {
  max-width: 960px;
  margin: 0 auto;
}

.billing-usage-meter .progress {
  height: 0.6rem;
  border-radius: 4px;
}

.billing-plan-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(30, 41, 59, 0.08);
  border: 2px solid #E2E8F0;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dark .billing-plan-card {
  background: #1F2937;
  border-color: #374151;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.billing-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 41, 59, 0.1);
}

.billing-plan-card--featured {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  border-color: #4F46E5;
}

.billing-plan-card--featured .billing-plan-card__features li {
  color: rgba(255, 255, 255, 0.9);
}

.billing-plan-card--current { border-color: #10B981; }

.billing-plan-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.billing-plan-card__header { text-align: center; margin-bottom: 1rem; }
.billing-plan-card__price  { text-align: center; margin-bottom: 1.5rem; }

.billing-plan-card__amount {
  font-size: 3rem;
  font-weight: 700;
  color: #1E293B;
}

.dark .billing-plan-card__amount { color: #F1F5F9; }

.billing-plan-card--featured .billing-plan-card__amount { color: white; }
.billing-plan-card--featured .billing-plan-card__period { color: rgba(255, 255, 255, 0.7); }

.billing-plan-card__period { font-size: 1rem; color: #64748B; }

.billing-plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.billing-plan-card__features li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dark .billing-plan-card__features li { border-bottom-color: #374151; }

.billing-plan-card__features li:last-child { border-bottom: none; }
.billing-plan-card__features li i { font-size: 0.875rem; }
.billing-plan-card__action { margin-top: auto; }

/* =============================================================================
   Sync History Timeline
   ============================================================================= */
.sync-history__timeline { margin-top: 0.5rem; }
.sync-history__group + .sync-history__group { margin-top: 0.75rem; }

.sync-history__children {
  border-left: 3px solid #E2E8F0;
}

.dark .sync-history__children { border-left-color: #374151; }

/* =============================================================================
   Empty State
   ============================================================================= */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state__icon { font-size: 4rem; }

.empty-state__waiting {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* =============================================================================
   Metric Label Hint
   ============================================================================= */
.metric-label-hint {
  border-bottom: 1.5px dotted #E2E8F0;
  cursor: help;
  padding-bottom: 1px;
}

.dark .metric-label-hint { border-bottom-color: #475569; }

/* =============================================================================
   Progress bar danger gradient
   ============================================================================= */
.progress-bar--danger-gradient {
  background: linear-gradient(90deg, #EF4444, #F87171);
}

/* =============================================================================
   Summary Card
   ============================================================================= */
.summary-card {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 8px;
  padding: 1rem;
}

.dark .summary-card {
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
}

/* =============================================================================
   Form Elements (replacements for DaisyUI classes)
   ============================================================================= */

/* Labels */
.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.dark .label {
  color: #D1D5DB;
}

.label-text {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Select / Dropdown */
.select {
  display: block;
  width: 100%;
  padding: 0.625rem;
  font-size: 0.875rem;
  color: #111827;
  background-color: #F9FAFB;
  border: 1px solid #D1D5DB;
  border-radius: 0.5rem;
  appearance: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select:focus {
  outline: none;
  border-color: var(--color-primary-500, #6366F1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.dark .select {
  color: #F9FAFB;
  background-color: #374151;
  border-color: #4B5563;
}

.dark .select:focus {
  border-color: var(--color-primary-400, #818CF8);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.select-bordered {
  border: 1px solid #D1D5DB;
}

.dark .select-bordered {
  border-color: #4B5563;
}

.select-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
}

/* Textarea */
.textarea {
  display: block;
  width: 100%;
  padding: 0.625rem;
  font-size: 0.875rem;
  color: #111827;
  background-color: #F9FAFB;
  border: 1px solid #D1D5DB;
  border-radius: 0.5rem;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea:focus {
  outline: none;
  border-color: var(--color-primary-500, #6366F1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.dark .textarea {
  color: #F9FAFB;
  background-color: #374151;
  border-color: #4B5563;
}

.textarea-bordered {
  border: 1px solid #D1D5DB;
}

/* Checkbox */
.checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary-600, #4F46E5);
  border-radius: 0.25rem;
  cursor: pointer;
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background-color: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  line-height: 1.25rem;
}

.btn:hover {
  background-color: #F3F4F6;
}

.dark .btn {
  color: #D1D5DB;
  background-color: #374151;
  border-color: #4B5563;
}

.dark .btn:hover {
  background-color: #4B5563;
}

/* =============================================================================
   Tabs (pill-style inside rounded container)
   ============================================================================= */
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6B7280;
  background: transparent;
  border-radius: 0.375rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
  user-select: none;
}

.tab:hover {
  color: #374151;
  background-color: rgba(0, 0, 0, 0.05);
}

.dark .tab {
  color: #9CA3AF;
}

.dark .tab:hover {
  color: #E5E7EB;
  background-color: rgba(255, 255, 255, 0.08);
}

.tab-active,
.tab.tab-active {
  color: #4F46E5;
  background-color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.dark .tab-active,
.dark .tab.tab-active {
  color: #A5B4FC;
  background-color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   Tables (basic Flowbite-style)
   ============================================================================= */
.table {
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  color: #6B7280;
  border-collapse: collapse;
}

.dark .table {
  color: #9CA3AF;
}

.table thead {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #374151;
  background-color: #F9FAFB;
}

.dark .table thead {
  color: #9CA3AF;
  background-color: #374151;
}

.table thead th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.table tbody tr {
  border-bottom: 1px solid #E5E7EB;
  background-color: #FFFFFF;
}

.dark .table tbody tr {
  border-bottom-color: #374151;
  background-color: #1F2937;
}

.table tbody tr:hover {
  background-color: #F9FAFB;
}

.dark .table tbody tr:hover {
  background-color: #374151;
}

.table td {
  padding: 0.75rem 1rem;
}

.table-sm td,
.table-sm th {
  padding: 0.5rem 0.75rem;
}

.table-zebra tbody tr:nth-child(even) {
  background-color: #F9FAFB;
}

.dark .table-zebra tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

/* =============================================================================
   Modal Overlay
   ============================================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal > .fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.modal > .relative {
  position: relative;
  z-index: 10;
  width: 100%;
}

/* =============================================================================
   Progress Bar
   ============================================================================= */
progress.progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 0.625rem;
  border-radius: 9999px;
  border: none;
  overflow: hidden;
  background-color: #E5E7EB;
}

.dark progress.progress {
  background-color: #374151;
}

progress.progress::-webkit-progress-bar {
  background-color: #E5E7EB;
  border-radius: 9999px;
}

.dark progress.progress::-webkit-progress-bar {
  background-color: #374151;
}

progress.progress::-webkit-progress-value {
  border-radius: 9999px;
  transition: width 0.3s ease;
}

progress.progress.bg-primary-500::-webkit-progress-value { background-color: #6366F1; }
progress.progress.bg-amber-500::-webkit-progress-value { background-color: #F59E0B; }
progress.progress.bg-red-500::-webkit-progress-value { background-color: #EF4444; }

progress.progress::-moz-progress-bar {
  border-radius: 9999px;
}

progress.progress.bg-primary-500::-moz-progress-bar { background-color: #6366F1; }
progress.progress.bg-amber-500::-moz-progress-bar { background-color: #F59E0B; }
progress.progress.bg-red-500::-moz-progress-bar { background-color: #EF4444; }

