:root {
  --bg: #FBFAF8;
  --side: #F5F2EE;
  --lane: #F3EFEA;
  --card: #FFFFFF;
  --line: #E7E2DC;
  --line2: #D9D2CA;
  --ink: #1A1717;
  --ink2: #3B3535;
  --muted: #645B5B;
  --accent: #B3122E;
  --accent-fg: #B3122E;
  --rosa: #F3C9CF;
  --accent-soft: #FBE3E7;
  --accent-ink: #9E1028;
  --ok: #2F7D6D;
  --ok-soft: #DDF0EA;
  --warn: #7A4A06;
  --warn-soft: #FDF0DC;
  --info: #1D4F8F;
  --info-soft: #E3EEFB;
  --radius: 14px;
  --serif: 'Times New Roman', Tinos, Times, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(26,23,23,.05), 0 6px 18px rgba(26,23,23,.05);
  --track: #EFEAE4;
  --subtle: #F7F5F2;
  --subtle2: #FAF8F6;
  --hover: rgba(255,255,255,.7);
  --topbar: rgba(251,250,248,.94);
  --on-ink: #FFFFFF;
  --chipbg: #F0ECE7;
  --fthumb: #F4F7FC;
  --fthumb-line: #DCE5F3;
  --input: #FFFFFF;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.ast { display: inline-block; width: 1em; height: 1em; font-size: 64px; line-height: 1; flex: none; vertical-align: middle; }
.boot .ast { font-size: 56px; animation: cr-pulse 1.6s ease-in-out infinite; }
@keyframes cr-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.9); opacity: .7; } }
.logo { display: block; height: auto; aspect-ratio: 962.2 / 239; }

