/* Finanzas — "Bloques de color": cada cosa tiene su color, lo que pide acción va al centro y el menú es un dock flotante. */

:root {
  --bg: #efedfd;
  --card: #ffffff;
  --ink: #1b1640;
  --mute: #6f6a96;
  --line: #e4e1f6;
  --soft: #f4f2ff;
  --vio: #5a3fff;       --vio-soft: #e9e5ff;
  --mint: #0fbf88;      --mint-soft: #d9f5ec;
  --coral: #ff5f7a;     --coral-soft: #ffe3e8;
  --sun: #ffc23d;       --sun-soft: #fff1cc;
  --sky: #43aef5;
  --pos: #0a9f6f;
  --neg: #d93a57;
  --warn: #a56a00;
  --accent: #5a3fff;
  --dock: rgba(27, 22, 64, .9);
  --shadow: 0 2px 14px rgba(90, 63, 255, .07);
  --disp: "Outfit", "Segoe UI", system-ui, sans-serif;
  --f: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --f-num: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f2b; --card: #1c1840; --ink: #eeecff; --mute: #9a95c4; --line: #2e2a5a; --soft: #25205a;
    --vio: #8a74ff; --vio-soft: #2b2562; --mint: #2fd6a0; --mint-soft: #123a30; --coral: #ff7b92; --coral-soft: #4a1f2c;
    --sun: #ffcf5c; --sun-soft: #46380f; --pos: #3ddc9d; --neg: #ff7b92; --warn: #ffcf5c; --accent: #8a74ff;
    --dock: rgba(8, 6, 28, .92); --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #120f2b; --card: #1c1840; --ink: #eeecff; --mute: #9a95c4; --line: #2e2a5a; --soft: #25205a;
  --vio: #8a74ff; --vio-soft: #2b2562; --mint: #2fd6a0; --mint-soft: #123a30; --coral: #ff7b92; --coral-soft: #4a1f2c;
  --sun: #ffcf5c; --sun-soft: #46380f; --pos: #3ddc9d; --neg: #ff7b92; --warn: #ffcf5c; --accent: #8a74ff;
  --dock: rgba(8, 6, 28, .92); --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f); }
