/* AppShell */
.app-shell {
  min-height: 100dvh;
  padding-top: calc(var(--mp-header-h) + env(safe-area-inset-top, 0px));
}

.app-shell--desktop {
  padding-left: 0;
}

.app-shell--mobile-nav {
  padding-bottom: calc(var(--mp-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

.app-main {
  padding: 12px 8px 16px;
  max-width: 520px;
  margin: 0 auto;
}

.app-shell--desktop .app-main {
  max-width: 1200px;
  padding: 20px 28px 32px;
}

.dash-home-cta {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(59, 130, 246, 0.08));
  color: var(--mp-text);
  text-align: left;
}

.dash-home-cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  font-size: 1.1rem;
}

.dash-home-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dash-home-cta-copy strong {
  font-size: 0.95rem;
}

.dash-home-cta-copy small {
  font-size: 0.74rem;
  opacity: 0.76;
}

/* AppHeader — logo + acciones */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mp-header-h);
  display: flex;
  align-items: center;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0);
  background: var(--mp-header-bg);
  border-bottom: 1px solid var(--mp-border-light);
  box-shadow: var(--mp-header-shadow);
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 14px 0 12px;
  gap: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.header-back-btn {
  background: none;
  border: none;
  color: var(--mp-header-muted);
  padding: 8px 10px 8px 0;
  margin-right: 2px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.header-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--mp-header-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header-logo .logo-dot {
  display: inline-block;
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #007aff;
  margin-left: 1px;
  vertical-align: baseline;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-action-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--mp-header-muted);
  padding: 8px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 8px;
}

.header-action-btn:active {
  background: var(--mp-hover-bg);
}

.header-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ff3b30;
  border-radius: 50%;
}

.header-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.header-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--mp-border);
  object-fit: cover;
}

.header-logout-btn {
  font-size: 1.1rem;
  opacity: 0.7;
}

.header-title {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.header-title--desktop {
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
}

.header-logo--desktop {
  flex-shrink: 0;
  margin-right: 4px;
}

.header-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-right: 8px;
  border-radius: 8px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface-2);
  color: var(--mp-header-text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-menu-btn:hover {
  background: var(--mp-hover-bg-strong);
  border-color: var(--mp-border);
}

.header-menu-btn i {
  font-size: 0.9rem;
  opacity: 0.85;
}

.header-desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.header-desktop-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--mp-header-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.header-desktop-nav-item:hover {
  color: var(--mp-header-text);
  background: var(--mp-hover-bg);
}

.header-desktop-nav-item.active {
  color: var(--mp-nav-active);
  background: var(--mp-nav-active-bg);
  font-weight: 600;
}

.header-desktop-nav-item--fab {
  color: var(--mp-accent-gasto);
}

.header-desktop-nav-item--fab.active {
  background: rgba(217, 45, 32, 0.12);
  color: var(--mp-accent-gasto);
}

.header-desktop-nav-label {
  display: inline;
}

.header-page-title {
  margin: 0 0 0 12px;
  padding-left: 12px;
  border-left: 1px solid var(--mp-border-light);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Desktop mega-menu */
.header-mega-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
  flex: 1;
  min-width: 0;
}

.header-mega-standalone,
.header-mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--mp-header-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.header-mega-standalone:hover,
.header-mega-trigger:hover,
.header-mega-group--open .header-mega-trigger {
  color: var(--mp-header-text);
  background: var(--mp-hover-bg);
}

.header-mega-standalone.active,
.header-mega-group--active .header-mega-trigger {
  color: var(--mp-nav-active);
  background: var(--mp-nav-active-bg);
  font-weight: 600;
}

.header-mega-group {
  position: relative;
}

.header-mega-chevron {
  font-size: 0.55rem;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.header-mega-group--open .header-mega-chevron {
  transform: rotate(180deg);
}

.header-mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 48px));
  padding-top: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 200;
}

.header-mega-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border-light);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.header-mega-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--mp-text);
  transition: background 0.12s;
}

.header-mega-link:hover {
  background: var(--mp-hover-bg);
}

.header-mega-link.active {
  background: var(--mp-nav-active-bg);
}

.header-mega-link-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--mp-surface-2);
  color: var(--mp-header-muted);
  flex-shrink: 0;
  font-size: 0.85rem;
}

.header-mega-link.active .header-mega-link-icon {
  color: var(--mp-nav-active);
  background: rgba(37, 99, 235, 0.1);
}

.header-mega-link-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.header-mega-link-label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.header-mega-link-hint {
  font-size: 0.72rem;
  color: var(--mp-text-muted);
  line-height: 1.3;
}

.header-mega-link.active .header-mega-link-label {
  color: var(--mp-nav-active);
}

.app-header--desktop .header-left {
  gap: 0;
  flex: 1;
  min-width: 0;
}

.app-header--desktop .header-content {
  gap: 16px;
}

.header-btn,
.header-spacer {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn {
  background: transparent;
  border: none;
  color: var(--mp-text);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 6px;
}

.header-btn:hover {
  background: var(--mp-surface-2);
}

@media (min-width: 900px) {
  .app-header {
    left: 0;
  }

  .header-content {
    max-width: none;
    padding: 0 24px;
  }

  .header-action-btn:hover {
    color: var(--mp-header-text);
    background: var(--mp-hover-bg);
  }

  .header-logout-btn:hover {
    opacity: 1;
  }
}

@media (min-width: 900px) and (max-width: 1080px) {
  .header-mega-standalone span,
  .header-mega-trigger span:not(.header-mega-link-hint) {
    display: none;
  }

  .header-mega-standalone,
  .header-mega-trigger {
    padding: 6px 9px;
  }

  .header-mega-chevron {
    display: none;
  }
}

/* Overlays tutorial / novedades */
.header-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
}

.header-overlay--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.header-overlay--sheet {
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.55);
}

.tutorial-card {
  position: relative;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 16px;
  max-width: 340px;
  width: 100%;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--mp-card-shadow);
}

.tutorial-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--mp-hover-bg);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: var(--mp-text-muted);
  cursor: pointer;
  font-size: 1rem;
}

.tutorial-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
}

.tutorial-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--mp-border);
  transition: all 0.25s ease;
}

.tutorial-dot--active {
  width: 24px;
  background: #0078d7;
}

.tutorial-icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: #fff;
}

.tutorial-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mp-text);
  margin-bottom: 10px;
}

.tutorial-text {
  font-size: 0.85rem;
  color: var(--mp-text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

.tutorial-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.novedades-sheet {
  background: var(--mp-surface);
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 16px 16px 0 0;
  max-height: 85vh;
  overflow-y: auto;
  animation: novedades-slide-up 0.28s ease;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

@keyframes novedades-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.novedades-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--mp-border-light);
}

.novedades-sheet-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--mp-text);
}

