/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radio-boton);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  min-height: 44px;
  position: relative;
  isolation: isolate;
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-boton) var(--ease-out), opacity var(--dur-boton) ease, background-color var(--dur-boton) ease;
}
.btn:active { transform: scale(0.96); transition-duration: 90ms; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--color-blue-primary);
  color: var(--color-white);
  box-shadow: var(--sombra-suave);
}

.btn--secondary {
  background: var(--color-white);
  color: var(--color-blue-primary);
  border: 1.5px solid var(--color-blue-tint);
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { transform: translateY(-2px); box-shadow: var(--sombra-fuerte); }
  .btn--secondary:hover { background: var(--color-blue-tint); }
}

/* ------------------------------------------------------------
   RIPPLE
   Capa inyectada por js/interactions.js en el primer elemento
   hijo de cada botón tocado, para no tapar el ícono/texto ni
   recortar el resplandor propio del botón (el overflow:hidden
   vive en la capa, no en el botón).
   ------------------------------------------------------------ */
.ripple-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  transform: scale(0);
  animation: ripple-expandir 550ms var(--ease-out) forwards;
  pointer-events: none;
}

.btn--danger {
  background: var(--color-red-tint);
  color: var(--color-red-deep);
}

.btn--block { width: 100%; }
.btn--sm { padding: 8px 16px; min-height: 36px; font-size: 13px; }

.btn-entrar {
  border: none;
  background: var(--color-blue-primary);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 64px;
  border-radius: var(--radio-boton);
  position: relative;
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 32px 6px rgba(70, 110, 255, 0.55), 0 10px 26px rgba(0, 0, 0, 0.4);
  transition: transform var(--dur-boton) var(--ease-out), box-shadow var(--dur-boton) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-entrar:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 44px 10px rgba(70, 110, 255, 0.7), 0 14px 30px rgba(0, 0, 0, 0.45);
  }
}
.btn-entrar:active { transform: scale(0.96); transition-duration: 90ms; }
.btn-entrar:disabled { opacity: 0.55; box-shadow: none; }

.spinner-anillo {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: girar 700ms linear infinite;
}

/* ============================================================
   AVATAR / RAIL / DRAWER
   ============================================================ */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar--lg { width: 52px; height: 52px; font-size: 17px; }

.rail-divider {
  width: 60%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  transition: transform var(--dur-micro) var(--ease-out), background var(--dur-boton) ease, color var(--dur-boton) ease;
  position: relative;
  isolation: isolate;
}
.nav-btn svg { width: 21px; height: 21px; position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .nav-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
}
.nav-btn:active { transform: scale(0.88); transition-duration: 90ms; }
.nav-btn.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  animation: nav-rebote 380ms ease;
}
.nav-btn.is-active::before {
  content: "";
  position: absolute;
  left: -20px;
  width: 3px;
  height: 20px;
  border-radius: 3px;
  background: var(--color-green-bright);
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--color-text);
  position: relative;
  isolation: isolate;
  transition: background var(--dur-boton) ease, transform var(--dur-micro) var(--ease-out);
}
.drawer-item svg { width: 19px; height: 19px; color: var(--color-blue-primary); position: relative; z-index: 1; }
.drawer-item span { position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .drawer-item:hover { background: var(--color-surface); }
}
.drawer-item:active { transform: scale(0.98); transition-duration: 90ms; }
.drawer-item.is-active { background: var(--color-blue-tint); font-weight: 700; }

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--dur-boton) ease, transform var(--dur-micro) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .drawer-close-btn:hover { background: var(--color-surface); }
}
.drawer-close-btn:active { transform: scale(0.9) rotate(90deg); }

/* ============================================================
   TARJETAS (contenedor genérico)
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radio-tarjeta);
  padding: 16px;
  box-shadow: var(--sombra-suave);
  transition: transform var(--dur-tarjeta) var(--ease-out), box-shadow var(--dur-tarjeta) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px) scale(1.012); box-shadow: var(--sombra-fuerte); }
}
.card--flush { padding: 0; overflow: hidden; }
.card--navy { background: var(--color-blue-primary); color: #fff; border: none; }
.card--red { background: linear-gradient(135deg, var(--color-red-primary), var(--color-red-deep)); color: #fff; border: none; }

/* Brillo diagonal que recorre la tarjeta de patrimonio al pasar el
   mouse — un solo toque de "premium", no un loop constante. */
