/* Thundertab — identidad tomada de Alvify (Onest, azul #3372ff, amarillo #fef373, tinta #191816) */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f4f3f0;
  --sidebar: #faf9f7;
  --hover: #f1f0ec;
  --border: #dedcd7;
  --border-soft: #ecebe7;
  --text: #191816;
  --text-muted: #5e5c58;
  --text-faint: #8d8b86;
  --brand: #3372ff;
  --brand-dark: #1f5ae6;
  --brand-soft: #e8efff;
  --accent: #fef373;
  --ink: #141414;
  --success: #1f9d55;
  --success-soft: #e3f5ea;
  --danger: #d93838;
  --danger-soft: #fdeaea;
  --warn-soft: #fff8c2;
  --radius: 10px;
  --radius-md: 20px;
  --radius-pill: 999px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-dark); }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border-soft); padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; color: var(--ink); }
.brand svg { width: 22px; height: 28px; flex: none; }
.brand b { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; }
.brand small { display: block; font-size: 11px; color: var(--text-faint); letter-spacing: 0; font-weight: 500; margin-top: -3px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-pill); color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--ink); color: #fff; font-weight: 600; }
.nav-item .ic { width: 20px; height: 20px; flex: none; }
.side-foot { margin-top: auto; padding: 14px 6px 0; }
.who { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 10px; }
.who label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.who select { width: 100%; }
.who small { display: block; color: var(--text-faint); font-size: 11px; margin-top: 6px; line-height: 1.35; }
.main { min-width: 0; padding: 28px 36px 60px; max-width: 1280px; width: 100%; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.topbar h1 { font-size: 36px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.08; }
.topbar p { color: var(--text-muted); font-size: 15px; margin-top: 6px; }
.demo-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border: 1px solid #f1e36b; border-radius: var(--radius); padding: 9px 14px; margin-bottom: 18px; font-size: 13px; }
.demo-banner .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.demo-banner button { margin-left: auto; white-space: nowrap; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: #fff; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); font-size: 14px; line-height: 1.2; }
.btn:hover { background: var(--hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn .ic { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ink:hover { background: #333; }
.btn-ok { background: var(--success); border-color: var(--success); color: #fff; }
.btn-ok:hover { background: #17803f; }
.btn-danger { color: var(--danger); border-color: #f0bcbc; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand-dark); cursor: pointer; font-weight: 600; text-decoration: underline; }
input, select, textarea { padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; max-width: 100%; }
textarea { min-height: 80px; width: 100%; resize: vertical; }
input[type="checkbox"], input[type="radio"] { padding: 0; accent-color: var(--brand); width: 16px; height: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.field > span em { color: var(--danger); font-style: normal; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { width: 100%; }
.field small, .hint { display: block; color: var(--text-faint); font-size: 12px; margin-top: 4px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.error { color: var(--danger); font-size: 13px; font-weight: 600; margin: 4px 0 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; background: var(--surface2); padding: 12px; border-radius: var(--radius-md); }
.filters label { font-size: 12px; font-weight: 600; color: var(--text-muted); display: block; }
.filters select, .filters input { display: block; margin-top: 3px; min-width: 130px; }

/* ---------- cards & pills ---------- */
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 18px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card h2 .ic { width: 18px; height: 18px; color: var(--text-muted); }
.card h3 { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stack > * + * { margin-top: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface2); border-radius: var(--radius-md); padding: 14px 16px; }
.kpi strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--text-muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: var(--surface2); color: var(--text-muted); white-space: nowrap; }
.pill .ic { width: 13px; height: 13px; }
.pill.pendiente { background: var(--surface2); }
.pill.en_curso { background: var(--brand-soft); color: var(--brand-dark); }
.pill.en_revision { background: var(--warn-soft); color: #7a6a00; }
.pill.terminada { background: var(--success-soft); color: #176c3b; }
.pill.bloqueo { background: var(--danger-soft); color: #a62323; }
.pill.espera { background: #efe9ff; color: #5a3fb3; }
.pill.demo { background: var(--accent); color: var(--ink); }
.pill.ok { background: var(--success-soft); color: #176c3b; }
.pill.pend { background: var(--surface2); }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.avatar.lg { width: 34px; height: 34px; font-size: 13px; }
.who-line { display: inline-flex; align-items: center; gap: 6px; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 12px; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.empty { color: var(--text-faint); padding: 10px 0; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.crumbs a { color: var(--text-muted); }

/* ---------- task cards & tables ---------- */
.tcard { display: block; text-decoration: none; color: inherit; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 10px 12px; background: #fff; }
.tcard:hover { border-color: var(--brand); background: #fbfcff; }
.tcard + .tcard { margin-top: 8px; }
.tcard b { display: block; font-weight: 600; line-height: 1.3; }
.tcard .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.day { background: var(--surface2); border-radius: var(--radius-md); padding: 10px; min-height: 120px; }
.day h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; text-transform: capitalize; display: flex; justify-content: space-between; }
.day.today { outline: 2px solid var(--brand); }
.day .empty { font-size: 12px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td a.tl { font-weight: 600; text-decoration: none; color: var(--text); }
td a.tl:hover { color: var(--brand-dark); text-decoration: underline; }
.bars .brow { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 70px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; }
.bar { height: 10px; background: var(--surface2); border-radius: var(--radius-pill); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-pill); }
.bar i.alt { background: var(--ink); }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.list-clean li:last-child { border-bottom: 0; }

/* ---------- conversation ---------- */
.msg { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.msg:last-child { border-bottom: 0; }
.msg .body { min-width: 0; flex: 1; }
.msg .head { font-size: 13px; }
.msg .head b { font-weight: 700; }
.msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.msg.reply { margin-left: 36px; }
.mention { background: var(--brand-soft); color: var(--brand-dark); border-radius: 5px; padding: 0 4px; font-weight: 600; }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.react { border: 1px solid var(--border); background: #fff; border-radius: var(--radius-pill); padding: 1px 9px; cursor: pointer; font-size: 13px; }
.react.mine { background: var(--brand-soft); border-color: var(--brand); }
.tag-q { background: var(--warn-soft); }
.timeline { font-size: 13px; color: var(--text-muted); }
.timeline li { padding: 5px 0; }
.rec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { background: var(--brand-soft); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--danger-soft); }
.notice + .notice, .notice + .card, .card + .notice { margin-top: 12px; }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 24px; width: min(640px, 100%); padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.6px; }
.choice { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choice button { text-align: left; display: block; border: 1px solid var(--border); background: #fff; border-radius: var(--radius-md); padding: 16px; cursor: pointer; }
.choice button:hover:not(:disabled) { border-color: var(--brand); background: #fbfcff; }
.choice button:disabled { opacity: .6; cursor: not-allowed; background: var(--surface2); }
.choice .ic { width: 24px; height: 24px; margin-bottom: 8px; color: var(--brand); }
.choice b { display: block; font-size: 15px; }
.choice span { display: block; color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: var(--radius-pill); z-index: 80; font-weight: 600; max-width: 92vw; text-align: center; }
.mini-row { display: grid; grid-template-columns: 22px minmax(90px, 1fr) 84px; gap: 8px; align-items: center; padding: 3px 0; }
.mini-row input[type="number"] { width: 84px; }
.deliv { border: 1px dashed var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; z-index: 40; flex-direction: row; padding: 6px 4px; border-right: 0; border-top: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; }
  .sidebar .brand, .side-foot { display: none; }
  .side-nav { flex-direction: row; gap: 2px; width: 100%; }
  .nav-item { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 11px; flex: 1 0 auto; min-width: 62px; text-align: center; border-radius: 14px; }
  .main { padding: 16px 16px 96px; }
  .topbar h1 { font-size: 27px; }
  .grid2 { grid-template-columns: 1fr; }
  .mobile-who { display: block !important; }
  .modal { padding: 18px; border-radius: 20px; }
  .bars .brow { grid-template-columns: 90px 1fr 56px; }
}
.mobile-who { display: none; margin-bottom: 12px; }
@media print { .sidebar, .btn { display: none; } }
.ic.flip { transform: scaleX(-1); }

/* prioridades */
ol.prio { list-style: none; margin: 0; padding: 0; counter-reset: none; }
ol.prio li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #fff; margin-bottom: 6px; flex-wrap: wrap; }
ol.prio li[draggable="true"] { cursor: grab; }
ol.prio li.dragging { opacity: .45; border-color: var(--brand); background: var(--brand-soft); }
ol.prio li.done .ttl a { text-decoration: line-through; color: var(--text-faint); }
ol.prio .rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; flex: none; }
ol.prio .grip { color: var(--text-faint); font-size: 18px; line-height: 1; user-select: none; }
ol.prio .ttl { flex: 1; min-width: 150px; }
ol.prio .ttl a { font-weight: 600; color: var(--text); text-decoration: none; }
ol.prio .ttl small { display: block; color: var(--text-muted); font-size: 12px; }

/* Pantalla de ingreso */
.gate{min-height:100vh;display:grid;place-items:center;padding:24px 16px}
.gate-card{width:100%;max-width:480px;display:grid;gap:14px}
.gate-brand{display:flex;gap:12px;align-items:center}
.gate-brand small{display:block;color:var(--muted,#6b6a66)}
.gate-form{display:grid;gap:10px}
.gate h1{margin:4px 0 0}

/* Brief */
.kv{display:grid;gap:2px;margin:8px 0 0}
.kv dt{font-weight:600;font-size:13px;color:var(--muted,#6b6a66);margin-top:8px}
.kv dd{margin:0}

/* ---------- Thundertab: modos, carpeta destacada, modo Ejecutar, Mis horas ---------- */
.brand img { width: 28px; height: auto; flex: none; }
.brand b { font-weight: 800; letter-spacing: -0.6px; }
.gate-brand img { width: 240px; height: auto; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--surface2); border-radius: var(--radius-pill); padding: 3px; margin: 0 4px 16px; }
.mode-switch button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; border-radius: var(--radius-pill); padding: 7px 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--text-muted); }
.mode-switch button .ic { width: 15px; height: 15px; }
.mode-switch button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.mode-note { margin: 0 12px 14px; font-size: 12px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .6px; }
.mobile-who .mode-switch { margin: 0 0 10px; }
.nav-item .badge { margin-left: auto; font-style: normal; background: var(--accent); color: var(--ink); border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; padding: 1px 8px; }
.nav-item.active .badge { background: #fff; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.folder-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--ink); color: #fff; text-decoration: none; min-height: 76px; }
.folder-hero:hover { background: #2a2926; }
.folder-hero .ic { width: 34px; height: 34px; flex: none; color: var(--accent); }
.folder-hero b { display: block; font-size: 17px; letter-spacing: -.3px; }
.folder-hero small { display: block; color: #d6d4cf; font-size: 12.5px; margin-top: 2px; }
.folder-hero.missing { background: var(--danger-soft); color: #a62323; }
.folder-hero.missing .ic { color: #a62323; }
.folder-hero.missing small { color: #a62323; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts > div { background: var(--surface2); border-radius: var(--radius-md); padding: 12px 14px; }
.facts > div > span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.facts .who-line { display: flex; }
.facts b { display: block; font-size: 15px; margin-top: 3px; }
.facts em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: var(--danger); margin-top: 2px; }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.task-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.task-head { margin-bottom: 16px; }
.card.brief .txt.big { font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--text-muted); }
details.more[open] summary { margin-bottom: 4px; }
.wrow { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.wrow:last-child { border-bottom: 0; }
.wmain { min-width: 0; flex: 1 1 320px; }
.wt { font-weight: 700; font-size: 15.5px; color: var(--text); text-decoration: none; }
.wt:hover { color: var(--brand-dark); text-decoration: underline; }
.wrow .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }
.wnext { margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.wnext.ok { color: var(--success); } .wnext.warn { color: #8a6d00; } .wnext.bad { color: var(--danger); } .wnext.wait { color: #5a3fb3; }
.wside { display: flex; gap: 6px; align-items: center; }
.kpi-link { text-decoration: none; color: inherit; outline: 2px solid transparent; }
.kpi-link:hover { outline-color: var(--brand); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { border: 1px solid var(--border); background: #fff; border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.combos { display: flex; gap: 8px; flex-wrap: wrap; }
.combo { border: 1px solid var(--border); background: #fff; border-radius: var(--radius); padding: 8px 12px; font-size: 13px; cursor: pointer; text-align: left; max-width: 100%; }
.combo:hover { border-color: var(--brand); background: #fbfcff; }
.weekstrip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin: 10px 0 6px; }
.wday { border: 1px solid var(--border-soft); background: #fff; border-radius: var(--radius); padding: 8px 6px; text-align: center; cursor: pointer; }
.wday span { display: block; font-size: 11.5px; color: var(--text-muted); text-transform: capitalize; }
.wday b { display: block; font-size: 14px; margin-top: 2px; }
.wday.today { border-color: var(--brand); }
.wday.sel { background: var(--ink); color: #fff; border-color: var(--ink); }
.wday.sel span { color: #d6d4cf; }
.wday.total { background: var(--surface2); cursor: default; border-color: transparent; }
.timer-card { border-color: var(--brand); background: var(--brand-soft); }
.timer-on { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; margin-bottom: 10px; }
.qh.compact .row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.proposals { border-color: #f1e36b; }
.clip { margin-top: 4px; white-space: pre-wrap; }
@media (max-width: 900px) {
  .hero-row { grid-template-columns: 1fr; }
  .sidebar .mode-switch, .sidebar .mode-note { display: none; }
  .actionbar .btn { padding: 8px 12px; font-size: 13px; }
  .facts { grid-template-columns: 1fr 1fr 1fr; }
  .weekstrip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-item .badge { position: absolute; margin: 0; transform: translate(14px, -6px); }
  .nav-item { position: relative; }
}

/* ---------- prioridades colectivas y alta simple ---------- */
.wprio { border-color: var(--ink); }
.wprio-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.wprio-add input { flex: 2 1 220px; }
.wprio-add select { flex: 1 1 180px; }
.sim { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-soft); border-radius: var(--radius-md); padding: 12px 14px; margin: 0 0 14px; font-size: 13.5px; }
.sim > .ic { width: 18px; height: 18px; color: var(--brand-dark); flex: none; margin-top: 2px; }
.sim ul { margin: 6px 0; padding-left: 18px; }
.sim .flex { margin: 6px 0 4px; }
.sim.empty-sim { background: var(--surface2); color: var(--text-muted); }
.who-chips { border: 0; padding: 0; }
.who-chips legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pchip span { display: inline-block; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 5px 12px; font-weight: 600; font-size: 13px; cursor: pointer; background: #fff; }
.pchip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pchip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.folder-ok { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }
.folder-ok .ic { width: 16px; height: 16px; }
details.more-opts { margin: 4px 0 14px; }
details.more-opts summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-muted); }

/* ---------- datos en la nube ---------- */
.sync { font-size: 12px; margin-top: 8px; padding: 6px 4px; color: var(--text-muted); }
.sync .ok { color: var(--success); font-weight: 600; }
.sync .bad { color: var(--danger); font-weight: 600; }
.sync .btn-link { font-size: 12px; display: block; margin-top: 4px; }

/* Pestañas (Horas) y engranaje de Administración */
.tabs{display:flex;gap:4px;margin:0 0 14px;border-bottom:1px solid var(--border)}
.tab{padding:8px 14px;border-radius:8px 8px 0 0;text-decoration:none;color:inherit;opacity:.65;font-weight:600}
.tab.on{opacity:1;border-bottom:2px solid var(--brand,#3372ff)}
.nav-gear{margin-top:auto;opacity:.75;font-size:.95em}

/* Caja única para crear y fechas rápidas */
.quick{background:var(--surface2);border:1px solid var(--border-soft);border-radius:16px;padding:12px;margin:0 0 18px;display:flex;flex-direction:column;gap:10px}
.quick textarea{width:100%;border:0;background:transparent;font:inherit;font-size:15px;resize:vertical;min-height:48px;outline:none}
.quick-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.mic.on{background:var(--danger-soft);border-color:var(--danger);color:var(--danger)}
.due .dchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.dchip{border:1px solid var(--border);background:var(--surface);border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.dchip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.dchip.dn input{width:44px;border:0;border-bottom:1px solid var(--border);background:transparent;font:inherit;text-align:center;padding:0}
.dchip.ghost{border-style:dashed}
.dchip svg{width:14px;height:14px}
.due-pick{margin-top:6px}
.due-out{display:block;margin-top:6px;color:var(--text-muted)}

/* Semana visual */
.ibtn{border:0;background:transparent;border-radius:8px;width:28px;height:28px;display:inline-grid;place-items:center;cursor:pointer;color:var(--text-muted);font:inherit;font-weight:700}
.ibtn:hover{background:var(--hover);color:var(--text)}
.ibtn:disabled{opacity:.3;cursor:default}
.ibtn svg{width:15px;height:15px}
.help{width:22px;height:22px;border:1px solid var(--border);font-size:12px;margin-left:6px;vertical-align:middle}
ol.pcards li.pcard{gap:10px;padding:8px 10px;flex-wrap:nowrap}
.pc-main{flex:1;min-width:0;text-decoration:none;color:inherit;display:flex;flex-direction:column}
.pc-main b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-main small{color:var(--text-muted);font-size:12px;display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cdot{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block}
.pc-move,.pc-x{opacity:0;transition:opacity .15s}
li.pcard:hover .pc-move,li.pcard:hover .pc-x,li.pcard:focus-within .pc-move,li.pcard:focus-within .pc-x{opacity:1}
@media (hover:none){.pc-move,.pc-x{opacity:1}}
.pc-move{display:inline-flex}
.wprio-add.one{display:flex;align-items:center;gap:8px;border:1px dashed var(--border);border-radius:12px;padding:6px 6px 6px 12px;margin-top:8px}
.wprio-add.one input[name=q]{flex:1;border:0;background:transparent;font:inherit;outline:none;min-width:0}
.wprio-add.one .plus svg{width:16px;height:16px;color:var(--text-faint)}
.faces{display:inline-flex;flex:none}
.face{width:24px;height:24px;border-radius:50%;background:var(--ink);color:#fff;font-size:10px;font-weight:700;display:inline-grid;place-items:center;border:2px solid #fff;margin-left:-6px}
.face:first-child{margin-left:0}
.face.more{background:var(--surface2);color:var(--text-muted)}
.dot{width:10px;height:10px;border-radius:50%;flex:none;display:inline-block}
.dot.bad{background:var(--danger)}
.dot.warn{background:#e8b10c}
.dcard{display:flex;flex-direction:column;gap:4px;padding:10px 10px 8px 12px;margin-bottom:8px;border-radius:12px;background:#fff;border:1px solid var(--border-soft);border-left:4px solid var(--cc);text-decoration:none;color:inherit;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.dcard:hover{border-color:var(--cc)}
.dcard b{font-weight:600;font-size:13px;line-height:1.3}
.dc-client{font-size:11px;font-weight:700;color:var(--cc);text-transform:uppercase;letter-spacing:.02em}
.dc-foot{display:flex;align-items:center;justify-content:space-between;margin-top:2px}
.dc-ok svg{width:14px;height:14px;color:var(--success)}
.dcard.done{opacity:.55}
.dcard.done b{text-decoration:line-through}
.filters-wrap{margin-bottom:14px}
.filters-wrap>summary{cursor:pointer;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--border);border-radius:999px;font-weight:600;font-size:13px;list-style:none}
.filters-wrap>summary::-webkit-details-marker{display:none}
.filters-wrap>summary svg{width:14px;height:14px}
.filters-wrap[open]>summary{margin-bottom:10px}
/* Tablero: una semana en una sola fila (lunes a viernes); en pantallas chicas se desliza de costado. */
.board{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(170px,1fr);overflow-x:auto;padding-bottom:4px}

/* Basado en tareas anteriores */
.sim-h{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--brand-dark);margin-bottom:2px}
.sim-ex summary{cursor:pointer;color:var(--text-muted);margin:4px 0}
.sim-ex ul{margin:4px 0 6px;padding-left:18px}

/* Por qué demora, metas y rondas */
.why{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.why-h{font-size:12px;font-weight:700;color:var(--text-muted)}
.kchip input{position:absolute;opacity:0;pointer-events:none}
.kchip:has(input:checked){background:var(--brand);border-color:var(--brand);color:#fff}
.risk{margin-bottom:12px}
table.goals input{width:100%;font:inherit;padding:6px 8px;border:1px solid var(--border);border-radius:8px}
.field fieldset,fieldset.field{border:0;padding:0;margin:0 0 12px}
fieldset.field legend{font-weight:600;margin-bottom:6px;padding:0}