.novedades-sheet-sub {
  font-size: 0.72rem;
  color: var(--mp-text-muted);
  margin-top: 2px;
}

.novedades-close {
  background: var(--mp-hover-bg);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: var(--mp-text-muted);
  cursor: pointer;
  font-size: 1rem;
}

.novedades-sheet-body {
  padding: 20px 20px 40px;
}

.novedades-version {
  font-size: 0.68rem;
  color: var(--mp-text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.novedades-item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.novedades-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.novedades-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--mp-text);
  margin-bottom: 3px;
}

.novedades-item-text {
  font-size: 0.8rem;
  color: var(--mp-text-muted);
  line-height: 1.5;
}

.novedades-foot {
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--mp-border-light);
  font-size: 0.72rem;
  color: var(--mp-text-muted);
  line-height: 1.55;
  opacity: 0.85;
}

.novedades-feedback-link {
  color: var(--mp-text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(92, 103, 120, 0.35);
  text-underline-offset: 2px;
}

.novedades-feedback-link:hover {
  color: var(--mp-accent);
  text-decoration-color: rgba(0, 120, 215, 0.45);
}

/* Bottom nav — móvil */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mp-bottom-nav-h);
  z-index: 200;
  background: var(--mp-nav-bg);
  border-top: 1px solid var(--mp-border-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.app-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.app-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  gap: 4px;
  padding: 4px 2px;
  color: var(--mp-text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.app-bottom-nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.app-bottom-nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
  font-size: 0.62rem;
}

.app-bottom-nav-item.active {
  color: var(--mp-nav-active);
}

.app-bottom-nav-item.active .app-bottom-nav-icon {
  background: var(--mp-nav-active-bg);
  color: var(--mp-nav-active);
}

.app-bottom-nav-item:active .app-bottom-nav-icon {
  transform: scale(0.94);
}

/* Mic en el footer — dictar gasto */
.app-bottom-nav-fab {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  margin-top: -24px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff5147 0%, #ff3b30 55%, #e63229 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.5);
  border: 4px solid var(--mp-nav-bg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.app-bottom-nav-fab:active {
  transform: scale(0.94);
}

.app-bottom-nav-fab.active {
  box-shadow: 0 0 0 3px rgba(255, 122, 115, 0.55), 0 6px 20px rgba(255, 59, 48, 0.5);
}

@media (min-width: 900px) {
  .app-bottom-nav {
    display: none;
  }
}

/* AppSidebar */
.app-sidebar {
  display: none;
}

@media (min-width: 900px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--mp-sidebar-w);
    background: var(--mp-surface);
    border-right: 1px solid var(--mp-border);
    z-index: 200;
  }
}

.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid var(--mp-border);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mp-text-muted);
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: var(--mp-surface-2);
  color: var(--mp-text);
}

.sidebar-link.active {
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
}

.sidebar-link i {
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--mp-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--mp-text-muted);
  margin-bottom: 8px;
  padding: 0 4px;
}

.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--mp-border);
  border-radius: 6px;
  background: transparent;
  color: var(--mp-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.sidebar-logout:hover {
  color: #ff8a8a;
  border-color: rgba(255, 138, 138, 0.4);
}

/* Login */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--mp-bg);
}

.login-box {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-logo {
  font-size: 2rem;
  margin-bottom: 32px;
}

.login-sub {
  opacity: 0.65;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.google-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* Expense form */
.wizard-progress {
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-grid.mt {
  margin-top: 16px;
}

/* Desktop sesión — gastos (carga rápida + lista) */
.desktop-gastos-session {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 380px);
  gap: 28px;
  align-items: start;
}

.desktop-gastos-quick {
  position: sticky;
  top: calc(var(--mp-header-h) + 12px);
}

.desktop-gastos-list {
  min-width: 0;
}

.expense-quick-entry {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border-light);
  border-radius: 14px;
  padding: 20px;
  border-top: 3px solid var(--eq-accent, #d92d20);
  box-shadow: var(--mp-card-shadow);
}

.expense-quick-entry-head {
  margin-bottom: 16px;
}

.expense-quick-entry-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.expense-quick-entry-new {
  padding: 0;
  font-size: 0.82rem;
  white-space: nowrap;
}

.expense-quick-entry--edit {
  border-top-color: var(--mp-accent, #2563eb);
}

.eq-actions--edit {
  align-items: center;
}

.eq-actions--edit .btn-danger {
  margin-right: auto;
}

.expense-quick-entry-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
}

.expense-quick-entry-hint {
  margin: 0;
  font-size: 0.78rem;
}

.expense-quick-entry-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eq-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.eq-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eq-monto-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eq-monto-symbol {
  font-weight: 700;
  color: var(--mp-text-muted);
  min-width: 1.5rem;
}

.eq-monto-input {
  font-size: 1.15rem;
  font-weight: 700;
}

.eq-monto-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.eq-chip {
  border: 1px solid var(--mp-border);
  background: var(--mp-hover-bg);
  color: var(--mp-text);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
}

.eq-chip:hover {
  border-color: var(--eq-accent, #ff3b30);
  color: var(--eq-accent, #ff3b30);
}

.eq-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.eq-actions .btn-primary {
  flex: 1;
  min-width: 140px;
}

.expense-quick-entry-form .transfer-conversion-box {
  margin-top: 0;
  padding: 12px;
}

.eq-kbd-hint {
  margin: 0;
  font-size: 0.72rem;
}

.eq-kbd-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--mp-border);
  font-size: 0.68rem;
  background: var(--mp-hover-bg);
}

.sb-loading--sm {
  min-height: 120px;
}

.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

.confirm-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  background: var(--mp-surface-2);
  text-align: center;
}

.confirm-monto {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--mp-accent-gasto);
  margin-bottom: 8px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 50vh;
  overflow-y: auto;
}

/* Coming soon */
.coming-soon {
  text-align: center;
  padding: 48px 24px;
}

.coming-soon-icon {
  font-size: 2.5rem;
  color: var(--mp-text-muted);
  margin-bottom: 16px;
}

.coming-soon h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.coming-soon-back {
  margin-top: 24px;
  text-decoration: none;
}

/* List views */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.list-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.list-sub {
  margin: 4px 0 0;
  font-size: 0.8rem;
}

.list-total {
  text-align: right;
}

.list-total-label {
  display: block;
  font-size: 0.7rem;
  color: var(--mp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.list-total-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--mp-accent-gasto);
}

.list-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

/* Filter badges — un toque (como front letter-badge) */
.list-filters-badges {
  margin-bottom: 16px;
}

.filter-badges-group {
  margin-bottom: 12px;
}

.filter-badges-group:last-child {
  margin-bottom: 0;
}

.filter-badges-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  opacity: 0.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px 4px;
}

.filter-badges-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-badges-row::-webkit-scrollbar {
  display: none;
}

