:root {
  --green: #153e36;
  --green-2: #215e50;
  --mint: #e7efea;
  --paper: #f5f6f3;
  --ink: #223b35;
  --muted: #6d7b73;
  --line: #dce3dc;
  --accent: #d6ed8d;
  --white: #fff;
  --red: #a03930;
  --amber: #9b6418;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.form-errors {
  border: 2px solid var(--red);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--white);
}
.form-errors h3, .field-error {
  color: var(--red);
}
.field-error {
  margin: .25rem 0;
  font-weight: 600;
}
[aria-invalid="true"] {
  border: 2px solid var(--red);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 10px 15px;
  font-weight: 600;
  color: var(--ink);
}
button:hover {
  background: var(--mint);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover {
  background: var(--green-2);
}
button.quiet {
  background: transparent;
  border-color: transparent;
}
button.danger {
  color: var(--red);
}
a {
  color: var(--green-2);
}
:focus-visible {
  outline: 3px solid #5c9674;
  outline-offset: 3px;
}
.skip-content {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: white;
  border: 2px solid var(--green);
  border-radius: 8px;
  transform: translateY(-180%);
}
.skip-content:focus {
  transform: translateY(0);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.15;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 13px;
  line-height: 1.6;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-bottom: 16px;
}
.wordmark {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
}
.wordmark-dot {
  color: var(--accent);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  margin-top: 7px;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: auto;
  margin-right: 8px;
  accent-color: var(--green);
}
.check-label {
  display: flex;
  align-items: center;
  font-weight: 400;
  margin: 8px 0;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--green);
  color: white;
  padding: 64px max(40px, 12%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.login-story .wordmark {
  margin-bottom: 60px;
}
.login-story .eyebrow {
  color: var(--accent);
}
.login-story h1 {
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -3px;
}
.login-story p:not(.eyebrow) {
  font-size: 17px;
  color: #b9cec2;
  max-width: 370px;
  line-height: 1.6;
}
.login-line {
  width: 100%;
  height: 1px;
  background: #416155;
  margin: 30px 0;
}
.muted-light {
  color: #b9cec2;
  font-size: 12px;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-card {
  width: 100%;
  max-width: 370px;
}
.login-card .muted {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.login-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--green);
  color: white;
  padding: 35px 22px;
  display: flex;
  flex-direction: column;
}
.sidebar .wordmark {
  padding: 0 14px;
  font-size: 24px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.sidebar-subtitle {
  font-size: 9px;
  letter-spacing: 1.1px;
  color: #a0beaf;
  margin: 15px 14px 45px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-button {
  text-align: left;
  color: #bed1c5;
  background: transparent;
  border-color: transparent;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  gap: 12px;
}
.nav-button:hover,
.nav-button.active {
  background: #2e5548;
  color: white;
}
.nav-icon {
  width: 20px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 50px 14px 0;
  font-size: 11px;
  color: #b3c7bb;
}
.connection-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}
.topbar {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  font-size: 12px;
  color: var(--muted);
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar #user-name {
  font-weight: 600;
  color: var(--ink);
}
.content {
  padding: 38px 40px;
  max-width: 1500px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 32px;
}
.page-heading h1 {
  margin-bottom: 10px;
}
.page-heading p {
  font-size: 14px;
  margin-bottom: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  margin: 0;
  width: auto;
  min-width: 140px;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.stat-number {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -1.5px;
}
.stat-caption {
  font-size: 11px;
  margin-top: 9px;
  color: var(--muted);
}
.stat.focus {
  background: var(--mint);
  border-color: #b9d0be;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 22px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.card-header h2,
.card-header h3 {
  margin: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  white-space: nowrap;
}
td {
  padding: 17px 12px;
  border-bottom: 1px solid #edf0eb;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 8px;
  background: #eef1ed;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.badge.closed,
.badge.effective {
  color: #32654b;
  background: #e5f1e4;
}
.badge.review,
.badge.validation {
  color: var(--amber);
  background: #fcf1da;
}
.badge.exception {
  color: var(--red);
  background: #f8e7e4;
}
.table-title {
  font-weight: 600;
  color: var(--ink);
}
.table-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
#attention-records td small {
  display: block;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}
.question {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.question:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.required {
  color: var(--red);
}
.section-editor {
  background: #f7f9f6;
  border: 1px solid var(--line);
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 8px;
}
.question-editor {
  background: white;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 15px 0;
}
.section-editor .toolbar {
  justify-content: space-between;
}
.progress-track {
  height: 7px;
  background: var(--mint);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-top: 8px;
}
.progress-fill {
  background: var(--green-2);
  height: 100%;
}
.event-item {
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.event-item time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
footer {
  font-size: 11px;
  color: var(--muted);
  padding: 0 40px 30px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(850px, 95vw);
  max-height: 90vh;
  padding: 28px;
  box-shadow: 0 20px 80px #153e3626;
}
dialog::backdrop {
  background: #153e366b;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.dialog-head h2 {
  margin: 0;
}
#notices {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  max-width: 420px;
}
.notice {
  padding: 16px 22px;
  border-radius: 8px;
  color: white;
  background: var(--green);
  box-shadow: 0 5px 20px #0002;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.notice.error {
  background: var(--red);
}
@media (max-width: 1050px) {
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 12px;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 35px;
  }
  .login-story .wordmark {
    margin-bottom: 25px;
  }
  .login-story h1 {
    font-size: 40px;
  }
  .login-line,
  .muted-light {
    display: none;
  }
  .login-panel {
    padding: 35px 25px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    padding: 12px 16px;
  }
  .sidebar .wordmark {
    font-size: 28px;
    padding: 0;
  }
  .sidebar-subtitle,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 2px;
    margin-top: 10px;
  }
  .nav-button {
    padding: 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-icon {
    display: none;
  }
  .topbar {
    height: 60px;
    padding: 0 18px;
  }
  .topbar > span {
    display: none;
  }
  .topbar > div {
    width: 100%;
    justify-content: space-between;
  }
  .content {
    padding: 25px 18px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .grid-stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat-number {
    font-size: 30px;
  }
  .card {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  dialog {
    padding: 20px;
  }
  footer {
    padding: 0 18px 25px;
  }
}

.dialog-notices {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 18px;
}
.dialog-notices .notice {
  box-shadow: none;
}

.commitment-filters {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:22px;align-items:end}
.commitment-filters label {display:flex;flex-direction:column;gap:7px;font-size:.85rem;color:var(--muted)}
.commitment-filters .commitment-overdue {flex-direction:row;align-items:center;padding:12px 0}
.commitment-overdue input {width:auto}
.commitment-board {display:grid;grid-template-columns:repeat(5,minmax(220px,1fr));gap:14px;overflow-x:auto;padding-bottom:14px}
.commitment-column {background:#f3f6f4;border-radius:12px;padding:12px;min-height:200px}
.commitment-column h3 {font-size:.9rem;margin:0 0 14px}
.commitment-card {background:white;border:1px solid #dce5df;border-radius:10px;padding:14px;margin-bottom:12px;display:grid;gap:9px}
.commitment-title {text-align:left;padding:0;background:transparent;border:0;font-weight:600;color:#183d38;line-height:1.5;white-space:normal}
.commitment-title:hover {text-decoration:underline}
.toolbar button[aria-pressed="true"] {background:#dcebe1;color:#183d38}

.content, .card {min-width:0}
.commitment-filters label {margin-bottom:0}
.commitment-filters input, .commitment-filters select {margin-top:0;min-width:0}
.commitment-card .hint, .commitment-title {overflow-wrap:anywhere}

.saved-view-toolbar {display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.saved-view-toolbar label {margin:0;flex:1;min-width:180px;max-width:320px}

#personal-view-history {margin-top:24px}

.form-library-tabs {display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.form-library-tabs [aria-pressed="true"] {background:var(--mint);color:var(--green)}
#library-search {max-width:320px}

.form-library-header {flex-wrap:wrap;gap:16px}
.form-library-header h2 {white-space:nowrap}
.form-library-header #library-search {flex:1;min-width:180px}

#sharing-history {margin-top:24px}

#sharing-selected fieldset {min-width:0;margin:0;padding:16px;border:1px solid var(--line);border-radius:8px}
#sharing-selected legend {font-weight:600;padding:0 6px}
#sharing-selected {gap:16px;margin-bottom:20px}

/* Selección de campos de exportación en computador y tablet. */
.export-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1rem;
}
.export-column-grid .checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .35rem 0;
}
@media (max-width: 600px) {
  .export-column-grid { grid-template-columns: 1fr; }
}

.session-loading { padding: 2rem; text-align: center; color: var(--muted); }

.personal-panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.personal-panel-grid h3 { margin-top: 0; }
.panel-states { padding-left: 20px; }
.panel-editor-list { margin-top: 16px; }

.answer-group {
  min-width: 0;
  margin-inline: 0;
  padding-inline: 0;
  padding-bottom: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}
.answer-group legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  margin-bottom: 12px;
}
.answer-group th[scope="row"] {
  white-space: normal;
  font-size: 13px;
  letter-spacing: normal;
  color: var(--ink);
  font-weight: 400;
  padding: 17px 12px;
}
.answer-group select { min-width: 130px; }

[data-reference-choice][hidden] { display: none; }
[data-reference-list] { max-height: 18rem; overflow-y: auto; }

[data-reference-field] [hidden] { display: none !important; }

.assignee-picker { min-width: 0; position: relative; }
.assignee-input-row { display: flex; gap: 6px; align-items: center; }
.assignee-input-row input { min-width: 0; flex: 1; }
.assignee-input-row button { min-width: 44px; min-height: 44px; }
.assignee-native { display: none; }
.assignee-picker [hidden] { display: none !important; }
[data-assignee-suggestions] { max-height: 16rem; overflow-y: auto; border: 1px solid var(--border, #ccd7d1); border-radius: 8px; background: #fff; margin-top: 4px; }
[data-assignee-option] { display: block; width: 100%; min-height: 48px; text-align: left; white-space: normal; overflow-wrap: anywhere; border: 0; border-radius: 0; }
[data-assignee-option]:hover, [data-assignee-option].is-active { background: #e8f2ec; }
@media (max-width: 700px) {
  .assignee-picker [role="combobox"] { font-size: 16px; }
  [data-assignee-suggestions] { max-height: 13rem; }
}

.selected-members { display: grid; gap: 8px; margin-top: 8px; }
.selected-member { display: flex; align-items: center; gap: 8px; padding: 8px; background: #edf4f0; border-radius: 8px; min-width: 0; }
.selected-member span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.selected-member button { min-height: 44px; flex-shrink: 0; }
.member-picker { min-width: 0; }

.inspection-assignment-summary { margin-top: 8px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.inspection-assignment-summary strong { font-weight: 600; }

[data-inline-finding] { margin-top: 10px; }
[data-inline-finding][hidden] { display: none; }
.inline-report-finding { min-height: 44px; white-space: normal; }

.deadline-result { background: #edf5f0; border: 1px solid #a6c4b3; border-left: 4px solid #396c55; border-radius: 8px; padding: 14px; margin: 12px 0; overflow-wrap: anywhere; }
.deadline-result h4 { margin: 0 0 8px; }
.deadline-result p { margin: 8px 0; }
.deadline-result.deadline-error { background: #fff0ee; border-color: #b95344; }

.catalog-kind-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.catalog-kind-summary span { padding: 7px 10px; background: var(--mint); border-radius: 6px; font-size: 13px; overflow-wrap: anywhere; }


.inbox-anchor { position: relative; }
.inbox-toggle { position: relative; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.inbox-count { position: absolute; top: 0; right: 0; background: #ad2929; color: white; border-radius: 12px; padding: 2px 5px; font-size: 11px; }
.inbox-panel { position: absolute; top: calc(100% + 8px); right: 0; width: min(440px, calc(100vw - 32px)); max-height: min(72vh, 680px); overflow-y: auto; background: #fff; color: #193d34; border: 1px solid #cad8d1; border-radius: 12px; box-shadow: 0 8px 30px #0003; z-index: 100; padding: 16px; text-align: left; }
.inbox-panel[hidden], .inbox-count[hidden] { display: none; }
.inbox-head, .inbox-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inbox-head { justify-content: space-between; }
.inbox-head h2 { margin: 0; font-size: 19px; }
.inbox-panel button { min-height: 44px; white-space: normal; }
.inbox-item { border-top: 1px solid #d9e3de; padding: 14px 10px; overflow-wrap: anywhere; }
.inbox-item p { margin: 6px 0; }
.inbox-unread { background: #edf5ef; border-left: 3px solid #447653; }
@media (max-width: 700px) {
  .inbox-panel { position: fixed; top: 76px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 100px); }
}