.card--navy {
  position: relative;
  overflow: hidden;
}
.card--navy::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .card--navy::after {
    transition: left 900ms var(--ease-in-out);
  }
  .card--navy:hover::after {
    left: 130%;
  }
}

.card-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.card--navy .card-label, .card--red .card-label { color: rgba(255, 255, 255, 0.75); }

.hero-value {
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 800;
  margin: 4px 0 6px;
  line-height: 1.05;
}

.hero-delta {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hero-delta--up { color: var(--color-green-primary); }
.hero-delta--down { color: var(--color-red-deep); }
.hero-delta--muted { color: var(--color-text-muted); font-weight: 500; }

/* ============================================================
   TARJETA KPI
   ============================================================ */
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon--green { background: var(--color-green-tint); color: var(--color-green-primary); }
.kpi-icon--navy { background: var(--color-blue-tint); color: var(--color-blue-primary); }
.kpi-icon--orange { background: var(--color-orange-tint); color: var(--color-orange-primary); }
.kpi-icon--red { background: var(--color-red-tint); color: var(--color-red-deep); }

.kpi-value { font-size: 19px; font-weight: 700; }
.kpi-label { font-size: 11px; color: var(--color-text-muted); }
.kpi-compare { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; }

.sparkline { width: 100%; height: 36px; margin-top: 6px; }

/* ============================================================
   TARJETAS DE CUENTA (banco / efectivo / ahorro / inversión / stori)
   ============================================================ */
.account-card {
  display: flex;
  gap: 14px;
  align-items: center;
}
.account-card__art {
  width: 92px;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(23, 27, 93, 0.25);
}
.account-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-card__body {
  flex: 1;
  min-width: 0;
}
.account-card__name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.account-card__digits {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.account-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-top: 4px;
}
.account-card__row-label { color: var(--color-text-muted); }
.account-card__amount { font-size: 15px; font-weight: 700; color: var(--color-blue-primary); }
.account-card__amount--debt { color: var(--color-red-deep); }
.account-card__amount--zero { color: var(--color-green-primary); }

@media (max-width: 340px) {
  .account-card { flex-direction: column; align-items: stretch; }
  .account-card__art { width: 100%; height: 90px; }
}

/* Tarjeta de efectivo: distinta, sin estilo bancario */
.cash-card .account-card__art {
  border-radius: 16px;
  background: var(--color-green-tint);
  box-shadow: none;
}
.cash-card .account-card__amount { color: var(--color-green-primary); }

/* Stori: tarjeta especial con bloque de fondo de recompensas */
.stori-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stori-card__top { display: flex; gap: 14px; align-items: center; }
.reward-block {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 12px 14px;
}
.reward-block__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}
.reward-block__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.reward-chip {
  background: var(--color-white);
  border-radius: 12px;
  padding: 10px 12px;
}
.reward-chip__label { font-size: 11px; color: var(--color-text-muted); }
.reward-chip__value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.reward-chip--available .reward-chip__value { color: var(--color-green-primary); }
.reward-chip--locked .reward-chip__value { color: var(--color-orange-primary); }

.segmented-bar {
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-top: 10px;
  background: var(--color-border);
}
.segmented-bar__fill--available,
.segmented-bar__fill--locked {
  transition: width 700ms var(--ease-out);
}
.segmented-bar__fill--available { background: var(--color-green-primary); }
.segmented-bar__fill--locked { background: var(--color-orange-primary); }

/* Savings / Investment cards */
.goal-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.goal-card__icon svg { width: 19px; height: 19px; }

/* ============================================================
   PROGRESO / MEDIDORES
   ============================================================ */
.progress-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress-track--light { background: var(--color-border); }
.progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 5px;
  transition: width 700ms var(--ease-out);
}
.progress-fill--green { background: var(--color-green-primary); }
.progress-fill--navy { background: var(--color-blue-primary); }