.filter-badge {
  flex-shrink: 0;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  color: var(--mp-text);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-badge:active {
  transform: scale(0.96);
}

.filter-badge.active {
  background: var(--mp-accent);
  border-color: var(--mp-accent);
  font-weight: 700;
}

.filter-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--mp-text-muted);
  margin-bottom: 10px;
  padding: 0 4px;
}

.filter-clear-btn {
  background: none;
  border: none;
  color: var(--mp-accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

@media (min-width: 900px) {
  .filter-badges-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .filter-badge {
    max-width: none;
  }
}

/* Movement rows */
.mov-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 88px;
}

/* List footer — al final del scroll (como front UnifiedList) */
.list-footer {
  margin-top: 8px;
  padding-bottom: 16px;
}

.list-footer-summary {
  margin-bottom: 12px;
  padding: 12px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border-light);
  border-radius: 4px;
  text-align: center;
}

.list-footer-summary--mixed {
  text-align: left;
}

.list-footer-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  opacity: 0.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.list-footer-label--center {
  margin-bottom: 4px;
}

.list-footer-total--hero {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.2;
}

.list-footer-total--expense {
  color: var(--mp-accent-gasto);
}

.list-footer-total--income {
  color: #4cd964;
}

.list-footer-mixed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.list-footer-mixed-row--balance {
  border-top: 1px solid var(--mp-border-light);
  padding-top: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}

.list-footer-mixed-row .list-footer-total {
  font-size: 0.75rem;
  font-weight: 800;
}

.list-footer-mixed-row--balance .list-footer-total {
  font-size: 1rem;
}

.list-footer-periods {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.list-footer-periods .filter-badge {
  font-size: 0.6rem;
  padding: 4px 10px;
  text-transform: uppercase;
}

.mov-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--mp-border-light);
  border-radius: 8px;
  background: var(--mp-surface);
  color: var(--mp-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.mov-row:hover {
  background: var(--mp-surface-2);
  border-color: var(--mp-border);
  box-shadow: var(--mp-card-shadow);
}

.mov-row--selected,
.mov-row--selected:hover {
  background: color-mix(in srgb, #34c759 12%, var(--mp-surface));
  border-color: color-mix(in srgb, #34c759 35%, var(--mp-border));
  box-shadow: inset 3px 0 0 #34c759;
}

.mobile-ingresos-quick {
  margin-top: 16px;
  margin-bottom: 88px;
}

.mobile-ingresos-quick .expense-quick-entry {
  margin-bottom: 0;
}

.mobile-quick-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.mobile-quick-sheet {
  width: 100%;
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: var(--mp-bg);
  border-radius: 16px 16px 0 0;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  animation: mobile-sheet-up 0.22s ease-out;
}

@keyframes mobile-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-quick-sheet-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 8px;
  background: var(--mp-bg);
}

.mobile-quick-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--mp-border);
}

.mobile-quick-sheet-close {
  position: absolute;
  right: 0;
  top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: var(--mp-surface-2);
  color: var(--mp-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.mobile-quick-sheet .expense-quick-entry {
  margin-bottom: 0;
}

.mobile-quick-sheet .eq-actions--edit {
  flex-wrap: wrap;
}

.mobile-quick-sheet .eq-actions--edit .btn-danger {
  flex: 1 1 100%;
  justify-content: center;
  min-height: 44px;
}

.mov-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mov-body {
  flex: 1;
  min-width: 0;
}

.mov-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mov-sub {
  font-size: 0.75rem;
  color: var(--mp-text-muted);
  margin-top: 2px;
}

.mov-amount {
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mov-amount--expense {
  color: var(--mp-accent-gasto);
}

.mov-amount--income {
  color: #4cd964;
}

.mov-amount--transfer {
  color: #0078d7;
}

.wizard-summary-monto--income {
  color: #4cd964;
}

.wizard-summary-monto--transfer {
  color: #0078d7;
}

.wizard-summary-sub {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 4px;
}

.btn-primary--income {
  background: #34c759;
}

.btn-primary--expense {
  background: var(--mp-accent-gasto, #ff3b30);
}

.btn-primary--transfer {
  background: #0078d7;
}

.btn-wizard-next--income {
  background: #34c759;
}

.btn-wizard-next--transfer {
  background: #0078d7;
}

.btn-wizard-next--card-payment {
  background: #34c759;
}

.btn-primary--card-payment {
  background: #34c759;
}

.wizard-summary-monto--card-payment {
  color: #34c759;
}

.card-payment-target {
  text-align: center;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px dashed rgba(52, 199, 89, 0.35);
}

.card-payment-target-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 4px;
}

.card-payment-target-debt {
  display: block;
  font-size: 0.78rem;
  margin-top: 4px;
}

.card-payment-desktop {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 4px 24px;
}

.card-payment-target--desktop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  margin-bottom: 20px;
}

.card-payment-target--desktop .card-payment-target-main {
  flex: 1;
  min-width: 0;
}

.card-payment-desktop-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border-light);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--mp-card-shadow);
}

.card-payment-desktop-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.card-payment-desktop-summary-amount {
  font-size: 1.15rem;
  color: #34c759;
}

.eq-chip--card:hover {
  border-color: #34c759;
  color: #34c759;
}

.card-payment-summary {
  border-color: rgba(52, 199, 89, 0.25);
}

.card-payment-target--reintegro {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.35);
}

.card-payment-summary--reintegro {
  border-color: rgba(139, 92, 246, 0.25);
}

.btn-wizard-next--reintegro,
.btn-primary--reintegro {
  background: #8b5cf6;
}

.wizard-summary-monto--reintegro {
  color: #8b5cf6;
}

.tarjeta-action-badge--reintegro {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #a78bfa;
}

.list-footer-total--transfer {
  color: #0078d7;
}

.transfer-conversion-box {
  background: var(--mp-surface-2);
  border-radius: 8px;
  padding: 14px;
  border: 1px solid var(--mp-hover-bg);
}

.transfer-conversion-hint {
  font-size: 0.68rem;
  opacity: 0.45;
  margin-top: 6px;
}

.transfer-edit-hint {
  background: rgba(0, 120, 215, 0.08);
  border: 1px solid rgba(0, 120, 215, 0.2);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.transfer-edit-summary {
  background: var(--mp-surface-2);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--mp-hover-bg-strong);
}

.transfer-edit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--mp-surface-2);
}

.transfer-edit-row:last-child {
  border-bottom: none;
}

.transfer-financial-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.transfer-financial-panel {
  padding-top: 8px;
  border-top: 1px solid var(--mp-hover-bg-strong);
  margin-bottom: 16px;
}

.transfer-adelanto-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ff9500;
  background: rgba(255, 149, 0, 0.12);
  border: 1px solid rgba(255, 149, 0, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.transfer-adelanto-badge--inline {
  margin-bottom: 14px;
}

.wizard-step-hint {
  font-size: 0.82rem;
  opacity: 0.65;
}

/* Catalog CRUD */
.catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mp-hover-bg);
  cursor: pointer;
}

