:root {
  --bg: #070b16;
  --bg2: #0b1120;
  --panel: #0f1729;
  --panel2: #131d33;
  --panel-dark: #0a1020;
  --txt: #eaf0fb;
  --muted: #8a96b0;
  --accent: #2f80ff;
  --accent2: #1e6bff;
  --green: #22c55e;
  --red: #f4566c;
  --amber: #f5c451;
  --border: #1c2740;
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* "clip" (y no "hidden") evita que el body se vuelva su propia caja con scroll: en algunos celulares eso trababa el deslizar hacia abajo. */
html, body { margin: 0; padding: 0; width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--txt); font-size: 15px; min-height: 100vh;
}
main, .layout, .mainwrap, .view, .grid, .col-main, .col-side, .panel { min-width: 0; max-width: 100%; }
input, select, button { min-width: 0; }
input[type="date"], input[type="month"] {
  display: flex; align-items: center; width: 100%; min-width: 0; max-width: 100%;
  -webkit-min-logical-width: 0;
  -webkit-appearance: none; appearance: none;
  box-sizing: border-box; line-height: 1.2;
}
/* En iPhone los campos de fecha se deformaban; esto los normaliza. */
input[type="date"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
h1, h2, h3 { margin: 0; }
canvas { max-width: 100%; }
.chart-wrap { position: relative; height: 240px; width: 100%; }
.ui-icon {
  --icon: url("icons/wallet.svg");
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-add-circle { --icon: url("icons/add-circle.svg"); }
.icon-bank { --icon: url("icons/bank.svg"); }
.icon-help { --icon: url("icons/help.svg"); }
.icon-chat { --icon: url("icons/chat.svg"); }
.icon-calendar { --icon: url("icons/calendar.svg"); }
.icon-cash { --icon: url("icons/cash.svg"); }
.icon-credit-card { --icon: url("icons/credit-card.svg"); }
.icon-expense { --icon: url("icons/expense.svg"); }
.icon-edit { --icon: url("icons/edit.svg"); }
.icon-home { --icon: url("icons/home.svg"); }
.icon-income { --icon: url("icons/income.svg"); }
.icon-more-grid { --icon: url("icons/more-grid.svg"); }
.icon-pie-chart { --icon: url("icons/pie-chart.svg"); }
.icon-receipt-clock { --icon: url("icons/receipt-clock.svg"); }
.icon-search { --icon: url("icons/search.svg"); }
.icon-settings { --icon: url("icons/settings.svg"); }
.icon-target { --icon: url("icons/target.svg"); }
.icon-transactions { --icon: url("icons/transactions.svg"); }
.icon-trash { --icon: url("icons/trash.svg"); }
.icon-user { --icon: url("icons/user.svg"); }
.icon-link { --icon: url("icons/link.svg"); }
.icon-wallet { --icon: url("icons/wallet.svg"); }

/* ===== Portada pública ===== */
body.landing-active { background: #070b16; }
body.landing-active .bottomnav { display: none; }
body.auth-open { overflow: hidden; }
.landing-page {
  --landing-width: 1120px;
  min-height: 100vh; background: #070b16; color: var(--txt); overflow: hidden;
}
.landing-header {
  position: fixed; z-index: 30; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 40px), var(--landing-width)); height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 26px;
  box-sizing: border-box; padding: 0 16px;
  background: rgba(7, 12, 25, .92);
  border: 1px solid rgba(137, 157, 198, .18);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .34);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}
