/* Portal tokens: Portal/DESIGN.md. Same names and values as the Silia platform code
   (Silia-mx/Design, src/index.css @ main 893e7ba, 2026-10-12).
   White panels on the stone background; lime only for a CTA; purple for links, info and state. */
:root {
  /* brand */
  --silia-brand-black: #21212F; --silia-lime: #DEFF38;
  --silia-purple2: #F5F0FF; --silia-purple3: #EBE3FF; --silia-purple4: #CDBBFF; --silia-purple5: #A493D9;
  --silia-purple7: #5B518C; --silia-purple8: #3D3667;
  /* surfaces */
  --silia-bg-layout: #EFF0EB; --silia-bg-container: #FFFFFF; --silia-bg-elevated: #FBFBF8;
  --silia-surface-tint-1: #FBFBFB; --silia-surface-tint-2: #F6F6F7; --silia-surface-tint-3: #EDEDEE;
  --silia-border: #DEDEE0; --silia-border-subtle: #F2F2F3;
  --silia-fill-1: rgba(33, 33, 47, .02); --silia-fill-2: rgba(33, 33, 47, .06);
  /* text: text-icon is for glyphs only, text-placeholder for placeholders only */
  --silia-text: #3C3C48; --silia-text-description: #6A6A73; --silia-text-icon: #9B9BA1;
  --silia-text-placeholder: #C8C8CB; --silia-text-inverse: #FFFFFF;
  /* entity kinds: Silia = folder (lilac), client = data view (pink) */
  --silia-kind-folder-bg: var(--silia-purple3); --silia-kind-folder-bd: var(--silia-purple4); --silia-kind-folder-fg: var(--silia-purple7);
  --silia-kind-data-view-bg: #FFE0EC; --silia-kind-data-view-bd: #F5BFD2; --silia-kind-data-view-fg: #A14A76;
  /* status: bg · bd · fg (fills, dots, bars) · fg-strong (text) */
  --silia-success-bg: #F6FFED; --silia-success-bd: #B7EB8F; --silia-success-fg: #52C41A; --silia-success-fg-strong: #135200;
  --silia-warning-bg: #FFFBE6; --silia-warning-bd: #FFE58F; --silia-warning-fg: #FAAD14; --silia-warning-fg-strong: #874D00;
  --silia-danger-bg:  #FFF1F0; --silia-danger-bd:  #FFA39E; --silia-danger-fg:  #FF4D4F; --silia-danger-fg-strong:  #CF1322;
  /* info blue = the `blue` tone of the DS data palette: it labels the flow's human-in-the-loop steps (Val, 2026-10-13) */
  --silia-info-bg: #E6F4FF; --silia-info-bd: #91CAFF; --silia-info-fg: #1677FF; --silia-info-fg-strong: #0958D9;
  /* ruta crítica: the platform's orange tag family */
  --silia-tag-orange-bg: #FFF7E6; --silia-tag-orange-fg: #AD4E00; --silia-tag-orange-hue: #FA8C16;
  /* hero banner */
  --silia-hero:
    radial-gradient(60% 80% at 30% 100%, rgba(91, 81, 140, .55) 0%, transparent 70%),
    radial-gradient(70% 80% at 70% 100%, rgba(140, 100, 170, .40) 0%, transparent 70%),
    radial-gradient(60% 50% at 20% 0%, rgba(255, 180, 200, .65) 0%, transparent 65%),
    radial-gradient(40% 50% at 85% 5%, rgba(180, 220, 230, .45) 0%, transparent 70%),
    linear-gradient(#E8D5E8, #C5B1D8 60%, #9D8BBF);
  /* type and shape: two weights (400, 600); radii 8 / 12 / 16 */
  --silia-font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --silia-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 8px; --radius: 12px;
  --control-h: 40px;
  --silia-shadow-sm: 0 2px 4px rgba(33, 33, 47, .02), 0 1px 6px rgba(33, 33, 47, .02), 0 1px 2px rgba(33, 33, 47, .03);
  --silia-shadow-md: 0 6px 16px rgba(33, 33, 47, .06), 0 3px 6px rgba(33, 33, 47, .04);
  --silia-focus-ring: 0 0 0 3px var(--silia-purple3);
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);

  /* portal aliases (app.js inline styles use --ink, --grey, --line, --grey-mid) */
  --ink: var(--silia-brand-black); --text: var(--silia-text); --text-2: var(--silia-text-description);
  --grey: var(--silia-border-subtle); --line: var(--silia-border-subtle); --grey-mid: var(--silia-border);
  --sans: var(--silia-font-sans); --mono: var(--silia-font-mono);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--silia-bg-layout); color: var(--text);
  font: 14px/1.571 var(--sans);
}
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); }
a { color: var(--silia-purple7); text-decoration: none; }
a:hover { color: var(--silia-purple8); }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--silia-focus-ring); }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--text-2); }

/* ---------- header: the Silia hero banner ---------- */
.band { background: var(--silia-hero); padding: 20px 16px 24px; min-height: 160px; display: flex; }
.band-inner { max-width: 1180px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; }
.brandline { display: flex; align-items: center; gap: 12px; }
.brandline .logo { height: 26px; width: auto; display: block; }
.brandline .sep { width: 1px; height: 16px; background: var(--silia-border); }
.brandline .label { color: var(--text); font-size: 12px; line-height: 20px; font-weight: 400; }
.band h1 { margin-top: auto; padding-top: 28px; color: var(--silia-text-inverse); font-size: 28px; line-height: 36px; letter-spacing: -.2px; }
.band .meta { margin: 4px 0 0; color: var(--silia-text-inverse); font-size: 14px; }

