/* Fees + Invoices UI customizations (scoped)
   Keep changes page-specific to avoid impacting other portal pages.
   Uses portal theme tokens from portal_styles.css (e.g. --u-accent).
*/

/* ========== Fees page CTA button ========== */
body.u-portal-mode .u-fees-page .u-hero__actions {
  gap: 0.75rem;
}

/* Keep the glass look, but make it feel more "portal-native" */
body.u-portal-mode .u-fees-page .u-hero-btn.u-hero-btn--invoices {
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.26) 0%,
    rgba(255, 255, 255, 0.10) 100%
  );
}

body.u-portal-mode .u-fees-page .u-hero-btn.u-hero-btn--invoices i {
  opacity: 0.95;
}

/* ========== Invoice list page: modern portal-theme styling with varied colors ========== */

/* KPI Summary Cards Grid */
body.u-portal-mode .u-invoices-page .u-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

body.u-portal-mode .u-invoices-page .u-kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.8) 100%);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

body.u-portal-mode .u-invoices-page .u-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.u-portal-mode .u-invoices-page .u-kpi-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

body.u-portal-mode .u-invoices-page .u-kpi-card--total .u-kpi-card__icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

body.u-portal-mode .u-invoices-page .u-kpi-card--paid .u-kpi-card__icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

body.u-portal-mode .u-invoices-page .u-kpi-card--pending .u-kpi-card__icon {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
}

body.u-portal-mode .u-invoices-page .u-kpi-card--overdue .u-kpi-card__icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

body.u-portal-mode .u-invoices-page .u-kpi-card__content {
  flex: 1;
}

body.u-portal-mode .u-invoices-page .u-kpi-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--u-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

body.u-portal-mode .u-invoices-page .u-kpi-card__value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--u-text);
  line-height: 1.2;
}

/* Filter Bar */
body.u-portal-mode .u-invoices-page .u-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.9) 100%);
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  flex-wrap: wrap;
}

body.u-portal-mode .u-invoices-page .u-filter-bar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

body.u-portal-mode .u-invoices-page .u-filter-bar__right {
  flex-shrink: 0;
}

body.u-portal-mode .u-invoices-page .u-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body.u-portal-mode .u-invoices-page .u-filter-btn {
  padding: 0.5rem 1rem;
  border: 1.5px solid rgba(229, 231, 235, 0.8);
  background: white;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

body.u-portal-mode .u-invoices-page .u-filter-btn:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}

body.u-portal-mode .u-invoices-page .u-filter-btn--active {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border-color: #8b5cf6;
}

body.u-portal-mode .u-invoices-page .u-filter-btn--active:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #7c3aed;
  color: white;
}

body.u-portal-mode .u-invoices-page .u-filter-btn i {
  font-size: 0.9rem;
}

body.u-portal-mode .u-invoices-page .u-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.5rem;
  background: rgba(107, 114, 128, 0.12);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4b5563;
}

body.u-portal-mode .u-invoices-page .u-filter-btn--active .u-filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

body.u-portal-mode .u-invoices-page .u-filter-btn:hover:not(.u-filter-btn--active) .u-filter-count {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

/* Clear Filters Button */
body.u-portal-mode .u-invoices-page .u-filter-clear {
  padding: 0.5rem 1rem;
  border: 1.5px solid rgba(220, 38, 38, 0.3);
  background: white;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

body.u-portal-mode .u-invoices-page .u-filter-clear:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

body.u-portal-mode .u-invoices-page .u-filter-clear i {
  font-size: 0.85rem;
}

/* Search Box */
body.u-portal-mode .u-invoices-page .u-search-box {
  position: relative;
  min-width: 240px;
}

body.u-portal-mode .u-invoices-page .u-search-box__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--u-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

body.u-portal-mode .u-invoices-page .u-search-box__input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.75rem;
  border: 1.5px solid rgba(229, 231, 235, 0.8);
  border-radius: 8px;
  font-size: 0.875rem;
  background: white;
  color: var(--u-text);
  transition: all 0.2s ease;
}

body.u-portal-mode .u-invoices-page .u-search-box__input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

body.u-portal-mode .u-invoices-page .u-search-box__input::placeholder {
  color: var(--u-muted);
}

/* Invoice Table Card */
body.u-portal-mode .u-invoices-page .u-card {
  border-top-width: 3px;
  border-top-style: solid;
  border-top-color: transparent;
  border-image: linear-gradient(90deg, #8b5cf6 0%, #06b6d4 35%, #10b981 70%, #f59e0b 100%) 1;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  background: linear-gradient(
    180deg,
    rgba(243, 244, 246, 0.4) 0%,
    var(--u-surface) 42%
  );
  box-shadow: 0 10px 28px rgba(107, 114, 128, 0.08);
}

body.u-portal-mode .u-invoices-page .u-card__header {
  color: #4c1d95;
  border-bottom-color: rgba(139, 92, 246, 0.15);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(6, 182, 212, 0.06) 50%,
    rgba(16, 185, 129, 0.05) 100%
  );
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Table Row Transitions */
body.u-portal-mode .u-invoices-page tbody tr {
  transition: opacity 0.3s ease, transform 0.2s ease;
}

/* Hero: richer gradient with purple-teal-green-amber blend */
body.u-portal-mode .u-invoices-page .u-hero {
  background:
    radial-gradient(900px 260px at 90% 10%, rgba(245, 158, 11, 0.22) 0%, transparent 55%),
    radial-gradient(700px 220px at 10% 5%, rgba(139, 92, 246, 0.20) 0%, transparent 60%),
    linear-gradient(135deg, #8b5cf6 0%, #3b82f6 35%, #06b6d4 70%, #10b981 100%);
}

body.u-portal-mode .u-invoices-page .u-hero__icon {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Pay hint panel with warmer multi-color gradient */
body.u-portal-mode .u-invoices-page .u-pay-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin: 0 0 1rem;
  border-radius: 1rem;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.06) 0%,
    rgba(6, 182, 212, 0.08) 50%,
    rgba(16, 185, 129, 0.06) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.08);
}

