/* ============================================================
   Gastos & Prioridades — Design System
   Dark mode • Glassmorphism • Mobile-first
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:          #07070f;
  --bg-2:        #0d0d1a;
  --glass:       rgba(255,255,255,0.04);
  --glass-hover: rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.08);
  --border-h:    rgba(255,255,255,0.16);

  --a1: #7c3aed;
  --a2: #2563eb;
  --grad: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  --grad-h: linear-gradient(135deg, #6d28d9 0%, #1d4ed8 100%);

  --tx:  #f1f5f9;
  --tx2: #94a3b8;
  --tx3: #475569;

  --green:  #10b981;
  --green-bg: rgba(16,185,129,0.12);
  --red:    #ef4444;
  --red-bg: rgba(239,68,68,0.12);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245,158,11,0.12);

  --r-sm: 0.5rem;
  --r-md: 0.875rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;

  --sh: 0 4px 24px rgba(0,0,0,0.5);
  --sh-accent: 0 4px 24px rgba(124,58,237,0.35);

  --font: 'Inter', -apple-system, sans-serif;
  --ease: cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font); background: var(--bg); color: var(--tx); min-height: 100vh; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container { max-width: 800px; margin: 0 auto; padding: 1rem; }

/* ── HEADER ─────────────────────────────────────────────────── */
.app-header {
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem;
}
.header-brand { flex: 1; display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.header-icon { font-size: 1.25rem; }
.header-title { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-libreta-name { font-size: 0.95rem; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--grad); color: #fff;
  padding: 0.6rem 1.25rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 600;
  transition: opacity 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s;
  box-shadow: var(--sh-accent);
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); opacity: 1; }
.btn-primary.btn-full { width: 100%; justify-content: center; padding: 0.85rem; font-size: 1rem; }
.btn-primary.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--glass); border: 1px solid var(--border); color: var(--tx2);
  padding: 0.6rem 1.25rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--glass-hover); border-color: var(--border-h); color: var(--tx); }
.btn-secondary.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-danger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--red-bg); border: 1px solid rgba(239,68,68,0.3); color: var(--red);
  padding: 0.6rem 1.25rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-danger.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  color: var(--tx2); background: var(--glass); border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-icon:hover { background: var(--glass-hover); color: var(--tx); border-color: var(--border-h); }
.btn-icon-danger { color: var(--red); }
.btn-icon-danger:hover { background: var(--red-bg); }

/* ── FORM FIELDS ─────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field-label { font-size: 0.8rem; font-weight: 600; color: var(--tx2); text-transform: uppercase; letter-spacing: 0.05em; }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--tx3); }
.field-input {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--tx); border-radius: var(--r-md);
  padding: 0.75rem 1rem; font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}
.field-input:focus { outline: none; border-color: var(--a1); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }
.field-input::placeholder { color: var(--tx3); }
.field-textarea { resize: vertical; min-height: 80px; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: #13131f; border: 1px solid var(--border-h);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.5rem; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.3s var(--ease);
  box-shadow: var(--sh);
}
.modal-overlay.active .modal { transform: translateY(0); }

@media (min-width: 600px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: var(--r-xl); max-height: 85vh; }
}
.modal-sm { max-width: 380px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%; background: var(--glass);
  color: var(--tx2); font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--red-bg); color: var(--red); }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; flex-wrap: wrap; }
.confirm-text { color: var(--tx2); font-size: 0.95rem; margin-bottom: 0.5rem; line-height: 1.5; }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1e1e30; border: 1px solid var(--border-h); border-radius: var(--r-lg);
  color: var(--tx); padding: 0.75rem 1.5rem; font-size: 0.9rem; font-weight: 500;
  z-index: 999; white-space: nowrap; box-shadow: var(--sh);
  transition: transform 0.3s var(--ease), opacity 0.3s;
  opacity: 0; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast-success { border-color: var(--green); }
.toast.toast-error   { border-color: var(--red); }

/* ── ALERT ───────────────────────────────────────────────────── */
.alert-error {
  background: var(--red-bg); border: 1px solid rgba(239,68,68,0.3);
  color: var(--red); border-radius: var(--r-md);
  padding: 0.75rem 1rem; font-size: 0.9rem; margin-bottom: 1rem;
}
.budget-alert {
  background: var(--red-bg); border: 1px solid rgba(239,68,68,0.3);
  color: var(--red); border-radius: var(--r-md);
  padding: 0.75rem 1rem; font-size: 0.875rem; font-weight: 500;
  margin-bottom: 1rem;
  animation: pulse-red 2s ease-in-out infinite;
}
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50%      { box-shadow: 0 0 0 6px rgba(239,68,68,0.1); }
}

/* ── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.5rem 0 0.75rem;
}
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--tx); display: flex; align-items: center; gap: 0.5rem; }
.badge-count {
  background: var(--glass); border: 1px solid var(--border);
  color: var(--tx2); border-radius: 99px;
  font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.5rem;
}

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  border: 1px dashed var(--border); border-radius: var(--r-lg);
  margin: 1rem 0;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.6; }
.empty-text { color: var(--tx2); font-size: 0.95rem; line-height: 1.7; }
.hidden { display: none !important; }

/* ── TEXT UTILITIES ──────────────────────────────────────────── */
.text-success { color: var(--green) !important; }
.text-danger  { color: var(--red) !important; }
.text-warning { color: var(--yellow) !important; }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress-wrap {
  height: 5px; background: rgba(255,255,255,0.08);
  border-radius: 99px; overflow: hidden; margin: 0.75rem 0;
}
.progress-bar { height: 100%; border-radius: 99px; transition: width 0.5s var(--ease); }
.bar-success { background: var(--green); }
.bar-warning { background: var(--yellow); }
.bar-danger  { background: var(--red); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.page-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; }
.login-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}
.blob-1 { width: 500px; height: 500px; background: #7c3aed; top: -150px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: #2563eb; bottom: -100px; left: -100px; animation-delay: -4s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(20px,-20px) scale(1.05); }
}
.login-wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 100vh; padding: 1rem;
}
.login-card {
  background: rgba(13,13,26,0.85); border: 1px solid var(--border-h);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-xl); padding: 2rem 1.75rem;
  width: 100%; max-width: 400px; box-shadow: var(--sh);
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.login-title { font-size: 1.5rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-sub { color: var(--tx2); font-size: 0.875rem; margin-top: 0.25rem; }
.login-form { display: flex; flex-direction: column; gap: 0; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

/* Global Summary */
.summary-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-top: 1.25rem;
}
.summary-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; color: var(--tx);
  font-size: 0.95rem; font-weight: 600;
  transition: background 0.2s;
}
.summary-toggle:hover { background: var(--glass-hover); }
.summary-chevron { transition: transform 0.3s var(--ease); flex-shrink: 0; }
.summary-chevron.rotated { transform: rotate(180deg); }
.summary-body { padding: 0 1.25rem 1.25rem; }
.summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.summary-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.summary-stat-full { grid-column: 1 / -1; }
.summary-stat-label { font-size: 0.75rem; color: var(--tx3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.summary-stat-value { font-size: 1.25rem; font-weight: 700; }

/* Libretas Grid */
.libretas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; margin-top: 0;
}
@media (min-width: 560px) { .libretas-grid { grid-template-columns: 1fr 1fr; } }

.libreta-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.libreta-card:hover { border-color: var(--border-h); transform: translateY(-2px); box-shadow: var(--sh); }
.libreta-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; }
.libreta-name { font-size: 1rem; font-weight: 700; line-height: 1.3; flex: 1; }
.libreta-monto { font-size: 0.875rem; font-weight: 600; color: var(--a1); white-space: nowrap; }
.libreta-stats { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--tx3); flex-wrap: wrap; gap: 0.25rem; }
.libreta-sobrante { font-size: 0.875rem; margin: 0.25rem 0; }
.libreta-actions {
  display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   LIBRETA DETAIL
   ═══════════════════════════════════════════════════════════════ */

/* Balance Widget */
.balance-widget {
  display: flex; align-items: stretch; justify-content: stretch;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-top: 1.25rem;
}
.balance-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 1rem 0.5rem; gap: 0.2rem; text-align: center;
}
.balance-divider { width: 1px; background: var(--border); flex-shrink: 0; }
.balance-label { font-size: 0.7rem; color: var(--tx3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.balance-value { font-size: 1rem; font-weight: 700; transition: color 0.3s; }
.balance-sobrante { font-size: 1.1rem; }

@media (min-width: 500px) { .balance-value { font-size: 1.15rem; } }

/* Drag hint */
.drag-hint { font-size: 0.78rem; color: var(--tx3); margin: 0.5rem 0 0.75rem; }

/* Gastos list */
.gastos-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 5rem; }

.gasto-item {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0.75rem 0.75rem 0.75rem 0.5rem;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
  cursor: default;
}
.gasto-item.is-confirmed {
  border-color: rgba(16,185,129,0.25);
  background: rgba(16,185,129,0.04);
}
.gasto-item.sortable-ghost { opacity: 0.35; }
.gasto-item.sortable-drag  { background: #1e1e32; box-shadow: var(--sh); }

.gasto-handle {
  color: var(--tx3); cursor: grab; flex-shrink: 0; padding: 0.25rem;
  touch-action: none; user-select: none;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.gasto-handle:hover { color: var(--tx2); }
.gasto-handle:active { cursor: grabbing; }

.gasto-pos {
  font-size: 0.7rem; font-weight: 700; color: var(--tx3);
  min-width: 1.75rem; text-align: center; flex-shrink: 0;
  font-feature-settings: "tnum";
}

/* Toggle */
.gasto-toggle { position: relative; cursor: pointer; flex-shrink: 0; }
.toggle-check { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-ui {
  display: block; width: 36px; height: 20px;
  background: rgba(255,255,255,0.1); border: 1px solid var(--border-h);
  border-radius: 99px;
  transition: background 0.25s, border-color 0.25s;
  position: relative;
}
.toggle-ui::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tx3); transition: transform 0.25s var(--ease), background 0.25s;
}
.toggle-check:checked + .toggle-ui { background: var(--green); border-color: var(--green); }
.toggle-check:checked + .toggle-ui::after { transform: translateX(16px); background: #fff; }

/* Gasto info */
.gasto-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gasto-nombre { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gasto-desc { font-size: 0.75rem; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.1rem; }
.gasto-cantidad { font-size: 0.875rem; font-weight: 700; color: var(--tx); white-space: nowrap; flex-shrink: 0; font-feature-settings: "tnum"; }
.gasto-btns { display: flex; gap: 0.25rem; flex-shrink: 0; }
.gasto-btns .btn-icon { width: 30px; height: 30px; }

/* ── NAV TABS ────────────────────────────────────────────────── */
.app-nav {
  display: flex; gap: 0;
  border-top: 1px solid var(--border);
  background: rgba(7,7,15,0.9);
}
.nav-tab {
  flex: 1; padding: 0.6rem; text-align: center;
  font-size: 0.8rem; font-weight: 600; color: var(--tx3);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-tab:hover { color: var(--tx2); }
.nav-tab.active { color: var(--tx); border-bottom-color: var(--a1); }

/* ── LIQUIDACIÓN ─────────────────────────────────────────────── */
.liq-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-top: 1.25rem; overflow: hidden;
}
.liq-title {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--tx2);
  padding: 0.9rem 1rem 0.5rem;
}
.liq-table-wrap { overflow-x: auto; }
.liq-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.liq-table th {
  padding: 0.5rem 0.75rem; text-align: center;
  font-size: 0.8rem; font-weight: 700; color: var(--tx2);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.liq-pct {
  font-size: 0.7rem; color: var(--a1); font-weight: 500;
}
.liq-table th:first-child { text-align: left; }
.liq-table td {
  padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.liq-row-label {
  font-size: 0.78rem; color: var(--tx2); white-space: nowrap;
}
.liq-val { text-align: center; font-weight: 600; font-feature-settings: "tnum"; }
.liq-pos { font-weight: 700; }
.liq-sep-row td { border-top: 1px solid var(--border); }
.liq-balance-row td { border-top: 2px solid var(--border-h); }
.liq-balance { text-align: center; font-weight: 700; }
.balance-debe { color: var(--red); }
.balance-cobra { color: var(--green); }
.balance-tag {
  display: inline-block; font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  opacity: 0.8; margin-bottom: 0.15rem;
}
.liq-globals {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.75rem 1rem 0;
  border-top: 1px solid var(--border);
}
.liq-global-item {
  display: flex; flex-direction: column; gap: 0.1rem;
}
.liq-global-label { font-size: 0.7rem; color: var(--tx3); text-transform: uppercase; letter-spacing: 0.04em; }
.liq-global-val { font-size: 1.1rem; font-weight: 800; }
.liq-msg {
  margin: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md); font-size: 0.9rem; font-weight: 500;
  line-height: 1.5;
}
.liq-msg-alert { background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.25); color: var(--tx); }
.liq-msg-ok    { background: var(--green-bg); border: 1px solid rgba(16,185,129,0.25); color: var(--green); }

/* ── FILTER TABS ─────────────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 0.75rem; flex-wrap: wrap;
}
.filter-tab {
  padding: 0.35rem 0.85rem; border-radius: 99px;
  font-size: 0.8rem; font-weight: 600; color: var(--tx3);
  background: var(--glass); border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-tab:hover { color: var(--tx2); }
.filter-tab.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ── MOVIMIENTO ITEM ─────────────────────────────────────────── */
.mov-ingreso { border-left: 3px solid var(--green); }
.mov-gasto   { border-left: 3px solid var(--yellow); }
.mov-tipo-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── TIPO TOGGLE (cobro/gasto) ───────────────────────────────── */
.tipo-toggle {
  display: flex; gap: 0.5rem;
}
.tipo-btn {
  flex: 1; padding: 0.6rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 600;
  background: var(--glass); border: 1px solid var(--border); color: var(--tx2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tipo-btn.active {
  background: var(--grad); color: #fff; border-color: transparent;
}

/* ── PARTICIPANT ROWS ────────────────────────────────────────── */
.part-row {
  display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem;
}
.part-row .field-input { flex: 1; }
.pct-input { max-width: 75px; flex: none; }
.pct-sym { color: var(--tx3); font-weight: 600; }
.pct-total-row {
  font-size: 0.8rem; color: var(--tx2); margin-bottom: 0.75rem;
  text-align: right;
}
.pct-warn { color: var(--red); }
.modal-sep { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ── PAGADO BAR ───────────────────────────────────────────── */
.pagado-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  background: var(--green-bg); border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--r-md); padding: 0.5rem 0.85rem;
  font-size: 0.825rem; margin-bottom: 0.5rem;
}
.pagado-label { color: var(--green); font-weight: 600; }
.pagado-value { color: var(--green); font-weight: 700; }
.pagado-pend  { color: var(--tx2); font-size: 0.78rem; }

/* ── PAGADO BUTTON ───────────────────────────────────────── */
.btn-pagado {
  opacity: 0.35;
  transition: opacity 0.2s, background 0.2s;
  font-size: 0.9rem;
}
.btn-pagado:hover { opacity: 0.7; }
.btn-pagado.is-pagado-on {
  opacity: 1;
  background: var(--green-bg);
  border-color: rgba(16,185,129,0.35);
}
.is-pagado .gasto-nombre { text-decoration: line-through; opacity: 0.6; }


