    :root {
      --bg: #0F0F12; --bg-2: #15151A; --surface: #1B1B20; --surface-2: #212128;
      --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
      --t1: #F4F5F8; --t2: rgba(244,245,248,.60); --t3: rgba(244,245,248,.38);
      --blue: #5046E5; --blue-bright: #8A7CFF; --blue-soft: rgba(80,70,229,.16);
      --lt-bg: #FFFFFF; --lt-surface: #F6F6F4; --lt-ink: #1F1F1F;
      --lt-2: #54545C; --lt-3: #8A8A92; --lt-line: #E8E8E6; --lt-line-2: #DADAD6;
      --st-late: #F85C5C; --st-block: #E8A33D; --st-prog: #5046E5;
       --st-done: #3FB984; --st-idle: rgba(244,245,248,.30); --st-idle-light: #B4B2A9;
      --max-width: 1280px; --r-button: 10px; --r-chip: 12px; --r-card: 18px; --r-pill: 100px;
      --ease: cubic-bezier(.16,1,.3,1);
      --mono: "JetBrains Mono", monospace; --sans: Raleway, system-ui, sans-serif;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { background: var(--bg); color: var(--t1); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
    a { color: var(--blue-bright); text-decoration: none; }
    a:hover { color: var(--t1); }
    a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }
    button, input, select { font: inherit; }
    button { cursor: pointer; }
    main { position: relative; }
    .wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }
    .mono, .eyebrow, .section-label { font-family: var(--mono); }
    .eyebrow { color: var(--t3); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
    .section-label { color: var(--t3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
    .topbar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(15,15,18,.82); backdrop-filter: blur(14px); }
    .nav-inner { display: flex; align-items: center; gap: 28px; min-height: 62px; }
    .brand { display: flex; align-items: center; gap: 10px; color: var(--t1); }
    .brand-logo { display: block; width: auto; height: 26px; }
    .brand-name { font-size: 14px; font-weight: 700; }
    .brand-sub { display: block; margin-top: 1px; color: var(--t3); font: 9px var(--mono); letter-spacing: .18em; }
    .main-nav { display: flex; gap: 4px; margin-left: 12px; }
    .main-nav a { padding: 7px 13px; border: 1px solid transparent; border-radius: var(--r-button); color: var(--t2); font: 12px var(--mono); transition: all .22s var(--ease); }
    .main-nav a:hover, .main-nav a[aria-current="page"] { border-color: var(--line); color: var(--t1); background: var(--surface-2); }
    .nav-dot { display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-radius: 50%; background: var(--st-late); vertical-align: middle; box-shadow: 0 0 8px rgba(248,92,92,.6); }
    .user-chip { margin-left: auto; color: var(--t2); font: 12px var(--mono); }
    .user-chip::before { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--st-done); content: ""; vertical-align: middle; }
    .hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 44px 0 38px; }
    .hero::before { position: absolute; top: -260px; left: 8%; width: 640px; height: 540px; background: radial-gradient(circle, rgba(80,70,229,.30), transparent 68%); filter: blur(30px); content: ""; pointer-events: none; }
    .hero::after { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 52px 52px; content: ""; opacity: .3; -webkit-mask-image: radial-gradient(ellipse 70% 100% at 30% 0%, #000, transparent 72%); mask-image: radial-gradient(ellipse 70% 100% at 30% 0%, #000, transparent 72%); pointer-events: none; }
    .hero-inner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; z-index: 1; }
    h1 { margin: 10px 0 8px; color: var(--t1); font-size: 44px; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
    .hero h1 .section-label { margin-left: 12px; vertical-align: middle; }
    .detail-page { padding-top: 34px; padding-bottom: 64px; }
    .breadcrumb { display: flex; gap: 8px; margin-bottom: 28px; color: var(--t3); font: 11px var(--mono); }
    .breadcrumb span { color: var(--t3); }
    .detail-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
     .detail-hero h1 { max-width: 760px; font-size: 26px; letter-spacing: -.02em; }
    .detail-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .status-chip, .priority-chip, .severity-chip, .source-chip { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: var(--r-chip); font: 11px var(--mono); }
    .status-chip { border: 1px solid var(--line); color: var(--t2); background: var(--surface-2); }
    .status-chip.en_progreso { border-color: rgba(80,70,229,.5); color: var(--blue-bright); background: var(--blue-soft); }
    .status-chip.bloqueada { border-color: rgba(232,163,61,.4); color: var(--st-block); background: rgba(232,163,61,.1); }
    .status-chip.cerrado, .status-chip.completada { border-color: rgba(63,185,132,.4); color: var(--st-done); background: rgba(63,185,132,.1); }
    .severity-chip { border: 1px solid var(--line); color: var(--t2); background: var(--surface-2); }
    .severity-chip.severity-critico { border-color: rgba(248,92,92,.45); color: var(--st-late); background: rgba(248,92,92,.1); }
    .severity-chip.severity-alto { border-color: rgba(232,163,61,.45); color: var(--st-block); background: rgba(232,163,61,.1); }
    .severity-chip.severity-medio { border-color: rgba(138,124,255,.45); color: var(--blue-bright); background: var(--blue-soft); }
    .severity-chip.severity-bajo { color: var(--t3); }
    .detail-columns { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; align-items: start; gap: 24px; }
    .detail-col-left .detail-grid { grid-template-columns: 1fr; margin-top: 0; }
    .detail-col-left .detail-metric { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 0; padding: 13px 16px; }
    .detail-col-left .detail-metric span { margin-bottom: 0; flex: none; }
    .detail-col-left .detail-metric strong { text-align: right; overflow-wrap: anywhere; }
    .detail-col-right .detail-card:first-child { margin-top: 0; }
    .thread-descripcion { margin: 0; padding: 20px; color: var(--t2); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
    .activity-thread { display: flex; flex-direction: column; }
    .thread-entry { padding: 16px 20px; border-bottom: 1px solid var(--line); }
    .thread-entry:last-child { border-bottom: 0; }
    .thread-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--t3); font: 11px var(--mono); letter-spacing: .04em; }
    .thread-entry-autor { color: var(--t2); font-weight: 600; }
    .thread-entry-contenido { margin: 0; color: var(--t2); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
    @media (max-width: 940px) { .detail-columns { grid-template-columns: 1fr; } }
    .detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 26px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--line); }
    .detail-metric { min-height: 82px; padding: 16px; background: var(--surface); }
    .detail-metric span { display: block; margin-bottom: 9px; color: var(--t3); font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
    .detail-metric strong { color: var(--t1); font: 600 14px var(--mono); }
    .detail-card { margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
    .detail-card-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
    .detail-card-heading h2 { margin-top: 6px; color: var(--t1); font-size: 20px; }
     .detail-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 0 20px 20px; }
     .detail-form label { display: grid; flex: 1 1 140px; min-width: 0; gap: 4px; color: var(--t3); font: 11px var(--mono); }
     .detail-form select { width: 100%; min-width: 0; box-sizing: border-box; }
     .detail-form input[type="text"] { width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 2px; border: none; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--t2); background: transparent; font: 12px var(--mono); }
     .detail-form input[type="text"]:focus { outline: none; border-bottom-color: var(--blue-bright); }
     .detail-form > .action-button { flex: 0 0 auto; margin-left: auto; }
     .resolution-form { flex-wrap: wrap; }
     .resolution-form textarea { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t2); background: var(--bg); font: 12px var(--mono); resize: vertical; }
     .resolution-comment { padding: 0 20px 20px; color: var(--t2); white-space: pre-wrap; }
    .detail-table { width: 100%; }
     .detail-row { display: grid; grid-template-columns: 140px 110px 140px minmax(0, 1fr); gap: 16px; align-items: start; padding: 15px 20px; border-bottom: 1px solid var(--line); color: var(--t2); font-size: 13px; }
    .detail-row:last-child { border-bottom: 0; }
     .detail-row p { margin-top: 6px; color: var(--t2); line-height: 1.5; }
     .detail-row p { overflow-wrap: anywhere; }
    .detail-header { color: var(--t3); font: 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
    .history-row { grid-template-columns: 1.2fr 1fr 1fr 1.8fr 1.2fr; }
     .lead { max-width: 460px; color: var(--t2); font-size: 15px; line-height: 1.55; }
     .detail-hero .lead { max-width: 72ch; }
    .period { min-width: 420px; flex: 1; }
    .period-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
    .period-count { color: var(--t3); font: 12px var(--mono); letter-spacing: .1em; }
    .distribution { display: flex; height: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
    .distribution span { display: block; height: 100%; }
     .distribution .pending { background: #8A8A92; }
    .distribution .progress { background: var(--st-prog); }
    .distribution .done { background: var(--st-done); }
    .distribution .blocked { background: var(--st-block); }
    .legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
    .legend-item { display: flex; align-items: center; gap: 8px; color: var(--t2); font: 12px var(--mono); }
    .legend-item i { width: 8px; height: 8px; border-radius: 2px; }
    .legend-item i.late { background: var(--st-late); }
    .legend-item b { color: var(--t1); font-weight: 600; }
    .triage { position: relative; padding: 46px 0 52px; background: var(--lt-surface); color: var(--lt-ink); }
    .triage::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--st-late), var(--st-block) 34%, var(--blue) 68%, transparent); content: ""; }
    .triage-header, .section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
    .triage h2, .section h2 { color: inherit; font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
    .triage-sub { margin-top: 5px; color: var(--lt-2); font-size: 14px; }
    .triage .eyebrow { color: var(--lt-3); }
     .triage-title { margin-bottom: 7px; color: var(--lt-ink); font-size: 15px; font-weight: 600; }
     .triage-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
     .triage-list { width: 100%; }
     .triage-row { display: grid; grid-template-columns: 44px 84px minmax(0, 1fr) auto; min-height: 52px; padding: 10px 10px; border: 0; border-bottom: .5px solid var(--lt-line); border-left: 2px solid var(--lt-3); border-radius: 0; background: transparent; }
     .triage-row:hover { border-color: var(--lt-line-2); background: transparent; transform: none; }
     .triage-row-vencida { border-left-color: var(--st-late); }
     .triage-row-bloqueada { border-left-color: var(--st-block); }
     .triage-row-sin_seguimiento { border-left-color: var(--st-idle-light); }
     .triage-state { display: flex; align-items: start; }
     .triage-state-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 5px; border-radius: 4px; font: 12px var(--mono); white-space: nowrap; }
     .triage-row-vencida .triage-state-chip { color: var(--st-late); background: color-mix(in srgb, var(--st-late) 12%, transparent); }
     .triage-row-bloqueada .triage-state-chip { color: var(--st-block); background: color-mix(in srgb, var(--st-block) 14%, transparent); }
     .triage-row-sin_seguimiento .triage-state-chip { color: var(--lt-2); background: color-mix(in srgb, var(--st-idle-light) 28%, transparent); }
     .triage-content { min-width: 0; }
     .triage-row .triage-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
     .triage-row .triage-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--lt-2); font: 12px var(--mono); line-height: 1.35; }
     .triage-age { align-self: center; text-align: center; }
     .triage-age b { display: block; color: var(--lt-2); font: 500 20px var(--mono); line-height: 1.1; }
     .triage-age small { display: block; margin-top: 2px; color: var(--lt-3); font-size: 10px; letter-spacing: .06em; }
     .triage-row-vencida .triage-age b { color: var(--st-late); }
     .triage-row-bloqueada .triage-age b { color: var(--st-block); }
     .source-icon { display: inline-flex; width: 14px; height: 14px; background-position: center; background-repeat: no-repeat; background-size: 14px 14px; opacity: .55; }
     .source-icon-gmail { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2354545C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
     .source-icon-jira { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2354545C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M8 5v5'/%3E%3C/svg%3E"); }
     .source-icon-slack { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2354545C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4v10'/%3E%3Cpath d='M14 10v10'/%3E%3Cpath d='M4 14h10'/%3E%3Cpath d='M10 10h10'/%3E%3C/svg%3E"); }
     .triage-subtask { margin-left: 12px; color: var(--lt-2); font-size: 13px; line-height: 1.45; }
     .triage-subtask::first-letter { color: var(--lt-3); }
     .triage-row .triage-open { align-self: center; color: var(--blue); font-size: 13px; }
     .hero .period { display: none; }
      .metrics-overview { padding: 34px 0 42px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); color: var(--t1); }
      .metrics-overview .eyebrow, .metrics-overview .section-label, .metrics-overview .muted { color: var(--t3); }
      .metrics-heading { margin-bottom: 18px; }
      .metric-total { display: block; margin-top: 5px; color: var(--t2); font: 12px var(--mono); }
      .metrics-overview h2 { color: var(--t1); }
      .metric-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
      .metric-card { display: block; min-height: 132px; padding: 16px; border: 1px solid var(--line-2); border-top: 3px solid var(--st-idle-light); border-radius: var(--r-card); background: var(--surface); color: var(--t1); text-decoration: none; transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
      .metric-card:hover, .metric-card:focus-visible { border-color: var(--blue-bright); background: var(--blue-soft); box-shadow: 0 12px 30px rgba(0,0,0,.18); transform: translateY(-2px); }
      .metric-card.metric-progress { border-top-color: var(--blue); }
      .metric-card.metric-done { border-top-color: var(--st-done); }
      .metric-card.metric-blocked { border-top-color: var(--st-block); }
      .metric-card.metric-late { border-top-color: var(--st-late); }
      .metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
      .metric-percent { color: var(--blue-bright); font-size: 32px; font-weight: 800; letter-spacing: -.04em; }
      .metric-card strong { padding-left: 12px; border-left: 1px solid var(--line-2); color: var(--t1); font: 700 28px var(--mono); }
      .metric-label { margin-top: 12px; color: var(--t2); font: 700 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
      .metric-bar { height: 8px; margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); }
      .metric-bar span { display: block; height: 100%; border-radius: inherit; background: var(--st-idle-light); }
      .metric-progress .metric-bar span { background: var(--blue); }
      .metric-done .metric-bar span { background: var(--st-done); }
      .metric-blocked .metric-bar span { background: var(--st-block); }
      .metric-late .metric-bar span { background: var(--st-late); }
      .metric-card small { display: block; margin-top: 8px; color: var(--t3); font: 10px var(--mono); }
      @media (max-width: 940px) { .metric-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
      @media (max-width: 640px) { .metric-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metric-card { min-height: 118px; padding: 12px; } .metric-percent { font-size: 25px; } .metric-card strong { font-size: 22px; } }
      .metrics-page-hero { padding: 42px 0 34px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
      .metrics-page-hero h1 { margin-top: 10px; font-size: 42px; }
      .metrics-page { padding: 28px 0 64px; }
      .metrics-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
      .metrics-filters > div { min-width: 145px; flex: 1 1 145px; }
      .metrics-filters label { display: block; margin-bottom: 5px; color: var(--t3); font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
      .metrics-filters input, .metrics-filters select { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t2); background: var(--bg); color-scheme: dark; font: 12px var(--mono); }
      .metrics-filters input[type="month"] { appearance: auto; padding-right: 12px; color-scheme: dark; }
      .metrics-filters input[type="month"]::-webkit-calendar-picker-indicator { opacity: 1; filter: brightness(0) invert(1); width: 16px; height: 16px; cursor: pointer; }
      .metrics-filters .clear-link { align-self: center; font: 11px var(--mono); }
      .metrics-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
      .metrics-section-heading h2 { margin-top: 5px; color: var(--t1); font-size: 20px; }
      .executive-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
      .executive-kpis article { min-height: 120px; padding: 15px; border: 1px solid var(--line-2); border-top: 2px solid var(--blue); border-radius: var(--r-card); background: var(--surface); }
      .executive-kpis span, .executive-kpis small { display: block; color: var(--t3); font: 10px var(--mono); text-transform: uppercase; }
      .executive-kpis strong { display: block; margin: 15px 0 6px; color: var(--blue-bright); font: 700 25px var(--mono); }
      .executive-kpis small { color: var(--t2); text-transform: none; }
      .metrics-chart-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
      .metrics-chart-wide { margin-top: 18px; }
      .metrics-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
      .metrics-bars { display: flex; align-items: end; gap: 12px; min-height: 220px; padding: 10px 4px 0; border-bottom: 1px solid var(--line-2); }
      .metrics-bar-column { display: flex; min-width: 0; flex: 1; height: 190px; flex-direction: column; align-items: center; justify-content: end; gap: 7px; color: var(--t3); font: 10px var(--mono); }
      .metrics-bar-values { display: flex; gap: 5px; }
      .metrics-bar-pair { display: flex; align-items: end; justify-content: center; gap: 4px; width: 100%; height: 150px; }
      .metrics-bar-pair i { display: block; min-height: 2px; width: min(30px, 38%); border-radius: 4px 4px 0 0; }
      .bar-received { background: var(--line-2); }
      .bar-attended { background: var(--blue-bright); }
      .metrics-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; color: var(--t2); font: 10px var(--mono); }
      .metrics-legend span { display: inline-flex; align-items: center; gap: 6px; }
      .metrics-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
      .state-chart { display: grid; gap: 13px; }
      .state-chart-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 30px; align-items: center; gap: 8px; color: var(--t2); font: 10px var(--mono); }
      .state-chart-row b { color: var(--t1); text-align: right; }
      .state-stack { display: flex; height: 14px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
      .state-stack i { min-width: 0; }
      .state-pending { background: var(--st-idle-light); }
      .state-progress { background: var(--blue); }
      .state-blocked { background: var(--st-block); }
      .state-done { background: var(--st-done); }
      .state-cancelled { background: var(--st-late); }
      .horizontal-bars, .owner-bars, .aging-bars { display: grid; gap: 13px; }
      .horizontal-bars > div > span, .owner-bars > div > span, .aging-bars > div > span { display: flex; justify-content: space-between; gap: 12px; color: var(--t2); font: 11px var(--mono); }
      .horizontal-bars em { color: var(--t1); font-style: normal; }
      .horizontal-bars > div > i { display: block; height: 10px; margin-top: 6px; border-radius: 99px; background: var(--blue-bright); }
      .priority-bar { background: var(--st-block) !important; }
      .owner-bars > div > div, .aging-bars > div > div { display: flex; height: 10px; gap: 2px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
      .owner-bars i, .aging-bars i { display: block; min-width: 2px; }
      .owner-bars small, .aging-bars small { display: block; margin-top: 4px; color: var(--t3); font: 10px var(--mono); }
      @media (max-width: 940px) { .executive-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
      @media (max-width: 640px) { .metrics-page-hero h1 { font-size: 34px; } .metrics-filters { display: grid; grid-template-columns: 1fr 1fr; } .metrics-filters > div { min-width: 0; } .metrics-filters > button, .metrics-filters > .clear-link { grid-column: 1 / -1; } .executive-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metrics-chart-grid { grid-template-columns: 1fr; } .metrics-chart-panel { padding: 15px; } .metrics-section-heading { align-items: flex-start; flex-direction: column; } .metrics-bars { gap: 5px; } .metrics-bar-column { font-size: 9px; } }
      .section { padding: 52px 0; }
    .section-dark { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
    .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
    .filters label { display: grid; gap: 4px; color: var(--t3); font: 11px var(--mono); }
    .filters input, .filters select, .filter-toggle, .action-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t2); background: var(--bg); font: 12.5px var(--mono); }
    select { appearance: none; padding-right: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--t2); background-color: var(--surface-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A5A5AE' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 10px center; background-repeat: no-repeat; color-scheme: dark; }
    select:focus-visible { border-color: var(--blue-bright); }
     .filters input[type="search"] { min-width: 260px; }
     .filters input[type="month"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .9; }
    .filter-toggle { color: var(--t2); background: var(--surface-2); cursor: pointer; }
    .filter-toggle strong { padding: 1px 6px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); color: var(--t1); font-size: 10.5px; }
    .filter-details { flex-basis: 100%; padding-top: 8px; }
    .filter-details[hidden] { display: none; }
    .filter-details-inner { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
    .results-count { margin-left: auto; color: var(--t3); font: 11.5px var(--mono); }
    .active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--t3); font: 11px var(--mono); }
    .active-filters span { padding: 3px 8px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--t2); }
    /* Pestañas dentro del modal de persona (sin JS): radios ocultos + :has() */
    .tab-radio { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
    .modal-tabs { display: flex; gap: 4px; margin: 4px 0 16px; border-bottom: 1px solid var(--line); }
    .modal-tab { padding: 8px 12px; cursor: pointer; color: var(--t2); font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
    .modal-tab:hover { color: var(--t1); }
    .person-modal-card:has(.tab-radio-info:checked) .modal-tab-info,
    .person-modal-card:has(.tab-radio-roles:checked) .modal-tab-roles { color: var(--t1); border-bottom-color: var(--brand, #5046E5); font-weight: 500; }
    .tab-panel { display: none; }
    .person-modal-card:has(.tab-radio-info:checked) .panel-info,
    .person-modal-card:has(.tab-radio-roles:checked) .panel-roles { display: block; }
    .roles-form { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
    .roles-form > label.roles-rol { display: grid; gap: 6px; max-width: 220px; color: var(--t3); font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
    .roles-form select { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t1); background-color: var(--bg); font: 13px var(--sans); }
    .roles-form-actions { display: flex; align-items: center; gap: 10px; }
    .roles-form-actions .action-button { text-decoration: none; }
    .modulos-fieldset { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
    .modulos-fieldset legend { color: var(--t3); font-size: 11.5px; padding: 0 6px; text-transform: none; letter-spacing: 0; }
    .modulo-check { display: flex; align-items: center; gap: 8px; color: var(--t1); font: 13px var(--sans); text-transform: none; letter-spacing: 0; }
    .modulo-check input { flex: none; }
    .section-collapse summary.section-header { justify-content: flex-start; align-items: center; cursor: pointer; list-style: none; }
    .section-collapse summary.section-header::-webkit-details-marker { display: none; }
    .section-collapse summary.section-header::before { content: "▾"; display: inline-block; margin-right: 10px; color: var(--t2); font-size: 20px; line-height: 1; transition: transform .18s var(--ease); }
    .section-collapse:not([open]) summary.section-header::before { transform: rotate(-90deg); }
    .section-collapse summary.section-header h3 { font-size: 20px; font-weight: 700; }
    .section-collapse-abierto summary.section-header::before,
    .section-collapse-abierto summary.section-header h3 { color: var(--blue-bright); }
    .section-collapse-bloqueada summary.section-header::before,
    .section-collapse-bloqueada summary.section-header h3 { color: var(--st-block); }
    .section-collapse-cerrado summary.section-header::before,
    .section-collapse-cerrado summary.section-header h3 { color: var(--st-done); }
    .section-collapse-cancelada summary.section-header::before,
    .section-collapse-cancelada summary.section-header h3 { color: var(--t3); }
    .data-table { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
    .data-row { display: grid; align-items: center; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--line); transition: background .22s var(--ease); }
    .data-row:last-child { border-bottom: 0; }
    .data-row:hover { background: var(--surface-2); }
    .suggestion-row { grid-template-columns: 1fr 110px 150px 190px; }
     .activity-row { grid-template-columns: 96px minmax(0, 1fr) 110px 110px 150px 110px 130px 110px; min-height: 56px; border-left: 3px solid transparent; }
     .activity-row.estado-abierto, .activity-row.estado-en_progreso { border-left-color: var(--blue-bright); }
     .activity-row.estado-bloqueada { border-left-color: var(--st-block); }
     .activity-row.estado-cerrado { border-left-color: var(--st-done); }
     .activity-row.estado-cancelada { border-left-color: var(--t3); }
     .backlog-row { grid-template-columns: minmax(0, 1fr) 170px 140px 300px; min-height: 52px; }
     .backlog-acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
     .backlog-form { display: flex; gap: 8px; align-items: center; }
     .backlog-form select { padding: 6px 8px; }
    .data-header { padding-block: 12px; background: rgba(255,255,255,.02); color: var(--t3); font: 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
    .data-title { color: var(--t1); font-size: 14.5px; font-weight: 500; }
    .data-meta { margin-top: 4px; color: var(--t3); font: 11.5px var(--mono); }
    .source-chip, .signal-chip { display: inline-block; padding: 3px 8px; border-radius: 6px; font: 11px var(--mono); }
    .source-chip { border: 1px solid var(--line); color: var(--t2); background: var(--bg); }
    .signal-chip { color: var(--blue-bright); background: var(--blue-soft); }
    .cat-chip { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 6px; font: 10px var(--mono); border: 1px solid var(--line); color: var(--t2); background: var(--bg); vertical-align: middle; }
    .cat-chip.cat-cliente { color: var(--blue-bright); background: var(--blue-soft); border-color: transparent; }
     .priority-chip { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-chip); color: var(--t2); background: var(--surface-2); font: 11px var(--mono); }
     .priority-critica { border-color: rgba(248,92,92,.45); color: var(--st-late); background: rgba(248,92,92,.1); }
     .priority-alta { border-color: rgba(232,163,61,.45); color: var(--st-block); background: rgba(232,163,61,.1); }
     .priority-media { border-color: rgba(138,124,255,.45); color: var(--blue-bright); background: var(--blue-soft); }
     .priority-baja { color: var(--t3); }
    .detail-controls { max-width: 520px; margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
    .detail-controls h2 { margin-bottom: 12px; color: var(--t1); font-size: 16px; }
    .detail-controls form { display: flex; align-items: end; gap: 10px; }
    .detail-controls label { display: grid; gap: 4px; color: var(--t3); font: 11px var(--mono); }
    .status-text, .late-text, .tertiary { font: 11px var(--mono); }
    .status-text { color: var(--t2); }
    .status-text.abierto { color: var(--blue-bright); }
    .status-text.bloqueada { color: var(--st-block); }
    .status-text.en_progreso { color: var(--blue-bright); }
    .status-text.cerrado { color: var(--st-done); }
    .late-text { color: var(--st-late); }
    .tertiary { color: var(--t3); }
    .clear-link, .pagination { color: var(--blue-bright); font: 11px var(--mono); }
    .pagination { display: flex; gap: 18px; margin-top: 14px; }
    .actions { display: flex; justify-content: flex-end; gap: 8px; }
    .action-button { transition: all .22s var(--ease); }
    .action-button:hover { border-color: var(--line-2); color: var(--t1); transform: translateY(-2px); }
    .action-button.primary { border-color: var(--blue); color: #fff; background: var(--blue); font-weight: 600; }
    .action-button.ghost { background: transparent; }
    .check-label { display: flex !important; align-items: center; gap: 6px !important; }
    .table-heading { margin-top: 34px; margin-bottom: 12px; }
    .duplicate-row { grid-template-columns: 1fr 1fr 1fr 190px; }
    .health-alert { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 15px 18px; border: 1px solid rgba(248,92,92,.28); border-radius: var(--r-card); background: rgba(248,92,92,.07); }
    .health-led { width: 30px; height: 30px; display: grid; flex-shrink: 0; place-items: center; border-radius: 50%; background: rgba(248,92,92,.16); }
    .health-led i, .source-led { width: 8px; height: 8px; display: block; border-radius: 50%; background: var(--st-late); box-shadow: 0 0 8px rgba(248,92,92,.6); }
    .health-alert b { display: block; font-size: 14px; font-weight: 600; }
    .health-alert p { margin-top: 2px; color: var(--t2); font-size: 12.5px; }
    .source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .source-box { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
    .source-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
    .source-name { color: var(--t1); font: 12.5px var(--mono); }
    .source-led.ok { background: var(--st-done); box-shadow: 0 0 8px rgba(63,185,132,.6); }
    .source-when { color: var(--t3); font: 11px var(--mono); }
     .empty { padding: 2rem; color: var(--t2); text-align: center; }
     .document-toolbar { display: flex; align-items: end; gap: 16px; margin: 24px 0 16px; }
      .document-toolbar label { display: grid; gap: 6px; color: var(--t2); font-size: 12px; }
      .document-toolbar input, .document-toolbar select { min-width: min(18rem, 100%); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--t1); }
     .document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
     .document-card { min-height: 190px; border: 1px solid rgba(80,70,229,.42); border-radius: var(--r-card); background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.12); transition: border-color .2s, background .2s, transform .2s; }
     .document-card:hover { border-color: var(--blue-bright); background: var(--blue-soft); transform: translateY(-2px); }
     .document-card a { display: flex; min-height: 190px; position: relative; flex-direction: column; gap: 8px; padding: 20px; color: var(--t1); text-decoration: none; }
     .document-icon { width: 44px; height: 44px; object-fit: contain; filter: brightness(0) invert(1); }
     .document-external { position: absolute; top: 18px; right: 18px; color: var(--t2); font-size: 20px; }
     .document-area { color: var(--blue-bright); font: 11px var(--mono); text-transform: uppercase; }
     .document-card strong { color: var(--t1); font-size: 15px; line-height: 1.25; }
      .document-owner, .document-card time { color: var(--t2); font-size: 12px; }
      .document-owner time { display: block; margin-top: 7px; }
     .document-status { margin-top: auto; color: var(--st-late); font-size: 12px; }
     .document-request { color: var(--blue-bright); font-size: 12px; }
      #sugerencias > .wrap > .dashboard-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
      #sugerencias > .wrap > .dashboard-filters > form.filters { display: contents; }
      #sugerencias > .wrap > .dashboard-filters > form.filters > label { display: grid; gap: 6px; min-width: 180px; }
      #sugerencias > .wrap > .dashboard-filters input, #sugerencias > .wrap > .dashboard-filters select { width: 100%; min-width: 0; box-sizing: border-box; }
      #sugerencias > .wrap > .dashboard-filters details > summary { display: none; }
      #sugerencias > .wrap > .dashboard-filters details, #sugerencias > .wrap > .dashboard-filters details .filter-details, #sugerencias > .wrap > .dashboard-filters details:not([open]) .filter-details, #sugerencias > .wrap > .dashboard-filters details .filter-details-inner { display: contents; }
      #sugerencias > .wrap > .dashboard-filters details .filter-details-inner label { display: grid; min-width: 140px; }
      #sugerencias > .wrap > .dashboard-filters .clear-link { align-self: center; }
     .detail-row details { margin-top: 8px; }
     .detail-row details summary { color: var(--t2); cursor: pointer; font-size: 12px; }
     .detail-row pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--t2); font: 12px var(--mono); }
    .notice { margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid rgba(63,185,132,.35); border-radius: .7rem; color: var(--st-done); background: rgba(63,185,132,.08); }
    .notice.error { border-color: rgba(248,92,92,.35); color: var(--st-late); background: rgba(248,92,92,.08); }
     .panel { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
     .muted { color: var(--t2); }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

    /* ── Directorio de equipo — tarjetas + ficha (modal :target, sin JS) ── */
    .team-toolbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
    .team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
    /* color de acento por relación (lo heredan avatar y chip) */
    .rel-interno         { --rel: var(--blue-bright); }
    .rel-direccion       { --rel: var(--st-block); }
    .rel-infraestructura { --rel: var(--st-done); }
    .rel-cliente         { --rel: #4FB6D6; }
    .rel-proveedor       { --rel: var(--st-idle-light); }
    .person-card { display: flex; gap: 14px; width: 100%; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); text-decoration: none; transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
    .person-card:hover, .person-card:focus-visible { border-color: var(--blue-bright); background: var(--surface-2); box-shadow: 0 12px 30px rgba(0,0,0,.2); transform: translateY(-2px); }
    .person-avatar { flex-shrink: 0; width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid color-mix(in srgb, var(--rel, var(--line-2)) 60%, var(--line)); border-radius: 50%; color: var(--t1); font: 600 15px var(--mono); background: color-mix(in srgb, var(--rel, var(--surface-2)) 14%, var(--surface-2)); }
    .person-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
    .person-name { min-width: 0; color: var(--t1); font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .person-chips { margin-top: 6px; }
    .person-meta { margin-top: 6px; color: var(--t2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .person-meta.mono { margin-top: 3px; color: var(--t3); font: 11.5px var(--mono); }
    .relation-chip { display: inline-flex; max-width: 100%; padding: 2px 9px; border: 1px solid color-mix(in srgb, var(--rel, var(--line)) 45%, var(--line)); border-radius: var(--r-pill); color: color-mix(in srgb, var(--rel, var(--t2)) 80%, var(--t1)); font: 10px var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--rel, transparent) 13%, transparent); }

    .person-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
    .person-modal:target { display: flex; }
    .person-modal-backdrop { position: absolute; inset: 0; background: rgba(5,5,8,.62); backdrop-filter: blur(3px); }
    .person-modal-card { position: relative; width: min(468px, 94vw); max-height: 90vh; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--surface); box-shadow: 0 30px 70px rgba(0,0,0,.5); }
    .person-modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
    .person-modal-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    .person-modal-title strong { color: var(--t1); font-size: 16px; font-weight: 700; }
    .person-modal-title .relation-chip { margin-left: 0; align-self: flex-start; }
    .dialog-close { flex-shrink: 0; margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--t2); background: var(--surface-2); text-decoration: none; }
    .dialog-close:hover { color: var(--t1); border-color: var(--line-2); }
    .person-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
    .person-form label { display: grid; gap: 5px; color: var(--t3); font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
    .person-form input, .person-form select { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t1); background: var(--bg); font: 13px var(--sans); }
    .person-form input::placeholder { color: var(--t3); }
    .person-form input:focus-visible, .person-form select:focus-visible { border-color: var(--blue-bright); }
    .person-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 4px; }
    .person-form-actions .action-button { text-decoration: none; }
    .person-baja { padding: 0 20px 18px; }
    .person-baja .action-button { color: var(--st-late); border-color: color-mix(in srgb, var(--st-late) 32%, var(--line)); }
    .person-baja .action-button:hover { color: var(--st-late); border-color: var(--st-late); }
    .person-readonly { display: grid; gap: 14px; padding: 20px; margin: 0; }
    .person-readonly div { display: grid; gap: 3px; }
    .person-readonly dt { color: var(--t3); font: 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
    .person-readonly dd { margin: 0; color: var(--t1); font-size: 13.5px; }

    @media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
     @media (max-width: 940px) { .hero-inner { align-items: flex-start; flex-direction: column; } .period { width: 100%; min-width: 0; } .source-grid { grid-template-columns: repeat(2, 1fr); } .suggestion-row, .duplicate-row { grid-template-columns: 1fr; } .data-header { display: none; } .data-row { gap: 8px; } .actions { justify-content: flex-start; } }
       @media (max-width: 940px) { .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
        @media (max-width: 940px) { #sugerencias > .wrap > .dashboard-filters { align-items: stretch; } #sugerencias > .wrap > .dashboard-filters > form.filters { display: contents; } #sugerencias > .wrap > .dashboard-filters > form.filters > label, #sugerencias > .wrap > .dashboard-filters details .filter-details-inner label { flex: 1 1 180px; } }
       @media (max-width: 640px) { .wrap { padding-inline: 18px; } .nav-inner { flex-wrap: wrap; gap: 10px; padding-block: 12px; } .main-nav { order: 3; width: 100%; margin-left: 0; } .main-nav a { flex: 1; text-align: center; } .user-chip { margin-left: auto; } h1 { font-size: 36px; } .hero h1 .section-label { display: block; margin: 10px 0 0; } .triage { padding-block: 36px; } .triage-row { grid-template-columns: 44px 84px minmax(0, 1fr); } .triage-row .triage-open { grid-column: 3; justify-self: start; margin-top: 4px; } .dashboard-filters { display: block !important; } .dashboard-filters > form.filters { display: block !important; margin-bottom: 10px !important; } .dashboard-filters > form.filters > label, .dashboard-filters details .filter-details-inner label { display: grid; min-width: 0; margin-bottom: 10px; } .dashboard-filters details, .dashboard-filters details .filter-details, .dashboard-filters details .filter-details-inner { display: block; } .filters input[type="search"] { width: 100%; min-width: 0; } .filters label { flex: 1 1 100%; } .filter-toggle { width: 100%; } .results-count { flex-basis: 100%; margin-left: 0; } .source-grid, .document-grid { grid-template-columns: 1fr; } .document-toolbar { align-items: stretch; flex-direction: column; } .detail-hero { align-items: flex-start; flex-direction: column; } .detail-status { justify-content: flex-start; } .detail-grid { grid-template-columns: repeat(2, 1fr); } .detail-form { align-items: stretch; flex-direction: column; } .detail-table { overflow: hidden; } .detail-row { min-width: 0; grid-template-columns: 1fr; } .detail-row.detail-header { display: none; } .detail-row > span { display: block; } .person-form { grid-template-columns: 1fr; } }

    /* ── Responsive de tablas (tablet/celular): evitar columnas fijas que aplastan ── */
    /* Nivel intermedio (≤1100px, p. ej. iPad horizontal o ventana angosta):
       en Backlog las acciones bajan a su propia línea; la tabla SM (6 col) se apila. */
    @media (max-width: 1100px) {
      .backlog-row { grid-template-columns: minmax(0, 1fr) 150px 130px; }
      .backlog-row > :nth-child(4) { grid-column: 1 / -1; }
      .data-header.backlog-row > :nth-child(4) { display: none; }
      .backlog-acciones { width: 100%; }
      .sm-table .data-row { grid-template-columns: 1fr; gap: 6px; }
    }
    /* Nivel compacto (≤860px, celular e iPad vertical): todas las tablas a una columna. */
    @media (max-width: 860px) {
      .data-row { grid-template-columns: 1fr !important; align-items: stretch; gap: 8px; }
      .data-row > :nth-child(4) { grid-column: auto !important; }
      .data-header { display: none !important; }
      .section-header, .triage-header { flex-wrap: wrap; row-gap: 10px; }
      .backlog-form { flex: 1 1 100%; }
      .backlog-form select, .backlog-form .action-button { flex: 1; }
      .team-grid { grid-template-columns: 1fr; }
    }

/* ── Bandeja SM (solicitudes de soporte) ── */
.estado { display: inline-block; padding: .12rem .55rem; border-radius: var(--r-pill);
          font: 11px var(--mono); }
.estado-ticket_creado { color: var(--st-done); background: rgba(63,185,132,.12); }
.estado-ruteada, .estado-recibida { color: var(--blue-bright); background: var(--blue-soft); }
.estado-sin_ruta { color: var(--st-block); background: rgba(232,163,61,.14); }
.estado-error { color: var(--st-late); background: rgba(248,92,92,.12); }
.sm-row-sin_ruta .data-title, .sm-row-error .data-title { color: var(--t1); }
.sm-table .data-row { grid-template-columns: 150px 90px minmax(0,1fr) 120px 110px 120px; }
.sm-detail dl { display: grid; grid-template-columns: 11rem 1fr; gap: .4rem 1rem; margin: 0; }
.sm-detail dt { color: var(--t3); font: 12px var(--mono); }
.sm-detail dd { margin: 0; color: var(--t1); overflow-wrap: anywhere; }
.sm-detail pre.cuerpo { white-space: pre-wrap; padding: .9rem; border: 1px solid var(--line);
          border-radius: var(--r-button); background: var(--bg); color: var(--t2);
          font: 12.5px/1.5 var(--mono); }

/* Tabla simple de la bandeja SM (se conserva su estructura) */
.sm-tabla { width: 100%; border-collapse: collapse; overflow: hidden;
            border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.sm-tabla th, .sm-tabla td { padding: .6rem .85rem; border-bottom: 1px solid var(--line);
            font-size: 13px; text-align: left; }
.sm-tabla th { color: var(--t3); font: 10.5px var(--mono); letter-spacing: .12em;
            text-transform: uppercase; background: rgba(255,255,255,.02); }
.sm-tabla tr:last-child td { border-bottom: 0; }
.sm-tabla a.fila { color: var(--t1); }
.sm-tabla a.fila:hover { color: var(--blue-bright); }
.sm-tabla tr.atencion td { background: rgba(232,163,61,.08); }
.sm-tabla tr.fallo td { background: rgba(248,92,92,.08); }
.vacio { padding: 2.4rem; border: 1px dashed var(--line); border-radius: var(--r-card);
         background: var(--surface); color: var(--t2); text-align: center; }

/* ===== Layout con sidebar lateral (colores de marca Edgebound) ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; align-self: flex-start; width: 256px; height: 100vh;
  flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; padding: 22px 16px;
  border-right: 1px solid var(--line); background: var(--bg-2); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.sidebar-brand img { height: 26px; width: auto; }
.sidebar-brand b { font-size: 14px; font-weight: 700; color: var(--t1); }
.sidebar-brand small { display: block; margin-top: 1px; color: var(--t3); font: 9px var(--mono); letter-spacing: .18em; }
.sidebar-section { margin-top: 8px; padding: 0 10px 6px; color: var(--t3);
  font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid transparent; border-radius: var(--r-button); color: var(--t2);
  font: 600 13px var(--sans); transition: all .18s var(--ease); }
.sidebar-nav a .nav-icono { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar-nav a:hover { color: var(--t1); background: var(--surface-2); }
.sidebar-nav a:hover .nav-icono,
.sidebar-nav a[aria-current="page"] .nav-icono { opacity: 1; }
.sidebar-nav a[aria-current="page"] { color: #fff; background: var(--blue); border-color: var(--blue); }
/* Grupo anidado (Operaciones → Backlog · Equipo · Duplicados), colapsable sin JS */
.nav-group { display: flex; flex-direction: column; }
.nav-summary { display: flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; }
.nav-summary::-webkit-details-marker { display: none; }
.nav-summary .nav-parent { flex: 1; min-width: 0; }
.nav-caret { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-button); color: var(--t3); }
.nav-caret .nav-icono { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.nav-summary:hover .nav-caret { color: var(--t1); background: var(--surface-2); }
.nav-group[open] > .nav-summary .nav-icono-caret { transform: rotate(180deg); }
.nav-children { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 21px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  padding-inline: 10px; color: var(--t2); font: 11px var(--mono); }
.sidebar-foot a { color: var(--blue-bright); }
.app-main { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { padding: 0 8px; }
  .sidebar-section { display: none; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0 8px; border-top: 0; }
}

/* Panel de herramientas de Operaciones (acciones manuales agrupadas) */
.tool-group { margin-bottom: 22px; }
.tool-group-title { margin-bottom: 11px; }
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-card { display: flex; flex-direction: column; min-height: 150px; margin: 0; padding: 16px; border: 1px solid var(--line-2); border-top: 3px solid var(--st-idle-light); border-radius: var(--r-card); background: var(--surface); transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.tool-card:hover { border-color: var(--line-2); background: var(--surface-2); box-shadow: 0 12px 30px rgba(0,0,0,.18); transform: translateY(-2px); }
.tool-card.t-sync { border-top-color: var(--blue); }
.tool-card.t-jira { border-top-color: var(--st-done); }
.tool-card.t-data { border-top-color: var(--st-block); }
.tool-card-name { color: var(--t1); font: 700 14px var(--sans); letter-spacing: -.01em; }
.tool-card-desc { flex: 1; margin: 8px 0 14px; color: var(--t2); font-size: 12.5px; line-height: 1.5; }
.tool-card .action-button { align-self: flex-start; }
@media (max-width: 940px) { .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tool-cards { grid-template-columns: 1fr; } }

/* Automatización · SLA (change agregar-automatizacion-sla) */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 16px; }
.form-grid label, .form-inline label { display: flex; flex-direction: column; gap: 6px; color: var(--t2); font-size: 12px; }
.form-grid input, .form-grid select, .form-inline input, .form-inline select { box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t1); background: var(--bg); font: 13px var(--mono); }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Matriz de I y U (change agregar-matriz-impacto-urgencia) ── */
.iyu-matrix { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 1px; max-width: 480px; margin: 14px 0 6px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--line); }
.iyu-matrix > div { padding: 11px 14px; background: var(--surface); font: 12px var(--mono); color: var(--t2); text-align: center; }
.iyu-matrix .iyu-head { color: var(--t3); text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; background: rgba(255,255,255,.02); }
.iyu-matrix .iyu-rowlabel { color: var(--t1); font-weight: 600; text-align: left; }
.iyu-matrix .iyu-critico { color: var(--st-late); background: rgba(248,92,92,.12); font-weight: 600; }
.iyu-matrix .iyu-alto { color: var(--st-block); background: rgba(232,163,61,.12); }
.iyu-matrix .iyu-medio { color: var(--blue-bright); background: var(--blue-soft); }
.iyu-matrix .iyu-bajo { color: var(--t3); }
.escenario-row { grid-template-columns: 112px minmax(0, 1fr) 112px 132px 84px 66px; }
a.escenario-row { text-decoration: none; color: inherit; }
a.escenario-row:hover { background: var(--surface-2); }
.escenario-row.inactivo { opacity: .48; }
.escenario-row > span { min-width: 0; }
.escenario-cap { color: var(--t3); font: 11px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escenario-nom { display: block; color: var(--t1); font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escenario-sub { margin-top: 3px; color: var(--t3); font: 11px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sev-pill { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-chip); font: 11px var(--mono); }
.sev-critico { border-color: rgba(248,92,92,.45); color: var(--st-late); background: rgba(248,92,92,.1); }
.sev-alto { border-color: rgba(232,163,61,.45); color: var(--st-block); background: rgba(232,163,61,.1); }
.sev-medio { border-color: rgba(138,124,255,.45); color: var(--blue-bright); background: var(--blue-soft); }
.sev-bajo { color: var(--t3); }
@media (max-width: 980px) { .escenario-row { grid-template-columns: 104px minmax(0,1fr) 84px 64px; } .escenario-row > .col-hide { display: none; } }
.form-grid textarea { box-sizing: border-box; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-button); color: var(--t1); background: var(--bg); font: 13px var(--mono); resize: vertical; }

/* ── Semáforo de Estado-SLA (change ajustar-vistas-severidad-y-sla) ── */
.sla-chip { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: var(--r-chip); font: 10.5px var(--mono); vertical-align: middle; }
.sla-a_tiempo { border-color: rgba(76,175,112,.45); color: var(--st-done); background: rgba(76,175,112,.1); }
.sla-por_vencer { border-color: rgba(232,163,61,.45); color: var(--st-block); background: rgba(232,163,61,.1); }
.sla-vencido { border-color: rgba(248,92,92,.45); color: var(--st-late); background: rgba(248,92,92,.1); }