body.u-portal-mode .u-invoices-page .u-pay-hint__icon {
  width: 42px;
  height: 42px;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4c1d95;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.20);
  flex: 0 0 42px;
}

body.u-portal-mode .u-invoices-page .u-pay-hint__title {
  font-weight: 900;
  color: var(--u-text);
}

body.u-portal-mode .u-invoices-page .u-pay-hint__subtitle {
  color: var(--u-muted);
}

body.u-portal-mode .u-invoices-page .u-card .table {
  border-collapse: separate;
  border-spacing: 0;
}

body.u-portal-mode .u-invoices-page .u-card .table thead th {
  color: #4c1d95;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(6, 182, 212, 0.06) 50%,
    rgba(16, 185, 129, 0.05) 100%
  );
  border-bottom: 2px solid rgba(139, 92, 246, 0.18);
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 0.86rem;
  padding-left: 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

body.u-portal-mode .u-invoices-page .u-card .table tbody td {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  padding-left: 1.5rem;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

body.u-portal-mode .u-invoices-page .u-card .table tbody tr {
  transition: all 0.2s ease;
}

body.u-portal-mode .u-invoices-page .u-card .table tbody tr:hover {
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.04) 0%,
    rgba(6, 182, 212, 0.05) 50%,
    rgba(16, 185, 129, 0.03) 100%
  );
  box-shadow: inset 3px 0 0 #8b5cf6;
}

body.u-portal-mode .u-invoices-page .u-card .table a {
  font-weight: 600;
  color: var(--u-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

body.u-portal-mode .u-invoices-page .u-card .table a:hover {
  color: #7c3aed;
  text-decoration: none;
}

/* Status pills: varied colors */
body.u-portal-mode .u-invoices-page td[name="invoice_status"] .badge {
  font-weight: 800;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
}

/* Row action buttons - simpler since we removed Pay */
body.u-portal-mode .u-invoices-page .u-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

body.u-portal-mode .u-invoices-page .u-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.06) 100%);
  color: #4c1d95;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.10);
  white-space: nowrap;
  transition: all 0.2s ease;
}

body.u-portal-mode .u-invoices-page .u-icon-btn:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14) 0%, rgba(6, 182, 212, 0.10) 100%);
  color: #5b21b6;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.18);
}

/* Hero buttons with varied gradient */
body.u-portal-mode .u-invoices-page .u-hero-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.10) 100%);
}

body.u-portal-mode .u-invoices-page .u-hero-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.14) 100%);
}

/* Waiting / Processing - teal accent */
body.u-portal-mode .u-invoices-page td[name="invoice_status"] .text-bg-info {
  background-color: rgba(6, 182, 212, 0.14) !important;
  color: #075985 !important;
  border-color: rgba(6, 182, 212, 0.26);
}

/* Paid - green accent */
body.u-portal-mode .u-invoices-page td[name="invoice_status"] .text-bg-success {
  background-color: rgba(16, 185, 129, 0.14) !important;
  color: #065f46 !important;
  border-color: rgba(16, 185, 129, 0.22);
}

/* Cancelled / Partial - amber accent */
body.u-portal-mode .u-invoices-page td[name="invoice_status"] .text-bg-warning {
  background-color: rgba(245, 158, 11, 0.16) !important;
  color: #92400e !important;
  border-color: rgba(245, 158, 11, 0.26);
}