.circular-gauge {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}
.circular-gauge svg { transform: rotate(-90deg); }
.circular-gauge__track { fill: none; stroke: var(--color-border); stroke-width: 9; }
.circular-gauge__fill {
  fill: none;
  stroke: var(--color-green-bright);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 900ms var(--ease-out);
}
.circular-gauge__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.circular-gauge__number { font-size: 20px; font-weight: 800; line-height: 1; }
.circular-gauge__caption { font-size: 9px; color: var(--color-text-muted); text-transform: uppercase; }

/* ============================================================
   CHIPS / BADGES / INSIGNIAS
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radio-boton);
}
.chip--green { background: var(--color-green-tint); color: var(--color-green-primary); }
.chip--red { background: var(--color-red-tint); color: var(--color-red-deep); }
.chip--orange { background: var(--color-orange-tint); color: var(--color-orange-primary); }
.chip--navy { background: var(--color-blue-tint); color: var(--color-blue-primary); }
.chip--on-dark { background: rgba(255, 255, 255, 0.16); color: #fff; }

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.badge__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-tarjeta) var(--ease-out);
}
.badge__icon svg { width: 24px; height: 24px; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .badge:hover .badge__icon { transform: scale(1.1) rotate(-4deg); }
}
.badge:active .badge__icon { transform: scale(0.94); }
.badge__name { font-size: 11px; font-weight: 600; line-height: 1.2; }
.badge__pts { font-size: 10px; color: var(--color-green-primary); font-weight: 700; }

/* ============================================================
   LISTAS (movimientos, cuentas dentro de select, canjes)
   ============================================================ */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--color-border);
}
.list-row:last-child { border-bottom: none; }
.list-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list-row__icon svg { width: 17px; height: 17px; }
.list-row__body { flex: 1; min-width: 0; }
.list-row__title { font-size: 13px; font-weight: 600; }
.list-row__meta { font-size: 11px; color: var(--color-text-muted); }
.list-row__amount { font-size: 14px; font-weight: 700; white-space: nowrap; }
.list-row__amount--positive { color: var(--color-green-primary); }
.list-row__amount--negative { color: var(--color-red-deep); }

.list-row.is-tocable {
  cursor: pointer;
  transition: background-color var(--dur-boton) ease, transform var(--dur-micro) var(--ease-out);
}
.list-row.is-tocable:active { transform: scale(0.98); background-color: var(--color-surface); }
@media (hover: hover) and (pointer: fine) {
  .list-row.is-tocable:hover { background-color: var(--color-surface); }
}
.check-pendiente {
  color: var(--color-border);
  flex-shrink: 0;
}

/* ============================================================
   SWIPE TO DELETE (historial de movimientos)
   ============================================================ */
