/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn-outline:hover { background: var(--surface); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 11.5px; border-radius: var(--radius-xs); }
.btn-xs { height: 28px; padding: 0 8px; font-size: 10.5px; border-radius: 6px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-xs); }
.btn-blue-outline { border: 1px solid var(--blue); color: var(--blue); background: transparent; }
.btn-blue-outline:hover { background: var(--blue-soft); }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  border-bottom: 1px solid var(--slate-100);
}
.card-body { padding: 16px; }

/* ─── Form Elements ─── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--brand); }
.form-input::placeholder { color: var(--faint); }
.form-input-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s;
}
.form-input-icon:focus-within { border-color: var(--brand); }
.form-input-icon input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink);
}
.form-input-icon input::placeholder { color: var(--faint); }
.form-input-icon .icon { color: var(--faint); flex-shrink: 0; }
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}
.form-textarea:focus { border-color: var(--brand); }
.form-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--slate-50); color: var(--slate-400); }

/* ─── Icon box ─── */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.icon-box-sm { width: 32px; height: 32px; }
.icon-box-md { width: 36px; height: 36px; }
.icon-box-lg { width: 40px; height: 40px; }

/* ─── Switch Toggle ─── */
.switch {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 99px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  flex-shrink: 0;
}
.switch.on { background: var(--brand); }
.switch.danger.on { background: var(--danger); }
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 23px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: right 0.2s;
}
[dir="rtl"] .switch::after { right: 23px; }
[dir="rtl"] .switch.on::after { right: 3px; }
.switch.on::after { left: 3px; right: auto; }

/* ─── Alert ─── */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.alert-danger { background: var(--danger-soft); border: 1px solid #f5c9c5; color: var(--danger); }
.alert-success { background: var(--brand-soft); border: 1px solid #c5e5dc; color: var(--brand); }
.alert-info { background: var(--blue-soft); border: 1px solid #c5d5f5; color: var(--blue); }
.alert-warning { background: var(--amber-soft); border: 1px solid #f5e5c5; color: var(--amber); }

/* ─── Stat Card ─── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.stat-card .stat-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--slate-800);
}
.stat-card .stat-unit {
  font-size: 11px;
  color: var(--slate-400);
  font-weight: 400;
  margin-right: 4px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 2px;
}
.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
}

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Page Head ─── */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.page-head h1 { font-size: 20px; font-weight: 900; color: var(--slate-800); }
.page-head p { font-size: 12.5px; color: var(--slate-500); margin-top: 2px; }

/* ─── Pending List Item ─── */
.pending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  transition: background 0.15s;
}
.pending-item:hover { background: var(--slate-50); }
.pending-item-info { flex: 1; min-width: 0; }
.pending-item-name { font-size: 13px; font-weight: 700; }
.pending-item-meta { font-size: 11.5px; color: var(--slate-400); margin-top: 2px; }
.pending-item-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.pending-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ─── Table ─── */
.table-wrapper { overflow-x: auto; }
.table-header-row {
  display: grid;
  gap: 12px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-400);
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}
.table-row {
  display: grid;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
  transition: background 0.15s;
  border-bottom: 1px solid var(--slate-50);
}
.table-row:hover { background: var(--slate-50); }
.table-row:last-child { border-bottom: none; }

/* ─── Quick Access ─── */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.quick-access-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  color: var(--slate-500);
  transition: all 0.2s;
  text-decoration: none;
}
.quick-access-item:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}
.quick-access-item span { font-size: 10.5px; font-weight: 600; }