.catalog-row:active {
  background: var(--mp-surface-2);
}

.catalog-row-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.catalog-row-body {
  flex: 1;
  min-width: 0;
}

.catalog-row-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-row-sub {
  font-size: 0.78rem;
  opacity: 0.55;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-row-trailing {
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.catalog-trailing--debt {
  color: #ff6b6b;
}

.catalog-row-chevron {
  opacity: 0.25;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.catalog-pay-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(52, 199, 89, 0.35);
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-pay-btn:hover {
  background: rgba(52, 199, 89, 0.22);
}

.catalog-row--tarjeta {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.catalog-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.catalog-row-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.catalog-row-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  border-top: 1px solid var(--mp-hover-bg);
  padding-top: 10px;
}

.tarjeta-action-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tarjeta-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.tarjeta-action-badge--sm {
  flex: 1;
  justify-content: center;
  padding: 8px 10px;
  font-size: 0.72rem;
}

.tarjeta-action-badge--pago {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.35);
  color: #34c759;
}

.tarjeta-action-badge--edit {
  background: var(--mp-surface);
  border-color: var(--mp-border);
  color: var(--mp-text-muted);
}

.tarjeta-summary-card {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--mp-surface-3);
  border: 1px solid var(--mp-hover-bg-strong);
}

.tarjeta-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.tarjeta-summary-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.45;
}

.tarjeta-summary-deuda {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ff6b6b;
  margin-top: 2px;
}

.tarjeta-summary-disp {
  font-size: 0.95rem;
  font-weight: 700;
  color: #34c759;
  margin-top: 2px;
}

.tarjeta-usage-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--mp-hover-bg-strong);
  overflow: hidden;
}

.tarjeta-usage-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.section-mini-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.55;
}

.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.color-swatch.active {
  border-color: var(--mp-accent);
  box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.25);
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.icon-picker-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--mp-border-light);
  background: var(--mp-surface);
  color: var(--mp-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-picker-btn.active {
  background: var(--mp-accent-soft);
  border-color: var(--mp-accent);
  color: var(--mp-accent);
}

/* FAB */
.app-fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--mp-bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--mp-accent);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 150;
}

@media (min-width: 900px) {
  .app-fab {
    right: 32px;
    bottom: 32px;
  }

  .mov-list {
    padding-bottom: 24px;
  }

  .desktop-gastos-list .list-footer {
    padding-bottom: 8px;
  }
}

/* Desktop — tabla gastos */
.expense-dt-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.expense-dt-toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.expense-dt-toolbar-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mp-text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.expense-dt-search-input {
  padding-left: 36px;
}

.expense-dt-toolbar-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.expense-dt-date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.expense-dt-date-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mp-text-muted);
}

.expense-dt-reload-btn {
  min-height: 40px;
}

.expense-dt-toolbar-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expense-dt-preset-btn {
  font-size: 0.62rem;
}

.expense-dt-count {
  margin: 0;
  font-size: 0.78rem;
}

.expense-dt-wrap {
  margin-bottom: 12px;
}

.expense-dt-scroll {
  max-height: calc(100vh - var(--mp-header-h) - 340px);
  min-height: 200px;
  overflow: auto;
  border: 1px solid var(--mp-border-light);
  border-radius: 10px;
  background: var(--mp-surface);
  box-shadow: var(--mp-card-shadow);
}

.expense-dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.expense-dt thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--mp-surface-2);
  box-shadow: 0 1px 0 var(--mp-border-light);
}

.expense-dt-th {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mp-text-muted);
  white-space: nowrap;
  user-select: none;
}

.expense-dt-th--sortable {
  cursor: pointer;
}

.expense-dt-th--sortable:hover {
  color: var(--mp-text);
  background: var(--mp-hover-bg);
}

.expense-dt-th--active {
  color: var(--mp-accent);
}

.expense-dt-sort-icon {
  margin-left: 4px;
  font-size: 0.65rem;
  opacity: 0.45;
}

.expense-dt-th--active .expense-dt-sort-icon {
  opacity: 1;
}

.expense-dt-row {
  cursor: pointer;
  border-bottom: 1px solid var(--mp-border-light);
  transition: background 0.12s;
}

.expense-dt-row:hover,
.expense-dt-row:focus {
  background: var(--mp-surface-2);
  outline: none;
}

.expense-dt-row--selected,
.expense-dt-row--selected:hover {
  background: color-mix(in srgb, var(--mp-accent, #2563eb) 12%, var(--mp-surface));
  box-shadow: inset 3px 0 0 var(--mp-accent, #2563eb);
}

.expense-dt-row:last-child {
  border-bottom: none;
}

.expense-dt td {
  padding: 10px 12px;
  vertical-align: top;
}

.expense-dt-empty {
  padding: 32px 16px !important;
  text-align: center;
  color: var(--mp-text-muted);
}

.expense-dt-col--fecha {
  min-width: 100px;
}

.expense-dt-fecha-main {
  display: block;
  font-weight: 600;
}

.expense-dt-fecha-sub {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
}

.expense-dt-col--cat {
  min-width: 120px;
}

.expense-dt-cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.expense-dt-col--medio {
  min-width: 110px;
  max-width: 160px;
}

.expense-dt-col--desc {
  min-width: 140px;
  max-width: 240px;
}

.expense-dt-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-dt-dest {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-dt-col--monto {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  min-width: 100px;
}

@media (min-width: 900px) {
  .expense-dt-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .expense-dt-toolbar-search {
    flex: 1 1 220px;
  }

  .expense-dt-toolbar-dates {
    flex: 0 0 auto;
  }

  .expense-dt-toolbar-presets {
    flex: 0 0 auto;
    align-self: center;
  }

  .expense-dt-count {
    flex: 1 1 100%;
  }
}

/* Import CSV — desktop */
.expense-import-view {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.import-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin: 20px 0 28px;
}

.import-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
}

.import-step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mp-border-light);
  color: var(--mp-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.import-step-item--active .import-step-circle {
  background: var(--mp-accent);
  color: #fff;
}

.import-step-item--done .import-step-circle {
  background: #22c55e;
  color: #fff;
}

.import-step-label {
  font-size: 0.68rem;
  color: var(--mp-text-muted);
  font-weight: 600;
}

.import-step-item--active .import-step-label {
  color: var(--mp-accent);
}

.import-step-connector {
  flex: 1;
  max-width: 48px;
  height: 2px;
  background: var(--mp-border-light);
  margin-top: 16px;
}

.import-step-connector--done {
  background: #22c55e;
}

.import-panel {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border-light);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--mp-card-shadow);
}

.import-panel-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
}

.import-panel-hint {
  margin: 0 0 16px;
  font-size: 0.85rem;
}