/* ---------- tabs: like the Silia sidebar, the selected item is a soft fill ---------- */
.tabs {
  position: sticky; top: 0; z-index: 20; background: var(--silia-bg-elevated); border-bottom: 1px solid var(--line);
  display: flex; padding: 0 16px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs .inner { display: flex; gap: 4px; max-width: 1180px; margin: 0 auto; width: 100%; padding: 8px 0; }
.tab {
  border: 0; background: none; padding: 8px 16px; cursor: pointer; white-space: nowrap; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 400; transition: background .2s var(--ease), color .2s var(--ease);
}
.tab:hover { color: var(--text); background: var(--silia-fill-2); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 600; background: var(--silia-fill-2); }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }

.card {
  background: var(--silia-bg-container); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--silia-shadow-sm); padding: 24px;
}
@media (max-width: 640px) { .card { padding: 16px; } }
.card h2 { font-size: 16px; line-height: 24px; }
.card .sub { color: var(--text-2); font-size: 14px; margin: 4px 0 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.link { background: none; border: 0; padding: 0; color: var(--silia-purple7); font-weight: 600; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--silia-purple8); }
.section-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 24px 0 8px; }

.health {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); padding: 0 8px;
  font-weight: 600; font-size: 12px; line-height: 20px; color: var(--text); border: 1px solid transparent;
}
.health.ok { background: var(--silia-success-bg); border-color: var(--silia-success-bd); --dot: var(--silia-success-fg); }
.health.risk { background: var(--silia-warning-bg); border-color: var(--silia-warning-bd); --dot: var(--silia-warning-fg); }
.health.late { background: var(--silia-danger-bg); border-color: var(--silia-danger-bd); --dot: var(--silia-danger-fg); }
/* the client holds the delay (an RFI of the client blocks it, past its date): pale blue, the info tokens (Santiago, 2026-11-04) */
.health.client { background: var(--silia-info-bg); border-color: var(--silia-info-bd); --dot: var(--silia-info-fg); }


/* ---------- stacked bars ---------- */
.sbrow { display: grid; grid-template-columns: 170px 1fr 56px; gap: 12px; align-items: center; padding: 4px 0; }
@media (max-width: 640px) { .sbrow { grid-template-columns: 1fr 44px; } .sbrow .sblab { grid-column: 1 / -1; } }
.sblab { font-weight: 600; font-size: 14px; }
.sbtrack { display: flex; height: 26px; border-radius: var(--radius-sm); overflow: hidden; background: var(--grey); }
.sbseg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; min-width: 22px; }
.sbseg + .sbseg { border-left: 2px solid var(--silia-bg-container); }
.sbtot { font-family: var(--mono); font-size: 12px; color: var(--text-2); text-align: right; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 4px; }
.list .when { font-size: 12px; color: var(--text-2); min-width: 74px; padding-top: 2px; }
.list .what b { display: block; font-weight: 600; }
.list .what span { font-size: 12px; color: var(--text-2); }
.empty-note { color: var(--text-2); font-size: 14px; padding: 8px 0; }

/* ---------- chips: status bg + border, ink text, a dot in the status colour ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); padding: 0 8px;
  font-size: 12px; line-height: 20px; font-weight: 400; white-space: nowrap; color: var(--text);
  background: var(--chip-bg); border: 1px solid var(--chip-bd);
}
/* The status icon (statusIcon() in app.js) replaced the dot: never color alone. */
.chip .ci, .health .ci { width: 12px; height: 12px; flex: none; color: var(--dot); }
.chip.nodot .ci { display: none; }
.c-done  { --chip-bg: var(--silia-success-bg); --chip-bd: var(--silia-success-bd); --dot: var(--silia-success-fg); }
.c-prog  { --chip-bg: var(--silia-purple2); --chip-bd: var(--silia-purple4); --dot: var(--silia-purple7); }
.c-block { --chip-bg: var(--silia-danger-bg); --chip-bd: var(--silia-danger-bd); --dot: var(--silia-danger-fg); }
.c-idle  { --chip-bg: var(--silia-border-subtle); --chip-bd: var(--silia-border); --dot: var(--silia-text-icon); color: var(--text-2); }
.c-wait  { --chip-bg: var(--silia-warning-bg); --chip-bd: var(--silia-warning-bd); --dot: var(--silia-warning-fg); }
/* Delay in a low voice (Val, 2026-10-15, option D): pale red fill and red icon, text in ink. */
.c-late  { --chip-bg: var(--silia-danger-bg); --chip-bd: var(--silia-danger-bd); --dot: var(--silia-danger-fg); }
.id { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.flag { color: var(--silia-text); font-weight: 600; font-size: 12px; white-space: nowrap; }


/* ---------- detail blocks ---------- */
dl.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 12px 0 0; font-size: 14px; }
dl.kv dt { color: var(--text-2); }
dl.kv dd { margin: 0; }
@media (max-width: 640px) { dl.kv { grid-template-columns: 1fr; } dl.kv dt { margin-top: 8px; } }

/* ---------- filters and search (Silia controls: 12px radius, --silia-border) ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.fbtn {
  border: 1px solid var(--grey-mid); background: var(--silia-bg-container); border-radius: var(--radius); height: 32px; padding: 0 16px;
  font-size: 14px; font-weight: 400; cursor: pointer; color: var(--text);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.fbtn:hover { background: var(--silia-fill-2); }
.search {
  margin-left: auto; border: 1px solid var(--grey-mid); border-radius: var(--radius); height: var(--control-h); padding: 0 12px;
  font: inherit; font-size: 14px; color: var(--text); min-width: 240px; background: var(--silia-bg-container);
}
.search::placeholder { color: var(--silia-text-placeholder); }
.search:focus { outline: none; }
@media (max-width: 640px) { .search { margin-left: 0; width: 100%; } }
.req { border-top: 1px solid var(--line); }
.req:first-of-type { border-top: 0; }
.req > button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 12px 4px;
  display: grid; grid-template-columns: 120px 1fr 150px 130px; gap: 16px; align-items: center;
}
.req > button:hover { background: var(--silia-fill-2); }
.req .rq b { font-weight: 600; display: block; }
.req .rq span { font-size: 12px; color: var(--text-2); }
.req .due { font-size: 12px; }
.req .body { padding: 0 4px 16px 138px; font-size: 14px; color: var(--text-2); }
@media (max-width: 760px) {
  .req > button { grid-template-columns: 1fr auto; }
  .req .id { grid-column: 1 / -1; }
  .req .body { padding-left: 4px; }
}

/* ---------- flow ---------- */
.flow-scroll { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--silia-surface-tint-2); max-height: 78vh; }
.flow-scroll svg { display: block; margin: 0 auto; }
.fnode { cursor: pointer; }
.fnode:focus { outline: none; }
.fnode:focus-visible .nb, .fnode.sel .nb { stroke: var(--silia-purple7); stroke-width: 2; }
.elab { font: 600 12px var(--sans); }
.flow-detail { margin-top: 16px; }
.edge-list li { grid-template-columns: auto 1fr; }