h1, h2, h3 { font-family: var(--disp); letter-spacing: -.02em; margin: 0; }
a { color: var(--vio); }
:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mu { color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estructura ---------- */
.top { display: flex; align-items: center; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 18px 24px 0; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 21px var(--disp); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
/* El logo trae las letras en blanco: en el tema claro va sobre una pastilla oscura para que se lea. */
.brand-logo { display: block; height: 34px; width: auto; box-sizing: content-box; padding: 7px 14px; border-radius: 14px; background: #1b1640; }
.brand-logo.lg { height: 48px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: transparent; padding: 7px 0; } }
:root[data-theme="dark"] .brand-logo { background: transparent; padding: 7px 0; }
@media (max-width: 640px) { .top .brand-logo { height: 28px; padding: 6px 12px; } }
.top .sp { flex: 1; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--vio); color: #fff; font: 700 14px var(--disp); flex: none; }
.main { max-width: 1240px; margin: 0 auto; padding: 18px 24px 150px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }

/* Dock de navegación */
.dock { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 26px; background: var(--dock); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 18px 50px rgba(27, 22, 64, .38); max-width: calc(100vw - 20px); }
.dock a { position: relative; width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #b9b4e6; background: rgba(255, 255, 255, .06); text-decoration: none; transition: transform .18s, background .18s; }
.dock a:hover { transform: translateY(-8px) scale(1.1); color: #fff; }
.dock a.on { background: linear-gradient(135deg, #6a4dff, #43aef5); color: #fff; box-shadow: 0 8px 22px rgba(90, 63, 255, .55); }
.dock svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock .sep { width: 1px; height: 26px; background: rgba(255, 255, 255, .16); margin: 0 3px; flex: none; }
.dock a::after { content: attr(data-t); position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%); background: #0f0b2e; color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.dock a:hover::after, .dock a:focus-visible::after { opacity: 1; }

@media (max-width: 700px) {
  .top { padding: 14px 14px 0; }
  .acct-t { display: none; }
  .main { padding: 14px 14px 130px; }
  .dock { gap: 3px; padding: 7px 8px; overflow-x: auto; scrollbar-width: none; }
  .dock a { width: 42px; height: 42px; border-radius: 13px; }
  .dock a:hover { transform: none; }
  .dock a::after { display: none; }
  .dock .sep { height: 22px; }
}

/* ---------- Tarjetas y rejillas ---------- */
.card { background: var(--card); border-radius: 24px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card > h2, .card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.card .sub { color: var(--mute); font-size: 13px; margin: 0 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; }
.g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); gap: 16px; }
.g2 > .card { margin: 0; }

/* ---------- Formularios ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--mute); margin-bottom: 5px; }
input, select, textarea { width: 100%; padding: 10px 14px; border: 2px solid transparent; border-radius: 14px; background: var(--soft); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vio); background: var(--card); }
input[type=file] { padding: 8px; }
input[type=checkbox] { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.chip { border: 0; background: var(--vio-soft); color: var(--vio); padding: 4px 12px; border-radius: 999px; font: 600 12.5px var(--f); cursor: pointer; }
.chip:hover { filter: brightness(.96); }
.hint { font-size: 12.5px; color: var(--mute); margin-top: 5px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; background: var(--vio); color: #fff; padding: 11px 22px; border-radius: 999px; font: 700 14.5px var(--f); text-decoration: none; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn.ghost { background: var(--vio-soft); color: var(--vio); }
.btn.line { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.danger { background: var(--coral); color: #fff; }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.ib { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; background: var(--soft); color: var(--ink); border-radius: 12px; cursor: pointer; margin-left: 4px; font-size: 15px; }
.ib:hover { background: var(--vio-soft); color: var(--vio); }
.ib.r { color: var(--neg); }
.ib.r:hover { background: var(--coral-soft); }
.ib svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Barra de filtros ---------- */
.tb { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.tb > div { min-width: 140px; }
.tb .grow { flex: 1; min-width: 200px; }

/* ---------- Totales: fichas de color ---------- */
.totals { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin-bottom: 16px; }
.totals > div { background: var(--soft); border-radius: 18px; padding: 10px 18px 12px; }
.totals > div:nth-child(1) { background: var(--vio-soft); }
.totals > div:nth-child(2) { background: var(--mint-soft); }
.totals > div:nth-child(3) { background: var(--sun-soft); }
.totals .t-label { font-size: 12.5px; font-weight: 600; color: var(--mute); display: block; }
.total-fig { font: 800 21px var(--disp); letter-spacing: -.02em; display: inline-block; }

/* ---------- Tablas ---------- */
.sc { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--mute); letter-spacing: .07em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
td.r, th.r { text-align: right; white-space: nowrap; }
tbody tr:hover { background: var(--soft); }
tbody tr:last-child td { border-bottom: 0; }
.actions { white-space: nowrap; text-align: right; }

/* ---------- Etiquetas de estado ---------- */
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; background: var(--mint-soft); color: var(--pos); font-weight: 700; }
.pill.p { background: var(--sun-soft); color: var(--warn); }
.pill.f { background: var(--coral-soft); color: var(--neg); }
.pill.n { background: var(--soft); color: var(--mute); }

/* ---------- Listas ---------- */
.row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row:last-child { border-bottom: 0; }
.bar { height: 7px; border-radius: 999px; background: var(--soft); margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.sum .a { display: flex; justify-content: space-between; font-weight: 700; padding: 9px 0 4px; border-bottom: 1px solid var(--line); }
.sum .s { display: flex; justify-content: space-between; padding: 5px 0 5px 16px; color: var(--mute); }

/* ---------- Modal y avisos ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(20, 14, 60, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 60; }
.modal { background: var(--card); border-radius: 28px; padding: 26px; max-width: 520px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: 0 24px 70px rgba(20, 14, 60, .45); }
.modal.wide { max-width: 660px; }
.modal h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.modal .r { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px; z-index: 90; font-size: 14px; font-weight: 600; max-width: 90vw; box-shadow: 0 10px 30px rgba(20, 14, 60, .3); }
.toast.err { background: var(--coral); color: #fff; }
.th { width: 46px; height: 46px; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.file-row { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 16px; padding: 10px; margin-bottom: 8px; }
.file-row img { width: 56px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; cursor: zoom-in; }
.empty { padding: 30px 8px; text-align: center; color: var(--mute); }

/* ---------- Resumen: bloques ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hello h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
.hello p { margin: 8px 0 0; color: var(--mute); max-width: 44em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--card); padding: 6px; border-radius: 999px; box-shadow: var(--shadow); }
.filters select, .filters input { width: auto; border-radius: 999px; padding: 8px 14px; font-weight: 600; background: var(--soft); }
.filters label { display: none; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.t { border-radius: 26px; padding: 22px; position: relative; overflow: hidden; background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.t h2 { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.t .sub { color: var(--mute); font-size: 13px; margin: 0 0 14px; }
.big { grid-column: 1 / 6; grid-row: span 2; background: var(--vio); color: #fff; display: flex; flex-direction: column; justify-content: space-between; min-height: 320px; }
.big.neg-bg { background: var(--coral); }
.big .l { font-weight: 600; opacity: .88; }
.big .n { font: 800 clamp(44px, 6vw, 70px)/1 var(--disp); letter-spacing: -.04em; margin: 8px 0 8px; white-space: nowrap; }
.big .n small { font-size: .42em; font-weight: 600; opacity: .8; margin-right: 6px; letter-spacing: 0; }
.chipw { display: inline-block; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 3px 11px; }
.big::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.mb { display: flex; align-items: flex-end; gap: 10px; height: 84px; margin: 14px 0 6px; position: relative; z-index: 1; }
.mb div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; font-size: 11px; font-weight: 700; }
.mb i { display: block; width: 100%; border-radius: 9px 9px 4px 4px; background: rgba(255, 255, 255, .35); }
.mb div:last-child i { background: #fff; }
.cap { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; margin: 12px 0 8px; }
.cap i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.capl { display: flex; justify-content: space-between; font-size: 13px; opacity: .92; gap: 10px; }
.num-t { grid-column: span 3; color: #fff; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; gap: 10px; }
.num-t.mint { background: var(--mint); } .num-t.coral { grid-column: span 2; background: var(--coral); } .num-t.sun { grid-column: span 2; background: var(--sun); color: #3a2b00; }
.num-t .l { font-weight: 600; opacity: .92; font-size: 14px; }
.num-t .v { font: 800 clamp(20px, 2.4vw, 30px) var(--disp); letter-spacing: -.03em; white-space: nowrap; }
.num-t .d { white-space: nowrap; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .24); align-self: flex-start; border-radius: 999px; padding: 2px 10px; }
.num-t.sun .d { background: rgba(58, 43, 0, .12); }
.area { grid-column: 6 / 13; }
.owed { grid-column: 1 / 6; grid-row: span 2; }
.donut { grid-column: 6 / 10; } .paid { grid-column: 10 / 13; }
.biz { grid-column: 6 / 10; } .cash { grid-column: 10 / 13; }
.spend { grid-column: 1 / 6; }
.owedh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pill-late { font: 700 12.5px var(--f); padding: 4px 12px; border-radius: 999px; background: var(--coral-soft); color: var(--neg); white-space: nowrap; }
.item { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.item .nm { font-weight: 700; line-height: 1.2; } .item small { color: var(--mute); display: block; font-size: 12.5px; }
.item .am { text-align: right; font: 700 16px var(--disp); white-space: nowrap; }
.due { display: inline-block; font-size: 11.5px; font-weight: 700; margin-top: 3px; padding: 1px 9px; border-radius: 999px; background: var(--soft); color: var(--mute); }
.due.late { background: var(--coral-soft); color: var(--neg); } .due.soon { background: var(--sun-soft); color: var(--warn); }
.act { display: inline-block; margin-top: 6px; border: 0; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 5px 13px; font: 700 12px var(--f); cursor: pointer; text-decoration: none; }
.act.first { background: var(--vio); color: #fff; }
.more { display: block; text-align: center; margin-top: 10px; font-weight: 700; font-size: 13.5px; text-decoration: none; }
.dn { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dn svg { width: 150px; height: 150px; flex: none; }
.leg { flex: 1; min-width: 150px; display: grid; gap: 9px; }
.leg div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.leg i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 8px; }
.leg b { font-family: var(--disp); }
.faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; text-align: center; }
.face { position: relative; font-size: 11.5px; line-height: 1.15; color: var(--mute); }
.face .av { margin: 0 auto 5px; width: 46px; height: 46px; font-size: 15px; }
.bdg { position: absolute; right: 4px; top: 30px; width: 19px; height: 19px; border-radius: 50%; border: 2.5px solid var(--card); display: grid; place-items: center; color: #fff; font: 700 10px var(--f); }
.bdg.ok { background: var(--mint); } .bdg.wait { background: var(--sun); color: #3a2b00; } .bdg.no { background: var(--coral); }
.paidn { font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.bz { margin: 13px 0; }
.bz .tt { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; margin-bottom: 6px; gap: 10px; }
.bz .tr { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bz .tr i { display: block; height: 100%; border-radius: 999px; }
.cashr { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; gap: 10px; }
.cashr:first-of-type { border-top: 0; }
.cashr b { font: 700 15px var(--disp); white-space: nowrap; } .cashr em { font-style: normal; color: var(--mute); font-size: 12px; }

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .big, .area, .owed, .donut, .paid, .biz, .cash, .spend { grid-column: 1 / -1; grid-row: auto; }
  .num-t, .num-t.coral, .num-t.sun { grid-column: span 2; }
}
@media (max-width: 600px) {
  .num-t, .num-t.coral, .num-t.sun { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
  .num-t .d { margin-left: auto; }
  .filters { width: 100%; border-radius: 22px; }
  .filters select, .filters input { flex: 1; }
}

/* ---------- Acceso ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { background: var(--card); border-radius: 30px; padding: 34px 30px; width: 100%; max-width: 400px; box-shadow: 0 24px 70px rgba(90, 63, 255, .18); }
.login-card .brand { margin-bottom: 6px; }
.login-card form > div { margin-bottom: 14px; }
.login-card .err { background: var(--coral-soft); color: var(--neg); padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Íconos y desplegable con íconos ---------- */
.ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none; vertical-align: middle; background: var(--vio-soft); color: var(--vio); }
.ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico.c1 { background: var(--mint-soft); color: var(--pos); }
.ico.c2 { background: var(--coral-soft); color: var(--neg); }
.ico.c3 { background: var(--sun-soft); color: var(--warn); }
.ico.c4 { background: #dff0fd; color: #1b7bbf; }
.ico.txt { font: 800 12.5px var(--disp); }
.ico.brand { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.ico.brand img { width: 20px; height: 20px; object-fit: contain; display: block; }
.ic-text { display: inline-flex; align-items: center; gap: 9px; }

.cb { position: relative; }
.cb input { padding-left: 50px; padding-right: 38px; }
.cb-ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; line-height: 0; }
.cb-caret { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: none; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--mute); }
.cb-caret:hover { background: var(--vio-soft); color: var(--vio); }
.cb-caret svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cb-list { position: fixed; z-index: 120; background: var(--card); border-radius: 20px; padding: 6px; box-shadow: 0 18px 50px rgba(20, 14, 60, .28), 0 0 0 1.5px var(--line); max-height: 262px; overflow-y: auto; }
.cb-opt { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.cb-opt:hover, .cb-opt.on { background: var(--vio-soft); }
.cb-opt.sel::after { content: "✓"; margin-left: auto; color: var(--vio); font-weight: 800; }
.cb-opt.free { color: var(--vio); }
.cb-none { padding: 14px; text-align: center; color: var(--mute); font-size: 13.5px; }
td .ic-text .ico, .modal .r .ic-text .ico { width: 26px; height: 26px; border-radius: 8px; }
td .ic-text .ico svg { width: 15px; height: 15px; }
td .ic-text .ico.brand img { width: 17px; height: 17px; }

/* ---------- Barras de desplazamiento modernas: finas, redondeadas, sin flechas ---------- */
:root { --scroll: rgba(90, 63, 255, .32); --scroll-hover: rgba(90, 63, 255, .6); --dz-line: rgba(90, 63, 255, .38); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --scroll: rgba(160, 142, 255, .4); --scroll-hover: rgba(160, 142, 255, .72); --dz-line: rgba(160, 142, 255, .5); }
}
:root[data-theme="dark"] { --scroll: rgba(160, 142, 255, .4); --scroll-hover: rgba(160, 142, 255, .72); --dz-line: rgba(160, 142, 255, .5); }
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
@supports not (scrollbar-color: auto) {
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
  *::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); background-clip: content-box; }
  *::-webkit-scrollbar-button { display: none; }
}
.modal, .cb-list { overscroll-behavior: contain; }

/* ---------- Carga de archivos ---------- */
.dz { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; padding: 22px 16px 20px; border-radius: 24px; border: 2px dashed var(--dz-line); background: var(--soft); cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.dz:hover, .dz:focus-visible { border-color: var(--vio); background: var(--vio-soft); outline: none; }
.dz.over { border-style: solid; border-color: var(--vio); background: var(--vio-soft); transform: scale(1.015); }
.dz-ic { width: 54px; height: 54px; border-radius: 19px; display: grid; place-items: center; background: linear-gradient(135deg, #6a4dff, #43aef5); color: #fff; box-shadow: 0 10px 22px rgba(90, 63, 255, .35); margin-bottom: 5px; transition: transform .2s; }
.dz-ic svg { width: 27px; height: 27px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dz:hover .dz-ic, .dz.over .dz-ic { transform: translateY(-4px); }
.dz b { font: 700 15.5px var(--disp); letter-spacing: -.01em; }
.dz-sub { font-size: 12.5px; color: var(--mute); line-height: 1.55; }
.dz-list { display: grid; gap: 8px; margin-top: 10px; }
.dz-list:empty { display: none; }
.fcard { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 18px; background: var(--soft); animation: pop .22s ease-out; }
.fcard .ib { background: var(--card); }
.fcard.new { box-shadow: inset 0 0 0 2px var(--vio-soft); }
.fthumb { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none; }
.fthumb.pdf { display: grid; place-items: center; background: var(--coral-soft); color: var(--neg); font: 800 12px var(--disp); }
.fname { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fname b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname small { color: var(--mute); font-size: 12px; }
.dz-msg { font-size: 12.5px; font-weight: 600; color: var(--neg); margin-top: 8px; }
.dz-msg:empty { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Proveedores ---------- */
textarea { resize: vertical; min-height: 84px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.pv { background: var(--card); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; transition: transform .18s, box-shadow .18s; }
.pv:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(90, 63, 255, .14); }
.pv.off { opacity: .6; }
.pv-top { display: flex; gap: 14px; align-items: flex-start; }
.pv-logo { flex: none; width: 56px; height: 56px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; overflow: hidden; }
.pv-logo img { width: 36px; height: 36px; object-fit: contain; display: block; }
.pv-logo .ico { width: 56px; height: 56px; border-radius: 18px; }
.pv-logo .ico svg { width: 26px; height: 26px; }
.pv-id { min-width: 0; flex: 1; }
.pv-id h3 { font: 700 17px var(--disp); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-id span { color: var(--mute); font-size: 13.5px; display: block; line-height: 1.35; }
.pv-act { display: flex; flex: none; }
.pv-act .ib { width: 32px; height: 32px; margin-left: 0; }
.pv-tags { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.pv-cost { font-weight: 700; font-size: 13px; background: var(--sun-soft); color: var(--warn); padding: 3px 12px; border-radius: 999px; }
.pv-tags .ic-text { font-size: 13px; font-weight: 600; }
.pv-tags .ic-text .ico { width: 24px; height: 24px; border-radius: 8px; }
.pv-tags .ic-text .ico svg { width: 14px; height: 14px; }
.pv-tags .ic-text .ico.brand img { width: 16px; height: 16px; }
.pv-det { margin: 0; color: var(--mute); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.pv-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.pv-foot b { color: var(--ink); font-family: var(--disp); }
.pv-foot > span { min-width: 0; }
.pv-foot .btn { flex: none; white-space: nowrap; }
.pv-site { display: flex; gap: 14px; align-items: flex-start; }
.pv-site .pv-logo { margin-top: 20px; }

/* Tira de proveedores en Gastos */
.provs-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.provs-h h2 { font-size: 15px; font-weight: 700; }
.provs-h a { font-size: 13px; font-weight: 700; text-decoration: none; }
.provs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.provc { flex: none; display: flex; align-items: center; gap: 11px; padding: 7px 18px 7px 7px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); border: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: transform .15s, background .15s; }
.provc:hover { transform: translateY(-2px); background: var(--vio-soft); }
.provc .pv-logo { width: 40px; height: 40px; border-radius: 14px; }
.provc .pv-logo img { width: 26px; height: 26px; }
.provc .pv-logo .ico { width: 40px; height: 40px; border-radius: 14px; }
.provc .pv-logo .ico svg { width: 20px; height: 20px; }
.provc b { display: block; font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.provc small { display: block; color: var(--mute); font-size: 12px; white-space: nowrap; }
.cb-grp { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* ---------- Proyectos ---------- */
.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.fchips:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 7px; border: 0; background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 14px 6px 8px; font: 600 13.5px var(--f); cursor: pointer; box-shadow: var(--shadow); transition: background .15s, color .15s; }
.fchip:first-child { padding-left: 14px; }
.fchip:hover { background: var(--vio-soft); }
.fchip.on { background: var(--vio); color: #fff; }
.fchip em { font-style: normal; font-weight: 700; font-size: 12px; opacity: .65; }
.fchip .ico { width: 24px; height: 24px; border-radius: 8px; }
.fchip .ico svg { width: 14px; height: 14px; }
.fchip.on .ico { background: rgba(255, 255, 255, .22); color: #fff; }
.pj-sec { margin-bottom: 28px; }
.pj-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; margin-bottom: 12px; }
.pj-sec h2 em { font: 600 13px var(--f); color: var(--mute); }
.pj-sec h2 .ico { width: 32px; height: 32px; border-radius: 11px; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.pj { background: var(--card); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; transition: transform .18s, box-shadow .18s; }
.pj:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(90, 63, 255, .14); }
.pj.off { opacity: .6; }
.pj-top { display: flex; gap: 14px; align-items: flex-start; }
.pj-logo { flex: none; width: 60px; height: 60px; border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.pj-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pj-ini { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font: 800 20px var(--disp); letter-spacing: -.02em; }
.pj-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.pj-id h3 { font: 700 17px var(--disp); letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.pj-id .ic-text { font-size: 13px; font-weight: 600; color: var(--mute); }
.pj-id .ic-text .ico { width: 24px; height: 24px; border-radius: 8px; }
.pj-id .ic-text .ico svg { width: 14px; height: 14px; }
.pj-up { display: flex; gap: 16px; align-items: center; }
.pj-prev { flex: none; width: 96px; height: 96px; border-radius: 28px; overflow: hidden; display: grid; place-items: center; background: var(--soft); border: 2px dashed var(--dz-line); cursor: pointer; transition: border-color .18s, transform .18s; }
.pj-prev:hover, .pj-prev:focus-visible, .pj-prev.over { border-color: var(--vio); outline: none; }
.pj-prev.over { transform: scale(1.05); border-style: solid; }
.pj-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.pj-prev .pj-ini { font-size: 30px; }
.pj-upt b { font: 700 15px var(--disp); }
.pj-upb { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Actividades económicas (Configuración) ---------- */
.act-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.act-row:first-child { border-top: 0; }
.act-row > .ico { width: 46px; height: 46px; border-radius: 16px; }
.act-row > .ico svg { width: 23px; height: 23px; }
.act-row > .ico.brand img { width: 30px; height: 30px; }
.act-t { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.act-t b { font: 700 16.5px var(--disp); letter-spacing: -.01em; }
.act-cod { font: 700 12px var(--disp); letter-spacing: .05em; padding: 3px 10px; border-radius: 9px; background: var(--sun-soft); color: var(--warn); }
.act-main p { margin: 6px 0 0; font-size: 13.5px; }
#na[disabled] { cursor: not-allowed; }

/* Íconos de la librería (Lucide): se pintan con máscara para tomar el color del texto */
.lc { display: block; width: 100%; height: 100%; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ico .lc { width: 57%; height: 57%; }
.ico:has(> .lc) { display: inline-grid; place-items: center; }

/* ---------- Categorías de actividad y selector de íconos ---------- */
.cat-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-opt { position: relative; cursor: pointer; margin: 0; }
.cat-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.cat-opt span { display: block; padding: 12px 14px; border-radius: 16px; background: var(--soft); border: 2px solid transparent; transition: border-color .15s, background .15s; }
.cat-opt b { display: block; font: 700 14.5px var(--disp); color: var(--ink); }
.cat-opt small { display: block; color: var(--mute); font-size: 12px; font-weight: 500; margin-top: 2px; }
.cat-opt:hover span { border-color: var(--dz-line); }
.cat-opt input:checked + span { border-color: var(--vio); background: var(--vio-soft); }
.cat-opt input:focus-visible + span { outline: 2px solid var(--vio); outline-offset: 2px; }
.cat-opt.off { cursor: not-allowed; }
.cat-opt.off span { opacity: .5; }
.pill.pr { background: var(--vio-soft); color: var(--vio); }
.ip-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ip-cur { display: inline-flex; align-items: center; gap: 9px; min-width: 150px; font-size: 14px; }
.ip-cur .ico { width: 34px; height: 34px; border-radius: 11px; }
.ip-q { flex: 1; min-width: 180px; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, 46px); gap: 6px; max-height: 236px; overflow-y: auto; padding: 8px; margin-top: 10px; background: var(--soft); border-radius: 20px; justify-content: space-between; }
.ip-h { grid-column: 1 / -1; font: 700 11px var(--f); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 4px 4px 0; }
.ip-msg { grid-column: 1 / -1; text-align: center; color: var(--mute); padding: 22px 8px; font-size: 13.5px; }
.ip-b { width: 46px; height: 46px; padding: 11px; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); cursor: pointer; transition: background .12s, color .12s, transform .12s; }
.ip-b:hover { background: var(--vio-soft); color: var(--vio); transform: translateY(-2px); }
.ip-b.on { background: var(--vio); color: #fff; }
.ip-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--mute); }
.ip-foot:empty { display: none; }
@media (max-width: 560px) { .cat-opts { grid-template-columns: 1fr; } }

/* ---------- Formulario de venta por secciones, selector de cliente ---------- */
[hidden] { display: none !important; }
.fsec { padding: 16px 0 6px; border-top: 1px solid var(--line); margin-top: 8px; }
.fsec:first-of-type { border-top: 0; margin-top: 0; padding-top: 4px; }
.fsec h3 { display: flex; align-items: center; gap: 10px; font: 800 16px var(--disp); margin: 0 0 12px; }
.fsec h3 small { font: 500 12.5px var(--f); color: var(--mute); }
.fsec .fn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--vio-soft); color: var(--vio); font: 800 13px var(--disp); flex: none; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--soft); margin-bottom: 12px; max-width: 100%; }
.seg-o { margin: 0; cursor: pointer; }
.seg-o input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.seg-o span { display: block; padding: 8px 18px; border-radius: 12px; font: 700 13.5px var(--f); color: var(--mute); transition: background .15s, color .15s; white-space: nowrap; }
.seg-o:hover span { color: var(--ink); }
.seg-o input:checked + span { background: var(--card); color: var(--vio); box-shadow: var(--shadow); }
.seg-o input:focus-visible + span { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.cf { margin-top: 2px; }
.cli-card { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 14px; border-radius: 16px; background: var(--soft); }
.cli-card .ico { width: 40px; height: 40px; border-radius: 13px; }
.cli-card b { display: block; font-size: 14.5px; }
.cli-card small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 1px; }
.plan { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--soft); }
.plan input { background: var(--card); }
.cb.lock input { opacity: .75; cursor: default; }
.cb.lock .cb-caret { display: none; }
.ic-text small.sub-act { display: block; color: var(--mute); font-size: 12px; font-weight: 500; line-height: 1.2; }
td .ic-text { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Rejillas del formulario: columnas fijas para que no queden huecos ---------- */
.modal.xl { max-width: 780px; }
.fsec .grid, .cf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fsec .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .plan { margin: 0; }
@media (max-width: 640px) { .fsec .grid, .fsec .grid.g3, .cf { grid-template-columns: 1fr; } }

.pls { margin-top: 10px; display: grid; gap: 8px; }
.pl { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; }
.pl.head { font: 700 11px var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.pl b { display: grid; place-items: center; height: 34px; border-radius: 10px; background: var(--vio-soft); color: var(--vio); font: 800 14px var(--disp); }
.pl.head span:first-child { text-align: center; }
.pl input { padding: 7px 12px; min-height: 0; }

.fsec .grid.g3.gact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 640px) { .fsec .grid.g3.gact { grid-template-columns: 1fr; } }

/* ---------- Banderas y cuadrículas seleccionables ---------- */
.ico.flag { width: 30px; height: 22px; border-radius: 5px; background: none; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.ico.flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-opt .ico.flag { width: 32px; height: 24px; }
.tl { display: block; font: 600 12.5px var(--f); color: var(--mute); margin-bottom: 6px; }
.tgrp { min-width: 0; margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; margin: 0; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.tile-b { position: relative; display: flex; align-items: center; gap: 10px; height: 100%; padding: 12px; border-radius: 16px; background: var(--soft); border: 2px solid transparent; transition: border-color .15s, background .15s; }
.tile-b .ico { width: 38px; height: 38px; border-radius: 12px; }
.tile-t b { display: block; font: 700 14px var(--disp); color: var(--ink); line-height: 1.2; }
.tile-t small { display: block; color: var(--mute); font: 500 12px var(--f); margin-top: 2px; line-height: 1.25; }
.tile:hover .tile-b { border-color: var(--dz-line); }
.tile input:checked + .tile-b { border-color: var(--vio); background: var(--vio-soft); }
.tile input:checked + .tile-b::after { content: '✓'; position: absolute; top: 7px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--vio); color: #fff; font: 800 11px/18px var(--f); text-align: center; }
.tile input:focus-visible + .tile-b { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.tgrp.off { opacity: .45; }
.tgrp.off .tile { pointer-events: none; cursor: not-allowed; }
@media (max-width: 400px) { .tiles { grid-template-columns: 1fr; } }
.tile-b { padding-right: 30px; }
.tile-b .ico { width: 34px; height: 34px; }
.fsec .grid.g3.gact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 640px) { .fsec .grid.g3.gact { grid-template-columns: 1fr; } }

/* ---------- Proveedores: logo propio, servicios y proyectos ---------- */
.pv-logo img.up { width: 100%; height: 100%; object-fit: contain; }
.pv-logo .pj-ini { font-size: 19px; }
.provc .pv-logo .pj-ini { font-size: 14px; }
.svc-list { display: grid; gap: 8px; }
.svc-row { padding: 10px 12px; border-radius: 14px; background: var(--soft); display: grid; gap: 8px; }
.svc-n b { font: 700 14px var(--disp); }
.svc-n small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.svc-p, .pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 3px 11px 3px 4px; border-radius: 999px; background: var(--card); font: 600 12.5px var(--f); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); position: relative; }
.pchip .ico { width: 22px; height: 22px; border-radius: 7px; }
.pchip .ico svg { width: 13px; height: 13px; }
.pchip .ico.brand img { width: 15px; height: 15px; object-fit: contain; }
.pchip.sel { cursor: pointer; padding: 5px 13px 5px 6px; font-size: 13px; transition: background .15s, box-shadow .15s; }
.pchip.sel input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.pchip.sel:hover { box-shadow: inset 0 0 0 1.5px var(--dz-line); }
.pchip.sel:has(input:checked) { background: var(--vio-soft); box-shadow: inset 0 0 0 2px var(--vio); color: var(--vio); }
.pchip.sel:has(input:focus-visible) { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.svc { display: grid; gap: 12px; padding: 14px; margin-top: 10px; border-radius: 18px; background: var(--soft); }
.svc-h { display: flex; justify-content: space-between; align-items: center; }
.svc-t { font: 800 13px var(--disp); color: var(--vio); letter-spacing: .02em; }
.svc textarea { min-height: 62px; }
.svc input, .svc textarea { background: var(--card); }
.lnk { margin-left: 8px; border: 0; background: none; color: var(--vio); font: 700 12px var(--f); cursor: pointer; padding: 0 2px; }
.lnk:hover { text-decoration: underline; }
.pv-logo .ico.brand img { width: 100%; height: 100%; object-fit: contain; }
.pv-logo .ico.txt { font-size: 18px; }

/* ---------- Servicios o planes de un proyecto ---------- */
.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-chips .pchip { padding: 4px 12px; }
.pc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vio); flex: none; }

/* ---------- Tableros estilo Trello (proyectos y tablero de cada proyecto) ---------- */
.bd { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x proximity; }
.bd-col { flex: 0 0 300px; max-width: 300px; background: var(--soft); border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; transition: box-shadow .15s; }
.bd-col.over { box-shadow: inset 0 0 0 2px var(--vio); }
.bd-head { display: flex; align-items: center; gap: 9px; padding: 2px 2px 0 4px; }
.bd-head h3 { flex: 1; min-width: 0; font: 700 15px var(--disp); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-head .ico { width: 30px; height: 30px; border-radius: 10px; flex: none; }
.bd-head .ib { width: 30px; height: 30px; margin-left: 0; flex: none; }
.bd-head .ib svg { fill: currentColor; stroke: none; }
.bd-n { font: 700 12px var(--f); color: var(--mute); background: var(--card); border-radius: 999px; padding: 2px 9px; flex: none; }
.bd-cards { display: flex; flex-direction: column; gap: 9px; min-height: 36px; padding: 2px; }
.bd-card { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .15s, transform .15s; }
.bd-card:hover { box-shadow: 0 0 0 2px var(--dz-line), var(--shadow); }
.bd-card:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.bd-card[draggable=true] { cursor: grab; }
.bd-card.dragging { opacity: .35; }
.bd-ph { flex: none; border-radius: 14px; border: 2px dashed var(--vio); background: var(--vio-soft); opacity: .7; min-height: 40px; }
.bd-empty { text-align: center; color: var(--mute); font-size: 13px; padding: 14px 6px; }
.bd-add { width: 100%; text-align: left; border: 0; background: transparent; color: var(--mute); font: 600 13.5px var(--f); padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .15s, color .15s; }
.bd-add:hover { background: var(--card); color: var(--vio); }
.bd-new { background: transparent; border: 2px dashed var(--line); }
.bd-comp { display: grid; gap: 8px; }
.bd-comp textarea, .bd-comp input { background: var(--card); }
.bd-comp textarea { min-height: 64px; }
.bd-comp-b { display: flex; gap: 8px; }
.seg-mini { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-mini label { margin: 0; cursor: pointer; position: relative; }
.seg-mini input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.seg-mini span { display: block; padding: 5px 12px; border-radius: 999px; background: var(--card); font: 700 12.5px var(--f); color: var(--mute); transition: background .15s, color .15s; }
.seg-mini input:checked + span { background: var(--vio); color: #fff; }
.seg-mini input:focus-visible + span { outline: 2.5px solid var(--vio); outline-offset: 2px; }

/* tarjetas de proyecto */
.pjc-top { display: flex; gap: 10px; align-items: flex-start; }
.pjc .pj-logo { width: 44px; height: 44px; border-radius: 14px; }
.pjc .pj-ini { font-size: 15px; }
.pjc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.pjc-id h4 { font: 700 15px var(--disp); line-height: 1.2; overflow-wrap: anywhere; }
.pjc-act { display: flex; flex: none; opacity: 0; transition: opacity .15s; }
.pjc:hover .pjc-act, .pjc:focus-within .pjc-act { opacity: 1; }
@media (hover: none) { .pjc-act { opacity: 1; } }
.pjc-act .ib { width: 28px; height: 28px; margin-left: 0; }
.pjc-det { margin: 8px 0 0; color: var(--mute); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pjc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.pjc-chips span { font: 600 11.5px var(--f); background: var(--soft); padding: 3px 9px; border-radius: 999px; color: var(--mute); }
.pjc-bar { height: 6px; border-radius: 99px; background: var(--soft); margin-top: 10px; overflow: hidden; }
.pjc-bar i { display: block; height: 100%; background: var(--pos); border-radius: 99px; }
.pjc-late { margin-top: 8px; font: 700 12px var(--f); color: var(--neg); }
.pjc.off { opacity: .6; }

/* encabezado de la página de un proyecto */
.back { display: inline-block; margin-bottom: 10px; font-weight: 700; text-decoration: none; font-size: 14px; }
.pr-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.pr-id { flex: 1; min-width: 220px; }
.pr-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--mute); font-weight: 600; font-size: 14px; }
.pr-meta .ic-text .ico { width: 26px; height: 26px; border-radius: 8px; }
.pr-det { margin: 8px 0 0; max-width: 60em; white-space: pre-line; }
.pj-logo.lg { width: 72px; height: 72px; border-radius: 22px; }
.pj-logo.lg .pj-ini { font-size: 24px; }

/* tarjetas del tablero de un proyecto */
.tc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; min-height: 24px; }
.tg { font: 700 11px var(--f); letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.tg.t-servicio { background: var(--vio-soft); color: var(--vio); }
.tg.t-actividad { background: #dff0fd; color: #1b7bbf; }
.tg.t-tarea { background: var(--mint-soft); color: var(--pos); }
.tc-t { font: 600 14px var(--f); line-height: 1.35; overflow-wrap: anywhere; }
.tc.done .tc-t { text-decoration: line-through; color: var(--mute); }
.tc-d { color: var(--mute); font-size: 12.5px; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--dz-line); background: transparent; color: transparent; font: 800 13px/1 var(--f); cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .15s, border-color .15s; }
.chk:hover { border-color: var(--pos); color: var(--pos); }
.chk.on { background: var(--pos); border-color: var(--pos); color: #fff; }
.due { display: inline-block; margin-top: 8px; font: 700 11.5px var(--f); padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--mute); }
.due.late { background: var(--coral-soft); color: var(--neg); }
.due.today { background: var(--sun-soft); color: var(--warn); }
.chkrow { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.tiles.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .tiles.t3 { grid-template-columns: 1fr; } .bd-col { flex-basis: 84vw; max-width: 84vw; } }
.bd-col { flex: 1 0 300px; max-width: 380px; }
.bd-col.bd-new { flex: 0 0 280px; }
@media (max-width: 640px) { .bd-col { flex-basis: 84vw; max-width: 84vw; } }

/* ---------- Pestañas de un proyecto y servicios con precio ---------- */
.tabs { display: flex; gap: 6px; padding: 4px; margin: 0 0 18px; border-radius: 18px; background: var(--soft); width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: transparent; color: var(--mute); font: 700 14px var(--f); padding: 9px 18px; border-radius: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tab em { font-style: normal; font-size: 12px; opacity: .7; margin-left: 4px; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--card); color: var(--vio); box-shadow: var(--shadow); }
.tab:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.sv-card { background: var(--card); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.sv-top { display: flex; align-items: flex-start; gap: 8px; }
.sv-top h4 { flex: 1; min-width: 0; font: 700 16px var(--disp); line-height: 1.25; overflow-wrap: anywhere; }
.sv-act { display: flex; flex: none; }
.sv-act .ib { width: 30px; height: 30px; margin-left: 0; }
.sv-precio { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sv-precio b { font: 800 20px var(--disp); letter-spacing: -.02em; }
.sv-desc { margin: 0; color: var(--mute); font-size: 13.5px; white-space: pre-line; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }
.fsec .grid.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .fsec .grid.grid3 { grid-template-columns: 1fr; } }

/* ---------- Respaldo ---------- */
.rs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 860px) { .rs-grid { grid-template-columns: 1fr; } }
.rs-card { display: flex; flex-direction: column; gap: 16px; }
.rs-hd { display: flex; gap: 14px; align-items: center; }
.rs-hd h2 { font: 800 19px var(--disp); margin: 0; }
.rs-hd p { margin: 3px 0 0; font-size: 13.5px; }
.rs-ic { flex: none; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6a4dff, #43aef5); box-shadow: 0 10px 22px rgba(90, 63, 255, .3); }
.rs-ic.alt { background: linear-gradient(135deg, #0fbf88, #43aef5); box-shadow: 0 10px 22px rgba(15, 191, 136, .28); }
.rs-ic .lc { width: 26px; height: 26px; }
.rs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rs-stats.compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.rs-st { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 18px; background: var(--soft); min-width: 0; }
.rs-st b { font: 800 22px var(--disp); letter-spacing: -.02em; line-height: 1.1; }
.rs-st small { color: var(--mute); font-size: 12px; font-weight: 600; }
.rs-st.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
.rs-st.wide b { font-size: 18px; }
.rs-si { width: 30px; height: 30px; border-radius: 10px; background: var(--vio-soft); color: var(--vio); display: grid; place-items: center; margin-bottom: 4px; flex: none; }
.rs-st.wide .rs-si { margin: 0; }
.rs-si .lc { width: 17px; height: 17px; }
.rs-sk { height: 92px; border-radius: 18px; background: linear-gradient(90deg, var(--soft), var(--vio-soft), var(--soft)); background-size: 200% 100%; animation: rs-sh 1.4s linear infinite; }
@keyframes rs-sh { to { background-position: -200% 0; } }
.rs-last { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 16px; background: var(--soft); font-size: 13.5px; font-weight: 600; }
.rs-last .lc, .rs-note .lc { width: 18px; height: 18px; flex: none; }
.rs-last.ok { background: var(--mint-soft); color: var(--pos); }
.rs-last.warn, .rs-note.warn { background: var(--sun-soft); color: var(--warn); }
.rs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; align-self: flex-start; text-decoration: none; }
.rs-btn .lc { width: 18px; height: 18px; }
.rs-card .hint { margin: 0; }
.rs-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 34px 20px; border-radius: 26px; border: 2px dashed var(--dz-line); background: var(--soft); cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.rs-drop:hover, .rs-drop:focus-visible { border-color: var(--vio); background: var(--vio-soft); outline: none; }
.rs-drop.over { border-style: solid; border-color: var(--vio); background: var(--vio-soft); transform: scale(1.015); }
.rs-drop b { font: 700 17px var(--disp); }
.rs-up-ic { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0fbf88, #43aef5); box-shadow: 0 12px 26px rgba(15, 191, 136, .3); margin-bottom: 6px; transition: transform .2s; }
.rs-up-ic .lc { width: 32px; height: 32px; }
.rs-drop:hover .rs-up-ic, .rs-drop.over .rs-up-ic { transform: translateY(-5px); }
.rs-err { padding: 11px 14px; border-radius: 14px; background: var(--coral-soft); color: var(--neg); font-size: 13.5px; font-weight: 600; margin-top: 10px; }
.rs-busy, .rs-done { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 16px; }
.rs-busy b, .rs-done b { font: 700 17px var(--disp); }
.rs-spin { width: 44px; height: 44px; color: var(--vio); animation: rs-giro 1s linear infinite; }
.rs-spin .lc { width: 44px; height: 44px; }
@keyframes rs-giro { to { transform: rotate(360deg); } }
.rs-bar { width: min(260px, 80%); height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.rs-bar i { display: block; width: 40%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6a4dff, #43aef5); animation: rs-bar 1.2s ease-in-out infinite; }
@keyframes rs-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.rs-ok { width: 60px; height: 60px; color: var(--pos); }
.rs-ok .lc { width: 60px; height: 60px; }
.rs-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--soft); }
.rs-fi { width: 46px; height: 46px; border-radius: 15px; background: var(--vio-soft); color: var(--vio); display: grid; place-items: center; flex: none; }
.rs-fi .lc { width: 24px; height: 24px; }
.rs-fn { flex: 1; min-width: 0; }
.rs-fn b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-fn small { color: var(--mute); font-size: 12.5px; }
.rs-file .ib { width: 32px; height: 32px; margin: 0; }
.rs-file .ib .lc { width: 16px; height: 16px; }
.rs-sub { font: 700 11px var(--f); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.rs-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 16px; background: var(--mint-soft); color: var(--pos); font-size: 13.5px; font-weight: 600; }
.rs-note .lc { margin-top: 1px; }
.rs-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rs-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
@media (max-width: 760px) { .rs-steps { grid-template-columns: 1fr; } }
.rs-steps > div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); font-size: 13.5px; color: var(--mute); }
.rs-steps b { flex: none; width: 28px; height: 28px; border-radius: 10px; background: var(--vio-soft); color: var(--vio); display: grid; place-items: center; font: 800 14px var(--disp); }
.rs-steps strong { color: var(--ink); }
#rz { display: flex; flex-direction: column; gap: 14px; }
.rs-stats.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rs-stats.compact .rs-st:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
.rs-stats.compact .rs-st:last-child:nth-child(3n+2) { grid-column: span 2; }
@media (max-width: 480px) {
  .rs-stats, .rs-stats.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-stats.compact .rs-st:last-child:nth-child(3n+1), .rs-stats.compact .rs-st:last-child:nth-child(3n+2) { grid-column: auto; flex-direction: column; align-items: stretch; }
  .rs-stats.compact .rs-st:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Tableros: las columnas bajan a la siguiente fila cuando no caben (sin desplazamiento horizontal) */
.bd { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 14px; align-items: start; overflow: visible; scroll-snap-type: none; padding: 4px 0 18px; }
.bd-col, .bd-col.bd-new { flex: none; max-width: none; min-width: 0; }
.bd > .card { grid-column: 1 / -1; }

/* ---------- Menú: barra flotante en pantallas anchas; en celular barra inferior con "Más" ---------- */
.dock .lb { display: none; }
.dock .mas { display: none; }
.hoja { display: none; }
.dock button.mas { border: 0; font: inherit; cursor: pointer; }
.hoja-p svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  .dock { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); transform: none; max-width: none; width: auto; padding: 6px; gap: 4px; justify-content: space-between; overflow: visible; border-radius: 24px; }
  .dock .sep, .dock a.sec { display: none; }
  .dock a, .dock .mas { flex: 1 1 0; min-width: 0; width: auto; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 17px; font: 600 10.5px var(--f); color: #b9b4e6; background: rgba(255, 255, 255, .06); }
  .dock svg { width: 21px; height: 21px; }
  .dock .lb { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1; }
  .dock .mas.on { background: linear-gradient(135deg, #6a4dff, #43aef5); color: #fff; box-shadow: 0 8px 22px rgba(90, 63, 255, .55); }
  .main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .hoja { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 8, 30, .55); backdrop-filter: blur(3px); }
  .hoja[hidden] { display: none; }
}
.hoja-p { width: 100%; max-width: 520px; background: var(--card); border-radius: 28px 28px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); animation: hoja-sube .22s ease-out; }
@keyframes hoja-sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.hoja-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hoja-h b { font: 800 18px var(--disp); }
.hoja-h .ib { width: 34px; height: 34px; margin: 0; }
@media (max-width: 700px) { .dock button.mas { font: 600 10.5px var(--f); } }

/* =====================================================================
   Diseño unificado: controles de formulario, filtros, tablas y ventanas
   ===================================================================== */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }

/* Desplegables y números con el mismo aspecto que el resto de campos */
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8ac0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
select:focus { background-color: var(--card); }
select:disabled, input:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=date], input[type=month] { min-height: 44px; }
input::placeholder, textarea::placeholder { color: var(--mute); opacity: .75; }

/* Interruptor (reemplaza las casillas) */
.sw { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none; min-height: 44px; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.sw-t { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line); transition: background .18s; }
.sw-t::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(20, 14, 60, .3); transition: transform .18s; }
.sw input:checked + .sw-t { background: var(--vio); }
.sw input:checked + .sw-t::after { transform: translateX(18px); }
.sw input:focus-visible + .sw-t { outline: 2.5px solid var(--vio); outline-offset: 2px; }

/* Selector de período en botones */
.segsel { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segsel::-webkit-scrollbar { display: none; }
.segsel button { flex: 1 0 auto; border: 0; background: transparent; color: var(--mute); font: 700 13.5px var(--f); padding: 8px 14px; border-radius: 12px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.segsel button:hover { color: var(--ink); }
.segsel button.on { background: var(--card); color: var(--vio); box-shadow: var(--shadow); }
.segsel button:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 1px; }
.filters .segsel { background: transparent; padding: 0; }
.filters .segsel button.on { background: var(--vio-soft); box-shadow: none; }

/* Barra de filtros y totales */
.tb { align-items: flex-end; }
.tb > .btn { align-self: flex-end; min-height: 44px; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.totals > div { display: flex; flex-direction: column; gap: 2px; }

/* Papelera */
.pp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--soft); margin-bottom: 10px; }
.pp-ic .ico { width: 42px; height: 42px; border-radius: 14px; }
.pp-m { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pp-t { font: 700 11px var(--f); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.pp-m b { font: 700 15px var(--disp); overflow-wrap: anywhere; }
.pp-m small, .pp-d small { color: var(--mute); font-size: 12.5px; }
.pp-d { text-align: right; display: flex; flex-direction: column; }
.pp-d b { font: 800 15px var(--disp); }
.pp-a { display: flex; gap: 4px; }
.pp-a .ib { margin: 0; }

/* Tablets: la barra de filtros pasa a rejilla */
@media (max-width: 900px) {
  .tb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb > div { min-width: 0; }
  .tb .grow { grid-column: 1 / -1; max-width: none !important; }
  .tb > div:has(.segsel) { grid-column: 1 / -1; }
  .tb > .btn { width: 100%; }
}

/* Celulares: las tablas se vuelven tarjetas y las ventanas suben desde abajo */
@media (max-width: 900px) {
  .sc { overflow: visible; }
  table.rt, .rt tbody { display: block; }
  .rt thead { display: none; }
  .rt tr { display: grid; gap: 2px; padding: 12px 14px; margin-bottom: 10px; background: var(--soft); border-radius: 18px; }
  .rt td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 6px 0; border: 0; text-align: right; }
  .rt td::before { content: attr(data-label); flex: none; color: var(--mute); font: 700 11px var(--f); letter-spacing: .07em; text-transform: uppercase; text-align: left; }
  .rt td:not([data-label])::before { content: none; }
  .rt td.actions { justify-content: flex-end; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); }
  .rt td.actions .ib { margin-left: 6px; width: 40px; height: 40px; }
  .rt td .ic-text { text-align: right; }
}
@media (max-width: 760px) {
  .pp { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pp-d { grid-column: 2 / 3; text-align: left; flex-direction: row; gap: 10px; align-items: baseline; flex-wrap: wrap; }
  .pp-a { grid-column: 3 / 4; grid-row: 1 / 3; }
}
@media (max-width: 640px) {
  .backdrop { align-items: end; padding: 0; }
  .modal, .modal.wide, .modal.xl { max-width: none; width: 100%; max-height: 92vh; border-radius: 28px 28px 0 0; padding: 22px 20px 0; animation: hoja-sube .22s ease-out; }
  .modal h2 { font-size: 20px; }
  .modal-actions { position: sticky; bottom: 0; z-index: 3; margin: 16px -20px 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -10px 22px var(--card); }
  .modal-actions .btn { flex: 1 1 auto; }
  .fsec h3 small { display: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .page-head { align-items: flex-start; }
}
@media (max-width: 900px) {
  .tb > div:has(input[type=month]) { grid-column: 1 / -1; }
  .segsel { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .segsel button { padding: 9px 4px; font-size: 13px; }
  .filters .segsel { width: auto; flex: 1; }
}
.pp .ib, .rt .ib { background: var(--card); }
.pp .ib:hover, .rt .ib:hover { background: var(--vio-soft); }
.pp .ib.r:hover, .rt .ib.r:hover { background: var(--coral-soft); }
#ttipo.off { opacity: .45; pointer-events: none; }

/* Tablet: las tarjetas de las tablas van en dos columnas */
@media (min-width: 640px) and (max-width: 900px) {
  .rt tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .rt tr { margin: 0; }
}
/* Filtros del Resumen en celular: cada control ocupa su fila */
@media (max-width: 700px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-radius: 22px; }
  .filters .segsel, .filters input[type=month], .filters #g1, .filters #g2 { grid-column: 1 / -1; }
  .filters #g1, .filters #g2 { grid-column: auto; }
  .filters input { width: 100%; }
}.chip { padding: 6px 14px; min-height: 32px; }
.chips { gap: 8px; }

/* Ingreso: contraseña con ojo */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-ver { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--mute); cursor: pointer; display: grid; place-items: center; }
.pw-ver:hover { background: var(--vio-soft); color: var(--vio); }
.pw-ver[aria-pressed=true] { color: var(--vio); }
.pw-ver svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.login-card form > div { margin-bottom: 14px; }

/* Pulido general: táctil, teclado del celular y movimiento reducido */
@media (pointer: coarse) {
  .ib { width: 42px; height: 42px; }
  .btn.sm { min-height: 40px; }
  .chip { min-height: 36px; }
  .tab { min-height: 44px; }
}
@media (max-width: 700px) {
  input, select, textarea { font-size: 16px; } /* evita el acercamiento automático de iOS al enfocar un campo */
  .login-wrap { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Ajustes finos de la revisión de pantallas */
.rt td { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 901px) and (max-width: 1180px) {
  .rt th[data-label="Facturas"], .rt td[data-label="Facturas"], .rt th[data-label="Modo de pago"], .rt td[data-label="Modo de pago"],
  .rt th[data-label="País"], .rt td[data-label="País"], .rt th[data-label="Desde"], .rt td[data-label="Desde"] { display: none; }
}
@media (max-width: 560px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tab { padding: 9px 8px; font-size: 13px; white-space: normal; line-height: 1.2; }
}
@media (max-width: 400px) {
  .num-t { flex-wrap: wrap; gap: 6px 12px; }
  .num-t .d { margin-left: 0; }
}
.pill { white-space: nowrap; }


/* ---------- Formulario de venta por pasos ---------- */
.modal.xl { padding-bottom: 0; }
.mh { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mh h2 { margin: 0; }
.mh .ib { font-size: 16px; font-weight: 700; color: var(--mute); }
.stp { display: flex; gap: 4px; margin: 0 0 18px; padding: 4px; border-radius: 18px; background: var(--soft); }
.stp-b { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 8px; border: 0; border-radius: 14px; background: transparent; color: var(--mute); font: 700 13.5px var(--f); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.stp-b i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--card); font: 800 12px var(--disp); font-style: normal; flex: none; }
.stp-b:hover { color: var(--ink); }
.stp-b.on { background: var(--vio); color: #fff; box-shadow: 0 6px 16px rgba(90, 63, 255, .28); }
.stp-b.on i { background: rgba(255, 255, 255, .25); color: #fff; }
.stp-b.done i { background: var(--mint-soft); color: var(--pos); font-size: 0; }
.stp-b.done i::before { content: '✓'; font: 800 12px var(--disp); }
.stp-b:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.fstep:not([hidden]) { animation: paso-in .2s ease-out; }
@keyframes paso-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vfoot { position: sticky; bottom: 0; z-index: 3; margin: 18px -26px 0; padding: 12px 26px 16px; background: var(--card); border-top: 1px solid var(--line); }
.vfoot .modal-actions { margin: 0; flex-wrap: nowrap; }
.vfoot .sp { flex: 1 1 auto; }
.vmsg { margin: 0; }
.vmsg:not(:empty) { margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: var(--coral-soft); color: var(--neg); font-weight: 600; }
@media (max-width: 640px) {
  .stp-b span { display: none; }
  .stp-b.on { flex: 2 1 0; }
  .stp-b.on span { display: inline; }
  .vfoot { margin: 16px -20px 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); }
  .vfoot .modal-actions { position: static; margin: 0; padding: 0; box-shadow: none; background: none; }
  .vfoot .sp { display: none; }
  .vfoot .modal-actions .btn { flex: 1 1 0; padding-inline: 10px; }
}

/* ---------- Ruta del dinero y pasos de comisión ---------- */
.tiles.rt5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .tiles.rt5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .tiles.rt5 { grid-template-columns: 1fr; } }
.ps-list { display: grid; gap: 10px; margin-top: 14px; }
.ps-list:empty { display: none; }
.ps { border-radius: 18px; background: var(--soft); border: 2px solid transparent; transition: border-color .15s; }
.ps.warn { border-color: var(--sun); }
.ps-l { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; border-radius: 16px; }
.ps-l:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.ps-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--vio); color: #fff; font: 800 13px var(--disp); flex: none; }
.ps.warn .ps-n { background: var(--sun); color: #3b2a00; }
.ps-t { flex: 1 1 auto; min-width: 0; }
.ps-t b { display: block; font: 700 14.5px var(--disp); overflow-wrap: anywhere; }
.ps-t small { display: block; margin-top: 1px; color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; }
.ps.warn .ps-t small { color: var(--warn); font-weight: 600; }
.ps-m { flex: none; font: 800 14.5px var(--disp); text-align: right; white-space: nowrap; }
.ps-ed { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--mute); }
.ps-ed svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ps.open .ps-ed { background: var(--vio-soft); color: var(--vio); }
.ps:not(.open) .ps-e { display: none; }
.ps-e { display: grid; gap: 14px; padding: 2px 14px 14px; }
.ps-e input { background: var(--card); }
.ps .seg-mini span { padding: 7px 14px; }
.ps-x { display: flex; justify-content: space-between; gap: 8px; }
.com-b { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.com-b .f-nom { grid-column: 1 / -1; }
@media (max-width: 640px) { .com-b { grid-template-columns: 1fr; } }
.com-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.com-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.com-sum:has(.mu) { display: block; padding: 12px 16px; border-radius: 16px; background: var(--soft); }
.cs { display: grid; gap: 2px; padding: 12px 16px; border-radius: 16px; background: var(--soft); min-width: 0; }
.cs span { font: 600 12.5px var(--f); color: var(--mute); }
.cs b { font: 800 20px var(--disp); overflow-wrap: anywhere; }
.cs small { color: var(--mute); font-size: 12px; }
.cs.net { background: var(--mint-soft); }
.cs.net b { color: var(--pos); }
.cs.net.neg { background: var(--coral-soft); }
.cs.net.neg b { color: var(--neg); }
@media (max-width: 440px) { .com-sum { grid-template-columns: 1fr; } }

/* ---------- Selector compacto (cliente existente/nuevo, persona/empresa) ---------- */
.pills { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--soft); max-width: 100%; }
.pills label { position: relative; margin: 0; cursor: pointer; }
.pills input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.pills span { display: block; padding: 9px 18px; border-radius: 12px; color: var(--mute); font: 700 14px var(--f); white-space: nowrap; transition: background .15s, color .15s; }
.pills label:hover span { color: var(--ink); }
.pills input:checked + span { background: var(--card); color: var(--vio); box-shadow: var(--shadow); }
.pills input:focus-visible + span { outline: 2.5px solid var(--vio); outline-offset: 1px; }
.cli-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.cli-top .tgrp, .tgrp:has(> .pills) { margin: 0; }
.tgrp > .pills { margin-bottom: 14px; }
.cli-top .tgrp > .pills { margin-bottom: 0; }
@media (max-width: 440px) { .pills span { padding: 9px 12px; font-size: 13.5px; } .cli-top .pills { width: 100%; } .cli-top .pills label { flex: 1 1 0; } .cli-top .pills span { text-align: center; } }
/* ---------- Menú de la cuenta (cabecera) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acct { position: relative; }
.acct-b { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px 6px 4px 12px; border-radius: 999px; cursor: pointer; color: var(--ink); font: 600 14px var(--f); text-align: right; transition: background .15s; }
.acct-b:hover, .acct-b[aria-expanded=true] { background: var(--card); box-shadow: var(--shadow); }
.acct-b:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.acct-t { display: block; }
.acct-t small { display: block; color: var(--mute); font-weight: 500; font-size: 12px; line-height: 1.1; }
.acct-ch { width: 16px; height: 16px; stroke: var(--mute); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.acct-b[aria-expanded=true] .acct-ch { transform: rotate(180deg); }
.acct-m { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 300px; max-width: calc(100vw - 28px); padding: 8px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(20, 14, 60, .3); animation: paso-in .15s ease-out; }
.acct-h { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 6px; border-radius: 16px; background: var(--soft); }
.acct-h > div { min-width: 0; }
.acct-h b { display: block; font: 700 15px var(--disp); overflow-wrap: anywhere; }
.acct-h small { display: block; color: var(--mute); font-size: 12.5px; margin: 1px 0 5px; overflow-wrap: anywhere; }
.av.lg { width: 46px; height: 46px; font-size: 16px; }
.av.xl { width: 64px; height: 64px; font-size: 22px; }
.acct-m a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; font: 600 14.5px var(--f); }
.acct-m a:hover, .acct-m a:focus-visible { background: var(--soft); outline: 0; }
.acct-m .mi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--vio-soft); color: var(--vio); flex: none; }
.acct-m .mi svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.acct-m a.out { color: var(--neg); }
.acct-m a.out .mi { background: var(--coral-soft); color: var(--neg); }
@media (max-width: 640px) { .acct-b { padding: 2px; } .acct-ch, .acct-t { display: none; } }

/* ---------- Página Mi cuenta ---------- */
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.acc-card form { display: grid; gap: 14px; }
.acc-id { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.acc-id h2 { margin: 0 0 4px; font-size: 19px; }
.ico-b { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--vio-soft); color: var(--vio); flex: none; }
.ico-b svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acc-meta { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 14px; }
.acc-act { display: flex; }
.acc-out { margin: 4px 0 24px; }
@media (max-width: 800px) { .acc-grid { grid-template-columns: 1fr; } .acc-act .btn { width: 100%; justify-content: center; } .acc-out .btn { width: 100%; justify-content: center; } }

/* ---------- Avatar con foto ---------- */
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Mi cuenta: pestañas y perfil tipo red social ---------- */
.acc-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.acc-tabs a { padding: 9px 18px; border-radius: 12px; color: var(--mute); font: 700 14px var(--f); text-decoration: none; white-space: nowrap; }
.acc-tabs a:hover { color: var(--ink); }
.acc-tabs a.on { background: var(--vio-soft); color: var(--vio); }
.pf { margin-bottom: 18px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.pf-banner { position: relative; height: 260px; background: linear-gradient(120deg, var(--vio), var(--sky)) center / cover no-repeat; }
.pf-banner:not(.con)::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .22), transparent 45%); }
.pf-cam { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: 700 13.5px var(--f); color: var(--ink); background: var(--card); box-shadow: 0 4px 14px rgba(20, 14, 60, .25); z-index: 2; }
.pf-cam svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pf-cam:hover { background: var(--vio-soft); color: var(--vio); }
.pf-cam:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.pf-cam.bn { position: absolute; right: 16px; bottom: 16px; padding: 9px 16px; border-radius: 999px; }
.pf-cam.av { position: absolute; right: 4px; bottom: 6px; width: 40px; height: 40px; justify-content: center; border-radius: 50%; padding: 0; }
.pf-head { display: flex; align-items: flex-end; gap: 20px; padding: 0 28px 24px; margin-top: -70px; position: relative; }
.pf-av { position: relative; flex: none; }
.pf-av .av.xl { width: 148px; height: 148px; font-size: 46px; border: 5px solid var(--card); }
.pf-name { flex: 1; min-width: 0; padding-bottom: 6px; }
.pf-name h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.pf-name p { margin: 6px 0 0; }
.pf-dl { margin: 8px 0 0; }
.pf-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.pf-dl > div:last-child { border-bottom: 0; }
.pf-dl dt { color: var(--mute); }
.pf-dl dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ico-b.on { background: var(--mint-soft); color: var(--pos); }
.acc-act.wrap { flex-wrap: wrap; gap: 8px; }
.im-prev { display: grid; place-items: center; overflow: hidden; background: var(--soft); margin: 4px auto 0; }
.im-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-prev.foto { width: 200px; height: 200px; border-radius: 50%; }
.im-prev.banner { width: 100%; aspect-ratio: 3 / 1; border-radius: 18px; }
@media (max-width: 800px) {
  .pf-banner { height: 170px; }
  .pf-head { flex-wrap: wrap; padding: 0 18px 20px; margin-top: -52px; gap: 12px 16px; }
  .pf-av .av.xl { width: 104px; height: 104px; font-size: 34px; border-width: 4px; }
  .pf-cam.av { width: 34px; height: 34px; right: 0; bottom: 2px; }
  .pf-name { flex-basis: 100%; padding-bottom: 0; }
  .pf-head > .btn { width: 100%; justify-content: center; }
  .pf-cam.bn span { display: none; }
  .pf-cam.bn { padding: 10px; }
}

/* ---------- Código de verificación ---------- */
.code-in { font: 700 30px var(--disp); letter-spacing: .38em; text-align: center; padding-left: calc(.38em + 16px); }
.vf-t { font-size: 22px; font-weight: 800; margin: 4px 0 8px; }
.vf-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.vf-alt .lnk, .lnk { background: none; border: 0; padding: 4px 0; color: var(--vio); font: 700 14px var(--f); cursor: pointer; text-decoration: none; }
.vf-alt .lnk:hover { text-decoration: underline; }
.login-card .ok-msg { background: var(--mint-soft); color: var(--pos); padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.login-card form > .sw { margin: 2px 0 16px; }

/* ---------- Notificaciones: campana, panel y página ---------- */
.ntf { position: relative; }
.ntf-b { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; transition: background .15s, color .15s; }
.ntf-b svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ntf-b:hover, .ntf-b[aria-expanded=true] { background: var(--vio-soft); color: var(--vio); }
.ntf-b:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.ntf-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--coral); color: #fff; font: 800 11px/20px var(--disp); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.ntf-p { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 390px; max-width: calc(100vw - 28px); border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(20, 14, 60, .3); animation: paso-in .15s ease-out; }
.ntf-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.ntf-h b { font: 800 16px var(--disp); }
.ntf-h .lnk { font-size: 13px; }
.ntf-l { max-height: min(62vh, 430px); overflow-y: auto; padding: 4px 8px; }
.ntf-v { padding: 28px 12px; text-align: center; color: var(--mute); font-size: 14px; }
.ntf-f { display: block; margin: 4px 8px 8px; padding: 12px; border-radius: 14px; background: var(--soft); color: var(--vio); font: 700 13.5px var(--f); text-align: center; text-decoration: none; }
.ntf-f:hover { background: var(--vio-soft); }
.ni { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.ni:hover, .ni:focus-visible { background: var(--soft); outline: 0; }
.ni-i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--vio-soft); color: var(--vio); }
.ni.danger .ni-i { background: var(--coral-soft); color: var(--neg); }
.ni.warn .ni-i { background: var(--sun-soft); color: var(--warn); }
.ni-i svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ni-t { flex: 1; min-width: 0; }
.ni-t b { display: block; font: 700 14px var(--disp); overflow-wrap: anywhere; }
.ni-t small { display: block; margin-top: 1px; color: var(--mute); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.ni.read { opacity: .6; }
.ni.read .ni-t b { font-weight: 600; }
.ni-d { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--vio); }
.ni.danger .ni-d { background: var(--neg); }
.ntf-g { margin-bottom: 22px; }
.ntf-gt { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 800 15px var(--disp); }
.ntf-gt span { padding: 1px 9px; border-radius: 999px; background: var(--vio-soft); color: var(--vio); font: 700 12px var(--f); }
.ntf-gt.danger span { background: var(--coral-soft); color: var(--neg); }
.ntf-gt.warn span { background: var(--sun-soft); color: var(--warn); }
.ntf-gl { padding: 6px 10px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.ntf-gl .ni { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
.ntf-gl .ni:last-child { border-bottom: 0; }
.ntf-gl .ni:hover { background: var(--soft); border-radius: 14px; }
@media (max-width: 640px) {
  .ntf { position: static; }
  .ntf-p { position: fixed; left: 10px; right: 10px; top: 68px; width: auto; max-width: none; }
  .top { gap: 10px; }
}

/* ---------- Hoja del menú en celular: todo el menú, mosaicos pequeños y parejos ---------- */
.hoja-p { max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
.hoja-t { margin: 14px 2px 8px; color: var(--mute); font: 700 11px var(--f); letter-spacing: .09em; }
.hoja-h + .hoja-t { margin-top: 0; }
.hoja-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hoja-i { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 10px 2px 9px; border-radius: 16px; background: var(--soft); color: var(--ink); text-decoration: none; font: 600 11px var(--f); text-align: center; line-height: 1.2; }
.hoja-i.on { background: var(--vio-soft); color: var(--vio); }
.hoja-ic { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--card); color: var(--vio); }
.hoja-ic svg { width: 20px; height: 20px; }
.hoja-i.out { color: var(--neg); }
.hoja-i.out .hoja-ic { color: var(--neg); background: var(--coral-soft); }
.hoja-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--coral); color: #fff; font: 800 10px/18px var(--disp); text-align: center; box-shadow: 0 0 0 2px var(--soft); }
@media (max-width: 370px) { .hoja-g { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hoja-i { font-size: 11.5px; } }
/* ---------- Cargo de solo lectura (contadora): se ocultan los controles que crean, editan o borran ---------- */
.ro:not(.rw) #nuevo, .ro #nuevo-serv, .ro:not(.rw) #cp, .ro #edit, .ro:not(.rw) #provs,
.ro:not(.rw) [data-e], .ro [data-d], .ro:not(.rw) [data-p], .ro [data-a], .ro [data-ap], .ro [data-dp], .ro:not(.rw) [data-ed],
.ro [data-rf], .ro [data-se], .ro [data-sd], .ro [data-add], .ro [data-addlist], .ro [data-newlist], .ro [data-lm], .ro [data-comp] { display: none !important; }
.ro [data-chk] { pointer-events: none; }
.ro .bd-card { cursor: pointer; }
/* ---------- Resumen: lo que hay en el banco ---------- */
.bank { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.bk { display: grid; gap: 4px; padding: 20px 24px; border-radius: 26px; background: var(--mint-soft); color: var(--ink); min-width: 0; }
.bk.usd { background: var(--vio-soft); }
.bk .l { font: 700 13.5px var(--f); color: var(--mute); }
.bk .v { font: 800 clamp(26px, 4vw, 38px) var(--disp); letter-spacing: -.02em; overflow-wrap: anywhere; }
.bk.sol .v { color: var(--pos); }
.bk.usd .v { color: var(--vio); }
.bk .v.neg { color: var(--neg); }
.bk small { color: var(--mute); font-size: 12.5px; }
@media (max-width: 640px) { .bank { grid-template-columns: 1fr; gap: 10px; } .bk { padding: 16px 18px; } }
/* ---------- Facturas de compras ---------- */
.tb2 { margin-top: -4px; gap: 10px 22px; }
.tb2 .tl { display: block; margin-bottom: 6px; font: 600 12.5px var(--f); color: var(--mute); }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mav { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--vio); color: #fff; overflow: hidden; flex: none; }
.mav i { font: 800 10.5px var(--disp); font-style: normal; }
.mav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vbox { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--soft); border: 2px solid transparent; }
.vbox.verificada { border-color: var(--mint); }
.vbox.observada { border-color: var(--coral); }
.vbox-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vbox-m { margin: 8px 0 10px; color: var(--mute); font-size: 13.5px; }
.vbox textarea { min-height: 62px; background: var(--card); }
.vbox-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fsub { display: block; margin-top: 2px; color: var(--mute); font-size: 12px; font-weight: 500; line-height: 1.3; }

/* ---------- Documentos ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.doc-grid .empty { grid-column: 1 / -1; }
.doc { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--soft); min-width: 0; }
.doc-h { display: flex; align-items: flex-start; gap: 12px; }
.doc-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--vio-soft); color: var(--vio); flex: none; }
.doc-ic svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.doc-t { flex: 1; min-width: 0; }
.doc-t b { display: block; font: 700 15.5px var(--disp); overflow-wrap: anywhere; }
.doc-t small { display: block; margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.doc-a { display: flex; flex: none; }
.doc-d { margin: 0; color: var(--ink); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-f { display: grid; gap: 6px; }
.dfile { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 14px; background: var(--card); min-width: 0; }
.dfile-i { flex: none; padding: 2px 8px; border-radius: 8px; background: var(--vio-soft); color: var(--vio); font: 800 10.5px var(--f); letter-spacing: .04em; text-transform: uppercase; }
.dfile-n { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfile .ib { margin: 0; flex: none; text-decoration: none; }
.doc-m { color: var(--mute); font-size: 12px; }
@media (max-width: 800px) { .doc-grid { grid-template-columns: 1fr; } }
/* ---------- Actividad (registro de quién hizo qué) ---------- */
.ev-list { display: grid; gap: 0; }
.ev-dia { margin: 18px 0 8px; font: 800 14px var(--disp); color: var(--mute); text-transform: capitalize; }
.ev-dia:first-child { margin-top: 4px; }
.ev { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-t { font: 700 13.5px var(--disp); color: var(--mute); padding-top: 2px; }
.ev-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ev-d { margin: 6px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }
.ev-ip { display: block; margin-top: 4px; color: var(--mute); font-size: 11.5px; }
.ev-x { margin-top: 8px; }
.ev-x summary { cursor: pointer; color: var(--vio); font: 700 13px var(--f); }
.ev-kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.ev-kv span { color: var(--mute); }
.ev-ch { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; }
.ev-ch th { text-align: left; color: var(--mute); font: 700 11px var(--f); text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px 4px 0; }
.ev-ch td { padding: 6px 8px 6px 0; vertical-align: top; overflow-wrap: anywhere; border-top: 1px solid var(--line); }
.ev-ch td:first-child { color: var(--mute); white-space: nowrap; }
.pill.v { background: var(--vio-soft); color: var(--vio); }
@media (max-width: 640px) { .ev { grid-template-columns: 1fr; gap: 4px; } .ev-t { padding-top: 0; } .ev-ch td:first-child { white-space: normal; } }

/* ---------- Equipo: avatares y personas ---------- */
.eqav { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 700 11.5px var(--disp); flex: none; overflow: hidden; box-shadow: 0 0 0 2px var(--card); vertical-align: middle; }
.eqav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eqav.sm { width: 24px; height: 24px; font-size: 10px; }
.eqav.lg { width: 52px; height: 52px; font-size: 18px; }
.eqav.more { background: var(--soft); color: var(--mute); }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.eq-card { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.eq-card.off { opacity: .6; }
.eq-id { flex: 1; min-width: 0; }
.eq-id h4 { font: 700 16px var(--disp); overflow-wrap: anywhere; }
.eq-rol { font-size: 13.5px; font-weight: 600; color: var(--vio); margin-top: 2px; }
.eq-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.eq-mail { font-size: 12.5px; margin-top: 6px; overflow-wrap: anywhere; }
.eq-roles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eq-r { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 999px; padding: 4px 6px 4px 14px; font-size: 14px; }
.eq-r em { font-style: normal; font-size: 12px; color: var(--mute); margin-left: 2px; }
.eq-r .ib { width: 28px; height: 28px; margin-left: 0; background: transparent; }
.eq-acc { margin-top: 16px; padding: 14px 16px 6px; border-radius: 18px; background: var(--soft); }
.eq-acc .sw { margin-bottom: 6px; }

/* ---------- Tarjetas del tablero ---------- */
.tc-etq { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tk-etq { display: inline-block; min-width: 38px; max-width: 100%; padding: 3px 10px; border-radius: 8px; color: #fff; font: 700 12px/1.25 var(--f); text-shadow: 0 1px 1px rgba(0, 0, 0, .18); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-etq.sm { min-width: 30px; padding: 2px 8px; font-size: 11px; }
.tc-row { display: flex; gap: 9px; align-items: flex-start; }
.tc-row .chk { margin-top: 1px; flex: none; }
.tc-t { flex: 1; min-width: 0; font: 600 14px/1.35 var(--f); overflow-wrap: anywhere; }
.tc-b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.tc-b .due { margin-top: 0; }
.tc-bd { display: inline-flex; align-items: center; gap: 4px; font: 700 12px var(--f); color: var(--mute); }
.tc-bd svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tc-bd.ok { color: var(--pos); }
.tc-av { margin-left: auto; display: inline-flex; padding-left: 6px; }
.tc-av .eqav, .tl-av .eqav { margin-left: -6px; }
.due.ok { background: var(--mint-soft); color: var(--pos); }
.chk[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.chk.lg { width: 34px; height: 34px; font-size: 17px; margin-top: 4px; flex: none; }

/* ---------- Ventana de la tarjeta ---------- */
.modal.tk-modal { max-width: 1040px; padding: 22px 24px; }
.tk-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.tk-ti { flex: 1; min-width: 0; }
.tk-ti h2 { margin: 2px 0 4px; font-size: 24px; overflow-wrap: anywhere; }
.tk-ti textarea { width: 100%; resize: none; border: 2px solid transparent; background: transparent; font: 800 24px/1.2 var(--disp); letter-spacing: -.02em; padding: 4px 8px; margin: 0 0 2px -8px; border-radius: 12px; overflow: hidden; }
.tk-ti textarea:hover { background: var(--soft); }
.tk-ti textarea:focus { background: var(--card); border-color: var(--vio); outline: 0; }
.tk-sub { color: var(--mute); font-size: 13.5px; }
.tk-sub a { color: var(--vio); font-weight: 700; text-decoration: none; }
.tk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-bottom: 8px; }
.tk-g { min-width: 0; }
.tk-gl, .tk-s h3 { font: 700 12px var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 7px; }
.tk-s { margin-top: 22px; }
.tk-s h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tk-resp { display: inline-flex; align-items: center; gap: 7px; background: var(--soft); border-radius: 999px; padding: 3px 12px 3px 3px; font: 600 13.5px var(--f); }
.tk-resp.sm { font-size: 12.5px; padding-right: 10px; }
.tk-add { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); font: 700 18px/1 var(--f); cursor: pointer; }
.tk-add:hover, .tk-add[aria-expanded=true] { background: var(--vio); color: #fff; }
.tk-panel { margin-top: 10px; padding: 12px; border-radius: 16px; background: var(--soft); max-width: 460px; }
.tk-panel textarea, .tk-panel input:not([type=checkbox]):not([type=radio]) { background: var(--card); }
.tk-opt { display: flex; align-items: center; gap: 9px; padding: 6px 4px; margin: 0; cursor: pointer; font-weight: 600; }
.tk-opt input, .tk-eopt input { flex: none; width: 18px; height: 18px; accent-color: var(--vio); }
.tk-opt small { font-weight: 500; }
.tk-eopt { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.tk-eopt label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.tk-eopt label .tk-etq { flex: 1; padding: 7px 12px; }
.tk-eopt .ib { background: transparent; }
.tk-etqf { padding: 10px; margin: 6px 0; border-radius: 14px; background: var(--card); }
.tk-sw { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.tk-sw label { margin: 0; cursor: pointer; position: relative; }
.tk-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; }
.tk-sw span { display: block; width: 30px; height: 30px; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .08); }
.tk-sw input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.tk-sw input:focus-visible + span { outline: 2.5px solid var(--vio); outline-offset: 3px; }
.tk-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tk-dates { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.tk-dates label { margin: 0; font-size: 12px; color: var(--mute); font-weight: 600; }
.tk-dates input { display: block; width: 150px; margin-top: 3px; padding: 8px 10px; }
.tk-dates.ro { align-items: center; font-size: 14px; }
.tk-ok, .tk-late, .tk-today { font: 700 12px var(--f); padding: 4px 10px; border-radius: 999px; }
.tk-ok { background: var(--mint-soft); color: var(--pos); }
.tk-late { background: var(--coral-soft); color: var(--neg); }
.tk-today { background: var(--sun-soft); color: var(--warn); }
.tk-g select { padding: 8px 12px; min-width: 150px; }
.tk-desc { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 14.5px; }
.tk-desc a, .tk-bub a, .tk-itt a { color: var(--vio); }
.tk-lks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tk-lk { display: flex; gap: 10px; align-items: center; background: var(--soft); border-radius: 14px; padding: 8px 8px 8px 12px; }
.tk-lk a { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); display: grid; }
.tk-lk a b { font-size: 14px; overflow-wrap: anywhere; }
.tk-lk small { color: var(--mute); overflow-wrap: anywhere; }
.tk-lki svg { width: 18px; height: 18px; stroke: var(--vio); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tk-lk .ib { background: transparent; }
.tk-cl { margin-bottom: 20px; }
.tk-clh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tk-clh h4 { font: 700 15px var(--disp); overflow-wrap: anywhere; }
.tk-clh h4.ed { cursor: text; padding: 3px 6px; margin-left: -6px; border-radius: 8px; }
.tk-clh h4.ed:hover { background: var(--soft); }
.tk-clh input { flex: 1; }
.tk-pg { display: flex; align-items: center; gap: 10px; font: 700 12px var(--f); color: var(--mute); margin-bottom: 8px; }
.tk-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.tk-bar i { display: block; height: 100%; background: var(--vio); border-radius: 999px; transition: width .2s; }
.tk-its { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 2px; }
.tk-it { display: flex; gap: 10px; align-items: flex-start; padding: 7px 6px; border-radius: 12px; }
.tk-it:hover { background: var(--soft); }
.tk-it.dragging { opacity: .4; }
.tk-it > input { flex: none; width: 19px; height: 19px; margin-top: 2px; accent-color: var(--pos); }
.tk-ic { flex: 1; min-width: 0; }
.tk-itt { display: block; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.4; }
.tk-itt.ed { cursor: text; }
.tk-it.done .tk-itt { text-decoration: line-through; color: var(--mute); }
.tk-iti { width: 100%; }
.tk-im { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.tk-im select, .tk-im input { width: auto; min-width: 0; padding: 4px 8px; font-size: 12.5px; border-radius: 10px; }
.tk-im.ro .due { margin-top: 0; }
.tk-it > .ib { background: transparent; width: 30px; height: 30px; opacity: .55; }
.tk-it:hover > .ib { opacity: 1; }
.tk-peligro { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.tk-right h3 { font: 800 16px var(--disp); margin-bottom: 10px; }
.tk-cm { display: grid; gap: 8px; justify-items: start; margin-bottom: 16px; }
.tk-cm textarea { background: var(--soft); }
.tk-feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tk-co, .tk-ev { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.tk-ev time { display: block; color: var(--mute); font-size: 11.5px; margin-top: 2px; }
.tk-cw { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tk-cw time { color: var(--mute); font-size: 11.5px; }
.tk-bub { margin-top: 4px; padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.tk-x { margin-top: 4px; border: 0; background: none; color: var(--mute); font: 600 12px var(--f); cursor: pointer; padding: 2px 0; text-decoration: underline; }
.tk-x:hover { color: var(--neg); }
@media (max-width: 860px) {
  .tk-cols { grid-template-columns: 1fr; gap: 20px; }
  .modal.tk-modal { padding: 18px 16px; }
  .tk-ti h2, .tk-ti textarea { font-size: 20px; }
}

/* ---------- Tareas: lista por fecha ---------- */
.tl-g { margin-bottom: 22px; }
.tl-g h3 { font: 800 15px var(--disp); margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.tl-g h3 em { font: 700 12px var(--f); font-style: normal; background: var(--soft); color: var(--mute); border-radius: 999px; padding: 2px 9px; }
.tl-g h3.late { color: var(--neg); }
.tl-g h3.today { color: var(--warn); }
.tl-l { display: grid; gap: 8px; }
.tl-row { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .15s; }
.tl-row:hover { box-shadow: 0 0 0 2px var(--dz-line), var(--shadow); }
.tl-row:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.tl-row.done .tl-t { text-decoration: line-through; color: var(--mute); }
.tl-m { flex: 1; min-width: 0; }
.tl-t { font: 600 15px/1.35 var(--f); overflow-wrap: anywhere; }
.tl-s { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 5px; font-size: 12.5px; }
.tl-s .pill { padding: 2px 10px; font-size: 12px; }
.tl-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.tl-r .due { margin-top: 0; }
.tl-it { font: 700 12.5px var(--f); color: var(--mute); }
.tl-it.ok { color: var(--pos); }
.tl-av { display: inline-flex; padding-left: 6px; }
@media (max-width: 640px) { .tl-row { flex-wrap: wrap; } .tl-r { width: 100%; justify-content: flex-start; padding-left: 36px; } }

/* ---------- Calendario ---------- */
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-bar h3 { flex: 1; min-width: 150px; text-align: center; font: 800 18px var(--disp); text-transform: capitalize; }
.cal-bar .ib { font-size: 20px; margin-left: 0; }
.cal-sf { font-size: 12.5px; }
.cal-g { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cal-w, .cal-b { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-w span { padding: 8px 4px; text-align: center; font: 700 11.5px var(--f); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); background: var(--soft); }
.cal-d { min-height: 112px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--card); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-d:nth-child(7n + 1) { border-left: 0; }
.cal-d.out { background: var(--soft); }
.cal-d.out .cal-n { opacity: .45; }
.cal-d.over { box-shadow: inset 0 0 0 2px var(--vio); background: var(--vio-soft); }
.cal-d.sel { background: var(--vio-soft); }
.cal-n { font: 700 12.5px var(--f); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; align-self: flex-start; }
.cal-d.today .cal-n { background: var(--vio); color: #fff; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c, var(--vio)); background: color-mix(in srgb, var(--c, var(--vio)) 16%, var(--card)); color: var(--ink); font: 600 12px/1.3 var(--f); padding: 3px 6px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip[draggable=true] { cursor: grab; }
.cal-chip:hover { filter: brightness(.96); }
.cal-chip.ini { opacity: .7; font-weight: 500; }
.cal-chip.done { text-decoration: line-through; opacity: .55; }
.cal-chip.late { background: var(--coral-soft); border-left-color: var(--neg); color: var(--neg); }
.cal-mas { border: 0; background: none; color: var(--vio); font: 700 11.5px var(--f); text-align: left; padding: 1px 4px; cursor: pointer; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal-day { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--soft); }
.cal-day h4 { font: 800 15px var(--disp); text-transform: capitalize; margin-bottom: 8px; }
.cal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cal-row { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--card); border-radius: 12px; padding: 9px 12px; cursor: pointer; font: 600 14px var(--f); color: var(--ink); }
.cal-row i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cal-rt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cal-row small { color: var(--mute); font-weight: 600; }
.cal-row.done .cal-rt { text-decoration: line-through; color: var(--mute); }
.cal-row.late small { color: var(--neg); }
@media (max-width: 760px) {
  .cal-d { min-height: 58px; padding: 4px; align-items: center; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; justify-content: center; }
  .cal-n { align-self: center; }
}

/* ---------- Tarjeta estilo Trello: portada, barra superior, ventanas flotantes, adjuntos ---------- */
.tk-cvw { position: relative; margin: -22px -24px 14px; }
.tk-cv { height: 190px; background: var(--soft); border-radius: 28px 28px 0 0; overflow: hidden; }
.tk-cv img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tk-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tk-cvw .tk-top { position: absolute; top: 14px; left: 18px; right: 18px; margin: 0; z-index: 3; }
.tk-sp { flex: 1; }
.tk-chipl { position: relative; display: inline-flex; align-items: center; max-width: 60%; padding: 6px 12px; border-radius: 10px; background: var(--soft); color: var(--ink); font: 700 13px var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-chipl select { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; padding: 0 18px 0 0; margin: 0; min-width: 0; max-width: 100%; cursor: pointer; box-shadow: none; border-radius: 0; }
.tk-chipl select:focus { outline: 2px solid var(--vio); outline-offset: 4px; }
.tk-chipl:has(select)::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.tk-ib { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); cursor: pointer; padding: 0; }
.tk-ib:hover { background: var(--vio-soft); color: var(--vio); }
.tk-ib svg, .tk-bt svg, .tk-mi svg, .tk-s h3 > svg, .tk-right h3 > svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor !important; stroke: none !important; }
.tk-cvw .tk-chipl, .tk-cvw .tk-ib { background: rgba(10, 8, 30, .62); color: #fff; backdrop-filter: blur(4px); }
.tk-cvw .tk-ib:hover { background: rgba(10, 8, 30, .85); color: #fff; }
.tk-popwrap { position: relative; display: inline-block; }
.tk-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 25; width: 320px; max-width: min(320px, 82vw); max-height: 68vh; overflow: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 44px rgba(20, 14, 60, .38); padding: 12px 14px 14px; text-align: left; white-space: normal; }
.tk-pop.der { left: auto; right: 0; }
.tk-poph { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tk-poph b { flex: 1; text-align: center; font: 700 14px var(--f); }
.tk-poph .ib { width: 28px; height: 28px; margin: 0; background: transparent; }
.tk-menu { display: grid; gap: 2px; }
.tk-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.tk-mi { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--ink); font: 600 14px var(--f); text-align: left; padding: 9px 10px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.tk-mi:hover { background: var(--soft); }
.tk-mi.neg { color: var(--neg); }
.tk-pf { display: grid; gap: 6px; }
.tk-pf label { margin: 6px 0 0; font-size: 12px; color: var(--mute); font-weight: 700; }
.tk-tams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-tam { border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 6px; cursor: pointer; }
.tk-tam.on { border-color: var(--vio); }
.tk-tamv { display: block; height: 54px; border-radius: 8px; }
.tk-tamv.banner { background: linear-gradient(var(--vio) 0 38%, var(--soft) 38%); }
.tk-tamv.completa { background: var(--vio); }
.tk-cols10 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tk-col { height: 34px; border-radius: 8px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.tk-col.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--vio); }
.tk-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-th { border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--soft); height: 56px; }
.tk-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tk-th.on { border-color: var(--vio); }
.tk-pop .hint { margin-top: 10px; }
/* barra de botones */
.tk-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 18px; }
.tk-bt { display: inline-flex; align-items: center; gap: 7px; border: 0; background: var(--soft); color: var(--ink); font: 700 13.5px var(--f); padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.tk-bt:hover { background: var(--vio-soft); color: var(--vio); }
.tk-arch { display: flex; align-items: center; gap: 10px; background: var(--sun-soft); color: var(--warn); font-weight: 700; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.tk-arch svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tk-arch span { flex: 1; }
.tk-ph { width: 100%; text-align: left; border: 0; background: var(--soft); color: var(--mute); font: 600 14px var(--f); padding: 14px 16px; border-radius: 12px; cursor: pointer; }
.tk-ph:hover { background: var(--vio-soft); color: var(--vio); }
.tk-s h3 { text-transform: none; letter-spacing: 0; font: 800 16px var(--disp); color: var(--ink); gap: 10px; justify-content: flex-start; }
.tk-s h3 .btn { margin-left: auto; }
.tk-s h3 > svg { color: var(--mute); }
.tk-clt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tk-clt.ed { cursor: text; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; }
.tk-clt.ed:hover { background: var(--soft); }
.tk-right h3 { display: flex; align-items: center; gap: 10px; }
.tk-right h3 > svg { color: var(--mute); }
.tk-right h3 span { flex: 1; }
.modal.tk-modal.tk-drop, .tk.tk-drop { outline: 3px dashed var(--vio); outline-offset: -8px; }
/* adjuntos */
.tk-ads { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tk-ad { display: flex; align-items: center; gap: 12px; padding: 6px 4px 6px 6px; border-radius: 12px; }
.tk-ad:hover { background: var(--soft); }
.tk-at { flex: none; display: grid; place-items: center; width: 74px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--vio-soft); color: var(--vio); font: 800 13px var(--disp); }
.tk-at img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-at.lk svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tk-ab { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tk-an { color: var(--ink); text-decoration: none; display: grid; }
.tk-an b { font-size: 14px; overflow-wrap: anywhere; }
.tk-an small, .tk-am { color: var(--mute); font-size: 12px; overflow-wrap: anywhere; }
.tk-an:hover b { text-decoration: underline; }
.tk-pt { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.tk-pt svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.tk-ad .ib { width: 30px; height: 30px; margin: 0; background: transparent; flex: none; }
.tk-ad .ib svg { width: 16px; height: 16px; }
.tk-amenu { width: 220px; top: calc(100% + 4px); }
/* tarjeta del tablero con portada */
.bd-card.has-cv { overflow: hidden; }
.tc-cover { margin: -12px -12px 10px; height: 104px; border-radius: 16px 16px 0 0; overflow: hidden; background: var(--soft); }
.tc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-cover.color { height: 34px; }
.bd-card.cv-full { min-height: 120px; color: #fff; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.bd-card.cv-full::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .68)); border-radius: inherit; }
.bd-card.cv-full > * { position: relative; }
.bd-card.cv-full .tc-t, .bd-card.cv-full .tc-bd, .bd-card.cv-full .due { color: #fff; }
.bd-card.cv-full .due { background: rgba(255, 255, 255, .22); }
.bd-card.archivada { opacity: .6; }
.tc-arch { display: inline-block; font: 700 11px var(--f); text-transform: uppercase; letter-spacing: .04em; background: var(--sun-soft); color: var(--warn); border-radius: 999px; padding: 2px 8px; margin-bottom: 6px; }
@media (max-width: 860px) {
  .tk-cvw { margin: -18px -16px 14px; }
  .tk-cv { height: 150px; }
  .tk-cvw .tk-top { left: 12px; right: 12px; }
  .tk-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-width: none; max-height: 70vh; }
  .tk-pop.der { left: 12px; right: 12px; }
}

/* ---------- Tarjeta del tablero: efecto al pasar el mouse, como en Trello ---------- */
.bd-card.tc { position: relative; transition: box-shadow .12s, background-color .12s, transform .12s; }
.bd-card.tc:hover { box-shadow: 0 0 0 2px var(--vio), 0 6px 16px rgba(20, 14, 60, .14); background-color: color-mix(in srgb, var(--vio) 4%, var(--card)); }
.bd-card.tc.cv-full:hover { box-shadow: 0 0 0 2px var(--vio), 0 6px 16px rgba(20, 14, 60, .2); }
.bd-card.tc.dragging { opacity: .45; transform: rotate(2deg); }
/* círculo de "cumplida": oculto y se desliza al pasar el mouse (siempre visible si la tarjeta está cumplida) */
.tc-row .chk { width: 0; min-width: 0; margin-right: -9px; opacity: 0; border-width: 0; overflow: hidden; transition: width .14s ease, margin .14s ease, opacity .12s ease, border-width .14s; }
.bd-card.tc:hover .tc-row .chk, .bd-card.tc:focus-within .tc-row .chk, .bd-card.tc.done .tc-row .chk, .tc-row .chk:focus-visible { width: 24px; margin-right: 0; opacity: 1; border-width: 2px; }
/* lápiz de edición rápida */
.tc-edit { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: var(--soft); color: var(--mute); cursor: pointer; opacity: 0; transform: scale(.9); transition: opacity .12s, transform .12s, background .12s, color .12s; }
.tc-edit svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bd-card.tc:hover .tc-edit, .tc-edit:focus-visible { opacity: 1; transform: none; }
.tc-edit:hover { background: var(--vio-soft); color: var(--vio); }
.bd-card.tc.cv-full .tc-edit { background: rgba(10, 8, 30, .6); color: #fff; }
.bd-card.tc .tc-t { padding-right: 18px; }
.ro .tc-edit { display: none; }
@media (hover: none) {
  .tc-row .chk { width: 24px; margin-right: 0; opacity: 1; border-width: 2px; }
  .tc-edit { opacity: 1; transform: none; }
}
/* edición rápida (el lápiz) */
.qe-bd { position: fixed; inset: 0; z-index: 70; background: rgba(15, 11, 45, .55); }
.qe-box { position: fixed; display: grid; gap: 8px; justify-items: start; }
.qe-box textarea { width: 100%; min-height: 96px; resize: vertical; background: var(--card); border: 0; border-radius: 16px; padding: 12px; font: 600 14px/1.4 var(--f); box-shadow: 0 0 0 2px var(--vio), 0 10px 30px rgba(0, 0, 0, .35); }
.qe-menu { position: fixed; width: 220px; display: grid; gap: 4px; justify-items: start; }
.qe-menu button { display: flex; align-items: center; gap: 9px; width: auto; max-width: 100%; border: 0; background: rgba(10, 8, 30, .82); color: #fff; font: 600 13.5px var(--f); padding: 8px 14px; border-radius: 10px; cursor: pointer; transition: transform .1s, background .1s; text-align: left; }
.qe-menu button:hover { background: rgba(10, 8, 30, .98); transform: translateX(4px); }
.qe-menu button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (max-width: 640px) { .qe-menu { left: 12px !important; right: 12px !important; width: auto; } }

/* Mover / copiar tarjeta (el "tablero" de Trello es el proyecto) */
button.tk-chipl { position: relative; border: 0; cursor: pointer; padding-right: 30px; font-family: var(--f); }
button.tk-chipl::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
button.tk-chipl:hover { filter: brightness(1.12); }
.tk-pf2 { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; }
.tk-pf select, .tk-pf textarea { width: 100%; }

/* Botón de la lista y botones de la barra: bien visibles (también en modo oscuro) y sin cortarse */
.tk-chipl { max-width: min(340px, 56vw); flex: none; box-shadow: inset 0 0 0 1px var(--line); }
button.tk-chipl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--soft); color: var(--ink); }
.tk-popwrap:has(> button.tk-chipl) { max-width: min(340px, 56vw); }
.tk-cvw .tk-chipl { box-shadow: none; }
.tk-bt { box-shadow: inset 0 0 0 1px var(--line); }
.tk-btns { min-height: 38px; }
/* ---------- Ventanas flotantes y editor, igual que Trello ---------- */
.tk-pop { width: 330px; max-width: min(330px, 86vw); padding: 10px 14px 14px; border-radius: 12px; }
.tk-poph { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; margin: 0 -4px 10px; }
.tk-poph b { text-align: center; font: 700 14px var(--f); color: var(--mute); }
.tk-poph .ib { width: 28px; height: 28px; margin: 0; background: transparent; justify-self: center; }
.tk-poph .ib svg { width: 15px; height: 15px; }
.tk-poph-sp { width: 28px; }
.tk-pop label { display: block; margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--mute); }
.tk-pop input:not([type=checkbox]):not([type=radio]):not([type=file]), .tk-pop select, .tk-pop textarea { width: 100%; background: var(--card); }
.tk-full { width: 100%; justify-content: center; }
.tk-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.tk-search { margin-bottom: 2px; }
/* Añadir a la tarjeta */
.tk-arl { display: grid; gap: 2px; margin: 0 -8px; }
.tk-ar { display: flex; align-items: flex-start; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 8px; border-radius: 10px; cursor: pointer; font-family: var(--f); }
.tk-ar:hover { background: var(--soft); }
.tk-ar b { display: block; font-size: 14px; }
.tk-ar small { display: block; color: var(--mute); font-size: 12.5px; line-height: 1.35; margin-top: 1px; }
.tk-art { flex: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.tk-art svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* Etiquetas */
.tk-els { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.tk-er { display: flex; align-items: center; gap: 6px; }
.tk-er label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.tk-er input[type=checkbox], .tk-fr input[type=checkbox], .tk-opt input { flex: none; width: 17px; height: 17px; accent-color: var(--vio); }
.tk-eb { flex: 1; min-width: 0; display: block; padding: 8px 12px; border-radius: 6px; font: 600 14px/1.25 var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-er:hover .tk-eb { filter: brightness(.94); }
.tk-er .ib { width: 30px; height: 30px; margin: 0; background: transparent; }
.tk-pop .tk-full + .tk-full, .tk-els + .tk-full { margin-top: 10px; }
.tk-eprev { padding: 16px 12px; background: var(--soft); border-radius: 8px; margin-bottom: 12px; display: flex; }
.tk-cols5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tk-cols5 .tk-col { height: 32px; }
.tk-etqb, .tk-etq { border: 0; border-radius: 6px; padding: 6px 12px; font: 700 13px/1.2 var(--f); cursor: pointer; text-shadow: none; }
.tk-etq { cursor: default; }
.tk-etqb:hover { filter: brightness(.92); }
/* Fechas */
.tk-cal { margin: 0 -2px; }
.tk-calh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tk-calh b { text-transform: lowercase; font: 700 14px var(--f); }
.tk-calh .ib { width: 28px; height: 28px; margin: 0; background: transparent; font-size: 16px; }
.tk-calw, .tk-calg { display: grid; grid-template-columns: repeat(7, 1fr); }
.tk-calw span { text-align: center; font: 700 12px var(--f); color: var(--mute); padding: 6px 0; }
.tk-cd { border: 0; background: transparent; color: var(--ink); height: 34px; font: 500 14px var(--f); cursor: pointer; border-radius: 4px; position: relative; }
.tk-cd:hover { background: var(--soft); }
.tk-cd.out { color: var(--mute); opacity: .55; }
.tk-cd.rango { background: var(--vio-soft); border-radius: 0; }
.tk-cd.hoy::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 4px; border-bottom: 2px solid var(--vio); }
.tk-cd.sel { background: var(--vio); color: #fff; font-weight: 700; opacity: 1; }
.tk-fr { display: flex; align-items: center; gap: 10px; }
.tk-fr input[data-fi] { flex: 1; }
.tk-fr.act input[data-fi] { box-shadow: 0 0 0 2px var(--vio); }
/* Miembros */
.tk-mr { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 6px 8px; margin: 2px -8px 0; width: calc(100% + 16px); border-radius: 8px; cursor: pointer; font-family: var(--f); }
.tk-mr:hover { background: var(--soft); }
.tk-mr span { flex: 1; min-width: 0; }
.tk-mr b { display: block; font-size: 14px; }
.tk-mr small { color: var(--mute); font-size: 12px; }
.tk-mk { width: 18px; height: 18px; color: var(--pos); display: grid; place-items: center; }
.tk-mk svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Bloques bajo los botones */
.eqav.md { width: 32px; height: 32px; font-size: 12px; }
.tk-resp:has(.eqav.md) { padding: 0; background: transparent; }
.tk-fchb { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--soft); color: var(--ink); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-family: var(--f); }
.tk-fchb:hover { background: var(--vio-soft); }
.tk-fchb > svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.tk-fch { display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px var(--f); }
.tk-fch > svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; }
.tk-h3r { margin-left: auto; }
.tk-h3r .tk-popwrap { display: inline-block; }
/* Descripción: texto con formato y editor */
.tk-md { overflow-wrap: anywhere; line-height: 1.55; font-size: 14.5px; }
.tk-md.ed { cursor: text; border-radius: 10px; padding: 4px 8px; margin: -4px -8px; }
.tk-md.ed:hover { background: var(--soft); }
.tk-md p { margin: 0 0 8px; }
.tk-md h4 { margin: 10px 0 6px; font-family: var(--disp); }
.tk-md h4.h1 { font-size: 20px; } .tk-md h4.h2 { font-size: 17px; } .tk-md h4.h3 { font-size: 15px; }
.tk-md ul, .tk-md ol { margin: 0 0 8px; padding-left: 22px; }
.tk-md blockquote { margin: 0 0 8px; padding: 2px 12px; border-left: 3px solid var(--line); color: var(--mute); }
.tk-md code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.tk-md pre { background: var(--soft); padding: 10px 12px; border-radius: 8px; overflow: auto; margin: 0 0 8px; }
.tk-md pre code { background: transparent; padding: 0; }
.tk-md hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.tk-md a { color: var(--vio); }
.tk-ed { border: 2px solid var(--vio); border-radius: 8px; background: var(--card); overflow: visible; }
.tk-tb { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tk-tbw { position: relative; display: inline-block; }
.tk-tbb { display: inline-flex; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--ink); height: 30px; min-width: 30px; padding: 0 7px; border-radius: 6px; cursor: pointer; font: 600 14px var(--f); justify-content: center; }
.tk-tbb:hover { background: var(--soft); }
.tk-tbb svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tk-tbb svg:last-child:not(:first-child) { width: 12px; height: 12px; opacity: .7; }
.tk-tt { font: 600 14px var(--f); }
.tk-tbm { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 14, 60, .35); padding: 6px; display: grid; gap: 2px; }
.tk-tbm[hidden] { display: none; }
.tk-tbm button { border: 0; background: transparent; color: var(--ink); text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: 600 13.5px var(--f); }
.tk-tbm button:hover { background: var(--soft); }
.tk-ed textarea { display: block; width: 100%; border: 0; border-radius: 0 0 6px 6px; background: transparent; min-height: 170px; padding: 10px 12px; resize: vertical; box-shadow: none; }
.tk-ed textarea:focus { outline: 0; box-shadow: none; }
.tk-edb { margin-top: 10px; }
.tk-guia { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.tk-guia td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tk-guia td:first-child code { background: var(--soft); padding: 2px 6px; border-radius: 4px; }
@media (max-width: 860px) { .tk-pop { width: auto; max-width: none; } .tk-tbm { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; } }

/* Ajustes de la tarjeta vistos en el navegador */
.tk-ti textarea { min-height: 0; height: auto; line-height: 1.2; }
.tk-h { margin-bottom: 8px; }
.tk-sub { margin-top: 0; }
.tk-cm textarea { min-height: 44px; }

/* Las ventanas flotantes se colocan con JS respecto a la pantalla (ubicarPops) para no quedar recortadas por la tarjeta */
.tk-pop { position: fixed; top: 0; left: 0; z-index: 90; overflow: auto; }
.tk-amenu { width: 230px; }
/* Detalles vistos en el navegador real */
.tk-fr.tk-fa input[data-fi] { box-shadow: inset 0 0 0 2px var(--vio); }
.tk-fr.act input[data-fi] { box-shadow: inset 0 0 0 2px var(--line); }
.tk-pop input:not([type=checkbox]):not([type=radio]):not([type=file]), .tk-pop select, .tk-pop textarea { background: var(--card); border: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line); }
.tk-pop input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, .tk-pop select:focus, .tk-pop textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--vio); }
.tk-mr .eqav { flex: none; }
.tk-mr > span:not(.eqav) { flex: 1; min-width: 0; }

/* Tablero: fecha y checklist de la tarjeta (como Trello) */
button.tc-due { display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer; font-family: var(--f); margin-top: 0; }
button.tc-due svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }
button.tc-due:hover { filter: brightness(.92); }
button.tc-ck { border: 0; background: transparent; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; cursor: pointer; font-family: var(--f); }
button.tc-ck:hover, button.tc-ck.on { background: var(--soft); }
.tc-cl { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.tc-clt { font: 700 12px var(--f); color: var(--mute); margin: 6px 0 2px; }
.tc-ci { display: flex; align-items: flex-start; gap: 8px; padding: 3px 2px; border-radius: 6px; }
.tc-ci input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--vio); cursor: pointer; }
.tc-cit { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.tc-ci.done .tc-cit { text-decoration: line-through; color: var(--mute); }
.tc-mas { justify-self: start; border: 0; background: transparent; color: var(--mute); font: 600 12.5px var(--f); padding: 4px 2px; cursor: pointer; }
.tc-mas:hover { color: var(--vio); text-decoration: underline; }
.bd-card.cv-full .tc-cl { border-top-color: rgba(255, 255, 255, .3); }
.bd-card.cv-full .tc-cit, .bd-card.cv-full .tc-mas, .bd-card.cv-full .tc-clt { color: #fff; }

/* Tablero: etiquetas de la tarjeta (barras que se despliegan), título de lista editable y menú de la lista */
.tc-etq { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
button.tc-et { border: 0; cursor: pointer; border-radius: 8px; height: 8px; min-width: 40px; padding: 0; font-size: 0; line-height: 0; transition: height .12s, padding .12s; }
button.tc-et:hover { filter: brightness(.9); }
.tc-etq.ex button.tc-et { height: auto; min-width: 0; max-width: 100%; padding: 3px 9px; font: 700 12px/1.3 var(--f); line-height: 1.3; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-etq.ex button.tc-et:empty { min-width: 40px; height: 16px; }
.bd-head h3[data-lt] { cursor: text; border-radius: 8px; padding: 3px 6px; margin: -3px -6px; }
.bd-head h3[data-lt]:hover { background: rgba(255, 255, 255, .06); }
.bd-ren { flex: 1; min-width: 0; font: 700 15px var(--disp); padding: 4px 8px; border: 0; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 2px var(--vio); }
.bd-col.archivada { opacity: .6; }
.tk-mi.tk-txt { padding: 9px 10px; }
.tk-mi.tk-txt span { flex: 1; }
/* El lápiz de edición rápida siempre arriba a la derecha, también en las tarjetas con portada a toda la tarjeta */
.bd-card.tc > .tc-edit, .bd-card.cv-full > .tc-edit { position: absolute; top: 6px; right: 6px; left: auto; }
.bd-card.cv-full > .tc-edit { background: rgba(10, 8, 30, .62); color: #fff; }
.bd-card.cv-full > .tc-edit:hover { background: rgba(10, 8, 30, .85); }

/* ---------- Tarjeta con las proporciones de Trello: dos columnas con scroll propio, divisor y barra de abajo ---------- */
.backdrop:has(.tk-modal) { align-items: start; padding: 26px 20px 100px; }
.modal.tk-modal { width: min(1080px, 100%); max-width: 1080px; padding: 0; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 126px); }
.tk-modal .tk { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tk-top { flex: none; margin: 0; padding: 14px 20px 8px; }
.tk-cvw { flex: none; margin: 0; }
.tk-cv { border-radius: 0; }
.tk-cvw .tk-top { top: 14px; left: 20px; right: 20px; padding: 0; }
.tk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 10px var(--tkw, 420px); gap: 0; align-items: stretch; flex: 1; min-height: 0; }
.tk-left { overflow-y: auto; min-height: 0; padding: 2px 26px 28px 26px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tk-right { overflow-y: auto; min-height: 0; padding: 12px 22px 28px 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tk-split { position: relative; cursor: col-resize; touch-action: none; }
.tk-split::after { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); transition: background .15s, width .15s, left .15s; }
.tk-split:hover::after, .tk-split.on::after, .tk-split:focus-visible::after { background: var(--vio); width: 4px; left: 3px; }
.tk-split:focus-visible { outline: 0; }
body.tk-arrastrando { cursor: col-resize; user-select: none; }
.tk-h { margin-bottom: 6px; padding-top: 4px; }
.tk-right h3 { margin-top: 2px; }
/* barra de abajo: Todo | Actividades | Comentarios */
.tk-dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: flex; gap: 4px; padding: 6px; background: var(--dock); border-radius: 16px; box-shadow: 0 10px 34px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tk-dock button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #d9d6f5; font: 700 14px var(--f); padding: 10px 16px; border-radius: 11px; cursor: pointer; transition: background .12s, color .12s; }
.tk-dock button:hover { background: rgba(255, 255, 255, .1); }
.tk-dock button[aria-pressed=true] { background: rgba(138, 116, 255, .3); color: #fff; box-shadow: inset 0 -2px 0 var(--vio); }
.tk-dock svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .backdrop:has(.tk-modal) { padding: 0; align-items: end; }
  .modal.tk-modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; overflow: auto; display: block; }
  .tk-cols { display: block; }
  .tk-left, .tk-right { overflow: visible; padding: 4px 16px 18px; }
  .tk-split { display: none; }
  .tk-top { padding: 12px 14px 6px; }
  .tk-cvw .tk-top { left: 12px; right: 12px; }
  .tk-dock { bottom: 10px; }
  .tk-dock button { padding: 9px 11px; font-size: 13px; }
  .tk-dock button span { display: none; }
  .tk-dock button[aria-pressed=true] span { display: inline; }
}

/* ---------- Márgenes de Trello: iconos en un margen lateral y el contenido alineado con el título ---------- */
.tk-left { --tkg: 44px; }
.chk.lg { width: 30px; height: 30px; font-size: 15px; margin-top: 3px; }
.tk-h { gap: 14px; }
.tk-btns, .tk-meta { padding-left: var(--tkg); }
.tk-s { position: relative; padding-left: var(--tkg); }
.tk-s > h3 > svg:first-child { position: absolute; left: 6px; top: 2px; }
.tk-s > h3 { min-height: 24px; }
.tk-peligro { margin-left: var(--tkg); }
.tk-arch { margin-left: 0; }
/* checklists: título con el icono en el margen; la barra y las tareas arrancan en el margen, con el texto alineado */
.tk-s.tk-cl { padding-left: 0; }
.tk-cl > h3 { position: relative; padding-left: var(--tkg); }
.tk-cl > h3 > svg:first-child { left: 6px; top: 2px; }
.tk-cl .tk-pg { padding-left: 4px; }
.tk-cl .tk-pg > span:first-child { min-width: 34px; }
.tk-cl .tk-it { padding: 6px 0; gap: 0; }
.tk-cl .tk-it > input { margin: 2px calc(var(--tkg) - 8px - 19px) 0 8px; }
.tk-cl > .btn, .tk-cl > .tk-panel { margin-left: var(--tkg); }
.tk-cl > .tk-panel { max-width: calc(100% - var(--tkg)); }
@media (max-width: 640px) { .tk-left { --tkg: 34px; } }
/* "Actividades" y "Comentarios": solo ese panel, sin los detalles de la tarjeta */
.tk-cols.solo { display: block; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tk-solo { padding: 4px 26px 0; max-width: 900px; margin: 0 auto; }
.tk-cols.solo .tk-right { overflow: visible; max-width: 900px; margin: 0 auto; padding: 8px 26px 28px; }

/* Tareas del checklist compactas como en Trello: responsable y fecha aparecen al pasar el mouse o si ya tienen valor */
.tk-cl .tk-it:not(.meta) .tk-im { display: none; }
.tk-cl .tk-it:not(.meta):hover .tk-im, .tk-cl .tk-it:not(.meta):focus-within .tk-im { display: flex; }
/* Solo actividad o solo comentarios: alineado a la izquierda con los mismos márgenes */
.tk-solo, .tk-cols.solo .tk-right { max-width: none; margin: 0; }

/* Enlaces como chip con nombre (icono del servicio + texto) */
.tk-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: bottom; padding: 1px 9px 1px 6px; border-radius: 7px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); color: var(--vio) !important; font-weight: 600; text-decoration: none !important; line-height: 1.5; }
.tk-chip:hover { background: var(--vio-soft); }
.tk-chip i { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; }
.tk-chip svg { width: 16px; height: 16px; }
.tk-chip svg.trazo { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tk-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-md a.tk-chip, .tk-bub a.tk-chip, .tk-itt a.tk-chip { color: var(--vio); }
/* Actividades y Comentarios: una sola columna, centrada y al 50 % del ancho, con efecto al cambiar */
.tk-cols.solo { display: flex; justify-content: center; align-items: flex-start; }
.tk-solow { width: 50%; min-width: min(440px, 100%); padding: 6px 8px 32px; }
.tk-cols.solo .tk-right { overflow: visible; padding: 8px 0 0; max-width: none; margin: 0; }
.tk-solow .tk-h { padding-top: 6px; }
@keyframes tk-sale { to { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes tk-entra { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tk-entra-izq { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes tk-entra-der { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.tk-cols.saliendo > * { animation: tk-sale .15s ease forwards; }
.tk-cols.entrando.solo .tk-solow { animation: tk-entra .3s cubic-bezier(.2, .8, .2, 1); }
.tk-cols.entrando:not(.solo) .tk-left { animation: tk-entra-izq .3s cubic-bezier(.2, .8, .2, 1); }
.tk-cols.entrando:not(.solo) .tk-right { animation: tk-entra-der .3s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .tk-cols.saliendo > *, .tk-cols.entrando * { animation: none !important; } }
@media (max-width: 860px) { .tk-solow { width: 100%; min-width: 0; padding: 6px 16px 24px; } }
/* La tarjeta no cambia de altura al pasar entre Todo, Actividades y Comentarios */
.modal.tk-modal { min-height: min(520px, calc(100vh - 126px)); }
@media (max-width: 860px) { .modal.tk-modal { min-height: 0; } }

/* ---------- Tableros como Trello: una fila horizontal de listas con scroll, cada lista con su scroll vertical ---------- */
.bd { display: flex; flex-wrap: nowrap; gap: 12px; align-items: flex-start; overflow-x: auto; overflow-y: hidden; height: var(--bd-h, auto); padding: 4px 6px 14px; margin: 0 -6px; scroll-snap-type: x proximity; scrollbar-width: auto; scrollbar-color: var(--vio) transparent; }
.bd::-webkit-scrollbar { height: 12px; }
.bd::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
.bd::-webkit-scrollbar-thumb:hover { background: var(--vio); background-clip: padding-box; border: 3px solid transparent; }
.bd > .bd-col, .bd > .bd-col.bd-new { flex: 0 0 300px; width: 300px; min-width: 300px; max-width: 300px; max-height: 100%; scroll-snap-align: start; }
.bd > .bd-col { display: flex; flex-direction: column; min-height: 0; }
.bd > .bd-col > .bd-cards { flex: 0 1 auto; min-height: 36px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 2px 3px; margin: 0 -3px; }
.bd > .bd-col > .bd-head, .bd > .bd-col > .bd-foot { flex: none; }
.bd > .card { flex: 1 1 100%; }
@media (max-width: 640px) { .bd > .bd-col, .bd > .bd-col.bd-new { flex-basis: 84vw; width: 84vw; min-width: 84vw; max-width: 84vw; } }
.bd { margin: 0 calc(var(--bd-r, 6px) * -1) 0 calc(var(--bd-l, 6px) * -1); padding: 4px var(--bd-r, 6px) 14px var(--bd-l, 6px); }
.bd { scroll-padding-inline: var(--bd-l, 6px); }

/* ---------- Proyecto: barra delgada y tablero a pantalla completa (como Trello, con el menú de la plataforma) ---------- */
:root { --col-bg: rgba(27, 22, 64, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --col-bg: rgba(6, 4, 22, .58); } }
:root[data-theme="dark"] { --col-bg: rgba(6, 4, 22, .58); }
.pb { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin: 0 0 14px; min-height: 44px; }
.pb-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pb-back { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--ink); text-decoration: none; transition: background .15s, color .15s; }
.pb-back:hover { background: var(--vio-soft); color: var(--vio); }
.pb-back svg, .pb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pb .pj-logo.lg { width: 34px; height: 34px; border-radius: 10px; }
.pb .pj-logo.lg .pj-ini { font-size: 13px; }
.pb-nm { min-width: 0; line-height: 1.15; }
.pb-nm h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(46vw, 420px); }
.pb-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font: 600 12.5px var(--f); }
.pb-meta .ico { width: 18px; height: 18px; border-radius: 6px; }
.pb-meta .ico svg { width: 11px; height: 11px; }
.pb-meta .ico.brand img { width: 12px; height: 12px; }
.pb-tabs { margin: 0; padding: 3px; border-radius: 14px; }
.pb-tabs .tab { padding: 6px 14px; font-size: 13.5px; border-radius: 11px; }
.pb-sp { flex: 1 1 0; min-width: 0; }
.pb-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-q { width: 190px; height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; background: var(--soft); box-shadow: none; }
.pb-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font: 700 13.5px var(--f); cursor: pointer; transition: background .15s, color .15s; }
.pb-btn:hover, .pb-btn.on { background: var(--vio-soft); color: var(--vio); }
.pb-btn b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--vio); color: #fff; font-size: 11px; }
.pb-btn b[hidden] { display: none; }
.pb-av { display: inline-flex; align-items: center; padding-left: 8px; }
.pb-avb { border: 0; background: none; padding: 0; margin-left: -8px; border-radius: 50%; cursor: pointer; transition: transform .12s; position: relative; }
.pb-avb .eqav { width: 32px; height: 32px; font-size: 11.5px; box-shadow: 0 0 0 2px var(--bg); }
.pb-avb:hover { transform: translateY(-2px); z-index: 1; }
.pb-avb.on .eqav { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--vio); }
.pb-av .eqav.more { margin-left: -8px; width: 32px; height: 32px; background: var(--soft); color: var(--ink); box-shadow: 0 0 0 2px var(--bg); }
@media (max-width: 700px) { .pb-btn span { display: none; } .pb-btn { padding: 0 11px; } .pb-q { width: 140px; } }

/* tablero: de borde a borde, listas más oscuras que las tarjetas */
/* la barra y las pestañas no se mueven al cambiar de sección: misma caja y mismo alto en las tres; solo el tablero llega a los bordes */
html:has(#pb) { scrollbar-gutter: stable; }
body.modo-tablero .main { padding-bottom: 0; }
.pb-id { flex: 0 1 auto; }
.pb-tabs { flex: none; }
.pb-tools { flex: none; }
.pb-tools.off { visibility: hidden; pointer-events: none; }
.bd > .bd-col { background: var(--col-bg); box-shadow: none; }
.bd > .bd-col.bd-new { background: var(--col-bg); border: 0; }
.bd > .bd-col.bd-new .bd-add { color: var(--ink); font-weight: 700; }
.bd > .bd-col.bd-new .bd-add:hover { background: var(--soft); color: var(--vio); }
.tk-pf .pb-chk { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font: 600 14px var(--f); color: var(--ink); cursor: pointer; }
.pb-chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--vio); flex: none; }
body.modo-tablero .bd::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 28%, transparent); background-clip: padding-box; }
body.modo-tablero .bd::-webkit-scrollbar-thumb:hover { background: var(--vio); background-clip: padding-box; }
body.modo-tablero .bd { scrollbar-color: color-mix(in srgb, var(--ink) 30%, transparent) transparent; }
@media (max-width: 700px) {
  .pb-id { flex: 1 1 0; order: 1; }
  #edit.pb-btn { order: 2; }
  .pb-sp { display: none; }
  .pb-tabs { order: 3; flex: 1 1 100%; width: auto; }
  .pb-tabs .tab { flex: 1; padding: 6px 8px; font-size: 13px; text-align: center; }
  .pb-tools { order: 4; flex: 1 1 100%; flex-wrap: nowrap; }
  .pb-q { flex: 1; min-width: 0; width: auto; }
  .pb-nm h1 { max-width: 52vw; }
}
@media (max-width: 700px) { .pb-tabs { flex-wrap: nowrap; } .pb-tabs .tab { flex: 1 0 auto; padding: 6px 10px; } .pb-tabs .tab em { margin-left: 3px; } }
@media (max-width: 700px) { .pb-tabs { display: flex; } .pb-tabs .tab { white-space: nowrap; min-height: 36px; } }

/* celular: la barra se reparte en filas fijas (nombre, pestañas y, en Actividades, búsqueda); el alto no cambia entre secciones */
@media (max-width: 700px) { .pb { height: auto; flex-wrap: wrap; } }

/* ---------- Ajustes: servicios, barra en tablet, scrollbar del tablero y vista previa del calendario ---------- */
.pb-serv { justify-content: space-between; align-items: center; gap: 12px 20px; }
.pb-serv p { margin: 0 0 10px; max-width: 46em; flex: 1 1 280px; }
.pb-serv .btn { flex: none; }
@media (max-width: 700px) { .pb-serv { flex-direction: column; align-items: stretch; } .pb-serv p { margin: 0; flex: none; } #nuevo-serv { width: 100%; white-space: normal; } }
/* barra: en laptops angostas el botón Editar queda solo con el icono; en tablet y celular se reparte en filas (nombre + Editar / pestañas / herramientas) */
@media (max-width: 1320px) { #edit.pb-btn span { display: none; } #edit.pb-btn { padding: 0 11px; } .pb-q { width: 160px; } }
@media (max-width: 1100px) {
  .pb { flex-wrap: wrap; height: auto; }
  .pb-id { flex: 1 1 0; order: 1; min-width: 0; }
  #edit.pb-btn { order: 2; }
  .pb-sp { display: none; }
  .pb-tabs { order: 3; flex: 1 1 100%; width: auto; display: flex; flex-wrap: nowrap; }
  .pb-tabs .tab { flex: 1 0 auto; white-space: nowrap; text-align: center; min-height: 36px; }
  .pb-tools { order: 4; flex: 1 1 100%; flex-wrap: nowrap; }
  .pb-tools.off { display: none; }
  .pb-q { flex: 1; min-width: 0; width: auto; }
  .pb-nm h1 { max-width: none; }
}
/* scrollbar horizontal del tablero: fina y discreta, siempre por encima del menú */
body.modo-tablero .bd { scrollbar-width: thin; padding-bottom: 6px; }
body.modo-tablero .bd::-webkit-scrollbar { height: 8px; }
body.modo-tablero .bd::-webkit-scrollbar-track { background: transparent; }
body.modo-tablero .bd::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 16%, transparent); border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }
body.modo-tablero .bd::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--ink) 34%, transparent); background-clip: padding-box; }
body.modo-tablero .bd { scrollbar-color: color-mix(in srgb, var(--ink) 22%, transparent) transparent; }
/* vista previa de una tarjeta en el calendario */
.cal-pv { position: fixed; z-index: 70; width: 290px; max-width: calc(100vw - 16px); background: var(--card); color: var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 0 14px 40px rgba(20, 14, 60, .3), 0 0 0 1px var(--line); animation: pv-in .12s ease-out; }
@keyframes pv-in { from { opacity: 0; transform: translateY(4px); } }
@media (hover: hover) { .cal-pv { pointer-events: none; } }
.pv-bar { height: 6px; }
.pv-b { padding: 12px 14px 14px; display: grid; gap: 9px; }
.pv-ctx { font: 700 11.5px var(--f); color: var(--mute); text-transform: uppercase; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-b h4 { font: 800 16px/1.25 var(--disp); overflow-wrap: anywhere; }
.pv-fila { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pv-st { padding: 2px 10px; border-radius: 999px; background: var(--soft); font-weight: 700; font-size: 12px; }
.pv-st.ok { background: var(--mint-soft); color: var(--pos); }
.pv-st.late { background: var(--coral-soft); color: var(--neg); }
.pv-st.today { background: var(--sun-soft); color: var(--warn); }
.pv-fe { color: var(--mute); font-weight: 600; }
.pv-etq { display: flex; flex-wrap: wrap; gap: 4px; }
.pv-et { min-width: 36px; padding: 2px 9px; border-radius: 6px; font: 700 11.5px var(--f); text-align: center; }
.pv-ck { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--mute); }
.pv-ck i { display: block; height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.pv-ck b { display: block; height: 100%; background: var(--mint); border-radius: 999px; }
.pv-mis { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pv-mi { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pv-ex { font-size: 12.5px; color: var(--mute); }
.pv-acc { display: flex; gap: 8px; margin-top: 2px; }
.pv-acc .btn { flex: 1; }
.cal-chip, .cal-row { -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px) { .tb.pb-serv { display: flex; flex-wrap: wrap; } .tb.pb-serv > .btn { width: auto; align-self: center; } }
@media (max-width: 700px) { .tb.pb-serv { flex-direction: column; align-items: stretch; flex-wrap: nowrap; } .tb.pb-serv > .btn { width: 100%; align-self: stretch; } }
@media (max-width: 1500px) { #edit.pb-btn span { display: none; } #edit.pb-btn { padding: 0 11px; } }
@media (min-width: 1101px) {
  .pb { flex-wrap: nowrap; }
  .pb-id { flex: 0 1 auto; min-width: 0; }
  .pb-tabs { flex: none; }
  .pb-tools { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; }
  .pb-q { flex: 1 1 190px; min-width: 110px; width: auto; }
  #edit.pb-btn { flex: none; }
}

/* tarjetas completas: las tarjetas no se encogen dentro de la lista (la lista hace scroll) y el checklist de la tarjeta es compacto */
.bd-cards > * { flex: none; }
.tc-cl { margin-top: 8px; padding-top: 6px; gap: 0; }
.tc-ci { padding: 3px 0; }
.tc-cit { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.tc-cl.todo { max-height: 210px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-right: 4px; }
.tc-cl.todo .tc-cit { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.tc-mas { padding: 3px 2px 0; font-size: 12px; }
.tc-cl.todo, .tc-cl .tc-its { max-height: none; overflow: visible; padding-right: 0; }
.tc-its.todo { max-height: 200px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-right: 4px; }
.tc-its.todo .tc-cit { display: block; -webkit-line-clamp: unset; line-clamp: unset; }

/* ---------- Casillas del checklist: estilo moderno (esquinas suaves, degradado y marca animada) ---------- */
.tk-it > input[type=checkbox], .tc-ci > input[type=checkbox] {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; display: inline-grid; place-items: center; cursor: pointer;
  width: 20px; height: 20px; margin-top: 2px; border-radius: 7px; border: 2px solid color-mix(in srgb, var(--mute) 65%, transparent); background: transparent;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .12s;
}
.tk-it > input[type=checkbox]::after, .tc-ci > input[type=checkbox]::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; transform: scale(0); opacity: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>") center / 74% no-repeat;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), opacity .12s;
}
.tk-it > input[type=checkbox]:hover:not(:disabled), .tc-ci > input[type=checkbox]:hover:not(:disabled) { border-color: var(--vio); box-shadow: 0 0 0 4px var(--vio-soft); }
.tk-it > input[type=checkbox]:active:not(:disabled), .tc-ci > input[type=checkbox]:active:not(:disabled) { transform: scale(.88); }
.tk-it > input[type=checkbox]:checked, .tc-ci > input[type=checkbox]:checked { background: linear-gradient(135deg, #14c98d, #3fe0b0); border-color: transparent; }
.tk-it > input[type=checkbox]:checked:hover:not(:disabled), .tc-ci > input[type=checkbox]:checked:hover:not(:disabled) { box-shadow: 0 0 0 4px var(--mint-soft); }
.tk-it > input[type=checkbox]:checked::after, .tc-ci > input[type=checkbox]:checked::after { transform: scale(1); opacity: 1; }
.tk-it > input[type=checkbox]:focus-visible, .tc-ci > input[type=checkbox]:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
.tk-it > input[type=checkbox]:disabled, .tc-ci > input[type=checkbox]:disabled { opacity: .5; cursor: default; }
.tc-ci > input[type=checkbox] { width: 17px; height: 17px; border-radius: 6px; margin-top: 1px; }
.tk-cl .tk-it > input[type=checkbox] { margin: 2px calc(var(--tkg) - 8px - 20px) 0 8px; }
/* ---------- Cambio de moneda ---------- */
.bklink { justify-self: start; margin-top: 6px; font: 700 13px var(--f); color: var(--vio); text-decoration: none; }
.bklink:hover { text-decoration: underline; }
.cprev { min-height: 20px; padding: 10px 14px; border-radius: 14px; background: var(--soft); color: var(--mute); font-size: 13.5px; line-height: 1.5; }
.cprev:empty { display: none; }
.cprev b { color: var(--ink); }

/* ---------- Checklist del detalle: minimalista (casillas pequeñas, responsable y fecha discretos en la misma línea) ---------- */
.tk-it > input[type=checkbox] { width: 16px; height: 16px; border-radius: 5px; border-width: 1.75px; margin-top: 3px; }
.tc-ci > input[type=checkbox] { width: 15px; height: 15px; border-radius: 5px; border-width: 1.75px; }
.tk-it > input[type=checkbox]:hover:not(:disabled), .tc-ci > input[type=checkbox]:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--vio-soft); }
.tk-it > input[type=checkbox]:checked:hover:not(:disabled), .tc-ci > input[type=checkbox]:checked:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--mint-soft); }
.tk-cl .tk-it > input[type=checkbox] { margin: 3px calc(var(--tkg) - 8px - 16px) 0 8px; }
.tk-cl .tk-pg { gap: 8px; margin-bottom: 6px; font-size: 11.5px; }
.tk-cl .tk-bar { height: 4px; }
.tk-cl .tk-its { gap: 0; }
.tk-cl .tk-it { padding: 3px 4px 3px 0; border-radius: 8px; align-items: flex-start; }
.tk-cl .tk-it:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.tk-cl .tk-itt { font-size: 14px; line-height: 1.4; }
.tk-cl .tk-ic { flex: 1; min-width: 0; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 0 10px; }
.tk-cl .tk-ic > .tk-itt, .tk-cl .tk-ic > .tk-iti { flex: 1 1 220px; min-width: 0; }
.tk-cl .tk-im { margin: 0; gap: 2px; flex: none; flex-wrap: nowrap; }
.tk-cl .tk-it:not(.meta) .tk-im { display: flex; }
.tk-cl .tk-im select, .tk-cl .tk-im input[type=date] { height: 22px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; box-shadow: none; color: var(--mute); font: 600 12px var(--f); cursor: pointer; transition: background .15s, color .15s, opacity .15s; }
.tk-cl .tk-im select { appearance: none; -webkit-appearance: none; background-image: none; max-width: 120px; text-overflow: ellipsis; }
.tk-cl .tk-im select:hover, .tk-cl .tk-im input[type=date]:hover, .tk-cl .tk-im select:focus, .tk-cl .tk-im input[type=date]:focus { background: var(--soft); color: var(--ink); }
.tk-cl .tk-im input[type=date]::-webkit-calendar-picker-indicator { opacity: 0; width: 12px; margin-left: 2px; cursor: pointer; }
.tk-cl .tk-im input[type=date]:hover::-webkit-calendar-picker-indicator { opacity: .6; }
.tk-cl .tk-im .vacio { opacity: 0; }
.tk-cl .tk-it:hover .tk-im .vacio, .tk-cl .tk-it:focus-within .tk-im .vacio { opacity: .7; }
.tk-cl .tk-it:hover .tk-im .vacio:hover, .tk-cl .tk-it:focus-within .tk-im .vacio:focus { opacity: 1; }
.tk-cl .tk-it > .ib { width: 24px; height: 24px; opacity: 0; transition: opacity .15s; }
.tk-cl .tk-it > .ib svg { width: 13px; height: 13px; }
.tk-cl .tk-it:hover > .ib, .tk-cl .tk-it > .ib:focus-visible { opacity: .8; }
@media (hover: none) { .tk-cl .tk-it > .ib { opacity: .5; } .tk-cl .tk-im .vacio { opacity: .55; } }
.tk-it > input[type=checkbox], .tc-ci > input[type=checkbox] { padding: 0; min-width: 0; min-height: 0; }
.tk-it > input[type=checkbox] { width: 16px; height: 16px; }
.tc-ci > input[type=checkbox] { width: 15px; height: 15px; }
/* responsable y fecha en la misma línea; los vacíos solo aparecen al pasar el mouse */
.tk-cl .tk-ic { flex-wrap: nowrap; align-items: baseline; gap: 10px; }
.tk-cl .tk-ic > .tk-itt, .tk-cl .tk-ic > .tk-iti { flex: 1 1 0; }
.tk-cl .tk-im .vacio { display: none; }
.tk-cl .tk-it:hover .tk-im .vacio, .tk-cl .tk-it:focus-within .tk-im .vacio { display: block; opacity: .75; }
.tk-cl .tk-im input[type=date] { min-height: 0; width: auto; }
.tk-cl .tk-im select { width: auto; }
@media (max-width: 560px) { .tk-cl .tk-ic { flex-wrap: wrap; gap: 2px 10px; } .tk-cl .tk-ic > .tk-itt, .tk-cl .tk-ic > .tk-iti { flex: 1 1 100%; } }
@media (hover: none) { .tk-cl .tk-im .vacio { display: block; opacity: .55; } }
/* texto a todo el ancho; responsable y fecha en una segunda línea tenue (solo si existen). Sin datos: aparecen al pasar el mouse sobre la fila, sin mover nada */
.tk-cl .tk-ic { flex-wrap: wrap; gap: 0 10px; align-items: flex-start; }
.tk-cl .tk-ic > .tk-itt, .tk-cl .tk-ic > .tk-iti { flex: 1 1 100%; }
.tk-cl .tk-it { position: relative; }
.tk-cl .tk-it.meta .tk-im { margin: 1px 0 0 -6px; }
.tk-cl .tk-it:not(.meta) .tk-im { display: none; position: absolute; right: 30px; top: 3px; z-index: 2; padding: 1px 3px; border-radius: 9px; background: var(--card); box-shadow: 0 2px 10px rgba(10, 8, 30, .25); }
.tk-cl .tk-it:not(.meta):hover .tk-im, .tk-cl .tk-it:not(.meta):focus-within .tk-im { display: flex; }
.tk-cl .tk-it:not(.meta) .tk-im .vacio { display: block; opacity: 1; }
.tk-cl .tk-it.meta .tk-im .vacio { display: none; }
.tk-cl .tk-it.meta:hover .tk-im .vacio, .tk-cl .tk-it.meta:focus-within .tk-im .vacio { display: block; }
@media (hover: none) { .tk-cl .tk-it:not(.meta) .tk-im { display: flex; position: static; margin: 1px 0 0 -6px; box-shadow: none; background: none; padding: 0; } .tk-cl .tk-it:not(.meta) .tk-im .vacio { opacity: .55; } }
.big .n.n2 { margin-top: 0; font-size: clamp(30px, 4vw, 46px); opacity: .92; }
a.chipw { text-decoration: none; color: inherit; margin-top: 6px; }
a.chipw:hover { background: rgba(255, 255, 255, .34); }

/* ---------- Configuración: avisos por correo ---------- */
.cx-estado { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 12px 16px; border-radius: 16px; background: var(--soft); margin-bottom: 16px; font-size: 14px; }
.cx-modo-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cx-kpis { display: flex; gap: 22px; }
.cx-kpis div { display: grid; text-align: center; line-height: 1.15; }
.cx-kpis b { font: 800 20px var(--disp); }
.cx-kpis span { font-size: 12px; color: var(--mute); }
.cx-grid { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cx-ctl { display: grid; gap: 12px; }
.cx-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-nota { margin: 0; font-size: 12.5px; line-height: 1.5; }
.cx-prev { min-width: 0; border-radius: 18px; background: var(--soft); padding: 12px; }
.cx-prev-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 10px; }
.cx-asunto { font-size: 13.5px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cx-asunto span { color: var(--mute); font-weight: 700; margin-right: 4px; }
.cx-modo { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); }
.cx-modo button { border: 0; background: transparent; color: var(--mute); font: 700 12.5px var(--f); padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.cx-modo button.on { background: var(--vio); color: #fff; }
.cx-marco { display: flex; justify-content: center; border-radius: 12px; overflow: hidden; }
.cx-marco iframe { width: 100%; height: 640px; border: 0; background: #efedfd; border-radius: 12px; transition: width .2s; }
.cx-marco.cel iframe { width: 380px; max-width: 100%; }
@media (max-width: 900px) { .cx-grid { grid-template-columns: 1fr; } .cx-marco iframe { height: 560px; } }

/* ---------- Configuración: servidor de correo ---------- */
.sm-form { display: grid; gap: 14px; max-width: 760px; }
.sm-fila { display: flex; flex-wrap: wrap; gap: 12px; }
.sm-fila > div { min-width: 0; flex: 1 1 200px; }
.sm-fila > .sm-grow { flex: 2 1 240px; }
.sm-fila > .sm-w { flex: 0 1 120px; }
.sm-fila > .sm-w2 { flex: 0 1 170px; }
#sm-smtp { display: grid; gap: 14px; }
#sm-smtp[hidden] { display: none; }
.sm-ayuda { font-size: 13px; color: var(--mute); }
.sm-ayuda:empty { display: none; }
.sm-res { display: grid; gap: 4px; font-size: 14px; }
.sm-res:empty { display: none; }
.sm-ok { color: var(--pos); font-weight: 600; }
.sm-mal { color: var(--neg); font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Configuración: secciones por etiquetas ---------- */
.cfg-tabs { margin: 0 0 20px; flex-wrap: nowrap; }
.cfg-tabs .tab { flex: none; }
.cfg-sec[hidden] { display: none; }
.cfg-sec > .card:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .tabs.cfg-tabs { display: flex; width: auto; margin-right: -16px; border-radius: 18px 0 0 18px; scrollbar-width: none; }
  .cfg-tabs::-webkit-scrollbar { display: none; }
  .cfg-tabs .tab { white-space: nowrap; min-height: 40px; padding: 8px 16px; }
}

#av .sc { overflow-x: auto; }
@media (max-width: 700px) { .av-tab .av-reg { min-width: 120px; position: sticky; left: 0; background: var(--card); z-index: 1; } .av-esp .av-reg small { max-width: 28ch; } }

/* ---------- Configuración → Notificaciones (versión ordenada) ---------- */
#av > .card { margin-bottom: 16px; }
.av-canales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.av-canal { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--soft); cursor: pointer; transition: background .15s, box-shadow .15s; margin: 0; }
.av-canal:hover { box-shadow: inset 0 0 0 2px var(--vio-soft); }
.av-canal-i { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--vio-soft); color: var(--vio); }
.av-canal-i.c { background: var(--sun-soft); color: var(--warn); }
.av-canal-i svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.av-canal-t { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 15px; }
.av-canal-t small { font-size: 12.5px; line-height: 1.4; color: var(--mute); font-weight: 500; }
.av-canal .sw { margin: 0; min-height: 0; flex: none; }
.av-leyenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; font-size: 12.5px; color: var(--mute); }
.av-b { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 700 11.5px var(--f); letter-spacing: .01em; white-space: nowrap; }
.av-b.a { background: var(--vio-soft); color: var(--vio); }
.av-b.c { background: var(--sun-soft); color: var(--warn); }
.av-b.p { background: var(--mint-soft); color: var(--pos); }
.av-h { margin: 0 0 4px; font-size: 17px; }
.av-sub { margin: 0 0 12px; font-size: 13.5px; }
.av-tab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.av-tab th, .av-tab td { padding: 7px 4px; text-align: center; border: 0; }
.av-tab thead th { font: 700 12px var(--f); color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.av-tab thead .av-g { border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.av-tab thead tr:nth-child(2) th { padding: 4px 4px 8px; }
.av-tab .av-reg { text-align: left; min-width: 230px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.av-tab thead .av-reg { color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; vertical-align: bottom; }
.av-tab tr.av-sec th { text-align: left; padding: 16px 4px 6px; font: 800 12px var(--f); color: var(--vio); text-transform: uppercase; letter-spacing: .08em; }
.av-tab tbody:first-of-type tr.av-sec th { padding-top: 6px; }
.av-tab tbody tr:not(.av-sec) { transition: background .12s; }
.av-tab tbody tr:not(.av-sec):hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.av-tab tbody tr:not(.av-sec) > * { border-top: 1px solid var(--line); }
.av-tab tbody tr.av-sec + tr > * { border-top: 0; }
.av-tab tbody tr:not(.av-sec) .av-reg { border-radius: 12px 0 0 12px; padding-left: 8px; }
.av-nom { font-weight: 600; margin-right: 8px; }
.av-dest { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.av-tab .av-reg small { display: block; font: 500 12.5px/1.4 var(--f); color: var(--mute); margin-top: 3px; max-width: 52ch; }
.av-tab td.av-c:nth-child(even) { border-left: 1px solid var(--line); }
.av-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.av-ic button { border: 0; background: transparent; color: var(--mute); width: 34px; height: 30px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; }
.av-ic button:hover { background: var(--vio-soft); color: var(--vio); }
.av-chip { display: inline-grid; place-items: center; width: 34px; height: 30px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent; color: color-mix(in srgb, var(--mute) 60%, transparent); cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s; }
.av-chip svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.av-chip:hover { border-color: var(--vio); }
.av-chip:active { transform: scale(.9); }
.av-chip.on { background: var(--vio-soft); border-color: transparent; color: var(--vio); }
.av-chip[data-i="1"].on { background: var(--sun-soft); color: var(--warn); }
.av-chip:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 2px; }
#av.av-sin-n .av-chip[data-i="0"], #av.av-sin-c .av-chip[data-i="1"] { opacity: .4; }
.av-barra { position: sticky; bottom: 96px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; border-radius: 20px; background: var(--card); box-shadow: 0 8px 30px rgba(20, 14, 60, .22), 0 0 0 1px var(--line); margin: 0 0 12px; }
.av-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.av-estado { font-size: 13px; color: var(--mute); }
.av-estado.on { color: var(--warn); font-weight: 700; }
@media (max-width: 760px) {
  .av-canales { grid-template-columns: 1fr; }
  .av-tab .av-reg { min-width: 150px; position: sticky; left: 0; background: var(--card); z-index: 1; }
  .av-dest { display: flex; margin-top: 3px; }
  .av-barra { bottom: 88px; }
}
#av-matriz { table-layout: fixed; min-width: 680px; }
#av-matriz th.av-reg { width: 32%; }
#av-esp { table-layout: fixed; min-width: 520px; }
#av-esp th.av-reg { width: auto; }
#av-esp td.av-c, #av-esp th.av-ic { width: 76px; }
@media (max-width: 760px) { #av-matriz { min-width: 620px; } #av-matriz th.av-reg { width: 150px; } }
.av-barra { position: static; box-shadow: none; background: transparent; padding: 4px 0; }
#av.sucio .av-barra { position: sticky; bottom: 96px; padding: 12px 16px; background: var(--card); box-shadow: 0 8px 30px rgba(20, 14, 60, .22), 0 0 0 1px var(--line); }
@media (max-width: 760px) { #av.sucio .av-barra { bottom: 88px; } }

/* ---------- Selector de fechas (datepicker.js) ---------- */
.dp-t { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font: 700 14px var(--f); cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.dp-t:hover { background: var(--vio-soft); }
.dp-t[aria-expanded="true"] { background: var(--vio-soft); box-shadow: inset 0 0 0 2px var(--vio); }
.dp-t svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--vio); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-v.dp-vacio { color: var(--mute); font-weight: 600; }
.filters #gm, .filters #g1 { display: inline-flex; }

.dp { position: fixed; z-index: 130; width: 328px; max-width: calc(100vw - 16px); padding: 14px; border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: 0 18px 50px rgba(20, 14, 60, .28), 0 0 0 1.5px var(--line); animation: dp-in .14s ease-out; }
@keyframes dp-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes dp-up { from { transform: translateY(100%); } }
.dp-pre { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dp-pre button { min-height: 32px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--soft); color: var(--mute); font: 700 12.5px var(--f); cursor: pointer; transition: background .15s, color .15s; }
.dp-pre button:hover { color: var(--ink); background: var(--vio-soft); }
.dp-pre button.on { background: var(--vio); color: #fff; }
.dp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dp-ttl { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 800 16px var(--disp); cursor: pointer; }
.dp-ttl:not(:disabled):hover { background: var(--soft); }
.dp-ttl:disabled { cursor: default; opacity: 1; }
.dp-ttl svg { width: 16px; height: 16px; fill: none; stroke: var(--mute); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dp-nav { display: flex; gap: 4px; }
.dp-nav button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); cursor: pointer; transition: background .15s; }
.dp-nav button:hover { background: var(--vio-soft); }
.dp-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dp-b { min-height: 276px; }
.dp-w, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-days { row-gap: 2px; }
.dp-w span { display: grid; place-items: center; height: 28px; color: var(--mute); font: 700 11.5px var(--f); }
.dp-d { height: 40px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px var(--f); cursor: pointer; }
.dp-d.out { color: var(--mute); opacity: .5; }
.dp-d:hover:not(.sel):not(.rs):not(.re):not(.mid) { background: var(--soft); }
.dp-d.today { box-shadow: inset 0 0 0 1.5px var(--vio); }
.dp-d.mid { background: var(--vio-soft); border-radius: 0; }
.dp-d.sel, .dp-d.rs, .dp-d.re { background: var(--vio); color: #fff; opacity: 1; font-weight: 800; }
.dp-d.rs:not(.re) { border-radius: 999px 0 0 999px; }
.dp-d.re:not(.rs) { border-radius: 0 999px 999px 0; }
.dp-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-top: 6px; }
.dp-m { height: 58px; padding: 0; border: 0; border-radius: 16px; background: var(--soft); color: var(--ink); font: 700 14px var(--f); cursor: pointer; transition: background .15s; }
.dp-m:hover { background: var(--vio-soft); }
.dp-m.today { box-shadow: inset 0 0 0 1.5px var(--vio); }
.dp-m.sel { background: var(--vio); color: #fff; }
.dp-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-i { color: var(--mute); font: 600 13px var(--f); }
.dp-f button { padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--vio); font: 700 13.5px var(--f); cursor: pointer; }
.dp-f button:hover { background: var(--vio-soft); }
.dp button:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 1px; }
.dp-bd { position: fixed; inset: 0; z-index: 129; background: rgba(10, 8, 30, .55); backdrop-filter: blur(3px); animation: dp-in .15s ease-out; }
.dp.sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; animation: dp-up .2s ease-out; }
.dp.sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--line); }
.dp.sheet .dp-d { height: 44px; }
.dp.sheet .dp-b { min-height: 298px; }
@media (max-width: 700px) {
  .filters #gm, .filters #g1 { grid-column: 1 / -1; }
  .filters .dp-t { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dp, .dp-bd { animation: none; } }

/* Los campos ocultos de los selectores de fechas no ocupan espacio */
input[type=hidden] { display: none !important; }

/* Selector de fechas dentro de formularios y barras de filtros de las listas: se ve como un campo mas */
.dp-t.f { display: flex; width: 100%; min-height: 44px; padding: 10px 14px; border: 2px solid transparent; border-radius: 14px; background: var(--soft); font-weight: 600; }
.dp-t.f:hover { background: var(--soft); border-color: var(--line); }
.dp-t.f:focus-visible, .dp-t.f[aria-expanded="true"] { outline: none; border-color: var(--vio); background: var(--card); box-shadow: none; }
.dp-t.f .dp-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dp-t:disabled { opacity: .6; cursor: not-allowed; }
.pl .dp-t.f { min-height: 34px; padding: 5px 12px; border-radius: 12px; }
.tb > #g1 { min-width: 232px; }
@media (max-width: 900px) {
  .tb > #gm, .tb > #g1 { grid-column: 1 / -1; min-width: 0; }
}
@media (max-width: 380px) {
  .dp { padding: 12px 10px; }
  .dp-pre button { padding: 6px 10px; }
}
@media (max-width: 640px) { .tb > .btn { grid-column: 1 / -1; white-space: nowrap; } }

/* Boton de tema claro/oscuro (junto a las notificaciones): muestra el sol en oscuro y la luna en claro */
.tema-b .i-sol { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tema-b .i-sol { display: block; }
  :root:not([data-theme="light"]) .tema-b .i-luna { display: none; }
}
:root[data-theme="dark"] .tema-b .i-sol { display: block; }
:root[data-theme="dark"] .tema-b .i-luna { display: none; }
:root[data-theme="light"] .tema-b .i-sol { display: none; }
:root[data-theme="light"] .tema-b .i-luna { display: block; }
.tema-b svg { transition: transform .25s; }
.tema-b:hover svg { transform: rotate(18deg); }
@media (prefers-reduced-motion: reduce) { .tema-b svg { transition: none; } }


/* Celulares: la cabecera deja espacio para los cuatro botones (instalar, tema, notificaciones y cuenta) */
@media (max-width: 520px) {
  .top { gap: 6px; padding: 12px 10px 0; }
  .top .brand { min-width: 0; flex: 0 1 auto; }
  .top .brand-logo { height: 22px; padding: 6px 9px; max-width: 100%; object-fit: contain; }
  .top .ntf-b { width: 38px; height: 38px; flex: none; }
  .top .ntf-b svg { width: 19px; height: 19px; }
}

/* Boton "Instalar app": llamativo, con degradado que fluye, brillo que cruza, pulso y flecha que invita a tocar */
.app-b { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; height: 42px; padding: 0 18px 0 13px; border: 0; border-radius: 999px; overflow: hidden; cursor: pointer; color: #fff; font: 800 13.5px var(--f); letter-spacing: .01em; white-space: nowrap;
  background: linear-gradient(115deg, #5a3fff 0%, #8a5cff 38%, #ff5f7a 72%, #ffb23d 100%); background-size: 220% 100%;
  box-shadow: 0 6px 18px rgba(90, 63, 255, .4), 0 0 0 0 rgba(255, 95, 122, .55);
  animation: ab-flujo 6s ease-in-out infinite, ab-pulso 2.6s ease-out infinite; transition: transform .15s; }
.app-b::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: ab-brillo 3.8s ease-in-out infinite; pointer-events: none; }
.app-b svg { position: relative; z-index: 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(20, 14, 60, .35)); animation: ab-sacude 5.2s ease-in-out infinite; transform-origin: 50% 70%; }
.app-b .ab-flecha { animation: ab-baja 1.3s ease-in-out infinite; }
.app-b .ab-t { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(20, 14, 60, .3); }
.app-b:hover { transform: translateY(-2px) scale(1.05); }
.app-b:active { transform: scale(.95); }
.app-b:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 3px; }
@keyframes ab-flujo { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ab-pulso { 0% { box-shadow: 0 6px 18px rgba(90, 63, 255, .4), 0 0 0 0 rgba(255, 95, 122, .55); } 70%, 100% { box-shadow: 0 6px 18px rgba(90, 63, 255, .4), 0 0 0 14px rgba(255, 95, 122, 0); } }
@keyframes ab-brillo { 0%, 55% { left: -60%; } 100% { left: 140%; } }
@keyframes ab-baja { 0%, 100% { transform: translateY(-1.4px); opacity: .75; } 50% { transform: translateY(2px); opacity: 1; } }
@keyframes ab-sacude { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-9deg); } 90% { transform: rotate(8deg); } 94% { transform: rotate(-5deg); } 97% { transform: rotate(3deg); } }
@media (max-width: 520px) {
  .top .app-b { width: 38px; height: 38px; padding: 0; gap: 0; }
  .top .app-b .ab-t { display: none; }
  .top .app-b svg { width: 21px; height: 21px; }
}
@media (prefers-reduced-motion: reduce) { .app-b, .app-b::after, .app-b svg, .app-b .ab-flecha { animation: none; } }

/* Logo de la marca: a color en el tema claro (sin el recuadro oscuro) y en blanco en el oscuro */
.brand-logo.brand-claro { height: 34px; padding: 4px 0; border-radius: 0; background: none; }
.brand-logo.brand-claro.lg { height: 48px; }
.brand-logo.brand-oscuro { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.brand-claro { display: none; }
  :root:not([data-theme="light"]) .brand-logo.brand-oscuro { display: block; }
}
:root[data-theme="dark"] .brand-logo.brand-claro { display: none; }
:root[data-theme="dark"] .brand-logo.brand-oscuro { display: block; }
@media (max-width: 640px) { .top .brand-logo.brand-claro { height: 26px; padding: 4px 0; } }
@media (max-width: 520px) { .top .brand-logo.brand-claro { height: 22px; padding: 4px 0; } }

/* Ingreso con huella o rostro */
.pk-sep { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--mute); font-size: 13px; font-weight: 600; }
.pk-sep::before, .pk-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pk-btn { display: flex; width: 100%; justify-content: center; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 4px; }
.pk-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pk-btn:disabled { opacity: .7; cursor: progress; }
#pk-err { margin-top: 10px; }
.pk-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 16px; background: var(--soft); }
.pk-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--vio-soft); color: var(--vio); }
.pk-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-t { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.pk-t b { font: 700 14.5px var(--f); }
.pk-t small { color: var(--mute); font-size: 12.5px; }
.pk-b { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 520px) { .pk-b { width: 100%; } .pk-b .btn { flex: 1; } }

/* ---------- Ingreso (login y verificacion): panel de marca + formulario ---------- */
.ing { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.ing-marca { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; padding: clamp(32px, 5vw, 76px); color: #eeecff; background: linear-gradient(160deg, #2b1e8a 0%, #1a1252 46%, #0f0b2a 100%); }
.ing-halo { position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); animation: ing-flota 9s ease-in-out infinite alternate; }
.ing-halo.a { width: 52vmin; height: 52vmin; left: -14vmin; top: -12vmin; background: #5a3fff; opacity: .6; }
.ing-halo.b { width: 40vmin; height: 40vmin; right: -10vmin; bottom: -12vmin; background: #ff5f7a; opacity: .3; animation-delay: -4s; }
.ing-marca-in { position: relative; width: 100%; max-width: 580px; }
.ing-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 700 12px var(--f); letter-spacing: .16em; text-transform: uppercase; color: #b9b3e6; }
.ing-eyebrow::before { content: ""; width: 26px; height: 10px; background: linear-gradient(#ffc23d 0 3px, transparent 3px 7px, #ffc23d 7px 10px); transform: skewX(-18deg); border-radius: 2px; }
.ing-lema { position: relative; margin: 0 0 18px; font: 800 clamp(36px, 4.4vw, 62px)/1.02 var(--disp); letter-spacing: -.035em; color: #fff; }
.ing-sub { position: relative; white-space: nowrap; }
.ing-sub::after { content: ""; position: absolute; left: -3%; right: -3%; bottom: .06em; height: .17em; z-index: -1; background: #ffc23d; transform: skewX(-18deg); border-radius: 3px; transform-origin: left; animation: ing-subraya .7s .9s cubic-bezier(.2, .8, .2, 1) both; }
.ing-bajada { max-width: 30em; margin: 0 0 clamp(22px, 4vh, 40px); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; color: #c9c4ee; }
.ing-grafico { display: block; width: 100%; height: auto; overflow: visible; }
.ig-rej line { stroke: rgba(255, 255, 255, .11); stroke-width: 1; stroke-dasharray: 3 7; }
.ig-entra, .ig-sale { fill: none; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: ing-traza 2s cubic-bezier(.55, .1, .25, 1) forwards; }
.ig-entra { stroke: url(#ig-lin); stroke-width: 4.5; animation-delay: .5s; }
.ig-sale { stroke: #ff7b92; stroke-width: 4; animation-delay: .8s; }
.ig-area { opacity: 0; animation: ing-aparece 1.2s 1.7s ease forwards; }
.ig-punto { opacity: 0; animation: ing-aparece .4s 2.4s ease forwards; }
.ig-punto circle { fill: #fff; stroke: #8a74ff; stroke-width: 4; }
.ig-punto .ig-onda { fill: none; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ing-onda 2.2s 2.4s ease-out infinite; }
.ig-mes text { fill: #9a95c4; font: 700 11px var(--f); letter-spacing: .1em; }
.ing-leyenda { display: flex; gap: 20px; margin: 16px 0 0; padding: 0; list-style: none; font: 600 13px var(--f); color: #c9c4ee; }
.ing-leyenda li { display: flex; align-items: center; gap: 8px; }
.ing-leyenda i { width: 22px; height: 4px; border-radius: 4px; background: #8a74ff; }
.ing-leyenda i.s { background: #ff7b92; }

.ing-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 32px; overflow: hidden; }
.ing-panel::before { content: ""; position: absolute; right: -22vmin; top: -26vmin; width: 62vmin; height: 62vmin; border-radius: 50%; background: radial-gradient(closest-side, rgba(90, 63, 255, .17), transparent); pointer-events: none; }
.ing-tema { position: absolute; top: 20px; right: 20px; z-index: 2; }
.ing-caja { position: relative; width: 100%; max-width: 396px; animation: ing-entra .7s cubic-bezier(.2, .8, .2, 1) both; }
.ing-logo { margin: 0 0 clamp(26px, 5vh, 44px); }
.ing-logo .brand-logo { padding-left: 0; padding-right: 0; }
.ing-t { margin: 0 0 8px; font: 800 clamp(28px, 3vw, 36px)/1.08 var(--disp); letter-spacing: -.03em; }
.ing-s { margin: 0 0 28px; font-size: 15px; line-height: 1.55; color: var(--mute); }
.ing-s b { color: var(--ink); }
.ing .err { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--coral-soft); color: var(--neg); font-size: 14px; font-weight: 600; }
.ing .ok-msg { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--mint-soft); color: var(--pos); font-size: 14px; font-weight: 600; }
.ing-campo { margin-bottom: 16px; }
.ing-campo label { margin-bottom: 7px; font: 700 13px var(--f); color: var(--ink); }
.ing-in { position: relative; }
.ing-in > svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); stroke: var(--mute); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .15s; }
.ing-in:focus-within > svg { stroke: var(--vio); }
.ing-in input, .ing-campo .code-in { height: 54px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); font-size: 15.5px; transition: border-color .15s, box-shadow .15s; }
.ing-in input { padding: 0 16px 0 48px; }
.ing-in.pw-wrap input { padding-right: 54px; }
.ing-campo .code-in { height: 66px; }
.ing-in input:focus, .ing-campo .code-in:focus { border-color: var(--vio); background: var(--card); box-shadow: 0 0 0 4px rgba(90, 63, 255, .16); }
.ing-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin-top: 8px; border: 0; border-radius: 16px; cursor: pointer; color: #fff; font: 800 16px var(--f); background: linear-gradient(120deg, #5a3fff, #7a52ff 55%, #9a5cff); box-shadow: 0 14px 30px -10px rgba(90, 63, 255, .7); transition: transform .15s, filter .15s; }
.ing-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ing-btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.ing-btn:hover svg { transform: translateX(4px); }
.ing-btn:active { transform: scale(.985); }
.ing-btn:disabled { opacity: .75; cursor: progress; transform: none; }
.ing-btn:focus-visible, .ing-bio:focus-visible { outline: 3px solid var(--vio); outline-offset: 3px; }
.ing-bio { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin-bottom: 0; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font: 700 15.5px var(--f); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.ing-bio svg { width: 24px; height: 24px; fill: none; stroke: var(--vio); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ing-bio:hover { border-color: var(--vio); background: var(--vio-soft); transform: translateY(-1px); }
.ing-bio.recordado { border-color: var(--vio); background: var(--vio-soft); color: var(--vio); }
.ing-bio:disabled { opacity: .7; cursor: progress; transform: none; }
.ing .pk-sep { margin: 20px 0; }
.ing #pk-err { margin: 12px 0 0; }
.ing .vf-alt { margin-top: 18px; }
.ing .sw { margin: 2px 0 16px; }
.ing-pie { margin: 30px 0 0; font: 700 12px var(--f); letter-spacing: .08em; color: var(--mute); }

@keyframes ing-flota { to { transform: translate(5vmin, -4vmin) scale(1.12); } }
@keyframes ing-entra { from { opacity: 0; transform: translateY(16px); } }
@keyframes ing-traza { to { stroke-dashoffset: 0; } }
@keyframes ing-aparece { to { opacity: 1; } }
@keyframes ing-onda { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
@keyframes ing-subraya { from { transform: skewX(-18deg) scaleX(0); } }

@media (max-width: 960px) {
  .ing { grid-template-columns: 1fr; }
  .ing-marca { display: none; }
  .ing-panel { justify-content: flex-start; padding-top: 84px; min-height: 100vh; min-height: 100dvh; }
  .ing-panel::before { right: -30vmin; top: -34vmin; width: 90vmin; height: 90vmin; }
}
@media (max-width: 420px) { .ing-panel { padding: 76px 18px 28px; } .ing-tema { top: 14px; right: 14px; } }
@media (max-height: 640px) and (min-width: 961px) { .ing-logo { margin-bottom: 20px; } .ing-s { margin-bottom: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .ing-halo, .ing-caja, .ing-sub::after, .ig-onda { animation: none; }
  .ig-entra, .ig-sale { animation: none; stroke-dashoffset: 0; }
  .ig-area, .ig-punto { animation: none; opacity: 1; }
}

/* Tablet: el menu inferior con todos sus iconos se compacta para no salirse por el lado derecho */
@media (min-width: 701px) and (max-width: 960px) {
  .dock { gap: 4px; padding: 7px 9px; max-width: calc(100vw - 16px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .dock::-webkit-scrollbar { display: none; }
  .dock a { width: 42px; height: 42px; border-radius: 13px; }
  .dock a:hover { transform: none; }
  .dock a::after { display: none; }
  .dock .sep { height: 22px; margin: 0 2px; }
  .dock svg { width: 20px; height: 20px; }
}

/* Notificaciones (Configuracion): el nombre del registro y sus etiquetas (Admin, Contadora...) van en lineas separadas, sin invadir las columnas de iconos */
.av-tab .av-nom { display: block; margin: 0 0 4px; }
.av-tab .av-dest { display: flex; flex-wrap: wrap; gap: 4px; }
.av-tab .av-reg small { margin-top: 5px; }
@media (min-width: 761px) { #av-matriz th.av-reg { width: 250px; } }
.av-tab thead .av-g { white-space: normal; line-height: 1.25; }

/* ---------- Vistas de las listas contables: Tabla, Tarjetas y Lista (vistas.js) ---------- */
.vt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
.vt-n { font: 700 13px var(--f); color: var(--mute); }
.vt-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--soft); }
.vt-seg button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: var(--mute); font: 700 13px var(--f); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.vt-seg button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vt-seg button:hover { color: var(--ink); }
.vt-seg button.on { background: var(--card); color: var(--vio); box-shadow: 0 1px 6px rgba(20, 14, 60, .12), 0 0 0 1px var(--line); }
.vt-seg button:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 1px; }
@media (max-width: 560px) { .vt-seg button { padding: 0 14px; } .vt-seg button span { display: none; } }

[data-vista="tarjetas"] > table, [data-vista="lista"] > table { display: none !important; }

/* Tabla: la de siempre, mas aireada */
@media (min-width: 901px) {
  [data-vista="tabla"] > table { border-collapse: separate; border-spacing: 0; }
  [data-vista="tabla"] > table thead th { padding: 11px 12px; background: var(--soft); border-bottom: 0; }
  [data-vista="tabla"] > table thead th:first-child { border-radius: 12px 0 0 12px; }
  [data-vista="tabla"] > table thead th:last-child { border-radius: 0 12px 12px 0; }
  [data-vista="tabla"] > table tbody td { padding: 15px 12px; }
  [data-vista="tabla"] > table tbody tr:hover td { background: var(--soft); }
  [data-vista="tabla"] > table tbody tr:hover td:first-child { border-radius: 14px 0 0 14px; }
  [data-vista="tabla"] > table tbody tr:hover td:last-child { border-radius: 0 14px 14px 0; }
  [data-vista="tabla"] > table td.actions .ib { opacity: .55; transition: opacity .15s, background .15s, color .15s; }
  [data-vista="tabla"] > table tbody tr:hover td.actions .ib { opacity: 1; }
}

/* Tarjetas */
.vt-alt { animation: vt-in .3s ease both; }
.vt-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.vc { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--card); transition: transform .18s, box-shadow .18s, border-color .18s; }
.vc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--vio), var(--coral)); opacity: 0; transition: opacity .18s; }
.vc:hover, .vc:focus-within { transform: translateY(-3px); border-color: var(--vio-soft); box-shadow: 0 14px 34px rgba(90, 63, 255, .14); }
.vc:hover::before, .vc:focus-within::before { opacity: 1; }
.vc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.vc-fecha { padding: 4px 11px; border-radius: 999px; background: var(--soft); color: var(--mute); font: 700 12px var(--f); white-space: nowrap; }
.vc-fecha:empty { display: none; }
.vc-est { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.vc-t { font: 700 17px/1.25 var(--disp); letter-spacing: -.01em; overflow-wrap: anywhere; }
.vc-sub { display: grid; gap: 4px; color: var(--mute); font-size: 13.5px; }
.vc-monto { margin-top: 2px; font: 800 26px/1.1 var(--disp); letter-spacing: -.03em; }
.vc-monto .num, .vl-monto .num { font: inherit; }
.vc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 2px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line); }
.vc-meta dt { font: 700 10.5px var(--f); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.vc-meta dd { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.vc-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.vc-acc { display: flex; }
.vt-arch { display: inline-flex; align-items: center; gap: 4px; color: var(--mute); font: 600 12.5px var(--f); white-space: nowrap; }

/* Lista: linea de tiempo agrupada por dia */
.vt-lista { display: grid; gap: 20px; }
.vl-dia { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font: 800 12px var(--f); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.vl-dia::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.vl-filas { display: grid; gap: 8px; }
.vl-fila { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.vl-fila:hover, .vl-fila:focus-within { border-color: var(--vio); box-shadow: 0 8px 24px rgba(90, 63, 255, .1); }
.vl-av { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); font: 800 18px var(--disp); }
.vl-av.ico { --c: var(--vio); }
.vl-av.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vl-main { min-width: 0; }
.vl-t { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.vl-t b { font-weight: 700; }
.vl-det { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; color: var(--mute); font-size: 13px; }
.vl-der { display: grid; justify-items: end; gap: 5px; text-align: right; }
.vl-monto { font: 800 17px var(--disp); letter-spacing: -.02em; white-space: nowrap; }
.vl-est { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.vl-acc { display: flex; opacity: .35; transition: opacity .15s; }
.vl-fila:hover .vl-acc, .vl-fila:focus-within .vl-acc { opacity: 1; }
@media (hover: none) { .vl-acc { opacity: 1; } }
@media (max-width: 760px) {
  .vl-fila { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px 12px; }
  .vl-av { width: 42px; height: 42px; border-radius: 13px; }
  .vl-acc { grid-column: 1 / -1; justify-content: flex-end; opacity: 1; padding-top: 8px; border-top: 1px solid var(--line); }
}

/* Los iconos de proyecto y marca dentro de tarjetas y filas se ven como en la tabla */
.vc .ic-text, .vl-fila .ic-text { display: inline-flex; align-items: center; gap: 8px; }
.vc .ic-text .ico, .vl-fila .ic-text .ico { width: 26px; height: 26px; border-radius: 8px; }
.vc .ic-text .ico svg, .vl-fila .ic-text .ico svg { width: 15px; height: 15px; }
.vc .ic-text .ico.brand img, .vl-fila .ic-text .ico.brand img { width: 17px; height: 17px; }
.vc .ic-text small.sub-act, .vl-fila .ic-text small.sub-act { display: block; color: var(--mute); font-size: 12px; font-weight: 500; line-height: 1.2; }

@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .vt-alt { animation: none; } .vc, .vl-fila { transition: none; } .vc:hover { transform: none; } }

.vl-det i { margin-right: 4px; font: 700 10.5px var(--f); font-style: normal; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); opacity: .85; }

/* Tablet y celular: "Tabla" es una tabla de verdad (con desplazamiento lateral y la columna principal fija); las tarjetas son las tarjetas */
.vt-hint { display: none; }
@media (max-width: 900px) {
  [data-vista="tabla"] { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px 6px; }
  [data-vista="tabla"] > table.rt { display: table; min-width: 860px; border-collapse: separate; border-spacing: 0; }
  [data-vista="tabla"] > table.rt thead { display: table-header-group; }
  [data-vista="tabla"] > table.rt tbody { display: table-row-group; }
  [data-vista="tabla"] > table.rt tr { display: table-row; margin: 0; padding: 0; background: none; border-radius: 0; }
  [data-vista="tabla"] > table.rt th, [data-vista="tabla"] > table.rt td { display: table-cell; padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
  [data-vista="tabla"] > table.rt th.r, [data-vista="tabla"] > table.rt td.r { text-align: right; }
  [data-vista="tabla"] > table.rt td::before { content: none; }
  [data-vista="tabla"] > table.rt td.actions { display: table-cell; margin: 0; padding: 8px 8px 8px 12px; border-top: 0; white-space: nowrap; text-align: right; }
  [data-vista="tabla"] > table.rt td.actions .ib { width: 38px; height: 38px; margin-left: 4px; background: var(--soft); }
  [data-vista="tabla"] > table.rt td .ic-text { text-align: left; }
  [data-vista="tabla"] > table.rt thead th { background: var(--soft); border-bottom: 0; padding: 11px 12px; }
  [data-vista="tabla"] > table.rt thead th:first-child { border-radius: 12px 0 0 12px; }
  [data-vista="tabla"] > table.rt thead th:last-child { border-radius: 0 12px 12px 0; }
  [data-vista="tabla"] > table.rt tbody tr:last-child td { border-bottom: 0; }
  [data-vista="tabla"] > table.rt .vt-fija { position: sticky; left: 0; z-index: 2; background: var(--card); box-shadow: 1px 0 0 var(--line), 6px 0 10px -6px rgba(20, 14, 60, .22); }
  [data-vista="tabla"] > table.rt thead .vt-fija { background: var(--soft); border-radius: 12px 0 0 12px; }
  [data-vista="tabla"] > table.rt .vt-fija.vt-fija-1 { border-radius: 0; }
  .vt-bar[data-vista="tabla"] .vt-hint { display: inline; }
  .vt-bar[data-vista="tabla"] .vt-n { display: none; }
  .vt-hint { font: 600 12.5px var(--f); color: var(--mute); }
}
@media (max-width: 900px) {
  [data-vista="tabla"] > table.rt { min-width: 100%; width: max-content; }
  [data-vista="tabla"] > table.rt td { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
  [data-vista="tabla"] > table.rt td.vt-fija { white-space: normal; min-width: 190px; max-width: 240px; }
  [data-vista="tabla"] > table.rt td small { white-space: normal; }
}

.vc-monto small { display: block; margin-bottom: 2px; font: 700 10.5px var(--f); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.vl-lbl { font: 700 10.5px var(--f); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }

/* ---------- Actividad: Tabla, Tarjetas y Lista ---------- */
.ev-list .ev-dia { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; font: 800 12px var(--f); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.ev-list .ev-dia::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ev-list .ev-dia:first-child { margin-top: 6px; }
.ev-list[data-vista="lista"] .ev { align-items: start; margin-bottom: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.ev-list[data-vista="lista"] .ev:hover { border-color: var(--vio); box-shadow: 0 8px 24px rgba(90, 63, 255, .1); }
.ev-list[data-vista="lista"] .ev-t { padding: 5px 0; border-radius: 10px; background: var(--vio-soft); color: var(--vio); font: 800 13px var(--disp); text-align: center; }
.ev-list[data-vista="tarjetas"] { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.ev-list[data-vista="tarjetas"] .ev-dia { grid-column: 1 / -1; margin: 10px 0 0; }
.evc { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); transition: transform .18s, box-shadow .18s, border-color .18s; }
.evc:hover { transform: translateY(-3px); border-color: var(--vio-soft); box-shadow: 0 14px 34px rgba(90, 63, 255, .14); }
.evc-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.evc .ev-d { margin: 0; }
.evc .ev-x { margin-top: 0; }
.evc-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--mute); font: 800 13px var(--disp); }
.evc-pie .ev-ip { margin: 0; font-family: var(--f); }
.ev-list[data-vista="tabla"] { display: block; }
.ev-sc { overflow-x: auto; overscroll-behavior-x: contain; }
.ev-tab { width: 100%; min-width: 820px; border-collapse: separate; border-spacing: 0; }
.ev-tab thead th { padding: 11px 12px; background: var(--soft); border-bottom: 0; }
.ev-tab thead th:first-child { border-radius: 12px 0 0 12px; }
.ev-tab thead th:last-child { border-radius: 0 12px 12px 0; }
.ev-tab td { padding: 14px 12px; vertical-align: top; }
.ev-tab tbody tr:hover td { background: var(--soft); }
.ev-tab .ev-fh { white-space: nowrap; font: 700 13px var(--disp); color: var(--mute); }
.ev-tab .ev-dc { min-width: 280px; }
.ev-tab .ev-dc .ev-d { margin: 0; }
.ev-tab .ev-ipc { white-space: nowrap; color: var(--mute); font-size: 12.5px; }
.ev-tab .ev-ch td { padding: 6px 8px 6px 0; }
@media (max-width: 900px) { .ev-sc { margin: 0 -4px; padding: 0 4px 6px; } }

/* Proyectos: las columnas (maximo 3 actividades) se reparten todo el ancho; si la pantalla es angosta, el tablero se desliza como antes */
@media (min-width: 641px) {
  #bd > .bd-col, #bd > .bd-col.bd-new { flex: 1 1 0; width: auto; min-width: 300px; max-width: none; }
  #bd > .bd-col.bd-new { flex: 0 0 280px; min-width: 280px; }
}

/* Detalles de una tarea del checklist */
.tk-id { margin-top: 4px; color: var(--mute); font-size: 13.5px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.tk-id.ed { cursor: text; border-radius: 8px; }
.tk-id.ed:hover { background: var(--soft); }
.tk-id a { color: var(--vio); }
.tk-it.done .tk-id { opacity: .75; }
.tk-idb { margin: 3px 0 0; padding: 2px 8px 2px 0; border: 0; background: none; color: var(--mute); font: 600 12.5px var(--f); cursor: pointer; opacity: 0; transition: opacity .15s, color .15s; }
.tk-it:hover .tk-idb, .tk-idb:focus-visible { opacity: 1; }
.tk-idb:hover { color: var(--vio); }
@media (hover: none) { .tk-idb { opacity: .8; } }
.tk-idt { width: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 10px; font: 500 13.5px/1.45 var(--f); resize: vertical; min-height: 64px; }

/* Descripcion del checklist (debajo de la barra de progreso) */
.tk-cd { margin: 2px 0 10px; color: var(--mute); font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.tk-cd.ed { cursor: text; border-radius: 8px; }
.tk-cd.ed:hover { background: var(--soft); }
.tk-cd a { color: var(--vio); }
.tk-cdb { margin: 0 0 8px; padding: 2px 8px 2px 0; border: 0; background: none; color: var(--mute); font: 600 12.5px var(--f); cursor: pointer; opacity: .75; transition: opacity .15s, color .15s; }
.tk-cdb:hover, .tk-cdb:focus-visible { opacity: 1; color: var(--vio); }
.tk-cdt { width: 100%; margin: 2px 0 10px; padding: 8px 10px; border-radius: 10px; font: 500 14px/1.45 var(--f); resize: vertical; min-height: 56px; }

/* Calendario: tareas del checklist con su propia fecha de cierre */
.cal-chip.tar { display: flex; align-items: center; gap: 4px; border-left-style: dashed; background: color-mix(in srgb, var(--c, var(--vio)) 8%, var(--card)); font-weight: 600; }
.cal-chip.tar b { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 16px; padding: 0 3px; border-radius: 6px; background: var(--c, var(--vio)); color: #fff; font: 800 9.5px var(--f); letter-spacing: .02em; }
.cal-chip.tar.late b { background: var(--neg); }
.cal-ti { flex: none; width: 9px; height: 9px; border: 1.8px solid currentColor; border-radius: 3px; opacity: .75; }
.cal-chip.tar.done .cal-ti { background: currentColor; }
.cal-row.tar .cal-rt::before { content: "\2610  "; opacity: .6; }
.cal-row.tar.done .cal-rt::before { content: "\2611  "; }

/* ---------- Selector desplegable (selector.js) y version compacta del selector de fechas en las tareas ---------- */
.sx-t, .dp-c { display: inline-flex; align-items: center; gap: 6px; height: 24px; max-width: 160px; padding: 0 8px 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font: 600 12px var(--f); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.sx-t:hover, .dp-c:hover, .sx-t[aria-expanded="true"], .dp-c[aria-expanded="true"] { background: var(--vio-soft); color: var(--vio); }
.sx-t[aria-expanded="true"], .dp-c[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--vio); }
.sx-t:focus-visible, .dp-c:focus-visible { outline: 2.5px solid var(--vio); outline-offset: 1px; }
.sx-t:not(.sx-sin) { color: var(--ink); }
.sx-t > svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.dp-c svg { width: 14px; height: 14px; }
.dp-c .dp-v { overflow: hidden; text-overflow: ellipsis; }
.sx-v { overflow: hidden; text-overflow: ellipsis; }
.sx-v.sx-vacio { font-weight: 600; opacity: .85; }
.sx-av { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--vio)); color: #fff; font: 800 11px var(--f); letter-spacing: .02em; }
.sx-av.sm { width: 18px; height: 18px; font-size: 8.5px; }
.sx-av.nadie { background: var(--soft); color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--line); }
.sx-av.nadie svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sx { position: fixed; z-index: 130; display: flex; flex-direction: column; min-width: 220px; max-width: calc(100vw - 16px); max-height: min(340px, 60vh); padding: 8px; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 18px 50px rgba(20, 14, 60, .28), 0 0 0 1.5px var(--line); animation: dp-in .14s ease-out; }
.sx-b { flex: none; height: 38px; margin-bottom: 6px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 14px; }
.sx-b:focus { border-color: var(--vio); background: var(--card); box-shadow: 0 0 0 3px rgba(90, 63, 255, .16); }
.sx-l { display: grid; gap: 2px; overflow-y: auto; scrollbar-width: thin; }
.sx-o { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 600 14px var(--f); text-align: left; cursor: pointer; }
.sx-o.act { background: var(--soft); }
.sx-o.on { color: var(--vio); }
.sx-o:focus-visible { outline: 2.5px solid var(--vio); outline-offset: -2px; }
.sx-o svg { flex: none; width: 18px; height: 18px; margin-left: auto; fill: none; stroke: var(--vio); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sx-o .sx-av svg { margin: 0; stroke: currentColor; width: 60%; height: 60%; }
.sx-ot { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-ning { padding: 16px; color: var(--mute); font-size: 13.5px; text-align: center; }
.sx.sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 70vh; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; animation: dp-up .2s ease-out; }
.sx.sheet::before { content: ""; display: block; flex: none; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--line); }
@media (prefers-reduced-motion: reduce) { .sx { animation: none; } }

/* En las tareas del checklist lo vacio solo se muestra al pasar el mouse (igual que antes) */
.tk-cl .tk-im .sx-t.vacio, .tk-cl .tk-im .dp-c.vacio { display: none; }
.tk-cl .tk-it:not(.meta) .tk-im .sx-t.vacio, .tk-cl .tk-it:not(.meta) .tk-im .dp-c.vacio,
.tk-cl .tk-it.meta:hover .tk-im .sx-t.vacio, .tk-cl .tk-it.meta:hover .tk-im .dp-c.vacio,
.tk-cl .tk-it.meta:focus-within .tk-im .sx-t.vacio, .tk-cl .tk-it.meta:focus-within .tk-im .dp-c.vacio { display: inline-flex; opacity: .85; }
@media (hover: none) { .tk-cl .tk-im .sx-t.vacio, .tk-cl .tk-im .dp-c.vacio { display: inline-flex; opacity: .7; } }

/* Orden de una tarea: titulo, luego sus detalles y al final responsable y fecha (siempre en filas separadas) */
.tk-cl .tk-ic > .tk-itt, .tk-cl .tk-ic > .tk-iti { order: 0; }
.tk-cl .tk-ic > .tk-id, .tk-cl .tk-ic > .tk-idt, .tk-cl .tk-ic > .tk-idb { order: 1; flex: 0 0 100%; min-width: 0; text-align: left; }
.tk-cl .tk-ic > .tk-id, .tk-cl .tk-ic > .tk-idt { margin-bottom: 2px; }
.tk-cl .tk-ic > .tk-im { order: 2; flex: 0 0 100%; }
.tk-cl .tk-it:not(.meta) .tk-ic > .tk-im { flex: none; }