.import-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.import-medios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.import-medio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--mp-border-light);
  border-radius: 10px;
  background: var(--mp-surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.import-medio-option:hover {
  border-color: var(--mp-border);
  background: var(--mp-surface-2);
}

.import-medio-option.selected {
  border-color: var(--mp-accent);
  background: var(--mp-accent-soft);
}

.import-medio-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.import-medio-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.import-medio-name {
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-medio-meta {
  font-size: 0.72rem;
}

.import-medio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border-light);
  font-size: 0.82rem;
  font-weight: 600;
}

.csv-hint {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border-light);
  border-left: 3px solid var(--mp-accent);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  margin-bottom: 12px;
  overflow-x: auto;
}

.csv-hint-header {
  color: var(--mp-accent);
  font-weight: 700;
}

.csv-hint-row {
  opacity: 0.75;
}

.csv-textarea {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  min-height: 200px;
}

.csv-line-count {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.import-grid-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.import-grid-scroll {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--mp-border-light);
  border-radius: 8px;
}

.import-grid-table {
  margin: 0;
}

.import-grid-table .form-select-sm,
.import-grid-table .form-control-sm {
  min-width: 120px;
  font-size: 0.78rem;
  padding: 4px 8px;
}

.import-grid-row--invalid {
  background: rgba(217, 45, 32, 0.06);
}

.import-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.import-status--pending {
  background: rgba(0, 120, 215, 0.12);
  color: var(--mp-accent);
}

.import-status--err {
  background: rgba(217, 45, 32, 0.12);
  color: #b42318;
}

.import-progress-bar-wrap {
  height: 8px;
  background: var(--mp-border-light);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0;
}

.import-progress-bar {
  height: 100%;
  background: var(--mp-accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.import-progress-bar--income {
  background: #34c759;
}

.import-result-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 8px;
}

.import-result-card {
  flex: 1;
  min-width: 100px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--mp-border-light);
}

.import-result-card--ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

.import-result-card--err {
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.25);
}

.import-result-card--skip {
  background: var(--mp-surface-2);
}

.import-result-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
}

/* FAB */
.dictate-header {
  align-items: center;
}

.dictate-back {
  padding: 8px 12px;
  flex-shrink: 0;
}

.dictate-panel {
  padding: 8px 0 24px;
}

.dictate-panel--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 12px;
}

