.view-page { min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 2px 0 17px; }
.eyebrow { margin: 0 0 7px; color: #788a91; font-size: 8px; font-weight: 750; letter-spacing: .13em; }
.eyebrow-sep { padding: 0 4px; color: #c0cacc; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; color: #183540; font-size: clamp(26px, 3vw, 34px); font-weight: 680; letter-spacing: -.06em; line-height: 1.08; }
h2 { margin-bottom: 5px; color: #213c47; font-size: 14px; font-weight: 660; letter-spacing: -.035em; }
h3 { margin-bottom: 5px; color: #344d57; font-size: 11px; font-weight: 660; }
.heading-copy { margin: 0; color: #76868e; font-size: 10px; line-height: 1.6; }
.step-chip { display: inline-flex; min-width: 62px; min-height: 27px; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; border: 1px solid #e1e9ea; border-radius: 6px; background: #fff; color: #4a726d; font-size: 9px; font-weight: 700; white-space: nowrap; }
.step-chip span { color: #99a5aa; font-size: 8px; font-weight: 500; }
.step-chip-pending { color: #9b773e; }

.button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; font-size: 9px; font-weight: 650; cursor: pointer; transition: .16s ease; white-space: nowrap; }
.button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.button-primary { background: var(--navy); color: #fff; box-shadow: 0 3px 8px rgba(17,45,57,.11); }
.button-primary:hover:not(:disabled) { background: var(--navy-2); transform: translateY(-1px); }
.button-secondary { border-color: #dce6e8; background: #fff; color: #3f5a64; }
.button-secondary:hover:not(:disabled) { border-color: #a9ccc6; background: #f6fbfa; color: var(--teal-dark); }
.button-quiet { min-height: 30px; border-color: #e4eaec; background: #fff; color: #72828a; font-size: 8px; }
.button-quiet:hover:not(:disabled) { border-color: #ccd9dc; background: #f9fbfb; }
.button-disabled, .button:disabled { border-color: #e7ebed; background: #f1f3f4; color: #9ba6aa; box-shadow: none; cursor: not-allowed; }
.form-actions, .view-actions, .source-actions, .action-group, .mapping-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.view-actions { margin-top: 16px; padding-top: 13px; border-top: 1px solid #edf0f1; }
.action-group { justify-content: flex-end; }
.form-footnote, .small-note { color: #89979d; font-size: 8px; line-height: 1.55; }
.small-note { margin: 9px 0 0; }

.view-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.card-heading h2 { margin: 0 0 4px; }
.card-heading p { margin: 0; color: #8c999e; font-size: 8px; line-height: 1.5; }
.card-heading > .status-label { flex: 0 0 auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 13px; }
.metric-card { min-width: 0; min-height: 85px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfd; }
.metric-card small { display: block; color: #829198; font-size: 8px; }
.metric-card strong { display: block; overflow: hidden; margin-top: 8px; color: #29434e; font-size: 20px; font-weight: 670; letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; }
.metric-card span { display: block; margin-top: 4px; color: #98a4a9; font-size: 8px; line-height: 1.4; }
.metric-card p { margin: 6px 0 0; color: #85939a; font-size: 8px; }
.metric-card .metric-icon { float: right; color: #4b8c83; }
.metric-card .metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.callout { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 13px; padding: 10px 12px; border: 1px solid; border-radius: 8px; }
.callout p { margin: 0; font-size: 8px; line-height: 1.6; }
.callout-gold { border-color: #ebdfc8; background: #fcf8ef; color: #766242; }
.callout-blue { border-color: #dce7ef; background: #f5f9fc; color: #5d7486; }
.callout-teal { border-color: #d8e9e5; background: #f3faf8; color: #55796f; }
.callout-rose { border-color: #ecdede; background: #fcf6f6; color: #885f60; }
.callout-mark { display: grid; width: 16px; height: 16px; flex: 0 0 16px; place-items: center; border-radius: 50%; background: rgba(0,0,0,.055); color: currentColor; font-family: Georgia, serif; font-size: 10px; font-weight: 700; }
.status-label { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; border-radius: 5px; font-size: 7px; font-weight: 700; letter-spacing: .035em; white-space: nowrap; }
.status-pending { background: var(--gold-light); color: #9d7439; }
.status-readonly { background: #f0f3f4; color: #74838a; }
.status-ready { background: var(--green-light); color: #397b62; }
.tag { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 4px; background: #f0f3f4; color: #6e8088; font-size: 7px; font-weight: 650; }
.type-pill { display: inline-flex; max-width: 100%; padding: 3px 6px; border-radius: 4px; background: #edf3f8; color: #5b7790; font-size: 7px; white-space: nowrap; }
.type-pill.numérica, .type-pill.numeric { background: #e9f5f2; color: #36796f; }
.type-pill.fecha { background: #f6f1e8; color: #9a7840; }
.type-pill.sin-datos { background: #f0f2f3; color: #7c898f; }

.table-wrap { overflow: auto; border: 1px solid #edf0f1; border-radius: 6px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.data-table thead { background: #f7f9fa; }
.data-table th { padding: 8px 10px; color: #829097; font-size: 7px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.data-table td { max-width: 230px; overflow: hidden; padding: 8px 10px; border-top: 1px solid #edf0f1; color: #60747d; font-size: 8px; text-overflow: ellipsis; }
.data-table td:first-child { color: #3b545e; font-weight: 620; }
.empty-message { padding: 18px; color: #87959b; font-size: 9px; text-align: center; }
.inline-note { margin-top: 11px; padding: 10px; border-radius: 6px; font-size: 8px; line-height: 1.5; }
.inline-note.info { background: var(--blue-light); color: #5b7790; }
.inline-note.warning { background: var(--gold-light); color: #8b703f; }
.inline-note.success { background: var(--green-light); color: #457963; }
.source-strip { display: flex; min-height: 40px; align-items: center; gap: 9px; margin-bottom: 12px; padding: 8px 10px; border: 1px solid #e4eaec; border-radius: 7px; background: #fff; }
.source-strip-icon { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 5px; background: var(--teal-light); color: var(--teal); font-size: 7px; font-weight: 750; }
.source-strip strong { overflow: hidden; color: #50666f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.source-strip-detail { margin-left: auto; color: #89969c; font-size: 8px; white-space: nowrap; }
.case-context { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #e3ebe9; border-radius: 7px; background: #f9fcfb; }
.context-tag { flex: 0 0 auto; padding: 4px 6px; border-radius: 4px; background: var(--teal-light); color: #327a72; font-size: 7px; font-weight: 700; }
.case-context strong { flex: 0 0 auto; color: #425a63; font-size: 8px; }
.context-question { overflow: hidden; color: #829096; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.compact-context { margin-bottom: 10px; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .step-chip { align-self: flex-start; }
  .metric-grid { gap: 7px; }
  .metric-card { min-height: 76px; padding: 9px; }
  .metric-card strong { font-size: 18px; }
  .view-card { padding: 12px; }
  .card-heading { align-items: flex-start; }
  .source-strip { flex-wrap: wrap; }
  .source-strip-detail { width: 100%; margin-left: 33px; }
  .case-context { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
  .context-question { width: 100%; white-space: normal; }
  .view-actions, .form-actions { align-items: flex-start; flex-direction: column; }
  .action-group { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .view-actions > .button, .action-group .button { min-height: 34px; }
}