.landing-brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; }
.landing-brand .landing-brand-logo { display: block; width: 132px; height: auto; }
.landing-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.landing-nav a {
  color: #aab4c8; text-decoration: none; font-size: 13px; font-weight: 650;
}
.landing-nav a:hover { color: #fff; }
.landing-header-actions { display: flex; align-items: center; gap: 10px; }
.landing-header button, .landing-hero button {
  font-family: inherit; cursor: pointer;
}
.landing-login {
  background: transparent; border: 0; color: #c9d2e2; padding: 10px 12px;
  font-size: 13px; font-weight: 700;
}
.landing-primary, .landing-secondary {
  min-height: 46px; padding: 0 20px; border-radius: 8px; font-size: 14px; font-weight: 800;
}
.landing-primary {
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  box-shadow: 0 12px 30px rgba(47,128,255,.22);
}
.landing-primary.compact { min-height: 40px; padding-inline: 16px; font-size: 13px; }
.landing-secondary {
  border: 1px solid rgba(234,240,251,.24); background: rgba(7,11,22,.62); color: #fff;
  backdrop-filter: blur(8px);
}
.landing-primary:hover { background: var(--accent2); }
.landing-secondary:hover { border-color: rgba(234,240,251,.5); }
.landing-hero {
  position: relative; min-height: min(880px, 92vh); display: flex; align-items: center;
  padding: 108px max(24px, calc((100% - var(--landing-width)) / 2)) 80px;
  border-bottom: 1px solid var(--border);
}
.landing-hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.landing-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,11,22,.98) 0%, rgba(7,11,22,.9) 38%, rgba(7,11,22,.48) 70%, rgba(7,11,22,.62) 100%),
    linear-gradient(180deg, rgba(7,11,22,.28), rgba(7,11,22,.08) 65%, #070b16 100%);
}
.landing-hero-content { position: relative; z-index: 2; width: min(620px, 60%); }
.landing-hero h1 {
  max-width: 620px; margin: 0; font-size: 62px; line-height: 1.02; font-weight: 850; letter-spacing: 0;
}
.landing-hero h1 span { color: #6aa2ff; }
.landing-hero-content > p {
  max-width: 570px; margin: 24px 0 0; color: #b9c3d6; font-size: 19px; line-height: 1.55;
}
.landing-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.landing-hero-proof {
  display: flex; align-items: center; gap: 9px; margin-top: 22px;
  color: #8e9ab1; font-size: 13px; line-height: 1.45;
}
.landing-hero-proof .ui-icon { width: 17px; height: 17px; color: var(--accent); }
.landing-section {
  width: min(calc(100% - 40px), var(--landing-width)); margin: 0 auto; padding: 104px 0;
  scroll-margin-top: 92px;
}
.landing-section-copy { max-width: 720px; }
.landing-section h2 {
  margin: 0; font-size: 40px; line-height: 1.1; font-weight: 820; letter-spacing: 0;
}
.landing-section-copy > p, .landing-product-copy > p, .landing-trace-copy > p {
  margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6;
}
.landing-problem {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 72px; align-items: start;
}
.landing-problem-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.landing-problem-list > div {
  display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr);
  gap: 24px; padding: 21px 0; border-bottom: 1px solid var(--border);
}
.landing-problem-list b { font-size: 14px; }
.landing-problem-list span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.landing-product {
  display: grid; grid-template-columns: minmax(290px, .72fr) minmax(0, 1.28fr);
  gap: 64px; align-items: center;
}
.landing-check-list { list-style: none; margin: 28px 0 0; padding: 0; }
.landing-check-list li {
  position: relative; padding: 12px 0 12px 27px; border-bottom: 1px solid var(--border);
  color: #cbd4e4; font-size: 14px;
}
.landing-check-list li::before {
  content: ''; position: absolute; left: 2px; top: 18px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
}
.landing-product-visual { margin: 0; min-width: 0; }
.landing-product-visual img, .landing-trace-visual img {
  display: block; width: 100%; height: auto; border: 1px solid #273450;
  border-radius: 8px; box-shadow: 0 28px 70px rgba(0,0,0,.38);
}
.landing-product-visual figcaption {
  margin-top: 12px; color: #758198; font-size: 12px; text-align: right;
}
.landing-features { border-top: 1px solid var(--border); }
.landing-feature-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 54px; margin-top: 48px; border-top: 1px solid var(--border);
}
.landing-feature-list article {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 17px;
  padding: 28px 0; border-bottom: 1px solid var(--border);
}
.landing-feature-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  color: var(--accent); background: rgba(47,128,255,.1); border: 1px solid rgba(47,128,255,.2);
  border-radius: 8px;
}
.landing-feature-icon .ui-icon { width: 21px; height: 21px; }
.landing-feature-list h3, .landing-step-list h3 {
  margin: 0; font-size: 16px; line-height: 1.35;
}
.landing-feature-list p, .landing-step-list p {
  margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55;
}
.landing-trace {
  display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
  gap: 64px; align-items: center;
}
.landing-inline-stat {
  display: flex; flex-direction: column; gap: 6px; margin-top: 28px; padding-left: 16px;
  border-left: 3px solid var(--accent);
}
.landing-inline-stat strong { font-size: 14px; }
.landing-inline-stat span { color: var(--muted); font-size: 13px; }
.landing-steps { border-top: 1px solid var(--border); }
.landing-step-list {
  list-style: none; margin: 48px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border);
}
.landing-step-list li {
  display: flex; align-items: flex-start; gap: 18px; padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--border);
}
.landing-step-list li + li { padding-left: 24px; border-left: 1px solid var(--border); }
.landing-step-list > li > span { color: var(--accent); font-size: 13px; font-weight: 850; }
.landing-security {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: center;
  padding-block: 66px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.landing-security > div:first-child { max-width: 650px; }
.landing-security p { color: var(--muted); line-height: 1.6; }
.landing-security-points { display: flex; flex-direction: column; gap: 10px; }
.landing-security-points > span {
  display: flex; align-items: center; gap: 9px; color: #b7c1d3; font-size: 13px;
}
.landing-security-points .ui-icon { width: 17px; height: 17px; color: var(--accent); }
.landing-footer {
  width: min(calc(100% - 40px), var(--landing-width)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 0 36px; border-top: 1px solid var(--border); color: #6f7b91; font-size: 12px;
}
.landing-footer .landing-brand-logo { width: 122px; }

/* ===== Auth ===== */
.app-hidden { display: none !important; }
.auth-screen {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(2,5,12,.82); backdrop-filter: blur(12px); overflow-y: auto;
}
.auth-box {
  position: relative; width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid #263451; border-radius: var(--radius); padding: 30px 26px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.auth-close {
  position: absolute; top: 11px; right: 11px; width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; background: transparent; color: var(--muted);
  border-radius: 50%; font-size: 15px;
}
.auth-close:hover { background: var(--panel2); color: #fff; }
.auth-brand-logo { display: block; width: min(210px, 72%); height: auto; margin: 0 auto; }
.auth-sub { text-align: center; color: var(--muted); margin: 10px 0 22px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth-switch .link-btn { font-size: 14px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 12px; background: #fff; color: #1a1a1a; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid #dadce0; }
.google-btn:active { opacity: .85; }
.google-btn .g { font-weight: 800; color: #4285f4; font-family: Arial, sans-serif; }
.auth-forgot { display: block; width: 100%; text-align: center; margin-top: 14px; font-size: 13px; background: none; border: none; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-forgot { display: block; margin: -4px auto 0; }

@media (max-width: 899px) {
  .landing-header { top: 8px; width: calc(100% - 28px); height: 62px; padding-inline: 12px; }
  .landing-brand .landing-brand-logo { width: 124px; }
  .landing-nav { display: none; }
  .landing-login { display: none; }
  .landing-hero {
    min-height: 760px; padding: 100px 20px 66px; align-items: flex-end;
  }
  .landing-hero-image { object-position: 58% top; }
  .landing-hero-shade {
    background: linear-gradient(180deg, rgba(7,11,22,.4) 0%, rgba(7,11,22,.74) 42%, #070b16 84%);
  }
  .landing-hero-content { width: 100%; }
  .landing-hero h1 { font-size: 46px; max-width: 650px; }
  .landing-hero-content > p { font-size: 17px; max-width: 590px; }
  .landing-section { width: calc(100% - 40px); padding: 78px 0; }
  .landing-section h2 { font-size: 34px; }
  .landing-problem, .landing-product, .landing-trace, .landing-security {
    grid-template-columns: minmax(0, 1fr); gap: 42px;
  }
  .landing-product-visual { order: -1; }
  .landing-feature-list { gap: 0 30px; }
  .landing-security-points { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .landing-header { width: calc(100% - 16px); padding-inline: 10px; border-radius: 10px; }
  .landing-brand .landing-brand-logo { width: 112px; }
  .landing-primary.compact { min-height: 38px; padding-inline: 13px; }
  .landing-hero { min-height: 700px; padding-inline: 16px; }
  .landing-hero h1 { font-size: 40px; }
  .landing-hero-content > p { font-size: 16px; }
  .landing-hero-actions { align-items: stretch; flex-direction: column; }
  .landing-hero-actions button { width: 100%; }
  .landing-hero-proof { align-items: flex-start; }
  .landing-section { width: calc(100% - 32px); padding: 66px 0; }
  .landing-section h2 { font-size: 30px; }
  .landing-problem-list > div { grid-template-columns: 1fr; gap: 7px; }
  .landing-feature-list, .landing-step-list { grid-template-columns: 1fr; }
  .landing-feature-list article { grid-template-columns: 38px minmax(0, 1fr); gap: 13px; }
  .landing-feature-icon { width: 38px; height: 38px; }
  .landing-step-list li, .landing-step-list li + li {
    padding: 22px 0; border-left: 0;
  }
  .landing-security { width: calc(100% - 32px); }
  .landing-security-points { flex-direction: column; }
  .landing-footer { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; }
  .auth-screen { padding: 12px; }
  .auth-box { padding: 26px 20px; }
}

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.mainwrap { flex: 1; min-width: 0; padding: 0 16px 90px; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; background: linear-gradient(180deg, var(--bg) 60%, transparent);
}
.page-title { font-size: 22px; font-weight: 700; }
.month { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--txt); font-size: 17px; }
.profile-wrap { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: none; color: #fff; background: linear-gradient(135deg, var(--accent), #7b5cff); display: grid; place-items: center; font-weight: 700; overflow: hidden; background-size: cover; background-position: center; }
.avatar.has-photo { color: transparent; }
.profile-menu {
  position: absolute; top: 48px; right: 0; width: 250px; z-index: 40;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35); padding: 12px;
}
.profile-email { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.profile-meta { color: var(--muted); font-size: 13px; margin: 4px 0 10px; line-height: 1.5; }
.profile-menu button {
  display: block; width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--border);
  color: var(--txt); padding: 11px 12px; border-radius: 11px; margin-top: 8px; font-size: 14px;
}
#profile-logout { color: var(--red); }

/* Views */
.view { display: none; animation: fade .2s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.grid { display: flex; flex-direction: column; gap: 16px; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel-dark { background: linear-gradient(135deg, #0c1426, #0a1a3a); border: 1px solid #1a2c52; border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; }
.link-btn { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.panel-intro { color: var(--muted); font-size: 13px; line-height: 1.5; margin: -6px 0 14px; }
.empty-copy { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Hero balances */
.hero-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 13px; margin-bottom: 12px;
}
.hero-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hero-visibility-edit {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 6px 10px; border: 1px solid rgba(47,128,255,.38);
  border-radius: 9px; background: rgba(47,128,255,.12); color: var(--accent);
  font-size: 13px; font-weight: 750;
}
.hero-visibility-edit .ui-icon { width: 16px; height: 16px; }
.hero-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hbal { position: relative; min-width: 0; overflow: hidden; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.hbal .n { min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbal .v {
  display: block; width: 100%; max-width: 100%; min-width: 0; font-size: 20px; font-weight: 700;
  margin-top: 4px; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums;
  line-height: 1.12;
}
.hbal .v.neg { color: var(--red); }
.hbal.credit { border-color: #4a3a6e; }
.hero-balances-empty {
  grid-column: 1 / -1; padding: 14px; border: 1px dashed var(--border); border-radius: 12px;
  color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center;
}
.account-visibility-list { display: flex; flex-direction: column; gap: 8px; }
.account-visibility-option {
  display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important;
  margin: 0 !important; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 11px; background: var(--panel);
}
.account-visibility-option input { width: 17px !important; height: 17px; flex: 0 0 auto; }
.account-visibility-option span { display: flex; flex-direction: column; min-width: 0; color: var(--txt); }
.account-visibility-option small { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Vinculación con Telegram */
.telegram-panel { max-width: 820px; }
.telegram-status {
  display: flex; align-items: center; gap: 11px; padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
}
.telegram-status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
  background: var(--amber); box-shadow: 0 0 0 5px rgba(245,196,81,.1);
}
.telegram-status.linked .telegram-status-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(34,197,94,.1); }
.telegram-status b, .telegram-status span { display: block; }
.telegram-status b { font-size: 14px; }
.telegram-status span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.telegram-guide { counter-reset: telegram-step; }
.telegram-step {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 13px;
  padding: 17px 0; border-bottom: 1px solid var(--border);
}
.telegram-step-number {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(47,128,255,.13); border: 1px solid rgba(47,128,255,.32);
  color: var(--accent); font-size: 13px; font-weight: 850;
}
.telegram-step b { display: block; font-size: 14px; }
.telegram-step p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 4px 0 0; }
.telegram-store-links, .telegram-command-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.telegram-store-links a, .telegram-open-bot {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px;
  border: 1px solid var(--border); border-radius: 9px; color: var(--accent);
  background: var(--panel2); text-decoration: none; font-size: 13px; font-weight: 700;
}
.telegram-open-bot .ui-icon { width: 15px; height: 15px; }
.telegram-bot-unavailable { display: block; color: var(--amber); font-size: 12px; margin-top: 9px; }
.telegram-command-row { flex-wrap: nowrap; }
.telegram-command-row code {
  min-width: 0; flex: 1; padding: 10px 12px; border-radius: 9px;
  background: #080d19; border: 1px solid var(--border); color: #dce6fa;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.telegram-command-row button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 11px;
  border: 1px solid rgba(47,128,255,.34); border-radius: 9px;
  background: rgba(47,128,255,.12); color: var(--accent); font-weight: 750;
}
.telegram-command-row .ui-icon { width: 15px; height: 15px; }
.telegram-command-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; font-size: 13px; }
.telegram-command-summary b { width: 100%; font-size: 13px; }
.telegram-command-summary span { color: var(--muted); }
.telegram-command-summary code { color: var(--accent); }
@media (max-width: 560px) {
  .telegram-panel { padding: 13px; }
  .telegram-step { grid-template-columns: 27px minmax(0, 1fr); gap: 10px; padding-block: 15px; }
  .telegram-step-number { width: 25px; height: 25px; }
  .telegram-command-row { align-items: stretch; }
  .telegram-command-row code { padding: 10px; font-size: 12px; }
  .telegram-command-row button { padding-inline: 9px; }
  .telegram-command-summary { flex-direction: column; gap: 7px; }
}

/* Dólar */
.dolar { display: flex; gap: 10px; margin-bottom: 16px; }
.dol { flex: 1; background: #0c0e12; border: 1px solid #20242c; border-radius: 14px; padding: 12px; text-align: center; }
.dol .dl { font-size: 13px; color: #8a96b0; }
.dol .dv { font-size: 18px; font-weight: 700; margin-top: 4px; color: #eaf0fb; }

/* Month totals */
.month-totals { display: flex; gap: 12px; }
.mt { flex: 1; min-width: 0; background: var(--panel2); border-radius: 14px; padding: 14px; text-align: center; }
.mt.traceable { border: 1px solid transparent; color: var(--txt); font: inherit; }
.mt .val { overflow-wrap: normal; }
.mt .lbl { font-size: 13px; color: var(--muted); }
.mt .val {
  display: block; width: 100%; min-width: 0; font-size: 18px; font-weight: 700;
  margin-top: 4px; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums;
}
.mt .val.in { color: var(--green); }
.mt .val.out { color: var(--red); }

/* Category rows */
.catrow { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.catrow:is(button) { width: 100%; background: transparent; color: var(--txt); border-top: 0; border-left: 0; border-right: 0; text-align: left; font: inherit; }
.catrow:last-child { border: none; }
.catrow .l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.catrow .ui-icon, .bgt .ui-icon, .card-box .ui-icon { color: var(--accent); width: 18px; height: 18px; }
.ui-icon.cat-colored { color: var(--cat-color, var(--accent)); }
.label-icon { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cat-color-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat-color, var(--accent)); flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.bar { height: 6px; background: var(--cat-color, var(--accent)); border-radius: 3px; margin-top: 4px; }

/* Budgets */
.bgt { padding: 12px 0; border-bottom: 1px solid var(--border); }
.bgt:last-child { border: none; }
.bgt .top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.bgt .track { height: 8px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.bgt .fill { height: 100%; background: var(--cat-color, var(--green)); border-radius: 5px; }
.bgt .fill.warn { background: var(--amber); }
.bgt .fill.over { background: var(--red); }
.bgt .sub { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }

/* Card boxes */
.card-box { background: var(--panel2); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.trace-card-box { display: block; width: 100%; color: var(--txt); border: 1px solid transparent; text-align: left; font: inherit; }
.card-box .ttl { display: flex; justify-content: space-between; font-weight: 600; align-items: center; }
.card-box .meta { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.7; }
.pill { font-size: 13px; padding: 3px 10px; border-radius: 20px; background: rgba(47,128,255,.15); color: var(--accent); }
.card-box-wrap { margin-bottom: 10px; }
.card-box-wrap .card-box { margin-bottom: 0; }
.card-statement { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel2); border-radius: 0 0 14px 14px; margin-top: -2px; padding: 12px 14px;
  border-top: 1px dashed rgba(255,255,255,.08); }
.card-statement.paid { border-left: 3px solid var(--green); }
.card-statement.pending { border-left: 3px solid var(--red); }
.card-statement-info { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.card-statement-title { font-weight: 600; }
.card-statement-amount { color: var(--muted); }
.card-statement-info small { color: var(--muted); }
.card-statement-badge { font-weight: 600; font-size: 13px; width: fit-content; }
.card-statement-badge.paid { color: var(--green); }
.card-statement-badge.pending { color: var(--red); }
.card-statement-toggle { white-space: nowrap; }
.hbal-receivable { cursor: pointer; font: inherit; color: inherit; text-align: left; border: 1px dashed rgba(255,255,255,.16); }
.hbal-receivable:hover { border-color: var(--accent); }
.recv-summary { background: var(--panel2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.recv-row .recv-badge { font-size: 13px; font-weight: 600; margin-left: 6px; }
.recv-badge.paid { color: var(--green); }
.recv-badge.overdue { color: var(--red); }
.recv-badge.pending { color: var(--muted); }
.recv-row .ed-pay { color: var(--green); }

/* Cuentas a pagar */
.payable-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.payable-kpi {
  min-width: 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 13px;
}
.payable-kpi span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.payable-kpi b { display: block; font-size: 18px; overflow-wrap: anywhere; }
.payable-kpi.primary { border-color: rgba(47,128,255,.35); }
.payable-kpi.primary b { color: var(--accent); }
.payable-kpi.danger b { color: var(--red); }
.payable-kpi.warning b { color: var(--amber); }
.payable-kpi.success b { color: var(--green); }
.payable-toolbar { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.payable-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payable-filters label {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px;
}
.payable-filters select, .payable-filters input {
  display: block; width: 100%; min-width: 0; max-width: 100%; background: var(--panel2); border: 1px solid var(--border);
  color: var(--txt); padding: 11px 12px; border-radius: 11px; font-size: 14px;
}
.payable-toolbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.payable-toolbar-actions button { white-space: normal; line-height: 1.25; min-width: 0; }
.btn-primary.compact { padding: 10px 13px; border-radius: 10px; font-size: 13px; }
.bill-list { display: flex; flex-direction: column; gap: 10px; }
.bill-card {
  width: 100%; min-width: 0; max-width: 100%;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
}
.bill-card.overdue { border-color: rgba(244,86,108,.48); }
.bill-card.due-soon { border-color: rgba(245,196,81,.42); }
.bill-card.paid { opacity: .78; }
.bill-card-main {
  display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 12px;
  align-items: start; padding: 14px 14px 10px 0;
}
.bill-accent { align-self: stretch; min-height: 76px; background: var(--bill-color, var(--accent)); border-radius: 0 4px 4px 0; }
.bill-copy, .bill-title-line, .bill-dates, .bill-amount { min-width: 0; max-width: 100%; }
.bill-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bill-title-line h3 { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.bill-copy p { color: var(--muted); font-size: 13px; margin: 5px 0 8px; }
.bill-dates { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 13px; }
.bill-dates span:first-child { color: var(--txt); font-weight: 600; }
.bill-amount { grid-column: 2; text-align: left; margin-top: 4px; }
.bill-amount b { display: block; font-size: 19px; }
.bill-amount small { color: var(--amber); display: block; margin-top: 3px; }
.bill-status {
  flex: 0 0 auto; white-space: nowrap; border-radius: 999px; padding: 4px 8px;
  font-size: 11px; font-weight: 750; background: rgba(138,150,176,.13); color: var(--muted);
}
.bill-status.overdue { background: rgba(244,86,108,.13); color: var(--red); }
.bill-status.due-soon { background: rgba(245,196,81,.13); color: var(--amber); }
.bill-status.partial { background: rgba(47,128,255,.14); color: var(--accent); }
.bill-status.paid { background: rgba(34,197,94,.13); color: var(--green); }
.bill-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid var(--border); padding: 9px 12px;
}
.bill-actions button { min-height: 34px; }
.bill-pay {
  background: var(--accent); border: none; color: #fff; border-radius: 9px;
  padding: 8px 11px; font-size: 13px; font-weight: 700;
}
.danger-link { color: var(--red); }
.paid-note { color: var(--muted); font-size: 13px; }
.service-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--border); padding: 11px 0;
}
.service-row:last-child { border-bottom: 0; }
.service-row > div { min-width: 0; }
.service-row b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.service-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.service-row.paused { opacity: .55; }
.empty-state {
  display: flex; flex-direction: column; gap: 5px; padding: 20px 12px;
  border: 1px dashed var(--border); border-radius: 12px; text-align: center;
}
.empty-state b { font-size: 14px; }
.empty-state span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.bill-mini-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.bill-mini-total span { color: var(--muted); font-size: 13px; }
.bill-mini-total b { font-size: 17px; }
.bill-mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; background: transparent; color: var(--txt); border: 0;
  border-bottom: 1px solid var(--border); padding: 11px 0; text-align: left;
}
.bill-mini-row:last-child { border-bottom: 0; }
.bill-mini-main { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.bill-mini-main b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-mini-main small { color: var(--muted); font-size: 12px; }
.bill-mini-main small.overdue { color: var(--red); }
.bill-mini-main small.due-soon { color: var(--amber); }
.bill-mini-row strong { font-size: 13px; white-space: nowrap; }

/* Reports */
.report-dashboard { display: flex; flex-direction: column; gap: 12px; }
.report-dashboard > .panel, .report-pane .panel { margin-bottom: 0; }
.report-toolbar { padding: 12px; }
.report-toolbar-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-quick-field, .report-category-picker {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.report-category-picker { position: relative; }
.report-control-caption {
  color: var(--muted); font-size: 12px; line-height: 1; padding-left: 2px;
}
.report-quick-ranges {
  display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 40px;
  overflow-x: auto; scrollbar-width: none;
}
.report-quick-ranges::-webkit-scrollbar { display: none; }
.report-quick-ranges button, .report-view-tabs button {
  border: 0; background: transparent; color: var(--muted); font-weight: 700;
  white-space: nowrap; border-radius: 8px; padding: 8px 10px; min-height: 40px; font-size: 13px;
}
.report-quick-ranges button:hover, .report-quick-ranges button.active,
.report-view-tabs button:hover, .report-view-tabs button.active {
  color: var(--txt); background: var(--panel2);
}
.report-filter-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto;
}
.report-filter-toggle .ui-icon { width: 16px; height: 16px; }
.report-filter-panel { display: none; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.report-filter-panel.open { display: grid; }
.report-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-controls label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.report-controls input, .report-controls select {
  background: var(--panel2); border: 1px solid var(--border); color: var(--txt);
  min-height: 40px; padding: 9px 10px; border-radius: 9px; font-size: 13px; width: 100%; min-width: 0;
}
.report-category-toggle {
  width: 100%; min-height: 40px; display: flex; align-items: center; gap: 8px;
  background: var(--panel2); border: 1px solid var(--border); color: var(--txt);
  border-radius: 9px; padding: 9px 11px; font-size: 13px; font-weight: 700; text-align: left;
}
.report-category-toggle .ui-icon { width: 17px; height: 17px; color: var(--accent); }
.report-category-popover {
  position: absolute; top: calc(100% + 7px); right: 0; z-index: 30;
  width: min(420px, calc(100vw - 56px)); max-height: 390px; overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0,0,0,.42); padding: 12px;
}
.report-category-popover-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
.report-category-popover-head b { font-size: 13px; }
.report-category-popover .btn-primary { width: 100%; margin-top: 10px; }
.report-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.report-cat {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) 16px; align-items: center; gap: 7px;
  min-width: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--txt);
  border-radius: 9px; padding: 8px; font-size: 13px; cursor: pointer;
}
.report-cat > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-cat:has(input:checked) { border-color: var(--cat-color, var(--accent)); background: rgba(47,128,255,.08); }
.report-cat input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.report-view-tabs {
  display: inline-flex; align-self: flex-start; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; padding: 3px;
}
.report-view-tabs button { min-width: 96px; }
.report-view-tabs button.active { background: var(--accent); color: #fff; }
.report-pane { display: none; }
.report-pane.active { display: block; }
.report-chart-panel { overflow: hidden; }
.report-chart-wrap {
  position: relative; height: 320px; width: 100%;
  background: linear-gradient(180deg, rgba(126,115,255,.11), rgba(19,29,51,.1));
  border: 1px solid rgba(126,115,255,.18); border-radius: 12px; padding: 8px;
}
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rkpi {
  position: relative; overflow: hidden; min-width: 0; min-height: 96px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  color: var(--txt); text-align: left; font: inherit;
}
.rkpi::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px; height: 58px;
  background: var(--kpi-wave, rgba(47,128,255,.18));
  clip-path: polygon(0 45%, 13% 22%, 28% 38%, 44% 18%, 58% 50%, 74% 28%, 100% 40%, 100% 100%, 0 100%);
  opacity: .82;
}
.rkpi .k, .rkpi .v, .rkpi .delta { position: relative; z-index: 1; }
.rkpi .k { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.rkpi .k .ui-icon { width: 16px; height: 16px; color: var(--accent); }
.rkpi .v { font-weight: 850; font-size: 19px; margin-top: 8px; overflow-wrap: anywhere; }
.rkpi .delta { display: inline-flex; align-items: center; margin-top: 6px; border-radius: 999px; padding: 3px 7px; font-size: 11px; background: rgba(138,150,176,.14); color: var(--muted); }
.rkpi .delta.good { color: var(--green); background: rgba(34,197,94,.12); }
.rkpi .delta.bad { color: var(--red); background: rgba(244,86,108,.12); }
.rkpi.income { --kpi-wave: rgba(34,197,94,.2); }
.rkpi.expense { --kpi-wave: rgba(244,86,108,.19); }
.rkpi.balance { --kpi-wave: rgba(126,115,255,.2); }
.rkpi.focus { --kpi-wave: rgba(245,196,81,.18); }
.report-summary-side { display: flex; flex-direction: column; gap: 12px; }
.report-distribution-content { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; }
.report-donut-wrap { position: relative; height: 160px; display: grid; place-items: center; }
.report-donut-wrap canvas { max-height: 160px; }
.report-donut-total {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
  text-align: center; font-weight: 850; font-size: 18px; line-height: 1.1;
}
.report-donut-total span {
  display: block; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums;
}
.report-donut-total small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; margin-top: 5px; }
.report-share-list, .report-deltas { display: flex; flex-direction: column; gap: 7px; }
.share-row, .delta-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.share-row:is(button) { width: 100%; background: transparent; border: 0; color: var(--txt); padding: 4px 0; text-align: left; font: inherit; }
.share-row .name, .delta-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row .meta, .delta-row .meta { color: var(--muted); font-size: 13px; }
/* % y monto siempre alineados a la derecha, prolijos sin importar el largo */
.share-row > div:last-child, .delta-row > div:last-child { text-align: right; }
.share-row > div:last-child b { display: block; }
.share-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.delta-row .change.up { color: var(--red); }
.delta-row .change.down { color: var(--green); }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.report-table th, .report-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.report-table th { color: var(--muted); font-weight: 700; }
.report-table td.amount { font-weight: 800; text-align: right; white-space: nowrap; }
.report-table tr:last-child td { border-bottom: 0; }
.traceable-report-row { cursor: pointer; }
.traceable-report-row:hover { background: rgba(47,128,255,.06); }
.feedback-list { display: flex; flex-direction: column; gap: 10px; }
.feedback-item { background: var(--panel2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 13px; color: var(--txt); line-height: 1.45; }
.feedback-note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.report-feedback-panel { max-width: 900px; }

/* Tx list */
.tx-panel-head { margin-bottom: 10px; }
.tx-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tx-tools-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.tx-search {
  position: relative; display: flex; align-items: center; min-width: 0; margin: 0;
}
.tx-search .ui-icon {
  position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.tx-search input {
  width: 100%; min-width: 0; min-height: 44px; background: var(--panel2); border: 1px solid var(--border); color: var(--txt);
  padding: 10px 11px 10px 39px; border-radius: 11px; font-size: 14px;
}
.tx-search input:focus, .tx-filters select:focus, .tx-filters input:focus {
  outline: none; border-color: rgba(47,128,255,.75); box-shadow: 0 0 0 3px rgba(47,128,255,.14);
}
.tx-filter-toggle {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 11px; padding: 9px 11px; font-size: 13px; font-weight: 700;
}
.tx-filter-toggle .ui-icon { width: 17px; height: 17px; }
.tx-filter-toggle.active { color: var(--accent); border-color: rgba(47,128,255,.55); }
.tx-filter-toggle b {
  display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px;
}
.tx-filters { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tx-filters.open { display: grid; }
.tx-filters label { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--muted); font-size: 12px; }
.tx-filters label:nth-child(3) { grid-column: 1 / -1; }
.tx-filters select, .tx-filters input {
  display: block; width: 100%; min-width: 0; max-width: 100%;
  min-height: 40px; background: var(--panel2); border: 1px solid var(--border); color: var(--txt);
  padding: 8px 9px; border-radius: 9px; font-size: 13px;
}
.tx-filters select:disabled { opacity: .55; }
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tx:last-child { border: none; }
.tx .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; flex-shrink: 0; color: var(--accent); }
.tx .ic.in { color: var(--tx-color, var(--green)); }
.tx .ic.out { color: var(--tx-color, var(--red)); }
.tx .ic.tr { color: var(--amber); }
.tx .ic .ui-icon { width: 21px; height: 21px; }
.tx .info { flex: 1; min-width: 0; }
.tx .info.traceable-info { cursor: pointer; }
.tx .info.traceable-info:hover .t1 { color: var(--accent); }
.tx .info .t1 { font-weight: 600; font-size: 14px; }
.tx .info .t2 { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tx .amt { font-weight: 700; font-size: 15px; white-space: nowrap; }
.tx .amt.in { color: var(--tx-color, var(--green)); } .tx .amt.out { color: var(--tx-color, var(--red)); } .tx .amt.tr { color: var(--amber); }
.tx-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tx-action {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: transparent; border: none; border-radius: 8px; color: var(--muted); padding: 0;
}
.tx-action .ui-icon { width: 17px; height: 17px; }
.tx-action.edit:hover { color: var(--accent); background: rgba(47,128,255,.1); }
.tx-action.del:hover { color: var(--red); background: rgba(244,86,108,.1); }

/* Carga inteligente */
.smart-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.smart-import-controls {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end;
}
.smart-import-controls label, .import-row > label {
  display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px;
}
.smart-import-controls input, .smart-import-controls select,
.import-row input, .import-row select {
  width: 100%; min-width: 0; background: var(--panel2); border: 1px solid var(--border);
  color: var(--txt); padding: 10px 11px; border-radius: 10px; font-size: 13px;
}
.smart-import-controls input[type="file"] { padding: 8px; }
.smart-import-controls input[type="file"]::file-selector-button {
  background: rgba(47,128,255,.14); border: 0; color: var(--accent);
  padding: 8px 10px; border-radius: 8px; margin-right: 9px; font-weight: 700;
}
.smart-status { min-height: 20px; margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.smart-status.error { color: var(--red); }
.smart-status.success { color: var(--green); }
.import-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0;
}
.import-summary span {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 10px; color: var(--muted); font-size: 12px;
}
.import-summary b { display: block; color: var(--txt); font-size: 16px; margin-bottom: 2px; }
.import-summary .success b { color: var(--green); }
.import-summary .warning b { color: var(--amber); }
.import-summary .danger b { color: var(--red); }
.import-list { display: flex; flex-direction: column; gap: 9px; }
.import-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px; align-items: start; padding: 12px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 12px;
}
.import-row.invalid { border-color: rgba(244,86,108,.4); }
.import-row.possible-duplicate { border-color: rgba(245,196,81,.35); }
.import-check { display: grid !important; place-items: center; padding-top: 7px; }
.import-check input { width: 17px; height: 17px; accent-color: var(--accent); padding: 0; }
.import-main { min-width: 0; grid-column: 2; }
.import-description { font-weight: 700; }
.import-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.import-meta input { width: 145px; padding: 8px 9px; color: var(--muted); }
.import-state { font-size: 11px; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.import-state.error { color: var(--red); background: rgba(244,86,108,.12); }
.import-state.duplicate { color: var(--amber); background: rgba(245,196,81,.12); }
.import-state.rule { color: var(--green); background: rgba(34,197,94,.12); }
.import-state.review { color: var(--muted); background: rgba(138,150,176,.12); }
.import-row > label:not(.import-check) { grid-column: 2; }
.import-amount span { display: flex; align-items: center; gap: 7px; }
.import-amount small { color: var(--muted); min-width: 28px; }
.import-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px;
}
.import-footer span { color: var(--muted); font-size: 13px; }
.import-footer button:disabled { opacity: .45; cursor: not-allowed; }
.rules-list { display: flex; flex-direction: column; }
.rule-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.rule-row:last-child { border-bottom: 0; }
.rule-copy { min-width: 0; }
.rule-copy b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.rule-copy span { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 4px; }

/* Admin rows */
.admin-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.admin-row:last-child { border: none; }
.admin-row .meta { color: var(--muted); font-size: 13px; }
.admin-row button { background: none; border: none; color: var(--accent); font-size: 13px; }
.installment-plan-open {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; color: var(--txt) !important; padding: 4px 0;
}
.installment-plan-open b { overflow-wrap: anywhere; }
.installment-plan-open .meta { display: block; margin-top: 3px; line-height: 1.45; }
.installment-plan-delete { flex: 0 0 auto; color: var(--red) !important; }
.admin-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-shrink: 0; }
.admin-actions .de { color: var(--red); }
.admin-test-msg { min-height: 18px; margin: -4px 0 10px; font-size: 13px; }
.btn-add { background: var(--panel2); color: var(--accent); border: 1px solid var(--border); padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.code-line { background: #0a0e16; border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-family: ui-monospace, monospace; font-size: 15px; color: var(--accent); text-align: center; user-select: all; }
.biglink { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--border); color: var(--txt); padding: 16px; border-radius: 14px; font-size: 15px; margin-bottom: 12px; }
.biglink .ui-icon { color: var(--accent); }

/* Forms */
.seg { display: flex; background: var(--panel2); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.seg-btn { flex: 1; padding: 10px; border: none; background: transparent; color: var(--muted); border-radius: 9px; font-size: 14px; font-weight: 600; }
.seg-btn.active { background: var(--accent); color: #fff; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.row2 { display: flex; gap: 12px; } .row2 label { flex: 1; }
.form input, .form select, .modal-box input, .modal-box select {
  background: var(--panel2); border: 1px solid var(--border); color: var(--txt);
  padding: 13px; border-radius: 12px; font-size: 16px; width: 100%;
}
.modal-box input[type="color"] { height: 50px; padding: 6px; cursor: pointer; }
.modal-box input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.modal-box input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
#f-amount { font-size: 26px; font-weight: 700; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 700; }

/* Modal compacto para cargar movimientos */
.movement-modal-box { max-width: 680px; padding: 18px; }
.movement-modal-box .modal-top { margin-bottom: 10px; }
.movement-modal-box .seg { margin-bottom: 12px; }
.movement-modal-box .seg-btn { padding: 9px; }
.movement-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.movement-form label { margin: 0; gap: 5px; font-size: 13px; }
.movement-form input, .movement-form select {
  padding: 10px 11px; border-radius: 10px; font-size: 14px; min-height: 42px;
}
.movement-form .movement-amount { grid-column: 1 / -1; }
.movement-form #f-amount {
  min-height: 58px; padding: 8px 12px; font-size: 24px; border-color: rgba(47,128,255,.25);
}
.movement-form #grp-account { display: contents; }
.movement-form #grp-transfer {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.movement-more-toggle {
  grid-column: 1 / -1; width: 100%; min-height: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: transparent; color: var(--accent); border: 1px dashed var(--border);
  border-radius: 10px; padding: 8px 11px; font-size: 13px; font-weight: 700; text-align: left;
}
.movement-more-toggle small {
  color: var(--muted); font-size: 12px; font-weight: 500; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.movement-more-toggle::after { content: '⌄'; color: var(--muted); font-size: 15px; }
.movement-more-toggle.open::after { content: '⌃'; }
.movement-more-fields {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 10px; padding: 10px; background: rgba(255,255,255,.018);
  border: 1px solid var(--border); border-radius: 10px;
}
.movement-more-fields #grp-cuotas {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px; grid-column: 1 / -1;
}
.movement-save, .movement-form .form-msg { grid-column: 1 / -1; }
.movement-save { min-height: 44px; padding: 11px; font-size: 14px; }
.movement-form .form-msg { margin: -2px 0 0; min-height: 16px; font-size: 13px; }

/* ===== Animación de "apretado" en botones ===== */
.btn-primary, .google-btn, .btn-add, .seg-btn, .link-btn, .nav-btn, .snav,
.fab, .inline-action, .admin-row button, .modal-box button, .movement-more-toggle {
  transition: transform .08s ease, opacity .15s ease, background .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active, .google-btn:active, .btn-add:active,
.seg-btn:active, .modal-box button:active {
  transform: scale(.96); opacity: .9;
}
.link-btn:active, .nav-btn:active, .snav:active,
.inline-action:active, .admin-row button:active {
  transform: scale(.93); opacity: .8;
}
.fab:active { transform: scale(.9); opacity: .92; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent2); }
  .google-btn:hover, .btn-add:hover { box-shadow: 0 0 0 1px var(--accent); }
}
.form-msg { text-align: center; font-size: 14px; min-height: 20px; }
.form-msg.err { color: var(--red); } .form-msg.ok { color: var(--green); }
.form-msg a { color: var(--accent); font-weight: 700; }
.form-msg small { color: var(--muted); line-height: 1.4; }
.inline-action { margin-top: 8px; background: none; border: none; color: var(--accent); font-weight: 700; font-size: 14px; }
.hidden { display: none !important; }

/* Bottom nav (móvil) */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; background: var(--bg2); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav-btn { flex: 1; background: none; border: none; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; }
.nav-btn .ui-icon { width: 22px; height: 22px; }
.nav-btn.active { color: var(--accent); }
.fab {
  width: 58px; height: 58px; margin: -23px 8px 0; border-radius: 50%;
  border: 4px solid var(--bg2); background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; box-shadow: 0 10px 24px rgba(47,128,255,.38); flex-shrink: 0;
  display: grid; place-items: center; padding: 0;
}
.fab .ui-icon { width: 31px; height: 31px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; }
.modal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-box .x { background: none; border: none; color: var(--muted); font-size: 18px; }
.modal-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.modal-box label.checkline { flex-direction: row; align-items: center; color: var(--txt); }
.modal-box label.checkline input { width: auto; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-actions button { flex: 1; }

/* Trazabilidad de totales, gráficos y cuotas */
.traceable, .traceable-row, .trace-card-box { cursor: pointer; }
.traceable:focus-visible, .traceable-row:focus-visible, .trace-card-box:focus-visible,
.installment-plan-open:focus-visible, .trace-plan-link:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
@media (hover: hover) {
  .rkpi.traceable:hover, .mt.traceable:hover, .trace-card-box:hover {
    border-color: rgba(47,128,255,.48); transform: translateY(-1px);
  }
  .traceable-row:hover { color: var(--accent); background: rgba(47,128,255,.045); }
}
.trace-modal-box { max-width: 720px; padding: 18px; }
.trace-modal-top { align-items: flex-start; }
.trace-eyebrow {
  display: block; margin-bottom: 4px; color: var(--accent); font-size: 11px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.trace-modal-top h3 { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.trace-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px;
}
.trace-stat {
  min-width: 0; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 11px; padding: 10px 11px;
}
.trace-stat span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.trace-stat b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.trace-stat.income b { color: var(--green); }
.trace-stat.expense b { color: var(--red); }
.trace-body {
  max-height: min(58vh, 530px); overflow-y: auto; padding-right: 3px;
  scrollbar-color: var(--border) transparent;
}
.trace-loading, .trace-empty { color: var(--muted); text-align: center; padding: 24px 10px; font-size: 13px; }
.trace-empty.error { color: var(--red); }
.trace-transaction {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--border);
}
.trace-transaction:last-child { border-bottom: 0; }
.trace-transaction-icon {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: var(--panel2); color: var(--red);
}
.trace-transaction-icon.income { color: var(--green); }
.trace-transaction-icon.transfer { color: var(--amber); }
.trace-transaction-icon .ui-icon { width: 19px; height: 19px; }
.trace-transaction-copy { min-width: 0; }
.trace-transaction-copy > b {
  display: block; font-size: 13px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trace-transaction-copy > span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.trace-transaction > strong { font-size: 13px; white-space: nowrap; }
.trace-transaction > strong.income { color: var(--green); }
.trace-transaction > strong.expense { color: var(--red); }
.trace-transaction > strong.transfer { color: var(--amber); }
.trace-plan-link {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 0;
  background: none; border: 0; color: var(--accent); font-size: 12px; font-weight: 700;
}
.trace-plan-link .ui-icon { width: 14px; height: 14px; }
.trace-plan-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.trace-plan-meta span {
  display: inline-flex; align-items: center; gap: 5px; color: var(--muted);
  background: var(--panel2); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 8px; font-size: 11px;
}
.trace-plan-meta .ui-icon { width: 13px; height: 13px; color: var(--accent); }
.trace-installments { display: flex; flex-direction: column; }
.trace-installment {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 11px; border-left: 3px solid var(--border); border-bottom: 1px solid var(--border);
}
.trace-installment.current { border-left-color: var(--accent); background: rgba(47,128,255,.07); }
.trace-installment b { display: block; font-size: 13px; }
.trace-installment span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.trace-installment strong { font-size: 13px; white-space: nowrap; }

/* ===== Escritorio: panel lateral + columnas ===== */
@media (min-width: 900px) {
  body { font-size: 15px; }
  .sidebar {
    display: flex; flex-direction: column; width: 250px; flex-shrink: 0;
    background: var(--bg2); border-right: 1px solid var(--border);
    padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  }
  .side-nav { overflow-y: auto; min-height: 0; padding-right: 2px; }
  .sidebar-brand-logo { display: block; width: 150px; height: auto; }
  .welcome { margin: 22px 0 18px; font-size: 16px; font-weight: 600; }
  .welcome { overflow-wrap: anywhere; }
  .welcome small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 4px; }
  .nav-section { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 16px 8px 8px; }
  .snav { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; color: var(--muted); padding: 11px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
  .snav .ui-icon { width: 19px; height: 19px; }
  .snav:hover { background: var(--panel); color: var(--txt); }
  .snav.active { background: var(--accent); color: #fff; }
  .side-add { margin-top: auto; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; padding: 13px; border-radius: 12px; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .side-add .ui-icon { width: 21px; height: 21px; }

  .mainwrap { padding: 0 24px 24px; max-width: 1280px; margin: 0 auto; }
  .topbar { padding: 16px 0; }
  .bottomnav { display: none; }
  .panel { padding: 14px; margin-bottom: 12px; }
  .panel-head { margin-bottom: 11px; }

  /* dos columnas */
  .grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
  .col-main, .col-side { display: flex; flex-direction: column; }
  .hero-balances { grid-template-columns: repeat(4, 1fr); }
  #view-presupuestos .panel { max-width: 820px; }
  .tx-tools-main { grid-template-columns: minmax(0, 1fr); }
  .tx-filter-toggle { display: none; }
  .tx-filters { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
  .tx-filters label:nth-child(3) { grid-column: auto; }
  #view-reportes .panel { max-width: none; }
  .report-toolbar { padding: 10px 12px; }
  .report-toolbar-main { justify-content: flex-start; }
  .report-filter-toggle { display: none; }
  .report-filter-panel {
    display: grid; grid-template-columns: minmax(0, 1fr);
    align-items: end; gap: 8px; margin-top: 8px;
  }
  .report-controls { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .report-overview-grid { grid-template-columns: minmax(0, 1.7fr) minmax(310px, .9fr); gap: 12px; }
  .report-view-tabs { margin-top: -2px; }
  .smart-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .smart-rules-panel { max-width: 780px; }
  .payable-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .payable-toolbar { flex-direction: row; align-items: end; justify-content: space-between; }
  .payable-filters { width: min(420px, 50%); }
  .payable-toolbar-actions { display: flex; align-items: center; }
  .payable-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); }
  .bill-card-main { grid-template-columns: 4px minmax(0, 1fr) auto; align-items: center; }
  .bill-amount { grid-column: 3; grid-row: 1; text-align: right; margin: 0; }
  .movement-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .movement-form #grp-transfer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .movement-more-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .hero-balances { grid-template-columns: repeat(5, 1fr); }
  .report-toolbar {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 12px;
  }
  .report-filter-panel {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px); margin-top: 0;
  }
  .smart-import-controls { grid-template-columns: minmax(180px, 1.3fr) minmax(145px, 1fr) minmax(145px, 1fr) auto; }
  .import-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .import-row {
    grid-template-columns: 28px minmax(170px, 1.5fr) minmax(90px, .65fr) minmax(120px, .9fr) minmax(110px, .9fr) minmax(95px, .65fr);
    align-items: end;
  }
  .import-main { grid-column: auto; }
  .import-row > label:not(.import-check) { grid-column: auto; }
}
@media (max-width: 560px) {
  .mainwrap { padding-inline: 12px; }
  .topbar { padding-inline: 2px; }
  #view-movimientos > .panel, #view-pagos .panel { padding: 12px; }
  .payable-kpis { gap: 8px; margin-bottom: 12px; }
  .payable-kpi { padding: 11px; }
  .payable-kpi b { font-size: 16px; }
  .payable-toolbar { gap: 10px; }
  .payable-filters { gap: 8px; }
  .payable-filters select, .payable-filters input { padding: 9px; font-size: 13px; }
  .payable-toolbar-actions { gap: 8px; }
  .payable-toolbar-actions button { min-height: 42px; padding: 9px 7px; font-size: 13px; }
  .bill-card-main { gap: 9px; padding: 12px 10px 9px 0; }
  .bill-copy p { margin-block: 4px 7px; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .report-chart-wrap { height: 275px; }
  .report-view-tabs { width: 100%; }
  .report-view-tabs button { flex: 1; min-width: 0; padding-inline: 6px; }
  .report-distribution-content { grid-template-columns: 125px minmax(0, 1fr); gap: 9px; }
  .report-donut-wrap { height: 135px; }
  .report-donut-wrap canvas { max-height: 135px; }
  .report-donut-total { font-size: 14px; }
  .report-category-popover { position: fixed; top: 118px; left: 16px; right: 16px; width: auto; max-height: calc(100vh - 150px); }
  .report-cats { grid-template-columns: 1fr; }
  .movement-modal-box {
    max-height: calc(100vh - 24px); padding: 14px; border-radius: 14px;
  }
  .movement-modal-box .modal-top h3 { font-size: 17px; }
  .movement-modal-box .seg { margin-bottom: 9px; }
  .movement-form { gap: 8px; }
  .movement-form input, .movement-form select { min-height: 40px; padding: 9px 10px; }
  .movement-form #f-amount { min-height: 52px; font-size: 22px; }
  .movement-more-toggle { min-height: 38px; }
  .movement-save { min-height: 42px; }
  .tx-panel-head h2 { font-size: 14px; }
  .tx-tools-main { gap: 7px; }
  .tx-filter-toggle { padding-inline: 10px; }
  .tx-filter-toggle > span:not(.ui-icon) { display: none; }
  .tx-filters { padding-top: 2px; }
  .import-footer { align-items: stretch; flex-direction: column; }
  .import-footer button { width: 100%; }
  .tx { gap: 8px; }
  .tx .ic { width: 36px; height: 36px; border-radius: 10px; }
  .tx .amt { font-size: 14px; }
  .tx-actions { flex-direction: column; gap: 0; }
  .tx-action { width: 28px; height: 28px; }
  .trace-modal-box { max-height: calc(100vh - 24px); padding: 14px; border-radius: 14px; }
  .trace-modal-top h3 { font-size: 17px; }
  .trace-summary { gap: 6px; }
  .trace-stat { padding: 9px; }
  .trace-stat b { font-size: 13px; }
  .trace-body { max-height: calc(100vh - 220px); }
  .trace-transaction { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; }
  .trace-transaction-icon { width: 32px; height: 32px; }
  .trace-transaction-copy > b { max-width: 100%; }
  .trace-transaction > strong { font-size: 13px; }
  .trace-installment { padding-inline: 9px; }
}
@media (min-width: 560px) and (max-width: 899px) {
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Resumen compacto en celular (que entren patrimonio y "Este mes") ===== */
@media (max-width: 560px) {
  .hero { padding: 12px; }
  .hero-head { margin-bottom: 8px; font-size: 13px; }
  .hero-balances { gap: 8px; }
  .hbal { padding: 9px 10px; border-radius: 12px; }
  .hbal .n { font-size: 12px; }
  .hbal .v { font-size: 16px; margin-top: 2px; }
  .hero-visibility-edit { min-height: 29px; padding: 5px 8px; }
  .month-totals { gap: 8px; }
  .mt { padding: 10px 6px; border-radius: 12px; }
  .mt .lbl { font-size: 12px; }
  .mt .val { font-size: 13px; }
}

/* ===== Resumen (compu): el gráfico llena el alto para no dejar hueco ===== */
@media (min-width: 1000px) {
  #view-inicio .col-main { display: flex; flex-direction: column; gap: 12px; }
  #view-inicio .col-main > * { margin-bottom: 0; }
  #view-inicio .col-main > .panel:last-child { flex: 1 1 auto; display: flex; flex-direction: column; }
  #view-inicio .col-main > .panel:last-child .chart-wrap { flex: 1 1 auto; height: auto; min-height: 260px; }
}

/* ===== Tooltips de ayuda (circulito con !) ===== */
.panel, .hero { position: relative; }
.help-dot {
  position: absolute; top: 13px; right: 13px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; padding: 0; margin: 0;
  font-size: 11px; font-weight: 800; line-height: 1; cursor: help;
  background: rgba(47,128,255,.15); color: var(--accent); border: 1px solid rgba(47,128,255,.45);
  flex: 0 0 auto;
}
.help-dot:hover { background: rgba(47,128,255,.3); }
/* Reserva un huequito en la esquina para que el "!" no pise los botones del encabezado. */
.panel-head:has(.help-dot), .hero-head:has(.help-dot) { padding-right: 26px; }
.help-tip {
  position: fixed; z-index: 400; max-width: 260px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--txt);
  box-shadow: 0 14px 36px rgba(0,0,0,.5);
}
.help-tip.hidden { display: none; }

/* ===== Alturas uniformes en barras de filtros y acciones ===== */
.smart-import-controls input,
.smart-import-controls select,
.smart-import-controls button,
.payable-filters select,
.payable-filters input,
.payable-toolbar-actions button,
.report-controls input,
.report-controls select,
.report-category-toggle,
.report-quick-ranges button,
.report-filter-toggle,
.tx-filters select,
.tx-filters input,
.tx-search input,
.tx-filter-toggle {
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}
.smart-import-controls input[type="file"] { padding-top: 0; padding-bottom: 0; line-height: 42px; }
.report-quick-ranges { min-height: 44px; }
.report-quick-ranges button,
.payable-toolbar-actions button,
.smart-import-controls button {
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===== Config con pestañas y categorías agrupadas ===== */
.config-panel { display: flex; flex-direction: column; gap: 14px; }
.config-tabs { align-self: stretch; }
.config-tabs button { flex: 1; min-width: 0; }
.config-pane { display: none; }
.config-pane.active { display: block; }
.category-groups-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
}
.category-group { min-width: 0; }
.cat-group-head {
  display: flex; align-items: center; gap: 8px; margin: 0 2px 8px;
  color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: 0;
}
.cat-group-head .ui-icon { width: 16px; height: 16px; }
.cat-group-head.income { color: var(--green); }
.cat-group-head.expense { color: var(--red); }
.cat-group-head.both { color: #a6afc1; }
.cat-group-head b { margin-left: auto; font-weight: 700; opacity: .8; }
.category-group-list { display: flex; flex-direction: column; gap: 8px; }
.category-admin-row {
  min-height: 54px; margin: 0; padding: 9px 10px 9px 14px;
  border: 1px solid var(--border) !important; border-radius: 12px;
}
.category-admin-row.income {
  background: rgba(34,197,94,.065);
  border-color: rgba(34,197,94,.25) !important;
}
.category-admin-row.expense {
  background: rgba(244,86,108,.06);
  border-color: rgba(244,86,108,.24) !important;
}
.category-admin-row.both {
  background: rgba(166,175,193,.07);
  border-color: rgba(166,175,193,.2) !important;
}
.category-admin-row .label-icon { gap: 10px; }
.category-admin-row .label-icon b { overflow-wrap: anywhere; }
.category-admin-row .admin-actions { gap: 6px; }
.admin-actions .ed, .admin-actions .de {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; padding: 0;
}
.admin-actions .ui-icon { width: 18px; height: 18px; }
@media (min-width: 900px) {
  .category-groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .category-group.income { grid-column: 1; grid-row: 1; }
  .category-group.expense { grid-column: 2; grid-row: 1 / span 2; }
  .category-group.both { grid-column: 1; grid-row: 2; }
}

/* ===== Resumen: dólar arriba en celular, lateral en compu ===== */
.inicio-dolar-side { display: none; }
.inicio-dolar-top { display: flex; gap: 8px; margin-bottom: 14px; }
.inicio-dolar-top .dol { padding: 8px 6px; border-radius: 12px; }
.inicio-dolar-top .dol .dl { font-size: 11px; }
.inicio-dolar-top .dol .dv { font-size: 14px; margin-top: 2px; }
.inicio-budgets { margin-top: 16px; }
@media (min-width: 1000px) {
  .inicio-dolar-top { display: none; }
  .inicio-dolar-side { display: flex; }
}

/* ===== Total centrado en las tortas (que entre bien) ===== */
.report-donut-total { font-size: 15px; }
.report-donut-total span { display: block; max-width: 94%; margin: 0 auto; }
.chart-cat-wrap { position: relative; }
.chart-cat-total {
  position: absolute; left: 0; right: 0; top: 0; bottom: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; text-align: center; font-weight: 850; font-size: 15px; line-height: 1.1;
}
.chart-cat-total span { display: block; max-width: 80%; }
.chart-cat-total small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; margin-top: 4px; }
@media (max-width: 560px) {
  .report-donut-wrap { height: 160px; }
  .report-donut-wrap canvas { max-height: 160px; }
  .report-donut-total { font-size: 13px; }
  .chart-cat-total { font-size: 14px; }
}

/* ===== Resumen más simple ===== */
/* Cotización del dólar: una sola línea discreta */
.inicio-dolar-top, .inicio-dolar-side { align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.inicio-dolar-top .dolar-title, .inicio-dolar-side .dolar-title { font-weight: 600; }
.inicio-dolar-top .dol, .inicio-dolar-side .dol { flex: 0 0 auto; background: none; border: 0; padding: 0; text-align: left; }
.inicio-dolar-top .dol .dl, .inicio-dolar-side .dol .dl { font-size: 13px; color: var(--muted); }
.inicio-dolar-top .dol .dv, .inicio-dolar-side .dol .dv { display: inline; font-size: 13px; margin: 0; color: var(--txt); }

/* Bloques vacíos compactos */
.empty-block { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 4px 0 2px; }
.empty-block p { margin: 0 0 6px; }
.inicio-budgets.is-empty { padding-top: 12px; padding-bottom: 12px; }
.inicio-budgets.is-empty .panel-head { margin-bottom: 4px; }
.inicio-budgets.is-empty .empty-copy { margin: 0; }
#view-inicio .col-main > .panel:last-child:has(#series-empty:not(.hidden)) .chart-wrap { min-height: 0; }

/* Ojo: ocultar montos */
.hero-eye { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.hero-eye:hover { color: var(--txt); background: rgba(47,128,255,.12); }
.hero-eye .eye-off { display: none; }
.amounts-hidden .hero-eye .eye-on { display: none; }
.amounts-hidden .hero-eye .eye-off { display: block; }
.amounts-hidden #view-inicio :is(
  .hbal .v, .month-totals .val, .chart-cat-total span, .catrow b,
  .bill-mini-total b, .bill-mini-row strong, .bgt .sub, #chart-series, #chart-cat
) { filter: blur(9px); user-select: none; pointer-events: none; }

/* Pestañas de las pantallas agrupadas (A pagar, Ajustes) */
.group-tabs { margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
.group-tabs button { min-width: 0; white-space: nowrap; padding-inline: 14px; }
.group-tabs button.hidden { display: none; }

/* Primeros pasos */
.onboarding { margin-bottom: 16px; border-color: rgba(47,128,255,.4); }
.onboarding .panel-head h2 small { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 8px; }
.onb-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onb-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.onb-steps li:first-child { border-top: 0; }
.onb-n { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(47,128,255,.18); color: var(--accent); font-weight: 700; font-size: 13px; }
.onb-steps li.done .onb-n { background: rgba(34,197,94,.2); color: var(--green, #22c55e); }
.onb-steps li.done .onb-body { opacity: .6; }
.onb-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onb-body span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.onb-steps .btn-primary { flex-shrink: 0; }
@media (max-width: 600px) { .onb-steps li { flex-wrap: wrap; } .onb-steps .btn-primary { width: 100%; } }

/* Total disponible */
.hero-total { margin: 4px 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.hero-total-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.hero-total-value { font-size: 34px; font-weight: 800; margin: 2px 0; letter-spacing: -.02em; }
.hero-total-sub { color: var(--muted); font-size: 13px; }
.hero-total-goals { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.hero-total-goals b { color: var(--txt); margin-left: 4px; }
.amounts-hidden #view-inicio :is(.hero-total-value, .hero-total-sub, .hero-total-goals b, .goal-sub) { filter: blur(9px); user-select: none; }

/* Metas de ahorro */
.goal { padding: 14px 0; border-top: 1px solid var(--border); }
.goal:first-child { border-top: 0; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.goal-top span { color: var(--muted); font-size: 13px; }
.goal .track { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.goal .fill { height: 100%; border-radius: 6px; background: var(--green, #22c55e); }
.goal .fill.goal-fill { background: var(--accent); }
.goal-sub { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.goal-when { margin-top: 4px; font-size: 13px; color: var(--muted); }
.goal-actions { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.amounts-hidden .goal-sub { filter: blur(9px); user-select: none; }

/* =====================================================================
   TEMA CLARO (app logueada). Sobrescribe las variables oscuras y los
   colores fijos. La portada y el login mantienen su estilo propio.
   ===================================================================== */
#app-layout, .modal, .help-tip, .bottomnav {
  --bg: #eaf2fd;
  --bg2: #ffffff;
  --panel: #ffffff;
  --panel2: #f1f6fd;
  --panel-dark: #12306a;
  --txt: #0f1c3a;
  --muted: #667694;
  --border: #e1e9f5;
  --accent: #2563eb;
  --accent2: #1d4ed8;
  --green: #16a34a;
  --red: #e5384f;
  --amber: #d98a06;
  --radius: 22px;
  --shadow: 0 8px 28px rgba(30, 70, 140, .09);
}
#app-layout {
  color: var(--txt);
  background:
    radial-gradient(900px 420px at 85% -80px, rgba(96, 165, 250, .35), transparent 70%),
    linear-gradient(180deg, #dbe9fb 0%, #eaf2fd 260px, #f4f8fe 100%);
  background-attachment: fixed;
}
.mainwrap { background: transparent; }
.topbar { background: linear-gradient(180deg, #e3eefc 55%, transparent); }
.page-title { letter-spacing: -.02em; }
.icon-btn { background: #fff; box-shadow: var(--shadow); border-color: transparent; }

/* Tarjetas blancas, redondeadas, con sombra suave */
#app-layout .panel { border-color: transparent; box-shadow: var(--shadow); padding: 20px; }
#app-layout .panel-head h2 { font-size: 16px; letter-spacing: -.01em; }
#app-layout .panel-head { margin-bottom: 14px; }

/* Tarjeta principal: azul profundo con efecto vidrio */
#app-layout .panel-dark {
  color: #fff; border: 0; box-shadow: 0 14px 34px rgba(20, 60, 150, .3);
  background: radial-gradient(600px 240px at 90% -40px, rgba(120, 180, 255, .45), transparent 70%),
              linear-gradient(135deg, #12306a 0%, #1d4fb8 100%);
}
#app-layout .panel-dark .hero-eye:hover,
#app-layout .panel-dark .hero-visibility-edit:hover { background: rgba(255,255,255,.26); }
#app-layout .panel-dark .help-dot { background: rgba(255,255,255,.2); color: #fff; }
#app-layout .panel-dark .hero-total { border-bottom-color: rgba(255,255,255,.2); }
#app-layout .panel-dark .hero-total-label,
#app-layout .panel-dark .hero-total-sub,
#app-layout .panel-dark .hero-total-goals { color: rgba(255,255,255,.78); }
#app-layout .panel-dark .hero-total-goals b { color: #fff; }
#app-layout .panel-dark .hero-total-value { color: #fff; font-size: 38px; }

/* Menú lateral azul oscuro (el logo es blanco) */
@media (min-width: 900px) {
  #app-layout .sidebar {
    background: linear-gradient(180deg, #0f2a5c 0%, #153a82 100%);
    border-right: 0; color: #fff;
  }
  #app-layout .sidebar .welcome { color: #fff; }
  #app-layout .sidebar .welcome small, #app-layout .sidebar .nav-section { color: rgba(255,255,255,.6); }
  #app-layout .snav { color: rgba(255,255,255,.8); }
  #app-layout .snav:hover { background: rgba(255,255,255,.12); color: #fff; }
  #app-layout .snav.active { background: #fff; color: var(--accent); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
  #app-layout .side-add { background: #fff; color: var(--accent); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
}

/* Menú inferior (celular): cápsula blanca flotante */
.bottomnav { background: rgba(255,255,255,.94); border-top: 0; box-shadow: 0 -6px 24px rgba(30,70,140,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav-btn { color: var(--muted); }
.nav-btn.active { color: var(--accent); }

/* Resumen */
#app-layout .month-totals .mt { background: var(--panel2); border: 1px solid transparent; }
#app-layout .mt .lbl { font-weight: 600; }
#app-layout .dol { background: none; border: 0; }
#app-layout .dol .dl { color: var(--muted); }
#app-layout .dol .dv { color: var(--txt); }
#app-layout .bgt .track, #app-layout .goal .track { background: #e5edf9; }
#app-layout .goal .fill.goal-fill { background: linear-gradient(90deg, #4f8dff, #2563eb); }
#app-layout .bill-mini-row, #app-layout .catrow, #app-layout .bill-mini-total { border-color: var(--border); }
#app-layout .onboarding { border: 1px solid rgba(37,99,235,.25); background: linear-gradient(180deg, #f5f9ff, #fff); }
#app-layout .onb-n { background: rgba(37,99,235,.12); }
#app-layout .empty-block, #app-layout .empty-copy { color: var(--muted); }

/* Botones y campos */
#app-layout .btn-primary, #app-layout .btn-add { background: var(--accent); color: #fff; border: 0; box-shadow: 0 6px 16px rgba(37,99,235,.28); }
#app-layout .link-btn { color: var(--accent); }
#app-layout input, #app-layout select, #app-layout textarea,
.modal input, .modal select, .modal textarea {
  background: #f6f9fe; color: var(--txt); border: 1px solid var(--border);
}
#app-layout input::placeholder, .modal input::placeholder { color: #9aa8c2; }
#app-layout .report-view-tabs, #app-layout .group-tabs { background: #fff; border-color: transparent; box-shadow: var(--shadow); }
#app-layout .report-view-tabs button { color: var(--muted); }
#app-layout .report-view-tabs button.active { background: var(--accent); color: #fff; }
.telegram-command-row code, .code-line { background: #f1f6fd !important; color: var(--txt) !important; border-color: var(--border) !important; }
.help-tip { background: #0f1c3a; color: #fff; }

/* Ventanas emergentes */
.modal { background: rgba(15, 28, 58, .45); }
.modal .modal-box, .modal > div { background: #fff; color: var(--txt); box-shadow: 0 24px 60px rgba(15,28,58,.25); }
.profile-menu { box-shadow: 0 16px 40px rgba(30,70,140,.18); }
.amounts-hidden #view-inicio .panel-dark :is(.hero-total-value, .hero-total-sub, .hbal .v) { filter: blur(9px); }
.month { text-transform: none; }


/* ===== Resumen: tarjeta TOTAL DISPONIBLE + tarjeta PATRIMONIO plegable ===== */
#app-layout .total-card { text-align: center; padding: 26px 20px 22px; }
#app-layout .total-card .total-actions { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
#app-layout .total-card .hero-eye { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; }
#app-layout .total-card .hero-eye:hover { background: rgba(255,255,255,.26); color: #fff; }
#app-layout .total-card .help-dot { position: static; background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }
#app-layout .total-card .hero-total { margin: 0; padding: 0; border: 0; }
#app-layout .total-card .hero-total-label { color: rgba(255,255,255,.85); font-size: 13px; font-weight: 700; letter-spacing: .14em; margin-bottom: 6px; }
#app-layout .total-card .hero-total-value { font-size: 44px; margin: 2px 0 8px; line-height: 1.05; }
#app-layout .total-card .hero-total-sub { color: rgba(255,255,255,.8); font-size: 13px; }
#app-layout .total-card .hero-total-goals { justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.2); gap: 6px 26px; color: rgba(255,255,255,.8); }
#app-layout .total-card .hero-total-goals b { color: #fff; }

#app-layout .patrimonio { padding: 14px 18px 18px; }
.patrimonio-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.patrimonio-toggle {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 0;
  background: none; border: 0; color: var(--txt); font: inherit; cursor: pointer; text-align: left;
}
.patrimonio-title { font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.patrimonio-count { color: var(--muted); font-size: 13px; font-weight: 600; }
.patrimonio-chevron { color: var(--muted); margin-left: auto; transition: transform .2s ease; }
.patrimonio-toggle:hover .patrimonio-chevron { color: var(--accent); }
.patrimonio.collapsed .patrimonio-chevron { transform: rotate(-90deg); }
.patrimonio .hero-balances { margin-top: 14px; }
.patrimonio.collapsed .hero-balances, .patrimonio.collapsed .hero-visibility-edit { display: none; }
.patrimonio.collapsed .patrimonio-head { margin: 0; }
.patrimonio .hbal { background: var(--panel2); border: 1px solid var(--border); }
.patrimonio .hbal .n { color: var(--muted); }
.patrimonio .hbal .v { color: var(--txt); }
.patrimonio .hbal .v.neg { color: var(--red); }
.patrimonio .hbal.credit { border-color: #c9b8f0; background: #f7f3ff; }
.patrimonio .hbal-receivable { border: 1px dashed #b9c8e6; }
.patrimonio .hero-visibility-edit { background: #eef4ff; border: 1px solid #cfdcf5; color: var(--accent); }
.patrimonio .hero-balances-empty { color: var(--muted); border-color: var(--border); }
@media (max-width: 560px) {
  #app-layout .total-card { padding: 24px 14px 18px; }
  #app-layout .total-card .hero-total-value { font-size: 38px; }
}
.amounts-hidden #view-inicio .total-card :is(.hero-total-value, .hero-total-sub, .hero-total-goals b) { filter: blur(9px); user-select: none; }


/* ===== Patrimonio: mismo azul que el total ===== */
#app-layout .patrimonio {
  color: #fff; border: 0; box-shadow: 0 14px 34px rgba(20, 60, 150, .3);
  background: radial-gradient(600px 240px at 90% -40px, rgba(120, 180, 255, .45), transparent 70%),
              linear-gradient(135deg, #12306a 0%, #1d4fb8 100%);
}
#app-layout .patrimonio .patrimonio-toggle { color: #fff; }
#app-layout .patrimonio .patrimonio-count { color: rgba(255,255,255,.75); }
#app-layout .patrimonio .patrimonio-chevron { color: rgba(255,255,255,.85); }
#app-layout .patrimonio .patrimonio-toggle:hover .patrimonio-chevron { color: #fff; }
#app-layout .patrimonio .hero-visibility-edit { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; }
#app-layout .patrimonio .hero-visibility-edit:hover { background: rgba(255,255,255,.26); }
#app-layout .patrimonio .hbal { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#app-layout .patrimonio .hbal .n { color: rgba(255,255,255,.75); }
#app-layout .patrimonio .hbal .v { color: #fff; }
#app-layout .patrimonio .hbal .v.neg { color: #ffb4be; }
#app-layout .patrimonio .hbal.credit { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
#app-layout .patrimonio .hbal-receivable { border: 1px dashed rgba(255,255,255,.4); }
#app-layout .patrimonio .hero-balances-empty { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.3); }

/* ===== Cotización del dólar: centrada y ordenada ===== */
#app-layout .dolar-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 14px; padding: 0; background: none; border: 0; }
#app-layout .dolar-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
#app-layout .dolar-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 440px; }
#app-layout .dolar-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  padding: 9px 6px; border-radius: 14px; background: #fff; box-shadow: var(--shadow);
}
#app-layout .dolar-chip .dl { font-size: 12px; font-weight: 600; color: var(--muted); }
#app-layout .dolar-chip .dv { font-size: 15px; font-weight: 800; color: var(--txt); font-variant-numeric: tabular-nums; }
/* Mostrar solo una cotización: arriba en celular, en la columna derecha en escritorio */
#app-layout .inicio-dolar-side { display: none; }
@media (min-width: 1000px) {
  #app-layout .inicio-dolar-top { display: none; }
  #app-layout .inicio-dolar-side { display: flex; }
}

/* =====================================================================
   A PAGAR (simplificado) y AUTOMÁTICOS
   ===================================================================== */
/* Resumen azul */
#app-layout .pay-summary, #app-layout .auto-summary { text-align: center; padding: 24px 18px 20px; }
.pay-sum-label, .auto-sum-title { color: rgba(255,255,255,.85); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pay-sum-value { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 8px; line-height: 1.05; }
.pay-sum-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; font-size: 13px; color: rgba(255,255,255,.82); }
.pay-sum-sub i { opacity: .5; font-style: normal; }
.pay-sum-sub .warn { color: #ffd3d9; font-weight: 700; }

/* Barra: filtros + Agregar */
.pay-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.pay-chips { display: inline-flex; background: #fff; border-radius: 12px; padding: 3px; box-shadow: var(--shadow); }
.pay-chips button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 10px; cursor: pointer; }
.pay-chips button.active { background: var(--accent); color: #fff; }
.pay-add-wrap { position: relative; }
#app-layout .pay-add-wrap .btn-primary { padding: 11px 18px; font-size: 14px; border-radius: 12px; }
.pay-add-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(320px, 86vw);
  background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 18px 44px rgba(20,50,120,.22);
}
.pay-add-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--txt); }
.pay-add-menu button:hover { background: var(--panel2); }
.pay-add-menu b { display: block; font-size: 14px; }
.pay-add-menu span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.pay-add-menu button.alt { border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; margin-top: 4px; }
.pay-add-menu button.alt b { color: var(--accent); }
.pay-month { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 12px; }
.pay-month.hidden { display: none; }
.pay-month b { min-width: 150px; text-align: center; font-size: 15px; }
.pay-month button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: var(--accent); font-size: 20px; line-height: 1; box-shadow: var(--shadow); cursor: pointer; }

/* Lista agrupada */
.bill-group { margin-bottom: 18px; }
.bill-group-title { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bill-group-title em { font-style: normal; background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; box-shadow: var(--shadow); }
.bill-group.bad .bill-group-title { color: var(--red); }
.bill-group.warn .bill-group-title { color: var(--amber); }
.bill-group.ok .bill-group-title { color: var(--green); }
.bill-group-list { display: flex; flex-direction: column; gap: 10px; }
.bill-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  background: #fff; border-radius: 18px; padding: 14px 14px 14px 16px; box-shadow: var(--shadow);
}
.bill-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bill-color, var(--accent)); }
.bill-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bill-row-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-row-main small { color: var(--muted); font-size: 13px; }
.bill-row.overdue .bill-row-main small { color: var(--red); font-weight: 600; }
.bill-row.due-soon .bill-row-main small { color: var(--amber); font-weight: 600; }
.bill-row-amount { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.bill-row-amount b { font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill-row-amount small { color: var(--muted); font-size: 12px; }
.bill-row-actions { display: flex; align-items: center; gap: 6px; }
.bill-more-wrap { position: relative; }
.bill-more { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--panel2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.bill-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 160px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 14px 34px rgba(20,50,120,.22); }
.bill-menu.hidden { display: none; }
.bill-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--txt); cursor: pointer; }
.bill-menu button:hover { background: var(--panel2); }
.bill-menu button.danger { color: var(--red); }
.paid-note { color: var(--green); font-size: 13px; font-weight: 700; }
@media (max-width: 560px) {
  .pay-toolbar { flex-wrap: wrap; }
  .bill-row { grid-template-columns: auto 1fr auto; row-gap: 10px; }
  .bill-row-actions { grid-column: 1 / -1; justify-content: space-between; }
  .bill-row-actions .btn-primary { flex: 1; }
  .pay-sum-value { font-size: 36px; }
}
#app-layout .empty-state { background: #fff; border-radius: 18px; padding: 22px; text-align: center; box-shadow: var(--shadow); }
#app-layout .empty-state b { display: block; font-size: 15px; }
#app-layout .empty-state span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
#app-layout .panel .empty-state { box-shadow: none; background: var(--panel2); }

/* Servicios mensuales */
#app-layout .service-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
#app-layout .service-row:first-child { border-top: 0; }
#app-layout .service-row b { display: block; font-size: 15px; }
#app-layout .service-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
#app-layout .service-row.paused { opacity: .6; }
.panel-hint { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.panel-hint .link-btn { display: inline; padding: 0; font-weight: 700; }

/* Automáticos */
.auto-sum-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.auto-sum-col { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auto-sum-col span { font-size: 13px; color: rgba(255,255,255,.8); }
.auto-sum-col b { font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.auto-sum-col.in b { color: #b6f2cd; }
.auto-sum-col.out b { color: #ffd3d9; }
.auto-intro { margin: 0 4px 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auto-intro b { color: var(--txt); }
.auto-intro .link-btn { display: inline; padding: 0; font-weight: 700; }
.auto-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 900px) { .auto-grid { grid-template-columns: 1fr 1fr; } }
#app-layout .auto-col.income { border-top: 4px solid var(--green); }
#app-layout .auto-col.expense { border-top: 4px solid var(--red); }
.auto-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--border); align-items: center; }
.auto-row:first-child { border-top: 0; }
.auto-row.paused { opacity: .6; }
.auto-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.auto-row-main b { font-size: 15px; }
.auto-row-main small { color: var(--muted); font-size: 13px; }
.auto-row-main small.next { color: var(--accent); font-weight: 600; }
.auto-row-amount { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.auto-row.income .auto-row-amount { color: var(--green); }
.auto-row.expense .auto-row-amount { color: var(--red); }
.auto-row-actions { grid-column: 1 / -1; display: flex; gap: 16px; }
#app-layout .danger-link { color: var(--red); }
.group-tabs { display: flex; width: 100%; overflow-x: auto; }
#app-layout .group-tabs button { flex: 0 0 auto; }
@media (max-width: 560px) { #app-layout .group-tabs button { flex: 1 1 auto; padding-inline: 10px; } }

/* Automáticos: ajustes de resumen y tarjetas */
#app-layout .auto-col.income, #app-layout .auto-col.expense { border-top: 0; }
.auto-col .panel-head h2 { display: flex; align-items: center; gap: 10px; }
.auto-col .panel-head h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.auto-col.income .panel-head h2::before { background: var(--green); }
.auto-col.expense .panel-head h2::before { background: var(--red); }
.auto-row-actions .link-btn { padding: 4px 0; }
.auto-sum-col b { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 700px) {
  .auto-sum-cols { grid-template-columns: 1fr; gap: 8px; }
  .auto-sum-col { flex-direction: row; justify-content: space-between; align-items: center; padding: 12px 16px; text-align: left; }
  .auto-sum-col span { font-size: 14px; }
  .auto-sum-col b { text-align: right; }
  .auto-sum-col { flex-wrap: wrap; }
}
.auto-sum-col .vals { display: flex; flex-direction: column; gap: 2px; align-items: center; }
@media (max-width: 700px) { .auto-sum-col .vals { align-items: flex-end; } .auto-sum-col { flex-wrap: nowrap; } }

/* A pagar: pista y barra simplificada */
.pay-hint { margin: -4px 4px 14px; color: var(--muted); font-size: 13px; }
.pay-hint .link-btn { display: inline; padding: 0; font-weight: 700; }

/* =====================================================================
   TARJETAS DE CRÉDITO
   ===================================================================== */
.card-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
#app-layout .card-hero {
  color: #fff; border-radius: var(--radius); padding: 22px 20px 16px; box-shadow: 0 14px 34px rgba(20, 60, 150, .3);
  background: radial-gradient(600px 240px at 90% -40px, rgba(120, 180, 255, .45), transparent 70%),
              linear-gradient(135deg, #12306a 0%, #1d4fb8 100%);
}
.card-hero-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-hero-name { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card-hero-name .ui-icon { width: 20px; height: 20px; }
.card-hero-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 6px 0 16px; }
.card-hero-main .lbl { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.card-hero-main .val { font-size: 42px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 2px 0; }
.card-hero-main .sub { font-size: 14px; color: rgba(255,255,255,.9); }
.card-hero-main .note { font-size: 13px; color: rgba(255,255,255,.7); max-width: 420px; line-height: 1.45; margin-top: 2px; }
.card-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.card-hero .chip, .card-hero .chip-primary {
  border-radius: 12px; padding: 10px 16px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.14); color: #fff;
}
.card-hero .chip:hover { background: rgba(255,255,255,.26); }
.card-hero .chip-primary { background: #fff; color: var(--accent); border-color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.tag { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.tag.est { background: rgba(255,200,87,.25); color: #ffe2a3; }
.tag.ok { background: rgba(125,230,170,.25); color: #b6f2cd; }
.bill-row .tag.est { background: #fff3d6; color: #a46a00; }
.bill-row .tag.ok { background: #dcf6e6; color: #167a45; }
.card-hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.card-hero-cell {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; font: inherit; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 12px;
}
button.card-hero-cell { cursor: pointer; }
.card-hero-cell span { font-size: 12px; color: rgba(255,255,255,.78); }
.card-hero-cell b { font-size: 15px; font-variant-numeric: tabular-nums; }
.mini-link { align-self: flex-start; margin-top: 2px; background: none; border: 0; padding: 0; color: #cfe0ff; font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.card-hero-foot { margin: 12px 2px 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.7); text-align: center; }
@media (max-width: 700px) {
  .card-hero-grid { grid-template-columns: 1fr 1fr; }
  .card-hero-main .val { font-size: 38px; }
  .card-hero .chip, .card-hero .chip-primary { flex: 1 1 100%; }
}
.bill-dot.card-dot { background: var(--accent); }
.bill-row.card-bill { border: 1px solid rgba(37,99,235,.18); }
@media (max-width: 700px) {
  .card-hero .chip-primary { flex: 1 1 100%; }
  .card-hero .chip { flex: 1 1 calc(50% - 8px); padding-inline: 8px; }
}

/* Proyección de la tarjeta */
.card-hero-forecast {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13px;
  background: rgba(255,255,255,.1); border: 1px dashed rgba(255,255,255,.4); display: flex; flex-direction: column; gap: 6px;
}
.card-hero-forecast > b { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.card-hero-forecast span { display: flex; justify-content: space-between; gap: 10px; }
.card-hero-forecast em { font-style: normal; font-weight: 700; }
.card-hero-projected { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.9); }
.card-hero-projected b { color: #fff; font-size: 15px; }
.bill-row.projected { background: #f8fbff; border: 1px dashed rgba(37,99,235,.35); box-shadow: none; }
#app-layout .btn-secondary.compact { background: var(--panel2); color: var(--accent); border: 0; padding: 10px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; }

/* =====================================================================
   Barra superior compacta, logo al inicio, menú Configuración y Mi usuario
   ===================================================================== */
.month, #month-label { display: none !important; }
.brand-home { display: block; padding: 0; margin: 0; background: none; border: 0; cursor: pointer; border-radius: 10px; }
.brand-home:hover .sidebar-brand-logo { opacity: .85; }
.welcome-row { display: flex; align-items: center; gap: 12px; }
@media (min-width: 900px) {
  /* escritorio: sin barra superior (ahorra espacio); el avatar va junto al saludo */
  #app-layout .topbar { display: none; }
  #app-layout .mainwrap { padding-top: 24px; }
  .welcome-row { margin: 22px 0 18px; }
  .welcome-row .welcome { margin: 0; }
  .profile-wrap.in-sidebar .avatar { width: 44px; height: 44px; font-size: 18px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
  .profile-wrap.in-sidebar .profile-menu { left: 0; right: auto; top: 54px; width: 260px; }
}

/* Configuración desplegable */
#app-layout .snav-group { position: relative; }
#app-layout .snav-group span:not(.ui-icon) { flex: 1; text-align: left; }
.snav-chevron { margin-left: auto; transition: transform .2s ease; opacity: .8; }
.snav-group.open .snav-chevron { transform: rotate(180deg); }
#app-layout .snav-group.in-section:not(.open) { background: rgba(255,255,255,.12); color: #fff; }
.snav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 14px; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.22); }
.snav-sub.hidden { display: none; }
#app-layout .snav.sub { padding: 9px 12px; font-size: 13.5px; font-weight: 600; }
#app-layout .snav.sub.hidden { display: none; }
.mas-section { margin: 14px 4px 4px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Configuración: bloques dentro de una sola tarjeta */
.config-divider { height: 1px; background: var(--border); margin: 22px 0 18px; }

/* Mi usuario */
.user-panel { max-width: 760px; }
.user-block { padding: 18px 0; border-top: 1px solid var(--border); }
.user-block:first-child { border-top: 0; padding-top: 4px; }
.user-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.user-block-head h3 { font-size: 16px; }
.user-block .panel-intro { margin: 0 0 12px; }
.user-id { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; background: linear-gradient(135deg, var(--accent), #7b5cff) center / cover; flex: 0 0 auto; }
.user-avatar.has-photo { color: transparent; }
.user-id-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.user-id-text b { font-size: 18px; }
.user-id-text span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.user-last { padding-bottom: 0; }
#app-layout .danger-btn { background: #fff0f2; color: var(--red); box-shadow: none; }

/* Tarjetas: barra y menú */
.card-toolbar { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.card-hero-head .card-more .bill-more { background: rgba(255,255,255,.16); color: #fff; }
.card-hero-head .card-more .bill-menu { right: 0; }

/* Menú lateral fijo en escritorio: no se mueve con el scroll de la página */
@media (min-width: 900px) {
  #app-layout.layout { padding-left: 250px; }
  #app-layout .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: 250px; z-index: 20; }
}
@media (min-width: 900px) {
  #app-layout .sidebar .side-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; padding-bottom: 8px; }
  #app-layout .sidebar .side-add { flex: 0 0 auto; margin-top: 10px; }
  #app-layout .sidebar .brand-home, #app-layout .sidebar .welcome-row { flex: 0 0 auto; }
}

/* =====================================================================
   INICIO compacto: todo lo importante de un vistazo
   ===================================================================== */
#view-inicio .panel { margin-bottom: 14px; }
#view-inicio .panel-head { margin-bottom: 10px; }
/* Gastos por categoría */
#view-inicio .cat-panel { padding: 16px 18px; }
.cat-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.cat-total span { color: var(--muted); font-size: 13px; }
.cat-total b { font-size: 20px; letter-spacing: -.01em; }
.cat-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--panel2); margin-bottom: 10px; }
.cat-bar span { min-width: 4px; }
.cat-list { display: flex; flex-direction: column; }
.cat-row { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 10px; padding: 7px 0; background: none; border: 0; border-top: 1px solid var(--border); color: var(--txt); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cat-row:first-child { border-top: 0; }
.cat-row i { width: 10px; height: 10px; border-radius: 50%; }
.cat-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row em { font-style: normal; color: var(--muted); font-size: 13px; }
.cat-row b { font-variant-numeric: tabular-nums; min-width: 82px; text-align: right; }
.cat-row.more { cursor: default; color: var(--muted); }
/* Ahorros y Presupuestos */
@media (min-width: 800px) { .inicio-bottom { grid-template-columns: 1fr 1fr; } }
#view-inicio .mini-panel { padding: 16px 18px; margin-bottom: 0; }
.mini-row { display: block; width: 100%; background: none; border: 0; padding: 8px 0; text-align: left; font: inherit; color: var(--txt); cursor: pointer; border-top: 1px solid var(--border); }
.mini-row:first-child { border-top: 0; padding-top: 2px; }
.mini-row-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.mini-row-top span { color: var(--muted); font-size: 13px; font-weight: 700; }
.mini-row-top span.warn { color: var(--amber); }
.mini-row-top span.over { color: var(--red); }
.mini-row .track { height: 6px; border-radius: 6px; background: #e5edf9; overflow: hidden; }
.mini-row .fill { height: 100%; border-radius: 6px; background: var(--green); }
.mini-row .fill.goal-fill { background: linear-gradient(90deg, #4f8dff, #2563eb); }
.mini-row .fill.warn { background: var(--amber); }
.mini-row .fill.over { background: var(--red); }
.mini-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.amounts-hidden #view-inicio :is(.cat-total b, .cat-row b, .mini-row small) { filter: blur(8px); user-select: none; }
/* "Este mes" y próximos pagos, más compactos */
#view-inicio .month-totals { gap: 10px; }
#view-inicio .mt { padding: 10px 8px; }

/* =====================================================================
   REPORTES: minimalista, con la paleta azul/blanca
   ===================================================================== */
#app-layout .report-dashboard { gap: 14px; }
/* Barra: período + filtros, sin tarjeta pesada */
#app-layout .report-toolbar { padding: 0; background: transparent; box-shadow: none; border: 0; }
#app-layout .report-toolbar .report-control-caption { display: none; }
#app-layout .report-quick-ranges { display: inline-flex; gap: 2px; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); min-height: 0; }
#app-layout .report-quick-ranges button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; min-height: 0; white-space: nowrap; }
#app-layout .report-quick-ranges button:hover { background: var(--panel2); color: var(--txt); }
#app-layout .report-quick-ranges button.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
#app-layout .report-filter-toggle { background: #fff; color: var(--muted); border: 0; box-shadow: var(--shadow); border-radius: 999px; padding: 10px 16px; font-weight: 700; }
#app-layout .report-filter-panel.open { background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.report-kind-label { display: none !important; }

/* Tarjeta de balance */
.report-kpis { display: block; }
#app-layout .report-hero { padding: 24px 20px 18px; text-align: center; }
.report-hero-main { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; background: none; border: 0; color: #fff; font: inherit; cursor: pointer; padding: 0 0 16px; }
.report-hero-label { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.report-hero-value { font-size: 42px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.report-hero-sub { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.85); }
.rchip { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.16); }
.rchip.good { background: rgba(125,230,170,.25); color: #c9f7dc; }
.rchip.bad { background: rgba(255,170,180,.28); color: #ffd3d9; }
.report-hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-hero-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 12px 8px; color: #fff; font: inherit; cursor: pointer; }
.report-hero-cell:hover { background: rgba(255,255,255,.2); }
.report-hero-cell span { font-size: 13px; color: rgba(255,255,255,.8); }
.report-hero-cell b { font-size: 20px; font-variant-numeric: tabular-nums; }
.report-hero-cell em { font-style: normal; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.75); }

/* Pestañas más sobrias */
#app-layout .report-view-tabs { background: #fff; border: 0; box-shadow: var(--shadow); border-radius: 999px; padding: 4px; }
#app-layout .report-view-tabs button { border-radius: 999px; }

/* Gráfico sin fondo violeta */
#app-layout .report-chart-wrap { background: transparent; border: 0; padding: 0; height: 300px; }
.report-range { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.report-chart-note { margin: 10px 2px 0; color: var(--muted); font-size: 13px; }
#app-layout .report-chart-panel .panel-head, #app-layout .report-distribution-panel .panel-head { align-items: flex-start; gap: 10px; flex-wrap: wrap; }

/* Selector chico (segmentado) */
.seg-mini { display: inline-flex; background: var(--panel2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-mini button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg-mini button.active { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(30,70,140,.12); }

/* Distribución y variaciones: listas limpias */
#app-layout .report-distribution-content { display: flex; flex-direction: column; gap: 14px; }
#app-layout .share-row { padding: 8px 0; border-top: 1px solid var(--border); }
#app-layout .share-row:first-child { border-top: 0; }
#app-layout .delta-row { padding: 8px 0; border-top: 1px solid var(--border); }
#app-layout .delta-row:first-child { border-top: 0; }
#app-layout .report-table th { color: var(--muted); font-weight: 700; font-size: 13px; }
#app-layout .report-table td, #app-layout .report-table th { border-color: var(--border); }
@media (max-width: 700px) {
  .report-hero-value { font-size: 36px; }
  #app-layout .report-toolbar-main { flex-wrap: wrap; }
  #app-layout .report-quick-ranges { max-width: 100%; overflow-x: auto; }
  #app-layout .report-chart-wrap { height: 260px; }
}

/* =====================================================================
   REFINAMIENTO: más delicado y minimalista (tarjetas más chicas y livianas)
   Mantienen el ancho completo, pero con menos aire, números más chicos y
   sombras suaves.
   ===================================================================== */
#app-layout, .modal, .bottomnav { --radius: 16px; --shadow: 0 2px 12px rgba(30, 70, 140, .06); }
#app-layout .panel { padding: 14px 16px; border-radius: 16px; box-shadow: var(--shadow); }
#app-layout .panel-head { margin-bottom: 10px; }
#app-layout .panel-head h2 { font-size: 14px; font-weight: 700; }
#app-layout .panel-intro { font-size: 13px; margin-bottom: 10px; }
.page-title { font-size: 19px; }

/* Tarjetas azules: más compactas */
#app-layout .panel-dark, #app-layout .patrimonio, #app-layout .card-hero {
  border-radius: 16px; box-shadow: 0 6px 18px rgba(20, 60, 150, .16);
}
#app-layout .total-card { padding: 16px 14px 14px; }
#app-layout .total-card .hero-total-label { font-size: 12px; letter-spacing: .12em; margin-bottom: 2px; }
#app-layout .total-card .hero-total-value { font-size: 30px; margin: 0 0 4px; }
#app-layout .total-card .hero-total-sub { font-size: 13px; }
#app-layout .total-card .hero-total-goals { font-size: 12.5px; margin-top: 8px; padding-top: 8px; gap: 4px 18px; }
#app-layout .total-card .total-actions { top: 8px; right: 8px; }
#app-layout .hero-eye { width: 28px; height: 28px; border-radius: 8px; }
#app-layout .hero-eye svg { width: 15px; height: 15px; }
#app-layout .help-dot { width: 15px; height: 15px; }

#app-layout .patrimonio { padding: 10px 14px 14px; }
#app-layout .patrimonio-title { font-size: 13px; letter-spacing: .12em; }
#app-layout .patrimonio-count { font-size: 12px; }
#app-layout .patrimonio .hero-balances { margin-top: 8px; gap: 8px; }
#app-layout .patrimonio .hbal { padding: 8px 10px; border-radius: 12px; }
#app-layout .patrimonio .hbal .n { font-size: 12px; }
#app-layout .patrimonio .hbal .v { font-size: 15px; margin-top: 1px; }
#app-layout .hero-visibility-edit { min-height: 26px; padding: 4px 9px; font-size: 12px; border-radius: 8px; }
#app-layout .hero-visibility-edit .ui-icon { width: 13px; height: 13px; }

/* Cotización del dólar */
#app-layout .dolar-box { margin: 0 0 10px; gap: 5px; }
#app-layout .dolar-title { font-size: 11px; }
#app-layout .dolar-chips { gap: 6px; max-width: 360px; }
#app-layout .dolar-chip { padding: 6px 4px; border-radius: 10px; box-shadow: var(--shadow); }
#app-layout .dolar-chip .dl { font-size: 11px; }
#app-layout .dolar-chip .dv { font-size: 13px; }

/* Este mes */
#app-layout .month-totals { gap: 8px; }
#app-layout .mt { padding: 8px 6px; border-radius: 12px; }
#app-layout .mt .lbl { font-size: 12px; }
#app-layout .mt .val { font-size: 15px; }
#app-layout #view-inicio .mt { padding: 8px 6px; }

/* Tarjetas de crédito (pantalla Tarjetas) */
.card-list { gap: 12px; margin-bottom: 12px; }
#app-layout .card-hero { padding: 14px 14px 10px; }
.card-hero-head { margin-bottom: 4px; }
.card-hero-name { font-size: 13px; letter-spacing: .12em; }
.card-hero-name .ui-icon { width: 16px; height: 16px; }
.card-hero-main { padding: 2px 0 10px; gap: 2px; }
.card-hero-main .lbl { font-size: 12px; letter-spacing: .12em; }
.card-hero-main .val { font-size: 30px; margin: 0; }
.card-hero-main .sub { font-size: 13px; }
.card-hero-main .note { font-size: 12px; }
.card-hero-actions { margin-top: 8px; gap: 6px; }
.card-hero .chip, .card-hero .chip-primary { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.card-hero-grid { gap: 8px; }
.card-hero-cell { padding: 8px 10px; border-radius: 12px; }
.card-hero-cell span { font-size: 11.5px; }
.card-hero-cell b { font-size: 13px; }
.mini-link { font-size: 12px; }
.tag { font-size: 9px; padding: 1px 6px; }
.card-hero-forecast { margin-top: 8px; padding: 8px 10px; font-size: 13px; border-radius: 12px; gap: 3px; }
.card-hero-forecast > b { font-size: 11.5px; }
.card-hero-projected b { font-size: 13px; }
.card-hero-foot { font-size: 12px; margin-top: 8px; }
.card-hero-head .card-more .bill-more, .bill-more { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }

/* A pagar y Automáticos: resumen azul más fino */
#app-layout .pay-summary, #app-layout .auto-summary { padding: 14px 14px 12px; }
.pay-sum-label, .auto-sum-title { font-size: 12px; letter-spacing: .12em; }
.pay-sum-value { font-size: 28px; margin: 2px 0 4px; }
.pay-sum-sub { font-size: 13px; }
.auto-sum-cols { gap: 8px; margin-top: 8px; }
.auto-sum-col { padding: 8px 6px; border-radius: 12px; }
.auto-sum-col b { font-size: 15px; }
.auto-sum-col span { font-size: 12px; }
.bill-row { padding: 10px 12px 10px 14px; border-radius: 14px; gap: 10px; }
.bill-row-main b { font-size: 14px; }
.bill-row-amount b { font-size: 14px; }
.bill-group-title { font-size: 12px; }
#app-layout .btn-primary.compact { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
#app-layout .pay-add-wrap .btn-primary, #app-layout .card-toolbar .btn-primary { padding: 8px 14px; font-size: 13px; }
.pay-chips button { padding: 6px 14px; font-size: 13px; }

/* Reportes */
#app-layout .report-hero { padding: 14px 14px 12px; }
.report-hero-main { padding-bottom: 10px; gap: 2px; }
.report-hero-label { font-size: 12px; letter-spacing: .12em; }
.report-hero-value { font-size: 30px; }
.report-hero-sub { font-size: 13px; }
.rchip { font-size: 12px; padding: 2px 8px; }
.report-hero-split { gap: 8px; }
.report-hero-cell { padding: 8px 6px; border-radius: 12px; }
.report-hero-cell b { font-size: 15px; }
.report-hero-cell span, .report-hero-cell em { font-size: 11.5px; }
#app-layout .report-chart-wrap { height: 240px; }
#app-layout .report-quick-ranges button { padding: 6px 12px; font-size: 13px; }
#app-layout .report-filter-toggle { padding: 8px 14px; font-size: 13px; }
.seg-mini button { padding: 5px 10px; font-size: 12.5px; }

/* Ahorros, presupuestos y listas */
.mini-row-top { font-size: 13.5px; }
.cat-total b { font-size: 17px; }
.cat-row { padding: 6px 0; font-size: 13.5px; }
#app-layout .snav { padding: 9px 12px; }

/* Celular: aún más fino */
@media (max-width: 700px) {
  #app-layout .panel { padding: 12px 14px; }
  #app-layout .total-card .hero-total-value { font-size: 28px; }
  #app-layout .patrimonio .hbal .v { font-size: 14px; }
  .card-hero-main .val, .pay-sum-value, .report-hero-value { font-size: 26px; }
  .card-hero-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .card-hero .chip-primary { flex: 1 1 100%; }
  .card-hero .chip { flex: 1 1 calc(50% - 6px); }
  #app-layout .dolar-chip .dv { font-size: 13.5px; }
}
/* Reportes: filtros plegados (se abren con el botón Filtros) */
#app-layout .report-filter-toggle { display: inline-flex !important; align-items: center; gap: 6px; }
#app-layout .report-filter-panel:not(.open) { display: none !important; }

/* Celular: aún más compacto */
@media (max-width: 700px) {
  #app-layout .patrimonio .hero-balances { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #app-layout .patrimonio .hbal { padding: 7px 8px; border-radius: 10px; }
  #app-layout .patrimonio .hbal .n { font-size: 11px; }
  #app-layout .patrimonio .hbal .v { font-size: 13.5px; }
  #app-layout .patrimonio .hbal .n:last-child { font-size: 9.5px; }
  #app-layout .total-card { padding: 14px 12px 12px; }
  #app-layout .total-card .hero-total-value { font-size: 26px; }
  #app-layout .total-card .hero-total-sub { font-size: 12.5px; }
  #app-layout .total-card .hero-total-goals { font-size: 12px; gap: 2px 14px; }
  #app-layout .mt .val { font-size: 14px; }
  #app-layout .page-title { font-size: 18px; }
  .card-hero-main .val, .pay-sum-value, .report-hero-value { font-size: 24px; }
  .card-hero-cell b { font-size: 13.5px; }
}

/* Celular: filas de A pagar en una sola línea y Reportes compacto */
@media (max-width: 700px) {
  .bill-row { grid-template-columns: auto minmax(0, 1fr) auto auto; row-gap: 0; align-items: center; padding: 9px 10px 9px 12px; gap: 8px; }
  .bill-row-actions { grid-column: auto; justify-content: flex-end; gap: 4px; }
  .bill-row-actions .btn-primary { flex: 0 0 auto; padding: 6px 11px; font-size: 13px; }
  .bill-row-actions .btn-secondary { padding: 6px 10px; font-size: 13px; }
  .bill-row-main small { font-size: 12px; }
  .bill-row-amount b { font-size: 13px; }
  .bill-row.projected, .bill-row.card-bill { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  #app-layout .report-toolbar-main { flex-wrap: nowrap; gap: 8px; align-items: center; }
  #app-layout .report-quick-field { flex: 1 1 auto; min-width: 0; background: none; padding: 0; box-shadow: none; }
  #app-layout .report-quick-ranges { max-width: 100%; overflow-x: auto; padding: 3px; }
  #app-layout .report-quick-ranges button { padding: 5px 9px; font-size: 12px; }
  #app-layout .report-filter-toggle { flex: 0 0 auto; padding: 7px 11px; font-size: 12.5px; }
  #app-layout .report-view-tabs { width: 100%; }
  #app-layout .report-view-tabs button { padding: 6px 8px; font-size: 13px; }
  .seg-mini button { padding: 4px 8px; font-size: 12px; }
}

/* ===== Signo de ayuda (i) y anchos completos ===== */
.help-dot { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 12px; }
.help-dot.inline { position: static; margin-left: 6px; vertical-align: middle; flex: 0 0 auto; }
.dolar-title .help-dot.inline { margin-left: 4px; }
.pay-summary, .auto-summary, .card-hero, .report-hero { position: relative; }
#app-layout .pay-summary .help-dot, #app-layout .auto-summary .help-dot, #app-layout .report-hero .help-dot,
#app-layout .card-hero .help-dot { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }
#app-layout .pay-summary > .help-dot, #app-layout .auto-summary > .help-dot, #app-layout .report-hero > .help-dot { position: absolute; top: 10px; right: 10px; }
.card-hero-tools { display: flex; align-items: center; gap: 8px; }
#app-layout .patrimonio .help-dot { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }
.patrimonio-head .help-dot.inline { margin: 0 8px 0 auto; }
.hero-total-note { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.75); }
/* Todas las tarjetas de sección usan el ancho completo */
#app-layout .view > .panel, #app-layout .view > .user-panel, #view-presupuestos .panel, .telegram-panel { max-width: none !important; }

/* ===== Ayuda / tutorial ===== */
.help-panel { padding: 18px 20px; }
.help-hero h2 { font-size: 18px; margin-bottom: 4px; }
.help-hero p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.help-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: rgba(37,99,235,.15); color: var(--accent); font: italic 700 10px Georgia, serif; border: 1px solid rgba(37,99,235,.4); }
.help-panel h3 { font-size: 14px; margin: 0 0 8px; }
.help-start { background: linear-gradient(135deg, #f2f7ff, #fff); border: 1px solid #dbe7fb; border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.help-start ol { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 10px; }
.help-start li { counter-increment: st; display: grid; grid-template-columns: 26px 1fr auto; gap: 2px 10px; align-items: start; font-size: 13px; }
.help-start li::before { content: counter(st); grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.help-start li b { grid-column: 2; }
.help-start li span { grid-column: 2; color: var(--muted); line-height: 1.45; }
.help-start li button { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.help-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 6px; }
.help-toolbar h3 { margin: 0; }
.help-list { display: flex; flex-direction: column; gap: 8px; }
.help-item { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.help-item[open] { border-color: #c9dafb; box-shadow: var(--shadow); }
.help-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.help-item[open] summary::after { transform: rotate(180deg); }
.help-ico { width: 34px; height: 34px; border-radius: 10px; background: rgba(37,99,235,.1); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; }
.help-ico .ui-icon { width: 18px; height: 18px; }
.help-sum { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.help-sum b { font-size: 14px; }
.help-sum small { color: var(--muted); font-size: 13px; }
.help-body { padding: 2px 16px 16px 60px; font-size: 13px; line-height: 1.55; }
.help-body h4 { margin: 12px 0 4px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.help-body ol, .help-body ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.help-body .btn-add { margin-top: 12px; }
.help-glossary { margin-top: 20px; }
.help-glossary dl { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.help-glossary dt { font-weight: 700; }
.help-glossary dd { margin: 0; color: var(--muted); line-height: 1.5; }
@media (max-width: 700px) {
  .help-panel { padding: 14px; }
  .help-body { padding-left: 16px; }
  .help-glossary dl { grid-template-columns: 1fr; gap: 2px; }
  .help-glossary dd { margin-bottom: 8px; }
  .help-start li { grid-template-columns: 26px 1fr; }
  .help-start li button { grid-column: 2; grid-row: auto; justify-self: start; }
}

/* =====================================================================
   CELULAR: sin barra superior y menú inferior flotante (cápsula)
   ===================================================================== */
@media (max-width: 899px) {
  #app-layout .topbar { display: none; }
  #app-layout .mainwrap { padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 112px; }
  nav.bottomnav {
    left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 0; gap: 10px;
    background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; align-items: center;
  }
  nav.bottomnav .nav-pill {
    flex: 1; min-width: 0; display: flex; align-items: center; padding: 5px; border-radius: 999px;
    background: rgba(255,255,255,.96); box-shadow: 0 10px 28px rgba(30, 70, 140, .18);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  nav.bottomnav .nav-btn { flex: 1; padding: 7px 2px; border-radius: 999px; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  nav.bottomnav .nav-btn .ui-icon { width: 21px; height: 21px; }
  nav.bottomnav .nav-btn.active { background: #e8f0ff; color: var(--accent); }
  nav.bottomnav .fab {
    margin: 0; width: 54px; height: 54px; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(37, 99, 235, .4);
  }
  nav.bottomnav .fab .ui-icon { width: 26px; height: 26px; }
}

/* ===== Sin "rebote" hacia arriba/abajo y fondo claro en la app ===== */
/* Solo en html: si se pone también en body, la rueda/trackpad de la compu no "pasa" del body a la página y no baja. */
html { overscroll-behavior: none; }
html.app-active, body.app-active { background: #eaf2fd; }

/* ===== Signo de ayuda: el "!" chico de antes ===== */
.help-dot { font-family: inherit; font-style: normal; font-weight: 800; font-size: 11px; }
.help-i { font-family: inherit; font-style: normal; font-size: 11px; }

/* ===== Celular: el botón + va en el medio de la cápsula ===== */
@media (max-width: 899px) {
  nav.bottomnav .nav-pill .fab {
    margin: 0 4px; width: 48px; height: 48px; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .4);
  }
  nav.bottomnav .nav-pill .fab .ui-icon { width: 24px; height: 24px; }
  nav.bottomnav .nav-pill { justify-content: space-between; }
}

/* Cotización del dólar: más estrecha y baja en celular */
@media (max-width: 899px) {
  #app-layout .dolar-box { gap: 3px; margin: 0 0 8px; }
  #app-layout .dolar-title { font-size: 9px; letter-spacing: .06em; }
  #app-layout .dolar-chips { gap: 5px; max-width: 280px; }
  #app-layout .dolar-chip { padding: 3px 4px; border-radius: 8px; box-shadow: none; flex-direction: row; justify-content: center; align-items: baseline; gap: 5px; }
  #app-layout .dolar-chip .dl { font-size: 9.5px; font-weight: 600; }
  #app-layout .dolar-chip .dv { font-size: 12.5px; font-weight: 700; }
}

/* Cotización del dólar: ocupa todo el ancho, centrada */
#app-layout .dolar-box { align-items: stretch; width: 100%; }
#app-layout .dolar-title { align-self: center; }
#app-layout .dolar-chips { width: 100%; max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#app-layout .dolar-chip { min-width: 0; text-align: center; }
@media (max-width: 899px) {
  #app-layout .dolar-chips { gap: 6px; max-width: none; }
  #app-layout .dolar-chip { flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 3px; }
  #app-layout .dolar-chip .dl { font-size: 9.5px; line-height: 1.2; }
  #app-layout .dolar-chip .dv { font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
}

/* ===== Selector de tema (Temas y Apariencia) ===== */
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 460px; }
.theme-opt { display: flex; flex-direction: column; gap: 10px; align-items: stretch; padding: 10px; border-radius: 16px; border: 2px solid var(--border); background: var(--panel2); color: var(--txt); font: inherit; cursor: pointer; }
.theme-opt b { text-align: center; font-size: 14px; }
.theme-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.theme-prev { display: grid; gap: 6px; padding: 10px; border-radius: 10px; height: 84px; align-content: center; }
.theme-prev i { display: block; height: 12px; border-radius: 6px; }
.theme-prev.light { background: #eaf2fd; } .theme-prev.light i { background: #fff; box-shadow: 0 1px 4px rgba(30,70,140,.12); }
.theme-prev.dark { background: #0b1120; } .theme-prev.dark i { background: #1a2640; }

/* ===== TEMAS: Claro (sobrio, por defecto) · Oscuro (grises) · AMPTA (azul) ===== */
/* AMPTA: el azul de la marca, más claro */
html[data-theme="ampta"] #app-layout, html[data-theme="ampta"] .modal, html[data-theme="ampta"] .help-tip, html[data-theme="ampta"] .bottomnav {
  --accent: #3b82f6; --accent2: #2f6fe0;
}
html[data-theme="ampta"] #app-layout .panel-dark, html[data-theme="ampta"] #app-layout .patrimonio, html[data-theme="ampta"] #app-layout .card-hero {
  background: radial-gradient(600px 240px at 90% -40px, rgba(150, 200, 255, .5), transparent 70%), linear-gradient(135deg, #1d4a9e 0%, #3b82f6 100%);
}

/* Claro sobrio */
html[data-theme="light"] #app-layout, html[data-theme="light"] .modal, html[data-theme="light"] .help-tip, html[data-theme="light"] .bottomnav {
  --bg: #f7f7f8; --bg2: #ffffff; --panel: #ffffff; --panel2: #f3f3f5; --panel-dark: #25272d;
  --txt: #17181c; --muted: #6f717a; --border: #e7e7ea; --accent: #5b82dc; --accent2: #4a70c8;
  --radius: 18px; --shadow: 0 1px 2px rgba(20,20,30,.04), 0 4px 14px rgba(20,20,30,.05);
}
/* Oscuro en grises */
html[data-theme="dark"] #app-layout, html[data-theme="dark"] .modal, html[data-theme="dark"] .help-tip, html[data-theme="dark"] .bottomnav {
  --bg: #0f1012; --bg2: #17181b; --panel: #1a1b1f; --panel2: #23252a; --panel-dark: #26282e;
  --txt: #ececef; --muted: #9b9da6; --border: #2b2d33; --accent: #8aa6e6; --accent2: #7592d6;
  --green: #3fd17f; --red: #ff7185; --amber: #f0b44a;
  --radius: 18px; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.28);
}

/* Común a los dos temas sobrios */
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout { background: var(--bg); background-attachment: scroll; }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) .topbar { background: var(--bg); }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .panel-dark,
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .patrimonio,
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .card-hero {
  background: linear-gradient(135deg, #202227 0%, #2f3238 100%); border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
}
html[data-theme="dark"] #app-layout .panel-dark, html[data-theme="dark"] #app-layout .patrimonio, html[data-theme="dark"] #app-layout .card-hero {
  background: linear-gradient(135deg, #25272c 0%, #32353c 100%); border-color: rgba(255,255,255,.08);
}
@media (min-width: 900px) {
  html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .sidebar { background: #17181b; border-right: 0; }
  html[data-theme="dark"] #app-layout .sidebar { background: #0b0b0d; border-right: 1px solid #1c1d21; }
  html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .sidebar .side-add {
    background: #8aa6e6; color: #14213d; box-shadow: none; font-weight: 600;
  }
  html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .sidebar .side-add:hover { background: #9db6ee; }
  html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .sidebar .snav.active::before { background: #8aa6e6; }
}
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) .icon-btn { background: var(--panel); box-shadow: var(--shadow); }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .panel { box-shadow: var(--shadow); border: 1px solid var(--border); }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .goal .fill.goal-fill,
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) .mini-row .fill.goal-fill { background: var(--accent); }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout .patrimonio .hero-visibility-edit { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) nav.bottomnav .fab { background: #7f9ee3; box-shadow: 0 6px 16px rgba(20,20,30,.25); }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) .theme-opt.active { box-shadow: 0 0 0 3px rgba(138,166,230,.3); }

/* Claro sobrio: neutralizar azulados fijos */
html:is([data-theme="light"],[data-theme="cream"]).app-active, html:is([data-theme="light"],[data-theme="cream"]) body.app-active, html:is([data-theme="light"],[data-theme="cream"]) body { background: #f7f7f8; }
html:is([data-theme="light"],[data-theme="cream"]) #app-layout input, html:is([data-theme="light"],[data-theme="cream"]) #app-layout select, html:is([data-theme="light"],[data-theme="cream"]) #app-layout textarea,
html:is([data-theme="light"],[data-theme="cream"]) .modal input, html:is([data-theme="light"],[data-theme="cream"]) .modal select, html:is([data-theme="light"],[data-theme="cream"]) .modal textarea { background: #f6f6f8; }
html:is([data-theme="light"],[data-theme="cream"]) #app-layout .bgt .track, html:is([data-theme="light"],[data-theme="cream"]) #app-layout .goal .track, html:is([data-theme="light"],[data-theme="cream"]) .mini-row .track { background: #ececef; }
html:is([data-theme="light"],[data-theme="cream"]) #app-layout .onboarding, html:is([data-theme="light"],[data-theme="cream"]) .help-start { background: #fafafb; border-color: var(--border); }
html:is([data-theme="light"],[data-theme="cream"]) .telegram-command-row code, html:is([data-theme="light"],[data-theme="cream"]) .code-line { background: #f3f3f5 !important; }
html:is([data-theme="light"],[data-theme="cream"]) nav.bottomnav .nav-btn.active { background: #eceef3; }
html:is([data-theme="light"],[data-theme="cream"]) .bill-row.projected { background: #fafafb; border-color: rgba(60,60,80,.25); }
html:is([data-theme="light"],[data-theme="cream"]) #app-layout .danger-btn { background: #fdeef0; }
html:is([data-theme="light"],[data-theme="cream"]) .modal { background: rgba(20,20,30,.45); }
html:is([data-theme="light"],[data-theme="cream"]) #app-toast { background: #1b1c20; }

/* Oscuro en grises */
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .icon-btn,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .report-view-tabs, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .group-tabs,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .pay-chips, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .pay-add-menu, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bill-menu,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .pay-month button, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bill-group-title em,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bill-row, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .empty-state,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .report-quick-ranges, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .report-filter-toggle,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .report-filter-panel.open, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .help-item,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .dolar-chip, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .modal .modal-box, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .modal > div {
  background: var(--panel); color: var(--txt);
}
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bottomnav, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) nav.bottomnav .nav-pill { background: var(--panel); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) nav.bottomnav { background: transparent; }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) nav.bottomnav .nav-btn.active, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .seg-mini button.active { background: var(--panel2); color: var(--accent); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout input, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout select, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout textarea,
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .modal input, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .modal select, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .modal textarea { background: var(--bg); color: var(--txt); border-color: var(--border); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .bgt .track, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .goal .track, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .mini-row .track { background: var(--border); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .onboarding, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .help-start { background: var(--panel2); border-color: var(--border); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .telegram-command-row code, html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .code-line { background: var(--bg) !important; }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .patrimonio .hbal.credit { background: #251f3a; border-color: #4b3a86; }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bill-row.projected { background: var(--bg2); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bill-row .tag.est { background: #3a2c0c; color: #f5d78a; }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .bill-row .tag.ok { background: #0f3322; color: #6fe0a2; }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-layout .danger-btn { background: #3a1822; }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) .modal { background: rgba(0,0,0,.7); }
html:is([data-theme="dark"],[data-theme="cream-dark"],[data-theme="ampta-dark"]) #app-toast { background: var(--txt); color: var(--bg); }
/* Se siente como app: sin selección de texto (salvo en campos de escritura) */
#app-layout, .modal, .bottomnav, .help-tip { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#app-layout input, #app-layout textarea, .modal input, .modal textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
#app-layout img { -webkit-user-drag: none; }

/* Botón Copiar: efecto al tocarlo + aviso */
.telegram-command-row button { transition: transform .12s ease, background-color .12s ease; }
.telegram-command-row button:active, .telegram-command-row button.pressed { transform: scale(.94); }
.telegram-command-row button.pressed { animation: copyflash .4s ease; }
@keyframes copyflash { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.55); } 100% { box-shadow: 0 0 0 12px rgba(37,99,235,0); } }
#app-toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 9999; transform: translate(-50%, 12px);
  background: #12306a; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 28px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
#app-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Menú lateral estilo app (logo arriba, Nuevo movimiento, cuenta abajo) ===== */
.side-account { display: none; }
@media (min-width: 900px) {
  #app-layout .sidebar {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0e1730; padding: 0; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.06);
  }
  #app-layout .sidebar .brand-home { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; text-align: left; width: 100%; }
  #app-layout .sidebar .sidebar-brand-logo { width: 130px; }
  #app-layout .sidebar .side-add {
    margin: 16px 16px 8px; width: auto; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 13px 14px; font-weight: 700; font-size: 14.5px; line-height: 1; font-family: inherit;
    box-shadow: 0 6px 16px rgba(37,99,235,.35); cursor: pointer;
  }
  #app-layout .sidebar .side-add:hover { background: var(--accent2); }
  #app-layout .sidebar .side-nav { padding: 6px 12px 8px; display: flex; flex-direction: column; gap: 2px; }
  #app-layout .sidebar .snav { font-family: inherit; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.62); border-radius: 10px; padding: 11px 12px; position: relative; }
  #app-layout .sidebar .snav:hover { background: rgba(255,255,255,.06); color: #fff; }
  #app-layout .sidebar .snav.active { background: rgba(255,255,255,.09); color: #fff; font-weight: 600; box-shadow: none; }
  #app-layout .sidebar .snav.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
  #app-layout .sidebar .snav.sub.active { background: rgba(255,255,255,.09); color: #fff; }
  #app-layout .sidebar .snav.sub.active::before { display: none; }
  #app-layout .sidebar .side-account {
    display: flex; align-items: center; gap: 12px; flex: 0 0 auto; position: relative; cursor: pointer;
    padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08);
  }
  #app-layout .sidebar .side-account:hover { background: rgba(255,255,255,.04); }
  #app-layout .sidebar .side-account-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  #app-layout .sidebar .side-account-info b { color: #fff; font-size: 14px; font-weight: 600; }
  #app-layout .sidebar .side-account-info span { color: rgba(255,255,255,.55); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-wrap.in-sidebar .avatar { width: 38px; height: 38px; font-size: 16px; box-shadow: none; }
  .profile-wrap.in-sidebar .profile-menu { left: 8px; right: auto; top: auto; bottom: calc(100% + 14px); width: 232px; }
  #app-layout .sidebar .side-account .profile-wrap { position: static; }
}

.theme-options { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; }
.theme-prev.light { background: #f7f7f8; } .theme-prev.light i { background: #fff; box-shadow: 0 1px 4px rgba(20,20,30,.12); }
.theme-prev.dark { background: #0f1012; } .theme-prev.dark i { background: #26282e; }
.theme-prev.ampta { background: #dbe9fb; } .theme-prev.ampta i { background: #3b82f6; }
.theme-prev.ampta i:nth-child(2) { background: #fff; }

/* Temas sobrios: botones sin brillo, más discretos */
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout :is(button, .btn-add, .btn-primary):not(.icon-btn):not(.fab):not(.pay-chips button) { box-shadow: none; }
html:is([data-theme="light"],[data-theme="dark"],[data-theme="cream"],[data-theme="cream-dark"]) #app-layout :is(.btn-add, .btn-primary, .bill-pay, .primary) { background: #6f8fdb; }
html[data-theme="dark"] #app-layout :is(.btn-add, .btn-primary, .bill-pay, .primary) { background: #5d79bd; }

/* ===== Crema: blancos y tonos cremitas ===== */
html[data-theme="cream"] #app-layout, html[data-theme="cream"] .modal, html[data-theme="cream"] .help-tip, html[data-theme="cream"] .bottomnav {
  --bg: #f7f2e8; --bg2: #fffdf8; --panel: #fffdf9; --panel2: #f4eee0; --panel-dark: #3b352c;
  --txt: #2b2720; --muted: #81796a; --border: #ece4d3; --accent: #b87c4f; --accent2: #a46b40;
  --radius: 18px; --shadow: 0 1px 2px rgba(80,60,30,.05), 0 4px 14px rgba(80,60,30,.06);
}
html[data-theme="cream"].app-active, html[data-theme="cream"] body.app-active, html[data-theme="cream"] body { background: #f7f2e8; }
html[data-theme="cream"] #app-layout .panel-dark, html[data-theme="cream"] #app-layout .patrimonio, html[data-theme="cream"] #app-layout .card-hero {
  background: linear-gradient(135deg, #3a342b 0%, #50473a 100%); border-color: rgba(255,255,255,.06);
}
html[data-theme="cream"] #app-layout input, html[data-theme="cream"] #app-layout select, html[data-theme="cream"] #app-layout textarea,
html[data-theme="cream"] .modal input, html[data-theme="cream"] .modal select, html[data-theme="cream"] .modal textarea { background: #faf6ec; }
html[data-theme="cream"] #app-layout .bgt .track, html[data-theme="cream"] #app-layout .goal .track, html[data-theme="cream"] .mini-row .track { background: #ece4d3; }
html[data-theme="cream"] #app-layout .onboarding, html[data-theme="cream"] .help-start, html[data-theme="cream"] .bill-row.projected { background: #fbf7ee; }
html[data-theme="cream"] .telegram-command-row code, html[data-theme="cream"] .code-line { background: #f4eee0 !important; }
html[data-theme="cream"] nav.bottomnav .nav-btn.active { background: #f1e8d6; }
html[data-theme="cream"] #app-toast { background: #2b2720; }
@media (min-width: 900px) {
  html[data-theme="cream"] #app-layout .sidebar { background: #2c2822; }
  html[data-theme="cream"] #app-layout .sidebar .side-add { background: #e3bf9e; color: #3a2a1a; }
  html[data-theme="cream"] #app-layout .sidebar .side-add:hover { background: #ebcdb0; }
  html[data-theme="cream"] #app-layout .sidebar .snav.active::before { background: #e3bf9e; }
}
html[data-theme="cream"] #app-layout :is(.btn-add, .btn-primary, .bill-pay, .primary) { background: #c9946a; color: #fff; }
html[data-theme="cream"] nav.bottomnav .fab { background: #d3a37c; }
html[data-theme="cream"] #app-layout .patrimonio .hero-visibility-edit { color: #fff; }
.theme-prev.cream { background: #f7f2e8; } .theme-prev.cream i { background: #fffdf9; box-shadow: 0 1px 4px rgba(80,60,30,.14); }
.theme-prev.gray { background: #f7f7f8; } .theme-prev.gray i { background: #fff; box-shadow: 0 1px 4px rgba(20,20,30,.12); }
.theme-prev.gray i:first-child, .theme-prev.cream i:first-child { background: #2f3238; }
.theme-prev.cream i:first-child { background: #4a4237; }

/* ===== Modo oscuro de cada paleta ===== */
html[data-theme="dark"].app-active, html[data-theme="dark"] body.app-active, html[data-theme="dark"] body { background: #0f1012; }
html[data-theme="cream-dark"].app-active, html[data-theme="cream-dark"] body.app-active, html[data-theme="cream-dark"] body { background: #16130f; }
html[data-theme="ampta-dark"].app-active, html[data-theme="ampta-dark"] body.app-active, html[data-theme="ampta-dark"] body { background: #0a1020; }
html[data-theme="cream-dark"] #app-layout, html[data-theme="cream-dark"] .modal, html[data-theme="cream-dark"] .help-tip, html[data-theme="cream-dark"] .bottomnav {
  --bg: #16130f; --bg2: #1d1914; --panel: #221e18; --panel2: #2c2720; --panel-dark: #2e2820;
  --txt: #f1ebdf; --muted: #a39a88; --border: #342e25; --accent: #d3a37c; --accent2: #c4936a;
  --green: #3fd17f; --red: #ff7185; --amber: #f0b44a;
  --radius: 18px; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.28);
}
html[data-theme="ampta-dark"] #app-layout, html[data-theme="ampta-dark"] .modal, html[data-theme="ampta-dark"] .help-tip, html[data-theme="ampta-dark"] .bottomnav {
  --bg: #0a1020; --bg2: #111a2e; --panel: #131d33; --panel2: #1a2640; --panel-dark: #0a1020;
  --txt: #e8eefb; --muted: #93a2c2; --border: #25324f; --accent: #4c8dff; --accent2: #3a79ee;
  --green: #34d27b; --red: #ff6b80; --amber: #f0b44a;
  --radius: 18px; --shadow: 0 6px 22px rgba(0,0,0,.35);
}
html[data-theme="ampta-dark"] #app-layout {
  background: radial-gradient(900px 420px at 85% -80px, rgba(60,110,200,.28), transparent 70%), linear-gradient(180deg, #0b1326 0%, #0a1020 260px, #080d19 100%);
  background-attachment: fixed;
}
html[data-theme="ampta-dark"] .topbar { background: linear-gradient(180deg, #0b1326 55%, transparent); }
html[data-theme="cream-dark"] #app-layout .panel-dark, html[data-theme="cream-dark"] #app-layout .patrimonio, html[data-theme="cream-dark"] #app-layout .card-hero {
  background: linear-gradient(135deg, #302a22 0%, #403829 100%); border-color: rgba(255,255,255,.08);
}
@media (min-width: 900px) {
  html[data-theme="cream-dark"] #app-layout .sidebar { background: #100e0b; border-right: 1px solid #211d17; }
  html[data-theme="cream-dark"] #app-layout .sidebar .side-add { background: #e3bf9e; color: #3a2a1a; }
  html[data-theme="cream-dark"] #app-layout .sidebar .side-add:hover { background: #ebcdb0; }
  html[data-theme="cream-dark"] #app-layout .sidebar .snav.active::before { background: #e3bf9e; }
}
html[data-theme="cream-dark"] #app-layout :is(.btn-add, .btn-primary, .bill-pay, .primary) { background: #a7794f; color: #fff; }
html[data-theme="cream-dark"] nav.bottomnav .fab { background: #b98860; }

/* Selector de modo */
.mode-options { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel2); margin-top: 6px; }
.mode-opt { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 9px 22px; border-radius: 999px; cursor: pointer; }
.mode-opt.active { background: var(--panel); color: var(--txt); box-shadow: var(--shadow); }
.theme-sub { margin: 22px 0 6px; font-size: 14px; font-weight: 700; }

/* ===== Crema claro: tarjetas principales y menú en crema casi blanco ===== */
html[data-theme="cream"] #app-layout :is(.panel-dark, .patrimonio, .card-hero) {
  background: linear-gradient(135deg, #fffdf8 0%, #f6efdf 100%); border: 1px solid #ebe2cf; box-shadow: var(--shadow); color: var(--txt);
}
html[data-theme="cream"] #app-layout :is(.panel-dark, .patrimonio, .card-hero) :is(span, b, small, div, p, em, strong, label, h1, h2, h3, i, button):not(.neg):not(.warn):not(.bad):not(.out):not(.ui-icon) { color: var(--txt) !important; }
html[data-theme="cream"] #app-layout :is(.panel-dark, .patrimonio, .card-hero) :is(.hero-total-label, .hero-total-sub, .hero-total-goals, .hero-total-note, .hbal .n, .patrimonio-count, .lbl, .sub, .note, .pay-sum-label, .pay-sum-sub, .auto-sum-title, .auto-sum-col span, .card-hero-cell span, .card-hero-foot, .report-hero-label, .report-hero-sub, .report-hero-cell span, .report-hero-cell em, small) { color: var(--muted) !important; }
html[data-theme="cream"] #app-layout :is(.panel-dark, .patrimonio, .card-hero) :is(.neg, .warn, .bad, .out b, .out) { color: var(--red) !important; }
html[data-theme="cream"] #app-layout :is(.panel-dark, .patrimonio, .card-hero) :is(.hbal, .card-hero-cell, .auto-sum-col, .report-hero-cell, .hero-eye, .hero-visibility-edit, .help-dot, .rchip) {
  background: rgba(120, 95, 50, .07) !important; border-color: rgba(120, 95, 50, .16) !important;
}
html[data-theme="cream"] #app-layout :is(.panel-dark, .patrimonio, .card-hero) :is(.hero-total, .hero-total-goals, .card-hero-projected) { border-color: rgba(120, 95, 50, .18) !important; }
html[data-theme="cream"] #app-layout .patrimonio .hero-balances-empty { border-color: rgba(120,95,50,.3); }
html[data-theme="cream"] #app-layout .patrimonio .hbal.credit { background: #f3eefb !important; }
@media (min-width: 900px) {
  html[data-theme="cream"] #app-layout .sidebar { background: #fbf8f0; border-right: 1px solid #ece4d3; }
  html[data-theme="cream"] #app-layout .sidebar .sidebar-brand-logo { filter: invert(1) hue-rotate(180deg); }
  html[data-theme="cream"] #app-layout .sidebar .brand-home { border-bottom-color: #ece4d3; }
  html[data-theme="cream"] #app-layout .sidebar .snav { color: #6b6354; }
  html[data-theme="cream"] #app-layout .sidebar .snav:hover { background: rgba(120,95,50,.07); color: var(--txt); }
  html[data-theme="cream"] #app-layout .sidebar .snav.active, html[data-theme="cream"] #app-layout .sidebar .snav.sub.active { background: #f1e8d6; color: var(--txt); }
  html[data-theme="cream"] #app-layout .sidebar .snav-sub { border-left-color: #e6dcc7; }
  html[data-theme="cream"] #app-layout .sidebar .side-account { border-top-color: #ece4d3; }
  html[data-theme="cream"] #app-layout .sidebar .side-account:hover { background: rgba(120,95,50,.05); }
  html[data-theme="cream"] #app-layout .sidebar .side-account-info b { color: var(--txt); }
  html[data-theme="cream"] #app-layout .sidebar .side-account-info span { color: var(--muted); }
}
html[data-theme="cream"] #app-layout .patrimonio .patrimonio-chevron { color: var(--muted) !important; }

@media (min-width: 900px) {
  #app-layout .sidebar .side-account.active { background: rgba(255,255,255,.08); }
  html[data-theme="cream"] #app-layout .sidebar .side-account.active { background: #f1e8d6; }
}

/* Pantalla "Más" (celular): lista compacta, Configuración desplegable y cuenta abajo */
#view-mas .mas-panel { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
#view-mas .biglink { padding: 10px 14px; border-radius: 12px; font-size: 15px; gap: 12px; margin: 0; background: var(--panel2); border-color: transparent; }
#view-mas .biglink:active { background: var(--panel2); }
#view-mas .biglink .ui-icon { width: 20px; height: 20px; }
#view-mas .mas-group .snav-chevron { margin-left: auto; transition: transform .18s ease; color: var(--muted); }
#view-mas .mas-group.open .snav-chevron { transform: rotate(180deg); }
#view-mas .mas-sub { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 22px; padding-left: 10px; border-left: 2px solid var(--border); }
#view-mas .mas-sub.hidden { display: none; }
#view-mas .biglink.sub { padding: 8px 12px; font-size: 14px; color: var(--muted); background: transparent; }
#view-mas .mas-account { margin-top: 6px; padding: 10px 14px; }
#view-mas .mas-account .avatar { width: 38px; height: 38px; flex: 0 0 auto; font-size: 16px; }
#view-mas .mas-account-info { display: flex; flex-direction: column; min-width: 0; }
#view-mas .mas-account-info b { font-size: 15px; }
#view-mas .mas-account-info small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Presupuestos por mes */
.budget-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.budget-month { display: inline-flex; align-items: center; gap: 4px; background: var(--panel2); border-radius: 999px; padding: 3px; }
.budget-month button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--panel); color: var(--txt); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.budget-month b { min-width: 120px; text-align: center; font-size: 14px; }
.budget-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-add.secondary { background: var(--panel2); color: var(--txt); box-shadow: none; border: 1px solid var(--border); }
#app-layout .btn-add.secondary { background: var(--panel2); color: var(--txt) !important; }

/* Este mes: arriba de todo y más claro (mismo tamaño) */
#app-layout #view-inicio .month-panel { padding: 14px 16px 16px; }
#app-layout #view-inicio .month-panel .panel-head { margin-bottom: 10px; }
#app-layout #view-inicio .month-panel .panel-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#app-layout #view-inicio .month-panel .mt { border: 1px solid transparent; }
#app-layout #view-inicio .month-panel .mt .lbl { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
#app-layout #view-inicio .month-panel .mt .val { font-weight: 800; }
#app-layout #view-inicio .month-panel .mt:nth-child(1) { background: color-mix(in srgb, var(--green) 11%, var(--panel)); border-color: color-mix(in srgb, var(--green) 22%, transparent); }
#app-layout #view-inicio .month-panel .mt:nth-child(1) .lbl { color: var(--green); }
#app-layout #view-inicio .month-panel .mt:nth-child(2) { background: color-mix(in srgb, var(--red) 10%, var(--panel)); border-color: color-mix(in srgb, var(--red) 22%, transparent); }
#app-layout #view-inicio .month-panel .mt:nth-child(2) .lbl { color: var(--red); }
#app-layout #view-inicio .month-panel .mt:nth-child(3) { background: color-mix(in srgb, var(--accent) 11%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }
#app-layout #view-inicio .month-panel .mt:nth-child(3) .lbl { color: var(--accent); }

/* Tema AMPTA: el degradado cubre toda la pantalla, de punta a punta (sin corte arriba) */
html[data-theme="ampta"].app-active, html[data-theme="ampta"].app-active body {
  background: radial-gradient(1100px 520px at 85% -120px, rgba(96,165,250,.38), transparent 70%), linear-gradient(180deg, #d4e5fb 0%, #e6f0fc 40%, #f2f7fe 100%);
  background-attachment: fixed; background-color: #d4e5fb; min-height: 100%;
}
/* En el celular, el degradado se pinta también detrás de la barra de arriba (iPhone no respeta "fixed"). */
html[data-theme="ampta"].app-active { background-attachment: scroll; }
html[data-theme="ampta"] #app-layout, html[data-theme="ampta"] .topbar, html[data-theme="ampta"] .mainwrap { background: transparent; }
html[data-theme="ampta-dark"].app-active, html[data-theme="ampta-dark"].app-active body {
  background: radial-gradient(1100px 520px at 85% -120px, rgba(60,110,200,.3), transparent 70%), linear-gradient(180deg, #0c1428 0%, #0a1020 45%, #080d19 100%);
  background-attachment: fixed; background-color: #0a1020; min-height: 100%;
}
html[data-theme="ampta-dark"] #app-layout, html[data-theme="ampta-dark"] .topbar { background: transparent; }

/* Mercado Pago en Mi cuenta */
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.mp-pending-title { margin: 16px 0 4px; font-size: 14px; }
.mp-pending-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.mp-pending-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-pending-info span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.mp-pending-actions { display: flex; gap: 6px; }
.mp-pending-actions button { border: 1px solid var(--border); background: var(--panel2); color: var(--txt); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dot-ok { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 4px; }

.mp-banner { display: block; width: 100%; margin: 0 0 12px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); color: var(--txt); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.mp-banner.hidden { display: none; }
.mp-diag { margin: 8px 0; font-size: 13px; color: var(--muted); }
.mp-diag summary { cursor: pointer; font-weight: 600; }
.mp-diag p { margin: 6px 0 0; line-height: 1.5; word-break: break-word; }

/* Mercado Pago: Por revisar (Movimientos) y explicación (Mi cuenta) */
.mp-review { border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent) !important; margin-bottom: 14px; }
.mp-count { display: inline-block; min-width: 22px; padding: 1px 8px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-align: center; vertical-align: middle; }
.mp-rev { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); }
.mp-rev-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.mp-dir { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.mp-dir.in { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.mp-dir.out { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.mp-rev-amt { font-size: 16px; }
.mp-rev-sub { font-size: 13px; color: var(--muted); }
.mp-rev-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mp-rev-actions select { max-width: 150px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); font: inherit; font-size: 13px; }
.mp-do, .mp-skip { border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); }
.mp-do { background: var(--accent); color: #fff; border-color: transparent; }
.mp-skip { background: var(--panel2); color: var(--txt); }
.mp-review-link { display: block; width: 100%; text-align: left; margin: 8px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); color: var(--txt); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mp-how { margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.mp-how summary { cursor: pointer; font-weight: 600; color: var(--txt); }
.mp-how ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.55; }
.mp-how li { margin-bottom: 4px; }
.mp-undo { display: block; margin: 4px 0 8px; font-size: 13px; color: var(--muted); }

.mp-sub-title { margin: 16px 0 2px; font-size: 14px; }
.mp-src { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--border); }
.mp-src-label { font-size: 14px; font-weight: 600; }
.mp-src select, .mp-acc { max-width: 220px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); font: inherit; font-size: 13px; }
.mp-toggle { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 6px; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.mp-toggle input { margin-top: 3px; flex: 0 0 auto; }
.mp-toggle b { color: var(--txt); }
.mp-empty { margin: 6px 0; }

/* Landing: integración con Mercado Pago y explicaciones */
.landing-eyebrow { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(47,128,255,.12); border: 1px solid rgba(47,128,255,.28); color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.landing-mp { border-top: 1px solid var(--border); }
.landing-how { color: var(--muted); }
.landing-how b { color: var(--txt); font-weight: 700; }
.landing-note { margin-top: 36px; padding: 20px 22px; border-radius: 14px; border: 1px solid rgba(47,128,255,.28); background: rgba(47,128,255,.08); font-size: 14px; line-height: 1.6; color: var(--txt); }
.landing-note b { color: var(--accent); }
@media (max-width: 900px) { .landing-feature-list { grid-template-columns: minmax(0, 1fr); } }

/* Por revisar: desplegable y grupos por tarjeta */
.mp-review-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; background: none; border: 0; color: var(--txt); font: inherit; cursor: pointer; text-align: left; }
.mp-review-head h2 { margin: 0; font-size: 16px; }
.mp-chev { color: var(--muted); transition: transform .18s ease; flex: 0 0 auto; }
.mp-review-head[aria-expanded="true"] .mp-chev { transform: rotate(180deg); }
.mp-review-body { margin-top: 8px; }
.mp-review-body.hidden { display: none; }
.mp-group { padding: 12px 0; border-top: 1px solid var(--border); }
.mp-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mp-group-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-group-info span { font-size: 13px; color: var(--muted); }
.mp-group-list { margin-top: 8px; font-size: 13px; }
.mp-group-list summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.mp-mini { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--border); }
.mp-mini-d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.mp-transfers { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 8px; }
.mp-transfers-head { display: flex; align-items: center; justify-content: space-between; }
.mp-transfers .mp-rev:first-child { border-top: 0; }

/* ===== Selección de varios movimientos ===== */
.tx-head-actions { display: flex; align-items: center; gap: 12px; }
.tx-check { display: none; flex-shrink: 0; }
.tx-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, #2f80ff); pointer-events: none; }
.tx-list.selecting .tx-check { display: flex; }
.tx-list.selecting .tx { cursor: pointer; border-radius: 10px; transition: background .15s; }
.tx-list.selecting .tx.picked { background: color-mix(in srgb, var(--accent, #2f80ff) 9%, transparent); }
.tx-list.selecting .tx-actions { display: none; }
.tx-list.selecting .traceable-info { cursor: pointer; }
.tx-bulk {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60;
  width: min(720px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--panel, var(--bg)); box-shadow: 0 10px 30px rgba(0,0,0,.14);
  animation: txBulkIn .2s ease-out;
}
.tx-bulk.hidden { display: none; }
.tx-bulk-all { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.tx-bulk-all input { width: 18px; height: 18px; margin: 0; }
.tx-bulk-btns { display: flex; align-items: center; gap: 8px; }
.tx-bulk-btns button:disabled { opacity: .45; pointer-events: none; }
@keyframes txBulkIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
@media (min-width: 900px) { #app-layout .tx-bulk { left: calc(50% + 125px); width: min(720px, calc(100% - 282px)); } }
.view:has(.tx-bulk:not(.hidden)) .tx-list { padding-bottom: 80px; }
@media (max-width: 899px) {
  .tx-bulk { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; }
  .tx-bulk-btns { width: 100%; justify-content: flex-end; }
}
#modal-save.danger-save { background: var(--red); color: #fff; }
#modal-save:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Mercado Pago: saldo y conciliación ===== */
.mp-reconcile { margin: 16px 0 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; }
.mp-reconcile .mp-sub-title { margin-top: 0; }
.mp-reconcile-new { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.mp-bal { display: flex; gap: 24px; flex-wrap: wrap; margin: 8px 0 10px; }
.mp-bal small { display: block; color: var(--muted); font-size: 13px; }
.mp-bal b { font-size: 20px; letter-spacing: -.01em; }
.mp-rec-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mp-rec-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.mp-rec-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.chip-btn { border: 1px solid var(--border); background: transparent; color: var(--txt); border-radius: 999px; padding: 5px 11px; font-size: 13.5px; cursor: pointer; }
.chip-btn:active { transform: scale(.97); }
@media (max-width: 560px) { .mp-rec-form { grid-template-columns: 1fr; } }
.mp-ask { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.35; }
.mp-diag-table { display: grid; gap: 6px; max-height: 320px; overflow: auto; font-size: 13.5px; }
.mp-diag-table > div { display: grid; grid-template-columns: 120px 90px 1fr; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.mp-diag-table small { grid-column: 1 / -1; color: var(--muted); }

/* ===== Deuda de tarjeta: desglose ===== */
button.hbal.credit { cursor: pointer; font: inherit; color: inherit; text-align: left; width: 100%; transition: transform .15s, border-color .15s; }
button.hbal.credit:hover { border-color: var(--accent); }
button.hbal.credit:active { transform: scale(.98); }
button.card-hero-cell[data-act="debt"] { cursor: pointer; }
.trace-group { margin: 14px 0 4px; font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mp-freq { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
.mp-freq select { max-width: 320px; }
.mp-freq small { color: var(--muted); font-weight: 400; font-size: 13.5px; }

/* ===== Movimientos: símbolo rojo/verde, textos y montos en negro, solo la categoría en color ===== */
.tx .ic.in { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.tx .ic.out { color: var(--red); background: color-mix(in srgb, var(--red) 11%, transparent); }
.tx .ic.tr { color: var(--txt); background: var(--panel2); }
.tx .amt, .tx .amt.in, .tx .amt.out, .tx .amt.tr { color: var(--txt); }
.tx .info .t1 { color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .info .t2 { color: var(--txt); opacity: .82; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tx-cat { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, transparent); }
.tx-cat.none { --cat: var(--muted); font-weight: 600; }

/* ===== Mercado Pago: pantalla prolija ===== */
.mpx { display: grid; gap: 14px; margin-top: 6px; }
.mpx-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; }
.mpx-status { display: flex; align-items: center; gap: 12px; }
.mpx-status b { display: block; font-size: 15px; }
.mpx-status span:not(.mpx-dot) { color: var(--muted); font-size: 13px; }
.mpx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 18%, transparent); flex-shrink: 0; }
.mpx-status.bad .mpx-dot { background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 18%, transparent); }
.mpx-alert { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--amber, #f0b44a) 55%, transparent); background: color-mix(in srgb, var(--amber, #f0b44a) 12%, transparent); color: var(--txt); font: inherit; cursor: pointer; }
.mpx-alert span { font-size: 13px; color: var(--muted); }
.mpx-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; display: grid; gap: 12px; }
.mpx-card-head { display: flex; gap: 12px; align-items: flex-start; }
.mpx-card-head h4 { margin: 0 0 3px; font-size: 15.5px; }
.mpx-card-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.mpx-num { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mpx-num .ui-icon { width: 19px; height: 19px; }
.mpx-bal { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.mpx-bal small { display: block; color: var(--muted); font-size: 13px; }
.mpx-bal b { font-size: 22px; letter-spacing: -.01em; }
.mpx-badge { padding: 5px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.mpx-badge.ok { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.mpx-badge.warn { color: #b7791f; background: color-mix(in srgb, var(--amber, #f0b44a) 18%, transparent); }
.mpx-hint { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.mpx-card > .btn-add { justify-self: start; }
.mpx-steps { display: grid; gap: 14px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--txt) 3.5%, transparent); }
.mpx-steps.hidden { display: none; }
.mpx-step { display: flex; gap: 12px; align-items: flex-start; }
.mpx-step > div { display: grid; gap: 6px; flex: 1; min-width: 0; }
.mpx-step small { color: var(--muted); font-size: 13.5px; }
.mpx-step input[type="text"] { max-width: 260px; font-size: 16px; }
.mpx-step .btn-add { justify-self: start; }
.mpx-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--accent); flex-shrink: 0; }
.mpx-inline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.mpx-inline input { max-width: 170px; }
.mp-rec-quick { margin: 2px 0; }
.chip-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mpx-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.mpx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mpx-sw { width: 40px; height: 23px; border-radius: 999px; background: var(--border); position: relative; flex-shrink: 0; transition: background .2s; margin-top: 1px; }
.mpx-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.mpx-switch input:checked + .mpx-sw { background: var(--green); }
.mpx-switch input:checked + .mpx-sw::after { transform: translateX(17px); }
.mpx-switch input:focus-visible + .mpx-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.mpx-switch b, .mpx-field b { display: block; font-size: 14px; }
.mpx-switch small, .mpx-field small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.mpx-field { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.mpx-field select { max-width: 320px; }
.mpx .mp-src { border-top: 1px solid var(--border); padding: 10px 0 0; }
.mpx .mp-src:first-child { border-top: 0; padding-top: 0; }
.mpx .mp-src-label { font-weight: 600; font-size: 14px; }
.mpx-adv { border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; }
.mpx-adv > summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.mpx-adv-body { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0 4px; }
.mpx-adv .mp-diag { margin-top: 10px; }
.mpx-connect .btn-add { justify-self: start; }
.mpx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mpx-checks li { position: relative; padding-left: 28px; font-size: 14.5px; }
.mpx-checks li::before { content: '✓'; position: absolute; left: 0; top: -1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.mpx-tut-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: transparent; color: var(--txt); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.mpx-tut-btn .ui-icon { width: 16px; height: 16px; color: var(--accent); }
.mpx-tut-btn:hover { border-color: var(--accent); }

/* Tutorial */
.mpt-overlay { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 16px; background: rgba(10,12,16,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.mpt-overlay.open { display: grid; }
.mpt-box { position: relative; width: min(440px, 100%); background: var(--panel, #fff); color: var(--txt); border-radius: 22px; padding: 28px 24px 20px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.mpt-box.anim > *:not(.mpt-close) { animation: mptIn .32s ease-out both; }
@keyframes mptIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mpt-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.mpt-art { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.mpt-art .ui-icon { width: 34px; height: 34px; }
.mpt-count { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mpt-box h3 { margin: 6px 0 10px; font-size: 21px; }
.mpt-text { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.mpt-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); background: color-mix(in srgb, var(--txt) 4%, transparent); border-radius: 12px; padding: 10px 12px; }
.mpt-dots { display: flex; justify-content: center; gap: 7px; margin: 18px 0 14px; }
.mpt-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: var(--border); cursor: pointer; transition: width .2s, background .2s; }
.mpt-dots button.on { width: 22px; background: var(--accent); }
.mpt-nav { display: flex; justify-content: space-between; gap: 10px; }
.mpt-nav .btn-add { flex: 1; }
@media (prefers-reduced-motion: reduce) { .mpt-box.anim > * { animation: none; } }
@media (max-width: 560px) { .mpx-bal b { font-size: 19px; } .mpx-top .btn-add { width: 100%; } }

/* ===== Guías: bienvenida y ayuda por sección ===== */
.mpt-box { max-height: calc(100vh - 32px); overflow-y: auto; }
.mpt-text p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; }
.mpt-text code, .mpt-extra code, .mpt-note code { background: color-mix(in srgb, var(--txt) 8%, transparent); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.mpt-extra { text-align: left; }
.mpt-extra:empty { display: none; }
.mpt-note.hidden { display: none; }
.mpt-note { margin-top: 12px; }
.wl-steps { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 10px; text-align: left; }
.wl-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.wl-steps li > span { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 13.5px; font-weight: 800; color: #fff; background: var(--accent); }
.wl-list { text-align: left; margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.45; }
.wl-cta { display: flex; justify-content: center; width: 100%; text-decoration: none; margin: 4px 0 6px; font-size: 15px; padding-block: 12px; }
.wl-status { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.wl-status.ok { color: var(--green); font-weight: 700; }
.wl-alt { margin-top: 8px; font-size: 13px; color: var(--muted); }
.wl-alt summary { cursor: pointer; }
.sec-intro { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent) 6%, var(--panel, transparent)); }
.sec-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.sec-ic .ui-icon { width: 18px; height: 18px; }
.sec-intro p { margin: 0; flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--txt); }
.sec-how { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border: 1px solid var(--border); background: var(--panel, transparent); color: var(--txt); font: inherit; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.sec-how .ui-icon { width: 15px; height: 15px; color: var(--accent); }
.sec-how:hover { border-color: var(--accent); }
.sec-x { width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.sec-x:hover { background: color-mix(in srgb, var(--txt) 6%, transparent); }
.sec-intro.mini { justify-content: flex-end; padding: 0; border: 0; background: none; margin-bottom: 10px; }
.sec-intro.mini .sec-ic, .sec-intro.mini p { display: none; }
@media (max-width: 640px) {
  .sec-intro { flex-wrap: wrap; }
  .sec-intro p { flex-basis: calc(100% - 90px); }
  .sec-how { margin-left: 46px; }
  .sec-intro.mini .sec-how { margin-left: 0; }
}
.help-hero .btn-add { margin-top: 10px; }

/* Franja de ayuda: se va con una animación cuando ya se vio */
.sec-intro.closing { animation: secOut .26s ease forwards; }
@keyframes secOut { to { opacity: 0; transform: translateY(-6px); margin-bottom: -60px; } }
.help-hero-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.help-hero-btns .btn-add { margin: 0; }

/* Deslizar para actualizar */
#ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 50%; z-index: 300; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted, #667694); background: var(--bg2, #fff); box-shadow: 0 6px 20px rgba(0,0,0,.18); pointer-events: none; }
#ptr.ready { color: var(--accent, #2563eb); }
#ptr.loading svg { animation: ptrSpin .8s linear infinite; color: var(--accent, #2563eb); }
@keyframes ptrSpin { to { transform: rotate(360deg); } }
.mp-rev-q { margin: 8px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--txt); }
.mp-remember { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.mp-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.mp-swap { margin-top: 6px; font-size: 13px; }
.mp-ai { margin: 8px 0 0; font-size: 13px; color: var(--accent); }
.mpx-working { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mpx-working b { display: block; font-size: 14px; }
.mpx-working span:not(.mpx-spin) { font-size: 13px; color: var(--muted); }
.mpx-spin { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: ptrSpin .8s linear infinite; }

/* ===== Seguridad del registro ===== */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.captcha-box { display: flex; justify-content: center; min-height: 65px; }
.captcha-box.hidden { display: none; }
.pass-meter { display: grid; gap: 5px; margin-top: -4px; }
.pass-meter.hidden { display: none; }
.pass-bar { height: 5px; border-radius: 999px; background: rgba(127,127,127,.22); overflow: hidden; }
.pass-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #e5384f; transition: width .25s, background .25s; }
.pass-meter[data-score="1"] .pass-bar i { width: 25%; background: #e5384f; }
.pass-meter[data-score="2"] .pass-bar i { width: 55%; background: #f0b44a; }
.pass-meter[data-score="3"] .pass-bar i { width: 80%; background: #22c55e; }
.pass-meter[data-score="4"] .pass-bar i { width: 100%; background: #16a34a; }
.pass-meter small { font-size: 13.5px; opacity: .8; }
.mpx-detail { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.admin-email-log { margin: 6px 0 14px; font-size: 13px; }
.admin-email-log summary { cursor: pointer; font-weight: 600; }
.email-log-row { padding: 6px 0; border-top: 1px solid var(--border); }
.email-log-row.ok b { color: var(--green); }
.email-log-row.err b { color: var(--red); }
.email-log-row small { color: var(--muted); }

/* ===== Sugerencias (Ayuda y Administración) ===== */
.help-suggest { margin: 18px 0; padding: 16px; border-radius: 16px; border: 1px solid var(--border); display: grid; gap: 10px; }
.help-suggest h3 { margin: 0; }
.help-suggest p { margin: 0; color: var(--muted); font-size: 14px; }
.help-suggest-kinds { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.help-suggest textarea { width: 100%; resize: vertical; }
.help-suggest .btn-add { justify-self: start; }
.adm-sug { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.adm-sug.is-hidden { opacity: .55; }
.adm-sug-main p { margin: 0 0 4px; font-size: 14px; overflow-wrap: anywhere; }
.adm-sug-main small { color: var(--muted); font-size: 13px; }
.adm-sug-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
@media (max-width: 640px) { .adm-sug { flex-direction: column; } }
.movement-hint { grid-column: 1 / -1; margin: 0 0 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* "No soy un robot" propio */
.robot-check { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 304px; margin: 0 auto; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 14.5px; cursor: pointer; text-align: left; }
.robot-check:hover { border-color: rgba(125,180,255,.5); }
.robot-box { width: 24px; height: 24px; flex-shrink: 0; border-radius: 5px; border: 2px solid rgba(255,255,255,.45); display: grid; place-items: center; transition: all .2s; }
.robot-label { flex: 1; }
.robot-brand { font-size: 9px; line-height: 1.2; text-align: center; opacity: .55; letter-spacing: .04em; }
.robot-check.busy .robot-box { border-color: rgba(125,180,255,.35); border-top-color: #7db4ff; border-radius: 50%; animation: ptrSpin .8s linear infinite; }
.robot-check.done { cursor: default; border-color: rgba(52,210,123,.5); }
.robot-check.done .robot-box { border-color: #22c55e; background: #22c55e; }
.robot-check.done .robot-box::after { content: '✓'; color: #fff; font-weight: 900; font-size: 15px; }

/* Los controles toman la tipografía de la página. */
button, input, select, textarea { font-family: inherit; }
.help-suggest h4 { margin: 10px 0 0; font-size: 15px; }
.hs-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-tabs button { border: 1px solid var(--border); background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.hs-tabs button.on { color: var(--txt); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.hs-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.hs-item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.hs-item p { margin: 0 0 4px; font-size: 15px; color: var(--txt); overflow-wrap: anywhere; }
.hs-item small { font-size: 13px; color: var(--muted); }
.hs-st.en_camino { color: #b7791f; } .hs-st.listo { color: var(--green); }
.hs-vote { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; min-width: 76px; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.hs-vote b { font-size: 17px; color: var(--txt); }
.hs-vote.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ===== Mercado Pago: formato simple ===== */
.mpx-main { gap: 14px; }
.mpx-conn { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; }
.mpx-conn b { color: var(--green); font-weight: 600; }
.mpx-conn.bad b { color: var(--red); }
.mpx-conn.bad .mpx-dot { background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 18%, transparent); }
.mpx-conn strong { font-weight: 800; }
.mpx-lock { padding: 12px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border)); background: color-mix(in srgb, var(--green) 7%, transparent); }
.mpx-last { margin: 0; font-size: 16px; font-weight: 600; }
.mpx-sub { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.mpx-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.mpx-danger { border: 1px solid color-mix(in srgb, var(--red) 55%, transparent); background: transparent; color: var(--red); font-size: 14.5px; font-weight: 700; padding: 10px 18px; border-radius: 12px; cursor: pointer; }
.mpx-danger:hover { background: color-mix(in srgb, var(--red) 8%, transparent); }
.mpx-learned { border-top: 1px solid var(--border); padding-top: 12px; }
.mpx-learned-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.mpx-learned-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.mpx-learned-row b { font-weight: 700; }
.mpx-learned-row > span { color: var(--muted); }
.mpx-learned-row > span b { color: var(--txt); }
.mpx-arrow { margin: 0 2px; }
.mpx-adv-inner { display: grid; gap: 14px; padding: 12px 0 4px; }
.mpx-adv-inner .link-btn { justify-self: start; }

/* ===== Sugerencias y soporte ===== */
.sup-panel { display: grid; gap: 14px; }
.sup-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--txt) 6%, transparent); }
.sup-tabs button { flex: 1; padding: 11px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.sup-tabs button.on { background: var(--panel); color: var(--txt); box-shadow: 0 2px 8px rgba(15, 30, 60, .1); }
.sup-pane { display: grid; gap: 12px; }
.sup-pane .help-suggest { margin: 0; border: 0; padding: 0; }
.sup-pane h3 { margin: 0; }
.sup-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.sup-field select, .sup-field textarea { width: 100%; font-weight: 400; }
.sup-field textarea { resize: vertical; min-height: 130px; }
.sup-hint { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
#sup-send { justify-self: start; }
#sup-mine h4 { margin: 10px 0 6px; }
.sup-item { padding: 12px 0; border-top: 1px solid var(--border); }
.sup-item > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.sup-item small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.sup-item p { margin: 6px 0 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-sup.done { opacity: .55; }
.adm-sup .warn { color: var(--red); }
.adm-sup small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