.dictate-mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.dictate-mic-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  background: var(--mp-accent-gasto, #ff3b30);
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 6px 24px rgba(255, 59, 48, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dictate-mic-btn--active {
  animation: dictate-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 8px rgba(255, 59, 48, 0.15);
}

@keyframes dictate-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.dictate-mic-hint {
  text-align: center;
  color: var(--mp-text-muted, #64748b);
  margin: 0;
}

.dictate-textarea {
  min-height: 120px;
  resize: vertical;
}

.dictate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.dictate-actions .btn {
  width: 100%;
}

.dictate-actions--row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dictate-actions--row .btn {
  width: auto;
  flex: 1 1 auto;
  min-width: 140px;
}

.dictate-change-btn {
  flex-shrink: 0;
}

.dictate-original {
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--mp-surface-2, var(--mp-surface-2));
}

.dictate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dictate-field--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dictate-value {
  margin: 4px 0 0;
  font-weight: 600;
}

.dictate-conf {
  display: inline-block;
  font-size: 0.75rem;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
}

.dictate-conf--high { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.dictate-conf--mid { background: rgba(234, 179, 8, 0.15); color: #ca8a04; }
.dictate-conf--low { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

.dictate-alert {
  margin-top: 8px;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 77, 77, 0.4);
  border-radius: 6px;
  background: rgba(255, 77, 77, 0.12);
  color: #ff8a8a;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wizard-page-title {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1px;
  opacity: 0.7;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.w-100 { width: 100%; }

.readonly-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  font-size: 0.9rem;
}

.form-col--full {
  grid-column: 1 / -1;
}

/* Chip picker (CRUD selects) */
.chip-picker-wrap {
  width: 100%;
}

.chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-picker--cols {
  display: grid;
  grid-template-columns: repeat(var(--chip-cols, 2), minmax(0, 1fr));
  gap: 8px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  color: var(--mp-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.12s, border-color 0.12s;
}

.chip-picker--cols .chip-btn {
  flex-direction: column;
  width: 100%;
}

.chip-btn i {
  font-size: 1rem;
  opacity: 0.9;
}

.chip-hint {
  font-size: 0.68rem;
  opacity: 0.55;
  font-weight: 500;
}

.chip-btn.active {
  background: var(--mp-accent-soft);
  border-color: var(--mp-accent);
  color: var(--mp-accent);
  box-shadow: 0 0 0 1px rgba(0, 120, 215, 0.15);
}

.chip-btn--skeleton {
  min-width: 72px;
  min-height: 44px;
  background: var(--mp-hover-bg);
  border-color: transparent;
  animation: chip-pulse 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes chip-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

/* Entity picker (modal, orden por país) */
.entity-picker {
  width: 100%;
}

.entity-picker-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  color: var(--mp-text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.entity-picker-trigger--muted {
  opacity: 0.85;
  pointer-events: none;
}

.entity-picker-trigger:hover {
  border-color: rgba(0, 120, 215, 0.55);
}

.entity-picker-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.entity-picker-icon--placeholder {
  background: var(--mp-surface-2);
  color: var(--mp-text-muted);
  border-color: var(--mp-border-light);
}

.entity-picker-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-picker-clear {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--mp-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

.entity-picker-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(217, 45, 32, 0.35);
  background: rgba(217, 45, 32, 0.08);
  font-size: 0.82rem;
  color: #b42318;
}

.entity-picker-retry {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--mp-accent);
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
  cursor: pointer;
}

.entity-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.entity-picker-modal {
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.entity-picker-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.entity-picker-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: var(--mp-surface-2);
  color: var(--mp-text-muted);
  cursor: pointer;
}

.entity-picker-search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.45;
}

.entity-picker-search {
  margin-bottom: 8px;
}

.entity-picker-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.entity-picker-section {
  margin-bottom: 20px;
}

.entity-picker-section-label {
  display: block;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 2px solid #0078d7;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 120, 215, 0.95);
}

.entity-picker-count {
  opacity: 0.5;
  margin-left: 4px;
}

.entity-picker-popular {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 420px) {
  .entity-picker-popular {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.entity-popular-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-radius: 6px;
  border: 1px solid var(--mp-border-light);
  border-bottom-width: 2px;
  background: var(--mp-surface);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.entity-popular-tile.active {
  background: var(--mp-accent-soft);
  border-color: var(--mp-accent);
}

.entity-popular-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.1rem;
}

.entity-popular-name {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.entity-picker-row {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--mp-border-light);
  background: var(--mp-surface);
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.entity-picker-row.active {
  border-color: rgba(52, 199, 89, 0.45);
  background: rgba(52, 199, 89, 0.08);
}

.entity-picker-row-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
}

.entity-picker-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entity-picker-row-title {
  font-weight: 600;
  font-size: 0.86rem;
}

.entity-picker-row-sub {
  font-size: 0.68rem;
  opacity: 0.45;
}

.entity-picker-check {
  color: #34c759;
}

.entity-picker-empty {
  padding: 32px 16px;
  text-align: center;
  opacity: 0.35;
  font-size: 0.85rem;
}

.entity-picker-empty i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* Préstamos */
.btn-primary--loan,
.btn-wizard-next--loan {
  background: #aa00ff;
}

.wizard-summary-monto--loan {
  color: #cc44ff;
}

.card-payment-summary--loan {
  border-color: rgba(170, 0, 255, 0.25);
}

.tarjeta-action-badge--loan {
  background: rgba(170, 0, 255, 0.12);
  border-color: rgba(170, 0, 255, 0.35);
  color: #cc44ff;
}

.tarjeta-action-badge--danger {
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.3);
  color: #ff6b6b;
}

.loan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 88px;
}

.loan-card {
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  background: var(--mp-surface-2);
  padding: 14px;
  cursor: pointer;
}

.loan-card--liquidado {
  opacity: 0.55;
}

.loan-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.loan-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loan-card-body {
  flex: 1;
  min-width: 0;
}

.loan-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loan-card-sub {
  font-size: 0.7rem;
  opacity: 0.45;
}

.loan-card-side {
  text-align: right;
  flex-shrink: 0;
}

.loan-card-cuota {
  font-weight: 800;
}

.loan-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.loan-badge--activo {
  background: rgba(170, 0, 255, 0.15);
  color: #cc44ff;
  border: 1px solid rgba(170, 0, 255, 0.3);
}

.loan-badge--ok {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.loan-progress {
  height: 4px;
  background: var(--mp-hover-bg-strong);
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0;
}

.loan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #aa00ff, #cc44ff);
  transition: width 0.4s ease;
}

.loan-card-meta {
  font-size: 0.7rem;
  opacity: 0.55;
}

.loan-vence--late { color: #ff3b30; }
.loan-vence--soon { color: #ff9f0a; }

.loan-card-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--mp-hover-bg);
}

.loan-detail-summary {
  background: rgba(170, 0, 255, 0.06);
  border: 1px solid rgba(170, 0, 255, 0.15);
  border-radius: 8px;
  padding: 14px;
}

.loan-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.loan-detail-hero {
  font-size: 1.25rem;
  font-weight: 900;
  color: #cc44ff;
}

.loan-cuotas-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
}

.loan-cuota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  background: var(--mp-surface-2);
}

.loan-cuota-main {
  display: flex;
  gap: 12px;
}

.loan-cuota-num {
  font-weight: 900;
  color: #cc44ff;
}

.loan-cuota-monto {
  font-weight: 700;
}

.loan-cuota-fecha {
  font-size: 0.72rem;
}

.loan-cuota-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.loan-cuota-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.loan-cuota-badge--pagada {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.loan-cuota-badge--pendiente {
  background: rgba(255, 159, 10, 0.1);
  color: #ff9f0a;
}

.loan-cuota-badge--vencida {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

.loan-cuota-pay-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(170, 0, 255, 0.4);
  background: rgba(170, 0, 255, 0.12);
  color: #cc44ff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.loan-cuota-hint {
  background: rgba(170, 0, 255, 0.08);
  border: 1px solid rgba(170, 0, 255, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
}

.loan-cuota-preview {
  background: rgba(170, 0, 255, 0.08);
  border: 1px solid rgba(170, 0, 255, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  color: #cc44ff;
  font-weight: 600;
}

.text-income { color: #34c759; }
.text-expense { color: var(--mp-accent-gasto, #ff3b30); }

.rec-type-nav { display: flex; gap: 8px; }
.rec-type-nav-item {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--mp-border);
  background: transparent;
  color: var(--mp-text);
}
.rec-type-nav-item.active {
  background: rgba(0, 120, 215, 0.15);
  border-color: rgba(0, 120, 215, 0.35);
  color: #5ac8fa;
}
.rec-type-nav-item--link { cursor: pointer; opacity: 0.6; }

.rec-cashflow-bar {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 14px;
}
.rec-cashflow-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.45;
  margin: 0 0 10px;
}
.rec-cashflow-hint {
  font-weight: 600;
  text-transform: none;
  opacity: 0.75;
}
.rec-cashflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.rec-cashflow-cell { text-align: center; }
.rec-cashflow-label {
  display: block;
  font-size: 0.6rem;
  opacity: 0.5;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rec-cashflow-cell strong { font-size: 0.85rem; font-weight: 800; }
.rec-cashflow-alert {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: #ff9f0a;
  text-align: center;
}

.rec-form-selected {
  font-size: 0.75rem;
  color: var(--mp-text-muted);
  margin: 0;
}
.rec-form-selected i {
  color: #34c759;
  margin-right: 4px;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 88px;
}
.rec-card {
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  background: var(--mp-surface-2);
  padding: 12px;
}
.rec-card-main { display: flex; align-items: flex-start; gap: 10px; }
.rec-card-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(0, 122, 255, 0.12); color: #0078d7;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rec-card-body { flex: 1; min-width: 0; }
.rec-card-title { font-weight: 700; font-size: 0.9rem; }
.rec-card-sub { font-size: 0.65rem; opacity: 0.45; margin-top: 2px; }
.rec-card-last {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #8e8e93;
}
.rec-card-last-label {
  opacity: 0.8;
}
.rec-card-last--recent { color: #34c759; }
.rec-card-last--late { color: #ff3b30; }
.rec-card-last--neutral { color: #ff9500; }
.rec-card-last--none { color: #8e8e93; }
.rec-card-side { text-align: right; flex-shrink: 0; }
.rec-card-monto { font-weight: 800; font-size: 0.95rem; }
.rec-card-fecha-label {
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.6;
  margin-top: 4px;
}
.rec-card-fecha {
  font-size: 0.7rem; margin-top: 2px; color: #8e8e93;
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
}
.rec-card-fecha--late { color: #ff3b30; }
.rec-card-actions {
  display: flex; gap: 8px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--mp-hover-bg); flex-wrap: wrap;
}
.rec-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface-2);
  font-size: 0.72rem; font-weight: 700; cursor: pointer; color: var(--mp-text);
}
.rec-action-btn--pay {
  background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.35);
  color: #34c759;
}
.rec-action-btn--date {
  background: rgba(0, 120, 215, 0.1);
  border-color: rgba(0, 120, 215, 0.25);
  color: #5ac8fa;
}

.rec-modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 200; padding: 16px;
}
.rec-modal {
  width: 100%; max-width: 480px;
  background: var(--mp-surface-1, #1a1a1a);
  border: 1px solid var(--mp-border);
  border-radius: 12px 12px 8px 8px;
  padding: 20px;
}
.rec-modal-title { margin: 0 0 4px; font-size: 1rem; }

.rec-pay-summary {
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.rec-pay-summary-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.85rem; margin-bottom: 6px;
}
.rec-pay-summary-row span { opacity: 0.55; }

.dash-horizon {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-horizon-btn {
  border: 1px solid var(--mp-border);
  background: var(--mp-surface-2);
  color: var(--mp-text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.dash-horizon-btn--active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.45);
  color: #60a5fa;
}
.dash-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.dash-card,
.dash-pill,
.dash-alert,
.dash-list-row,
.dash-proj-row {
  border: 1px solid var(--mp-border);
  background: var(--mp-surface-2);
  border-radius: 10px;
}
.dash-card {
  padding: 14px;
}
.dash-card-label,
.dash-pill-label {
  display: block;
  font-size: 0.72rem;
  opacity: 0.65;
  margin-bottom: 6px;
}
.dash-card-value {
  font-size: 1rem;
  font-weight: 800;
}
.dash-mini-stats {
  display: grid;
  gap: 10px;
}
.dash-pill {
  padding: 12px 14px;
}
.dash-pill strong {
  display: block;
  font-size: 0.88rem;
}
.dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.dash-section-head span {
  font-size: 0.72rem;
}
.dash-alerts,
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-alert {
  padding: 12px 14px;
}
.dash-chart-card {
  border: 1px solid var(--mp-border);
  background: var(--mp-surface-2);
  border-radius: 10px;
  padding: 14px;
}
.dash-balance-chart {
  width: 100%;
  height: 180px;
  display: block;
}
.dash-chart-zero {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.dash-chart-area {
  fill: rgba(59, 130, 246, 0.12);
}
.dash-chart-line {
  fill: none;
  stroke: #60a5fa;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-chart-point {
  fill: #60a5fa;
}
.dash-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.72rem;
  opacity: 0.72;
}
.dash-bars-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 170px;
}
.dash-bars-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dash-bars-stack {
  height: 160px;
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
}
.dash-bar {
  width: 10px;
  min-height: 6px;
  border-radius: 999px 999px 0 0;
}
.dash-bar--income {
  background: #34c759;
}
.dash-bar--expense {
  background: #ff6b57;
}
.dash-bars-label {
  font-size: 0.68rem;
  opacity: 0.7;
}
.dash-chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.72rem;
  opacity: 0.82;
}
.dash-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}
.dash-legend-swatch--income {
  background: #34c759;
}
.dash-legend-swatch--expense {
  background: #ff6b57;
}
.dash-alert strong {
  display: block;
  margin-bottom: 4px;
}
.dash-alert p {
  margin: 0;
  font-size: 0.82rem;
}
.dash-alert--danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
}
.dash-alert--warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
}
.dash-alert--info {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.1);
}
.dash-alert--success {
  border-color: rgba(52, 199, 89, 0.35);
  background: rgba(52, 199, 89, 0.1);
}
.dash-list-row,
.dash-proj-row {
  padding: 12px 14px;
}
.dash-list-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
}
.dash-list-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.16);
}
.dash-list-title {
  font-weight: 700;
  font-size: 0.88rem;
}
.dash-list-sub,
.dash-list-date,
.dash-proj-sub {
  font-size: 0.72rem;
  opacity: 0.72;
}
.dash-list-side {
  text-align: right;
}
.dash-list-amount {
  font-weight: 800;
  margin-top: 4px;
}
.dash-proj-head,
.dash-proj-breakdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dash-proj-breakdown {
  margin-top: 8px;
  font-size: 0.82rem;
}
.dash-proj-sub {
  margin-top: 6px;
}
.dash-amount--positive {
  color: #34c759;
}
.dash-amount--negative {
  color: #ff3b30;
}