/* ---------- organization ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.person { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--silia-fill-1); }
.person .role { font-size: 12px; color: var(--text-2); }
.person .name { font-weight: 600; margin-top: 2px; }
.person .name.tbd { color: var(--text-2); font-weight: 400; }
.person .contact { font-size: 14px; margin-top: 2px; word-break: break-all; }
.person .desc { font-size: 12px; color: var(--text-2); margin-top: 8px; }
/* ---------- Organización (Val, 2026-10-13, option A) ---------- */
.olead { margin: 4px 0 16px; font-size: 15px; line-height: 24px; color: var(--silia-text); max-width: 760px; }
.ofacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ofact .l { font-size: 12px; line-height: 20px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.ofact .v { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--silia-brand-black); }
.org-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 900px) { .org-two { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.olist { list-style: none; margin: 12px 0 0; padding: 0; }
.olist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.olist li:first-child { border-top: 0; padding-top: 4px; }
.oic { flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; background: var(--silia-purple2); color: var(--silia-purple7); }
.otext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.otext b { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--silia-brand-black); }
.otext > span { font-size: 12px; line-height: 20px; color: var(--text-2); }
.otext .od { color: var(--silia-text); font-size: 13px; }
.oside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.odate { flex: none; width: 48px; min-height: 44px; border-radius: var(--radius-sm); background: var(--silia-surface-tint-2); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-2); }
.odate b { font-size: 15px; line-height: 18px; font-weight: 600; color: var(--silia-brand-black); }
.odate span { font-size: 11px; line-height: 14px; text-transform: uppercase; letter-spacing: .03em; }
.odate.done { background: var(--silia-success-bg); }
.person .pid { min-width: 0; }
.person .pid .name { margin-top: 0; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--silia-brand-black); }
.person .pid .name.tbd { color: var(--text-2); font-weight: 400; }
.person .pid .role { font-size: 12px; line-height: 20px; color: var(--text-2); }
.person .pid .contact { font-size: 12px; line-height: 20px; margin-top: 0; }
.tint .person .desc { font-size: 12px; line-height: 20px; color: var(--text-2); margin-top: 8px; }
.agreements { counter-reset: a; list-style: none; padding: 0; margin: 0; }
.agreements li { position: relative; padding: 12px 0 12px 40px; border-top: 1px solid var(--line); }
.agreements li:first-child { border-top: 0; }
.agreements li::before {
  counter-increment: a; content: counter(a); position: absolute; left: 0; top: 12px; width: 28px; height: 28px;
  border-radius: var(--radius-sm); background: var(--grey); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2);
}

/* ---------- misc ---------- */
.empty { text-align: center; padding: 64px 16px; color: var(--text-2); }
.pagefoot { max-width: 1180px; margin: 0 auto; padding: 16px 16px 40px; display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 12px; border-top: 1px solid var(--grey-mid); }
[hidden] { display: none !important; }

