/* ==========================================================
   GUITAFÁCIL - DISEÑO NATIVO BLUECOINS EXACTO
   ========================================================== */

:root {
  /* Paleta idéntica a Bluecoins Dark */
  --bc-bg: #0F1013;
  --bc-card: #17191E;
  --bc-card-border: #23262E;
  --bc-header-bg: #131519;
  --bc-date-bg: #1F2229;
  
  --bc-text-main: #FFFFFF;
  --bc-text-muted: #8E95A2;
  --bc-text-dim: #606775;

  --bc-pink: #FF3B62;           /* Color exacto de gastos en Bluecoins */
  --bc-pink-dim: rgba(255, 59, 98, 0.15);
  --bc-green: #00E676;          /* Color exacto de ingresos en Bluecoins */
  --bc-green-dim: rgba(0, 230, 118, 0.15);
  --bc-blue: #00B0FF;           /* Indicador activo de pestaña */
  --bc-blue-dim: rgba(0, 176, 255, 0.15);
  --bc-accent: #38BDF8;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-card: 12px;
  --radius-date: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background-color: var(--bc-bg);
  color: var(--bc-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ================= APP BAR SUPERIOR ESTILO BLUECOINS ================= */
.app-topbar {
  background-color: var(--bc-header-bg);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  height: 48px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  background: none;
  border: none;
  color: #D1D5DB;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: background-color 0.15s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.icon-btn .material-symbols-rounded {
  font-size: 22px;
}

.app-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* User pill */
.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #20232A;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #D1D5DB;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.user-avatar-sm {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bc-blue);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
}

/* ================= TABS HORIZONTALES (BLUECOINS) ================= */
.bluecoins-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background-color: var(--bc-header-bg);
  padding: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.bluecoins-tabs::-webkit-scrollbar {
  display: none;
}

.bc-tab {
  background: none;
  border: none;
  color: var(--bc-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px 12px 14px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s;
}
.bc-tab:hover {
  color: #FFFFFF;
}
.bc-tab.active {
  color: #FFFFFF;
  font-weight: 600;
}
.bc-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background-color: var(--bc-blue);
  border-radius: 2px 2px 0 0;
}

/* ================= MAIN CONTAINER ================= */
.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 10px 80px 10px;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* ================= CARDS ESTILO BLUECOINS ================= */
.bc-card {
  background-color: var(--bc-card);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--bc-card-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bc-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.bc-card-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-icon-btn {
  background: #232730;
  border: none;
  color: var(--bc-text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mini-icon-btn .material-symbols-rounded {
  font-size: 16px;
}

/* --- Módulo: Cuentas Favoritas --- */
.accounts-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.account-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.account-row-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #E2E8F0;
}
.account-card-icon {
  font-size: 14px;
}

.account-row-right {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.account-row-right.negative {
  color: var(--bc-pink);
}
.account-row-right.zero {
  color: #94A3B8;
}
.account-row-right.positive {
  color: var(--bc-green);
}

.card-footer-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.total-label-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--bc-pink);
  font-variant-numeric: tabular-nums;
}
.total-date-sub {
  font-size: 10.5px;
  color: var(--bc-text-dim);
  margin-top: 2px;
}

.pill-outline-btn {
  align-self: flex-start;
  margin-top: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.pill-outline-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* --- Módulo: Tablas de Métricas (Ganancia Neta) --- */
.metric-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 11.5px;
}
.metric-table th {
  color: var(--bc-text-muted);
  font-weight: 500;
  text-align: right;
  padding: 4px 6px;
}
.metric-table th:first-child {
  text-align: left;
}
.metric-table td {
  padding: 5px 6px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.metric-table td:first-child {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 5px;
}
.bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.bullet.green { background: var(--bc-green); }
.bullet.pink { background: var(--bc-pink); }
.bullet.blue { background: var(--bc-blue); }

/* --- Gráficos Compactos --- */
.chart-box-compact {
  position: relative;
  height: 140px;
  width: 100%;
  margin: 6px 0;
}
.chart-box-donut {
  position: relative;
  height: 180px;
  width: 100%;
  margin: 6px 0;
}

/* ================= LISTA DE TRANSACCIONES & RECORDATORIOS ================= */
.date-section {
  margin-bottom: 12px;
}

/* --- Barra de Filtro de Cuenta y Buscador --- */
.account-filter-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 176, 255, 0.1);
  border: 1px solid rgba(0, 176, 255, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.filter-banner-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #E2E8F0;
}
.filter-clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.filter-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tx-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1D2027;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 12px;
}
.tx-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
}

.date-bar {
  background-color: var(--bc-date-bg);
  border-radius: var(--radius-date);
  padding: 5px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #D1D5DB;
  margin-bottom: 6px;
}

