/* =========================================================================
   Vistas: Tabla, Panel y Línea de tiempo
   ========================================================================= */
.view-page { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: var(--board-bg); color: var(--text); }
.view-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.view-toolbar label.inline { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.view-toolbar .count { margin-left: auto; font-size: 13px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text);
  border: 1px solid var(--accent); border-radius: 999px; padding: 2px 4px 2px 10px;
}
.filter-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 50%; width: 22px; height: 22px; }
.filter-chip button:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.empty-view { color: var(--text-muted); padding: 32px 4px; text-align: center; }
.view-toggle { flex-wrap: wrap; }

/* ---------- Tabla ---------- */
.table-wrap { overflow: auto; max-height: calc(100vh - 170px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--list-bg); }
.data-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13.5px; }
.data-table th, .data-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.data-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); font-weight: 600; padding: 0; }
.data-table thead th button { width: 100%; text-align: left; border: 0; background: transparent; color: var(--text-muted); font-weight: 600; font-size: 12.5px; padding: 9px 12px; cursor: pointer; white-space: nowrap; }
.data-table thead th button:hover { color: var(--text); }
.data-table thead th[aria-sort] button { color: var(--text); }
.data-table .table-heading { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.data-table .table-sort-buttons { display: inline-flex; gap: 3px; }
.data-table thead th .table-sort-button { width: 25px; height: 26px; min-height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 4px; background: var(--card-bg); color: var(--text-muted); font-size: 10px; }
.data-table thead th .table-sort-button:hover { border-color: var(--accent); color: var(--text); }
.data-table thead th .table-sort-button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.data-table thead th .table-sort-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.data-table .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--card-bg); font-weight: 600; max-width: 300px; }
.data-table thead .sticky-col { z-index: 3; background: var(--surface); }
.data-table tbody tr { cursor: pointer; background: var(--card-bg); }
.data-table tbody tr:hover, .data-table tbody tr:hover .sticky-col { background: var(--card-hover); }
.data-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.data-table tr.done td { color: var(--text-muted); }
.data-table .table-card-title { font-weight: 600; }
.data-table tr.done .table-card-title { text-decoration: line-through; }
.data-table .card-labels { margin: 0; flex-wrap: nowrap; }
.table-columns-btn { border-color: var(--brand-cyan); background: color-mix(in srgb, var(--brand-cyan) 8%, var(--surface)); }
.table-columns-dialog form { display: flex; flex-direction: column; gap: 14px; }
.table-columns-dialog .modal-head { padding-bottom: 12px; border-bottom: 3px solid var(--brand-cyan); }
.table-columns-dialog .hint { margin: 0; }
.table-column-presets, .table-column-actions { display: flex; gap: 8px; }
.table-column-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 45vh; overflow: auto; padding: 2px; }
.table-column-option { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; min-width: 0; }
.table-column-option:has(input:checked) { border-color: var(--brand-cyan); background: color-mix(in srgb, var(--brand-cyan) 9%, var(--surface)); }
.table-column-option input { flex-shrink: 0; accent-color: var(--brand-cyan); }
.table-column-option span { overflow-wrap: anywhere; font-size: 13px; }
.table-column-option small { display: block; font-size: 11px; }
.table-column-actions { justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 14px; }
@media (max-width: 600px) {
  .table-column-options { grid-template-columns: minmax(0, 1fr); }
  .table-column-actions .btn { flex: 1; }
}

/* ---------- Panel ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; cursor: pointer;
  background: var(--list-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: var(--text);
}
.stat-tile:hover { background: var(--card-hover); }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile.danger { border-left: 4px solid var(--danger); }
.stat-tile.warn { border-left: 4px solid var(--warn); }
.stat-tile.info { border-left: 4px solid var(--info); }
.stat-tile.ok { border-left: 4px solid var(--ok); }
.stat-tile.danger .stat-value { color: var(--danger); }
.stat-tile.warn .stat-value { color: var(--warn); }
.panel-grid { --panel-gap: 12px; --panel-step: 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--panel-gap); align-items: start; }
.panel-grid.panel-masonry { grid-auto-rows: var(--panel-step); row-gap: 0; grid-auto-flow: row dense; }
.panel-card { background: var(--list-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.panel-card h3 { margin: 0 0 10px; font-size: 14.5px; font-family: var(--font-head); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bar-row {
  display: grid; grid-template-columns: minmax(90px, 38%) 1fr 36px; align-items: center; gap: 10px;
  width: 100%; border: 0; background: transparent; color: var(--text); padding: 5px 4px; border-radius: 6px; cursor: pointer; text-align: left;
}
.bar-row:hover:not([disabled]) { background: var(--card-hover); }
.bar-row[disabled] { cursor: default; }
.bar-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 4px; }
.bar-row[disabled] .bar-fill { background: var(--text-muted); }
.bar-value { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-list li + li { border-top: 1px solid var(--border); }
.attention-list button {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; width: 100%;
  border: 0; background: transparent; color: var(--text); text-align: left; padding: 8px 4px; cursor: pointer; border-radius: 6px;
}
.attention-list button:hover { background: var(--card-hover); }
.att-when { font-size: 12.5px; color: var(--text-muted); }
.att-title { grid-column: 1 / -1; font-weight: 600; font-size: 14px; }
.att-sub { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); }

/* ---------- Línea de tiempo ---------- */
.tl-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { display: inline-block; }
.lg-bar { width: 22px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.lg-due { width: 10px; height: 10px; transform: rotate(45deg); background: var(--warn); }
.lg-hearing { width: 10px; height: 10px; border-radius: 50%; background: var(--info); }
.tl-wrap { overflow: auto; max-height: calc(100vh - 190px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--list-bg); position: relative; }
.tl-row { display: flex; min-width: max-content; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.tl-label {
  position: sticky; left: 0; z-index: 2; flex: 0 0 240px; width: 240px; display: flex; flex-direction: column; justify-content: center;
  background: var(--list-bg); border: 0; border-right: 1px solid var(--border); padding: 6px 12px; text-align: left; color: var(--text); cursor: pointer;
}
button.tl-label:hover { background: var(--card-hover); }
.tl-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-sub { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; height: 44px; flex: 0 0 auto; }
.tl-head { position: sticky; top: 0; z-index: 4; background: var(--surface); }
.tl-head .tl-label { background: var(--surface); cursor: default; z-index: 5; }
.tl-head .tl-track { height: 48px; }
.tl-months span { position: absolute; top: 4px; font-size: 12px; font-weight: 600; padding-left: 6px; white-space: nowrap; overflow: hidden; border-left: 1px solid var(--border); color: var(--text); }
.tl-day { position: absolute; top: 26px; height: 20px; font-size: 11px; text-align: center; color: var(--text-muted); line-height: 20px; }
.tl-day.inhabil { color: color-mix(in srgb, var(--text-muted) 60%, transparent); }
.tl-day.today { color: var(--accent-text); background: var(--accent); border-radius: 4px; font-weight: 700; }
.tl-body { position: relative; }
.tl-bg { position: absolute; top: 0; bottom: 0; left: 240px; pointer-events: none; }
.tl-shade { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--text-muted) 9%, transparent); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); }
.tl-bar {
  position: absolute; top: 17px; height: 10px; padding: 0; border: 0; cursor: pointer; border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}
