/* ============================================
   Wub — Componentes Reutilizables
   Paleta: Dark + Púrpura (Archivist / ListView)
   ============================================ */

/* ========== BUTTONS ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.18s ease;
  border: none;
  cursor: pointer;
  letter-spacing: -0.1px;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(138, 43, 226, 0.35);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(138, 43, 226, 0.5);
}

.btn-secondary {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  background: var(--accent-pale);
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--accent-pale);
}

.btn-danger {
  background: var(--color-danger);
  color: #ffffff;
}

.btn-danger:hover { opacity: 0.88; }

.btn-sm {
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  border: none;
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

/* ========== CARDS ========== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.card-icon.primary {
  background: var(--accent-pale);
  color: var(--color-primary);
}

.card-icon.success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.card-icon.danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.card-icon.warning {
  background: rgba(201, 162, 39, 0.12);
  color: var(--color-warning);
}

/* Stat card grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ========== FORMS ========== */

.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.18);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0.625rem 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.18s;
}

.form-checkbox:hover { border-color: var(--color-primary); }

.form-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -0.25rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

/* ========== LISTS ========== */

.list-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.18s ease;
  cursor: pointer;
}

.list-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card-alt);
}

.list-item-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--color-primary);
  flex-shrink: 0;
}

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.list-item-amount {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.list-item-amount.income  { color: var(--color-success); }
.list-item-amount.expense { color: var(--color-danger); }

/* ========== PROGRESS BAR ========== */

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-card-alt);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--color-primary);
  transition: width 0.45s ease;
}

/* ========== TAGS / BADGES ========== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge-primary {
  background: var(--accent-pale);
  color: var(--color-primary);
}

.badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.badge-warning {
  background: rgba(201, 162, 39, 0.12);
  color: var(--color-warning);
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

/* ========== SECTION HEADERS ========== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
}

.section-link:hover { color: var(--color-primary-hover); }

/* ========== EMPTY STATE ========== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  width: 100%;
}

.empty-state .material-symbols-rounded {
  font-size: 44px;
  margin-bottom: 1rem;
  opacity: 0.35;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ========== ACCOUNTS MINI GRID ========== */

.accounts-mini-grid {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  padding: 0.375rem 0 0.875rem;
  margin-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.accounts-mini-grid::-webkit-scrollbar { display: none; }

.account-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 78px;
  padding: 0.625rem 0.75rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.account-mini-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-alt);
}

.account-mini-card.active {
  border-color: var(--color-primary);
  background: var(--accent-pale);
  color: var(--color-primary);
}

.account-mini-card .material-symbols-rounded { font-size: 22px; opacity: 0.85; }
.account-mini-card.active .material-symbols-rounded { opacity: 1; color: var(--color-primary); }

.account-mini-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-mini-type {
  font-size: 0.6rem;
  opacity: 0.6;
  text-align: center;
}

/* ========== ACTIVE FILTERS ========== */

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 0;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.75rem;
  background: var(--accent-pale);
  color: var(--color-primary);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========== FILTER BAR ========== */

.filter-bar {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.4375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--accent-pale);
  color: var(--color-primary);
  border-color: rgba(138, 43, 226, 0.4);
}

/* ========== FILTER DROPDOWN ========== */

.filter-dropdown-container { position: relative; }

.filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 100;
  display: none;
  overflow: hidden;
  margin-top: 0.25rem;
}

.filter-dropdown.show { display: block; }

.dropdown-item {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border-color);
}

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

.dropdown-item:hover {
  background: var(--bg-card-alt);
  color: var(--color-primary);
}

/* ========== ACCOUNT CARD (visual) ========== */

.account-card {
  background: linear-gradient(135deg, #1a1a2e, #2d1b69);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.account-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(138, 43, 226, 0.1);
}

.account-card .account-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.7;
  font-weight: 700;
}

.account-card .account-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0 1rem;
}

.account-card .account-balance {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ========== PROFILE ========== */

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========== TOAST / NOTIFICATIONS ========== */

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-primary);
  font-size: 0.875rem;
  min-width: 280px;
  animation: slideIn 0.3s ease;
  color: var(--text-primary);
}