.swipe-item {
  position: relative;
  overflow: hidden;
}
.swipe-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}
.swipe-item__actions {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.swipe-item__delete {
  width: 76px;
  background: var(--color-red-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swipe-item__content {
  position: relative;
  background: var(--color-white);
  transform: translateX(0);
  transition: transform var(--dur-nav) var(--ease-drawer);
  touch-action: pan-y;
  cursor: grab;
  border-bottom: none !important; /* el borde entre filas lo pone .swipe-item, no el .list-row interno */
}
.swipe-item__content.is-dragging {
  transition: none;
  cursor: grabbing;
}
.swipe-item__content.is-open {
  transform: translateX(-76px);
}

/* ============================================================
   ESTADO VACÍO / ALERTA
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 24px 12px;
  color: var(--color-text-muted);
  font-size: 13px;
}
.empty-state svg { width: 30px; height: 30px; margin: 0 auto 10px; opacity: 0.5; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--success { background: var(--color-green-tint); color: #3f5c10; }
.alert--error { background: var(--color-red-tint); color: var(--color-red-deep); }
.alert--info { background: var(--color-blue-tint); color: var(--color-blue-primary); }

/* Toast (confirmaciones flotantes) */
.toast-stack {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  animation: toast-entrada 260ms ease, toast-salida 260ms ease 2.6s forwards;
}

/* ============================================================
   MODAL / FORMULARIO DE MOVIMIENTOS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 21, 51, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-seccion) ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

@media (min-width: 900px) {
  .modal-overlay { align-items: center; }
}

.modal-sheet {
  background: var(--color-white);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  border-radius: 26px 26px 0 0;
  padding: 22px 20px 26px;
  overflow-y: auto;
  transform: translateY(24px);
  transition: transform var(--dur-seccion) cubic-bezier(.25,.8,.25,1);
}
.modal-overlay.is-open .modal-sheet { transform: translateY(0); }

@media (min-width: 900px) {
  .modal-sheet { border-radius: 26px; max-height: 80vh; }
}

.modal-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--color-border);
  margin: 0 auto 16px;
}
.modal-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-sheet__title { font-size: 18px; font-weight: 800; }

.type-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.type-option {
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  isolation: isolate;
  transition: border-color var(--dur-boton) ease, background-color var(--dur-boton) ease, color var(--dur-boton) ease, transform var(--dur-micro) var(--ease-out);
}
.type-option svg { width: 20px; height: 20px; position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) {
  .type-option:hover { border-color: var(--color-blue-tint); }
}
.type-option:active { transform: scale(0.96); }
.type-option.is-selected {
  border-color: var(--color-blue-primary);
  background: var(--color-blue-tint);
  color: var(--color-blue-primary);
  animation: item-entrada 220ms var(--ease-out);
}

.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  min-height: 44px;
  transition: border-color var(--dur-boton) ease;
  background: var(--color-white);
}
.form-control:focus { border-color: var(--color-blue-primary); }
.form-control.is-invalid { border-color: var(--color-red-deep); }
.form-error {
  font-size: 11px;
  color: var(--color-red-deep);
  margin-top: 4px;
  display: none;
}
.form-error.is-visible { display: block; }

.category-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.category-pill {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radio-boton);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--dur-boton) ease, background-color var(--dur-boton) ease, color var(--dur-boton) ease, transform var(--dur-micro) var(--ease-out);
}
.category-pill svg { width: 14px; height: 14px; }
.category-pill:active { transform: scale(0.94); }
.category-pill.is-suggested { border-color: var(--color-orange-bright); background: var(--color-orange-tint); }
.category-pill.is-selected { border-color: var(--color-blue-primary); background: var(--color-blue-primary); color: #fff; }

/* ============================================================
   TOOLTIP
   ============================================================ */
.info-tooltip { position: relative; display: inline-flex; }
.info-tooltip__trigger {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(23, 27, 93, 0.1);
  color: var(--color-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.info-tooltip__trigger--on-dark {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.info-tooltip__bubble {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--color-blue-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  width: 180px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 5;
}
.info-tooltip:hover .info-tooltip__bubble,
.info-tooltip:focus-within .info-tooltip__bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   TOGGLE DE PERIODO (Mes / Año en Métricas)
   ============================================================ */
.periodo-toggle {
  display: flex;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radio-boton);
  padding: 3px;
  gap: 2px;
}
.periodo-toggle__btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radio-boton);
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  isolation: isolate;
  transition: color var(--dur-boton) ease, background-color var(--dur-boton) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.periodo-toggle__btn.is-active {
  color: var(--color-blue-primary);
  background: var(--color-white);
  box-shadow: var(--sombra-suave);
}
.periodo-toggle__btn:active { transform: scale(0.94); }

/* ============================================================
   BOTÓN FLOTANTE: NUEVO MOVIMIENTO
   ============================================================ */
.fab-nuevo-movimiento {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-red-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(194, 17, 51, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  isolation: isolate;
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-boton) var(--ease-out);
}
.fab-nuevo-movimiento svg { position: relative; z-index: 1; }
.fab-nuevo-movimiento:active { transform: scale(0.9); transition-duration: 90ms; }
@media (hover: hover) and (pointer: fine) {
  .fab-nuevo-movimiento:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 30px rgba(194, 17, 51, 0.55);
  }
}

/* ============================================================
   GRÁFICAS
   ============================================================ */
.chart-card__title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-wrap { position: relative; height: 190px; }
.donut-legend { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.donut-legend__row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.donut-legend__name { flex: 1; color: var(--color-text-muted); }
.donut-legend__pct { font-weight: 700; }
