:root {
  --bg: #FBFAF8;
  --side: #F5F2EE;
  --lane: #F3EFEA;
  --card: #FFFFFF;
  --line: #E7E2DC;
  --line2: #D9D2CA;
  --ink: #1A1717;
  --ink2: #3B3535;
  --muted: #645B5B;
  --accent: #B3122E;
  --accent-soft: #FBE3E7;
  --accent-ink: #9E1028;
  --ok: #2F7D6D;
  --ok-soft: #DDF0EA;
  --warn: #7A4A06;
  --warn-soft: #FDF0DC;
  --info: #1D4F8F;
  --info-soft: #E3EEFB;
  --radius: 14px;
  --serif: 'Fraunces', Georgia, 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);
  color-scheme: light;
}
* { box-sizing: border-box; }
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 { font-family: var(--serif); color: var(--accent); font-size: 64px; line-height: 1; }
.boot .ast { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 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 .ast { font-size: 40px; }
.brand b { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.brand b i { font-style: normal; color: var(--accent); }
.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: rgba(255,255,255,.7); }
.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: rgba(255,255,255,.8); 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: rgba(251,250,248,.94); backdrop-filter: blur(8px); padding: 10px 16px; border-bottom: 1px solid var(--line); padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar .brand .ast { font-size: 30px; }
  .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: #fff; 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: #F0ECE7; 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 #fff; }
.av.lg { width: 36px; height: 36px; font-size: 13px; }
.avs { display: flex; }
.avs .av + .av { margin-left: -8px; }
.bar { height: 6px; border-radius: 999px; background: #EFEAE4; 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: #fff; 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); }
.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 #fff; 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, #fff 0 4px, #EFEAE4 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: #EFEAE4; 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: #fff; }
.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: #fff; }

/* ---------- 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-nav { display: inline-flex; align-items: center; gap: 4px; }
.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) !important; font-weight: 600; }
.thumb { border-radius: 10px; aspect-ratio: 4/5; background: #EFEAE4 center/cover no-repeat; position: relative; overflow: hidden; }
.thumb .count { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); 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: #fff; 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: rgba(255,255,255,.7); }

/* ---------- tarea ---------- */
.task-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.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: #EFEAE4; 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: #EFEAE4 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: #fff; 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: #F7F5F2; }
.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: #fff; }
.tool .hl { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #fff; 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: #fff; }
.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: #FAF8F6; }
.check button.box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #B9B0A7; background: #fff; 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: #F4F7FC center/cover no-repeat; border: 1px solid #DCE5F3; 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: #fff; }
.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: #EFEAE4 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: var(--ink); color: #fff; }
.banner .ast { font-size: 34px; color: #FF8A9C; }
.banner p { margin: 0; flex: 1; min-width: 200px; font-size: 14px; }
.banner .btn { border-color: #fff; }

/* ---------- 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: #FAF8F6; }
.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; }
@media (max-width: 760px) {
  .cal { grid-template-columns: 1fr; background: none; border: 0; gap: 8px; }
  .cal .dow, .cal .day.out, .cal .day.emptyday { display: none; }
  .cal .day { min-height: 0; border: 1px solid var(--line); border-radius: 12px; }
}

/* ---------- 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: #EFEAE4 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; 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, #F7F4F0 0 10px, #F1EDE8 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: #EFEAE4; }
.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 #EFEAE4; 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: #fff; 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: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .big { font-family: var(--serif); font-size: 64px; line-height: 1; font-weight: 400; font-style: italic; }
.auth-art .big em { color: #FF8A9C; font-style: normal; }
.auth-art .bigast { position: absolute; right: -60px; bottom: -120px; font-family: var(--serif); font-size: 520px; line-height: 1; color: var(--accent); opacity: .9; }
.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: 40px; } .auth-art .bigast { font-size: 280px; bottom: -80px; right: -30px; } }

.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 #EFEAE4; }
.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: #F0ECE7; 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: #fff; }
@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 #EFEAE4; 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: #fff; 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: #fff; 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: #fff; 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; } }
