
/* =============================================================================
   Secciones como Joe (2026-10-29): Expedientes y Clientes y Contactos
   Copiado literal de docs/interfaz/referencia-expedientes-clientes.html (<style id="css-app">).
   Archivo: src/server/assets/sections.css (se carga después de theme.css).
   ========================================================================== */

:root {
    --gs-ink: #101828; --gs-ink-2: #344054; --gs-muted: #667085; --gs-subtle: #98a2b3;
    --gs-line: #e4e7ec; --gs-line-2: #d0d5dd;
    --gs-canvas: #f3f5f8; --gs-surface: #fff; --gs-surface-2: #f8fafc; --gs-surface-3: #eef1f5;
    --gs-primary: #2f55d4; --gs-primary-600: #2645b5; --gs-primary-soft: #eef2fd; --gs-primary-soft-2: #d6e0fb; --gs-primary-ink: #2645b5;
    --gs-teal: #0e8f97; --gs-teal-soft: #e3f5f6; --gs-teal-ink: #0a5c62;
    --gs-green-soft: #e3f5ec; --gs-green-ink: #0d6447;
    --gs-amber-soft: #fdf3dc; --gs-amber-ink: #8a5a06;
    --gs-coral: #d92d20; --gs-coral-soft: #fdecea; --gs-coral-ink: #a3241a;
    --gs-violet-soft: #efedfd; --gs-violet-ink: #4b3fb0;
    --gs-sky-soft: #e6f2fb; --gs-sky-ink: #1c5f8a;
    --gs-shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --gs-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px -2px rgba(16, 24, 40, .07);
    --gs-shadow-lg: 0 24px 60px -12px rgba(16, 24, 40, .28);
    --gs-ease: cubic-bezier(.2, .8, .2, 1); --gs-fast: .14s;
}

