/* ============================================================================
   Faden v2 · Direction C · palettes.css — three colour variants (Request A)
   Mockup 18-10-2026 · datos ficticios. Linked last by screens 01-04.

   Owner choice 18-10-2026: (d3) teal renovado. Screens 01-04 open with
   <html data-palette="teal">; ?paleta=bosque|institucional previews the other
   variants and ?paleta=base shows direction C as first proposed (red action).

   Owner brief: red marks only what needs attention because it is critical
   (overdue items; «urgent» needs a decision, see SOURCE_CHECK VIS2-D3). It is not
   the brand or action colour. Each variant sets <html data-palette="…">:

     bosque         forest green brand, dark green sidebar
     institucional  navy-blue brand (from the institution navy), white sidebar
     teal           renewed, greener teal brand, dark teal sidebar

   What every variant changes (one shared block):
     · the brand ramp replaces --fd-primary-* (links, icons, focus, info chips,
       plan tiles, stitches) and becomes the action colour and the active marker;
     · overdue moves from the warning family to the red ramp (--fd-accent-*),
       always with the bell icon, the word «vencido» and the 3 px rule; amber
       stays for waiting states, crimson stays for form errors;
     · a softer canvas, larger radii and a light card shadow.

   With no data-palette the page renders exactly as before. Like tokens.css, this
   file holds colour literals; its few rules read tokens only.
   ============================================================================ */

/* ---- Shared by the three variants ---------------------------------------- */
:root[data-palette] {
  /* Action and markers follow the brand ramp; red leaves the action slots. */
  --fd-action: var(--fd-primary-600);
  --fd-action-hover: var(--fd-primary-700);
  --fd-action-active: var(--fd-primary-800);
  --fd-action-marker: var(--fd-primary-600);
  --fd-action-600: var(--fd-primary-600);
  --fd-action-700: var(--fd-primary-700);
  --fd-action-800: var(--fd-primary-800);

  /* Overdue = red (accent ramp, h 27°, 20° away from the crimson error ramp). */
  --fd-overdue-text: var(--fd-accent-700);   /* #972622 · 7,44:1 on accent-50 */
  --fd-overdue-bg: var(--fd-accent-50);      /* #FFF4F2 */
  --fd-overdue-border: var(--fd-accent-600); /* #B8342F · 5,45:1 on accent-50 */
  --fd-tile-overdue-bg: var(--fd-accent-50);
  --fd-tile-overdue-fg: var(--fd-accent-700);

  /* Modern surfaces: radius 12 / 8 / 6 and a light two-layer card shadow. */
  --fd-radius-card: 12px;
  --fd-radius-control: 8px;
  --fd-radius-badge: 6px;
  --fd-shadow-card: 0 1px 2px rgb(16 24 28 / 0.05), 0 4px 14px rgb(16 24 28 / 0.06);
}
:root[data-palette] .fd-record-header { box-shadow: var(--fd-shadow-card); }

/* ---- Bosque: forest green ------------------------------------------------ */
:root[data-palette="bosque"] {
  --fd-primary-50:  #EEF7F1;
  --fd-primary-100: #D7ECDE;
  --fd-primary-200: #B0D8BF;
  --fd-primary-300: #80BE99;
  --fd-primary-400: #4F9F73;
  --fd-primary-500: #2F8257;
  --fd-primary-600: #1F6B45; /* action fill · white 6,47:1 */
  --fd-primary-700: #175636; /* links, icons · white 8,67:1 */
  --fd-primary-800: #124429;
  --fd-primary-900: #0E3420;
  --fd-primary-950: #082014;

  --fd-bg: #F2F5F3;

  /* Info chips and «Activo» badges move to blue: a green brand would read as «al día» (success). */
  --fd-state-info-fg: var(--fd-blue-700);
  --fd-state-info-bg: var(--fd-blue-50);
  --fd-state-info-border: #BCD0F2;

  /* Dark sidebar. */
  --fd-nav-bg: #133524;
  --fd-nav-hover-bg: rgb(255 255 255 / 0.08);
  --fd-nav-active-bg: rgb(255 255 255 / 0.13);
  --fd-nav-text: #FFFFFF;          /* 13,44:1 on #133524 */
  --fd-nav-text-muted: #B7CFC0;    /* 8,13:1 */
  --fd-nav-icon: #A6D3B6;
  --fd-nav-marker: #8FD3A8;        /* 3 px active bar · 7,71:1 (5,16:1 on the active item) */
  --fd-nav-border: rgb(255 255 255 / 0.10);
  --fd-nav-footer-bg: #0B2216;
  --fd-stitch-on-nav: #80BE99;
  --fd-focus-ring-on-dark: #B0E8C5;
}

