/* FinanzaPro — estilos del dashboard */
:root {
  --acc: #0f766e;
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #111827;
  --ink2: #4b5563;
  --mute: #6b7280;
  --line: #e7e9ee;
  --ing: #059669;
  --gas: #e11d48;
  --r: 14px;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.fp-noscroll { overflow: hidden; }
a { color: var(--acc); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- controles ---------- */
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #d5d9e0; border-radius: 10px; padding: 10px 12px; width: 100%;
  min-height: 42px; outline: none; transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
input:disabled { background: #f3f4f6; color: var(--mute); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--ink2); }
label > input, label > select, label > textarea { margin-top: 6px; }

.fp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; min-height: 42px;
  background: #fff; color: var(--ink); transition: filter .15s, background .15s, opacity .15s; text-decoration: none !important;
}
.fp-btn:disabled { opacity: .6; cursor: default; }
.fp-btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.fp-primary { background: var(--acc); color: #fff; }
.fp-primary:hover { filter: brightness(1.08); }
.fp-ghost { border-color: #d5d9e0; background: #fff; }
.fp-ghost:hover { background: #f3f4f6; }
.fp-danger-ghost { color: var(--gas); border-color: #fecdd3; background: #fff; }
.fp-danger-ghost:hover { background: #fff1f2; }
.fp-block { width: 100%; }
.fp-lg { min-height: 48px; font-size: 15px; }
.fp-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.fp-busy { position: relative; color: transparent !important; }
.fp-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: fpspin .7s linear infinite; }
@keyframes fpspin { to { transform: rotate(360deg); } }

.fp-muted { color: var(--mute); }
.fp-small { font-size: 13px; }
.fp-flex { flex: 1; }
.fp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fp-err { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* ---------- logo ---------- */
.fp-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.fp-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--acc); color: #fff; display: grid; place-items: center; flex: none; }
.fp-mark svg { width: 20px; height: 20px; fill: #fff; stroke: none; }
.fp-logo-inv .fp-mark { background: rgba(255, 255, 255, .18); }

/* ---------- auth ---------- */
.fp-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }
.fp-auth-solo { grid-template-columns: 1fr; }
.fp-auth-side {
  background: var(--acc); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(circle at 15% 85%, rgba(255,255,255,.12), transparent 45%), radial-gradient(circle at 90% 10%, rgba(255,255,255,.10), transparent 40%);
}
.fp-auth-side h2 { font-size: 34px; line-height: 1.15; max-width: 420px; margin-bottom: 24px; letter-spacing: -.02em; }
.fp-auth-side small { opacity: .7; }
.fp-pitch { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 420px; }
.fp-pitch li { padding-left: 32px; position: relative; opacity: .95; }
.fp-pitch li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.fp-auth-main { display: grid; place-items: center; padding: 32px 20px; }
.fp-auth-card { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.fp-auth-card h1 { font-size: 26px; letter-spacing: -.02em; }
.fp-auth-card > p { margin: -8px 0 4px; }
.fp-auth-links { text-align: center; font-size: 14px; color: var(--mute); line-height: 2; }
.fp-center { text-align: center; justify-items: center; background: var(--card); padding: 32px 28px; border-radius: 18px; box-shadow: var(--sh); max-width: 440px; }
.fp-center .fp-logo { justify-content: center; }
.fp-price { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.fp-only-sm { display: none; }

/* ---------- shell ---------- */
.fp-shell { min-height: 100vh; }
.fp-side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; z-index: 20;
}
.fp-side .fp-logo { padding: 0 8px; }
.fp-side-new { margin: 4px 0; }
.fp-nav { display: grid; gap: 2px; }
.fp-nav-i {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 0; background: none; font: inherit; font-weight: 500; color: var(--ink2); cursor: pointer; text-align: left; text-decoration: none !important;
}
.fp-nav-i:hover { background: #f3f4f6; color: var(--ink); }
.fp-nav-i.on { background: color-mix(in srgb, var(--acc) 10%, #fff); color: var(--acc); font-weight: 600; }
.fp-side-foot { margin-top: auto; display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.fp-user { display: flex; gap: 10px; align-items: center; padding: 4px 8px; min-width: 0; }
.fp-user-t { min-width: 0; }
.fp-user-t b, .fp-user-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-user-t b { font-size: 14px; }
.fp-user-t small { color: var(--mute); font-size: 12px; }
.fp-avatar { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--acc) 14%, #fff); color: var(--acc); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; cursor: pointer; }

.fp-body { margin-left: var(--side); min-width: 0; }
.fp-head { display: flex; align-items: center; gap: 12px; padding: 22px 32px 6px; }
.fp-head h1 { font-size: 24px; letter-spacing: -.02em; flex: 1; }
.fp-main { padding: 12px 32px 48px; max-width: 1280px; }
.fp-banner {
  margin: 10px 32px 0; max-width: 1216px; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: color-mix(in srgb, var(--acc) 9%, #fff); border: 1px solid color-mix(in srgb, var(--acc) 25%, #fff); border-radius: 12px; padding: 10px 14px; font-size: 14px;
}
.fp-tabbar, .fp-fab { display: none; }

/* ---------- filtros ---------- */
.fp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fp-filters select, .fp-filters input { width: auto; min-width: 150px; min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; background-color: #fff; }
.fp-filters .fp-search { flex: 1; min-width: 180px; }
.fp-toolbar { display: flex; justify-content: flex-end; margin: -6px 0 12px; }

/* ---------- tarjetas ---------- */
.fp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh); min-width: 0; }
.fp-card h3 { font-size: 15px; }
.fp-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.fp-card-h a { font-size: 13px; }
.fp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.fp-span2 { grid-column: span 2; }
.fp-span3 { grid-column: 1 / -1; }
.fp-grid-aj { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.fp-grid-aj .fp-card h3 { margin-bottom: 4px; }

.fp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.fp-kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh); min-width: 0; }
.fp-kpi-l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); font-weight: 500; }
.fp-kpi b { display: block; font-size: 24px; letter-spacing: -.02em; margin: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fp-kpi small { color: var(--mute); font-size: 12px; }
.fp-kpi-main { background: var(--acc); border-color: var(--acc); color: #fff; }
.fp-kpi-main .fp-kpi-l, .fp-kpi-main small { color: rgba(255,255,255,.85); }
.fp-kpi-main.neg { background: #be123c; border-color: #be123c; }
.fp-kpi-main .fp-delta { background: rgba(255,255,255,.2) !important; color: #fff !important; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ing { background: #10b981; } .dot.gas { background: #f43f5e; }
.fp-delta { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; margin-right: 6px; }
.fp-delta.up { background: #dcfce7; color: #166534; }
.fp-delta.down { background: #ffe4e6; color: #9f1239; }

.fp-chart { position: relative; }
.fp-chart-lg { height: 290px; }
.fp-chart-sm { height: 170px; margin-bottom: 12px; }

.fp-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.fp-legend li { display: grid; grid-template-columns: 10px 1fr auto 38px; gap: 8px; align-items: center; }
.fp-legend i { width: 10px; height: 10px; border-radius: 3px; }
.fp-legend span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fp-legend small { color: var(--mute); text-align: right; }
.fp-empty-sm { margin: 24px 0; text-align: center; }

.fp-table-wrap { overflow-x: auto; }
.fp-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fp-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.fp-table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fp-table th:not(:first-child), .fp-table td:not(:first-child) { text-align: right; }
.fp-table tr:last-child td { border-bottom: 0; }
.fp-table .pos { color: var(--ing); font-weight: 600; } .fp-table .neg { color: var(--gas); font-weight: 600; }

/* ---------- lista de movimientos ---------- */
.fp-totbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 12px; font-size: 14px; }
.fp-tot { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
.fp-tot b { white-space: nowrap; }
.fp-tot span { font-size: 12px; font-weight: 700; color: var(--mute); }
.fp-tot .ing { color: var(--ing); } .fp-tot .gas { color: var(--gas); }
.fp-card-list { padding: 6px 8px; margin-bottom: 12px; }
.fp-group { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); padding: 10px 12px 4px; }
.fp-list { list-style: none; margin: 0; padding: 0; }
.fp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.fp-row:hover { background: #f6f7f9; }
.fp-row + .fp-row { border-top: 1px solid #f0f1f4; }
.fp-row-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; flex: none; }
.fp-row-ic.ingreso { background: #dcfce7; color: var(--ing); }
.fp-row-ic.gasto { background: #ffe4e6; color: var(--gas); }
.fp-row-main { flex: 1; min-width: 0; }
.fp-row-main b, .fp-row-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-row-main b { font-weight: 500; font-size: 14px; }
.fp-row-main small { color: var(--mute); font-size: 12px; }
.fp-row-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.fp-row-amt.ingreso { color: var(--ing); }
.fp-list-compact { margin: -6px -8px; }
.fp-empty { text-align: center; color: var(--mute); padding: 40px 20px; }
.fp-loading { display: flex; align-items: center; gap: 12px; color: var(--mute); padding: 40px 0; }
.fp-loading span { width: 18px; height: 18px; border: 2px solid var(--acc); border-right-color: transparent; border-radius: 50%; animation: fpspin .7s linear infinite; }

.fp-welcome { text-align: center; padding: 48px 24px; display: grid; gap: 14px; justify-items: center; max-width: 620px; margin: 20px auto; }
.fp-welcome h2 { font-size: 24px; }
.fp-welcome p { margin: 0; max-width: 440px; }
.fp-welcome-ic .fp-mark { width: 56px; height: 56px; border-radius: 16px; }
.fp-welcome-ic .fp-mark svg { width: 30px; height: 30px; }

/* ---------- ajustes / cuenta ---------- */
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.fp-chip { display: inline-flex; align-items: center; gap: 4px; background: #f3f4f6; border-radius: 99px; padding: 4px 4px 4px 12px; font-size: 13px; font-weight: 500; }
.fp-chip button { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--mute); font-size: 16px; line-height: 1; }
.fp-chip button:hover { background: #e5e7eb; color: var(--gas); }
.fp-add { display: flex; gap: 8px; }
.fp-add input { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.fp-savebar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; gap: 8px; padding: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.fp-form { display: grid; gap: 12px; margin-top: 12px; }
.fp-form .fp-btn { justify-self: start; }
.fp-pill { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; margin: 10px 0 2px; }
.fp-pill.ok { background: #dcfce7; color: #166534; } .fp-pill.pr { background: #e0f2fe; color: #075985; } .fp-pill.inf { background: #ede9fe; color: #5b21b6; }

/* ---------- modal ---------- */
.fp-modal { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: grid; place-items: center; padding: 20px; z-index: 100; opacity: 0; transition: opacity .2s; font: 15px/1.5 Inter, system-ui, sans-serif; color: var(--ink); }
.fp-modal.on { opacity: 1; }
.fp-sheet { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; padding: 20px 22px; display: grid; gap: 16px; box-shadow: 0 24px 48px rgba(16,24,40,.2); transform: translateY(12px); transition: transform .2s; }
.fp-modal.on .fp-sheet { transform: none; }
.fp-sheet-h { display: flex; justify-content: space-between; align-items: center; }
.fp-sheet-h h3 { font-size: 18px; }
.fp-x { border: 0; background: #f3f4f6; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--ink2); }
.fp-seg { display: grid; grid-template-columns: 1fr 1fr; background: #f3f4f6; border-radius: 12px; padding: 4px; }
.fp-seg label { margin: 0; }
.fp-seg input { position: absolute; opacity: 0; pointer-events: none; width: 1px; min-height: 0; }
.fp-seg span { display: block; text-align: center; padding: 9px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--mute); cursor: pointer; transition: all .15s; }
.fp-seg input:checked + span { background: #fff; box-shadow: var(--sh); color: var(--gas); }
.fp-sheet.es-ingreso .fp-seg input:checked + span { color: var(--ing); }
.fp-amount { display: flex; gap: 8px; }
.fp-amount select { width: 100px; flex: none; font-weight: 600; }
.fp-amount input { font-size: 26px; font-weight: 700; letter-spacing: -.02em; min-height: 56px; font-variant-numeric: tabular-nums; }
.fp-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fp-fgrid .fp-span2 { grid-column: span 2; }
.fp-sheet-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.fp-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font: 500 14px/1.4 Inter, system-ui, sans-serif; opacity: 0; pointer-events: none; transition: all .2s; z-index: 200; max-width: calc(100vw - 32px); }
.fp-toast.on { opacity: 1; transform: translate(-50%, 0); }
.fp-toast.err { background: #be123c; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .fp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fp-span2 { grid-column: span 2; }
}
@media (max-width: 860px) {
  .fp-auth { grid-template-columns: 1fr; }
  .fp-auth-side { display: none; }
  .fp-only-sm { display: flex; }
  .fp-side { display: none; }
  .fp-body { margin-left: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .fp-head { padding: 14px 16px 4px; padding-top: calc(14px + env(safe-area-inset-top)); }
  .fp-head h1 { font-size: 20px; }
  .fp-head .fp-mark { width: 30px; height: 30px; }
  .fp-main { padding: 10px 16px 24px; }
  .fp-banner { margin: 8px 16px 0; }
  .fp-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fp-span2 { grid-column: auto; }
  .fp-kpis { gap: 10px; }
  .fp-kpi { padding: 14px; }
  .fp-kpi b { font-size: 19px; }
  .fp-kpi-main { grid-column: span 2; order: -1; }
  .fp-kpi:last-child { grid-column: span 2; }
  .fp-kpi-main b { font-size: 28px; }
  .fp-chart-lg { height: 240px; }
  .fp-card { padding: 16px; }
  .fp-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
  .fp-filters::-webkit-scrollbar { display: none; }
  .fp-filters select, .fp-filters input { min-width: 0; flex: none; }
  .fp-filters .fp-search { min-width: 170px; }
  .fp-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .fp-tabbar .fp-nav-i { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; justify-content: center; text-align: center; }
  .fp-tabbar .fp-nav-i.on { background: none; }
  .fp-fab {
    display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 31;
    width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--acc); color: #fff; cursor: pointer;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--acc) 40%, transparent);
  }
  .fp-fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
  .fp-modal { place-items: end stretch; padding: 0; }
  .fp-sheet { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(40px); }
  .fp-savebar { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .fp-toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .fp-fgrid { grid-template-columns: 1fr; }
  .fp-fgrid .fp-span2 { grid-column: auto; }
  .fp-sheet-f .fp-flex { display: none; }
  .fp-sheet-f .fp-btn { flex: 1; }
}

/* ---------- presupuestos ---------- */
.fp-bar { height: 8px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.fp-bar i { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.fp-bar i.ok { background: var(--acc); } .fp-bar i.warn { background: #f59e0b; } .fp-bar i.over { background: var(--gas); }
.fp-budget-total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.fp-budget-total b { font-size: 20px; letter-spacing: -.02em; }
.fp-budget-total .pos { color: var(--ing); font-weight: 600; font-size: 14px; } .fp-budget-total .neg { color: var(--gas); font-weight: 600; font-size: 14px; }
.fp-budget { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; }
.fp-budget-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.fp-budget-h span { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-budget-h small { color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; } .fp-budget-h small.neg { color: var(--gas); font-weight: 600; }
.fp-budget-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; margin-top: 12px; }
@media (max-width: 860px) { .fp-presu { order: -1; } }

/* ---------- agenda ---------- */
.fp-icon-btn { border: 1px solid #d5d9e0; background: #fff; width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink2); font-size: 20px; line-height: 1; flex: none; }
.fp-icon-btn:hover { background: #f3f4f6; color: var(--acc); }
.fp-icon-btn svg { width: 17px; height: 17px; }
.fp-alert { border-color: #fcd34d; background: #fffbeb; margin-bottom: 16px; }
.fp-alert h3 { display: flex; align-items: center; gap: 8px; color: #92400e; }
.fp-alert h3 svg { width: 18px; height: 18px; }
.fp-alert .fp-list { margin: -4px -8px -8px; }
.fp-ag { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.fp-ag:hover { background: rgba(0,0,0,.025); }
.fp-ag + .fp-ag { border-top: 1px solid #f0f1f4; }
.fp-ag-date { width: 46px; flex: none; text-align: center; border-radius: 10px; background: #f3f4f6; padding: 5px 0; line-height: 1.1; }
.fp-ag-date b { display: block; font-size: 18px; }
.fp-ag-date span { font-size: 11px; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.fp-ag.soon .fp-ag-date { background: #fef3c7; } .fp-ag.soon .fp-ag-date span { color: #92400e; }
.fp-ag.late .fp-ag-date { background: #ffe4e6; } .fp-ag.late .fp-ag-date span { color: #9f1239; }
.fp-ag-when { display: block; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink2); margin-top: 1px; }
.fp-ag.soon .fp-ag-when { color: #b45309; } .fp-ag.late .fp-ag-when { color: var(--gas); }
.fp-ag-acts { display: flex; gap: 6px; align-items: center; flex: none; }
.fp-ag-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fp-ag-sum { padding: 10px 12px 2px; font-size: 14px; color: var(--ink2); }
.fp-grid-ag { align-items: start; }
.fp-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fp-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.fp-cal-g small { font-size: 11px; color: var(--mute); font-weight: 600; padding: 4px 0; }
.fp-cal-d { position: relative; border: 0; background: none; font: inherit; font-size: 13px; aspect-ratio: 1; border-radius: 10px; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.fp-cal-d:hover { background: #f3f4f6; }
.fp-cal-d.ev { font-weight: 600; }
.fp-cal-d.hoy { color: var(--acc); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--acc); }
.fp-cal-d.sel { background: var(--acc); color: #fff; }
.fp-cal-d i { display: flex; gap: 2px; height: 5px; }
.fp-cal-d u, .fp-cal-ley u, .fp-mini u { display: inline-block; width: 5px; height: 5px; border-radius: 50%; text-decoration: none; }
u.p { background: var(--gas); } u.c { background: #8b5cf6; }
.fp-cal-d.sel u { background: #fff; }
.fp-cal-ley { display: flex; gap: 14px; font-size: 12px; color: var(--mute); margin-top: 10px; }
.fp-cal-ley span { display: flex; align-items: center; gap: 6px; }
.fp-cal-ley u { width: 7px; height: 7px; }
.fp-cal-sel { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.fp-cal-sel h4 { font-size: 14px; }
.fp-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fp-mini li { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.fp-mini li:hover { background: #f3f4f6; }
.fp-mini b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.fp-mini u { width: 7px; height: 7px; flex: none; }
.fp-sheet-sm { max-width: 440px; }
.fp-switch { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink); cursor: pointer; margin: 10px 0 6px; }
.fp-switch input { position: absolute; opacity: 0; width: 1px; min-height: 0; }
.fp-switch span { width: 42px; height: 24px; border-radius: 99px; background: #d1d5db; position: relative; flex: none; transition: background .15s; }
.fp-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.fp-switch input:checked + span { background: var(--acc); }
.fp-switch input:checked + span::after { transform: translateX(18px); }
@media (max-width: 860px) {
  .fp-ag-top .fp-btn { flex: 1; font-size: 13px; padding: 8px 10px; }
  .fp-cal { order: -1; }
  .fp-ag-acts .fp-btn { padding: 6px 10px; }
}

/* ---------- tareas ---------- */
u.t { background: #0ea5e9; }
.fp-cal-d.sel u.t { background: #fff; }
.fp-ag.task .fp-ag-date { background: #e0f2fe; } .fp-ag.task .fp-ag-date span { color: #0369a1; }
.fp-ag.task.late .fp-ag-date { background: #ffe4e6; } .fp-ag.task.late .fp-ag-date span { color: #9f1239; }
.fp-mini small { color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.fp-quick { display: flex; gap: 8px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; box-shadow: var(--sh); }
.fp-quick input[name=titulo] { flex: 1; min-width: 0; }
.fp-quick input[type=date] { width: 150px; flex: none; }
.fp-quick input[type=time] { width: 120px; flex: none; }
.fp-chips-f { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-chip-f { border: 1px solid #d5d9e0; background: #fff; border-radius: 99px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink2); }
.fp-chip-f.on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 860px) {
  .fp-quick { flex-wrap: wrap; }
  .fp-quick input[name=titulo] { flex: 1 1 100%; }
  .fp-quick input[type=date], .fp-quick input[type=time] { flex: 1 1 0; width: auto; min-width: 0; padding-left: 8px; padding-right: 8px; }
  .fp-quick .fp-btn { flex: none; padding: 8px 12px; }
  .fp-ag-top .fp-chips-f { width: 100%; }
  .fp-ag-top .fp-flex { display: none; }
}

/* ---------- planes (pantalla de pago) ---------- */
.fp-pay { max-width: 520px; }
.fp-planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: 100%; text-align: left; }
.fp-plan { display: flex; flex-direction: column; gap: 6px; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); text-decoration: none !important; background: #fff; transition: border-color .15s, box-shadow .15s; }
.fp-plan:hover { border-color: var(--acc); }
.fp-plan.on { border: 2px solid var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 12%, transparent); }
.fp-plan-n { font-weight: 700; font-size: 14px; color: var(--ink2); }
.fp-plan-p b { font-size: 28px; letter-spacing: -.02em; }
.fp-plan small { color: var(--mute); font-size: 13px; flex: 1; }
.fp-plan .fp-btn { margin-top: 6px; }
.fp-secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--mute); margin: 0; }
.fp-secure svg { width: 15px; height: 15px; }
.fp-verif { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; color: var(--ink2); }
.fp-verif span { width: 16px; height: 16px; border: 2px solid var(--acc); border-right-color: transparent; border-radius: 50%; animation: fpspin .7s linear infinite; }
.fp-link { background: none; border: 0; color: var(--mute); font-weight: 500; min-height: 36px; }
.fp-link:hover { color: var(--ink); text-decoration: underline; }
.fp-verif[hidden] { display: none; }

/* Mostrar u ocultar contraseña */
.fp-pass { position: relative; display: block; margin-top: 6px; }
.fp-pass > input { margin-top: 0; padding-right: 46px; width: 100%; }
.fp-pass-ojo { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink2); cursor: pointer; border-radius: 8px; padding: 0; }
.fp-pass-ojo:hover { color: var(--ink); }

/* Instalar app */
html.fp-standalone [data-instalar], html.fp-standalone [data-instalar-card], html.fp-standalone .fp-inst-banner { display: none !important; }
.fp-instalar-btn { margin-top: 4px; gap: 8px; }
[data-instalar] svg { flex: none; }
.fp-btn[data-instalar] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.fp-inst-banner { align-items: center; }
.fp-inst-acc { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.fp-inst-x { border: 0; background: transparent; font-size: 22px; line-height: 1; width: 32px; height: 32px; cursor: pointer; color: var(--ink2); border-radius: 8px; }
.fp-inst-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(17, 24, 39, .55); display: grid; place-items: end center; padding: 16px; }
.fp-inst-box { background: #fff; color: var(--ink); width: 100%; max-width: 420px; border-radius: 18px; padding: 22px 20px 18px; display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.fp-inst-box h3 { font-size: 20px; }
.fp-inst-pasos { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.45; }
@media (min-width: 700px) { .fp-inst-modal { place-items: center; } }

/* Cuentas protegidas */
.fp-cta-nota { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff7e6; color: #8a5a00; font-size: 13px; line-height: 1.45; }
.fp-cta-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.fp-cta-edit input { flex: 1 1 160px; min-width: 0; }

/* Entrar con Google */
.fp-google { display: flex; justify-content: center; min-height: 44px; }
.fp-google.fp-busy { opacity: .5; pointer-events: none; }
.fp-o { display: flex; align-items: center; gap: 12px; color: var(--ink2); font-size: 13px; }
.fp-o::before, .fp-o::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }

/* Entrar con código por correo */
.fp-auth-links .fp-link { color: var(--acc); font-weight: 600; padding: 0; min-height: 0; font-size: inherit; cursor: pointer; }
.fp-codigo { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.fp-codigo-info { margin: 0; padding: 12px 14px; border-radius: 12px; background: #ecfdf5; color: #065f46; font-size: 14px; line-height: 1.5; }