@media print {
  .tabs, .filters, .search { display: none !important; }
  .view[hidden] { display: block !important; }
  .card { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}

/* RFI tab: the workbook's columns as a table; it scrolls sideways inside its card. */
.tblbox { overflow-x: auto; margin: 0 -4px; }
.rfitbl { border-collapse: collapse; font-size: 14px; min-width: 860px; width: 100%; }
.rfitbl th { text-align: left; font-size: 12px; line-height: 20px; font-weight: 600; color: var(--text-2); padding: 8px 12px; background: var(--silia-bg-elevated); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.rfitbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.rfitbl tbody tr:last-child td { border-bottom: 0; }
.rfitbl tbody tr:hover td { background: var(--silia-fill-1); }
.rfitbl td.id, .rfitbl td.date { white-space: nowrap; }
.rfitbl td.strong, .rfitbl .strong { font-weight: 600; color: var(--text); }
.rfitbl td.wide .strong { margin-bottom: 4px; }
.rfitbl td.wide { min-width: 260px; }
.rfitbl td.late { color: var(--silia-text); font-weight: 600; }

/* Bitácora on the Resumen: a vertical timeline, newest first; the newest dot is solid purple. */
.timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 0 0 16px; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--silia-kind-folder-bg); border: 2px solid var(--silia-bg-container); box-shadow: 0 0 0 1.5px var(--silia-kind-folder-bd); }
.timeline li:first-child::before { background: var(--silia-purple7); box-shadow: 0 0 0 1.5px var(--silia-purple3); }
.timeline .when { font-size: 12px; color: var(--text-2); padding-top: 2px; }
.timeline .what p { margin: 6px 0 0; font-size: 14px; color: var(--text); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Team and RFI sections: white panels; who they belong to shows as an entity tile
   before the heading and in the avatars: Silia lilac, client pink. */
.tint-silia, .tint-rfi-silia   { --tile-bg: var(--silia-kind-folder-bg); --tile-bd: var(--silia-kind-folder-bd); --av: var(--silia-kind-folder-bg); --av-ink: var(--silia-kind-folder-fg); }
.tint-client, .tint-rfi-client { --tile-bg: var(--silia-kind-data-view-bg);  --tile-bd: var(--silia-kind-data-view-bd);  --av: var(--silia-kind-data-view-bg);  --av-ink: var(--silia-kind-data-view-fg); }
.tint-silia h2, .tint-client h2, .tint-rfi-silia h2, .tint-rfi-client h2 { display: flex; align-items: center; gap: 12px; }
.tint-silia h2::before, .tint-client h2::before, .tint-rfi-silia h2::before, .tint-rfi-client h2::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--tile-bg); border: 1px solid var(--tile-bd);
}
.tint .list, .tint .agreements { display: grid; gap: 8px; margin-top: 12px; }
.tint .list li, .tint .list li:first-child { background: var(--silia-fill-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.tint .agreements li, .tint .agreements li:first-child { background: var(--silia-fill-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 12px 56px; }
.tint .agreements li::before { left: 16px; top: 12px; }
.tint .card-head { margin-bottom: 12px; }
.ptop { display: flex; gap: 12px; align-items: center; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--av, var(--grey)); color: var(--av-ink, var(--text)); font-size: 12px; font-weight: 600; }
.avatar.tbd { background: var(--grey); color: var(--silia-text-description); }


/* ======================================================================
   Hierarchy pass (2026-10-13, from Workstation/Runbook/Mockups/Portal_mockup_10_cambios.html).
   Later in the file than the base rules on purpose: these win.
   ====================================================================== */

/* Type scale: 28 / 20 / 14 / 12, headings in ink; weights 400 and 600 only. */
:root { --fs-page: 28px; --lh-page: 36px; --fs-title: 20px; --lh-title: 28px; --fs-row: 14px; --lh-row: 22px; --fs-meta: 12px; --lh-meta: 20px; }
h1, h2, h3 { color: var(--silia-brand-black); }
.card h2 { font-size: var(--fs-title); line-height: 30px; font-weight: 600; color: var(--silia-text); }
.card-head { margin-bottom: 4px; }
.muted { font-size: 14px; }

/* One box level: no boxes inside cards, more air between cards. */
.stack > * + * { margin-top: 24px; }
.grid { gap: 24px; }
.card { padding: 24px; }
@media (max-width: 640px) { .card { padding: 16px; } .stack > * + * { margin-top: 16px; } .grid { gap: 16px; } }

/* Header: shorter banner, dark veil under the title, edges aligned with the content. */
.band { min-height: 112px; padding: 16px 16px 20px; background: linear-gradient(rgba(33,33,47,0) 35%, rgba(33,33,47,.38)), var(--silia-hero); }
.band-inner, .tabs .inner { max-width: 1148px; }
.band h1 { font-size: var(--fs-page); line-height: var(--lh-page); font-weight: 600; padding-top: 16px; text-shadow: 0 1px 2px rgba(33,33,47,.25); }
.band .meta { font-size: 14px; color: var(--silia-text-inverse); opacity: .92; }
/* Tabs: the platform's Segmented (PageTabs): a grey 40px track, the chosen tab in a light pill,
   every label at 400. One dot on the RFIs tab: red overdue, yellow due soon. */
.seg { display: inline-flex; padding: 2px; background: var(--silia-bg-layout); border-radius: var(--radius); }
.tab { height: 36px; min-height: 0; padding: 0 12px; font-size: 14px; font-weight: 400; color: var(--silia-text-description); display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--silia-text); background: transparent; }
.tab[aria-selected="true"] { background: var(--silia-bg-elevated); color: var(--silia-text); font-weight: 400; box-shadow: var(--silia-shadow-sm); }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tab-dot.late { background: var(--silia-danger-fg); }
.tab-dot.soon { background: var(--silia-warning-fg); }

/* ---------- Resumen: the status card. Title + health chip, then the RFI donut
   (the activities donut was removed 2026-10-27, Santiago) in the platform's default chart palette: the brand purple ramp, darker = further along.
   Yellow and red only for RFIs due soon or overdue. ---------- */
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.status-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-meta { color: var(--text-2); }
.status-meta b { color: var(--silia-text); font-weight: 600; }
/* Plazo: start to delivery cut by phase, in the donuts' purple ramp: closed P7, started P3 filled
   with P5 up to today, not started P3, open past its planned end = red outline. "Hoy": P3/P8 label, P7 line. */
.plazo { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.pz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; margin-bottom: 32px; }
.pz-top h3 { font-size: 16px; line-height: 24px; color: var(--silia-text); }
.pz-left { color: var(--text-2); }
.pz-left b { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--silia-text); }
.pz-late { color: var(--silia-text); font-weight: 600; }
.pz-bar { position: relative; display: flex; gap: 2px; height: 12px; }
.pz-bar > span:not(.pz-today):not(.pz-over) { position: relative; height: 12px; min-width: 0; border-radius: 4px; background: var(--silia-purple3); overflow: hidden; }
.pz-bar > span.closed { background: var(--silia-purple7); }
/* Overrun: only the stretch past the planned end, pale pink (Val, 2026-10-13: no solid red block). */
.pz-bar > .pz-over { position: absolute; top: 0; height: 12px; border-radius: 4px; background: var(--silia-danger-bg); box-shadow: inset 0 0 0 1px var(--silia-danger-bd); z-index: 1; }
.pz-warn { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; font-size: 12px; line-height: 20px; font-weight: 600; color: var(--silia-text); background: var(--silia-danger-bg); border: 1px solid var(--silia-danger-bd); border-radius: var(--radius-sm); padding: 0 8px; vertical-align: 3px; --dot: var(--silia-danger-fg); }
.pz-warn .ci { width: 12px; height: 12px; color: var(--dot); }
.pz-bar > .pz-over.client { background: var(--silia-info-bg); box-shadow: inset 0 0 0 1px var(--silia-info-bd); }
.pz-warn.client { background: var(--silia-info-bg); border-color: var(--silia-info-bd); --dot: var(--silia-info-fg); }
.pz-bar i { position: absolute; inset: 0 auto 0 0; background: var(--silia-purple5); }
.pz-today { position: absolute; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; background: var(--silia-purple7); border-radius: 1px; }
.pz-today b { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 12px; line-height: 20px; font-weight: 600; color: var(--silia-purple8); background: var(--silia-purple3); box-shadow: inset 0 0 0 1px var(--silia-purple4); border-radius: var(--radius-sm); padding: 0 8px; white-space: nowrap; }
.pz-today.at-start b { left: 0; transform: none; }
.pz-today.at-end b { left: auto; right: 0; transform: none; }
.pz-phases { display: flex; gap: 2px; margin-top: 8px; }
.pz-phases div { min-width: 48px; font-size: 12px; line-height: 20px; color: var(--text-2); }
.pz-phases b { display: block; font-weight: 400; color: var(--silia-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-phases .now b { font-weight: 600; }
.pz-ends { display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 20px; color: var(--text-2); }
.pz-ends b { color: var(--silia-text); font-weight: 600; }
@media (max-width: 640px) { .plazo { padding: 12px; } .pz-ends > span:nth-child(2) { display: none; } }
.donuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.dn { display: flex; gap: 24px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.dn-svg { flex: none; }
.dn-big { font: 600 20px var(--sans); fill: var(--silia-text); }
.dn-small { font: 400 12px var(--sans); fill: var(--text-2); }
.dn-body { flex: 1; min-width: 0; }
.dn h3 { font-size: 16px; line-height: 24px; color: var(--silia-text); }
.dn-sub { font-size: 12px; line-height: 20px; color: var(--text-2); }
.dn ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.dn-row { width: 100%; display: flex; align-items: center; gap: 8px; padding: 4px 8px; margin: 0 -8px; border: 0; background: none; text-align: left; border-radius: var(--radius-sm); font-size: 14px; color: var(--silia-text); }
button.dn-row { cursor: pointer; width: calc(100% + 16px); }
button.dn-row:hover { background: var(--silia-fill-2); }
.dn-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.dn-row .lbl { flex: 1; min-width: 0; }
.dn-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.dn-row .chev { width: 16px; height: 16px; }
button.dn-row:hover .chev { color: var(--silia-purple7); }
span.dn-row { width: 100%; margin: 0; padding: 4px 0; }
@media (max-width: 640px) { .dn { gap: 16px; padding: 12px; } .dn-svg { width: 96px; height: 96px; } }

/* ---------- what can be tapped carries a chevron; categories are tags, not status chips ---------- */
.chev { width: 16px; height: 16px; flex: none; color: var(--text-2); transition: transform .2s var(--ease), color .2s var(--ease); }
.tag { display: inline-flex; align-items: center; border-radius: var(--radius-sm); padding: 0 8px; font-size: var(--fs-meta); line-height: 20px; font-weight: 400; color: var(--text-2); background: var(--silia-border-subtle); white-space: nowrap; }
/* Bitácora entry types (Junta, Documento, Correo…): pale purple. TIPO is free text for now;
   a closed list is pending (CLAUDE.md "Open"). */
.tag.tag-hitl { background: var(--silia-info-bg); color: var(--silia-info-fg-strong); box-shadow: inset 0 0 0 1px var(--silia-info-bd); }
.tag.tag-log { background: var(--silia-purple2); color: var(--silia-purple7); box-shadow: inset 0 0 0 1px var(--silia-purple3); }
.c-neutral { --chip-bg: var(--silia-bg-container); --chip-bd: var(--silia-border); --dot: var(--silia-text-description); color: var(--silia-text); } /* RFI "Abierta" */

/* ---------- Bitácora: one row per project week, opens to its entries; solid purple dot on the newest entry only ---------- */
.weeks { list-style: none; margin: 12px 0 0; padding: 0; }
.wk { border-top: 1px solid var(--line); }
.wk:first-child { border-top: 0; }
.wk-head { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 4px; background: none; border: 0; cursor: pointer; text-align: left; border-radius: var(--radius-sm); }
.wk-head:hover { background: var(--silia-fill-2); }
/* The current week (Val, 2026-10-13, option C): the whole row on pale purple plus an "Esta semana"
   label in the brand's passive pair. A week with no entries yet doesn't show, so nothing is marked. */
.wk.now { background: var(--silia-purple2); border-radius: var(--radius-sm); border-top-color: transparent; padding: 0 8px; margin: 0 -8px; }
.wk.now + .wk { border-top-color: transparent; }
.wk.now .tag.tag-log { background: var(--silia-bg-container); }
.wk-now { font-size: 12px; line-height: 20px; font-weight: 600; color: var(--silia-purple8); background: var(--silia-purple3); border-radius: var(--radius-sm); padding: 0 8px; white-space: nowrap; }
.wk-head b { font-size: var(--fs-row); line-height: var(--lh-row); color: var(--silia-brand-black); font-weight: 600; }
.wk-head .wk-d { color: var(--text-2); font-size: 14px; }
.wk-head .wk-n { margin-left: auto; color: var(--text-2); font-size: var(--fs-meta); }
.wk-head[aria-expanded="true"] .chev { transform: rotate(90deg); color: var(--silia-purple7); }
.wk .timeline { margin: 4px 0 16px 32px; }
.timeline .when { font-size: var(--fs-meta); }
.timeline .what p { margin-top: 4px; }
.timeline li:first-child .what p { color: var(--silia-brand-black); font-weight: 600; }
.wk + .wk .timeline li:first-child::before { background: var(--silia-kind-folder-bg); box-shadow: 0 0 0 1.5px var(--silia-kind-folder-bd); }
.wk + .wk .timeline li:first-child .what p { color: var(--silia-text); font-weight: 400; }
@media (max-width: 640px) { .wk-head { flex-wrap: wrap; row-gap: 2px; } .wk-head .wk-d { order: 3; width: 100%; padding-left: 28px; } .wk .timeline { margin-left: 8px; } }

/* ---------- Organización: people, channels, meetings and agreements as rows, not boxes ---------- */
.people { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; margin-top: 8px; }
.person { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; padding: 16px 0; }
.person .role, .person .desc { font-size: var(--fs-meta); }
.person .name { font-size: var(--fs-row); color: var(--silia-brand-black); }
.person .contact { font-size: 14px; }
.tint .list, .tint .agreements { display: block; margin-top: 12px; }
.tint .list li, .tint .list li:first-child { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
.tint .list li:first-child, .tint .agreements li:first-child { border-top: 0; }
.tint .agreements li, .tint .agreements li:first-child { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 12px 40px; }
.tint .agreements li:first-child { border-top: 0; }
.tint .agreements li::before { left: 0; top: 12px; }
.list li { grid-template-columns: 1fr auto auto; }
.list .what b { font-size: var(--fs-row); color: var(--silia-brand-black); }
.list .what span { font-size: 14px; }
.list .what .d2 { display: block; margin-top: 4px; }
.list .when { font-size: 14px; min-width: 0; text-align: right; }
.list.edge-list li { grid-template-columns: auto 1fr; }
.agreements .muted { font-size: var(--fs-meta); }
@media (max-width: 640px) { .list li { grid-template-columns: 1fr auto; } .list .when { grid-column: 1 / -1; text-align: left; } }

/* ---------- RFIs: no table frame, readable cells, FECHA_LÍMITE red when overdue ---------- */
.filters { margin-bottom: 20px; }
.tint .tblbox, .tblbox { border: 0; margin: 8px 0 0; background: none; border-radius: 0; }
.rfitbl { font-size: 14px; }
.rfitbl th { font-size: var(--fs-meta); background: none; border-bottom: 1px solid var(--grey-mid); }
.rfitbl td { color: var(--silia-text); }
.rfitbl td.id { color: var(--silia-text-description); font-size: var(--fs-meta); }
.rfitbl .strong { color: var(--silia-brand-black); font-size: var(--fs-row); line-height: var(--lh-row); }
.rfitbl .desc, .rfitbl td.upd { color: var(--text-2); }
.rfitbl td.date { font-weight: 400; }
.rfitbl td.late { color: var(--silia-text); font-weight: 600; }
.rfitbl td.st { white-space: nowrap; }
.rfitbl tr.closed td { color: var(--silia-text-description); }
.rfitbl tr.closed .strong { color: var(--text-2); font-weight: 400; }
/* phones: one card per RFI (shown below 640px) */
.rt { font-size: var(--fs-row); line-height: var(--lh-row); font-weight: 600; color: var(--silia-brand-black); }
.rfi-cards { display: none; list-style: none; margin: 8px 0 0; padding: 0; }
.rfi-cards li { padding: 12px 0 12px 12px; border-top: 1px solid var(--line); position: relative; }
.rfi-cards li:first-child { border-top: 0; }
.rfi-cards .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.rfi-cards .chips { display: flex; gap: 8px; }
.rfi-cards .rt { margin-top: 8px; }
.rfi-cards .due { margin-top: 8px; font-size: var(--fs-meta); color: var(--text-2); letter-spacing: .02em; }
.rfi-cards .due b { font-size: 14px; color: var(--silia-brand-black); letter-spacing: 0; }
.rfi-cards .due.late, .rfi-cards .due.late b { color: var(--silia-text); font-weight: 600; }
.rfi-cards .upd { margin-top: 8px; font-size: 14px; color: var(--text-2); }
/* "ID ↑ / ID ↓": two joined buttons before the filters; the active one raised so its border shows whole */
.sortgrp { display: inline-flex; margin-right: 8px; }
.sortgrp .fbtn { border-radius: 0; white-space: nowrap; }
.sortgrp .fbtn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.sortgrp .fbtn:last-child { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
.sortgrp .fbtn[aria-pressed="true"] { position: relative; z-index: 1; }
@media (max-width: 640px) { .sortgrp { margin-right: 0; } }
.fgrp { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.fsep { width: 1px; height: 24px; background: var(--silia-border); margin: 0 4px; }
/* Phones only: direction and ID order as native menus. */
.rfi-mob { display: none; }
.rfi-mob select { flex: 1 1 0; min-width: 0; height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--silia-border); border-radius: var(--radius); background: var(--silia-bg-container) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236A6A73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; font: inherit; font-size: 14px; color: var(--silia-text); appearance: none; -webkit-appearance: none; text-overflow: ellipsis; }
.rfi-mob select:focus-visible { outline: none; border-color: var(--silia-purple5); box-shadow: var(--silia-focus-ring); }
.filters .search { flex: 1 1 180px; min-width: 180px; max-width: 280px; }
.rfitbl th .th-sort { border: 0; background: none; padding: 0 4px; margin: 0 -4px; font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-sm); }
.rfitbl th .th-sort:hover { background: var(--silia-fill-2); color: var(--silia-text); }
.rfitbl th .th-sort span { color: var(--silia-text-icon); }
.rfitbl th .th-sort.on, .rfitbl th .th-sort.on span { color: var(--silia-purple7); }
@media (max-width: 640px) {
  .fsep { display: none; }
  .filters .search { max-width: none; }
  .filters .sortgrp { display: none; }
  .rfi-mob { display: flex; gap: 8px; width: 100%; }
}

/* Controls: active filter and ID sort as a selected chip (purple, never lime), focus ring, 40px targets. */
.fbtn { height: 40px; }
.fbtn[aria-pressed="true"] { background: var(--silia-purple3); border-color: var(--silia-purple5); color: var(--silia-purple8); font-weight: 600; }
.search { height: 40px; }
.search::placeholder { color: var(--silia-text-placeholder); }
.search:hover { border-color: var(--silia-purple4); }
.search:focus { border-color: var(--silia-purple5); box-shadow: var(--silia-focus-ring); }
.link { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Roadmap: phases as h3 with done/total, completed rows quieter, overruns in red ---------- */

/* ---------- Roadmap (Val, 2026-10-13): phases that open, one bar per activity inside its dashed
   planned window, ruta crítica as dotted elbows, detail in a side panel. ---------- */
.rm-head { margin-bottom: 16px; }
.rm-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.rm-body.has-panel { grid-template-columns: minmax(0, 1fr) 320px; }
.rm-scroll { overflow-x: auto; }
.rm-gantt { position: relative; min-width: 760px; }
.rm-row { display: grid; grid-template-columns: 260px 1fr; align-items: stretch; border-top: 1px solid var(--line); }
.rm-lab { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 12px; }
.rm-trk { position: relative; min-height: 48px; }
.rm-trk > i { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); pointer-events: none; }
.rm-today { position: absolute; top: 0; bottom: -1px; width: 2px; margin-left: -1px; background: var(--silia-purple7); z-index: 2; pointer-events: none; }
.rm-axis { border-top: 0; border-bottom: 1px solid var(--silia-border); }
.rm-axis .rm-trk { height: 52px; min-height: 52px; }
.rm-axis .rm-today { top: 32px; }
.rm-mo { position: absolute; top: 4px; font-size: 12px; line-height: 20px; font-weight: 600; color: var(--silia-text); white-space: nowrap; }
.rm-wk { position: absolute; bottom: 6px; font-size: 12px; line-height: 20px; color: var(--text-2); transform: translateX(4px); white-space: nowrap; }
.rm-hoy { position: absolute; top: 10px; transform: translateX(-50%); font-size: 12px; line-height: 20px; font-weight: 600; color: var(--silia-purple8); background: var(--silia-purple3); box-shadow: inset 0 0 0 1px var(--silia-purple4); border-radius: var(--radius-sm); padding: 0 8px; white-space: nowrap; z-index: 3; }
.rm-ph, .rm-ac { cursor: pointer; transition: opacity .2s var(--ease); }
.rm-ph:hover, .rm-ac:hover, .rm-ac.sel { background: var(--silia-fill-2); }
.rm-ph .rm-lab { font-size: 12px; line-height: 20px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--silia-brand-black); }
.rm-ph .rm-phname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-ph .pc { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-2); background: var(--silia-border-subtle); border-radius: 999px; padding: 0 8px; flex: none; }
.rm-ph[aria-expanded="true"] .chev { transform: rotate(90deg); color: var(--silia-purple7); }
.rm-ph:hover .chev { color: var(--silia-purple7); }
.rm-phbar { position: absolute; top: 50%; height: 10px; margin-top: -5px; border-radius: 4px; background: var(--silia-purple3); overflow: hidden; display: flex; }
.rm-phbar i { display: block; height: 100%; }
.rm-phbar i.done { background: var(--silia-purple7); }
.rm-phbar i.prog { background: var(--silia-purple5); }
.rm-ac .rm-lab { padding-left: 24px; }
.rm-name { font-size: 14px; color: var(--silia-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-ac.closed .rm-name { color: var(--text-2); }
.rm-ac .id { font-size: 11px; flex: none; }
.cdot.off { visibility: hidden; }
.rm-win { position: absolute; top: 50%; height: 20px; margin-top: -10px; border-radius: 6px; border: 1px dashed var(--silia-border); }
.rm-bar { position: absolute; top: 50%; height: 10px; margin-top: -5px; border-radius: 4px; }
.rm-bar.done { background: var(--silia-purple7); }
.rm-bar.prog { background: var(--silia-purple5); }
.rm-bar.todo { background: var(--silia-purple3); box-shadow: inset 0 0 0 1px var(--silia-purple4); }
.rm-bar.blocked, .rm-bar.over { background: var(--silia-danger-bg); box-shadow: inset 0 0 0 1px var(--silia-danger-bd); } /* pale pink, never a solid red block (Val, 2026-10-13) */
.rm-bar.client { background: var(--silia-info-bg); box-shadow: inset 0 0 0 1px var(--silia-info-bd); } /* the client's days: pale blue, the same weight as the pink */
.rm-slip .who, .rm-panel .who { color: var(--silia-info-fg-strong); }
.rm-slip { position: absolute; top: 50%; margin-top: -10px; padding-left: 8px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.rm-ac[data-crit] .rm-slip { padding-left: 16px; } /* clear of the ruta crítica point at the planned end */
.rm-slip.late, .rm-late { color: var(--silia-text); font-weight: 400; }
.rm-slip.early, .rm-early { color: var(--text-2); font-weight: 400; }
.rm-links { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; overflow: visible; }
.rm-critpt { position: absolute; top: 50%; width: 0; height: 0; }
.rm-panel { border-left: 1px solid var(--line); padding-left: 24px; position: sticky; top: 72px; max-height: 78vh; overflow: auto; }
.rm-panel h3 { font-size: 16px; line-height: 24px; color: var(--silia-text); padding-right: 32px; }
.rm-x { float: right; border: 0; background: none; cursor: pointer; color: var(--text-2); font-size: 20px; line-height: 24px; padding: 0 8px; border-radius: var(--radius-sm); }
.rm-x:hover { background: var(--silia-fill-2); color: var(--silia-text); }
.rm-psub { font-size: 12px; line-height: 20px; color: var(--text-2); }
.rm-ptags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rm-pdesc { margin: 12px 0 0; color: var(--text-2); }
.rm-panel dl.kv { grid-template-columns: 1fr; gap: 2px; }
.rm-panel dl.kv dt { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.rm-rfis { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.rm-rfis li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 14px; }
.crit-tag { display: inline-flex; align-items: center; font-size: 12px; line-height: 20px; font-weight: 600; color: var(--silia-tag-orange-fg); background: var(--silia-tag-orange-bg); border-radius: var(--radius-sm); padding: 0 8px; }
.rm-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 20px; color: var(--text-2); }
.rm-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; width: 18px; height: 8px; border-radius: 3px; }
.lg.win { height: 12px; border: 1px dashed var(--silia-border); }
.lg.done { background: var(--silia-purple7); }
.lg.prog { background: var(--silia-purple5); }
.lg.todo { background: var(--silia-purple3); box-shadow: inset 0 0 0 1px var(--silia-purple4); }
.lg.over { background: var(--silia-danger-bg); box-shadow: inset 0 0 0 1px var(--silia-danger-bd); }
.lg.client { background: var(--silia-info-bg); box-shadow: inset 0 0 0 1px var(--silia-info-bd); }
@media (max-width: 900px) {
  .rm-body.has-panel { grid-template-columns: minmax(0, 1fr); }
  .rm-panel { border-left: 0; padding: 16px 0 0; border-top: 1px solid var(--line); position: static; max-height: none; }
}
/* Phones: no chart; each row carries its own mini track under the name, and no arrows. */
@media (max-width: 640px) {
  .rm-gantt { min-width: 0; --links: off; }
  .rm-scroll { overflow: visible; }
  .rm-row { grid-template-columns: 1fr; }
  .rm-axis, .rm-trk > i, .rm-slip { display: none; }
  .rm-lab { padding: 8px 0 0; }
  .rm-ac .rm-lab { padding-left: 0; }
  .rm-trk { min-height: 28px; margin-bottom: 4px; }
}

/* ---------- Ruta crítica: the platform orange tag family (--silia-tag-orange-*) ---------- */
.cdot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--silia-bg-container); box-shadow: inset 0 0 0 2.5px var(--silia-tag-orange-hue); margin: 0 2px 0 0; vertical-align: 0; }
/* RFIs: the only orange is FECHA_LÍMITE of an open RFI on the ruta crítica */
.rfitbl td.crit { color: var(--silia-tag-orange-fg); font-weight: 600; }
.rfi-cards .due.crit, .rfi-cards .due.crit b { color: var(--silia-tag-orange-fg); }

/* ---------- Flujo: status fills; the step's details sit beside the diagram (below it under 900px) ---------- */
.flow-scroll { border: 0; border-radius: var(--radius); margin-top: 12px; }
.fnode .nt { font: 600 15px var(--sans); fill: var(--silia-brand-black); letter-spacing: -.005em; }
.fnode .nid { font: 400 12px var(--sans); letter-spacing: .01em; }
.fnode .nidn { font-family: var(--mono); font-size: 11px; }
.fnode .nst { font: 400 11.5px var(--sans); }
.fnode:hover .nb { stroke: var(--silia-purple5); }
.fnode.sel:hover .nb { stroke: var(--silia-purple7); }
.elab { font: 600 12px var(--sans); }
.edge-list .what b { font-size: var(--fs-row); }
/* One button per agent under the title (HOWTO_FILL 2.7): the RFI filters' .fbtn, selected = aria-pressed. */
.flow-agents { display: flex; margin-top: 12px; }
.flow-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 12px; }
.flow-body .flow-scroll { margin-top: 0; }
/* Zoom controls: the platform's Process Flow canvas toolbar (fit, zoom in, zoom out), bottom left (Val, 2026-10-13). */
.flow-canvas { position: relative; min-width: 0; }
/* A free viewport: fixed height, nothing scrolls; the svg moves with a transform (applyFlowView). */
.flow-body .flow-scroll { position: relative; overflow: hidden; height: min(72vh, 760px); max-height: none; cursor: grab; touch-action: none; overscroll-behavior: contain; }
.flow-scroll svg { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 0 0; max-width: none; }
.flow-scroll.panning { cursor: grabbing; user-select: none; }
.flow-scroll.panning .fnode { cursor: grabbing; }
.flow-scroll .fnode { cursor: pointer; }
.flow-zoom { position: absolute; bottom: 12px; left: 12px; z-index: 4; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: var(--radius); border: 1px solid var(--silia-border); background: var(--silia-bg-container); box-shadow: var(--silia-shadow-md); }
.flow-zoom button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); cursor: pointer; }
.flow-zoom button:hover:not(:disabled) { background: var(--silia-purple2); color: var(--silia-purple7); }
/* "Human in the loop" card: the human-in-the-loop steps, each opens and centres its step. */
.hitl-list { list-style: none; margin: 12px 0 0; padding: 0; }
.hitl-list li + li { border-top: 1px solid var(--line); }
.hitl-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 8px; margin: 0 -8px; width: calc(100% + 16px); border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.hitl-row:hover { background: var(--silia-fill-2); }
.hitl-row:hover .chev { color: var(--silia-purple7); }
.hitl-ic { flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--silia-info-fg-strong); background: var(--silia-info-bg); box-shadow: inset 0 0 0 1px var(--silia-info-bd); }
.hitl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hitl-meta { font-size: 12px; line-height: 20px; color: var(--text-2); }
.hitl-title { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--silia-brand-black); }
.hitl-rfis { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 12px; }
.flow-zoom button:disabled { color: var(--silia-text-placeholder); cursor: default; }
.flow-body.has-detail { grid-template-columns: minmax(0, 1fr) 360px; }
.flow-body .flow-detail { margin-top: 0; }
.detail-sec { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-sec .dh { font-size: var(--fs-row); line-height: var(--lh-row); }
.detail-sec .link { text-align: left; }
.flow-body.has-detail .detail-sec { margin: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--line); max-height: 78vh; overflow: auto; position: sticky; top: 72px; }
.flow-body.has-detail .detail-sec .card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
.detail-sec .rm-x { float: right; margin: -4px -8px 0 8px; }
.flow-body.has-detail dl.kv { grid-template-columns: 1fr; gap: 2px; }
.flow-body.has-detail dl.kv dt { margin-top: 8px; font-size: var(--fs-meta); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 900px) {
  .flow-body.has-detail { grid-template-columns: minmax(0, 1fr); }
  .flow-body.has-detail .detail-sec { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); max-height: none; position: static; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tblbox { display: none; }
  .rfi-cards { display: block; }
  .filters .search { order: -1; }
}