/* ---------- pantalla de bienvenida: se escribe «Creando», sube el «!» y cae el slogan ---------- */
.splash { --ink: #1A1717; --accent: #B3122E; color-scheme: light; position: fixed; inset: 0; z-index: 200; background: #FBFAF8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; transition: opacity .45s ease; cursor: pointer; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-logo { position: relative; width: min(78vw, 440px); aspect-ratio: 962.2 / 239; }
.splash-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.splash .slogan { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 5.2vw, 28px); color: #1A1717; text-align: center; }
.splash .slogan .it { font-style: italic; }
.splash .slogan span { display: inline-block; }
.splash .slogan .acc { color: #B3122E; font-weight: 700; }
.splash.play .bang { animation: cr-rise .62s cubic-bezier(.3,1.7,.55,1) 1.93s both; }
/* versión tranquila (si el dispositivo pide menos movimiento): aparece sin escribirse */
.splash.calm .splash-logo, .splash.calm .slogan { animation: cr-fade .8s ease both; }
.splash.calm .slogan { animation-delay: .35s; }
@keyframes cr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cr-rise { from { transform: translateY(46%); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
.splash.play .slogan span { animation: cr-drop .7s cubic-bezier(.2,.8,.3,1) both; }
.splash.play .slogan span:nth-child(1) { animation-delay: 2.48s; } .splash.play .slogan span:nth-child(2) { animation-delay: 2.58s; }
.splash.play .slogan span:nth-child(3) { animation-delay: 2.72s; } .splash.play .slogan span:nth-child(4) { animation-delay: 2.82s; }
@keyframes cr-drop { 0% { transform: translateY(-.9em); opacity: 0; } 45% { transform: translateY(.16em); opacity: 1; } 68% { transform: translateY(-.07em); } 84% { transform: translateY(.03em); } 100% { transform: none; opacity: 1; } }

/* ---------- layout ---------- */
.shell { min-height: 100vh; display: flex; }
.side { width: 264px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; }
.brand .logo { width: 150px; }
.brand b { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.brand b i { font-style: normal; color: var(--accent-fg); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--ink2); background: none; border: 0; cursor: pointer; text-align: left; width: 100%; font-size: 14px; }
.nav a:hover, .nav button:hover { background: var(--hover); }
.nav a.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(26,23,23,.05); }
.nav svg { flex: none; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.nav .badge { margin-left: auto; }
.side-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; display: flex; align-items: center; justify-content: space-between; }
.side-label button { border: 0; background: none; cursor: pointer; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; }
.side-label button:hover { background: var(--hover); color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.dot.round { border-radius: 50%; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: none; }
.scrim { display: none; }

@media (max-width: 900px) {
  .side { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(26,23,23,.35); z-index: 39; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--topbar); backdrop-filter: blur(8px); padding: 10px 16px; border-bottom: 1px solid var(--line); padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar .brand .logo { width: 116px; }
  .topbar .brand b { font-size: 19px; }
  .main { padding: 18px 16px 48px; }
}

/* ---------- elementos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #BDB3A9; }
.btn.dark { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 500; }
.btn.dark:hover { background: #333; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--side); }
.btn.danger { color: var(--accent-ink); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--chipbg); color: var(--ink2); }
.chip.extra { background: var(--accent-soft); color: var(--accent-ink); }
.chip.ok { background: var(--ok-soft); color: #1E5A4E; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.info { background: var(--info-soft); color: var(--info); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; flex: none; border: 2px solid var(--card); }
.av.lg { width: 36px; height: 36px; font-size: 13px; }
.av.xl { width: 72px; height: 72px; font-size: 22px; }
.av { overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-photo { display: flex; align-items: center; gap: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
#me-file:focus-visible + span, label[for="me-file"]:focus-within { outline: 2px solid var(--ink); }
.avs { display: flex; }
.avs .av + .av { margin-left: -8px; }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s; }
.bar.lg { height: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink2); font-weight: 500; }
.field small { font-weight: 400; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--input); font-size: 15px; color: var(--ink); font-weight: 400; }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(26,23,23,.08); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1.05; letter-spacing: -.01em; }
.h1 em { color: var(--accent-fg); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line2); border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .ast { font-size: 44px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line2); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatch.none { background: repeating-linear-gradient(45deg, var(--card) 0 4px, var(--track) 4px 8px); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: 0; background: none; padding: 0; min-height: 40px; font-size: 14px; text-align: left; }
.toggle .tr { width: 40px; height: 24px; border-radius: 999px; background: #CFC7BF; position: relative; flex: none; transition: background .15s; }
.toggle .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle[aria-checked="true"] .tr { background: var(--accent); }
.toggle[aria-checked="true"] .tr::after { left: 19px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--track); gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; text-decoration: none; color: var(--ink2); border: 0; background: none; cursor: pointer; }
.seg .on { background: var(--ink); color: var(--on-ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tab { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; text-decoration: none; color: var(--ink2); }
.tab:hover { background: var(--side); }
.tab.on { background: var(--ink); color: var(--on-ink); }

/* ---------- encabezado de vista ---------- */
.vhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px; justify-content: space-between; }
.vhead .t { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.month-bar { display: flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.months { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; min-width: 0; padding: 2px; }
.months::-webkit-scrollbar { display: none; }
.mchip { flex: none; height: 34px; min-width: 52px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink2); border: 1px solid var(--line2); background: var(--card); white-space: nowrap; }
.mchip:hover { border-color: #BDB3A9; }
.mchip.now { border-color: var(--accent); color: var(--accent-ink); }
.mchip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mp-grid .mchip { height: 44px; font-size: 15px; }
.mchip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.progress-line { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink2); flex-wrap: wrap; }
.progress-line .bar { width: 220px; }

/* ---------- tablero ---------- */
.board-wrap { overflow-x: auto; margin: 0 -32px; padding: 0 32px 12px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 18px; align-items: start; min-width: min-content; }
.lane { background: var(--lane); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.lane-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; }
.lane-h h2 { margin: 0; font-size: 14px; font-weight: 600; }
.lane-h .n { font-size: 13px; color: var(--muted); }
.lane-list { display: flex; flex-direction: column; gap: 12px; min-height: 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgba(26,23,23,.04); cursor: pointer; text-decoration: none; color: var(--ink); position: relative; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; display: flex; gap: 8px; align-items: flex-start; }
.card h3 .dot { margin-top: 5px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.card .meta .l { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.card .meta svg { vertical-align: -2px; }
.card .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.card .prog { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.card .prog .bar { flex: 1; }
.late { color: var(--accent-fg) !important; font-weight: 600; }
.thumb { border-radius: 10px; aspect-ratio: 4/5; background: var(--track) center/cover no-repeat; position: relative; overflow: hidden; }
.thumb .count { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); color: #1A1717; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.thumb .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; text-align: center; padding: 12px; }
.sortable-ghost { opacity: .35; }
.sortable-chosen .card, .card.sortable-chosen { box-shadow: 0 12px 30px rgba(26,23,23,.18); }
.quick-add { display: flex; gap: 6px; }
.quick-add input { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line2); padding: 0 10px; background: var(--input); font-size: 14px; }
.add-btn { min-height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; color: var(--ink2); text-align: left; padding: 0 8px; cursor: pointer; }
.add-btn:hover { background: var(--hover); }

/* ---------- tarea ---------- */
.task-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.task-grid.solo { justify-content: center; }
.task-grid.solo .task-right { max-width: 760px; flex-basis: 760px; }
.addbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.addbar .lbl { margin-right: 2px; }
.addchip { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--line2); background: var(--card); color: var(--ink2); font: inherit; font-size: 14px; cursor: pointer; }
.addchip svg { width: 15px; height: 15px; flex: none; }
.addchip:hover { border-style: solid; border-color: var(--ink2); color: var(--ink); }
.addchip.has { border-style: solid; background: var(--subtle); }
.addchip b { font-size: 12px; font-weight: 600; background: var(--chipbg); border-radius: 999px; padding: 1px 7px; }
@media (max-width: 900px) {
  .task-right .blk-note { order: 3; } .task-right .blk-check { order: 4; } .task-right .blk-file { order: 5; }
  .task-right .blk-props { order: 6; } .task-right .blk-appr { order: 7; } .task-right .blk-comment { order: 8; } .task-right .blk-hist { order: 9; }
  .task-right > .stack:first-child { order: 1; } .task-right .addbar { order: 2; }
}
.task-left { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.task-right { flex: 1 1 400px; min-width: 0; max-width: 600px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .task-left { position: static; } }
.stage { background: var(--track); border-radius: 20px; padding: 24px; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.stage .frame { width: 100%; max-width: 440px; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 12px 32px rgba(26,23,23,.14); position: relative; }
.stage iframe { width: 100%; height: 100%; border: 0; }
.stage .frame .cover { position: absolute; inset: 0; background: center/cover no-repeat; }
.design-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.design-strip button { flex: none; width: 64px; aspect-ratio: 4/5; border-radius: 8px; border: 2px solid transparent; background: var(--track) center/cover; cursor: pointer; padding: 0; position: relative; }
.design-strip button.on { border-color: var(--ink); }
.title-input { width: 100%; border: 0; background: transparent; font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.12; padding: 2px 0; border-radius: 8px; resize: none; overflow: hidden; }
.title-input:hover { background: rgba(0,0,0,.025); }
.title-input:focus { outline: none; background: var(--input); box-shadow: 0 0 0 1px var(--line2); }
.props { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; align-items: center; font-size: 14px; }
.props > span { color: var(--muted); font-size: 13px; }
.props .input { min-height: 38px; padding: 6px 10px; font-size: 14px; }
@media (max-width: 520px) { .props { grid-template-columns: 1fr; } .props > span { margin-top: 8px; } }
.editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: var(--subtle); }
.tool { min-width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.tool:hover { background: var(--card); }
.tool .hl { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line2); }
.sep { width: 1px; height: 20px; background: var(--line2); margin: 0 6px; }
.editor { min-height: 120px; padding: 12px 14px; border-radius: 10px; border: 1px solid transparent; font-size: 15px; line-height: 1.6; outline: none; }
.editor:hover { border-color: var(--line); }
.editor:focus { border-color: var(--line2); background: var(--input); }
.editor:empty::before { content: attr(data-ph); color: var(--muted); }
.editor p, .editor div { margin: 0 0 6px; }
.richtext mark, .editor mark { padding: 1px 4px; border-radius: 4px; color: inherit; }
mark[data-c="y"] { background: #FCE98A; }
mark[data-c="p"] { background: #F8C6D2; }
mark[data-c="l"] { background: #DCD3F0; }
mark[data-c="g"] { background: #CFEADF; }
mark[data-c="b"] { background: #CFE2F7; }
.check { display: flex; align-items: center; gap: 10px; min-height: 38px; font-size: 14px; border-radius: 8px; padding: 0 4px; }
.check:hover { background: var(--subtle2); }
.check button.box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #B9B0A7; background: var(--input); display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; padding: 0; }
.check.done button.box { background: var(--ink); border-color: var(--ink); }
.check.done .t { color: var(--muted); text-decoration: line-through; }
.check .t { flex: 1; min-width: 0; }
.check .x { opacity: 0; }
.check:hover .x, .check:focus-within .x { opacity: 1; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.file { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; font-size: 12px; line-height: 1.3; color: var(--ink); position: relative; }
.file .fthumb { aspect-ratio: 1/1; border-radius: 10px; background: var(--fthumb) center/cover no-repeat; border: 1px solid var(--fthumb-line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.file .fname { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.file .fby { color: var(--muted); }
.drop { aspect-ratio: 1/1; border-radius: 10px; border: 1.5px dashed var(--line2); background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--ink2); text-align: center; padding: 8px; }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--card); }
.comment { display: flex; gap: 10px; }
.comment .b { font-size: 14px; line-height: 1.5; min-width: 0; flex: 1; white-space: pre-wrap; word-break: break-word; }
.comment .b small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.approval { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.approval .btn.on-approved { background: var(--ok-soft); border-color: #9FD3C4; color: #1E5A4E; }
.approval .btn.on-changes { background: var(--accent-soft); border-color: #F0A8B5; color: var(--accent-ink); }
.approval .btn.on-pending { background: var(--warn-soft); border-color: #EBC98F; color: var(--warn); }

/* ---------- hoy ---------- */
.hoy-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .hoy-grid { grid-template-columns: 1fr; } }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list-item:hover { box-shadow: var(--shadow); }
.list-item .mini { width: 44px; height: 55px; border-radius: 8px; background: var(--track) center/cover; flex: none; }
.list-item .tx { flex: 1; min-width: 0; }
.list-item .tx b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .tx span { font-size: 13px; color: var(--muted); }
.notif { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); align-items: flex-start; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.notif:hover { background: var(--side); }
.notif .d { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex: none; }
.notif.read .d { background: transparent; }
.notif b { font-size: 14px; display: block; }
.notif span { font-size: 13px; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: #B3122E; color: #FFFFFF; }
.banner .ast { font-size: 34px; --mark-c: #FFFFFF; --mark-bang: #1A1717; }
.banner p { margin: 0; flex: 1; min-width: 200px; font-size: 14px; }
.banner .btn { border-color: #FFFFFF; background: #FFFFFF; color: #1A1717; }

/* ---------- calendario ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--side); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; }
.cal .day { background: var(--card); min-height: 118px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day.out { background: var(--subtle2); }
.cal .day.out .num { color: #B5ABA3; }
.cal .day.today .num { background: var(--accent); color: #fff; }
.cal .num { font-size: 13px; font-weight: 600; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.cal .ev { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 6px; border-radius: 6px; text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 24px; }
.cal .ev:hover { filter: brightness(.96); }
.cal .ev.pub { background: transparent !important; border: 1px dashed var(--line2); }
.cal .ev.done { opacity: .55; text-decoration: line-through; }
.cal .more { font-size: 11px; color: var(--muted); padding-left: 6px; }
.cal-mobile { display: none; }
.cal-mini { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-mini .dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.cal-mini .d { aspect-ratio: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; font: inherit; color: var(--muted); cursor: default; }
.cal-mini .d.out { border: 0; background: none; }
.cal-mini .d b { font-size: 14px; font-weight: 500; }
.cal-mini .d.has { color: var(--ink); cursor: pointer; }
.cal-mini .d.has b { font-weight: 700; }
.cal-mini .d.today { border-color: var(--accent); }
.cal-mini .d.today b { color: var(--accent-ink); }
.cal-mini .dots { display: flex; gap: 2px; height: 6px; }
.cal-mini .dots i { width: 6px; height: 6px; border-radius: 50%; }
.cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.cal-agenda .aday { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); scroll-margin-top: 80px; transition: box-shadow .3s; }
.cal-agenda .aday.today { border-color: var(--accent); }
.cal-agenda .aday.flash { box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-agenda .ev, .undated-list .ev { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); min-height: 40px; }
.cal-agenda .ev.pub { background: transparent !important; border: 1px dashed var(--line2); }
.cal-agenda .ev.done, .undated-list .ev.done { opacity: .55; text-decoration: line-through; }
.undated-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
@media (max-width: 760px) {
  .cal { display: none; }
  .cal-mobile { display: flex; flex-direction: column; gap: 16px; }
  .undated-list { grid-template-columns: 1fr; }
  .month-bar { width: 100%; }
  .month-bar { flex-wrap: wrap; row-gap: 8px; }
  .months { flex: 1 1 calc(100% - 84px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
  .months { flex: 1; }
}

/* ---------- feed ---------- */
.feed-wrap { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.phone { flex: 1 1 440px; max-width: 600px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 10px; overflow: hidden; }
.tile { aspect-ratio: 4/5; position: relative; background: var(--track) center/cover no-repeat; display: flex; align-items: flex-end; padding: 10px; text-decoration: none; color: var(--ink); cursor: grab; overflow: hidden; }
.tile .st { position: absolute; top: 6px; right: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.94); }
.tile .tt { font-size: 12px; font-weight: 600; color: #1A1717; background: rgba(255,255,255,.9); padding: 3px 6px; border-radius: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.nod { background: repeating-linear-gradient(135deg, var(--subtle) 0 10px, var(--subtle2) 10px 20px); }

/* ---------- progreso ---------- */
.prog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.stacked { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--track); }
.stacked i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi b { display: block; font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1; margin-top: 6px; }
.line-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--track); text-decoration: none; color: var(--ink); }
.line-row:last-child { border-bottom: 0; }

/* ---------- modales y avisos ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(26,23,23,.42); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { background: var(--bg); border-radius: 20px; width: 100%; max-width: 560px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 18px; animation: up .18s ease; }
.modal.wide { max-width: 860px; }
.modal.full { max-width: 1100px; padding: 16px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-h h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.viewer { width: 100%; height: min(78vh, 900px); border: 0; border-radius: 12px; background: #fff; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; padding-bottom: env(safe-area-inset-bottom); }
.toast { background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: up .2s ease; max-width: 90vw; }
.toast.err { background: var(--accent); }

/* ---------- acceso ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: #F4EFEA; color: #1A1717; color-scheme: light; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .big { position: relative; z-index: 1; max-width: 540px; font-style: normal; font-family: var(--serif); font-size: 48px; line-height: 1; font-weight: 400; font-style: italic; }
.auth-art .big em { color: #B3122E; font-style: italic; background: linear-gradient(transparent 62%, #F3C9CF 62%, #F3C9CF 92%, transparent 92%); padding: 0 .06em; }
.auth-art .big b { font-weight: 700; }
.auth-art .bigast { position: absolute; right: -90px; bottom: -130px; width: 440px; height: 440px; opacity: .7; --mark-c: #F3C9CF; --mark-bang: #E6DCD5; pointer-events: none; }
.auth-art .logo { width: 190px; --logo-ink: #1A1717; --logo-red: #B3122E; }
.auth-art .big .sub { display: block; font-size: .5em; margin-top: 18px; line-height: 1.4; color: #3B3535; }
.auth-art .big .sub i { font-style: italic; } .auth-art .big .sub b { color: #B3122E; }
.auth-form { padding: 48px 24px; display: flex; align-items: center; justify-content: center; }
.auth-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { min-height: 220px; padding: 28px; } .auth-art .big { font-size: 30px; } .auth-art .bigast { width: 230px; height: 230px; bottom: -60px; right: -40px; } }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.auto-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--track); }
.auto-item:last-child { border-bottom: 0; }
.auto-item .tx { flex: 1; }
.auto-item .tx b { display: block; font-size: 15px; }
.auto-item .tx span { font-size: 13px; color: var(--muted); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--chipbg); padding: 8px 10px; border-radius: 8px; word-break: break-all; }
.tpl-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; grid-template-columns: 1fr 120px 120px 90px auto; gap: 8px; align-items: start; background: var(--card); }
@media (max-width: 700px) { .tpl-item { grid-template-columns: 1fr 1fr; } }
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--track); flex-wrap: wrap; }
.member:last-child { border-bottom: 0; }
.member .tx { flex: 1; min-width: 160px; }
.member .tx b { display: block; }
.member .tx span { font-size: 13px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-size: 14px; min-height: 40px; }
.checks input { width: 18px; height: 18px; accent-color: var(--ink); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; background: var(--card); font-size: 14px; }
.radio-cards label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.radio-cards input { margin-top: 3px; accent-color: var(--ink); }
.radio-cards small { display: block; color: var(--muted); font-size: 12px; }
.menu-pop { position: absolute; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; display: flex; flex-direction: column; }
.menu-pop button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.menu-pop button:hover { background: var(--side); }
@media (max-width: 900px) { .board-wrap { margin: 0 -16px; padding: 0 16px 12px; } }

/* link de Canva debajo del diseño: chiquito y discreto, para copiarlo */
.d-link { display: flex; align-items: center; gap: 8px; margin-top: -6px; min-width: 0; font-size: 12px; color: var(--muted); }
.d-link a { color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.d-link a:hover { text-decoration: underline; color: var(--ink2); }
.d-copy { flex: none; border: 0; background: none; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink2); cursor: pointer; min-height: 28px; }
.d-copy:hover { background: var(--side); }
.d-copy.ok { color: #1E5A4E; }

/* =================== MODO OSCURO =================== */
:root[data-theme="dark"] {
  --bg: #141212; --side: #1B1818; --lane: #1E1A1A; --card: #242020; --line: #332D2C; --line2: #463F3C;
  --ink: #F3EEEA; --ink2: #DCD4CE; --muted: #ABA19B; --accent: #B3122E; --accent-fg: #F2B8C2; --rosa: #5A2630; --accent-soft: #3B1A22; --accent-ink: #F2B8C2;
  --ok: #5CC0A8; --ok-soft: #16302A; --warn: #F2BC6E; --warn-soft: #33270F; --info: #93BCF5; --info-soft: #18263A;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --track: #302A29; --subtle: #1E1B1B; --subtle2: #1B1818; --hover: rgba(255,255,255,.06); --topbar: rgba(20,18,18,.92);
  --on-ink: #141212; --chipbg: #2E2827; --fthumb: #1E2430; --fthumb-line: #2D3646; --input: #1C1919;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141212; --side: #1B1818; --lane: #1E1A1A; --card: #242020; --line: #332D2C; --line2: #463F3C;
    --ink: #F3EEEA; --ink2: #DCD4CE; --muted: #ABA19B; --accent: #B3122E; --accent-fg: #F2B8C2; --rosa: #5A2630; --accent-soft: #3B1A22; --accent-ink: #F2B8C2;
    --ok: #5CC0A8; --ok-soft: #16302A; --warn: #F2BC6E; --warn-soft: #33270F; --info: #93BCF5; --info-soft: #18263A;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --track: #302A29; --subtle: #1E1B1B; --subtle2: #1B1818; --hover: rgba(255,255,255,.06); --topbar: rgba(20,18,18,.92);
    --on-ink: #141212; --chipbg: #2E2827; --fthumb: #1E2430; --fthumb-line: #2D3646; --input: #1C1919;
    color-scheme: dark;
  }
}
/* detalles que en oscuro necesitan otro tono */
:root[data-theme="dark"] .chip.ok, :root[data-theme="dark"] .approval .btn.on-approved { color: #8FE0C9; border-color: #2E5E52; }
:root[data-theme="dark"] .check button.box { border-color: #6A615D; }
:root[data-theme="dark"] .banner .btn { border-color: #FFFFFF; }
:root[data-theme="dark"] .approval .btn.on-changes { border-color: #6B2A39; }
:root[data-theme="dark"] .approval .btn.on-pending { border-color: #6B5221; }
:root[data-theme="dark"] mark[data-c] { color: #1A1717; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.ok, :root:not([data-theme="light"]) .approval .btn.on-approved { color: #8FE0C9; border-color: #2E5E52; }
  :root:not([data-theme="light"]) .check button.box { border-color: #6A615D; }
  :root:not([data-theme="light"]) .banner .btn { border-color: var(--on-ink); }
  :root:not([data-theme="light"]) mark[data-c] { color: #1A1717; }
}

/* =================== BUSCADOR =================== */
.side-search { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; font-size: 14px; text-align: left; }
.side-search span { flex: 1; }
.side-search:hover { border-color: var(--line2); color: var(--ink2); }
kbd { font-family: var(--sans); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2); background: var(--subtle); color: var(--muted); }
.modal.search-modal { max-width: 640px; padding: 0; gap: 0; overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-in input { flex: 1; border: 0; background: none; font-size: 17px; color: var(--ink); min-height: 40px; outline: none; }
.search-res { max-height: min(62vh, 560px); overflow-y: auto; padding: 8px; }
.search-tip { margin: 0; padding: 18px 10px; font-size: 14px; }
.sgroup { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.sgroup .lbl { padding: 4px 10px; }
.sitem { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); width: 100%; }
.sitem.sel, .sitem:hover { background: var(--subtle); }
.sitem .mini { width: 36px; height: 44px; border-radius: 7px; background: var(--track) center/cover; flex: none; color: var(--muted); }
.sitem .mini.round { width: 36px; height: 36px; border-radius: 50%; }
.sitem .tx { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sitem .tx b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sitem .tx span, .sitem .tx small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
mark.hit { background: #FCE98A; color: #1A1717; border-radius: 3px; padding: 0 1px; }

/* =================== MENCIONES Y COMENTARIOS =================== */
.mention { color: var(--info); font-weight: 600; background: var(--info-soft); border-radius: 4px; padding: 0 3px; }
.mention-pop { position: absolute; left: 0; top: 100%; z-index: 40; margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; min-width: 220px; display: flex; flex-direction: column; }
.mention-pop button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; color: var(--ink); min-height: 40px; }
.mention-pop button.sel, .mention-pop button:hover { background: var(--subtle); }
.client-av { background: var(--info-soft); color: var(--info); border-color: var(--card); }
.comment.from-client .b { background: var(--info-soft); border-radius: 10px; padding: 8px 10px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* =================== ETIQUETAS =================== */
.lchip { background: color-mix(in srgb, var(--lc) 14%, var(--card)); color: var(--ink2); }
.ldot { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); flex: none; display: inline-block; }
.ldot.big { width: 14px; height: 14px; }
.chips.lchips { margin-top: -2px; }
.lbl-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.lchip-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink2); font-size: 13px; cursor: pointer; }
.lchip-btn.on { background: color-mix(in srgb, var(--lc) 18%, var(--card)); border-color: var(--lc); color: var(--ink); font-weight: 600; }

/* =================== VISTA LISTA =================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.ltable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1240px; }
.ltable td:nth-child(3) .cell, .ltable td:nth-child(4) .cell { min-width: 150px; }
.ltable td:nth-child(5) .cell, .ltable td:nth-child(6) .cell { min-width: 140px; }
.ltable td:nth-child(7) .cell, .ltable td:nth-child(8) .cell { min-width: 110px; }
.ltable th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--subtle); position: sticky; top: 0; white-space: nowrap; }
.ltable td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ltable tr:last-child td { border-bottom: 0; }
.ltable tr.picked td { background: var(--info-soft); }
.ltable tr.arch td { opacity: .7; }
.ltable .cchk { width: 40px; text-align: center; position: sticky; left: 0; background: inherit; }
.ltable .cchk input, .ltable th input { width: 18px; height: 18px; accent-color: var(--ink); }
.ltable .ttl { min-width: 220px; max-width: 320px; }
.ltable .ttl a { font-weight: 600; text-decoration: none; }
.ltable .ttl a:hover { text-decoration: underline; }
.ltable .lbls { min-width: 130px; }
.ltable .lbls-in { display: flex; flex-wrap: wrap; gap: 4px; }
.th-sort { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 4px; border-radius: 6px; }
.th-sort.on { color: var(--ink); font-weight: 600; }
.input.cell { min-height: 34px; padding: 4px 8px; font-size: 13px; border-color: transparent; background: transparent; border-radius: 8px; }
.input.cell:hover { border-color: var(--line2); }
.input.cell:focus { background: var(--input); border-color: var(--ink); }
.input.cell.saved { box-shadow: 0 0 0 2px var(--ok-soft); border-color: var(--ok); }
.input.cell.late { color: var(--accent-ink); font-weight: 600; }
.bulkbar { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: var(--ink); color: var(--on-ink); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.bulkbar[hidden] { display: none; }
.bulkbar b { font-size: 14px; margin-right: 4px; }
.bulkbar .input { width: auto; min-height: 36px; padding: 4px 10px; font-size: 13px; border-radius: 999px; background: var(--card); color: var(--ink); border-color: transparent; }
.bulkbar .bfield { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.bulkbar .btn { background: var(--card); color: var(--ink); border-color: transparent; }
.bulkbar .btn.ghost { background: transparent; color: var(--on-ink); }

/* =================== LINK PARA EL CLIENTE, PAPELERA =================== */
.share-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trash-row:last-child { border-bottom: 0; }
.trash-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trash-row .tx span { font-size: 13px; color: var(--muted); }

/* =================== FICHA DE MARCA =================== */
.brand-grid { columns: 2 340px; column-gap: 18px; }
.brand-grid > .panel { break-inside: avoid; margin-bottom: 18px; }
.logo-box { background: repeating-conic-gradient(var(--subtle) 0 25%, var(--card) 0 50%) 0 0/18px 18px; border: 1px solid var(--line); border-radius: 14px; min-height: 160px; display: grid; place-items: center; padding: 18px; }
.logo-box img { max-height: 180px; max-width: 100%; object-fit: contain; }
.logo-box.sm { width: 120px; min-height: 90px; padding: 10px; }
.logo-box.sm img { max-height: 80px; }
.pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.pal-sw { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 6px 6px 10px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; text-align: left; color: var(--ink); }
.pal-sw .sw { height: 64px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.pal-sw b { font-size: 13px; padding: 0 4px; }
.pal-sw span:last-child { font-size: 12px; color: var(--muted); padding: 0 4px; font-family: ui-monospace, Menlo, monospace; }
.pal-sw:hover { box-shadow: var(--shadow); }
.font-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.font-row:last-child { border-bottom: 0; }
.font-row b { font-size: 17px; }
.brand-p { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.ok-panel { border-left: 4px solid var(--ok); }
.no-panel { border-left: 4px solid var(--accent); }
.brand-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.brow { gap: 8px; flex-wrap: wrap; }
.cpick { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line2); border-radius: 10px; background: none; cursor: pointer; }

/* =================== PRESUPUESTOS =================== */
.bud-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.bud-row:hover { background: var(--subtle); }
.bud-row .tx { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.bud-row .tx span { font-size: 13px; color: var(--muted); }
.bud-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; }
.bud-t { font-variant-numeric: tabular-nums; }
.bud-mode { display: none; align-self: flex-start; }
.bud-mode button { height: 34px; }
.bud-grid { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(380px, 1.1fr); gap: 22px; align-items: start; }
.bud-form { display: flex; flex-direction: column; gap: 14px; }
.bud-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.bud-paper { background: var(--track); border-radius: 16px; padding: 18px; max-height: calc(100vh - 110px); overflow: auto; }
.bitem { display: grid; grid-template-columns: 90px 1fr 1fr 34px; grid-template-areas: "main main main main" "qty price sub rm"; gap: 8px; align-items: end; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.bitem .bi-main { grid-area: main; }
.bitem .bi-n:nth-of-type(1) { grid-area: qty; }
.bitem .bi-n:nth-of-type(2) { grid-area: price; }
.bitem .bi-sub { grid-area: sub; }
.bitem .bi-rm { grid-area: rm; }
.bi-main { display: flex; flex-direction: column; gap: 6px; }
.bi-detail { min-height: 38px; font-size: 13px; resize: none; overflow: hidden; }
.bi-n { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.bi-n .input { min-height: 44px; padding: 6px 8px; }
.bi-sub { font-size: 14px; font-weight: 600; padding-bottom: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.bitem .bi-rm { margin-bottom: 4px; }
.srow { display: grid; grid-template-columns: 1.2fr 1.4fr 110px 34px; gap: 8px; align-items: center; }
@media (max-width: 980px) {
  .bud-mode { display: inline-flex; }
  .bud-grid { grid-template-columns: 1fr; }
  .bud-grid[data-mode="edit"] .bud-preview { display: none; }
  .bud-grid[data-mode="preview"] .bud-form { display: none; }
  .bud-preview { position: static; }
  .bud-paper { max-height: none; padding: 8px; }
}
@media (max-width: 560px) {
  .bitem { grid-template-columns: 70px 1fr 34px; grid-template-areas: "main main main" "qty price rm" "sub sub sub"; }
  .bi-sub { padding-bottom: 0; }
  .srow { grid-template-columns: 1fr 34px; }
  .srow .sv-detail { grid-column: 1; }
  .srow .sv-price { grid-column: 1; }
}

/* documento del presupuesto (siempre claro, como papel) */
.bdoc { --bc: #B3122E; background: #fff; color: #1A1717; font-family: var(--sans); font-size: 13px; line-height: 1.5; padding: 40px 42px 32px; border-radius: 4px; box-shadow: 0 10px 30px rgba(26,23,23,.12); max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; color-scheme: light; }
.bd-h { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.bd-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bd-brand img { max-height: 64px; max-width: 160px; object-fit: contain; }
.bd-brand b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.bd-brand span { color: #645B5B; font-size: 13px; }
.bd-meta { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; color: #645B5B; }
.bd-meta b { font-family: var(--serif); font-size: 24px; color: var(--bc); font-weight: 600; }
.bd-k { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8A8080; font-weight: 600; margin-bottom: 2px; }
.bd-bar { height: 4px; border-radius: 4px; background: var(--bc); }
.bd-to { display: flex; gap: 40px; flex-wrap: wrap; }
.bd-to b { display: block; font-size: 15px; }
.bd-to span { color: #3B3535; }
.bd-items { width: 100%; border-collapse: collapse; }
.bd-items th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8A8080; font-weight: 600; padding: 8px 6px; border-bottom: 2px solid var(--bc); }
.bd-items td { padding: 10px 6px; border-bottom: 1px solid #ECE7E1; vertical-align: top; }
.bd-items td span { display: block; color: #645B5B; font-size: 12px; margin-top: 2px; }
.bd-items .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bd-empty { color: #A79D97; text-align: center; padding: 24px !important; }
.bd-totals { align-self: flex-end; min-width: 260px; display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
.bd-totals > div { display: flex; justify-content: space-between; gap: 24px; }
.bd-total { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bc) 10%, #fff); align-items: center; }
.bd-total b { font-size: 20px; color: var(--bc); }
.bd-sec p { margin: 0; color: #3B3535; }
.bd-f { border-top: 1px solid #ECE7E1; padding-top: 12px; display: flex; flex-direction: column; gap: 4px; color: #645B5B; font-size: 12px; text-align: center; }
@media (max-width: 560px) { .bdoc { padding: 22px 18px; } .bd-meta { align-items: flex-start; text-align: left; } .bd-totals { min-width: 0; width: 100%; } }
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
  :root { color-scheme: light !important; }
  html, body.printing { background: #fff !important; }
  body.printing .bdoc { box-shadow: none; max-width: none; padding: 0; border-radius: 0; }
  .bdoc, .bd-bar, .bd-total { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =================== PRIMEROS PASOS =================== */
.onb .bar { height: 8px; }
.onb .bar > i { background: var(--ok); }
.onb-list { display: flex; flex-direction: column; }
.onb-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.onb-step:last-child { border-bottom: 0; }
.onb-step .tx { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.onb-step .tx span { font-size: 13px; color: var(--muted); }
.onb-step.done .tx b { text-decoration: line-through; color: var(--muted); }
.onb-c { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.onb-step.done .onb-c { background: var(--ok); border-color: var(--ok); }
.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 6px 4px; }
.welcome .ast { font-size: 56px; }
.welcome-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; }
.welcome-steps > div { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.welcome-steps > div > b { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.welcome-steps span { font-size: 14px; color: var(--ink2); }
.welcome-steps span b { display: block; color: var(--ink); }

/* =================== PIEZA: pasos e historial =================== */
.step-meta { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line2); background: none; border-radius: 999px; padding: 2px 8px 2px 2px; min-height: 30px; cursor: pointer; font-size: 12px; color: var(--muted); }
.step-meta .av { width: 22px; height: 22px; font-size: 9px; border-width: 0; }
.step-meta.set { border-style: solid; color: var(--ink2); }
.step-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.check:not(:hover) .step-meta:not(.set) { opacity: .55; }
.hist-toggle { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); width: 100%; text-align: left; min-height: 32px; }
.hist { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; }
.hist-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.hist-row small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .bulkbar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; border-radius: 14px; scrollbar-width: none; }
  .bulkbar::-webkit-scrollbar { display: none; }
  .bulkbar > * { flex: none; }
  .bulkbar b { white-space: nowrap; }
  .main:has(.bulkbar:not([hidden])) { padding-bottom: 90px; }
}

/* =================== v6: formatos, extras, rondas =================== */
.extras-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink2); }
.extras-line b { color: var(--ink); }
.st-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border: 1px solid color-mix(in srgb, var(--sc) 45%, var(--line)); background: color-mix(in srgb, var(--sc) 14%, var(--card)); color: var(--ink); border-radius: 999px; font-size: 12px; font-weight: 500; padding: 2px 10px; min-height: 26px; cursor: pointer; }
.st-chip .ldot { --lc: var(--sc); }
.st-chip:hover { border-color: var(--sc); }
.rounds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); width: 100%; }
.rounds small { font-size: 12px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font: inherit; }
.ex-client { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.ex-client:first-of-type { border-top: 0; }
.ex-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-kinds span { background: var(--chipbg); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.to-board { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 7%, var(--card)); }
.to-board.hidden-tb { display: none; }
.colrow input[type="color"] { flex: none; }

/* =================== Banco de ideas =================== */
.tagbar { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink2); font-size: 13px; text-decoration: none; }
.tagchip span { color: var(--muted); font-size: 11px; }
.tagchip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); min-width: 0; }
.idea h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.idea-body { margin: 0; font-size: 14px; color: var(--ink2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.idea-tags { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; }
.idea-tags a { color: var(--info); text-decoration: none; }
.idea-actions { gap: 6px; margin-top: auto; }
.idea.used { opacity: .62; }
.idea.used:hover { opacity: 1; }

/* =================== Fechas especiales =================== */
.soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.soon-item { background: color-mix(in srgb, var(--dc) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--dc) 35%, var(--line)); border-left: 4px solid var(--dc); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.soon-item span { font-size: 13px; color: var(--muted); }
.soon-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.soon-row:first-of-type { border-top: 0; }
.soon-row .ldot { margin-top: 6px; }
.soon-row .tx { display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.soon-row .tx span { font-size: 12px; color: var(--muted); }
.cat-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.date-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.date-row:first-of-type { border-top: 0; }
.date-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.date-row .tx span { font-size: 12px; color: var(--muted); }
.date-row .tx em { color: var(--accent-ink); font-style: normal; font-weight: 600; }
.date-row.past { opacity: .5; }
.dchip { width: 44px; height: 44px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--dc) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--dc) 40%, var(--line)); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.dchip b { font-size: 17px; }
.dchip small { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.sd { display: block; font-size: 11px; line-height: 1.25; padding: 2px 6px; margin: 2px 0; border-radius: 6px; background: color-mix(in srgb, var(--dc) 16%, var(--card)); color: var(--ink); border-left: 3px solid var(--dc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aday .sd { white-space: normal; font-size: 13px; padding: 5px 8px; margin: 4px 0; }
.sdot { font-style: normal; font-size: 9px; color: var(--accent-fg); line-height: 1; }

/* =================== Briefs =================== */
.brief-ed { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; align-items: start; }
.qed { background: var(--subtle); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.qed-top { gap: 8px; flex-wrap: wrap; }
.qed-top .q-label { min-width: 180px; font-weight: 500; }
.qed-bot { gap: 4px; }
.qn { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tpl-grid > .panel { display: flex; flex-direction: column; gap: 10px; }
.tpl-add { border: 1.5px dashed var(--line2); background: none; cursor: pointer; font-size: 15px; color: var(--muted); min-height: 150px; font-family: inherit; }
.tpl-add:hover { color: var(--ink); border-color: var(--ink2); }
.answers { display: flex; flex-direction: column; gap: 0; }
.ans { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.ans:first-child { border-top: 0; padding-top: 0; }
.ans b { font-size: 13px; color: var(--muted); font-weight: 600; }
.ans p { margin: 0; white-space: pre-wrap; }
@media (max-width: 860px) { .brief-ed { grid-template-columns: 1fr; } }

/* =================== Reporte =================== */
.rd-title { font-family: var(--serif); font-size: 30px; font-weight: 500; margin: 0; line-height: 1.1; }
.rd-title em { color: var(--bc); font-style: italic; }
.rd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.rd-kpis > div { background: #F7F5F2; border-radius: 10px; padding: 12px 14px; }
.rd-kpis b { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--bc); line-height: 1; }
.rd-kinds { margin: -8px 0 0; color: #3B3535; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.rd-p { display: flex; flex-direction: column; gap: 4px; break-inside: avoid; min-width: 0; }
.rd-p b { font-size: 12.5px; line-height: 1.3; }
.rd-p span { font-size: 11px; color: #645B5B; }
.rd-img { aspect-ratio: 4 / 5; border-radius: 8px; background-size: cover; background-position: center top; border: 1px solid #E7E2DC; }
@media (max-width: 560px) { .rd-title { font-size: 24px; } .rd-grid { grid-template-columns: repeat(2, 1fr); } }

/* Mover columnas del tablero y piezas sin nombre */
.lane-grip { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; margin: -4px 0 -4px -6px; border-radius: 8px; display: grid; place-items: center; cursor: grab; flex: none; touch-action: none; opacity: .55; }
.lane:hover .lane-grip, .lane-grip:focus-visible { opacity: 1; }
.lane-grip:hover { background: var(--hover); color: var(--ink); }
.lane-grip:active { cursor: grabbing; }
.card h3.untitled { color: var(--muted); font-style: italic; font-weight: 500; }

/* v15 · tarjetas compactas: portada chica a la izquierda, vista rápida a la derecha */
.board { grid-auto-columns: 316px; }
.card { flex-direction: row; gap: 12px; padding: 10px; align-items: flex-start; }
.card .cbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.card.has-thumb .thumb { flex: none; width: 92px; aspect-ratio: 4/5; border-radius: 8px; }
.card .thumb .count { top: 5px; right: 5px; padding: 1px 7px; font-size: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.card h3 { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .dates { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--ink2); }
.card .dates > span { display: inline-flex; align-items: center; gap: 4px; }
.card .dates svg { width: 13px; height: 13px; }
.card .chips { gap: 4px; }
.card .chips .chip { font-size: 11px; height: 22px; padding: 0 8px; }
.card .meta .av, .card .meta .avatar { transform: scale(.9); }
.quick-add { flex-wrap: nowrap; align-items: stretch; }
.quick-add input { min-width: 0; }
.quick-add .split { display: inline-flex; flex: none; }
.quick-add .split .btn { border-radius: 10px 0 0 10px; }
.quick-add .split .btn.more { border-radius: 0 10px 10px 0; padding: 0 8px; border-left: 1px solid rgba(255,255,255,.25); min-width: 34px; }
@media (max-width: 600px) { .board { grid-auto-columns: min(316px, 86vw); } }
.status-panel { grid-column: 1 / -1; }
.st-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.st-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--side); font-size: 14px; line-height: 1.4; }
.st-row .muted { font-size: 13px; }
.st-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: #A79D97; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.st-green .st-dot { background: #2E8B57; } .st-yellow .st-dot { background: #D99A1E; } .st-red .st-dot { background: #B3122E; }
/* v16 · barra horizontal del tablero fija abajo de la pantalla */
.board-wrap { scrollbar-width: none; }
.board-wrap::-webkit-scrollbar { display: none; }
.hbar { position: sticky; bottom: 0; z-index: 6; margin: -10px -32px 0; height: 22px; padding: 5px 4px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(4px); border-top: 1px solid var(--line); cursor: pointer; touch-action: none; }
.hbar .hthumb { height: 12px; border-radius: 999px; background: var(--line2); transition: background .15s; cursor: grab; }
.hbar:hover .hthumb, .hbar:focus-visible .hthumb { background: var(--muted); }
.hbar.drag .hthumb { background: var(--ink2); cursor: grabbing; }
.hbar.off { display: none; }
@media (max-width: 900px) { .hbar { margin-left: -16px; margin-right: -16px; } }
@media (pointer: coarse) { .board-wrap { scrollbar-width: auto; } .board-wrap::-webkit-scrollbar { display: initial; } .hbar { display: none; } }
/* v16 · portal del cliente (lado del equipo) */
.blk-portal { gap: 12px; }
.portal-st { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--side); line-height: 1.4; }
.portal-st span { font-size: 13px; color: var(--muted); }
.portal-st.pending { background: color-mix(in srgb, #D99A1E 14%, var(--card)); }
.portal-st.approved { background: color-mix(in srgb, #2F7D6D 14%, var(--card)); }
.portal-st.changes { background: color-mix(in srgb, #B3122E 12%, var(--card)); }
.pt-ev summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 0; }
.pt-row { font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.pt-thread { display: flex; flex-direction: column; gap: 8px; }
.pt-msg { font-size: 14px; background: var(--side); border-radius: 12px; padding: 8px 12px; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
.pt-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.pt-msg b { font-size: 12px; } .pt-msg small { color: var(--muted); font-size: 12px; }
.ps-files { display: flex; flex-direction: column; gap: 6px; }
.ps-file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 13px; }
.ps-file img, .ps-file > span:first-child { width: 40px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; display: grid; place-items: center; background: var(--side); }
.ps-file .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.pb-row { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pb-row:has(input:disabled) { opacity: .55; cursor: default; }
.pb-th { width: 40px; height: 50px; border-radius: 6px; background: var(--side) center/cover; flex: none; }
.pb-t { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.pb-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-bar { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 999px; padding: 8px 8px 8px 18px; font-size: 14px; max-width: calc(100% - 32px); }

/* ---------- Propuestas ---------- */
.pp-seen { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.pp-seen svg { color: var(--muted); }
.err-line { color: var(--accent-fg); font-size: 14px; margin: 0; min-height: 0; }
.err-line:empty { display: none; }
.pw-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.pw-steps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--track); color: var(--muted); }
.pw-steps span.on { background: var(--ink); color: var(--on-ink); }
.pw-steps span.done { color: var(--ink2); }
.pw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pw-card { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; color: var(--ink); font: inherit; }
.pw-card:hover { border-color: var(--ink2); }
.pw-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pw-card b { font-size: 15px; }
.pw-card span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.pw-card em { font-style: normal; font-size: 11.5px; color: var(--accent-fg); margin-top: 4px; }
.pw-ic { width: 28px; height: 28px; color: var(--accent-fg); margin-bottom: 4px; }
.pw-ic svg { width: 100%; height: 100%; }
.pw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink2); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.pw-chip:hover { border-color: var(--ink2); }
.pw-chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.prop-paper { padding: 0; background: transparent; }
.prop-paper .cp { border-radius: 14px; box-shadow: var(--shadow); }
.prop-grid { grid-template-columns: minmax(340px, 1fr) minmax(400px, 1.25fr); }
.pe-sec .pe-st { display: block; font-size: 15px; }
.pe-sec .pe-sh { display: block; font-size: 12.5px; color: var(--muted); }
.pe-sec.off .pe-body { display: none; }
.pe-sec.off .pe-st { color: var(--muted); }
.pe-body { display: flex; flex-direction: column; gap: 10px; }
.pe-hint { font-size: 13px; color: var(--muted); margin: 0; }
.pe-warn { font-size: 13px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.pe-row { display: flex; gap: 8px; align-items: center; }
.pe-row .input { min-width: 0; }
.pe-stage .input:first-child { flex: 1.2; } .pe-stage .input:nth-child(2) { flex: 1; }
.pe-del .input[data-k="name"] { flex: 1.1; } .pe-del .input[data-k="detail"] { flex: 1.3; }
.pe-icon { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--input); color: var(--accent-fg); display: grid; place-items: center; cursor: pointer; padding: 9px; }
.pe-icon svg, .pe-icons svg { width: 100%; height: 100%; }
.pe-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pe-icons button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font: inherit; font-size: 12px; }
.pe-icons button svg { width: 26px; height: 26px; color: var(--accent-fg); }
.pe-icons button.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pe-opt { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--subtle); }
.pe-rec { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.pe-media { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-th { position: relative; width: 84px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.pe-th img { width: 100%; height: 100%; object-fit: cover; }
.pe-th button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 999px; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pe-th button svg { width: 12px; height: 12px; }
.pe-add { display: inline-flex; align-items: center; justify-content: center; min-height: 64px; padding: 0 14px; border: 1.5px dashed var(--line2); border-radius: 10px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.pe-add:hover { border-color: var(--ink2); }
.pe-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pe-style { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.pe-style b { font-size: 13.5px; } .pe-style small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pe-style.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pe-sw { display: block; height: 54px; border-radius: 8px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.pe-sw-editorial { background: linear-gradient(var(--a) 0 58%, #FBF8F3 58%); }
.pe-sw-editorial::after { content: ''; position: absolute; left: 10px; bottom: 7px; width: 46%; height: 5px; border-radius: 2px; background: #1A1714; opacity: .55; }
.pe-sw-minimal { background: #fff; border-top: 5px solid var(--a); }
.pe-sw-minimal::after { content: ''; position: absolute; left: 10px; top: 12px; width: 58%; height: 9px; border-radius: 2px; background: #1A1714; }
.pe-sw-audaz { background: var(--a2); }
.pe-sw-audaz::after { content: ''; position: absolute; right: 0; bottom: 0; width: 42%; height: 50%; background: var(--a); }
.pe-sw-calido { background: #F5EEE4; }
.pe-sw-calido::after { content: ''; position: absolute; inset: 6px 6px 18px; border-radius: 10px; background: var(--a); }
.pe-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pe-stats div { background: var(--subtle); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.pe-stats b { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.15; }
.pe-stats span { font-size: 12px; color: var(--muted); }
.pe-views { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink2); }
.pe-acc { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ink); }
.pe-acc > b { color: var(--ok); }
.pe-acc span { font-size: 14px; }
.pk-brand { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--subtle); flex-wrap: wrap; }
.pk-brand .grow { display: flex; flex-direction: column; min-width: 160px; }
.pk-logo { width: 64px; height: 48px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); padding: 4px; font-size: 11px; color: #1A1717; text-align: center; }
.pk-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pk-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.pk-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pk-font { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.pk-font > span { font-size: 30px; line-height: 1.1; margin-bottom: 4px; }
.pk-font b { font-size: 13.5px; } .pk-font small { font-size: 11.5px; color: var(--muted); }
.pk-font.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pk-photo { width: 84px; height: 84px; border-radius: 999px; background: var(--track); display: grid; place-items: center; overflow: hidden; }
.pk-photo img { width: 100%; height: 100%; object-fit: cover; }
.pk-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pk-work { position: relative; display: flex; flex-direction: column; gap: 6px; }
.pk-work img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.pk-work .input { min-height: 36px; font-size: 13px; padding: 6px 10px; }
.pk-work button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 999px; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pk-work button svg { width: 12px; height: 12px; }
.pk-addw { aspect-ratio: 4/3; min-height: 0; }
.pk-test { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 980px) { .prop-grid { grid-template-columns: 1fr; } .prop-paper { padding: 0; } }
@media print { body.printing #print-root .cp { box-shadow: none; } }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* v19 · calendarios de contenido */
.ct-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ct-tpl { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; color: var(--ink); font: inherit; }
.ct-tpl:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.ct-tpl b { font-size: 16px; } .ct-tpl span { font-size: 13px; color: var(--ink2); } .ct-tpl small { font-size: 12px; color: var(--muted); }
.ct-cals { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-cal { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink2); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; }
.ct-cal.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ct-cal.add { border-style: dashed; color: var(--muted); background: transparent; }
.ct-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-sum .pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--chipbg); font-size: 13px; font-weight: 500; }
.ct-sum .pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--cc); }
.ct-sum .pill.ok { background: var(--ok-soft); color: var(--ok); } .ct-sum .pill.warn { background: color-mix(in srgb, #D99A1E 18%, var(--card)); color: #7A5200; }
.ct-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table.ct { border-collapse: collapse; width: 100%; min-width: 980px; font-size: 14px; }
.ct th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); background: var(--side); position: sticky; top: 0; white-space: nowrap; z-index: 1; }
.ct td { border-bottom: 1px solid var(--line); padding: 4px; vertical-align: top; }
.ct tr.ai td { background: color-mix(in srgb, #7A5AC8 5%, var(--card)); }
.ct-week td { background: var(--side); font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 10px; letter-spacing: .03em; }
.ct-date { width: 132px; } .ct-title { min-width: 220px; width: 22%; } .ct-long { min-width: 200px; } .ct-num { width: 80px; } .ct-act { width: 44px; }
.ct-in { width: 100%; box-sizing: border-box; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 7px 8px; font: inherit; color: var(--ink); min-height: 36px; resize: none; transition: background .15s, border-color .15s; }
textarea.ct-in { field-sizing: content; max-height: 160px; overflow: auto; line-height: 1.35; }
.ct-in:hover { background: var(--side); } .ct-in:focus { outline: none; border-color: var(--accent); background: var(--input); }
.ct-in.saved { background: color-mix(in srgb, #2F7D6D 14%, transparent); }
.ct-in.tt { font-weight: 600; }
.ct-in.choice[data-has] { background: color-mix(in srgb, var(--cc) 14%, transparent); color: color-mix(in srgb, var(--cc) 75%, var(--ink)); font-weight: 600; border-radius: 999px; }
.ct-date .dw { display: block; font-size: 11px; color: var(--muted); padding: 0 9px; text-transform: capitalize; }
.ct-tt-foot { display: flex; gap: 8px; align-items: center; padding: 0 8px 4px; }
.ct-open { font-size: 12px; color: var(--accent-fg); font-weight: 600; }
.ai-tag { font-size: 11px; font-weight: 700; color: #5B3FA8; background: color-mix(in srgb, #7A5AC8 14%, var(--card)); border-radius: 999px; padding: 1px 8px; }
.ct-st { appearance: none; -webkit-appearance: none; border: 1px solid color-mix(in srgb, var(--sc) 40%, var(--line)); background: color-mix(in srgb, var(--sc) 12%, var(--card)); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 4px; }
.ct-st.big { padding: 10px 14px; font-size: 14px; margin: 0; }
.ct-design { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; border-radius: 999px; padding: 4px 10px 4px 4px; background: color-mix(in srgb, var(--sc) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--sc) 35%, var(--line)); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ct-design .th { width: 22px; height: 28px; border-radius: 4px; background: var(--side) center/cover; }
.ct-design .ldot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); margin-left: 6px; }
.ct-dc .btn, .ct-stc select { margin-top: 4px; }
.ct-empty { text-align: center; color: var(--muted); padding: 32px 16px !important; }
.cf-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cf-row .input { min-height: 40px; flex: 1 1 160px; width: auto; }
.cf-row select.input { flex: 0 1 150px; }
.cf-chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; }
.ix-h { flex: 1 1 200px; font-size: 14px; font-weight: 600; }
.ci-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ci-doc { flex: 999 1 560px; min-width: 0; gap: 18px; }
.ci-side { flex: 1 1 300px; min-width: 0; gap: 14px; position: sticky; top: 16px; }
.ci-ficha { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ci-k { padding: 10px 12px; background: var(--side); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.ci-v.input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 42px; }
.ci-sec { display: flex; flex-direction: column; gap: 8px; }
.ci-sec.internal { background: var(--side); border-radius: 14px; padding: 14px; }
.ci-sh { font-size: 15px; font-weight: 700; }
.ci-text { min-height: 72px; resize: vertical; line-height: 1.45; }
.ci-slide { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ci-snum { font-size: 12px; font-weight: 700; color: var(--accent-fg); white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
.ci-st { min-height: 38px; font-weight: 600; }
.ci-log { font-size: 13px; line-height: 1.4; } .ci-log small { color: var(--muted); }
.ai-note { margin: 0; font-size: 14px; background: color-mix(in srgb, #7A5AC8 12%, var(--card)); color: #4A2F96; border-radius: 12px; padding: 10px 14px; }
.ci-saved { font-size: 13px; min-width: 80px; text-align: right; }
.ev.plan { background: transparent !important; border: 1px dashed var(--pc); color: var(--ink2); }
@media (max-width: 900px) { .ci-side { position: static; } }
:root[data-theme="dark"] .ai-note { color: #CDBEF5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ai-note { color: #CDBEF5; } }
.ct-choice { min-width: 150px; }
td.ct-choice .ct-in { text-overflow: ellipsis; }