@media (min-width: 900px) {
  .dash-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dash-mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Entidades */
.catalog-group-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-text-muted);
  margin: 0 0 8px;
  padding-left: 2px;
}
.catalog-row--readonly .catalog-row-inner {
  cursor: default;
  opacity: 0.92;
}
.catalog-row-chevron--muted {
  opacity: 0.35;
  font-size: 0.75rem;
}
.entidad-sys-badge {
  font-size: 0.65rem;
  margin-left: 6px;
  opacity: 0.45;
}
.entidad-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

/* Perfil */
.profile-view {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 32px;
}
.profile-header {
  text-align: center;
  margin-bottom: 24px;
}
.profile-avatar-btn {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-bottom: 12px;
}
.profile-avatar-btn--busy {
  opacity: 0.6;
  pointer-events: none;
}
.profile-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--mp-border);
}
.profile-avatar-edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mp-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.profile-display-name {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
}
.profile-display-email {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--mp-text-muted);
}
.profile-version-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(255, 149, 0, 0.15);
  border: 1px solid rgba(255, 149, 0, 0.3);
  color: #ff9500;
  font-size: 0.68rem;
  font-weight: 700;
}
.profile-section-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-text-muted);
  margin: 24px 0 8px;
}
.profile-field-row {
  margin-bottom: 8px;
}
.profile-field-row label {
  display: block;
  font-size: 0.75rem;
  color: var(--mp-text-muted);
  margin-bottom: 4px;
}
.profile-readonly-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.profile-readonly-row span {
  color: var(--mp-text-muted);
}
.profile-actions {
  margin-top: 28px;
}
.btn-danger--outline {
  background: transparent;
  border-color: rgba(255, 77, 77, 0.35);
}
.mt-2 { margin-top: 8px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Perfil — herramientas y modal eliminar */
.profile-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-tool-btn {
  justify-content: flex-start;
  gap: 10px;
}
.profile-tool-result {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
}
.profile-tool-result--ok {
  background: rgba(52, 199, 89, 0.1);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.25);
}
.profile-tool-result--err {
  background: rgba(255, 77, 77, 0.08);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.2);
}
.profile-tool-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--mp-text-muted);
}
.profile-tool-error {
  margin: 0;
  font-size: 0.78rem;
  color: #ff4d4d;
}
.profile-desglose-wrap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-desglose-item {
  padding: 10px 12px;
  border: 1px solid var(--mp-border);
  border-radius: 10px;
  background: var(--mp-surface-2, rgba(0, 0, 0, 0.02));
}
.profile-desglose-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.profile-desglose-saldos {
  font-size: 0.72rem;
  color: var(--mp-text-muted);
  margin-bottom: 6px;
}
.profile-desglose-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}
.profile-desglose-table th,
.profile-desglose-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--mp-border);
}
.profile-diff-ok { color: #34c759; font-size: 0.75rem; }
.profile-diff-bad { color: #ff4d4d; font-size: 0.75rem; }
.profile-section-label--danger {
  color: #ff4d4d;
  margin-top: 24px;
}
.profile-danger-hint {
  margin: 0 0 10px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--mp-text-muted);
}
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.profile-modal {
  width: min(420px, 100%);
  padding: 20px;
  border-radius: 14px;
  background: var(--mp-surface, #fff);
  border: 1px solid var(--mp-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.profile-modal h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.profile-modal p {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--mp-text-muted);
}
.profile-modal-warn {
  color: var(--mp-text) !important;
}
.profile-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Onboarding */
.onboarding-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 32px;
  background: var(--mp-bg, #f5f5f5);
}
.onboarding-card {
  width: min(520px, 100%);
  padding: 24px 20px 20px;
  border-radius: 16px;
  background: var(--mp-surface, #fff);
  border: 1px solid var(--mp-border);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mp-border, #ddd);
  cursor: pointer;
  transition: all 0.2s ease;
}
.onboarding-dot--active {
  width: 24px;
  background: #0078d7;
}
.onboarding-dot--done {
  background: rgba(0, 120, 215, 0.45);
}
.onboarding-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}
.onboarding-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}
.onboarding-text {
  margin: 0 0 8px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--mp-text-muted);
}
.onboarding-highlight {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid #0078d7;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--mp-text-muted);
  background: rgba(0, 120, 215, 0.06);
  border-radius: 0 8px 8px 0;
}
.onboarding-link-btn {
  width: 100%;
  margin-bottom: 12px;
}
.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.onboarding-actions > .btn-primary,
.onboarding-actions > .btn-secondary {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 96px;
}
.onboarding-skip {
  color: var(--mp-accent);
  border-color: rgba(0, 120, 215, 0.35);
  background: rgba(0, 120, 215, 0.06);
}
.onboarding-progress {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: var(--mp-text-muted);
}

/* Factura QR SIFEN */
.qr-scanner-wrap {
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}
.qr-reader-host {
  width: 100%;
  min-height: 260px;
}
.qr-reader-host video {
  border-radius: 12px 12px 0 0;
  object-fit: cover;
}
.qr-scanner-stop {
  width: 100%;
  border-radius: 0;
}
/* iOS no abre el picker si el input está totalmente oculto (display:none / clip agresivo). */
.qr-file-input {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  z-index: -1;
}
.qr-factura-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--mp-surface-2);
  border: 1px solid var(--mp-border);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: left;
}
.qr-factura-summary p {
  margin: 0 0 4px;
}
.w-100 { width: 100%; }
.mb-3 { margin-bottom: 12px; }