.date-bar-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #9CA3AF;
}

.date-alert-tag {
  color: var(--bc-green);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  margin: 6px 0 8px 0;
  letter-spacing: 0.01em;
}
.date-alert-tag.overdue {
  color: var(--bc-pink);
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background-color 0.15s;
  cursor: pointer;
}
.tx-row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.tx-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.cat-circle-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}
.cat-circle-icon .material-symbols-rounded {
  font-size: 17px;
}

.tx-row-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tx-row-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.clock-icon {
  font-size: 13px;
  color: var(--bc-text-dim);
}

.tx-row-sub {
  font-size: 11px;
  color: var(--bc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 6px;
  border-radius: 12px;
  font-size: 9.5px;
  color: #CBD5E1;
  margin-top: 2px;
}

.tx-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 10px;
  flex-shrink: 0;
}

.tx-row-amount {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tx-row-amount.expense {
  color: var(--bc-pink);
}
.tx-row-amount.income {
  color: var(--bc-green);
}
.tx-row-amount.transfer {
  color: var(--bc-blue);
}

.tx-row-account {
  font-size: 10.5px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* ================= FLOATING ACTION BUTTON (BLUECOINS COMPACT) ================= */
.bc-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: #262D38;
  border: 1px solid #3A4454;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 40;
  transition: transform 0.15s, background-color 0.15s;
}
.bc-fab:hover {
  background-color: #2F3745;
  transform: scale(1.05);
}
.bc-fab .material-symbols-rounded {
  font-size: 24px;
}

/* ================= MODALES & FORMULARIOS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 100;
}
.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #17191E;
  border: 1px solid #282C36;
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 14px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  color: var(--bc-text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bc-text-muted);
}
.form-control {
  background: #20232A;
  border: 1px solid #2E333D;
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--bc-blue);
}

.btn-primary {
  background: var(--bc-blue);
  color: #000000;
  font-weight: 700;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.btn-secondary {
  background: #232730;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

/* ================= HERRAMIENTAS Y WHATSAPP ================= */
.dropzone {
  border: 2px dashed #2E333D;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dropzone:hover {
  border-color: var(--bc-blue);
}

.qr-box {
  background: #FFFFFF;
  padding: 12px;
  border-radius: 8px;
  display: inline-flex;
  margin: 10px 0;
}
.qr-box img {
  width: 180px;
  height: 180px;
  display: block;
}

/* ================= MODAL FILTROS ESTILO BLUECOINS CAPTURA 1 ================= */
.modal-filter-card {
  max-width: 440px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #181920;
  border-radius: 20px;
  border: 1px solid #2B2F3A;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.modal-sheet-handle {
  width: 36px;
  height: 4px;
  background: #3E4452;
  border-radius: 4px;
  margin: 10px auto 4px auto;
  flex-shrink: 0;
}

.filter-modal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.filter-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(147, 112, 219, 0.2);
  border: 1px solid rgba(147, 112, 219, 0.4);
  color: #C4B5FD;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-preset-pill:hover {
  background: rgba(147, 112, 219, 0.3);
}

.filter-top-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-modal-body {
  overflow-y: auto;
  padding: 14px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filter-modal-body::-webkit-scrollbar {
  width: 4px;
}
.filter-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.filter-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1F222A;
  border: 1px solid #333845;
  border-radius: 12px;
  padding: 8px 12px;
}
.filter-input-icon {
  font-size: 18px;
  color: var(--bc-text-dim);
}
.filter-control {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 12.5px;
  font-family: inherit;
}
.filter-control::placeholder {
  color: #6B7280;
}

.filter-dual-row {
  display: flex;
  gap: 10px;
}
.filter-dual-row .filter-group {
  flex: 1;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-group label {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
  margin-left: 2px;
}

.filter-input-box-sm {
  display: flex;
  align-items: center;
  background: #1F222A;
  border: 1px solid #333845;
  border-radius: 10px;
  padding: 6px 10px;
}
.filter-control-sm {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 12px;
  font-family: inherit;
  width: 100%;
}
.filter-control-sm::placeholder {
  color: #6B7280;
}
.filter-sub-icon {
  font-size: 16px;
  color: #64748B;
  cursor: default;
}

.filter-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #1F222A;
  border: 1px solid #333845;
  border-radius: 10px;
}
.filter-select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  padding: 8px 30px 8px 12px;
  font-size: 12.5px;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
}
.filter-select option {
  background: #1A1D24;
  color: #FFFFFF;
}
.filter-select-icon {
  position: absolute;
  right: 10px;
  pointer-events: none;
  font-size: 16px;
  color: #94A3B8;
}

.filter-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: #CBD5E1;
}