/* Overdue Badge */
body.u-portal-mode .u-invoices-page .u-badge-overdue {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
  border: none;
  animation: pulse-badge 2s ease-in-out infinite;
}

body.u-portal-mode .u-invoices-page .u-badge-overdue i {
  font-size: 0.7rem;
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
  }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  body.u-portal-mode .u-invoices-page .u-kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  body.u-portal-mode .u-invoices-page .u-kpi-card {
    padding: 1rem 1.25rem;
  }

  body.u-portal-mode .u-invoices-page .u-kpi-card__icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  body.u-portal-mode .u-invoices-page .u-kpi-card__value {
    font-size: 1.2rem;
  }

  body.u-portal-mode .u-invoices-page .u-filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  body.u-portal-mode .u-invoices-page .u-filter-bar__left,
  body.u-portal-mode .u-invoices-page .u-filter-bar__right {
    width: 100%;
  }

  body.u-portal-mode .u-invoices-page .u-filter-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.u-portal-mode .u-invoices-page .u-filter-btn {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  body.u-portal-mode .u-invoices-page .u-search-box {
    min-width: 100%;
    margin-top: 0.75rem;
  }

  body.u-portal-mode .u-invoices-page .u-filter-clear {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
    justify-content: center;
  }
}

/* ========== Invoice Detail Page ========== */
body.u-portal-mode .u-invoice-detail-page .u-hero {
  background:
    radial-gradient(800px 240px at 88% 12%, rgba(245, 158, 11, 0.20) 0%, transparent 52%),
    radial-gradient(650px 200px at 12% 8%, rgba(139, 92, 246, 0.18) 0%, transparent 58%),
    linear-gradient(135deg, #8b5cf6 0%, #3b82f6 38%, #06b6d4 72%, #10b981 100%);
}

body.u-portal-mode .u-invoice-detail-page .u-card {
  border-top-width: 3px;
  border-top-style: solid;
  border-top-color: transparent;
  border-image: linear-gradient(90deg, #8b5cf6 0%, #06b6d4 50%, #10b981 100%) 1;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  background: linear-gradient(
    180deg,
    rgba(243, 244, 246, 0.35) 0%,
    var(--u-surface) 40%
  );
  box-shadow: 0 8px 24px rgba(107, 114, 128, 0.08);
}

body.u-portal-mode .u-invoice-detail-page .u-card__header {
  color: #4c1d95;
  border-bottom-color: rgba(139, 92, 246, 0.15);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(6, 182, 212, 0.06) 50%,
    rgba(16, 185, 129, 0.05) 100%
  );
  font-size: 1.05rem;
}

/* Invoice summary grid with icons */
body.u-portal-mode .u-invoice-detail-page .u-invoice-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.04) 0%,
    rgba(6, 182, 212, 0.03) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.12);
  transition: all 0.2s ease;
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item:hover {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(6, 182, 212, 0.06) 100%
  );
  border-color: rgba(139, 92, 246, 0.20);
  transform: translateY(-2px);
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__icon--status {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14) 0%, rgba(139, 92, 246, 0.08) 100%);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.20);
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__icon--date {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.08) 100%);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.20);
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__icon--due {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14) 0%, rgba(6, 182, 212, 0.08) 100%);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.20);
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__icon--total {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.08) 100%);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.20);
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__label {
  font-size: 0.8rem;
  color: var(--u-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

body.u-portal-mode .u-invoice-detail-page .u-summary-item__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--u-text);
}

/* Amount Due highlight */
body.u-portal-mode .u-invoice-detail-page .u-amount-due-highlight {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.10) 0%,
    rgba(249, 115, 22, 0.08) 100%
  );
  border: 1px solid rgba(245, 158, 11, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.u-portal-mode .u-invoice-detail-page .u-amount-due-highlight__label {
  font-size: 0.9rem;
  color: #92400e;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.u-portal-mode .u-invoice-detail-page .u-amount-due-highlight__value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #92400e;
}

/* Invoice detail table */
body.u-portal-mode .u-invoice-detail-page .u-card .table {
  border-collapse: separate;
  border-spacing: 0;
}

body.u-portal-mode .u-invoice-detail-page .u-card .table thead th {
  color: #4c1d95;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(6, 182, 212, 0.06) 50%,
    rgba(16, 185, 129, 0.05) 100%
  );
  border-bottom: 2px solid rgba(139, 92, 246, 0.18);
  padding: 0.65rem 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

body.u-portal-mode .u-invoice-detail-page .u-card .table tbody td {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  font-weight: 600;
}

body.u-portal-mode .u-invoice-detail-page .u-card .table tbody tr {
  transition: all 0.2s ease;
}

body.u-portal-mode .u-invoice-detail-page .u-card .table tbody tr:hover {
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0.04) 0%,
    rgba(6, 182, 212, 0.05) 50%,
    rgba(16, 185, 129, 0.03) 100%
  );
}