/* ---- Institucional: navy blue from the institution colour --------------- */
:root[data-palette="institucional"] {
  --fd-primary-50:  #EEF4FB;
  --fd-primary-100: #D9E6F5;
  --fd-primary-200: #B3CDEB;
  --fd-primary-300: #84ADDC;
  --fd-primary-400: #5389C8;
  --fd-primary-500: #2C68AE;
  --fd-primary-600: #1A4F8E; /* action fill · white 8,23:1 */
  --fd-primary-700: #123E73; /* links, icons · white 10,70:1 */
  --fd-primary-800: #0C3060;
  --fd-primary-900: #082449;
  --fd-primary-950: #04172F;

  --fd-bg: #F3F5F8;

  /* Interviews move off blue so they stay distinct from the brand-blue plan tiles. */
  --fd-tile-interview-bg: #E7F5F4;
  --fd-tile-interview-fg: #0B6763; /* 5,99:1 */

  /* White sidebar, brand-tinted active item. */
  --fd-nav-bg: var(--fd-surface);
  --fd-nav-hover-bg: var(--fd-primary-50);
  --fd-nav-active-bg: var(--fd-primary-50);
}

/* ---- Teal renovado: a greener, cleaner teal ----------------------------- */
:root[data-palette="teal"] {
  --fd-primary-50:  #EAFAF8;
  --fd-primary-100: #CDF1EC;
  --fd-primary-200: #9EE2DA;
  --fd-primary-300: #67CCC2;
  --fd-primary-400: #33AFA6;
  --fd-primary-500: #12928A;
  --fd-primary-600: #0B7770; /* action fill · white 5,40:1 */
  --fd-primary-700: #0A5F5A; /* links, icons · white 7,51:1 */
  --fd-primary-800: #0A4B47;
  --fd-primary-900: #083B38;
  --fd-primary-950: #042523;

  --fd-bg: #F2F6F6;

  /* Dark sidebar. */
  --fd-nav-bg: #0B3330;
  --fd-nav-hover-bg: rgb(255 255 255 / 0.08);
  --fd-nav-active-bg: rgb(255 255 255 / 0.13);
  --fd-nav-text: #FFFFFF;          /* 13,72:1 on #0B3330 */
  --fd-nav-text-muted: #B3D5D1;    /* 8,73:1 */
  --fd-nav-icon: #9FD8D1;
  --fd-nav-marker: #67CCC2;        /* 3 px active bar · 7,18:1 (4,82:1 on the active item) */
  --fd-nav-border: rgb(255 255 255 / 0.10);
  --fd-nav-footer-bg: #062220;
  --fd-stitch-on-nav: #67CCC2;
  --fd-focus-ring-on-dark: #A8EEE6;

  /* Owner 18-10-2026: every card tile takes the same soft teal (primary-700 on primary-50,
     6,98:1); the icon tells the family apart. Only the overdue tile keeps red. */
  --fd-tile-interview-bg: var(--fd-primary-50);  --fd-tile-interview-fg: var(--fd-primary-700);
  --fd-tile-situation-bg: var(--fd-primary-50);  --fd-tile-situation-fg: var(--fd-primary-700);
  --fd-tile-academic-bg: var(--fd-primary-50);   --fd-tile-academic-fg: var(--fd-primary-700);
  --fd-tile-neutral-bg: var(--fd-primary-50);    --fd-tile-neutral-fg: var(--fd-primary-700);
  --fd-tile-waiting-bg: var(--fd-primary-50);    --fd-tile-waiting-fg: var(--fd-primary-700);
  --fd-tile-ok-bg: var(--fd-primary-50);         --fd-tile-ok-fg: var(--fd-primary-700);
  --fd-tile-draft-bg: var(--fd-primary-50);      --fd-tile-draft-fg: var(--fd-primary-700);
}

/* ---- Dark sidebar rules (bosque, teal): the nav reads its own text tokens ---- */
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav { border-right-color: var(--fd-nav-border); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__wordmark { color: var(--fd-nav-text); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__stitches path { stroke: var(--fd-stitch-on-nav); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__close { color: var(--fd-nav-text); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__group-label { color: var(--fd-nav-text-muted); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__item { color: var(--fd-nav-text-muted); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__item .fd-icon { color: var(--fd-nav-icon); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__item:hover { color: var(--fd-nav-text); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__item[aria-current="page"] {
  color: var(--fd-nav-text); border-color: transparent; border-left-color: var(--fd-nav-marker);
}
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__item[aria-current="page"] .fd-icon { color: var(--fd-nav-text); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav :focus-visible { outline-color: var(--fd-focus-ring-on-dark); }
:root:is([data-palette="bosque"], [data-palette="teal"]) .fd-nav__footer { background: var(--fd-nav-footer-bg); border-top: 1px solid var(--fd-nav-border); }
