:root {
  --bg: #f6f4ef;
  --panel: #fffdf9;
  --line: #e7e3d8;
  --line2: #efece3;
  --text: #262420;
  --dim: #86827a;
  --accent: #c25c3c;
  --accent-soft: #ad4f33;
  --accent-tint: #f4e9e3;

  --overdue: #b3392b;
  --urgent: #c2722f;
  --upcoming: #b0902f;
  --ok: #5f8a55;
  --neutral: #5e7f9c;
  --auto: #5e7f9c;

  --serif: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --logo: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(38,36,32,.04), 0 10px 30px rgba(38,36,32,.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
svg { display: block; }
#app { max-width: 460px; margin: 0 auto; padding: 0 0 60px; position: relative; }

/* ---------- Header ---------- */
.hd { display: flex; align-items: center; gap: 12px; padding: 22px 18px 8px; }
.burger { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; flex: 0 0 auto; }
.burger svg { width: 18px; height: 18px; }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel) center / cover no-repeat; cursor: pointer; padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: var(--dim);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386827a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  background-size: 22px; background-position: center; }
.avatar.has-img { background-size: cover; border-color: var(--accent); }
.avatar:active { transform: scale(.96); }
.brand { min-width: 0; }
.brand h1 { font-family: var(--logo); font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.brand p { font-size: 12.5px; color: var(--dim); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.newbtn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--text);
  cursor: pointer; font-family: inherit; flex: 0 0 auto; }
.newbtn svg { width: 15px; height: 15px; color: var(--accent); }
.newbtn:active { transform: scale(.96); }

/* ---------- Sección genérica ---------- */
.sec-title { font-family: var(--serif); font-size: 19px; font-weight: 600; padding: 6px 20px 2px; }
.sub { font-size: 13px; color: var(--dim); padding: 0 20px; }

/* ---------- Resumen minimal ---------- */
.sum { padding: 12px 20px 2px; font-size: 13px; color: var(--dim); display: flex; gap: 14px; flex-wrap: wrap; }
.sum b { color: var(--text); font-weight: 700; }
.sum .red { color: var(--overdue); font-weight: 700; }

/* ---------- Segmented filtro ---------- */
.seg { display: flex; gap: 6px; margin: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--dim);
  padding: 8px 15px; border-radius: 10px; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Categoría: menú desplegable ---------- */
.catbar { position: relative; margin: 12px 16px 2px; }
.catsel { width: 100%; display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 11px; padding: 11px 13px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.catsel > svg:first-child { width: 17px; height: 17px; }
.catsel span { flex: 1; text-align: left; }
.catsel > svg:last-child { width: 16px; height: 16px; color: var(--dim); }
.catmenu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--panel); border: 1px solid var(--line);
  border-radius: 13px; box-shadow: var(--shadow); padding: 6px; max-height: 340px; overflow-y: auto; }
.catmenu[hidden] { display: none; }
.catopt { width: 100%; display: flex; align-items: center; gap: 11px; background: transparent; border: none; color: var(--text);
  padding: 10px 11px; border-radius: 9px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.catopt svg { width: 17px; height: 17px; color: var(--dim); flex: 0 0 auto; }
.catopt:hover { background: var(--line2); }
.catopt.on { background: var(--accent-tint); color: var(--accent); } .catopt.on svg { color: var(--accent); }

/* ---------- Categorías en Ajustes ---------- */
.catlist { display: flex; flex-direction: column; margin-bottom: 8px; }
.catrow { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--line2); font-size: 14px; font-weight: 600; }
.catrow > svg { width: 17px; height: 17px; color: var(--dim); flex: 0 0 auto; }
.catrow span { flex: 1; }
.catedit { background: transparent; border: none; color: var(--dim); cursor: pointer; padding: 4px; display: flex; }
.catedit svg { width: 16px; height: 16px; }
.catedit:hover { color: var(--accent); }
.catdel { background: transparent; border: none; color: var(--overdue); cursor: pointer; padding: 4px; display: flex; }
.catdel svg { width: 16px; height: 16px; }

/* ---------- Suscripción webcal ---------- */
.weburl { padding: 10px 2px 4px; }
.wl-tl { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ok); margin-bottom: 9px; }
.wl-tl svg { width: 15px; height: 15px; }
.weburl input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--dim); border-radius: 9px;
  padding: 9px 11px; font-size: 11.5px; font-family: inherit; -webkit-appearance: none; }