/* Switch estilo Bluecoins */
.bc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.bc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.bc-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333846;
  transition: .25s;
  border-radius: 24px;
}
.bc-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  transition: .25s;
  border-radius: 50%;
}
.bc-switch input:checked + .bc-slider {
  background-color: #6366F1;
}
.bc-switch input:checked + .bc-slider:before {
  transform: translateX(18px);
}

.filter-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.btn-filter-cancel {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 20px;
  transition: color 0.15s;
}
.btn-filter-cancel:hover {
  color: #FFFFFF;
}
.btn-filter-ok {
  background: #5B7B8C;
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-filter-ok:hover {
  background: #6E94A8;
}

/* --- Barra de Filtros Activos en Transacciones --- */
.active-filters-bar {
  background: #171A21;
  border: 1px solid rgba(0, 176, 255, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.active-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}
.active-filters-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #E2E8F0;
  font-weight: 600;
}
.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 176, 255, 0.12);
  border: 1px solid rgba(0, 176, 255, 0.3);
  color: #38BDF8;
  padding: 3px 8px 3px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
}
.filter-chip-remove {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 1px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s;
}
.filter-chip-remove:hover {
  color: #FF3B62;
}

/* ================= CHATBOT GEMINI IA & ASISTENTE ================= */
.bc-ai-fab {
  position: fixed;
  bottom: 70px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1E88E5 0%, #7C3AED 50%, #EC4899 100%);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
  cursor: pointer;
  z-index: 40;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bc-ai-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.65);
}
.bc-ai-fab .material-symbols-rounded {
  font-size: 22px;
  animation: aiGlow 2.5s ease-in-out infinite;
}

@keyframes aiGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #fff); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 6px #ec4899); }
}

.ai-sparkle-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1E88E5, #7C3AED, #EC4899);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-status-pill {
  background: rgba(34, 197, 94, 0.15);
  color: #4ADE80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.ai-pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px #22C55E;
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.ai-quick-input-bar {
  display: flex;
  align-items: center;
  background: #15181E;
  border: 1px solid #2B313D;
  border-radius: 10px;
  padding: 4px 6px;
  gap: 6px;
}
.ai-quick-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 12px;
  padding: 4px 6px;
}
.ai-quick-input::placeholder {
  color: #64748B;
}
.ai-action-btn {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
}
.ai-action-btn:hover {
  color: #C084FC;
  background: rgba(192, 132, 252, 0.1);
}
.ai-action-btn.recording {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  animation: recordingPulse 1s infinite;
}
.ai-send-btn {
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  border: none;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.ai-send-btn:hover {
  transform: scale(1.05);
}
.ai-quick-feedback {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
}

/* Modal Chat */
.modal-chat-card {
  max-width: 440px;
  height: 82vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  background: #14171E;
  border: 1px solid #282C38;
}
.chat-header {
  background: #1A1E27;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E88E5, #7C3AED, #EC4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.chat-ai-avatar .material-symbols-rounded {
  font-size: 18px;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #101217;
}
.chat-bubble {
  max-width: 86%;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}
.chat-bubble.ai-bubble {
  align-self: flex-start;
  background: #1E232E;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border-top-left-radius: 2px;
}
.chat-bubble.user-bubble {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: #FFFFFF;
  border-top-right-radius: 2px;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}
.chat-bubble-sender {
  font-size: 10.5px;
  font-weight: 700;
  color: #C084FC;
  margin-bottom: 4px;
}
.chat-bubble-time {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin-top: 4px;
}
.chat-tx-badge {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chat-tx-badge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bc-green);
  font-weight: 700;
  font-size: 12px;
}

.chat-quick-chips {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #14171E;
  scrollbar-width: none;
}
.chat-quick-chips::-webkit-scrollbar {
  display: none;
}
.chat-chip {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #CBD5E1;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.chat-chip:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: #8B5CF6;
  color: #FFFFFF;
}

.chat-recording-bar {
  background: rgba(239, 68, 68, 0.12);
  border-top: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.recording-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recording-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EF4444;
  animation: recordingPulse 1s infinite;
}
@keyframes recordingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}
.btn-cancel-recording {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.btn-send-recording {
  background: #EF4444;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.chat-input-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #14171E;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}
.chat-input {
  flex: 1;
  background: #1E232E;
  border: 1px solid #2B313D;
  border-radius: 20px;
  padding: 7px 12px;
  color: #FFFFFF;
  font-size: 12px;
  outline: none;
}
.chat-input:focus {
  border-color: #8B5CF6;
}
.chat-tool-btn {
  background: none;
  border: none;
  color: #94A3B8;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.chat-tool-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
}
.chat-tool-btn.recording {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  animation: recordingPulse 1s infinite;
}
.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  transform: scale(1.06);
}

.chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
}
.chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A78BFA;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
