/* Fichas de tarea y cita, hilo de notas, altas rápidas y documentos (carril F3). Solo tokens de base.css: valen
   igual en Claro y en Noche. Móvil primero; en escritorio las fichas son un diálogo algo más ancho. */

/* ---------- Hoja de ficha ---------- */
.sheet-ficha .sheet-body { padding-top: 0; }
.sheet-layer[data-mode="bottom"] .sheet-ficha .sheet-head { min-height: 44px; }
/* En la cabecera, solo un antetítulo («Tarea», «Cita»): el título de verdad va grande en el cuerpo. */
.sheet-ficha .sheet-title { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.fc { display: flex; flex-direction: column; }

/* Cabecera */
.fc-hero { display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; }
.fc-title { font-size: 23px; line-height: 1.22; font-weight: 800; letter-spacing: -.018em; color: var(--ink); overflow-wrap: anywhere; }
.fc-hecho .fc-title, .fc-descartado .fc-title { color: var(--ink-2); }
.fc-lead { margin-top: -4px; font-size: 15px; line-height: 1.45; font-weight: 700; color: var(--peach-ink); }
.fc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.fc-who { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding-right: 4px; font-size: 14px; font-weight: 800; color: var(--ink); }
.fc-deadline { display: inline-flex; align-items: center; }
.fc-when { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }
.fc-when .ico { margin-top: 2px; }
.fc-hero > .chip-confirm { align-self: flex-start; }
.fc-hito { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--sage-wash); color: var(--sage-ink); font-weight: 800; }

/* Acciones: preguntar, «Ya tenemos cita» y la tarjeta de la cita */
.fc-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.fc-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-actions-row .btn { flex: 0 1 auto; }
.fc-ask .ico { color: var(--peach-ink); }
.fc-cita-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--sage-wash); border: 1px solid var(--sage-soft); text-align: left; color: inherit; transition: border-color .2s, background .2s; }
.fc-cita-card:hover { border-color: var(--sage); }
.fc-cita-card.is-por-pedir { background: var(--now-bg); border-color: transparent; }
.fc-cita-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface); color: var(--sage-ink); }
.fc-cita-card.is-por-pedir .fc-cita-ico { color: var(--now-ink); }
.fc-cita-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fc-cita-label { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.fc-cita-when { font-size: 15px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.fc-cita-chev { color: var(--ink-2); }

/* Secciones */
.fc-sec { margin-top: 22px; }
.fc-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-bottom: 6px; }
.fc-sec-head .btn-text { margin-right: -10px; }
.fc-sec-t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-ink); }
.fc-sec-n { font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--ink-2); background: var(--sunk); border-radius: 999px; padding: 1px 9px; font-variant-numeric: tabular-nums; }
.fc-sec.all-done .fc-sec-n { background: var(--sage-soft); color: var(--sage-ink); }
.fc-sec-t .confirm-dot { margin: 0 2px; }
.fc-prose { color: var(--ink); }
.fc-prose + .fc-go-row, .fc-prose + .fc-links, .fc-go-row + .fc-links { margin-top: 12px; }

/* Casillas */
.fc-checks { list-style: none; display: flex; flex-direction: column; }
.fc-check { position: relative; display: flex; align-items: flex-start; gap: 6px; min-height: 48px; padding: 2px 0; cursor: pointer; border-radius: 12px; }
.fc-check + .fc-check::before { content: ""; position: absolute; left: 42px; right: 0; top: 0; height: 1px; background: var(--line); }
.fc-check .check { margin: 0 0 0 -8px; }
.fc-check-text { flex: 1; min-width: 0; padding: 11px 4px 10px 0; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; transition: color .25s; }
.fc-check.done .fc-check-text { color: var(--ink-2); }
.fc-check:hover .fc-check-text { color: var(--ink); }