/* Asistente IA */
.ia-view {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 24px;
}
.ia-header {
  margin-bottom: 16px;
}
.ia-lead {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}
.ia-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--mp-text-muted);
  text-align: center;
}
.ia-hint strong {
  color: var(--mp-text);
  font-weight: 600;
}
.ia-quota {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}
.ia-quota--ok { color: #34c759; }
.ia-quota--used { color: #ff6b6b; }
.ia-ofertas-input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}
.ia-chips-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mp-text-muted);
  margin: 0 0 8px;
}
.ia-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ia-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 20px;
  background: var(--mp-hover-bg);
  border: 1px solid var(--mp-border);
  color: var(--mp-text);
  font-size: 0.8rem;
  cursor: pointer;
}
.ia-chip.active {
  background: rgba(200, 134, 10, 0.22);
  border-color: rgba(200, 134, 10, 0.55);
  color: #f0a830;
}
.btn-primary--ia-offers {
  background: #c8860a;
}
.ia-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 40px 24px;
}
.ia-spinner {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}
.ia-loading-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}
.ia-loading-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--mp-text-muted);
}
.ia-result-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mp-border);
}
.ia-result-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}
.ia-result-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--mp-text-muted);
}
.ia-cached-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.75rem;
  color: var(--mp-text-muted);
  background: rgba(90, 200, 250, 0.08);
  border-left: 3px solid #5ac8fa;
  border-radius: 0 6px 6px 0;
}
.ia-result-body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--mp-text);
}
.ia-result-body h2,
.ia-result-body h3 {
  font-size: 1rem;
  margin: 16px 0 6px;
}
.ia-result-body ul {
  padding-left: 18px;
  margin: 6px 0;
}
.ia-result-body li { margin-bottom: 4px; }
.ia-result-body a {
  color: #5ac8fa;
  text-decoration: underline;
}
.ia-result-body p { margin: 0 0 10px; }
.ia-result-error { margin-bottom: 12px; }
.ia-result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.btn-ia-tts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid rgba(52, 199, 89, 0.35);
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
  font-weight: 600;
  cursor: pointer;
}
.btn-ia-tts--playing {
  background: rgba(255, 149, 0, 0.15);
  border-color: rgba(255, 149, 0, 0.4);
  color: #ffcc00;
}

/* Cuentas: fila con acciones (extracto / editar) */
.catalog-row--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.cuenta-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.cuenta-action-badge--extracto {
  background: rgba(0, 120, 215, 0.12);
  border-color: rgba(0, 120, 215, 0.35);
  color: #4aa3ff;
}

.cuenta-action-badge--edit {
  background: var(--mp-surface);
  border-color: var(--mp-border);
  color: var(--mp-text-muted);
}

/* Extracto consolidado de cuenta */
.extracto-edit-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--mp-border);
  background: var(--mp-surface);
  color: var(--mp-text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.extracto-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--mp-surface-3);
  border: 1px solid var(--mp-hover-bg-strong);
}

.extracto-balance-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.55;
}

.extracto-balance-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2px;
}

.extracto-balance-totals {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.extracto-total {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.extracto-total--in {
  background: rgba(52, 199, 89, 0.14);
  color: #34c759;
}

.extracto-total--out {
  background: rgba(255, 59, 48, 0.14);
  color: #ff6b6b;
}

.extracto-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.extracto-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 6px;
  border: none;
  border-bottom: 1px solid var(--mp-hover-bg);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.extracto-row:active {
  background: var(--mp-surface-2);
}

.extracto-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.extracto-row-body {
  flex: 1;
  min-width: 0;
}

.extracto-row-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extracto-row-sub {
  font-size: 0.75rem;
  opacity: 0.55;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extracto-row-amounts {
  text-align: right;
  flex-shrink: 0;
}

.extracto-row-amount {
  font-weight: 800;
  font-size: 0.9rem;
}

.extracto-amount--in {
  color: #34c759;
}

.extracto-amount--out {
  color: #ff6b6b;
}

.extracto-row-saldo {
  font-size: 0.72rem;
  opacity: 0.5;
  margin-top: 2px;
}

.extracto-foot-note {
  font-size: 0.72rem;
  text-align: center;
  margin-top: 14px;
}