/* Payment Evidence Page - Payment Option Buttons */
body.u-portal-mode .u-pay-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

body.u-portal-mode .u-pay-option:hover {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(6, 182, 212, 0.03) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(139, 92, 246, 0.15);
}

body.u-portal-mode .u-pay-option__icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  font-size: 1.5rem;
}

body.u-portal-mode .u-pay-option--mobile .u-pay-option__icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.5rem;
}

body.u-portal-mode .u-pay-option--evidence .u-pay-option__icon {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
}

body.u-portal-mode .u-pay-option__content {
  flex: 1;
}

body.u-portal-mode .u-pay-option__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--u-text);
  margin-bottom: 0.25rem;
}

body.u-portal-mode .u-pay-option__desc {
  font-size: 0.85rem;
  color: var(--u-muted);
  font-weight: 500;
}

body.u-portal-mode .u-pay-option--mobile:hover {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.05) 100%);
}

body.u-portal-mode .u-pay-option--evidence:hover {
  border-color: #06b6d4;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(8, 145, 178, 0.05) 100%);
}

/* Remove the dashed separator */
body.u-portal-mode #evidenceFormSection {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Payment Evidence Page - Card Styling with Varied Colors */
body.u-portal-mode .u-card {
  position: relative;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.25rem;
}

body.u-portal-mode .u-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6 0%, #10b981 50%, #06b6d4 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  pointer-events: none;
}

body.u-portal-mode .u-card__header {
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.06) 0%,
    rgba(16, 185, 129, 0.04) 100%
  );
  color: #5b21b6;
}

/* Transaction Details Summary Bar */
body.u-portal-mode .u-card .u-info-bar {
  display: flex;
  gap: 2rem;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.06) 0%,
    rgba(14, 165, 233, 0.04) 100%
  );
  border: 1px solid rgba(6, 182, 212, 0.12);
  border-radius: 12px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

body.u-portal-mode .u-card .u-info-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.u-portal-mode .u-card .u-info-bar__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0e7490;
  letter-spacing: 0.3px;
}

body.u-portal-mode .u-card .u-info-bar__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #164e63;
}

/* Form Field Enhancements - Fix Label Positioning */
body.u-portal-mode .u-input.u-outline-field {
  position: relative;
  margin-bottom: 0;
}

body.u-portal-mode .u-input__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #0891b2;
  font-size: 1.05rem;
  z-index: 2;
  pointer-events: none;
}

body.u-portal-mode .u-input .u-control {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 3rem;
  border: 1.5px solid rgba(209, 213, 219, 0.6);
  border-radius: 12px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  background: white;
}

body.u-portal-mode .u-input .u-control:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
  outline: none;
}

/* Base State (Inside the input) - Floating Label Start Position */
body.u-portal-mode .u-input .u-label {
  position: absolute;
  left: 3rem; /* Push right to clear the icon when inside */
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: #9ca3af; /* Muted gray placeholder */
  pointer-events: none;
  background: transparent;
  padding: 0 0.5rem;
  z-index: 1;
  white-space: nowrap;
  max-width: calc(100% - 4rem);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease-out;
}

/* Active State (Floating on border) - Triggered by focus or content */
/* Override portal styles with higher specificity */
body.u-portal-mode .u-input.u-outline-field:focus-within .u-label,
body.u-portal-mode .u-input.u-outline-field.is-filled .u-label {
  top: -0.7rem;
  left: 1rem; /* Move back left when floating */
  transform: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0891b2;
  background: white;
  z-index: 5;
  margin: 0;
}

body.u-portal-mode .u-input textarea.u-control {
  padding-top: 1rem;
  padding-bottom: 1rem;
  resize: vertical;
  min-height: 100px;
}

body.u-portal-mode .u-input select.u-control {
  cursor: pointer;
  padding-top: 0.6rem;
}

/* Upload Drop Zone */
body.u-portal-mode .u-upload-drop {
  border: 2px dashed rgba(139, 92, 246, 0.3);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.03) 0%,
    rgba(16, 185, 129, 0.02) 100%
  );
  cursor: pointer;
  transition: all 0.3s ease;
}

body.u-portal-mode .u-upload-drop:hover {
  border-color: #8b5cf6;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.06) 0%,
    rgba(16, 185, 129, 0.04) 100%
  );
}

body.u-portal-mode .u-upload-drop strong {
  color: #10b981;
  font-weight: 700;
}

/* Form Actions */
body.u-portal-mode .u-form-actions .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transition: all 0.3s ease;
}

body.u-portal-mode .u-form-actions .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