/* Lugar, «Cómo llegar» y enlaces */
.fc-go-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-go .ico { color: var(--sage-ink); }
.fc-place { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.fc-place-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--peach-wash); color: var(--peach-ink); }
.fc-place-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fc-place-name { font-size: 16px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.fc-place-addr { font-size: 14px; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.fc-place .fc-go { flex: none; }
.fc-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fc-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 12px; border-radius: 14px; background: var(--sage-wash); text-decoration: none; color: inherit; transition: box-shadow .2s; }
.fc-link:hover { box-shadow: inset 0 0 0 1.5px var(--sage); }
.fc-link-ico { color: var(--sage-ink); flex: none; }
.fc-link-text { min-width: 0; display: flex; flex-direction: column; }
.fc-link-label { font-size: 15px; font-weight: 800; color: var(--sage-ink); line-height: 1.3; overflow-wrap: anywhere; }
.fc-fuentes-t { margin: 10px 0 4px; font-size: 13px; font-weight: 800; color: var(--ink-soft, inherit); }
.fc-link-host { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fc-link-inline { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: var(--sage-ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.fc-source { margin-top: 14px; font-size: 14px; }
.fc-source .fc-link-inline { min-height: 44px; }

/* Resultado y edición en línea */
.fc-res-empty { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px dashed var(--line-2); color: var(--ink-2); font-weight: 700; text-align: left; transition: border-color .2s, color .2s, background .2s; }
.fc-res-empty:hover { border-color: var(--sage); color: var(--sage-ink); background: var(--sage-wash); }
.fc-edit-inline { display: flex; flex-direction: column; gap: 8px; }
.fc-edit-inline .textarea { min-height: 76px; }
.fc-inline-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.fc-inline-acts .btn { white-space: nowrap; }
/* En una pregunta, el editor de la respuesta ocupa también la columna del «⋯» (así «Marcar respondida» no se parte). */
.fc-q-body .fc-edit-inline { margin-right: -50px; }

/* Textos largos plegados con «Leer más» */
.fc-clamp { max-height: 7.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.fc-more { font-size: 14px; margin-top: 2px; }
.fc-add-note .ico { color: var(--sage-ink); }

/* Compras y tarea relacionadas */
.fc-needs { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fc-need { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 10px 8px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); text-align: left; color: inherit; transition: border-color .2s; }
.fc-need:hover { border-color: var(--line-2); }
.fc-need-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--sage-wash); color: var(--sage-ink); }
.fc-need-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.fc-need-state { flex: none; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.fc-need-state.ok { color: var(--sage-ink); }
.fc-need-chev { flex: none; color: var(--ink-2); }

/* Notas fijas */
.fc-pinned { padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: var(--peach-wash); }
.fc-pinned-t { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 13px; font-weight: 800; color: var(--peach-ink); }

/* ---------- Cita ---------- */
.fc-date { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--peach-wash); border: 1px solid var(--peach-soft); }
.fc-date.porpedir { background: var(--now-bg); border-color: transparent; }
.fc-date.done { background: var(--sage-wash); border-color: var(--sage-soft); }
.fc-date.off { background: var(--sunk); border-color: transparent; }
.fc-date-tile { width: 54px; height: 58px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; background: var(--surface); color: var(--peach-ink); line-height: 1; box-shadow: var(--shadow-1); }
.fc-date-tile b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fc-date-tile small { margin-top: 3px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fc-date.done .fc-date-tile { color: var(--sage-ink); }
.fc-date.off .fc-date-tile { color: var(--ink-2); }
.fc-date-ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface); color: var(--now-ink); }
.fc-date.done .fc-date-ico { color: var(--sage-ink); }
.fc-date.off .fc-date-ico { color: var(--ink-2); }
.fc-date-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fc-date-main { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.fc-date-sub { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.fc-date-chip { margin-top: 4px; }
/* Recordatorio del calendario suscrito: botón de texto con objetivo de 44 px, alineado a la izquierda. */
.fc-cal-hint.btn { align-self: flex-start; justify-content: flex-start; min-height: 44px; margin-left: -10px; padding: 4px 10px; font-size: 14px; text-align: left; white-space: normal; }

/* Preguntas */
.fc-qs { list-style: none; display: flex; flex-direction: column; }
.fc-q { position: relative; display: grid; grid-template-columns: 44px 1fr 44px; align-items: start; gap: 2px 6px; padding: 2px 0; }
.fc-q + .fc-q::before { content: ""; position: absolute; left: 50px; right: 0; top: 0; height: 1px; background: var(--line); }
.fc-q-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; margin-left: -6px; }
.fc-q-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sage-strong); background: var(--surface); transition: background .2s; }
.fc-q-mark:hover .fc-q-dot { background: var(--sage-wash); }
.fc-q-mark.on { color: var(--on-sage); }
.fc-q-mark.on .ico { width: 24px; height: 24px; padding: 3px; border-radius: 50%; background: var(--sage-ink); }
.fc-q-body { min-width: 0; padding: 11px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.fc-q-text { font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.fc-q.done .fc-q-text { color: var(--ink-2); font-weight: 600; }
.fc-q-answer { padding-left: 10px; border-left: 3px solid var(--sage-soft); font-size: 15px; font-weight: 600; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.fc-q-more { margin-top: 0; }
.fc-mini-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fc-sec-head + .fc-mini-add { margin-top: 2px; margin-bottom: 4px; }
.fc-mini-add .input { flex: 1; min-height: 48px; }
.fc-mini-btn { flex: none; width: 48px; min-height: 48px; padding: 0; }
.fc-checks + .fc-mini-add { margin-top: 10px; }
.fc-loose { margin-top: 12px; box-shadow: none; background: var(--bg); }
.fc-loose .fold-head { min-height: 50px; }
.fc-loose .fold-label { font-size: 15px; }
.fc-loose .fold-body { padding: 0 12px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fc-loose-list { list-style: none; width: 100%; display: flex; flex-direction: column; }
.fc-loose-item { display: flex; align-items: center; gap: 8px; min-height: 48px; font-size: 15px; font-weight: 600; color: var(--ink); }
.fc-loose-item + .fc-loose-item { border-top: 1px solid var(--line); }
.fc-loose-item > span { flex: 1; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; }

/* ---------- Formularios (altas y edición) ---------- */
.al-form { display: flex; flex-direction: column; }
.al-title.textarea { min-height: 48px; resize: none; line-height: 1.4; }
.al-form > .field-error { margin: -10px 0 12px; }
.al-group { border: 0; padding: 0; }
.al-offline { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--now-bg); color: var(--now-ink); font-size: 14px; font-weight: 700; }
.al-offline .ico { margin-top: 1px; flex: none; }
.al-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.al-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-2); font-size: 14px; font-weight: 700; white-space: nowrap; transition: background .2s var(--ease), color .2s, box-shadow .2s; }
.al-pill .ico { color: var(--sage-ink); }
.al-pill:hover { box-shadow: inset 0 0 0 1.5px var(--sage); color: var(--ink); }
.al-pill.on { background: var(--sage-ink); color: var(--on-sage); box-shadow: none; }
.al-pill.on .ico { color: var(--on-sage); }
.al-pill:active { transform: scale(.97); }
.al-date .al-pills { margin-bottom: 4px; }
.al-sub-label { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.al-date-hint { min-height: 1.45em; }
.al-date-warn { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--now-bg); color: var(--now-ink); font-size: 14px; font-weight: 800; line-height: 1.4; }
.al-date-warn[hidden] { display: none; }
.al-date-warn .ico { flex: none; margin-top: 1px; }
.al-date-start { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.al-date-start[hidden], .al-add-start[hidden] { display: none; }
.al-date-row { display: flex; align-items: center; gap: 6px; }
.al-date-row .input { flex: 1; }
.al-add-start { align-self: flex-start; margin-top: 2px; font-size: 14px; }
.al-fold { margin: 2px 0 16px; box-shadow: none; background: var(--bg); }
.al-fold .fold-head { min-height: 52px; }
.al-fold .fold-label { font-size: 15px; }
.al-fold .fold-body { padding: 4px 14px 2px; }
.al-affix .input { width: 100%; }
.al-count { margin-top: -10px; margin-bottom: 8px; text-align: right; }
.al-about { min-width: 0; }

/* Buscador de vínculos */
.al-search { display: flex; flex-direction: column; gap: 6px; }
.al-search-box { position: relative; }
.al-search-box .input { padding-left: 44px; }
.al-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.al-results-note { font-size: 13px; font-weight: 700; color: var(--ink-2); min-height: 1.2em; }
.al-results-note:empty { display: none; }
.al-results { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.al-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; border-radius: 14px; text-align: left; color: inherit; transition: background .2s; }
.al-result:hover { background: var(--sunk); }
.al-result-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--sage-wash); color: var(--sage-ink); }
.al-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.al-result-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.al-result-sub { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.al-result-chev { flex: none; color: var(--ink-2); }
.al-picked { display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 10px; border-radius: 16px; background: var(--sage-wash); }

/* Cita: formulario */
.cf-from { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; padding: 10px 12px; border-radius: 14px; background: var(--sage-wash); color: var(--ink); font-size: 14px; font-weight: 600; }
.cf-from .ico { flex: none; margin-top: 1px; color: var(--sage-ink); }
.cf-when { align-items: start; }
.cf-when .field { margin-bottom: 8px; }
.cf-when + .field-hint { margin: -2px 0 16px; }
.cf-place-group { margin-bottom: 16px; }
.cf-place-group .field { margin-bottom: 10px; }
.cf-places { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cf-places-t { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-right: 2px; }
.cf-place { min-height: 40px; padding: 0 12px; font-size: 13px; }
.cf-llevar-box { display: flex; flex-direction: column; gap: 8px; }
.cf-llevar { list-style: none; display: flex; flex-direction: column; }
.cf-llevar-item { display: flex; align-items: center; gap: 6px; min-height: 44px; padding-left: 12px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.cf-llevar-item:nth-child(odd) { background: var(--bg); }
.cf-llevar-item > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cf-llevar-add { display: flex; gap: 8px; }
.cf-llevar-add .input { flex: 1; }

/* ---------- Hilo de notas ---------- */
.nt { display: flex; flex-direction: column; }
.nt-list[hidden], .nt-more[hidden] { display: none; }
.nt-list { list-style: none; display: flex; flex-direction: column; }
.nt-item { display: grid; grid-template-columns: 32px 1fr auto; align-items: start; gap: 10px; padding: 8px 0; }
.nt-item + .nt-item { border-top: 1px solid var(--line); }
.nt-item .avatar, .nt-anon { margin-top: 3px; }
.nt-anon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sunk); color: var(--ink-2); }
.nt-body { min-width: 0; padding-top: 2px; }
.nt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.5; }
.nt-name { color: var(--ink); font-weight: 800; }
.nt-pending { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--now-bg); color: var(--now-ink); font-size: 13px; }
.nt-text { margin-top: 2px; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.nt-item.pending .nt-text { color: var(--ink-2); }
.nt-menu { margin: -4px -8px 0 0; }
.nt-more { align-self: flex-start; font-size: 14px; }
.nt-compose { margin-top: 8px; }
.nt-compose-row { display: flex; align-items: flex-end; gap: 8px; }
.nt-input.textarea { flex: 1; min-height: 48px; padding: 12px 16px; border-radius: 24px; resize: none; line-height: 1.45; overflow-y: auto; }
.nt-send { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sage-ink); color: var(--on-sage); transition: transform .15s var(--ease), background .2s, opacity .2s; }
.nt-send:disabled { background: var(--sunk); color: var(--ink-2); opacity: 1; }
.nt-send:not(:disabled):active { transform: scale(.94); }
.nt-count { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: right; }
.nt-count:empty { display: none; }