/* Tonos por expediente (monograma). Tono = (id % 8) + 1. */
[data-tone] { --tone-soft: #ddf2ec; --tone-ink: #0f5a49; }
[data-tone="2"] { --tone-soft: #e3effa; --tone-ink: #1b5a8f; }
[data-tone="3"] { --tone-soft: #eeedfe; --tone-ink: #3c3489; }
[data-tone="4"] { --tone-soft: #fcf2dc; --tone-ink: #86590a; }
[data-tone="5"] { --tone-soft: #fdebe8; --tone-ink: #a8361f; }
[data-tone="6"] { --tone-soft: #fbeaf0; --tone-ink: #72243e; }
[data-tone="7"] { --tone-soft: #ddf4f5; --tone-ink: #0a5b63; }
[data-tone="8"] { --tone-soft: #f1f4dc; --tone-ink: #4a5410; }
.gs-mono { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tone-soft); color: var(--tone-ink); font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.gs-mono--lg { width: 58px; height: 58px; border-radius: 17px; font-size: 21px; }
.gs-mono--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12.5px; }

/* Avatar de persona: tono estable por id (--hue) o foto. */
.gs-avatar { --hue: 210; display: grid; flex: none; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 12px; background: hsl(var(--hue) 52% 93%); background-position: center; background-size: cover; color: hsl(var(--hue) 50% 30%); font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; }
.gs-avatar--lg { width: 58px; height: 58px; border-radius: 17px; font-size: 21px; }
.gs-avatar--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.gs-avatar[data-photo="true"] { color: transparent; }

/* Estado del expediente (lifecycle en minúsculas) */
.gs-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--gs-surface-3); color: var(--gs-muted); font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.gs-status::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gs-status:is([data-status="intake"], [data-status="documentation"]) { background: var(--gs-sky-soft); color: var(--gs-sky-ink); }
.gs-status:is([data-status="visit_pending"], [data-status="proposal_preparation"]) { background: var(--gs-amber-soft); color: var(--gs-amber-ink); }
.gs-status[data-status="proposal_sent"] { background: var(--gs-violet-soft); color: var(--gs-violet-ink); }
.gs-status:is([data-status="accepted"], [data-status="active"]) { background: var(--gs-green-soft); color: var(--gs-green-ink); }
.gs-status[data-status="completed"] { background: var(--gs-teal-soft); color: var(--gs-teal-ink); }
.gs-status:is([data-status="lost"], [data-status="cancelled"]) { background: var(--gs-coral-soft); color: var(--gs-coral-ink); }
.gs-status[data-status="inactive"] { background: var(--gs-surface-3); color: var(--gs-muted); }
.gs-status[data-status="client_active"] { background: var(--gs-green-soft); color: var(--gs-green-ink); }
/* Prioridad Alta o Urgente: icono + texto (nunca solo color) */
.gs-flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--gs-coral-soft); color: var(--gs-coral-ink); font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.gs-flag i { font-size: 14px; }
.gs-flag-dot { display: inline-grid; flex: none; place-items: center; width: 18px; height: 18px; border-radius: 6px; background: var(--gs-coral-soft); color: var(--gs-coral); font-size: 12px; }

/* Canales de conversación */
[data-channel] { --cat-soft: #eef2f3; --cat-ink: #3a4a55; }
[data-channel="email"] { --cat-soft: #e3effa; --cat-ink: #1b5a8f; }
[data-channel="whatsapp"] { --cat-soft: #ddf2ec; --cat-ink: #0f6b4f; }
[data-channel="telegram"] { --cat-soft: #e1f1fb; --cat-ink: #19709f; }
[data-channel="facebook"], [data-channel="instagram"] { --cat-soft: #eeedfe; --cat-ink: #3c3489; }
.gs-cat-icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cat-soft); color: var(--cat-ink); font-size: 20px; }

/* Tipos de archivo */
.gs-file, .gs-folder { --kind: #6f7c86; --kind-soft: #eef2f3; }
[data-kind="folder"] { --kind: #b07a0e; --kind-soft: #fcf2dc; }
[data-kind="pdf"] { --kind: #c3432f; --kind-soft: #fbe9e5; }
[data-kind="doc"] { --kind: #2c7cc0; --kind-soft: #e3effa; }
[data-kind="sheet"] { --kind: #1f8a70; --kind-soft: #ddf2ec; }
[data-kind="image"] { --kind: #0e8f97; --kind-soft: #e3f5f6; }
[data-kind="video"], [data-kind="audio"] { --kind: #6e64c8; --kind-soft: #eeedfe; }
[data-kind="cad"] { --kind: #c84f7a; --kind-soft: #fbeaf0; }

/* ---------- Página ---------- */
.gs-page { display: grid; gap: 18px; width: 100%; max-width: 1480px; min-width: 0; margin: 0 auto; padding: 26px 32px 48px; }
.gs-notice { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 600; }
.gs-notice i { font-size: 18px; }
.gs-notice[data-tone="ok"] { background: var(--gs-green-soft); color: var(--gs-green-ink); }
.gs-notice[data-tone="error"] { background: var(--gs-coral-soft); color: var(--gs-coral-ink); }
.gs-notice[data-tone="warn"] { background: var(--gs-amber-soft); color: var(--gs-amber-ink); }

/* Botones (propios de las secciones; no tocan .btn de Tabler) */
.gs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--gs-line-2); border-radius: 12px; background: var(--gs-surface); color: var(--gs-ink); font: 650 14px var(--gris-font-main); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--gs-fast), border-color var(--gs-fast); }
.gs-btn:hover { border-color: #b8c0cc; background: var(--gs-surface-2); color: var(--gs-ink); }
.gs-btn i { font-size: 18px; }
.gs-btn--primary { border-color: transparent; background: var(--gs-primary); color: #fff; }
.gs-btn--primary:hover { border-color: transparent; background: var(--gs-primary-600); color: #fff; }
.gs-btn--danger { border-color: transparent; background: var(--gs-coral); color: #fff; }
.gs-btn--danger:hover { border-color: transparent; background: var(--gs-coral-ink); color: #fff; }
.gs-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.gs-iconbtn { display: inline-grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--gs-ink-2); font-size: 20px; text-decoration: none; cursor: pointer; }
.gs-iconbtn:hover { background: var(--gs-surface-3); color: var(--gs-ink); }
.gs-iconbtn--line { border-color: var(--gs-line-2); background: var(--gs-surface); }
.gs-row-menu { width: 34px; height: 34px; border-radius: 10px; color: var(--gs-subtle); font-size: 18px; }
.gs-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--gs-primary-ink); font: 700 13.5px var(--gris-font-main); text-decoration: none; cursor: pointer; white-space: nowrap; }
.gs-link:hover { background: var(--gs-primary-soft); color: var(--gs-primary-ink); }
.gs-link i { font-size: 16px; }
.gs-muted { margin: 0; color: var(--gs-muted); font-size: 14px; line-height: 1.55; }

/* Menú ⋯ (desplegable propio) */
.gs-more { position: relative; }
.gs-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; min-width: 230px; padding: 6px; border: 1px solid var(--gs-line); border-radius: 16px; background: var(--gs-surface); box-shadow: var(--gs-shadow-lg); }
.gs-menu[hidden] { display: none; }
.gs-menu > :is(a, button) { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--gs-ink); font: 650 14px var(--gris-font-main); text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap; }
.gs-menu > :is(a, button):hover, .gs-menu > :is(a, button):focus-visible { outline: none; background: var(--gs-surface-2); }
.gs-menu i { font-size: 18px; color: var(--gs-muted); }
.gs-menu .is-danger { color: var(--gs-coral-ink); }
.gs-menu .is-danger i { color: currentColor; }
.gs-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--gs-line); }

/* ---------- Barra de herramientas de las listas ---------- */
.gs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gs-search { position: relative; display: flex; flex: 1 1 280px; align-items: center; min-width: 0; margin: 0; }
.gs-search > i { position: absolute; left: 14px; color: var(--gs-subtle); font-size: 18px; pointer-events: none; }
.gs-search input { width: 100%; height: 42px; padding: 0 14px 0 42px; border: 1px solid var(--gs-line-2); border-radius: 12px; background: var(--gs-surface); color: var(--gs-ink); font-size: 14.5px; }
.gs-search input::placeholder { color: var(--gs-subtle); }
.gs-search input:focus { border-color: var(--gs-primary); outline: none; box-shadow: 0 0 0 3px var(--gs-primary-soft-2); }
.gs-seg { display: inline-flex; flex: none; padding: 3px; border-radius: 12px; background: #e8ecf1; }
.gs-seg > :is(a, button) { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--gs-muted); font: 650 13.5px var(--gris-font-main); text-decoration: none; cursor: pointer; white-space: nowrap; }
.gs-seg > :is(a, button):hover { color: var(--gs-ink); }
.gs-seg > [aria-pressed="true"], .gs-seg > [aria-current="page"] { background: var(--gs-surface); color: var(--gs-ink); box-shadow: var(--gs-shadow-xs); }
.gs-seg i { font-size: 16px; }
.gs-seg-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gs-primary); color: #fff; font-size: 11.5px; font-weight: 800; }
.gs-count { color: var(--gs-muted); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Lista de expedientes ---------- */
.gs-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.exp-row { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: 66px; padding: 10px 14px 10px 12px; border: 1px solid var(--gs-line); border-radius: 16px; background: var(--gs-surface); box-shadow: var(--gs-shadow-xs); color: inherit; text-decoration: none; cursor: pointer; transition: border-color var(--gs-fast), box-shadow var(--gs-fast); }
.exp-row:hover { border-color: var(--gs-line-2); box-shadow: var(--gs-shadow-sm); color: inherit; }
.exp-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gs-primary-soft-2); }
.exp-row[hidden] { display: none; }
.exp-row-id { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.exp-row-copy { display: grid; gap: 1px; min-width: 0; }
.exp-row-name { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--gs-ink); font-size: 15.5px; font-weight: 750; letter-spacing: -.012em; }
.exp-row-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-row-client { overflow: hidden; color: var(--gs-muted); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.exp-row-next { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; color: var(--gs-ink-2); font-size: 14px; }
.exp-row-next > i { flex: none; color: var(--gs-subtle); font-size: 16px; }
.exp-row-next > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-row-next[data-empty="true"] { color: var(--gs-subtle); }
.exp-row-side { display: flex; align-items: center; gap: 14px; }
.exp-row-date { min-width: 52px; color: var(--gs-muted); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.exp-row-side > i { color: var(--gs-subtle); font-size: 18px; }
.exp-row-foot { display: none; }
.gs-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; border: 1.5px dashed var(--gs-line-2); border-radius: 20px; text-align: center; }
.gs-empty > i { color: var(--gs-subtle); font-size: 34px; }
.gs-empty h3 { margin: 4px 0 0; color: var(--gs-ink); font-size: 18px; font-weight: 780; letter-spacing: -.02em; }
.gs-empty p { max-width: 460px; margin: 0 0 6px; color: var(--gs-muted); font-size: 14px; line-height: 1.55; }

/* ---------- Cabecera de ficha (expediente, cliente, contacto) ---------- */
.gs-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "back mark copy actions"; align-items: center; gap: 14px; }
.gs-head > .gs-back { grid-area: back; margin-left: -8px; }
.gs-head > .gs-mono, .gs-head > .gs-avatar, .gs-head > .gs-head-photo { grid-area: mark; }
.gs-head-photo { padding: 0; border: 0; border-radius: 17px; background: transparent; cursor: pointer; }
.gs-head-copy { grid-area: copy; display: grid; gap: 7px; min-width: 0; }
.gs-head-name { margin: 0; color: var(--gs-ink); font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.12; overflow-wrap: anywhere; }
.gs-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; color: var(--gs-muted); font-size: 14px; }
.gs-head-people { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.gs-head-person { display: inline-flex; align-items: center; gap: 6px; color: var(--gs-ink-2); font-weight: 650; text-decoration: none; }
.gs-head-person:hover { color: var(--gs-primary-ink); text-decoration: underline; }
.gs-head-person i { color: var(--gs-muted); font-size: 16px; }
.gs-head-actions { grid-area: actions; display: flex; align-items: center; gap: 6px; }

/* Pestañas */
.gs-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--gs-line); scrollbar-width: none; }
.gs-tabs::-webkit-scrollbar { display: none; }
.gs-tabs > :is(a, button) { position: relative; display: inline-flex; flex: none; align-items: center; min-height: 46px; padding: 0 14px; border: 0; background: transparent; color: var(--gs-muted); font: 700 15px var(--gris-font-main); text-decoration: none; cursor: pointer; }
.gs-tabs > :is(a, button):hover { color: var(--gs-ink); }
.gs-tabs > [aria-selected="true"] { color: var(--gs-ink); }
.gs-tabs > [aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--gs-primary); }
.gs-tab-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; margin-left: 7px; padding: 0 6px; border-radius: 999px; background: #e8ecf1; color: var(--gs-muted); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.gs-tabs > [aria-selected="true"] .gs-tab-count { background: var(--gs-primary-soft); color: var(--gs-primary-ink); }
.gs-panel[hidden] { display: none; }

/* Tarjetas */
.gs-card { min-width: 0; padding: 20px 22px; border: 1px solid var(--gs-line); border-radius: 20px; background: var(--gs-surface); box-shadow: var(--gs-shadow-xs); }
.gs-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin: 0 0 10px; }
.gs-card-title { margin: 0; color: var(--gs-ink); font-size: 16.5px; font-weight: 780; letter-spacing: -.02em; }
.gs-card-count { color: var(--gs-subtle); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gs-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, 1fr); gap: 18px; align-items: start; }
.gs-main, .gs-side { display: grid; gap: 18px; min-width: 0; }

/* Siguiente acción (lo que toca ahora) */
.exp-next-text { margin: 0; color: var(--gs-ink); font-size: 17px; line-height: 1.6; white-space: pre-line; }
.exp-next-meta { margin: 10px 0 0; color: var(--gs-subtle); font-size: 13px; }
.exp-next-history { display: grid; margin: 14px 0 0; padding: 0; list-style: none; }
.exp-next-history li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--gs-line); color: var(--gs-muted); font-size: 14px; line-height: 1.5; }
.exp-next-history time { font-weight: 700; font-variant-numeric: tabular-nums; }
.exp-next-history[hidden] { display: none; }

/* Notas (bitácora con autor) */
.gs-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin: 0; padding: 6px 6px 6px 14px; border: 1px solid var(--gs-line-2); border-radius: 14px; background: var(--gs-surface-2); transition: border-color var(--gs-fast), box-shadow var(--gs-fast), background var(--gs-fast); }
.gs-composer:focus-within { border-color: var(--gs-primary); background: var(--gs-surface); box-shadow: 0 0 0 3px var(--gs-primary-soft-2); }
.gs-composer textarea { display: block; min-height: 34px; max-height: 220px; padding: 7px 0; border: 0; background: transparent; color: var(--gs-ink); font-size: 14.5px; line-height: 1.45; resize: none; outline: none; field-sizing: content; }
.gs-composer textarea::placeholder { color: var(--gs-subtle); }
.gs-composer .gs-btn { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.gs-composer textarea:placeholder-shown + .gs-btn { opacity: .45; pointer-events: none; }
.gs-notes { display: grid; margin: 8px 0 0; padding: 0; list-style: none; }
.gs-note { display: grid; grid-template-columns: 64px minmax(0, 1fr) 34px; align-items: start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--gs-line); }
.gs-notes > .gs-note:last-child { padding-bottom: 2px; }
.gs-note-date { padding-top: 2px; color: var(--gs-muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gs-note-body { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.gs-note-text { margin: 0; color: var(--gs-ink-2); font-size: 14.5px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.gs-note-by { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; background: var(--gs-surface-3); color: var(--gs-ink-2); font-size: 11.5px; font-weight: 750; }
.gs-note-by[data-agent="true"] { background: var(--gs-teal-soft); color: var(--gs-teal-ink); }
.gs-note-edit { display: grid; gap: 8px; width: 100%; }
.gs-note-edit textarea { min-height: 90px; padding: 10px 12px; border: 1px solid var(--gs-line-2); border-radius: 12px; color: var(--gs-ink); font-size: 14.5px; line-height: 1.55; resize: vertical; }
.gs-note-edit div { display: flex; justify-content: flex-end; gap: 8px; }
@media (hover: hover) {
    .gs-note .gs-row-menu, .gs-person .gs-row-menu { opacity: 0; transition: opacity var(--gs-fast); }
    .gs-note:hover .gs-row-menu, .gs-note:focus-within .gs-row-menu,
    .gs-person:hover .gs-row-menu, .gs-person:focus-within .gs-row-menu { opacity: 1; }
}

/* Personas vinculadas (clientes del expediente) */
.gs-people { display: grid; margin: 0; padding: 0; list-style: none; }
.gs-person { display: grid; grid-template-columns: 32px minmax(0, 1fr) 34px; align-items: center; gap: 12px; min-height: 54px; padding: 6px 0; border-top: 1px solid var(--gs-line); }
.gs-people > .gs-person:first-child { border-top: 0; }
.gs-person-copy { display: grid; gap: 1px; min-width: 0; color: inherit; text-decoration: none; }
.gs-person-copy:hover .gs-person-name { color: var(--gs-primary-ink); }
.gs-person-name { overflow: hidden; color: var(--gs-ink); font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.gs-person-role { color: var(--gs-muted); font-size: 12.5px; }
.gs-person-role b { color: var(--gs-teal-ink); font-weight: 750; }
.gs-card-foot { margin: 6px 0 -6px -10px; }

/* Datos clave */
.gs-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.gs-kv > div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--gs-surface-2); }
.gs-kv dt { color: var(--gs-muted); font-size: 12.5px; font-weight: 650; }
.gs-kv dd { margin: 2px 0 0; overflow: hidden; color: var(--gs-ink); font-size: 15px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.gs-kv dd[data-empty="true"] { color: var(--gs-subtle); font-weight: 600; }

/* ---------- Conversaciones ---------- */
.gs-rows { margin: 0; padding: 4px 0; list-style: none; border: 1px solid var(--gs-line); border-radius: 20px; background: var(--gs-surface); box-shadow: var(--gs-shadow-xs); }
.exp-conv { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 20px; align-items: start; gap: 14px; padding: 14px 16px 14px 20px; border-top: 1px solid var(--gs-line); color: inherit; text-decoration: none; cursor: pointer; transition: background var(--gs-fast); }
.gs-rows > .exp-conv:first-child { border-top: 0; }
.exp-conv:hover { background: var(--gs-surface-2); color: inherit; }
.exp-conv:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--gs-primary); }
.exp-conv-copy { display: grid; gap: 3px; min-width: 0; }
.exp-conv-title { overflow: hidden; color: var(--gs-ink); font-size: 15px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.exp-conv-meta { color: var(--gs-muted); font-size: 12.5px; font-weight: 650; }
.exp-conv-sum { display: -webkit-box; overflow: hidden; margin: 2px 0 0; color: var(--gs-ink-2); font-size: 14px; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.exp-conv-date { padding-top: 2px; color: var(--gs-muted); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-conv > i { align-self: center; color: var(--gs-subtle); font-size: 18px; }
.gs-subhead { display: grid; grid-template-columns: auto 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.gs-subhead > .gs-iconbtn:first-child { margin-left: -8px; }
.gs-subhead-copy { display: grid; gap: 3px; min-width: 0; }
.gs-subhead-title { margin: 0; color: var(--gs-ink); font-size: 20px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; overflow-wrap: anywhere; }
.gs-subhead-meta { margin: 0; color: var(--gs-muted); font-size: 13.5px; }
.exp-entries { display: grid; margin: 0; padding: 0; list-style: none; }
.exp-entry { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--gs-line); }
.exp-entries > .exp-entry:first-child { padding-top: 4px; border-top: 0; }
.exp-entry-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--gs-surface-3); color: var(--gs-ink-2); font-size: 16px; }
.exp-entry[data-direction="in"] .exp-entry-mark { background: var(--gs-sky-soft); color: var(--gs-sky-ink); }
.exp-entry[data-direction="out"] .exp-entry-mark { background: var(--gs-primary-soft); color: var(--gs-primary-ink); }
.exp-entry[data-direction="topic"] .exp-entry-mark { background: var(--gs-teal-soft); color: var(--gs-teal-ink); }
.exp-entry-body { display: grid; gap: 6px; min-width: 0; }
.exp-entry-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.exp-entry-title { color: var(--gs-ink); font-size: 15px; font-weight: 750; line-height: 1.4; }
.exp-entry-date { color: var(--gs-muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.exp-entry-from { color: var(--gs-muted); font-size: 13px; }
.exp-entry-text { margin: 0; color: var(--gs-ink-2); font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.exp-entry-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.exp-entry-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--gs-surface-3); color: var(--gs-ink-2); font-size: 12px; font-weight: 700; }
.exp-entry-tag i { font-size: 14px; }
.exp-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: var(--gs-surface-2); }
.exp-points h4 { margin: 0 0 6px; color: var(--gs-ink); font-size: 13.5px; font-weight: 780; }
.exp-points ul { display: grid; gap: 5px; margin: 0; padding: 0 0 0 18px; color: var(--gs-ink-2); font-size: 14px; line-height: 1.5; }
.exp-entry-note { display: grid; gap: 6px; margin-top: 2px; }
.exp-entry-note > summary { display: inline-flex; width: max-content; align-items: center; gap: 6px; padding: 2px 0; color: var(--gs-primary-ink); font-size: 13px; font-weight: 700; list-style: none; cursor: pointer; }
.exp-entry-note > summary::-webkit-details-marker { display: none; }
.exp-entry-note .gs-notes { margin: 0; }
.exp-entry-note .gs-note { grid-template-columns: 56px minmax(0, 1fr) 34px; padding: 8px 0; }

/* ---------- Documentos ---------- */
.gs-docbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; }
.gs-docbar-info { color: var(--gs-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.gs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 0 -8px; padding: 0; list-style: none; }
.gs-crumbs button { min-height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--gs-muted); font: 650 14.5px var(--gris-font-main); cursor: pointer; }
.gs-crumbs button:hover { background: var(--gs-surface-3); color: var(--gs-ink); }
.gs-crumbs button[aria-current="page"] { color: var(--gs-ink); font-weight: 780; }
.gs-crumbs li + li::before { content: "›"; margin-right: 2px; color: var(--gs-subtle); }
.gs-drop { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; border: 1.5px dashed var(--gs-line-2); border-radius: 16px; transition: border-color var(--gs-fast), background var(--gs-fast); }
.gs-drop[data-over="true"] { border-color: var(--gs-primary); background: var(--gs-primary-soft); }
.gs-drop-icon { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--gs-surface-3); color: var(--gs-muted); font-size: 19px; }
.gs-drop p { flex: 1; min-width: 0; margin: 0; color: var(--gs-muted); font-size: 14px; }
.gs-drop p b { color: var(--gs-ink); font-weight: 700; }
.gs-drop-actions { display: flex; gap: 6px; }
.gs-drop-actions .gs-btn { min-height: 36px; padding: 0 13px; font-size: 13.5px; }
.gs-pending { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--gs-primary-soft-2); border-radius: 18px; background: var(--gs-surface); box-shadow: var(--gs-shadow-sm); }
.gs-pending[hidden] { display: none; }
.gs-pending-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.gs-pending-title { margin: 0; color: var(--gs-ink); font-size: 15px; font-weight: 780; }
.gs-pending-dest { color: var(--gs-muted); font-size: 13.5px; }
.gs-pending-dest b { color: var(--gs-ink-2); }
.gs-pending-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.gs-pending-list li { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 999px; background: var(--gs-surface-3); color: var(--gs-ink-2); font-size: 13px; font-weight: 600; }
.gs-pending-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-pending-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px auto; gap: 8px; }
.gs-pending-actions { display: flex; justify-content: flex-end; gap: 8px; }
.gs-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.gs-folder { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 34px; align-items: center; gap: 12px; min-height: 64px; padding: 10px 6px 10px 12px; border: 1px solid var(--gs-line); border-radius: 16px; background: var(--gs-surface); cursor: pointer; transition: border-color var(--gs-fast), box-shadow var(--gs-fast); }
.gs-folder-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--kind-soft); color: var(--kind); font-size: 20px; }
.gs-folder-copy { display: grid; gap: 1px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.gs-folder-copy::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.gs-folder-name { overflow: hidden; color: var(--gs-ink); font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.gs-folder-meta { color: var(--gs-muted); font-size: 12.5px; }
.gs-folder > .gs-more { z-index: 1; }
.gs-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.gs-file { position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--gs-line); border-radius: 16px; background: var(--gs-surface); cursor: pointer; transition: border-color var(--gs-fast), box-shadow var(--gs-fast); }
.gs-file:hover, .gs-folder:hover { border-color: var(--gs-line-2); box-shadow: var(--gs-shadow-sm); }
.gs-file:focus-within, .gs-folder:focus-within { border-color: var(--gs-line-2); }
.gs-file-thumb { display: grid; place-items: center; aspect-ratio: 16 / 11; overflow: hidden; padding: 0; border: 0; border-radius: 15px 15px 0 0; background: var(--kind-soft); color: var(--kind); cursor: pointer; }
.gs-file-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-file-type { display: grid; justify-items: center; gap: 4px; }
.gs-file-type i { font-size: 32px; }
.gs-file-ext { color: var(--kind); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.gs-file-copy { display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-content: start; gap: 3px 4px; padding: 10px 6px 12px 12px; }
.gs-file-name { display: -webkit-box; overflow: hidden; color: var(--gs-ink); font-size: 13.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gs-file-meta { grid-column: 1 / -1; color: var(--gs-muted); font-size: 12px; }
.gs-file-copy > .gs-more { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin-top: -4px; }
.gs-file .gs-row-menu { width: 30px; height: 30px; }
.gs-file-play { position: absolute; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(16, 24, 40, .55); color: #fff; font-size: 20px; }

/* ---------- Clientes y contactos: lista ---------- */
.cli-row { display: grid; grid-template-columns: 40px minmax(200px, 1.2fr) minmax(130px, .7fr) minmax(0, 1.2fr) 56px 18px; align-items: center; gap: 16px; min-height: 64px; padding: 10px 14px 10px 12px; border: 1px solid var(--gs-line); border-radius: 16px; background: var(--gs-surface); box-shadow: var(--gs-shadow-xs); color: inherit; text-decoration: none; transition: border-color var(--gs-fast), box-shadow var(--gs-fast); }
.cli-row:hover { border-color: var(--gs-line-2); box-shadow: var(--gs-shadow-sm); color: inherit; }
.cli-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gs-primary-soft-2); }
.cli-row-body { display: grid; gap: 1px; min-width: 0; }
.cli-row-name { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; color: var(--gs-ink); font-size: 15px; font-weight: 720; letter-spacing: -.012em; }
.cli-row-name > span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-row-state { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--gs-surface-3); color: var(--gs-muted); font-size: 11.5px; font-weight: 700; }
.cli-row-sub { overflow: hidden; margin: 0; color: var(--gs-muted); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.cli-row-data { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--gs-ink-2); font-size: 14px; }
.cli-row-data i { flex: none; color: var(--gs-subtle); font-size: 16px; }
.cli-row-data > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-row-data[data-empty="true"] { color: var(--gs-subtle); }
.cli-row-date { color: var(--gs-muted); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cli-row > i { color: var(--gs-subtle); font-size: 18px; }

/* ---------- Ficha de cliente o contacto ---------- */
.cli-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.cli-quick a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 12px; border: 1px solid var(--gs-line); border-radius: 14px; background: var(--gs-surface); color: var(--gs-ink); font-size: 14.5px; font-weight: 700; text-decoration: none; box-shadow: var(--gs-shadow-xs); transition: background var(--gs-fast), border-color var(--gs-fast); }
.cli-quick a:hover { border-color: var(--gs-primary-soft-2); background: var(--gs-primary-soft); color: var(--gs-primary-ink); }
.cli-quick a i { font-size: 19px; }
.cli-quick a.is-whatsapp { color: #127a45; }
.cli-facts { display: grid; margin: 0; padding: 0; list-style: none; }
.cli-fact { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 8px 0; border-top: 1px solid var(--gs-line); }
.cli-facts > .cli-fact:first-child { border-top: 0; padding-top: 0; }
.cli-fact-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--gs-surface-3); color: var(--gs-ink-2); font-size: 18px; }
.cli-fact-body { display: grid; gap: 1px; min-width: 0; }
.cli-fact-label { color: var(--gs-muted); font-size: 12.5px; font-weight: 650; }
.cli-fact-value { color: var(--gs-ink); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.cli-fact-copy { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--gs-subtle); font-size: 18px; cursor: pointer; }
.cli-fact-copy:hover { background: var(--gs-surface-3); color: var(--gs-ink); }
.cli-text { margin: 0; color: var(--gs-ink-2); font-size: 14.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.cli-text[data-empty="true"] { color: var(--gs-subtle); }
.cli-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cli-link { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 10px; border: 1px solid var(--gs-line); border-radius: 14px; background: var(--gs-surface); color: var(--gs-ink); text-decoration: none; }
.cli-link:hover { border-color: var(--gs-line-2); background: var(--gs-surface-2); color: var(--gs-ink); }
.cli-link-copy { display: grid; gap: 1px; min-width: 0; }
.cli-link-name { overflow: hidden; font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cli-link-sub { overflow: hidden; color: var(--gs-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.cli-link > i { color: var(--gs-subtle); font-size: 17px; }
.cli-link-date { color: var(--gs-muted); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.cli-link .gs-cat-icon { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }

/* ---------- Diálogos (Editar, Nuevo, Vincular, Detalles de documento) ---------- */
.gs-dialog { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; border: 0; border-radius: 26px; background: var(--gs-surface); color: var(--gs-ink); box-shadow: var(--gs-shadow-lg); }
.gs-dialog::backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: blur(3px); }
.gs-dialog[open] { display: flex; }
.gs-dialog > form { display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 48px); margin: 0; }
.gs-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 14px 24px; border-bottom: 1px solid var(--gs-line); }
.gs-dialog-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.025em; }
.gs-dialog-body { display: grid; gap: 18px; overflow: auto; padding: 20px 24px 24px; }
.gs-dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--gs-line); background: rgba(248, 250, 252, .92); backdrop-filter: blur(8px); }
.gs-fieldset { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.gs-fieldset > legend { margin: 0 0 2px; padding: 0; color: var(--gs-muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.gs-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gs-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.gs-field--full { grid-column: 1 / -1; }
.gs-field > label, .gs-field > .gs-field-label { color: var(--gs-ink-2); font-size: 13px; font-weight: 700; }
.gs-field :is(input, select, textarea) { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--gs-line-2); border-radius: 12px; background: var(--gs-surface); color: var(--gs-ink); font-size: 15px; }
.gs-field textarea { min-height: 96px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.gs-field :is(input, select, textarea):focus { border-color: var(--gs-primary); outline: none; box-shadow: 0 0 0 3px var(--gs-primary-soft-2); }
.gs-field small { color: var(--gs-muted); font-size: 12.5px; }
.gs-field .gs-seg { width: max-content; }

/* ---------- Escritorio ancho: listas en dos columnas ---------- */
@media (min-width: 1500px) {
    .cli-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
    .cli-row { grid-template-columns: 40px minmax(0, 1fr) minmax(0, .9fr) 18px; grid-template-rows: auto auto; gap: 1px 14px; }
    .cli-row > .gs-avatar, .cli-row > .cli-row-body, .cli-row > i { grid-row: 1 / span 2; }
    .cli-row > .gs-avatar { grid-column: 1; }
    .cli-row > .cli-row-body { grid-column: 2; }
    .cli-row > i { grid-column: 4; }
    .cli-row > .cli-row-data { grid-column: 3; font-size: 13.5px; }
    .cli-row > .cli-row-data:nth-of-type(1) { grid-row: 1; align-self: end; }
    .cli-row > .cli-row-data:nth-of-type(2) { grid-row: 2; align-self: start; }
    .cli-row > .cli-row-date { display: none; }
}

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1000px) {
    .gs-page { gap: 14px; padding: 14px 14px 96px; }
    .gs-toolbar .gs-search { flex: 1 1 0; order: 1; }
    .gs-toolbar .gs-new { order: 2; width: 44px; min-width: 44px; padding: 0; }
    .gs-toolbar .gs-new > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .gs-toolbar .gs-seg { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
    .gs-toolbar .gs-count { display: none; }
    .gs-seg > :is(a, button) { flex: 1 0 auto; justify-content: center; min-height: 40px; }
    .gs-search input { height: 44px; }
    .gs-btn, .gs-iconbtn { min-height: 44px; }
    .gs-iconbtn { width: 44px; height: 44px; }
    .gs-row-menu { width: 44px; height: 44px; }

    .exp-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: 18px; }
    .exp-row-id { align-items: start; }
    .exp-row-name { align-items: flex-start; }
    .exp-row-name > span:last-child { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .exp-row-name > .gs-flag-dot { margin-top: 1px; }
    .exp-row-next { display: grid; grid-template-columns: 16px minmax(0, 1fr); padding: 9px 12px; border-radius: 12px; background: var(--gs-surface-2); }
    .exp-row-next > span { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .exp-row-side { display: none; }
    .exp-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gs-muted); font-size: 13px; }
    .exp-row-foot b { color: var(--gs-ink-2); font-weight: 700; }

    .gs-head { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "back copy actions"; align-items: start; gap: 6px; }
    .gs-head > .gs-mono, .gs-head > .gs-avatar, .gs-head > .gs-head-photo { display: none; }
    .gs-head > .gs-back { margin: 0 0 0 -10px; }
    .gs-head-copy { gap: 6px; padding-top: 7px; }
    .gs-head-name { font-size: 23px; letter-spacing: -.03em; }
    .gs-head-meta { gap: 6px 10px; font-size: 13.5px; }
    .gs-head-actions > .gs-btn { display: none; }
    .gs-head-actions { margin-right: -8px; }
    .gs-tabs { margin: 0 -14px; padding: 0 6px; }
    .gs-tabs > :is(a, button) { padding: 0 12px; font-size: 14.5px; }

    .gs-card { padding: 16px; border-radius: 18px; }
    .gs-split { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
    .gs-main, .gs-side { display: contents; }
    .gs-split [data-area="next"] { order: 1; }
    .gs-split [data-area="people"] { order: 2; }
    .gs-split [data-area="notes"] { order: 3; }
    .gs-split [data-area="facts"] { order: 4; }
    .gs-split [data-area="contact"] { order: 1; }
    .gs-split [data-area="projects"] { order: 2; }
    .gs-split [data-area="commercial"] { order: 3; }
    .gs-split [data-area="internal"] { order: 4; }
    .gs-split [data-area="mail"] { order: 5; }
    .exp-next-text { font-size: 16px; }
    .gs-note { grid-template-columns: minmax(0, 1fr) 44px; gap: 4px 8px; padding: 12px 0; }
    .gs-note-date, .gs-note-body { grid-column: 1; }
    .gs-note .gs-row-menu { grid-column: 2; grid-row: 1 / span 2; margin: -10px -12px 0 0; }
    .gs-composer textarea { min-height: 44px; padding: 11px 0; }
    .gs-composer .gs-btn { min-height: 44px; }
    .gs-person { grid-template-columns: 32px minmax(0, 1fr) 44px; }
    .gs-person .gs-row-menu { margin-right: -10px; }

    .exp-conv { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 14px 16px; }
    .exp-conv > i { display: none; }
    .gs-subhead { grid-template-columns: auto minmax(0, 1fr) auto; }
    .gs-subhead > .gs-cat-icon { display: none; }
    .gs-subhead-title { font-size: 18px; }
    .exp-entry { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .exp-entry-mark { display: none; }
    .exp-points { grid-template-columns: minmax(0, 1fr); }

    .gs-drop { flex-wrap: wrap; padding: 12px; }
    .gs-drop-icon, .gs-drop p { display: none; }
    .gs-drop-actions { flex: 1; }
    .gs-drop-actions .gs-btn { flex: 1; min-height: 44px; }
    .gs-pending-grid { grid-template-columns: minmax(0, 1fr); }
    .gs-pending-actions .gs-btn { flex: 1; }
    .gs-folders { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .gs-folder { grid-template-columns: 40px minmax(0, 1fr) 44px; }
    .gs-files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .gs-file-copy { grid-template-columns: minmax(0, 1fr) 36px; }
    .gs-file .gs-row-menu { width: 36px; height: 36px; min-height: 36px; }

    .cli-list { gap: 10px; }
    .cli-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; min-height: 74px; padding: 12px 14px; border-radius: 18px; }
    .cli-row > .gs-avatar { width: 44px; height: 44px; border-radius: 14px; font-size: 16px; }
    .cli-row > .cli-row-data, .cli-row > i { display: none; }
    .cli-row-date { align-self: start; padding-top: 3px; }
    .cli-fact { grid-template-columns: 36px minmax(0, 1fr) 44px; min-height: 60px; }
    .cli-fact-copy { width: 44px; height: 44px; margin-right: -6px; }

    .gs-menu > :is(a, button) { min-height: 46px; }
    .gs-dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
    .gs-dialog > form { max-height: 92dvh; }
    .gs-dialog-head { position: relative; padding-top: 24px; }
    .gs-dialog-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--gs-line-2); }
    .gs-dialog-body { padding: 18px 16px 22px; }
    .gs-dialog-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
    .gs-dialog-foot .gs-btn { flex: 1; }
    .gs-fields { grid-template-columns: minmax(0, 1fr); }
    .gs-field .gs-seg { width: 100%; }
    .gs-field :is(input, select) { min-height: 46px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .gs-btn, .gs-file, .gs-folder, .exp-row, .cli-row, .gs-composer { transition: none; }
}

.gs-more[data-up="true"] > .gs-menu { bottom: calc(100% + 6px); top: auto; }

/* Ajustes tras la release 2026-10-29 r (Claude): separación entre bloques de las pestañas */
.gs-panel:not([hidden]),
[data-gs-conversation-list]:not([hidden]),
[data-gs-conversation]:not([hidden]),
[data-project-document-explorer],
[data-folder-panel]:not([hidden]) { display: grid; gap: 14px; min-width: 0; }
