/* Aplicación: estructura, menú lateral, barra superior y vistas. */

.shell { display: flex; gap: 14px; height: 100%; padding: 14px; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Menú lateral ---------- */
.side {
  flex: none; width: 236px; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px;
  border-radius: var(--r-xl); transition: width 0.28s var(--ease); z-index: 30;
}
.side[data-collapsed='true'] { width: 62px; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 2px 3px 12px; min-height: 50px; }
.side-brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.side-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; transition: opacity 0.18s; }
.side[data-collapsed='true'] .side-label { display: none; }
.side-nav { display: grid; gap: 2px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 11px;
  border-radius: 12px; color: var(--text-2); font-size: 13.5px; font-weight: 500; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.side-link:hover { background: var(--fill); color: var(--text); }
.side-link.is-active { background: var(--fill-2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.side-link.is-active > .icon { color: var(--accent-2); }
.side-link.is-active::before { content: ''; position: absolute; left: -10px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side[data-collapsed='true'] .side-link { justify-content: center; padding: 0; }

/* Etiqueta flotante cuando el menú está contraído */
.side[data-collapsed='true'] [data-tip]:hover::after,
.side[data-collapsed='true'] [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 8px; background: rgba(22, 16, 12, 0.96); border: 1px solid var(--line-2);
  color: var(--text); font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none; z-index: 40;
  box-shadow: var(--shadow);
}

.side-tree { flex: 1; min-height: 0; overflow: hidden auto; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.side[data-collapsed='true'] .side-tree { overflow: visible; }
.side-ws { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 6px 4px 11px; min-height: 36px; }
.side-ws-name { font-size: 12px; color: var(--text-3); font-weight: 500; }
.side[data-collapsed='true'] .side-ws { display: none; }
.side-board { height: 36px; font-weight: 400; }
.side-board .board-dot { width: 24px; height: 24px; border-radius: 8px; }
.side-empty { padding: 2px 11px 8px; font-size: 12.5px; color: var(--text-3); }
.side-foot { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.side-scrim { display: none; }

/* ---------- Barra superior ---------- */
.top { flex: none; display: flex; align-items: center; gap: 12px; position: relative; z-index: 20; }
.top-burger { display: none; width: 42px; height: 42px; border-radius: 14px; }
.top-search { position: relative; flex: 1; min-width: 0; max-width: 460px; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px; border-radius: 999px; color: var(--text-3); box-shadow: none; }
.top-search:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--text); }
.top-search input { flex: 1; min-width: 0; background: transparent; border: 0; height: 100%; }
.top-search input::placeholder, .filter-box input::placeholder { color: var(--text-3); }
.top-search input::-webkit-search-cancel-button, .filter-box input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); cursor: pointer; }
.top-actions { flex: none; margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-actions .btn-primary { height: 42px; padding: 0 16px; }
.top-clock { display: inline-grid; place-items: center; height: 42px; padding: 0 14px; border-radius: 999px; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); box-shadow: none; }
.top-user { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 7px; border-radius: 999px; color: var(--text-2); box-shadow: none; }
.top-user:hover { color: var(--text); }
.top-user-name { font-weight: 500; font-size: 13.5px; color: var(--text); }

.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 6px; border-radius: var(--r-m); max-height: 60vh; overflow: auto; z-index: 30; }
.search-head { padding: 8px 10px 4px; font-size: 12px; color: var(--text-3); }
.search-none { padding: 14px 12px; color: var(--text-2); }
.search-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 6px 10px; border-radius: 8px; text-align: left; }
.search-row:hover, .search-row:focus-visible { background: var(--fill-2); outline: none; }
.search-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.search-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ---------- Área de vistas ---------- */
.view-outlet { flex: 1; min-height: 0; overflow: hidden auto; border-radius: var(--r-l); outline: none; scrollbar-gutter: stable; }
.view { display: flex; flex-direction: column; gap: 16px; min-height: 100%; padding: 4px 4px 28px; }
.view-loading { display: grid; place-items: center; height: 50vh; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 10px 6px 2px; }
.page-head h1 { font: 400 34px/1.08 var(--font-display); letter-spacing: -0.01em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.page-head p { margin-top: 6px; color: var(--text-2); max-width: 70ch; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.page-actions { display: flex; gap: 8px; }

.panel { border-radius: var(--r-l); padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; font-weight: 600; }
.panel-head p { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.panel-figure { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.panel-figure strong { font: 400 26px/1 var(--font-display); color: var(--text); margin-right: 3px; }
.panel-empty { padding: 10px 0 4px; }

/* ---------- Inicio ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { border-radius: var(--r-l); padding: 16px 18px 15px; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--text-2); }
.stat-value { margin-top: 10px; font: 400 38px/1 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-note { margin-top: 8px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-note a { color: var(--accent-2); }
.stat-note a:hover { text-decoration: underline; }
.stat.glass-accent .stat-label, .stat.glass-accent .stat-note { color: rgba(255, 250, 242, 0.85); }
.stat.is-warn .stat-note { color: #ffc9c1; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: start; }

.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; height: 190px; align-items: end; }
.bar-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar { width: min(100%, 18px); border-radius: 999px; background: linear-gradient(180deg, rgba(255, 244, 230, 0.6), rgba(255, 244, 230, 0.12)); min-height: 4px; transition: height 0.5s var(--ease); }
.bar-col.is-today .bar { background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 0 22px -4px var(--accent); }
.bar-value { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--fill-3); font-variant-numeric: tabular-nums; }
.bar-col.is-today .bar-value { background: var(--accent); color: var(--accent-ink); }
.bar-label { height: 14px; font-size: 11px; color: var(--text-3); white-space: nowrap; }

.progress-list { display: grid; gap: 14px; }
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.progress-row:hover .progress-name { color: var(--accent-2); }
.progress-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-pct { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.battery { display: flex; gap: 2px; height: 8px; width: 100%; border-radius: 999px; overflow: hidden; }
.battery.is-tall { height: 10px; }
.battery span { background: var(--c); min-width: 3px; flex-basis: 0; }
.battery span.is-none { background: var(--fill-3); }

.due-list, .task-list { display: grid; }
.due-row, .task-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-radius: 10px; }
.task-row { grid-template-columns: minmax(0, 1fr) auto 92px; padding: 11px 10px; }
.due-row:hover, .task-row:hover { background: var(--fill); }
.due-date { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.due-date.is-overdue { color: #ffb3a8; }
.due-title, .task-title { display: grid; min-width: 0; }
.due-title strong, .task-title strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due-title small, .task-title small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.task-row .due-date { justify-content: flex-end; }
.task-row.is-done strong { color: var(--text-3); text-decoration: line-through; }
li + li > .task-row, li + li > .due-row { border-top: 1px solid transparent; }

.feed { display: grid; gap: 12px; }
.feed-row { display: flex; gap: 10px; align-items: flex-start; }
.feed-body { min-width: 0; }
.feed-body p { color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.feed-body strong { color: var(--text); font-weight: 500; }
.feed-meta { font-size: 12px; color: var(--text-3); }

/* ---------- Tableros (lista) ---------- */
.ws-list { display: grid; gap: 26px; }
.ws-head { display: flex; align-items: center; gap: 9px; padding: 0 6px 10px; color: var(--text-2); }
.ws-head h2 { font-size: 15px; font-weight: 600; color: var(--text); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.board-card { position: relative; display: grid; gap: 8px; align-content: start; min-height: 150px; padding: 18px; border-radius: var(--r-l); text-align: left; transition: transform 0.18s var(--ease), border-color 0.18s; overflow: hidden; }
.board-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); opacity: 0.8; }
.board-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.board-card strong { font-size: 15.5px; font-weight: 600; margin-top: 6px; }
.board-card p { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--text-3); }
.board-card.is-new { place-items: center; place-content: center; border: 1px dashed var(--line-2); background: rgba(20, 14, 10, 0.25); color: var(--text-2); font-weight: 500; }
.board-card.is-new::before { display: none; }
.board-card.is-new:hover { color: var(--text); background: rgba(20, 14, 10, 0.4); }

.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.template-card { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); text-align: left; transition: border-color 0.15s, background 0.15s; }
.template-card:hover { border-color: var(--line-2); }
.template-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.template-card strong { font-weight: 600; }
.template-card > span:last-child { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.template-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--c) 26%, transparent); color: color-mix(in srgb, var(--c) 55%, #fff); margin-bottom: 4px; }

/* ---------- Tablero ---------- */
.view-board { gap: 12px; }
.board-head { display: grid; gap: 12px; padding: 6px 6px 0; }
.board-title { display: flex; align-items: center; gap: 13px; }
.board-title-text { min-width: 0; }
.board-title h1 { font: 400 30px/1.1 var(--font-display); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }
.crumb { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.crumb a:hover { color: var(--text); }
.board-desc { color: var(--text-2); max-width: 80ch; margin-top: -4px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.board-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-tools-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-box { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; color: var(--text-3); box-shadow: none; }
.filter-box input { width: 170px; background: transparent; border: 0; height: 100%; }
.filter-box:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.board-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ----- Tabla ----- */
.table-wrap { flex: none; display: grid; gap: 14px; overflow-x: auto; padding-bottom: 6px; align-content: start; }
.tgroup { border-radius: var(--r-l); min-width: max-content; overflow: hidden; }
.tgroup-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; position: sticky; left: 0; width: max-content; max-width: 100%; }
.tgroup-head h2 { font-size: 15px; font-weight: 600; color: color-mix(in srgb, var(--c) 55%, #fff); }
.tgroup.is-closed .tgroup-head { padding-bottom: 10px; }
.tgrid { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: var(--cols); align-items: stretch; min-height: 40px; border-bottom: 1px solid var(--line); position: relative; }
.trow > * { min-width: 0; }
.tbody .trow::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); opacity: 0.85; }
.tbody .trow:hover { background: rgba(255, 240, 222, 0.035); }
.tbody:empty { min-height: 10px; }
.thead { min-height: 34px; font-size: 12px; color: var(--text-3); background: rgba(0, 0, 0, 0.14); }
.th { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; min-width: 0; }
.th span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-title { justify-content: flex-start; padding-left: 6px; }
.th-btn { width: 100%; height: 100%; color: inherit; font-size: 12px; border-left: 1px solid var(--line); }
.th-btn:hover { background: var(--fill); color: var(--text); }
.grip { display: grid; place-items: center; color: var(--text-3); opacity: 0; cursor: grab; padding-left: 4px; }
.trow:hover .grip { opacity: 1; }
.td { display: flex; align-items: center; min-width: 0; border-left: 1px solid var(--line); }
.td-title { border-left: 0; gap: 6px; padding-right: 10px; }
.title-btn { flex: 1; min-width: 0; height: 100%; padding: 0 6px; text-align: left; font-weight: 500; border-radius: 6px; }
.title-btn span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-btn:hover span { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.trow.is-done .title-btn { color: var(--text-2); }
.is-dragging { opacity: 0.35; }
.drop-marker { height: 3px; margin: -1.5px 0; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); position: relative; z-index: 2; pointer-events: none; }

.cell-slot { display: flex; width: 100%; height: 100%; min-width: 0; }
.cell { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 100%; min-height: 39px; padding: 0 10px; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background 0.12s; }
.cell:hover { background: var(--fill); }
.cell:focus-visible { outline-offset: -2px; }
.cell-text { justify-content: flex-start; display: block; text-align: left; line-height: 39px; }
.cell-number { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.cell-date { font-variant-numeric: tabular-nums; color: var(--text-2); }
.cell-date.is-overdue { color: #ffb3a8; }
.cell-ghost { display: grid; place-items: center; color: var(--text-3); opacity: 0; transition: opacity 0.12s; }
.trow:hover .cell-ghost, .cell:focus-visible .cell-ghost, .drawer-value .cell-ghost { opacity: 1; }
.cell-status { margin: 4px 5px; height: calc(100% - 8px); min-height: 30px; width: calc(100% - 10px); border-radius: 8px; font-weight: 500; font-size: 12.5px;
  background: color-mix(in srgb, var(--c) 30%, transparent); color: color-mix(in srgb, var(--c) 40%, #fff); border: 1px solid color-mix(in srgb, var(--c) 48%, transparent); }
.cell-status:hover { background: color-mix(in srgb, var(--c) 42%, transparent); }
.cell-status.is-empty { background: var(--fill); border: 1px dashed var(--line-2); }
.cell-status.is-empty:hover { background: var(--fill-2); }
.cell-input { width: 100%; height: 100%; min-height: 39px; padding: 0 10px; background: rgba(0, 0, 0, 0.45); border: 0; box-shadow: inset 0 0 0 2px var(--accent); font-size: 13px; min-width: 0; }
.cell-input.is-number { text-align: right; }
.cell-input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.6); cursor: pointer; }

.tadd { border-bottom: 0; }
.tadd-cell { grid-column: 2 / -1; display: flex; }
.add-form { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 8px; color: var(--text-3); border-radius: 10px; }
.add-form:focus-within { color: var(--accent-2); }
.add-input { flex: 1; min-width: 0; height: 38px; background: transparent; border: 0; }
.tsum { border-bottom: 0; border-top: 1px solid var(--line); min-height: 38px; background: rgba(0, 0, 0, 0.12); }
.tsum .td { border-left: 0; padding: 0 8px; justify-content: center; }
.td-sum { flex-direction: column; align-items: flex-end !important; justify-content: center; line-height: 1.15; padding-right: 10px !important; }
.td-sum strong { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.td-sum small { font-size: 10.5px; color: var(--text-3); }
.add-group { justify-self: start; }

.status-menu { display: grid; gap: 5px; padding: 4px; }
.status-option { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 500;
  background: color-mix(in srgb, var(--c) 30%, transparent); color: color-mix(in srgb, var(--c) 40%, #fff); border: 1px solid color-mix(in srgb, var(--c) 48%, transparent); }
.status-option:hover, .status-option:focus-visible { background: color-mix(in srgb, var(--c) 46%, transparent); outline: none; }
.status-option.is-active { box-shadow: 0 0 0 2px var(--text); }
.status-clear, .status-edit { display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); }
.status-clear:hover, .status-edit:hover { background: var(--fill-2); color: var(--text); }
.status-edit { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 2px; padding-top: 4px; height: 34px; }
.person-menu { display: grid; gap: 1px; }
.person-option { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 5px 8px; border-radius: 8px; text-align: left; }
.person-option span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-option:hover, .person-option:focus-visible { background: var(--fill-2); outline: none; }
.person-option.is-active .icon { color: var(--accent-2); }
.icon-picker { display: grid; gap: 8px; padding: 4px; }
.icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.icon-grid .icon-btn { width: 100%; height: 38px; }
.icon-grid .icon-btn.is-active { color: var(--accent-2); }

.option-list { display: grid; gap: 8px; }
.option-row { display: flex; align-items: center; gap: 10px; }
.option-row .input { flex: 1; height: 36px; }
.option-done { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }

/* ----- Kanban ----- */
.kanban { flex: 1; display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; padding-bottom: 8px; min-height: 320px; }
.lane { flex: none; width: 292px; max-height: calc(100vh - 262px); min-height: 120px; display: flex; flex-direction: column; border-radius: var(--r-l); padding: 6px; }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 10px; min-height: 44px; }
.lane-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }
.lane-head h2 { flex: 0 1 auto; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-head .count { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--fill-2); color: var(--text-2); }
.lane-sum { margin-left: auto; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lane-head .icon-btn { margin-left: auto; }
.lane-sum + .icon-btn { margin-left: 0; }
.lane-list { flex: 1; min-height: 46px; overflow: hidden auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 6px; border-radius: 12px; transition: background 0.15s; }
.lane-list.is-drop-target { background: var(--accent-soft); }
.lane-list .drop-marker { margin: -2px 0; flex: none; }
.lane-empty { padding: 12px 8px; font-size: 12.5px; color: var(--text-3); text-align: center; pointer-events: none; }
.lane .add-form { flex: none; margin-top: 2px; }
.lane .add-form:hover, .lane .add-form:focus-within { background: var(--fill); }
.lane-new { justify-content: center; align-items: center; flex-direction: row; gap: 8px; width: 240px; min-height: 52px; color: var(--text-2); font-weight: 500; border-style: dashed; background: rgba(20, 14, 10, 0.3); box-shadow: none; }
.lane-new:hover { color: var(--text); background: rgba(20, 14, 10, 0.48); }

.card { flex: none; display: grid; gap: 9px; padding: 11px 12px; border-radius: 13px; background: rgba(255, 240, 222, 0.075); border: 1px solid var(--line); cursor: grab; transition: background 0.14s, border-color 0.14s, transform 0.14s var(--ease); }
.card:hover { background: rgba(255, 240, 222, 0.12); border-color: var(--line-2); }
.card:active { cursor: grabbing; }
.card h3 { font-size: 13.5px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.card.is-done h3 { color: var(--text-2); }
.card-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.card-pills .pill { height: 20px; padding: 0 8px; font-size: 11.5px; }
.card-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card-chips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }

/* ---------- Panel del elemento ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 6, 4, 0.42); display: flex; justify-content: flex-end; padding: 14px; animation: fade 0.18s; }
.drawer-scrim.is-leaving { opacity: 0; transition: opacity 0.18s; }
.drawer { width: min(560px, 100%); min-width: 0; height: 100%; display: flex; flex-direction: column; border-radius: var(--r-xl); animation: slide 0.26s var(--ease); overflow: hidden; }
@keyframes slide { from { transform: translateX(28px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.drawer-head-actions { display: flex; gap: 2px; }
.drawer-scroll { flex: 1; min-height: 0; overflow: hidden auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 22px; }
.drawer-scroll > * { flex: none; min-width: 0; max-width: 100%; }
.drawer-title { width: 100%; resize: none; overflow: hidden; background: transparent; border: 0; border-radius: 8px; padding: 4px 6px; margin: 0 -6px; font: 400 28px/1.15 var(--font-display); letter-spacing: -0.01em; }
.drawer-title:hover { background: var(--fill); }
.drawer-title:focus-visible { outline: none; background: rgba(0, 0, 0, 0.35); box-shadow: 0 0 0 2px var(--accent); }
.drawer-fields { display: grid; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; background: rgba(0, 0, 0, 0.18); }
.drawer-field { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: stretch; min-height: 42px; }
.drawer-field + .drawer-field { border-top: 1px solid var(--line); }
.drawer-label { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.drawer-value { display: flex; border-left: 1px solid var(--line); min-width: 0; }
.drawer-value .cell { justify-content: flex-start; }
.drawer-value .cell-status { justify-content: center; max-width: 200px; }
.drawer-value .cell-number { justify-content: flex-start; }
.drawer-value .cell-input.is-number { text-align: left; }
.drawer-section { display: grid; gap: 10px; min-width: 0; }
.drawer-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-section h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.drawer-section h3 .icon { color: var(--text-3); }
.drawer-desc { min-height: 84px; overflow: hidden; resize: none; }
.saved-hint { font-size: 12px; color: var(--ok); }
.progress { height: 6px; border-radius: 999px; background: var(--fill-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s var(--ease); }
.check-list { display: grid; }
.check-row-item { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 2px 4px 2px 6px; border-radius: 8px; }
.check-row-item:hover { background: var(--fill); }
.check-row-item label { flex: 1; min-width: 0; cursor: pointer; overflow-wrap: anywhere; padding: 4px 0; }
.check-row-item.is-done label { color: var(--text-3); text-decoration: line-through; }
.check-row-item .icon-btn { opacity: 0; }
.check-row-item:hover .icon-btn, .check-row-item .icon-btn:focus-visible { opacity: 1; }
.drawer .add-form { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line); padding: 0 10px; }
.comment-list { display: grid; gap: 14px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 4px 13px 13px 13px; background: var(--fill); border: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.comment-head strong { font-weight: 500; font-size: 13px; }
.comment-head span { font-size: 12px; color: var(--text-3); margin-right: auto; }
.comment-head .icon-btn { width: 22px; height: 22px; opacity: 0; }
.comment:hover .icon-btn, .comment .icon-btn:focus-visible { opacity: 1; }
.comment-body p { margin-top: 3px; color: var(--text-2); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 8px; }

/* ---------- Equipo y ajustes ---------- */
.team-list { display: grid; }
.team-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(110px, auto) 34px; align-items: center; gap: 14px; padding: 12px 4px; }
.team-row + .team-row { border-top: 1px solid var(--line); }
.team-row.is-off .team-who { opacity: 0.55; }
.team-who { display: grid; min-width: 0; }
.team-who strong { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.team-who > span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-seen { font-size: 12.5px; color: var(--text-3); text-align: right; white-space: nowrap; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.settings-panel:last-child { grid-column: 1 / -1; }
.settings-panel > .field, .settings-panel > .form { margin-top: 16px; }
.settings-panel > .panel-head + .form, .settings-panel > .panel-head + .field { margin-top: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); font-size: 13px; font-weight: 500; color: var(--text-2); }
.choice:hover { border-color: var(--line-2); color: var(--text); }
.choice.is-active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.choice-swatch { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(150deg, var(--accent-2), var(--accent), var(--accent-3)); }
.choice-bg { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 8px 9px; border-radius: var(--r-m); text-align: center; }
.choice-thumb { display: block; width: 132px; height: 78px; border-radius: 8px; background: #17110d center / cover no-repeat; }

/* ---------- Pantallas angostas ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { padding: 10px; gap: 0; }
  .side { position: fixed; left: 10px; top: 10px; bottom: 10px; width: 250px !important; transform: translateX(calc(-100% - 20px)); transition: transform 0.26s var(--ease); background: var(--glass-strong); }
  .side.is-open { transform: none; }
  .side .side-label { display: block !important; }
  .side .side-link { justify-content: flex-start !important; padding: 0 11px !important; }
  .side .side-ws { display: flex !important; }
  .side .side-tree { overflow: hidden auto !important; }
  .side [data-tip]::after { display: none !important; }
  .side-toggle { display: none; }
  .side.is-open + .side-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(8, 6, 4, 0.5); }
  .top-burger { display: inline-grid; }
  .top-clock, .top-user-name, .top-actions .btn-primary span { display: none; }
  .top-actions .btn-primary { width: 42px; padding: 0; }
  .page-head h1 { font-size: 28px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .template-grid, .field-pair { grid-template-columns: minmax(0, 1fr); }
  .board-tools-right { margin-left: 0; width: 100%; }
  .filter-box { flex: 1; }
  .filter-box input { width: 100%; }
  .lane { width: 268px; max-height: calc(100vh - 330px); }
  .drawer-scrim { padding: 0; }
  .drawer { border-radius: 0; }
  .drawer-field { grid-template-columns: 116px minmax(0, 1fr); }
  .team-row { grid-template-columns: auto minmax(0, 1fr) 34px; }
  .team-row > .tag, .team-seen { display: none; }
  .due-row { grid-template-columns: 70px minmax(0, 1fr); }
  .due-row .pill { display: none; }
}
