:root {
  --canvas: #edf1ef;
  --surface: #fbfcfb;
  --surface-strong: #ffffff;
  --surface-muted: #f3f6f4;
  --glass: rgba(249, 251, 250, .88);
  --glass-strong: rgba(251, 252, 251, .94);
  --ink: #18211e;
  --ink-soft: #4b5752;
  --ink-muted: #6d7973;
  --line: #cbd3ce;
  --line-soft: #dde3df;
  --green: #173c35;
  --green-2: #214b43;
  --cobre: #91611f;
  --cobre-soft: #f4ead9;
  --clay: #a44339;
  --clay-soft: #f7e6e3;
  --ok: #32664d;
  --ok-soft: #e5f0e9;
  --info: #45677d;
  --info-soft: #e7eef2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --radius-sm: 4px;
  --radius-md: 6px;
  --side-width: 224px;
  --top-height: 74px;
  --shadow-float: 0 12px 28px rgba(24, 33, 30, .1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0;
}

:focus-visible {
  outline: 2px solid #1d6f5d;
  outline-offset: 2px;
}

.sr-only,
.svg-sprite {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, 1fr);
}

.side {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 10px 14px;
  border-right: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(108%);
  -webkit-backdrop-filter: blur(16px) saturate(108%);
}

.brand {
  height: var(--top-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand-mark {
  width: 8px;
  height: 8px;
  border: 2px solid var(--cobre);
  border-radius: 50%;
}

.brand-caption {
  margin: -12px 8px 0;
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 3px;
}

.nav a {
  min-height: 40px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 13.5px;
}

.nav a:hover {
  background: rgba(231, 237, 233, .75);
  color: var(--ink);
}

.nav a.active {
  border-left-color: var(--green);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 650;
}

.nav a.muted {
  color: #88928d;
  cursor: default;
}

.nav a.muted:hover {
  background: transparent;
  color: #88928d;
}

.side .pill {
  min-width: 20px;
  padding: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: right;
}

.side-foot {
  margin-top: auto;
  padding: 12px 8px 2px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-muted);
  font-size: 11px;
}

.drawer-scrim {
  display: none;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--top-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(16px) saturate(108%);
  -webkit-backdrop-filter: blur(16px) saturate(108%);
}

.mobile-menu,
.mobile-brand {
  display: none;
}

.page-heading {
  min-width: 0;
}

.topbar h1 {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 680;
  line-height: 1.2;
}

.topbar .sub {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  width: 100%;
  max-width: 1480px;
  padding: 18px 20px 28px;
}

.org {
  display: flex;
  align-items: center;
  gap: 10px;
}

.org .label {
  margin-bottom: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.org-chip {
  max-width: 280px;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  font-size: 12.5px;
}

.org-chip b {
  overflow: hidden;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-initials {
  display: none;
}

.org-switch {
  min-width: 116px;
}

.org-switch a {
  color: var(--cobre);
  font-size: 11.5px;
  font-weight: 600;
}

.org-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kpis {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.kpi {
  min-width: 150px;
  padding: 12px 16px;
  border-right: 1px solid var(--line-soft);
}

.kpi:last-child {
  border-right: 0;
}

.kpi .n {
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 650;
  line-height: 1.1;
}

.kpi .t {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 11.5px;
}

.card {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.card .hd {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.card .hd h3 {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 680;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

td {
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

tr.row:hover {
  background: #f4f7f5;
  cursor: pointer;
}

tr.row:focus-visible {
  position: relative;
  outline: 2px solid #1d6f5d;
  outline-offset: -2px;
}

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--ink-muted);
}

.status-dot.critical {
  color: var(--clay);
}

.status-dot.neutral {
  color: var(--info);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 11.5px;
}

.badge,
.chk-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
}

.badge.estado,
.chk-state.cumplido {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.rev,
.chk-state.pendiente {
  background: var(--cobre-soft);
  color: #7f5319;
}

.sev-alta {
  background: var(--clay-soft);
  color: var(--clay);
}

.sev-media {
  background: var(--cobre-soft);
  color: #7f5319;
}

.sev-baja,
.chk-state.no_aplica {
  background: #e9eeeb;
  color: var(--ink-soft);
}

.dot-alta {
  color: var(--clay);
}

.dot-media {
  color: var(--cobre);
}

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 620;
  cursor: pointer;
}

.btn:hover {
  border-color: #aeb9b2;
  background: var(--surface-muted);
}

.btn.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.btn.primary:hover {
  border-color: var(--green-2);
  background: var(--green-2);
}

.btn.cobre {
  border-color: var(--cobre);
  background: var(--cobre);
  color: #fff;
}

.btn.cobre:hover {
  border-color: #7f5319;
  background: #7f5319;
}

.btn.danger {
  border-color: #d5aaa5;
  color: var(--clay);
}

.btn.danger:hover {
  background: var(--clay-soft);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 9px;
}

.detail-head .meta .m .k {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.detail-head .meta .m .v {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 620;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.section-t {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.block {
  margin-bottom: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.block p {
  margin: .4em 0;
}

.ev {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}

.ev:last-child {
  border-bottom: 0;
}

.tag-ext {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--clay-soft);
  color: var(--clay);
  font-size: 10px;
  font-weight: 650;
}

.find {
  margin-bottom: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.find.alta {
  border-left-color: var(--clay);
}

.find.media {
  border-left-color: var(--cobre);
}

.find.baja {
  border-left-color: #8a9790;
}

.find .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.find .top h4 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 680;
}

.find .src {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-muted);
  font-size: 11.5px;
}

.find .src b {
  color: var(--ink);
}

.origin {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 720;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.origin.regla {
  background: var(--ok-soft);
  color: var(--ok);
}

.origin.ia {
  background: var(--info-soft);
  color: var(--info);
}

.conf {
  color: var(--ink-muted);
  font-size: 10.5px;
}

.find .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.find .acts button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 11px;
  cursor: pointer;
}

.find .acts button:hover {
  background: var(--surface-muted);
}

.find.decided {
  opacity: .68;
}

.deci {
  font-size: 10.5px;
  font-weight: 650;
}

.deci.ace {
  color: var(--ok);
}

.deci.des {
  color: var(--ink-muted);
}

.actionbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.note {
  color: var(--ink-muted);
  font-size: 11.5px;
}

.banner {
  margin-bottom: 16px;
  padding: 9px 12px;
  border: 1px solid #dfc99f;
  border-left: 3px solid var(--cobre);
  border-radius: var(--radius-sm);
  background: var(--cobre-soft);
  color: #704916;
  font-size: 12px;
}

.banner.ok {
  border-color: #bcd3c6;
  border-left-color: var(--ok);
  background: var(--ok-soft);
  color: var(--green);
}

input[type="text"].motivo {
  width: min(100%, 300px);
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  font-family: var(--sans);
  font-size: 12px;
}

.crumb {
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 11.5px;
}

.crumb a {
  color: var(--cobre);
  font-weight: 600;
}

.prog {
  width: 110px;
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
}

.prog span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--cobre);
}

.field {
  margin-bottom: 13px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  outline: 0;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

.field textarea.tall {
  min-height: 150px;
}

.field .hint {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10.5px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
}

.matrix th,
.matrix td {
  vertical-align: top;
}

.ia-draft {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #c8d7df;
  border-left: 3px solid var(--info);
  border-radius: var(--radius-sm);
  background: var(--info-soft);
}

.ia-draft .cite {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #c8d7df;
  color: var(--info);
  font-size: 11px;
}

.ia-draft pre {
  margin: 7px 0 0;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.steps a,
.steps span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.steps a:hover {
  color: var(--ink);
}

.steps .on {
  border-bottom-color: var(--green);
  color: var(--ink);
  font-weight: 680;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .side,
  .topbar {
    background: var(--surface-strong);
  }
}

@media (max-width: 1080px) {
  :root {
    --side-width: 196px;
  }

  .content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .org-switch {
    display: none;
  }

  .cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --top-height: 50px;
  }

  .layout {
    display: block;
  }

  .side {
    position: fixed;
    top: var(--top-height);
    bottom: 0;
    left: 0;
    z-index: 100;
    width: min(82vw, 300px);
    height: auto;
    padding-top: 12px;
    box-shadow: var(--shadow-float);
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .side.open {
    transform: translateX(0);
  }

  .side .brand,
  .side .brand-caption {
    display: none;
  }

  .nav a {
    min-height: 46px;
  }

  .drawer-scrim {
    position: fixed;
    inset: var(--top-height) 0 0;
    z-index: 90;
    display: block;
    border: 0;
    background: rgba(18, 25, 22, .34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .drawer-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    min-height: auto;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 10px 10px;
  }

  .mobile-menu {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
  }

  .mobile-brand {
    height: var(--top-height);
    display: flex;
    align-items: center;
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 600;
  }

  .page-heading {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 4px 4px 0;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .topbar .sub {
    white-space: normal;
  }

  .org {
    grid-column: 3;
    grid-row: 1;
  }

  .org > div:first-child {
    display: flex;
  }

  .org .label,
  .org-switch {
    display: none;
  }

  .org-chip {
    width: 38px;
    min-height: 34px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    border-radius: 50%;
  }

  .org-chip b {
    display: none;
  }

  .org-initials {
    display: inline;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
  }

  .content {
    padding: 12px 10px 22px;
  }

  .kpis {
    margin-bottom: 12px;
  }

  .kpi {
    min-width: 50%;
    flex: 1 1 50%;
    padding: 10px 12px;
  }

  .card .hd {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
  }

  table {
    min-width: 720px;
  }

  .work-table {
    min-width: 0;
  }

  .work-table thead {
    display: none;
  }

  .work-table,
  .work-table tbody,
  .work-table tr,
  .work-table td {
    width: 100%;
    display: block;
  }

  .work-table tr {
    position: relative;
    padding: 11px 42px 11px 12px;
    border-bottom: 1px solid var(--line);
  }

  .work-table tr:last-child {
    border-bottom: 0;
  }

  .work-table td {
    min-height: 0;
    padding: 2px 0;
    border: 0;
  }

  .work-table td::before {
    content: attr(data-label);
    width: 76px;
    display: inline-block;
    color: var(--ink-muted);
    font-size: 10.5px;
  }

  .work-table td:nth-child(2) {
    margin-bottom: 6px;
    padding-right: 0;
  }

  .work-table td:nth-child(2)::before,
  .work-table .work-priority::before {
    display: none;
  }

  .work-table .work-priority {
    position: absolute;
    top: 14px;
    right: 14px;
    width: auto;
  }

  .work-table td:nth-child(2) b {
    font-family: var(--mono);
    font-size: 12px;
  }

  .work-table td:nth-child(7) {
    position: absolute;
    right: 12px;
    bottom: 11px;
    width: auto;
  }

  .work-table td:nth-child(7)::before {
    display: none;
  }

  .detail-head {
    flex-direction: column;
  }

  .detail-head .meta {
    gap: 14px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .ev {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .actionbar {
    align-items: stretch;
    flex-direction: column;
  }

  .actionbar .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