/* ---------- Documentos ---------- */
.dc-sec { display: flex; flex-direction: column; gap: 8px; }
.dc-list[hidden], .dc-jobs[hidden] { display: none; }
.dc-list, .dc-jobs { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.dc-row { display: flex; align-items: center; gap: 2px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); padding-right: 2px; }
.dc-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 6px 8px 8px; border-radius: 13px; text-align: left; color: inherit; }
.dc-open:hover .dc-name { color: var(--sage-ink); }
.dc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dc-name { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .2s; }
.dc-meta { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.dc-thumb { flex: none; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--sunk); color: var(--ink-2); }
.dc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-thumb-md { width: 48px; height: 48px; }
.dc-thumb-lg { width: 64px; height: 64px; border-radius: 14px; align-content: center; gap: 2px; }
.dc-thumb.pdf { background: var(--peach-wash); color: var(--peach-ink); }
.dc-thumb-tag { display: none; font-size: 13px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.dc-thumb-lg .dc-thumb-tag:not(:empty) { display: block; }
.dc-add { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-add .btn { flex: 1 1 160px; }
.dc-job { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 14px; background: var(--sage-wash); }
.dc-job-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* Error de subida: tarjeta a lo ancho (fichero, motivo y la salida que sirve). */
.dc-job.error { flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 14px 8px; background: var(--late-bg); }
.dc-job-head { display: flex; align-items: center; gap: 8px; color: var(--late-ink); }
.dc-job-head .dc-name { color: var(--ink); }
.dc-job-err { font-size: 14px; font-weight: 700; color: var(--late-ink); line-height: 1.45; }
.dc-job-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.dc-job.error .btn-soft { background: var(--surface); }
.dc-progress { position: relative; display: block; height: 4px; margin-top: 4px; border-radius: 999px; background: var(--sage-soft); overflow: hidden; }
.dc-progress > span { position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: inherit; background: var(--sage-strong); animation: dcSlide 1.25s var(--ease) infinite; }
@keyframes dcSlide { from { transform: translateX(-105%); } to { transform: translateX(270%); } }

/* Visor de fotos */
.sheet-docview .sheet-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dc-view { display: block; width: 100%; border-radius: 14px; overflow: hidden; background: var(--sunk); }
.dc-view-img { display: block; width: 100%; max-height: calc(100dvh - 260px); object-fit: contain; margin: 0 auto; }
.dc-view-err { padding: 40px 16px; text-align: center; color: var(--ink-2); font-weight: 700; }
.dc-view-meta { align-self: flex-start; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.sheet-docview .dc-links { align-self: flex-start; }

/* Vínculos de un documento */
.dc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-links.none { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.dc-link { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--sage-wash); color: var(--sage-ink); font-size: 13px; font-weight: 800; text-align: left; }
.dc-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-link:hover { box-shadow: inset 0 0 0 1.5px var(--sage); }
.dc-link-t { margin: 4px 0 8px; }
.dc-link-t + .al-search { margin-bottom: 4px; }
.dc-linked { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.dc-linked-item { display: flex; align-items: center; gap: 12px; padding: 6px 4px 6px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }

/* Pantalla #docs */
.dc-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dc-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.dc-filters::-webkit-scrollbar { display: none; }
.dc-filters .al-pill { flex: none; }
.dc-usage { margin: 14px 0 6px; }
.dc-screen-jobs { margin: 12px 0 0; }
.dc-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.dc-card { position: relative; display: grid; grid-template-columns: 1fr 44px; grid-template-areas: "open more" "links links"; align-items: center; padding: 6px 4px 10px 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.dc-card .dc-open { grid-area: open; min-height: 76px; }
.dc-card .dc-card-more { grid-area: more; align-self: start; margin-top: 8px; }
.dc-card .dc-links { grid-area: links; padding: 0 8px 0 84px; }
.dc-card .dc-links.none { padding-top: 0; }
.dc-screen-empty .empty { padding-top: 40px; }
.dc-screen-empty .dc-add { justify-content: center; }
.dc-screen-empty .dc-add .btn { flex: 0 1 auto; }
.dc-offline { margin-top: 18px; }

@media (min-width: 760px) {
  .dc-grid { grid-template-columns: 1fr 1fr; }
  .dc-tools { flex-direction: row; align-items: center; }
  .dc-tools .al-search-box { flex: 1; }
  .dc-filters { margin: 0; padding: 2px; }
  .dc-add .btn { flex: 0 1 auto; }
}

/* Pantallas muy estrechas */
@media (max-width: 380px) {
  .fc-title { font-size: 21px; }
  .fc-date { gap: 12px; padding: 12px 14px; }
  .fc-place { flex-wrap: wrap; }
  .fc-place .fc-go { margin-left: 48px; }
  .dc-card .dc-links { padding-left: 8px; }
}

/* Sin movimiento: la barra de subida queda quieta */
@media (prefers-reduced-motion: reduce) {
  .dc-progress > span { animation: none; width: 100%; opacity: .55; transform: none; }
}

/* ---------- Imprimir una ficha (desde «⋯ → Imprimir») ---------- */
@media print {
  :root, html[data-theme="noche"] {
    --bg: #fff; --surface: #fff; --sunk: #f3f3f3; --line: #ddd; --line-2: #ccc; --ink: #111; --ink-2: #444; --ink-3: #555;
    --sage-ink: #2f4a37; --sage-wash: #f4f7f3; --sage-soft: #e6ece5; --peach-ink: #8a4224; --peach-wash: #fbf4ef; --peach-soft: #f5e1d6;
    --now-bg: #f8f0e0; --now-ink: #6b470d; --late-bg: #f8e6de; --late-ink: #8a4026;
  }
  html.sheet-open, html.sheet-open body { overflow: visible !important; height: auto !important; background: #fff !important; }
  html.sheet-open #root, html.sheet-open .toast, html.sheet-open .menu { display: none !important; }
  .sheet-layer { position: static !important; display: block !important; padding: 0 !important; }
  .sheet-layer:has(~ .sheet-layer) { display: none !important; }
  .sheet-backdrop, .sheet-grip, .sheet-head, .sheet-foot { display: none !important; }
  .sheet-layer .sheet { position: static !important; transform: none !important; opacity: 1 !important; max-width: none !important; width: auto !important; height: auto !important; max-height: none !important; box-shadow: none !important; border-radius: 0 !important; }
  .sheet-layer .sheet::after { display: none !important; }
  .sheet-body { overflow: visible !important; padding: 0 !important; }
  .fc-actions, .nt-compose, .nt-menu, .nt-more, .dc-add, .dc-row .icon-btn, .fc-mini-add, .fc-res-empty, .fc-q-more, .fc-loose, .al-offline, .fc-cal-hint, .fc-sec-head .btn, .fc-more { display: none !important; }
  .fc-clamp { max-height: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .fc-title { font-size: 20pt; }
  .fc-check, .fc-q, .nt-item, .fc-link, .fc-place { break-inside: avoid; }
  .fc-link { background: none; min-height: 0; padding: 2px 0; }
  a[href^="http"] { color: inherit; }
}