.toast.success { border-left-color: var(--color-success); }
.toast.error   { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ========== ACCOUNT TRANSACTIONS ========== */

.account-transaction-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.account-transaction-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.account-transaction-header .material-symbols-rounded {
  color: var(--color-primary);
  font-size: 1.25rem;
}

.account-transaction-header .account-name {
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  font-size: 0.9rem;
}

.account-transaction-header .transaction-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.account-transaction-list { padding: 0.375rem 0; }

.account-transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5625rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.account-transaction-item:last-child { border-bottom: none; }

.account-transaction-item .transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.account-transaction-item .transaction-desc {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.account-transaction-item .transaction-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.account-transaction-item .transaction-amount {
  font-size: 0.875rem;
  font-weight: 700;
}

.account-transaction-item .transaction-amount.income  { color: var(--color-success); }
.account-transaction-item .transaction-amount.expense { color: var(--color-danger); }

.account-transaction-group .no-transactions {
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.account-transaction-group .view-more {
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.list-item.selected {
  background: var(--accent-pale);
  border-color: rgba(138, 43, 226, 0.4);
}

/* ========== MULTI-SELECT ========== */

.selection-bar {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.45);
  z-index: 150;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.selection-bar.hidden { display: none; }

.list-item-selected {
  background: var(--accent-pale);
  border-color: rgba(138, 43, 226, 0.4) !important;
}

.list-item-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  cursor: pointer;
}

.list-item-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

@media (max-width: 640px) {
  .selection-bar {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 0.75rem;
    right: 0.75rem;
    transform: none;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    z-index: 150;
  }
  .selection-bar .btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }
}

/* ========== PROFILE PARTNER ROW ========== */

.partner-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  min-width: 0;
}

.partner-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card-alt);
  flex-shrink: 0;
}

.partner-info { flex: 1; min-width: 0; }

.partner-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-row .badge { flex-shrink: 0; margin-left: auto; }

/* ========== ACCOUNT CARD BILLING INFO ========== */

.account-card-billing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.7rem;
  opacity: 0.85;
}

.account-card-billing .billing-due {
  font-weight: 700;
  color: #c9a227;
}

.credit-fields-divider {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-primary);
  margin: 0.25rem 0 0.875rem;
}

.credit-fields-divider::before,
.credit-fields-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ========== BILLING STATEMENTS ========== */

.billing-statement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.billing-statement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #1a1a2e, #2d1b69);
  color: #ffffff;
}

.billing-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.billing-header-left .material-symbols-rounded { font-size: 1.5rem; }

.billing-card-name { font-size: 1rem; font-weight: 700; }

.billing-cycle-info {
  font-size: 0.72rem;
  opacity: 0.8;
  margin-top: 0.125rem;
}

.billing-limit { font-size: 0.8rem; opacity: 0.9; }

.billing-periods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.billing-period {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border-color);
}

.billing-period:last-child { border-right: none; }

.billing-period.due      { background: rgba(239, 68, 68, 0.04); }
.billing-period.upcoming { background: rgba(138, 43, 226, 0.04); }

.billing-period-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.billing-period.due      .billing-period-title { color: var(--color-danger); }
.billing-period.upcoming .billing-period-title { color: var(--color-primary); }
.billing-period-title .material-symbols-rounded { font-size: 1rem; }

.billing-period-amount {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  letter-spacing: -0.3px;
}

.billing-period-txcount {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.billing-tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.billing-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--text-primary);
  padding: 0.375rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.billing-tx-item em {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.375rem;
}

.billing-tx-item span:last-child {
  font-weight: 700;
  color: var(--color-danger);
  white-space: nowrap;
  margin-left: 0.5rem;
}

.billing-tx-more {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.25rem;
}

.billing-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

/* ========== PAYMENT METHOD SELECTOR ========== */

.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-bottom: 0.25rem;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: transparent;
}

.payment-method-option:hover {
  border-color: var(--color-primary);
  background: var(--accent-pale);
}

.payment-method-option input[type="radio"] {
  accent-color: var(--color-primary);
  width: 1rem;
  height: 1rem;
}

.payment-method-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--accent-pale);
  color: var(--color-primary);
  font-weight: 600;
}

.payment-method-option .material-symbols-rounded { font-size: 1.25rem; }

/* ========== PAYMENT BADGES ========== */

.badge-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--accent-pale);
  color: var(--color-primary);
  border: 1px solid rgba(138, 43, 226, 0.3);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.badge-debit {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ========== CREDIT SUMMARY ========== */

.credit-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.credit-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  transition: all 0.18s ease;
}

.credit-summary-card.has-balance {
  border-left: 3px solid var(--color-danger);
}

.credit-summary-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.credit-summary-card-header .material-symbols-rounded {
  font-size: 1.125rem;
  color: var(--color-primary);
}

.credit-summary-amount {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.credit-summary-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.credit-balance-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.credit-balance-strip.positive {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.credit-balance-strip.negative {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.credit-balance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.credit-balance-item span   { font-size: 0.72rem; color: var(--text-muted); }
.credit-balance-item strong { font-size: 1rem; font-weight: 800; color: var(--text-primary); }

.credit-balance-sep {
  font-size: 1.25rem;
  color: var(--border-light);
  font-weight: 300;
}

@media (max-width: 600px) {
  .billing-periods {
    grid-template-columns: 1fr;
  }
  .billing-period {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .billing-period:last-child { border-bottom: none; }
  .credit-balance-strip {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}