.wl-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.wl-btn { background: var(--accent); color: #fff; border: none; border-radius: 9px; padding: 9px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.wl-btn.ghost { background: var(--bg); border: 1px solid var(--line); color: var(--text); }

/* ---------- Buscador ---------- */
.search-input { width: calc(100% - 32px); margin: 10px 16px 0; background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386827a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; background-size: 16px;
  border: 1px solid var(--line); color: var(--text); padding: 10px 14px 10px 40px; border-radius: 12px;
  font-size: 14px; font-family: inherit; }
.search-input:focus { outline: none; border-color: var(--accent); }

/* ---------- Lista (Inicio) ---------- */
.list { margin: 6px 6px 0; }
.row { display: flex; flex-direction: column; gap: 11px; padding: 14px 12px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.row:active { background: var(--line2); }
.row-top { display: flex; align-items: center; gap: 13px; }
.rowbar { height: 7px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.rowbar > i { display: block; height: 100%; border-radius: 999px; background: var(--st); transition: width .4s ease; }
.row .ic { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel);
  display: flex; align-items: center; justify-content: center; color: var(--text); flex: 0 0 auto; }
.row .ic svg { width: 19px; height: 19px; }
.row .mid { flex: 1; min-width: 0; }
.row .mid .t { font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .mid .m { font-size: 12px; color: var(--dim); margin-top: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row .mid .note { font-size: 11.5px; color: var(--dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: .3px; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }
.tag.manual { background: var(--accent-tint); color: var(--accent-soft); }
.tag.auto { background: rgba(94,127,156,.16); color: var(--auto); }
.tag.task { background: rgba(95,138,85,.18); color: var(--ok); }
.row .right { text-align: right; flex: 0 0 auto; }
.row .right .cd { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--st); line-height: 1; font-variant-numeric: tabular-nums; }
.row .right .cl { font-size: 11px; color: var(--dim); margin-top: 3px; }
.row .right .amt { font-size: 12px; font-weight: 700; margin-top: 4px; }
.chk { width: 27px; height: 27px; border-radius: 50%; border: 1.6px solid var(--line); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: transparent; background: var(--panel); }
.chk svg { width: 15px; height: 15px; }
.chk:hover { border-color: var(--ok); color: var(--ok); }
.undo-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel);
  display: flex; align-items: center; justify-content: center; color: var(--dim); flex: 0 0 auto; cursor: pointer; }
.undo-btn svg { width: 14px; height: 14px; }
.undo-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Onboarding ---------- */
.welcome { text-align: center; padding: 56px 28px; }
.wc-logo { display: inline-flex; color: var(--accent); background: var(--accent-tint); width: 72px; height: 72px;
  border-radius: 22px; align-items: center; justify-content: center; }
.wc-logo svg { width: 34px; height: 34px; }
.welcome h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 18px 0 8px; }
.welcome p { color: var(--dim); font-size: 14px; line-height: 1.6; max-width: 340px; margin: 0 auto 24px; }
.welcome .btn { max-width: 280px; margin: 0 auto; }
.wc-link { display: block; margin: 14px auto 0; background: none; border: none; color: var(--accent); font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 70px 24px; color: var(--dim); }
.empty .em { color: var(--line); display: inline-flex; }
.empty .em svg { width: 46px; height: 46px; }
.empty h3 { font-family: var(--serif); color: var(--text); margin: 14px 0 6px; font-weight: 600; }

/* ---------- Finanzas / Stats cards ---------- */
.hero { margin: 14px 16px 0; background: var(--accent); color: #fff; border-radius: 16px; padding: 22px; text-align: center; }
.hero .big { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: -1px; }
.hero .lbl { font-size: 13px; opacity: .9; margin-top: 2px; }
.hero .split { display: flex; justify-content: center; gap: 28px; margin-top: 16px; }
.hero .split .n { display: block; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.hero .split .t { display: block; font-size: 11.5px; opacity: .85; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 15px; }
.stat .n { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1; }
.stat .t { font-size: 12px; color: var(--dim); margin-top: 5px; }
.brk { margin: 16px 16px 0; }
.brk h4 { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.brk-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.brk-row .bn { flex: 1; display: flex; align-items: center; gap: 9px; }
.brk-row .bn svg { width: 16px; height: 16px; color: var(--dim); }
.brk-row .bv { font-weight: 700; }
.bar { height: 9px; border-radius: 999px; background: var(--line2); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
/* ---------- Gráficas (Estadísticas) ---------- */
.statusbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line2); }
.statusbar span { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 11px; font-size: 12px; color: var(--dim); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 8px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.chart-bar { width: 64%; min-height: 3px; background: var(--accent); border-radius: 6px 6px 0 0; }
.chart-n { font-size: 11px; font-weight: 700; color: var(--text); margin-top: 5px; }
.chart-l { font-size: 10.5px; color: var(--dim); text-transform: capitalize; }

/* ---------- Calendario ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 18px 12px; }
.cal-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; text-transform: capitalize; }
.iconbtn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.iconbtn svg { width: 18px; height: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 0 14px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--dim); font-weight: 700; padding: 4px 0; }
.cal-cell { aspect-ratio: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px;
  font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.empty { background: transparent; border: none; }
.cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cal-cell.filled { border-color: transparent; }
.cal-cell .dn { color: var(--dim); font-weight: 600; }
.cal-cell.today .dn { color: var(--accent); }
.cal-cell.filled .dn { color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.32); }
.cal-cell.filled.today .dn { color: #fff; }
.cal-cell[data-date] { cursor: pointer; }
.cal-cell.sel { box-shadow: 0 0 0 2px var(--accent); }
.day-detail { margin: 18px 6px 0; border-top: 1px solid var(--line); padding-top: 8px; }
.dd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; }
.dd-head h4 { font-family: var(--serif); font-size: 16px; font-weight: 600; text-transform: capitalize; }
.dd-add { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-tint); color: var(--accent); border: none;
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.dd-add svg { width: 14px; height: 14px; }
.dd-empty { color: var(--dim); font-size: 13px; padding: 22px; text-align: center; line-height: 1.5; }
.agenda-day { margin-top: 6px; }
.ag-h { font-family: var(--serif); font-size: 15px; font-weight: 600; padding: 12px 16px 2px; text-transform: capitalize;
  display: flex; align-items: center; justify-content: space-between; }
.ag-c { font-family: var(--sans, inherit); font-size: 12px; font-weight: 700; color: var(--dim); background: var(--accent-tint);
  border-radius: 999px; min-width: 22px; text-align: center; padding: 2px 7px; text-transform: none; }

/* ---------- Ajustes ---------- */
.opt { display: flex; align-items: center; gap: 13px; width: calc(100% - 32px); margin: 0 16px; padding: 14px 4px;
  border-bottom: 1px solid var(--line2); background: transparent; border-left: none; border-right: none; border-top: none;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.opt svg { width: 18px; height: 18px; color: var(--dim); flex: 0 0 auto; }
.opt.danger { color: var(--overdue); } .opt.danger svg { color: var(--overdue); }
.opt[hidden] { display: none; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line2); }
.pref .pl .tl { font-size: 14px; font-weight: 600; }
.pref .pl .ts { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.pref select, .pref input { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 9px;
  padding: 9px 10px; font-family: inherit; font-size: 13.5px; flex: 0 0 auto;
  -webkit-appearance: none; appearance: none; -webkit-text-fill-color: var(--text); }
.pref select { padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386827a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 13px; }
.pref input[type="number"] { width: 64px; text-align: center; }

.rec-hint { font-size: 12px; color: var(--dim); margin-top: 8px; }
.sortbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 16px 2px; }
.sortbar span { font-size: 13px; color: var(--dim); font-weight: 600; }
.sortbar select { -webkit-appearance: none; appearance: none; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 32px 9px 13px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386827a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 13px; }

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(38,36,32,.34); z-index: 40; }
.scrim[hidden] { display: none; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 320px; background: var(--panel);
  border-right: 1px solid var(--line); z-index: 50; padding: 22px 14px; transform: translateX(-103%); transition: transform .22s ease;
  display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.dhead { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.dhead .lg { color: var(--accent); } .dhead .lg svg { width: 24px; height: 24px; }
.dhead h2 { font-family: var(--logo); font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.nav a { display: flex; align-items: center; gap: 13px; padding: 12px 11px; border-radius: 11px; color: var(--text);
  cursor: pointer; font-size: 14.5px; font-weight: 600; }
.nav a svg { width: 18px; height: 18px; color: var(--dim); }
.nav a.act { background: var(--accent-tint); } .nav a.act svg { color: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 8px 10px; }
.nav small { display: block; padding: 8px 12px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .6px; color: var(--dim); text-transform: uppercase; }

/* ---------- Modal / Form ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(38,36,32,.35); backdrop-filter: blur(3px); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center; }
.modal-overlay[hidden] { display: none; }
@media (min-width: 560px) { .modal-overlay { align-items: center; } }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 22px 22px 0 0; width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto; padding: 24px 24px max(24px, env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
@media (min-width: 560px) { .modal { border-radius: 22px; } }
.modal h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.modal .modal-sub { font-size: 13px; color: var(--dim); margin-bottom: 18px; }
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12px; font-weight: 700; color: var(--dim); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .5px; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 11px; font-size: 15px; font-family: inherit; min-height: 48px;
  -webkit-appearance: none; appearance: none; -webkit-text-fill-color: var(--text); }
.field textarea { min-height: 60px; resize: vertical; line-height: 1.4; }
.field textarea:focus { outline: none; border-color: var(--accent); background-color: var(--panel); }
.field input[type="date"] { text-align: left; }
.field select { padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386827a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 14px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); background-color: var(--panel); }
.field-row { display: flex; gap: 12px; } .field-row .field { flex: 1; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--line);
  border-radius: 11px; padding: 12px 14px; }
.toggle-row .tl { font-size: 14px; font-weight: 600; } .toggle-row .ts { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.switch { width: 46px; height: 27px; border-radius: 999px; background: var(--line); border: none; position: relative; cursor: pointer; flex: 0 0 auto; transition: .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: .15s; }
.switch.on { background: var(--accent); } .switch.on::after { left: 22px; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-picker button { width: 44px; height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-picker button svg { width: 20px; height: 20px; }
.icon-picker button.sel { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.cat-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cat-picker button { display: flex; align-items: center; gap: 9px; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); padding: 11px; border-radius: 11px; cursor: pointer; font-size: 13.5px; font-weight: 600; font-family: inherit; }
.cat-picker button svg { width: 17px; height: 17px; color: var(--dim); }
.cat-picker button.sel { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.cat-picker button.sel svg { color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.fa-btn { flex: 1 1 calc(50% - 4px); display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 11px; padding: 11px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.fa-btn svg { width: 15px; height: 15px; color: var(--dim); }
.fa-btn:active { transform: scale(.97); }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn { flex: 1; padding: 13px; border-radius: 12px; border: none; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { background: var(--bg); border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: transparent; border: 1px solid var(--overdue); color: var(--overdue); }

/* ---------- Selector de temas (Ajustes) ---------- */
.themes { margin: 8px 16px 16px; }
.themes h4 { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 56px; cursor: pointer; text-align: center; }
.swatch .sw { height: 48px; border-radius: 13px; border: 2px solid var(--line); position: relative; overflow: hidden; }
.swatch .sw::after { content: ""; position: absolute; right: 7px; bottom: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--swa); }
.swatch.sel .sw { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-tint); }
.swatch .lb { font-size: 11px; color: var(--dim); margin-top: 6px; font-weight: 600; }
.swatch .sw-custom { background: conic-gradient(from 210deg, #c25c3c, #3f8f6f, #7c6bb0, #3f74a8, #c25c3c); }
.swatch .sw-custom::after { background: #fff; border: 1px solid rgba(0,0,0,.15); }

/* ---------- Editor de tema personalizado ---------- */
.custom-theme { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--panel); }
.ct-hint { font-size: 12.5px; color: var(--dim); margin: 0 0 12px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 14px; }
.ct-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.ct-row input[type=color] { width: 40px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: none; cursor: pointer; flex: 0 0 auto; }
.ct-row input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.ct-row input[type=color]::-webkit-color-swatch { border: none; border-radius: 6px; }
.custom-theme #ct-reset { margin-top: 12px; }
.ct-preview-wrap { margin-top: 14px; }
.ct-preview-tl { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.ct-preview { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 6px 10px 10px; overflow: hidden; }
.ct-preview .sum { margin: 8px 4px; }
.ct-preview .list { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 8px; }
.ct-preview .row { cursor: default; }
.ct-preview .row:last-child { border-bottom: none; }

/* ---------- Temas ---------- */
body[data-theme="noche"] {
  --bg:#1b1916; --panel:#252119; --line:#383229; --line2:#2d2820; --text:#efe9df; --dim:#a59d8d;
  --accent:#d98a63; --accent-soft:#c6794f; --accent-tint:#3a2e25; --shadow:0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
}
body[data-theme="menta"] {
  --bg:#eef4ef; --panel:#ffffff; --line:#d9e3da; --line2:#e6ede7; --text:#1f2a22; --dim:#6f7d74;
  --accent:#3f8f6f; --accent-soft:#357a5f; --accent-tint:#e3efe8;
}
body[data-theme="lavanda"] {
  --bg:#f2eff8; --panel:#ffffff; --line:#e0dbed; --line2:#ebe7f3; --text:#26222e; --dim:#7c7689;
  --accent:#7c6bb0; --accent-soft:#6c5aa0; --accent-tint:#ece6f5;
}
body[data-theme="oceano"] {
  --bg:#eef2f6; --panel:#ffffff; --line:#d8e0e8; --line2:#e6ebf0; --text:#1e2630; --dim:#6c7681;
  --accent:#3f74a8; --accent-soft:#356494; --accent-tint:#e2ebf3;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.row, .stat, .brk-row { animation: fadeUp .2s ease both; }
@media (prefers-reduced-motion: reduce) { .row, .stat, .brk-row, .drawer { animation: none; transition: none; } }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ===========================================================
   Móvil: áreas seguras y taps
   =========================================================== */
body { -webkit-tap-highlight-color: transparent; }
.hd { padding-top: max(22px, env(safe-area-inset-top)); }

/* ===========================================================
   TELÉFONO (base, < 760px) — táctil, una columna, menú deslizable
   El diseño base ya está optimizado para iPhone/Android:
   targets grandes, safe-areas, sin efectos de hover.
   =========================================================== */

/* ===========================================================
   TABLET (760–1099px) — más aire, dos columnas, menú deslizable
   =========================================================== */
@media (min-width: 760px) and (max-width: 1099px) {
  #app { max-width: 740px; padding: 0 24px 64px; }
  .hd { padding-left: 4px; padding-right: 4px; }
  .list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .sum, .catbar, .seg, .search-input { max-width: 620px; }
  .hero { max-width: 580px; margin-left: auto; margin-right: auto; }
  .cal-grid { max-width: 660px; margin-left: auto; margin-right: auto; }
  .day-detail, .agenda-day { max-width: 660px; margin-left: auto; margin-right: auto; }
  .insights, .statusbar, .chart { max-width: 660px; }
  .drawer { width: 60%; max-width: 380px; }
  .modal { max-width: 600px; }
  .newbtn { padding: 10px 18px; }
}

/* ===========================================================
   ESCRITORIO (≥ 1100px) — barra lateral fija, multicolumna, ratón
   =========================================================== */
@media (min-width: 1100px) {
  .burger { display: none; }
  .scrim { display: none !important; }
  .drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 256px; transform: none !important;
    box-shadow: none; border-right: 1px solid var(--line); padding: 26px 16px; overflow-y: auto; }
  #app { margin-left: 256px; max-width: 1000px; padding: 0 40px 56px; }
  .hd { padding-left: 6px; padding-right: 6px; }
  .list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; row-gap: 0; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .catbar, .seg, .search-input { max-width: 600px; }
  .hero { max-width: 640px; }
  .cal-grid { max-width: 720px; }
  .modal { max-width: 620px; }
}
/* Pantallas muy anchas: aprovechar el espacio con 3 columnas */
@media (min-width: 1500px) {
  #app { margin-left: 300px; max-width: 1200px; }
  .list { grid-template-columns: 1fr 1fr 1fr; column-gap: 22px; }
  body[data-layout="comfy"] .list { grid-template-columns: 1fr 1fr; }
}

/* ===========================================================
   PUNTERO FINO (ratón / trackpad) — afecta solo a desktop/laptop,
   NO a iPhone/Android. Estados :hover y micro-interacciones.
   =========================================================== */
@media (hover: hover) and (pointer: fine) {
  .row { transition: transform .12s ease, box-shadow .14s ease, border-color .14s ease; }
  .row:hover { transform: translateY(-1px); border-color: var(--line2); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
  .nav a:hover { background: var(--accent-tint); }
  .opt:hover, .fa-btn:hover, .lay:hover, .wl-btn:hover { background: var(--accent-tint); border-color: var(--line2); }
  .chk:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
  .iconbtn:hover, .undo-btn:hover { background: var(--accent-tint); color: var(--accent); }
  .cal-cell[data-date]:hover { outline: 2px solid var(--accent); outline-offset: -2px; cursor: pointer; }
  .swatch:hover .sw { transform: scale(1.05); }
  .newbtn:hover, .btn-primary:hover { filter: brightness(1.05); }
}

/* ===========================================================
   Selector de diseño (Ajustes)
   =========================================================== */
.layouts { display: flex; gap: 8px; }
.lay { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 13px; padding: 14px 8px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); }
.lay svg { width: 20px; height: 20px; color: var(--dim); }
.lay.sel { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.lay.sel svg { color: var(--accent); }

/* ===========================================================
   Diseño: Cómodo (elementos más grandes)
   =========================================================== */
body[data-layout="comfy"] .row { padding: 18px 14px; gap: 14px; }
body[data-layout="comfy"] .row .ic { width: 46px; height: 46px; border-radius: 13px; }
body[data-layout="comfy"] .row .ic svg { width: 23px; height: 23px; }
body[data-layout="comfy"] .row .mid .t { font-size: 17px; }
body[data-layout="comfy"] .row .mid .m { font-size: 13px; }
body[data-layout="comfy"] .row .right .cd { font-size: 25px; }
body[data-layout="comfy"] .rowbar { height: 9px; }
body[data-layout="comfy"] .chk { width: 34px; height: 34px; }
body[data-layout="comfy"] .chk svg { width: 18px; height: 18px; }
body[data-layout="comfy"] .newbtn { padding: 11px 18px; font-size: 15px; }
body[data-layout="comfy"] .catsel { padding: 14px 16px; font-size: 15.5px; }
body[data-layout="comfy"] .seg button { padding: 11px 18px; font-size: 14px; }
body[data-layout="comfy"] .search-input { padding: 14px 16px 14px 44px; font-size: 16px; }
body[data-layout="comfy"] .btn { padding: 16px; font-size: 16px; }
body[data-layout="comfy"] .fa-btn { padding: 14px; font-size: 14px; }
body[data-layout="comfy"] .opt { padding: 16px 4px; font-size: 15.5px; }
body[data-layout="comfy"] .nav a { padding: 14px 12px; font-size: 16px; }
body[data-layout="comfy"] .dd-add { padding: 9px 14px; font-size: 13.5px; }

/* ===========================================================
   Diseño: Tarjetas (vista visual)
   =========================================================== */
body[data-layout="cards"] .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 10px 14px 0; }
body[data-layout="cards"] .row { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 15px; box-shadow: var(--shadow); }
body[data-layout="cards"] .row:active { background: var(--panel); }

/* ===========================================================
   Estadísticas: bloque de Resumen (insights)
   =========================================================== */
.insights { display: flex; flex-direction: column; gap: 2px; }
.ins-row { display: flex; align-items: center; gap: 11px; padding: 9px 2px; font-size: 13.5px; color: var(--text);
  border-bottom: 1px solid var(--line); }
.ins-row:last-child { border-bottom: none; }
.ins-row b { font-weight: 700; }
.ins-ic { flex: 0 0 30px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--accent-tint); color: var(--accent); }
.ins-ic svg { width: 16px; height: 16px; }
.ins-bad { color: var(--overdue); font-weight: 700; }

/* Datos y respaldo: línea de resumen */
.data-info { font-size: 12.5px; color: var(--dim); padding: 2px 2px 10px; }

/* ===========================================================
   Filtros: categoría + búsqueda en la misma línea (tablet/desktop)
   En teléfono se apilan como antes.
   =========================================================== */
.filters { display: flex; flex-direction: column; }
@media (min-width: 760px) {
  .filters { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px 4px; max-width: 760px; }
  .filters .catbar { order: 1; flex: 1 1 240px; margin: 0; }
  .filters .search-input { order: 2; flex: 1 1 240px; width: auto; margin: 0; }
  .filters .seg { order: 3; flex: 0 0 100%; margin: 6px 0 2px; max-width: none; }
}

/* ===========================================================
   Inicio: buscador + categoría en la misma línea
   =========================================================== */
.home-filters { display: flex; align-items: stretch; gap: 8px; margin: 10px 16px 2px; }
.home-filters .search-input { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; }
.home-filters .catbar { flex: 0 0 auto; width: 42%; max-width: 230px; margin: 0; }
.home-filters .catsel { height: 100%; padding: 10px 12px; font-size: 13.5px; }
.home-filters .catsel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-filters .catmenu { left: auto; right: 0; min-width: 240px; }

/* Barra superior del Inicio: en móvil se apila (buscador+categoría arriba, pestañas debajo);
   en desktop, todo en una línea: Pagos · Hábitos · Importantes · Buscar · Categorías */
.home-toolbar { display: flex; flex-direction: column; }
.home-toolbar .home-filters { order: 1; }
.home-toolbar .panel-tabs { order: 2; }

/* ===========================================================
   Inicio: Pagos / Hábitos (lado a lado en desktop, pestañas en móvil)
   =========================================================== */
/* Estrellita de "importante" junto al título */
.row .t .imp { display: inline-flex; vertical-align: -2px; margin-right: 4px; }
.row .t .imp svg { width: 14px; height: 14px; color: #f5a623; fill: #f5a623; }

/* Botón estrella dentro de cada loop */
.star-btn { width: 27px; height: 27px; border-radius: 50%; border: 1.6px solid var(--line); flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--dim);
  cursor: pointer; transition: color .12s ease, border-color .12s ease, background .12s ease; }
.star-btn svg { width: 15px; height: 15px; fill: none; }
.star-btn:hover { border-color: #f5a623; color: #f5a623; }
.star-btn.on { border-color: #f5a623; background: rgba(245,166,35,.14); color: #f5a623; }
.star-btn.on svg { fill: #f5a623; }
body[data-layout="comfy"] .star-btn { width: 34px; height: 34px; }
body[data-layout="comfy"] .star-btn svg { width: 18px; height: 18px; }

.panel-tabs { display: flex; gap: 8px; margin: 14px 16px 6px; }
.panel-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--dim);
  padding: 12px 8px; border-radius: 14px; font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer;
  white-space: nowrap; min-width: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease; }
.panel-tabs button:hover { border-color: var(--line2); }
.panel-tabs button svg { width: 16px; height: 16px; flex: none; }
.panel-tabs button.on { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.panel-tabs button.on svg { color: var(--accent); }
.panel-tabs .imp-tab svg { color: #f5a623; }
.panel-tabs .imp-tab.on { background: rgba(245,166,35,.14); border-color: #f5a623; color: #b5790a; }
.panel-tabs .imp-tab.on svg { color: #f5a623; fill: #f5a623; }
.panel-tabs .pt-c { font-size: 12px; font-weight: 800; background: var(--bg); border-radius: 999px; padding: 1px 8px; flex: none; }
.imp-col .panel-h svg { color: #f5a623; }
.panel-h { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 17px; font-weight: 600; padding: 10px 20px 2px; }
.panel-h svg { width: 18px; height: 18px; color: var(--accent); }
.panel-h span { margin-left: auto; font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--dim); }
/* Listas dentro de los paneles: siempre una sola columna */
.panel-col .list { display: block !important; grid-template-columns: none !important; margin: 4px 6px 0; }
/* Móvil: solo se ve la columna activa (la otra la oculta la pestaña) */
.panel-col:not(.act) { display: none; }
/* …salvo cuando buscas: ahí mostramos Pagos y Hábitos con sus resultados */
#view.searching .panel-tabs { display: none; }
#view.searching .panel-col { display: block !important; }
#view.searching .imp-col { display: none !important; }   /* al buscar no mostramos la vista (duplicada) de importantes */

@media (min-width: 760px) {
  /* Toolbar en una sola línea: Pagos · Hábitos · Importantes · Buscar · Categorías */
  .home-toolbar { flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 16px 16px 10px; }
  .home-toolbar .panel-tabs { order: 1; display: flex; flex: 0 0 auto; margin: 0; gap: 8px; }
  .home-toolbar .panel-tabs button { flex: 0 0 auto; padding: 10px 16px; }
  .home-toolbar .home-filters { order: 2; flex: 1 1 300px; margin: 0; }
  .home-toolbar .home-filters .catbar { width: auto; flex: 0 0 200px; }
  /* Dashboard: las tres columnas (Pagos · Hábitos · Importantes) a la vez */
  .panel-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 24px; align-items: start; }
  #view.searching .panel-cols { grid-template-columns: 1fr 1fr; }   /* al buscar, sin la 3ª */
  .panel-col { display: block !important; }                          /* se muestran todas a la vez */
  .panel-col.act { background: var(--accent-tint); border-radius: 14px; padding-bottom: 8px; }   /* resalta la pestaña activa */
  .imp-col.act { background: rgba(245,166,35,.10); }
  .panel-h { padding-top: 10px; }
}

/* ===========================================================
   Pantalla de autenticación
   =========================================================== */
#auth-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
#auth-screen[hidden] { display: none; }
.auth-box {
  width: 100%; max-width: 400px;
  background: var(--panel);
  border-radius: 20px;
  padding: 32px 24px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
}
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--accent);
  margin-bottom: 28px;
}
.auth-logo svg { width: 28px; height: 28px; color: var(--accent); }
.auth-tabs {
  display: flex; gap: 4px;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tabs button {
  flex: 1; padding: 9px; border: none; border-radius: 9px;
  background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--dim);
  transition: background .15s, color .15s;
}
.auth-tabs button.act {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
#auth-form { display: flex; flex-direction: column; gap: 12px; }
#auth-form input {
  width: 100%; box-sizing: border-box;
  padding: 13px 15px; border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text);
  font-size: 15px;
  outline: none; transition: border-color .15s;
}
#auth-form input:focus { border-color: var(--accent); }
.auth-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700;
  cursor: pointer; margin-top: 4px;
  transition: opacity .15s;
}
.auth-btn:disabled { opacity: .5; cursor: default; }
.auth-err {
  font-size: 13px; color: var(--overdue);
  background: color-mix(in srgb, var(--overdue) 10%, transparent);
  border-radius: 8px; padding: 8px 12px;
}

/* ===========================================================
   Compartir: lista de colaboradores en el modal
   =========================================================== */
.sh-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.sh-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.sh-info { flex: 1; min-width: 0; }
.sh-mail { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-meta { font-size: 12px; color: var(--dim); margin-top: 2px; }
.sh-del { flex: 0 0 auto; background: none; border: none; cursor: pointer; color: var(--dim); padding: 6px; border-radius: 8px; }
.sh-del:hover { color: var(--overdue); background: color-mix(in srgb, var(--overdue) 10%, transparent); }
.sh-del svg { width: 18px; height: 18px; }
.sh-del:disabled { opacity: .4; }

/* ===========================================================
   Modal Hazte Full: tarjetas de plan
   =========================================================== */
.plan-cards { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 4px; }
.plan-card { position: relative; text-align: left; width: 100%;
  border: 2px solid var(--line); border-radius: 16px; background: var(--bg);
  padding: 16px 18px; cursor: pointer; transition: border-color .15s, transform .1s; }
.plan-card:hover { border-color: var(--accent); }
.plan-card:active { transform: scale(.99); }
.plan-card.best { border-color: var(--accent); }
.plan-badge { position: absolute; top: -10px; right: 14px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; }
.plan-name { font-size: 13px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.plan-price { font-size: 26px; font-weight: 800; color: var(--text); margin: 2px 0; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--dim); }
.plan-note { font-size: 12.5px; color: var(--dim); }

/* ===========================================================
   Importar por foto: distintivo, spinner y lista de revisión
   =========================================================== */
.opt-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: middle; }
.spinner { width: 38px; height: 38px; margin: 0 auto; border: 3px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.imp-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; margin: 4px -4px 0; padding: 2px 4px; }
.imp-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.imp-row input { width: 19px; height: 19px; flex: none; accent-color: var(--accent); }
.imp-ic { flex: none; width: 22px; height: 22px; color: var(--dim); display: flex; align-items: center; justify-content: center; }
.imp-ic svg { width: 20px; height: 20px; }
.imp-body { display: flex; flex-direction: column; min-width: 0; }
.imp-title { font-size: 14.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-meta { font-size: 12px; color: var(--dim); }