.tl-bar:hover { background: var(--accent); }
.tl-bar.overdue, .tl-bar.today { background: color-mix(in srgb, var(--danger) 55%, transparent); }
.tl-bar.soon { background: color-mix(in srgb, var(--warn) 55%, transparent); }
/* Sin fecha de inicio: la barra empieza en el alta de la tarjeta y se ve más tenue (es aproximada). */
.tl-bar.from-alta, .lg-bar.from-alta { opacity: .45; background-image: repeating-linear-gradient(90deg, transparent 0 6px, color-mix(in srgb, var(--surface) 70%, transparent) 6px 9px); }
.tl-bar.from-alta:hover { opacity: .8; }
.tl-mark { position: absolute; top: 15px; width: 14px; height: 14px; margin-left: -7px; box-shadow: 0 0 0 2px var(--list-bg); }
.tl-mark.due { transform: rotate(45deg); background: var(--text-muted); border-radius: 2px; }
.tl-mark.due.overdue, .tl-mark.due.today { background: var(--danger); }
.tl-mark.due.soon { background: var(--warn); }
.tl-mark.due.ok { background: var(--accent); }
.tl-mark.hearing { border-radius: 50%; background: var(--info); }
@media (max-width: 600px) {
  .tl-label { flex-basis: 150px; width: 150px; }
  .tl-bg { left: 150px; }
  .view-toolbar .count { margin-left: 0; width: 100%; }
}
.tl-past {
  position: absolute; left: 4px; top: 12px; height: 20px; padding: 0 8px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--danger-bg); color: var(--danger); font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.type-pill { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); }
.type-pill.task { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }

/* ---------- Portada ---------- */
/* El área con desplazamiento ocupa todo el ancho; solo el contenido se centra (máx. 1200 px). */
main { padding-bottom: 0; }
.workspace-shell { --workspace-rail-width:56px; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--workspace-rail-width) 300px minmax(0, 1fr); position: relative; overflow: hidden; }
.workspace-shell.sidebar-collapsed { grid-template-columns: var(--workspace-rail-width) 0 minmax(0, 1fr); }
.workspace-content { grid-column:3; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position:relative; }
.module-toolbar { display:flex; align-items:center; gap:12px; padding:10px var(--workspace-gutter); flex:none; position:relative; z-index:25; background:var(--board-bg); }
.module-toolbar[hidden], .board-navigation[hidden] { display:none; }
.module-toolbar .cat-bar { flex:1; min-width:0; padding:0; overflow-y:hidden; }
.board-width-control { position:relative; margin-left:auto; flex:none; }
.board-width-control > summary { position:relative; display:grid; place-items:center; width:40px; height:40px; padding:0; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font-size:13px; cursor:pointer; list-style:none; }
.board-width-control > summary::after { content:'Vista del tablero'; position:absolute; right:0; top:calc(100% + 8px); padding:6px 10px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--text); box-shadow:var(--shadow); white-space:nowrap; font-size:12px; opacity:0; visibility:hidden; pointer-events:none; }
.board-width-control:not([open]) > summary:hover::after, .board-width-control:not([open]) > summary:focus-visible::after { opacity:1; visibility:visible; }
.board-width-control > summary::-webkit-details-marker { display:none; }
.board-width-control > summary svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.board-width-control > summary:focus-visible { outline:2px solid var(--brand-cyan); outline-offset:2px; }
.board-width-control[open] > summary { border-color:var(--brand-cyan); }
.board-width-panel { position:absolute; top:calc(100% + 8px); right:0; width:min(310px,calc(100vw - 80px)); max-height:calc(100dvh - 180px); overflow-y:auto; padding:16px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); box-shadow:var(--shadow-lg); }
.board-width-panel label { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:8px; font-size:13px; font-weight:600; }
.board-width-panel output { white-space:nowrap; color:var(--brand-link); font-variant-numeric:tabular-nums; }
.board-width-panel input[type="range"] { width:100%; margin:16px 0 6px; padding:0; accent-color:var(--brand-cyan); cursor:ew-resize; }
.board-width-scale { display:flex; justify-content:space-between; font-size:11px; color:var(--text-muted); }
.board-width-panel .hint { font-size:12px; line-height:1.5; margin:12px 0; }
.board-width-panel .btn { width:100%; font-size:12px; }
.board-width-panel select { width:100%; margin-top:8px; }
.board-width-panel hr { margin:14px 0; border:0; border-top:1px solid var(--border); }
.board-navigation { position:absolute; right:var(--workspace-gutter); bottom:calc(var(--dock-size) + 24px); z-index:24; display:flex; align-items:center; gap:6px; margin:0; padding:5px; border:1px solid var(--border); border-radius:24px; background:var(--surface); color:var(--text-muted); font-size:12px; box-shadow:var(--shadow-lg); }
.board-navigation::before { content:'Mover tablero'; position:absolute; right:0; bottom:calc(100% + 8px); padding:6px 10px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--text); white-space:nowrap; font-size:12px; box-shadow:var(--shadow); opacity:0; visibility:hidden; pointer-events:none; transform:translateY(4px); transition:opacity .15s, transform .15s; }
.board-navigation:hover::before, .board-navigation:focus-within::before { opacity:1; visibility:visible; transform:translateY(0); }
.board-navigation button { display:grid; place-items:center; width:36px; height:36px; padding:0; border:1px solid var(--border); border-radius:50%; background:var(--surface-2); color:var(--text); cursor:pointer; }
.board-navigation button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.board-navigation button:disabled { opacity:.35; cursor:default; }
.board-navigation button:not(:disabled):hover { border-color:var(--brand-cyan); background:color-mix(in srgb,var(--brand-cyan) 12%,var(--surface)); }
.board-navigation button:focus-visible { outline:2px solid var(--brand-cyan); outline-offset:2px; }
.board-navigation button[hidden], .board-navigation-center[hidden] { display:none; }
.board-navigation-outline { display:none; }
.board-navigation.four-directions { display:grid; grid-template-columns:30px 30px 30px; grid-template-rows:30px 30px 30px; gap:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.four-directions .board-navigation-outline { display:block; position:absolute; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; overflow:visible; fill:var(--surface); stroke:var(--border); stroke-width:1.5; stroke-linejoin:round; filter:drop-shadow(0 3px 6px rgba(0,0,0,.2)); }
.board-navigation.four-directions button { width:30px; height:30px; border:0; border-radius:0; background:transparent; }
.board-navigation.four-directions button svg { width:18px; height:18px; }
.board-navigation.four-directions button:not(:disabled):hover { background:color-mix(in srgb,var(--brand-cyan) 15%,transparent); }
.board-navigation.four-directions button:focus-visible { outline-offset:-3px; }
.four-directions #boardMoveUp { grid-area:1 / 2; }
.four-directions #boardMoveLeft { grid-area:2 / 1; }
.four-directions #boardMoveRight { grid-area:2 / 3; }
.four-directions #boardMoveDown { grid-area:3 / 2; }
/* Listas fijas: las flechas viven en la barra del módulo, sin flotar sobre las listas. */
.board-navigation.in-toolbar { position:static; flex:none; gap:4px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.board-navigation.in-toolbar button { width:30px; height:30px; }
.board-navigation.in-toolbar button svg { width:18px; height:18px; }
.board-navigation.in-toolbar::before { content:none; }
/* Tablero infinito: espacio al final para que la cruceta no tape las últimas tarjetas. */
.board.board-infinite { padding-bottom:130px; }
.board-navigation-center { grid-area:2 / 2; justify-self:center; align-self:center; width:5px; height:5px; border-radius:50%; background:var(--text-muted); opacity:.35; }
@media(max-width:600px) { .module-toolbar { flex-wrap:wrap; gap:8px; } .module-toolbar .cat-bar { flex-basis:100%; } }
.platform-only .workspace-shell { grid-template-columns: var(--workspace-rail-width) 0 minmax(0,1fr); }
.platform-only .home-sidebar, .platform-only .home-sidebar-backdrop, .platform-only .workspace-rail-top, .platform-only #railSettings { display: none !important; }
.workspace-rail { grid-column:1; grid-row:1; min-height:0; display:flex; flex-direction:column; align-items:center; padding:12px 6px max(8px,env(safe-area-inset-bottom)); overflow-y:auto; scrollbar-width:none; background:var(--surface-2); border-right:1px solid var(--border); z-index:43; }
.workspace-rail-top, .workspace-rail-bottom { display:flex; flex-direction:column; align-items:center; gap:8px; width:100%; flex:none; }
.workspace-rail-bottom { margin-top:auto; padding-top:20px; }
.workspace-rail .rail-btn { position:relative; display:grid; place-items:center; width:42px; height:42px; padding:0; border:0; border-radius:10px; background:transparent; color:var(--text-muted); box-shadow:none; flex-shrink:0; cursor:pointer; }
.workspace-rail .rail-btn:hover { color:var(--text); background:color-mix(in srgb,var(--brand-cyan) 10%,var(--surface)); }
.workspace-rail .rail-btn[aria-current="page"], .workspace-rail .rail-btn[aria-expanded="true"] { color:var(--brand-cyan); background:color-mix(in srgb,var(--brand-cyan) 13%,var(--surface)); }
.workspace-rail .rail-btn:focus-visible { outline:2px solid var(--brand-cyan); outline-offset:2px; }
.workspace-rail .rail-website { color:var(--brand-link);text-decoration:none;background:color-mix(in srgb,var(--brand-cyan) 8%,var(--surface)); }
.workspace-rail .rail-btn svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.rail-divider { height:1px; width:24px; background:var(--border); margin:4px 0; flex-shrink:0; }
.workspace-rail .account-menu-toggle { position:relative; inset:auto; width:40px; height:40px; flex-shrink:0; box-shadow:none; }
.account-menu .demo-toggle { position:static; inset:auto; width:100%; height:auto; padding:9px 10px; border:0; border-radius:7px; box-shadow:none; text-align:left; font:inherit; }
.home { width: 100%; padding: 20px 24px; overflow: auto; }
.home-sidebar { grid-column:2; grid-row:1; min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.home-sidebar-head { display: flex; align-items: flex-start; gap: 10px; padding: 20px 18px 14px; min-height: var(--workspace-heading-height, 56px); flex: none; }
.home-sidebar-head h2 { padding-top: 6px; }
.home-sidebar-head h2 { margin: 0; }
.sidebar-symbol { display: block; position: relative; width: 20px; height: 18px; margin: auto; border: 1.5px solid currentColor; border-radius: 4px; font-size: 0; }
.sidebar-symbol::before { content: ''; position: absolute; inset: 0 auto 0 6px; width: 1.5px; background: currentColor; }
.home-sidebar-toggle:focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: 2px; }
.home-sidebar-body { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: 0 12px 16px; display: flex; flex-direction: column; gap: 16px; }
.home-sidebar-body > .board-tile { flex: none; min-width: 0; }
.home-sidebar-body .office-tile .bt-icon { cursor: pointer; touch-action: auto; }
.home-sidebar-body .office-tile { display: block; }
.home-sidebar-body .office-channel-preview { overflow-wrap: anywhere; }
.home-content { min-width: 0; }
.home-synthetic-notice{flex:none;margin:0;padding:6px var(--workspace-gutter,16px);border-bottom:1px solid color-mix(in srgb,var(--brand-cyan) 25%,var(--border));background:color-mix(in srgb,var(--brand-cyan) 7%,var(--surface));color:var(--text-muted);font-size:12px;line-height:1.55}
.home-synthetic-notice strong{display:inline;color:var(--text);font-weight:700;margin:0}
.home-synthetic-notice span{display:inline}
html[data-training-notices-hidden="true"] #trainingControls,html[data-training-notices-hidden="true"] #homeSyntheticNotice{display:none!important}
.platform-only .home-synthetic-notice,.administration-only .home-synthetic-notice{display:none!important}
.home-content-inner { max-width: 1200px; margin: 0 auto; }
.home-content .home-title-row { margin-bottom: 12px; }
.home-content .board-grid { grid-auto-rows: auto; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.home-content .board-tile { min-height: 0; min-width: 0; }
.home-content .board-tile-main { min-height: 0; }
.home-sidebar-backdrop { display: none; }
@media (max-width: 760px) {
  .workspace-shell, .workspace-shell.sidebar-collapsed { grid-template-columns: var(--workspace-rail-width) 0 minmax(0,1fr); grid-template-rows:minmax(0,1fr); }
  .workspace-rail { padding-top:8px; }
  .workspace-rail-top, .workspace-rail-bottom { gap:6px; }
  .home-sidebar-head { padding:14px 16px; min-height:56px; }
  .workspace-shell:not(.sidebar-collapsed) .home-sidebar { grid-column:auto; position:absolute; inset:0 auto 0 var(--workspace-rail-width); width:min(310px,calc(100% - var(--workspace-rail-width))); z-index:42; box-shadow:8px 0 24px #0003; }
  .home-sidebar-backdrop { display:block; position:absolute; inset:0 0 0 var(--workspace-rail-width); background:#0006; border:0; z-index:41; cursor:pointer; }
  .home { padding: 14px 16px; }
}
@media (max-height:560px) { .workspace-rail { padding-top:6px; } .workspace-rail .rail-btn { height:34px; } .workspace-rail-top, .workspace-rail-bottom { gap:4px; } .workspace-rail-bottom { padding-top:8px; } }
.sidebar-period { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.home-sidebar-body .today-list li { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; padding: 5px 0; }
.home-sidebar-body .today-list li + li { border-top: 1px solid var(--border); }
.home-sidebar-body .today-title { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-sidebar-body .today-time { min-width: 42px; }
.office-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.office-card-head { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; padding: 12px 14px; background: var(--office-color); color: #fff; cursor: pointer; text-align: left; font: 700 14px/1.4 system-ui, sans-serif; }
.office-card-head:hover { filter: brightness(1.1); }
.office-card-summary { margin: 0; padding: 10px 14px 0; color: var(--brand-link); font-size: 12px; }
.office-channel-list { padding: 4px 14px 10px; }
.office-preview-channel + .office-preview-channel { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 8px; }
.office-preview-channel-head { border: 0; padding: 4px 0; background: transparent; color: var(--brand-link); font: 700 12px/1.4 system-ui, sans-serif; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.office-preview-messages { list-style: none; padding: 0; margin: 2px 0 0; }
.office-preview-message { display: flex; flex-direction: column; width: 100%; min-width: 0; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.office-preview-message:hover { background: var(--card-hover); }
.office-preview-actor { font-size: 11px; color: var(--text-muted); }
.office-preview-text { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.office-preview-empty { font-size: 12px; color: var(--text-muted); margin: 4px 0; }
.office-card-footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.office-card-footer .btn { font-size: 12px; padding: 5px 8px; }
.home-sidebar-head h2, .home-h { font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.35; }
.home-h { margin: 22px 0 10px; }
.home-today { background: var(--list-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.home-today-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.home-today h2 { font-size: 16px; margin: 0; font-family: var(--font-head); }
.home-overdue { border: 0; cursor: pointer; font-size: 13px; padding: 3px 10px; }
.home-today-list { list-style: none; margin: 10px 0 0; padding: 0; }
.home-today-list li + li { border-top: 1px solid var(--border); }
.home-today-list button {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--text); padding: 8px 4px; cursor: pointer; border-radius: 6px;
}
.home-today-list button:hover { background: var(--card-hover); }
.ht-title { font-weight: 600; flex: 1; min-width: 160px; }
.ht-board { font-size: 12.5px; color: var(--text-muted); }
.board-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.board-tile { position: relative; display: flex; }
.board-tile-main, .board-tile.add {
  flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-content: start; text-align: left;
  background: var(--card-bg); color: var(--text); border: 1px solid var(--border); border-top: 3px solid var(--brand, var(--accent));
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer; min-height: 120px;
}
.board-tile-main:hover, .board-tile.add:hover { background: var(--card-hover); }
.board-tile.add { border-style: dashed; border-top-width: 1px; background: transparent; }
.bt-icon { grid-row: 1 / span 3; font-size: 28px; line-height: 1.1; }
.bt-name { font-weight: 700; font-size: 16px; padding-right: 26px; font-family: var(--font-head); }
.bt-area { font-size: 12.5px; color: var(--text-muted); }
.bt-stats { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.bt-stats strong { color: var(--text); }
.board-tile-menu { position: absolute; top: 8px; right: 8px; color: var(--text-muted); }
.tpl-tile.optional { border-style: dashed; text-align: left; font: inherit; }
.tpl-tile.optional:hover { border-color: var(--brand-cyan); }

/* ---------- Portada con color ---------- */
.home-today { padding: 0; overflow: hidden; border: 0; background: var(--list-bg); }
.home-hero { background: var(--brand-navy); color: #ffffff; padding: 18px 20px 16px; }
.hero-greet { font-size: 22px; font-weight: 700; font-family: var(--font-head); }
.hero-date { font-size: 14px; opacity: .88; margin: 2px 0 12px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-pill { border: 0; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; background: #ffffff; cursor: pointer; }
.hero-pill:hover { filter: brightness(.95); }
.hero-pill.danger { color: #A32D2D; }
.hero-pill.warn { color: #854F0B; }
.hero-pill.info { color: #3C3489; }
.hero-pill.ok { color: #0F6E56; }
.hero-pill.calm { background: rgba(255, 255, 255, .18); color: #ffffff; cursor: default; font-weight: 600; }
.home-today-list { margin: 0; padding: 4px 12px; }
.home-today-list:empty { display: none; }

.board-tile-main { padding: 0; overflow: hidden; border-top: 1px solid var(--border); grid-template-columns: minmax(0, 1fr); gap: 0; }
.board-tile-main .bt-icon {
  grid-row: auto; display: block; background: var(--area); color: #ffffff; font-size: 22px; line-height: 1;
  padding: 12px 14px; min-height: 48px; cursor: grab; touch-action: auto; user-select: none;
}
.board-tile-main .bt-name { padding: 10px 40px 0 14px; }
.board-tile-main .bt-area { padding: 2px 14px 0; color: color-mix(in srgb, var(--area) 70%, var(--text)); font-weight: 600; }
.board-tile-main .bt-stats { grid-column: 1; padding: 8px 14px 14px; margin: 0; }
.board-tile-menu { top: 8px; right: 8px; color: #ffffff; }
.board-tile-menu:hover { background: rgba(255, 255, 255, .2); }
.board-tile-main .bt-icon { padding-right: 44px; }
/* Instrucción para lectores de pantalla (aria-describedby de cada módulo); visualmente la explica el consejo de uso. */
.module-order-help { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.module-touch-help { display: none; }
@media (pointer: coarse), (max-width: 760px) {
  .board-tile-main .bt-icon { cursor: pointer; }
  .module-touch-help { display: block; margin: 0 0 14px; line-height: 1.5; }
}
.module-moving { border-radius: var(--radius); background: color-mix(in srgb, var(--brand-cyan) 8%, var(--card-bg)); outline: 2px dashed var(--brand-cyan); outline-offset: -2px; }
.module-moving > * { visibility: hidden; }
.moving-module, .moving-module .bt-icon { cursor: grabbing; user-select: none; }
.module-drag-ghost { position: fixed; z-index: 1000; pointer-events: none; margin: 0; border-radius: var(--radius); box-shadow: 0 12px 32px #0004; opacity: .96; }
.board-tile.add { border-top-width: 1px; }
.tpl-tile.optional { border-left: 4px solid var(--area); }
.tpl-tile.optional .tpl-icon { color: var(--area); }

/* ---------- Tarjeta "Hoy" y borde de "Nuevo módulo" ---------- */
.home-h.first { margin-top: 4px; }
.today-card { flex: 1; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--card-bg); min-height: 120px; }
.today-head { background: var(--brand-navy); color: #ffffff; padding: 10px 14px 10px; }
.today-head .hero-greet { font-size: 17px; }
.today-head .hero-date { font-size: 12.5px; margin: 1px 0 0; }
.today-body { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.today-body .hero-pill { background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; padding: 2px 10px; }
.today-body .hero-pill.calm { color: var(--text-muted); background: transparent; border: 0; padding: 0; font-weight: 500; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list button {
  display: flex; gap: 8px; align-items: baseline; width: 100%; border: 0; background: transparent; color: var(--text);
  text-align: left; padding: 3px 4px; border-radius: 4px; cursor: pointer; font-size: 13px;
}
.today-list button:hover { background: var(--card-hover); }
.today-time { flex: 0 0 auto; min-width: 38px; font-size: 12px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.today-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.today-more { align-self: flex-start; font-size: 12.5px; }
.board-tile.add {
  border: 2px dashed color-mix(in srgb, var(--text-muted) 60%, transparent) !important;
  border-radius: var(--radius); background: transparent;
}
.board-tile.add:hover { border-color: var(--brand-cyan) !important; background: color-mix(in srgb, var(--brand-cyan) 6%, transparent); }

/* Nombre del área en la franja de color; descripción del área en el cuerpo. */
.board-tile-main .bt-icon { display: flex; align-items: center; gap: 10px; padding-right: 44px; }
.bt-kind { font-size: 14px; line-height: 1.35; font-weight: 700; letter-spacing: .02em; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.bt-desc { padding: 12px 14px 0; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.bt-custom-name { padding: 12px 14px 0; font-family: inherit; font-weight: 400; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.bt-custom-name + .bt-desc { padding-top: 4px; }
.calendar-toolbar { grid-column: 1 / -1; margin-bottom: 0; }
/* Símbolo de texto en la franja (si un emoji no contrasta con el color del área): blanco para contrastar con el color del área. */
.bt-glyph { color: #ffffff; font-family: "Segoe UI Symbol", "Segoe UI", system-ui, sans-serif; font-weight: 700; font-size: 24px; line-height: 1; width: 1.1em; text-align: center; }

/* ---------- Agenda: encabezado clicable de la tarjeta y ventana Hoy · Mañana · Esta semana ---------- */
button.today-head { display: block; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; }
button.today-head:hover { filter: brightness(1.15); }
button.today-head:focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: -2px; }
.today-list li.late .today-time, .today-list li.late .today-title { color: var(--danger); }

.agenda-dlg { width: min(640px, calc(100vw - 32px)); }
.agenda-dlg form { padding: 0; display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.ag-head { display: flex; align-items: flex-start; gap: 12px; background: var(--brand-navy); color: #ffffff; padding: 14px 18px; }
.ag-head h2 { margin: 0; font-size: 20px; font-family: var(--font-head); color: #ffffff; }
.ag-head p { margin: 2px 0 0; font-size: 13px; color: #cfd8e6; }
.ag-head .icon-btn { margin-left: auto; color: #ffffff; }
.ag-head .icon-btn:hover { background: rgba(255, 255, 255, .15); }
.ag-tabs { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.ag-tab { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 4px 14px; font: inherit; font-size: 13.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ag-tab b { font-size: 11.5px; font-weight: 700; opacity: .65; }
.ag-tab.on { background: var(--brand-navy); border-color: var(--brand-navy); color: #ffffff; }
.ag-body { overflow-y: auto; padding: 4px 18px 12px; flex: 1; min-height: 120px; }
.ag-sec { font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin: 14px 0 4px; }
.ag-sec.late { color: var(--danger); }
.ag-list { list-style: none; margin: 0; padding: 0; }
.ag-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ag-time { flex: none; min-width: 50px; font-size: 12px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ag-row.late .ag-time { color: var(--danger); }
.ag-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px; }
.ag-check { flex: none; width: 17px; height: 17px; border: 2px solid var(--ok); border-radius: 4px; background: transparent; cursor: pointer; padding: 0; }
.ag-check:hover { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; padding: 2px 4px; border-radius: 6px; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.ag-main:hover { background: var(--card-hover, rgba(127, 127, 127, .1)); }
.ag-title { font-size: 14px; }
.ag-sub { font-size: 12px; color: var(--text-muted); }
.ag-row .cat-tag { flex: none; }
.ag-empty { color: var(--text-muted); margin: 24px 0; text-align: center; }
.ag-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12.5px; }
@media (max-width: 600px) {
  .agenda-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .agenda-dlg form { max-height: 100dvh; height: 100%; }
  .ag-tabs { overflow-x: auto; }
  .ag-row .cat-tag { display: none; }
}

.sidebar-assignments { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:50px;padding:13px 15px;background:color-mix(in srgb,var(--brand-cyan) 13%,var(--surface));border:1px solid color-mix(in srgb,var(--brand-cyan) 45%,var(--border));color:var(--brand-link);font-weight:600;text-align:left; }
.sidebar-assignment-label { display:inline-flex;align-items:center;gap:10px; }
.sidebar-assignment-label svg { width:18px;height:18px; }
.sidebar-assignments:hover { background:color-mix(in srgb,var(--brand-cyan) 22%,var(--surface)); }
.sidebar-assignment-area { display:grid;gap:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--card-bg); }
.sidebar-assignment-area > .sidebar-assignments { border:0;border-bottom:1px solid color-mix(in srgb,var(--brand-cyan) 45%,var(--border));border-radius:0; }
.sidebar-assignment-area > .sidebar-assignment-examples { border:0;border-radius:0;background:transparent; }
.sidebar-assignment-examples { display:grid;gap:10px;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface); }
.assignment-examples-head { display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:13px; }
.sidebar-assignment-example { padding:10px;border:1px solid var(--border);border-left:3px solid var(--brand-cyan);border-radius:8px; }
.sidebar-assignment-example > strong { display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere; }
.sidebar-assignment-example .hint { font-size:12px;line-height:1.5;margin:5px 0; }
.sidebar-assignment-example > .link-btn { margin-top:5px;text-align:left; }
.sidebar-assignment-example .inbox-demo-badge { font-size:11px;margin-bottom:6px; }

/* Inicio alternativo: Agenda y Chat independientes, con módulos en filas. */
.home-layout-control{display:inline-flex;align-items:center;gap:4px;padding:3px;border:1px solid var(--border);border-radius:9px;background:var(--surface);flex:none}
.home-layout-control .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:5px 9px;border:0;border-radius:6px;background:transparent;font-size:12px;line-height:1.3;color:var(--text-muted)}
.home-layout-control .btn[aria-pressed="true"]{color:var(--accent-text);background:var(--accent);font-weight:600}.home-layout-control .ico{width:17px;height:17px}.home-layout-control .btn:focus-visible{outline:2px solid var(--brand-cyan);outline-offset:2px}
@media(min-width:761px){
 .workspace-shell.home-workspace:not(.sidebar-collapsed){grid-template-columns:var(--workspace-rail-width) clamp(420px,43vw,620px) minmax(0,1fr)}
 .home-workspace .home-sidebar-head{display:grid;grid-template-columns:1fr 1fr;gap:0;padding-left:16px;padding-right:12px}.home-workspace .home-sidebar-head h2+ h2{padding-left:16px}
 .home-workspace .home-sidebar-body{flex:1;min-height:0;overflow:hidden;padding:0;scrollbar-gutter:auto;gap:10px}
 .home-workspace .home-sidebar-body>.service-notice-alert{flex:none;margin:0 12px}
 .home-split-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:1;min-height:0;overflow:hidden}
 .home-work-column{display:flex;flex-direction:column;gap:16px;min-width:0;min-height:0;height:100%;padding:0 8px 16px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
 .home-work-column+ .home-work-column{border-left:1px solid var(--border)}.home-work-column>*{flex:none;min-width:0}.home-work-column:focus-visible{outline:2px solid var(--brand-cyan);outline-offset:-3px}
 .home-workspace .home-content-inner{max-width:none}.home-workspace .home{padding-inline:18px}
 .home-workspace .home-content .board-grid{grid-template-columns:minmax(0,1fr);gap:8px}
 .home-workspace .board-tile-main{display:grid;grid-template-columns:minmax(142px,.85fr) minmax(0,1.15fr) minmax(0,1fr);align-content:stretch;align-items:center;min-height:72px}
 .home-workspace .board-tile-main .bt-icon{grid-column:1;grid-row:1;display:flex;align-items:center;align-self:stretch;gap:10px;padding:8px 12px;min-height:100%;font-size:15px;line-height:1.4}
 .home-workspace .board-tile-main .bt-glyph{flex:none}.home-workspace .board-tile-main .bt-kind{min-width:0;overflow-wrap:anywhere}.home-workspace .board-tile-main .bt-custom-name{display:none}
 .home-workspace .board-tile-main .bt-desc{grid-column:2;grid-row:1;padding:8px 14px;font-size:13px;line-height:1.5}
 .home-workspace .board-tile-main .bt-stats{grid-column:3;grid-row:1;margin:0;padding:8px 37px 8px 10px;font-size:12px;gap:5px}
 .home-workspace .board-tile-menu{right:6px;top:50%;transform:translateY(-50%);color:var(--text-muted)}.home-workspace .board-tile-menu:hover{background:var(--surface-2)}
 .home-workspace .board-tile.add{min-height:60px;grid-template-columns:auto 1fr;align-content:center;padding:8px 16px}.home-workspace .board-tile.add .bt-icon{grid-row:1 / span 2}.home-workspace .board-tile.add .bt-name{padding:0}.home-workspace .board-tile.add .bt-area{grid-column:2;padding:0;font-weight:400}
}
@media(min-width:761px) and (max-width:1150px){
 .workspace-shell.home-workspace:not(.sidebar-collapsed){grid-template-columns:var(--workspace-rail-width) 420px minmax(0,1fr)}
 .home-workspace .board-tile-main{grid-template-columns:minmax(118px,.75fr) minmax(0,1fr)}.home-workspace .board-tile-main .bt-icon{grid-row:1 / span 2;font-size:14px;gap:6px;padding:8px 10px}
 .home-workspace .board-tile-main .bt-desc{grid-column:2;grid-row:1;padding:8px 34px 2px 12px}.home-workspace .board-tile-main .bt-stats{grid-column:2;grid-row:2;padding:2px 34px 8px 12px}
 .home-workspace .home{padding-inline:12px}
}
@media(max-width:760px){.home-layout-control{display:none}}

@media(min-width:761px){
 .home-workspace #homeChatColumn>.office-tile{flex:1;min-height:0;display:flex}
 .home-workspace #homeChatColumn .office-card{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}
 .home-workspace #homeChatColumn .office-card-head,.home-workspace #homeChatColumn .office-card-summary,.home-workspace #homeChatColumn .office-card-footer{flex:none}
 .home-workspace #homeChatColumn .office-channel-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
 .home-workspace #homeChatColumn .office-channel-list:focus-visible{outline:2px solid var(--brand-cyan);outline-offset:-3px}
}

/* Separadores de ancho: mantienen legibles ambos paneles y los módulos. */
.home-collaboration-resize{display:none}
.home-collaboration-resizing,.home-collaboration-resizing *{cursor:row-resize!important;user-select:none!important}
@media(min-width:761px){
 .home-workspace #homeChatColumn{display:grid;grid-template-rows:minmax(0,var(--home-chat-share,50fr)) 16px minmax(0,var(--home-assignment-share,50fr));gap:0;overflow:hidden}
 .home-workspace #homeChatColumn>.office-tile{height:100%;min-height:0}
 .home-workspace #homeChatColumn>.sidebar-assignment-area{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden}
 .home-workspace #homeChatColumn>.sidebar-assignment-area>.sidebar-assignments{flex:none}
 .home-workspace #homeChatColumn>.sidebar-assignment-area>:not(.sidebar-assignments){flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 .home-workspace .home-collaboration-resize{display:flex;align-items:center;justify-content:center;position:relative;cursor:row-resize;touch-action:none;min-width:0;height:16px;color:var(--text-muted);outline-offset:-2px}
 .home-collaboration-resize:before{content:'';position:absolute;left:25%;right:25%;height:1px;background:var(--border)}
 .home-collaboration-resize>span{position:relative;padding:0 8px;background:var(--surface);font-size:15px;line-height:16px}
 .home-collaboration-resize:hover,.home-collaboration-resize:focus-visible{color:var(--brand-cyan);outline:2px solid var(--brand-cyan);border-radius:4px}
}
.home-layout-control .btn[hidden],.home-resize-handle[hidden]{display:none!important}
.home-layout-resizing,.home-layout-resizing *{cursor:col-resize!important;user-select:none!important}
.home-resize-handle{position:relative;display:flex;align-items:center;justify-content:center;width:8px;min-height:0;cursor:col-resize;touch-action:none;z-index:25;color:var(--text-muted)}
.home-resize-grip{display:block;width:3px;height:38px;border-radius:4px;background:var(--border)}
.home-resize-handle:hover,.home-resize-handle:focus-visible{background:color-mix(in srgb,var(--brand-cyan) 12%,transparent);color:var(--brand-cyan);outline:2px solid var(--brand-cyan);outline-offset:-2px}
.home-resize-handle:hover .home-resize-grip,.home-resize-handle:focus-visible .home-resize-grip{background:var(--brand-cyan)}
.home-resize-handle[aria-disabled="true"]{cursor:default;opacity:.5}
@media(min-width:761px){
 .workspace-shell.home-workspace:not(.sidebar-collapsed){grid-template-columns:var(--workspace-rail-width) calc(var(--home-agenda-width,300px) + var(--home-chat-width,300px) + 9px) minmax(420px,1fr);grid-template-rows:minmax(0,1fr);overflow-y:auto;scrollbar-gutter:stable}
 .home-workspace .home-sidebar{position:relative}.home-workspace .home-sidebar-head{grid-template-columns:var(--home-agenda-width,300px) minmax(0,1fr);gap:8px;padding-left:8px;padding-right:8px}.home-workspace .home-sidebar-head h2+ h2{padding-left:0}
 .home-workspace .home-split-columns{grid-template-columns:var(--home-agenda-width,300px) 8px minmax(0,1fr)}
 .home-workspace #homeModulesResize{position:absolute;top:var(--workspace-heading-height,56px);bottom:0;right:-4px}
 .home-workspace #homeChatColumn{border-left:0}
 .workspace-shell.home-workspace.home-workspace-stacked:not(.sidebar-collapsed){grid-template-columns:var(--workspace-rail-width) minmax(0,1fr);grid-template-rows:var(--home-pane-height) var(--home-pane-height);align-content:start}
 .home-workspace-stacked:not(.sidebar-collapsed) .home-sidebar{grid-column:2;grid-row:1;height:var(--home-pane-height)}
 .home-workspace-stacked:not(.sidebar-collapsed) .workspace-content{grid-column:2;grid-row:2;height:var(--home-pane-height)}
 .home-workspace-stacked:not(.sidebar-collapsed) .workspace-rail{grid-row:1 / span 2;position:sticky;top:0;align-self:start;height:var(--home-pane-height)}
}
/* CRM: vínculos y datos consultados desde sus módulos de origen. */
.crm-panel { margin: 1rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; }
.crm-contact-block { min-width: 0; margin: .25rem 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.crm-contact-block > legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--brand-link); }
.crm-contact-fields { min-width: 0; }
.crm-contact-fields > label { min-width: 0; }
.crm-contact-fields input { width: 100%; }
.crm-followup-side[hidden] { display: none; }
.crm-followup-side { min-width: 0; }
.crm-followup-side .bitacora-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.crm-followup-side .bitacora-add input { width: 100%; min-width: 0; }
.crm-followup-side .bitacora-add button { justify-self: end; }
.crm-followup-side .bitacora li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; }
.crm-followup-side .bitacora li > time { grid-column: 1; grid-row: 1; }
.crm-followup-side .bitacora li > span { grid-column: 1; grid-row: 2; min-width: 0; overflow-wrap: anywhere; }
.crm-followup-side .bitacora li > button { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.crm-followup-side .checklist li > span { min-width: 0; overflow-wrap: anywhere; }
.module-toolbar:has(> .crm-boundary-notice:not([hidden])) { flex-wrap: wrap; }
.crm-boundary-notice { flex: 0 0 auto; width: 100%; min-width: 0; }
.crm-boundary-notice[hidden], .crm-activity-card[hidden], .crm-legacy-review[hidden], #crmRelationshipStart[hidden] { display: none; }
.crm-boundary-notice details { margin: 6px 0; }
.crm-activity-card { margin-bottom: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.crm-activity-card h3 { margin: 0 0 8px; font-size: 14px; }
.crm-activity-summary { margin: 0; }
.crm-activity-summary dt, .crm-legacy-review dt { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.crm-activity-summary dd, .crm-legacy-review dd { margin: 3px 0 6px; overflow-wrap: anywhere; }
.crm-action-info { min-width: 0; flex: 1; }
.crm-action-info small { display: block; }
.crm-action-info .task-link { text-align: left; overflow-wrap: anywhere; }
.crm-checklist-fold { margin-bottom: 14px; }
.crm-checklist-fold > summary { cursor: pointer; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.crm-legacy-review { margin: 12px 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.crm-legacy-review summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.crm-action-dialog { width: min(560px, calc(100vw - 24px)); padding: 20px; }
.crm-action-dialog .grid2 { margin: 14px 0; }
.crm-action-dialog .btn-row { margin-top: 14px; }
.crm-fees-dialog { width: min(1100px, calc(100vw - 28px)); max-height: calc(100dvh - 36px); padding: 20px; overflow-y: auto; }
.crm-fees-dialog .modal-head { position: sticky; top: -20px; z-index: 2; padding: 12px 0; background: var(--surface); }
.crm-fee-client { font-size: 17px; font-weight: 600; margin: 10px 0; }
.crm-fee-heading, .crm-fee-summary, .crm-fee-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crm-fee-heading { justify-content: space-between; }
.crm-fee-heading h3 { flex: 1 1 200px; margin: 8px 0; }
.crm-fee-summary { margin-bottom: 18px; }
.crm-fee-summary .hint { flex: 1 1 200px; margin: 0; }
.crm-fees-table-wrap { overflow-x: auto; margin: 12px 0 24px; }
.crm-fees-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.crm-fees-table th, .crm-fees-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--border); }
.crm-fees-table td .btn { margin-bottom: 6px; }
.crm-fee-agreement { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 14px 0; }
.crm-fee-details { border-top: 1px solid var(--border); padding: 10px 0; margin-top: 8px; }
.crm-fee-details > summary { cursor: pointer; font-weight: 600; }
.crm-fee-definition { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 8px 14px; }
.crm-fee-definition dt { color: var(--text-muted); }
.crm-fee-definition dd { margin: 0; overflow-wrap: anywhere; }
.crm-fee-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.crm-fee-records { padding-left: 20px; }
.crm-fee-records > li { padding: 8px 0; }
.crm-fee-revision { border-bottom: 1px solid var(--border); padding: 10px; }
.crm-fees-dialog label { min-width: 0; }
.crm-fees-dialog input:not([type=checkbox]), .crm-fees-dialog select, .crm-fees-dialog textarea { width: 100%; min-width: 0; }
.crm-fee-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.crm-fee-matters { max-height: 220px; overflow-y: auto; }
.crm-fee-payment { margin-top: 12px; }
/* Una guía de posibilidades: ejemplos de uso, independiente de las instrucciones del manual. */
.capabilities-guide .faq-heading h1 { font-size: clamp(20px,2.4vw,30px); }
.capabilities-guide .faq-body { scroll-behavior: auto; }
.capabilities-guide .faq-contents { padding-top: 22px; }
.capability-search { display: grid; gap: 10px; margin-bottom: 22px; }
.capability-search label { display: grid; gap: 10px; font-weight: 600; }
.capability-search input { width: 100%; min-width: 0; font: inherit; font-size: 14px; font-weight: 400; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.capability-search .manual-clear { justify-self: start; padding-bottom: 0; }
.capability-hero { position: relative; overflow: hidden; padding: clamp(22px,3vw,38px); border-radius: 18px; background: #0D6E8C; color: #fff; margin-bottom: 24px; }
.capability-hero::before { content: ''; position: absolute; width: 260px; height: 260px; border: 1px solid #ffffff28; border-radius: 50%; top: -160px; right: -80px; box-shadow: 0 0 0 34px #ffffff08,0 0 0 70px #ffffff05; pointer-events: none; }
.capability-hero h2 { font-size: clamp(26px,3vw,40px); line-height: 1.15; margin: 12px 0 16px; letter-spacing: -.7px; }
.capability-hero > p { max-width: 660px; line-height: 1.65; }
.capability-hero .manual-chapter-label { color: #c5eff5; }
.capability-hero-note { font-size: 13px; margin-bottom: 0; color: #e0f3f7; }
.capability-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 22px 0; }
.capability-shortcut { padding: 14px; min-width: 0; text-align: left; background: #ffffff12; color: #fff; border: 1px solid #ffffff45; border-radius: 10px; font: inherit; font-size: 14px; cursor: pointer; }
.capability-shortcut:hover { background: #ffffff25; }
.capability-workflow { margin: 0 0 26px; padding: 20px; background: color-mix(in srgb,var(--brand-cyan) 6%,var(--surface)); border: 1px solid var(--border); border-radius: 12px; }
.capability-workflow h3 { margin: 0 0 14px; font-size: 17px; }
.capability-workflow > div { display: flex; gap: 10px; flex-wrap: wrap; }
.capability-workflow button { border: 1px solid var(--border); color: var(--brand-link); background: var(--surface); border-radius: 18px; padding: 9px 14px; cursor: pointer; text-align: left; }
.capability-workflow > p { margin-bottom: 0; }
.capability-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.capability-filters button { padding: 9px 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.capability-filters button[aria-pressed="true"] { background: var(--brand-link); color: #fff; border-color: var(--brand-link); }
.capability-group { margin: 30px 0; --cap-color: #0D6E8C; }
.capability-tone-olive { --cap-color: #637d38; }
.capability-tone-wine { --cap-color: #A9475D; }
.capability-tone-blue { --cap-color: #6256a6; }
.capability-tone-gold { --cap-color: #946A00; }
.capability-group > h2 { font-size: 23px; margin: 0 0 18px; color: var(--text); }
.capability-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 16px; }
.capability-topic { min-width: 0; border: 1px solid var(--border); border-top: 4px solid var(--cap-color); border-radius: 12px; padding: 22px; background: var(--card-bg,var(--surface)); scroll-margin-block: 16px; }
.capability-topic[hidden], .capability-group[hidden], .capability-empty[hidden], .capability-hero[hidden], .capability-workflow[hidden] { display: none; }
.capability-label { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; color: var(--cap-color); margin: 0 0 10px; }
.capability-topic h3 { font-size: 20px; line-height: 1.3; margin: 0 0 12px; letter-spacing: -.25px; }
.capability-topic > p:not(.capability-label) { line-height: 1.65; font-size: 14px; color: var(--text-muted); }
.capability-featured { grid-column: 1 / -1; background: color-mix(in srgb,var(--cap-color) 5%,var(--card-bg,var(--surface))); }
.capability-details { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.capability-details summary { font-weight: 600; color: var(--brand-link); cursor: pointer; font-size: 14px; }
.capability-details li { margin: 12px 0; font-size: 14px; line-height: 1.65; }
.capability-details ul { padding-left: 20px; }
.capability-example { border-left: 3px solid var(--cap-color); padding: 12px 16px; margin-top: 18px; background: color-mix(in srgb,var(--cap-color) 6%,var(--surface)); border-radius: 0 8px 8px 0; }
.capability-example strong { font-size: 13px; }
.capability-example p { font-size: 14px; line-height: 1.6; margin: 8px 0 0; }
.capability-boundaries { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-bottom: 20px; }
.capability-boundaries h3 { font-size: 18px; margin-top: 0; }
.capability-boundaries dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 0; }
.capability-boundaries dt { font-weight: 700; color: var(--cap-color); font-size: 14px; margin-bottom: 6px; }
.capability-boundaries dd { margin: 0; font-size: 13px; line-height: 1.6; }
.capability-next { margin-top: 28px; border-top: 1px solid var(--border); padding: 22px 0 0; }
.capability-next h3 { font-size: 19px; }
.capability-empty { padding: 22px; border: 1px dashed var(--border); border-radius: 10px; }
@media(max-width:700px) { .capabilities-guide .faq-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); } .capabilities-guide .faq-contents { border-right: 0; border-bottom: 1px solid var(--border); max-height: none; } .capabilities-guide .faq-contents > div:not(.capability-search) { display: none; } .capability-shortcuts,.capability-boundaries dl { grid-template-columns: minmax(0,1fr); } .capabilities-guide .faq-body { padding: 20px 16px 35px; } }
.crm-payment-account, .crm-payment-receipt { border: 1px solid var(--border); border-radius: 10px; margin: 14px 0; padding: 14px; overflow-wrap: anywhere; }
.crm-payment-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.crm-payment-metrics > div { padding: 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.crm-payment-metrics span, .crm-payment-metrics strong { display: block; overflow-wrap: anywhere; }
.crm-payment-metrics span { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.crm-payment-metrics > p { grid-column: 1 / -1; }
.crm-payment-total { padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
@media(max-width:600px) { .crm-payment-metrics { grid-template-columns: minmax(0,1fr); } }
@media(max-width:600px) { .crm-fees-dialog { padding: 12px; } .crm-fees-dialog .grid2 { grid-template-columns: minmax(0,1fr); } .crm-fees-dialog .modal-head { top: -12px; } .crm-fee-definition { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) { .crm-contact-fields { grid-template-columns: minmax(0, 1fr); } }
.crm-panel[hidden] { display: none; }
.crm-panel h3, .crm-panel h4 { margin: 0 0 .6rem; }
.crm-panel h4 { margin-top: 1rem; }
.crm-panel > label { display: grid; gap: .4rem; margin: .75rem 0; }
.crm-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-top: .75rem; }
.crm-controls > input, .crm-controls > select { flex: 1 1 220px; min-width: 0; max-width: 100%; }
.crm-controls > label { display: grid; gap: .4rem; }
.crm-matters { list-style: none; padding: 0; margin: .75rem 0; }
.crm-matters > li { display: flex; align-items: start; justify-content: space-between; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.crm-matters .task-link { text-align: left; overflow-wrap: anywhere; }
.crm-matters .btn { flex-shrink: 0; }
@media (max-width: 520px) { .crm-matters > li { flex-direction: column; } }