/* ─── Chart Bar (CSS-only) ─── */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 128px;
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.chart-bar-wrap { width: 100%; height: 112px; display: flex; align-items: flex-end; }
.chart-bar {
  width: 100%;
  border-radius: var(--radius-xs);
  transition: opacity 0.3s;
}
.chart-bar.active { background: var(--brand); }
.chart-bar.inactive { background: #cfe9e3; }
.chart-bar-label { font-size: 10.5px; color: var(--slate-400); font-weight: 500; }

/* ─── Ads Page (Template-Matched) ─── */
/* Summary Strip */
.ads-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1024px) { .ads-summary-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .ads-summary-grid { grid-template-columns: repeat(2, 1fr); } }
.ads-summary-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ads-summary-value {
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.4;
}
.ads-summary-label {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}
.ads-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Filter Card */
.ads-filter-card {
 margin-bottom: 16px;
  padding: 12px;
  border-radius: 16px;
}
.ads-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}
.ads-search-row:focus-within { border-color: #0f7a6a; }
.ads-search-inline {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}
.ads-search-inline::placeholder { color: #94a3b8; }

/* Tab Pills */
.ads-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ads-tab-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.ads-tab-pill:hover { background: #e2e8f0; color: #0f172a; text-decoration: none; }
.ads-tab-pill.active { background: #0f7a6a; color: white; }
.ads-tab-pill.active:hover { background: #0b5f52; color: white; }
.ads-tab-count { font-size: 10px; font-weight: 800; opacity: 0.75; margin-right: 4px; }
.ads-tab-separator { width: 1px; height: 20px; background: #e2e8f0; margin: 0 4px; }

/* Empty State */
.ads-empty-card {
 border-style: dashed;
  padding: 64px 20px;
  text-align: center;
}
.ads-empty-text { font-size: 13.5px; font-weight: 600; color: #64748b; }

/* Ads List Card */
.ads-list-card { border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.ads-list-header {
  display: none;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
@media (min-width: 1024px) { .ads-list-header { display: grid; } }

/* Ads List Row */
.ads-list-body { border-top: 1px solid #f1f5f9; }
.ads-list-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
}
.ads-list-row:hover { background: #f8fafc; }
.ads-list-row:last-child { border-bottom: none; }
@media (min-width: 1024px) {
  .ads-list-row {
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
  }
}

/* Cell: Ad */
.ads-cell-ad { grid-column: span 1; }
@media (min-width: 1024px) { .ads-cell-ad { grid-column: span 5; display: flex; gap: 12px; align-items: center; min-width: 0; } }
.ads-ad-thumb {
  width: 68px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ads-ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ads-ad-info { min-width: 0; flex: 1; }
.ads-ad-title { font-size: 13.5px; font-weight: 700; color: #0f172a; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ads-ad-title:hover { color: #0f7a6a; text-decoration: none; }
.ads-ad-meta { font-size: 11.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.ads-ad-sub { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #94a3b8; margin-top: 2px; }

/* Cell: User */
.ads-cell-user { display: none; }
@media (min-width: 1024px) { .ads-cell-user { display: block; grid-column: span 2; min-width: 0; } }
.ads-user-cell-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-user-cell-province { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cell: Status */
.ads-cell-status { display: none; }
@media (min-width: 1024px) { .ads-cell-status { display: block; grid-column: span 2; } }

/* Cell: Level */
.ads-cell-level { display: none; }
@media (min-width: 1024px) { .ads-cell-level { display: block; grid-column: span 2; } }

/* Cell: Actions */
.ads-cell-actions { grid-column: span 1; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
@media (min-width: 1024px) { .ads-cell-actions { grid-column: span 1; } }

/* Action Buttons */
.ads-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.ads-action-btn:hover { background: white; border-color: #e2e8f0; color: #0f172a; }
.ads-action-edit:hover { background: #ecf2fd; border-color: #c9daf8; color: #2a6fdb; }
.ads-action-approve { background: #0f7a6a; color: white; }
.ads-action-approve:hover { background: #0b5f52; }
.ads-action-reject:hover { background: #fdeceb; border-color: #f5c9c5; }

/* Mobile meta row */
.ads-mobile-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #94a3b8; border-top: 1px solid #f1f5f9; padding-top: 8px; margin-top: 4px; width: 100%; }
@media (min-width: 1024px) { .ads-mobile-meta { display: none; } }

/* Ads Pagination (keep) */
.ads-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px; border-top: 1px solid #f1f5f9; }
.ads-page-btn { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #64748b; border: 1px solid #e2e8f0; background: var(--surface); text-decoration: none; transition: all 0.15s; }
.ads-page-btn:hover { border-color: #0f7a6a; color: #0f7a6a; text-decoration: none; }
.ads-page-active { background: #0f7a6a; color: white; border-color: #0f7a6a; }
.ads-page-active:hover { background: #0b5f52; color: white; }

/* ─── Ads Detail ─── */
.ads-detail-field { margin-bottom: 16px; }
.ads-detail-field label { display: block; font-size: 11px; font-weight: 600; color: #94a3b8; margin-bottom: 4px; letter-spacing: 0.3px; }
.ads-detail-field span { font-size: 13.5px; font-weight: 600; color: #0f172a; }

/* ─── Finance Page (Template-Matched) ─── */
/* Summary Cards */
.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1024px) { .finance-summary-grid { grid-template-columns: repeat(2, 1fr); } }
.finance-summary-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}
.finance-summary-card .fin-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.finance-summary-card .fin-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.finance-summary-card .fin-stat-value {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.4;
}
.finance-summary-card .fin-stat-unit {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin-right: 4px;
}
.finance-summary-card .fin-stat-label {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.finance-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #0f7a6a;
}

/* Security Banner */
.finance-security-banner {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.finance-security-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #ecf2fd;
  color: #2a6fdb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.finance-security-text { font-size: 12px; color: #475569; line-height: 1.7; flex: 1; }

/* Finance Two Column Layout */
.finance-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1024px) { .finance-layout { grid-template-columns: 1fr; } }

/* Chart Section */
.finance-chart-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.finance-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.finance-chart-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.finance-chart-subtitle {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}
.finance-chart-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f7a6a;
  background: #e8f4f1;
  padding: 4px 10px;
  border-radius: 99px;
}

/* Breakdown Bars */
.finance-breakdown-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.finance-breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.finance-breakdown-label { font-size: 12px; color: #64748b; width: 100px; flex-shrink: 0; }
.finance-breakdown-bar { flex: 1; height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.finance-breakdown-fill { height: 100%; background: #0f7a6a; border-radius: 99px; }
.finance-breakdown-value { font-size: 11.5px; font-weight: 700; width: 70px; text-align: left; }
.finance-breakdown-pct { font-size: 11px; color: #94a3b8; width: 30px; text-align: left; }

/* Transactions List Card */
.finance-tx-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}
.finance-tx-filters {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.finance-tx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}
.finance-tx-search:focus-within { border-color: #0f7a6a; }
.finance-tx-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}
.finance-tx-search input::placeholder { color: #94a3b8; }

/* Transaction Row */
.finance-tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s;
  cursor: pointer;
}
.finance-tx-row:hover { background: #f8fafc; }
.finance-tx-row:last-child { border-bottom: none; }
.finance-tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.finance-tx-info { flex: 1; min-width: 0; }
.finance-tx-desc {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-tx-desc:hover { color: #0f7a6a; }
.finance-tx-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.finance-tx-username { font-weight: 600; color: #64748b; }
.finance-tx-amount-wrap { text-align: left; flex-shrink: 0; }
.finance-tx-amount {
  font-size: 14px;
  font-weight: 900;
  direction: ltr;
}
.finance-tx-amount.credit { color: #0f7a6a; }
.finance-tx-amount.debit { color: #0f172a; }
.finance-tx-view-link {
  font-size: 10px;
  color: #0f7a6a;
  font-weight: 600;
  margin-top: 2px;
  display: block;
}

/* Wallet Operation Card */
.finance-wallet-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.finance-wallet-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.finance-wallet-toggle {
  display: flex;
  padding: 4px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 12px;
}
.finance-wallet-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.finance-wallet-toggle-btn.active-add { background: #0f7a6a; color: white; }
.finance-wallet-toggle-btn.active-sub { background: #e0392b; color: white; }
.finance-wallet-field { margin-bottom: 12px; }
.finance-wallet-label { display: block; font-size: 11.5px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.finance-wallet-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  transition: border-color 0.2s;
}
.finance-wallet-input-wrap:focus-within { border-color: #0f7a6a; }
.finance-wallet-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}
.finance-wallet-submit {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.finance-wallet-submit.add { background: #0f7a6a; color: white; }
.finance-wallet-submit.add:hover { background: #0b5f52; }
.finance-wallet-submit.sub { background: #e0392b; color: white; }
.finance-wallet-submit.sub:hover { background: #c42e22; }

/* Tariff Card */
.finance-tariff-card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}
.finance-tariff-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.finance-tariff-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
}
.finance-tariff-item:last-child { border-bottom: none; }
.finance-tariff-item-label { color: #64748b; }
.finance-tariff-item-value { font-weight: 700; }
.finance-tariff-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #2a6fdb;
  color: #2a6fdb;
  font-size: 12.5px;
  font-weight: 700;
  background: transparent;
  text-decoration: none;
  transition: all 0.15s;
  margin-top: 12px;
}
.finance-tariff-link:hover { background: #ecf2fd; text-decoration: none; }

/* Finance Filter Pills */
.finance-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.finance-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.finance-pill:hover { background: #e2e8f0; color: #0f172a; text-decoration: none; }
.finance-pill.active { background: #0f7a6a !important; color: white !important; }
.finance-pill.active:hover { background: #0b5f52 !important; color: white !important; }
.finance-pill-sep { width: 1px; height: 16px; background: #e2e8f0; margin: 0 2px; }

/* Status Badge (reusable) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.status-completed { background: #e8f4f1; color: #0f7a6a; }
.status-pending { background: #fdf5e2; color: #a8790a; }
.status-failed { background: #fdeceb; color: #e0392b; }

/* ─── Summary Active State ─── */
.ads-summary-active {
  border-color: #0f7a6a !important;
  background: #f0fdfa !important;
}

/* ─── Users Table ─── */
.users-table-wrap {
  overflow-x: auto;
}
.users-trow {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.users-trow:hover { background: #f8fafc; }
.users-trow:last-child { border-bottom: none; }
.users-thead {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: #f8fafc;
  text-transform: none;
}
.users-thead:hover { background: #f8fafc; }
.users-tcol {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.users-tcol-user { grid-column: span 1; }
.users-tcol-phone { grid-column: span 1; }
.users-tcol-role { grid-column: span 1; }
.users-tcol-ads { grid-column: span 1; }
.users-tcol-wallet { grid-column: span 1; }
.users-tcol-status { grid-column: span 1; }
.users-tcol-date { grid-column: span 1; }
.users-tcol-actions { grid-column: span 1; text-align: left; }

/* Responsive detail grid */
@media (max-width: 1024px) {
  .ads-detail-grid { grid-template-columns: 1fr !important; }
  .users-trow {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .users-tcol-user { grid-column: span 1; display: flex; gap: 10px; align-items: center; }
  .users-tcol-phone,
  .users-tcol-role,
  .users-tcol-ads,
  .users-tcol-wallet,
  .users-tcol-status,
  .users-tcol-date,
  .users-tcol-actions {
    grid-column: span 1;
  }
  .users-tcol-actions { text-align: right; }
  .users-thead { display: none; }
  /* Hide columns on mobile except user, status, actions */
  .users-tcol-phone,
  .users-tcol-ads,
  .users-tcol-wallet,
  .users-tcol-date {
    display: none;
  }
}
