:root {
  --tfs-green: #005F4E;
  --tfs-silver: #8C969D;
  --bg: #f3f5f7;
  --surface: #fff;
  --surface-muted: #f7f8fa;
  --text: #1d2939;
  --muted: #667085;
  --border: #dfe3e8;
  --primary: var(--tfs-green);
  --primary-hover: #004236;
  --sidebar: #111111;
  --sidebar-text: #d0d5dd;
  --focus: rgba(22, 78, 99, .18);
  --warning: #9a6700;
  --warning-bg: #fff8c5;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  overflow-x: hidden;
  max-width: 100vw;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

.app-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #1d2939;
  background: var(--tfs-silver);
  border-bottom: 1px solid rgba(0,0,0,.15);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.45); border-radius: 7px; font-size: 12px; letter-spacing: .05em; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy small { color: #475467; font-size: 11px; font-weight: 600; }
.prototype-label { padding: 5px 9px; color: #1d2939; border: 1px solid rgba(0,0,0,.2); border-radius: 999px; font-size: 12px; font-weight: 600; }

.app-shell { display: flex; min-height: 100vh; padding-top: 64px; }
.sidebar { position: fixed; inset: 64px auto 0 0; width: 244px; padding: 22px 14px; overflow-y: auto; color: var(--sidebar-text); background: var(--sidebar); }
.nav-caption { margin: 0 10px 8px; color: #98a2b3; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { display: grid; gap: 3px; margin: 0 0 24px; padding: 0; list-style: none; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; text-decoration: none; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.09); }
.nav-number { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; border: 1px solid #667085; border-radius: 50%; font-size: 11px; }
.nav-link.active .nav-number { color: var(--sidebar); background: #fff; border-color: #fff; }

.main-content { width: calc(100% - 244px); max-width: calc(100vw - 244px); margin-left: 244px; padding: 28px clamp(20px, 4vw, 48px) 52px; }
.content-wrap { width: 100%; max-width: 1180px; margin: 0 auto; }
.breadcrumb { display: flex; gap: 7px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 0 0 5px; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; letter-spacing: -.02em; }
.page-heading p { max-width: 720px; margin: 0; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-body h2 { margin: 0; font-size: 17px; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 20px; }

.intro-card { padding: clamp(26px, 5vw, 48px); border-top: 4px solid var(--primary); }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.intro-card h2 { max-width: 720px; margin: 0 0 12px; font-size: clamp(23px, 3vw, 34px); line-height: 1.25; }
.intro-card p { max-width: 760px; margin: 0; color: var(--muted); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; text-decoration: none; font-weight: 650; }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { color: var(--text); background: #fff; }
.btn-secondary:hover { background: var(--surface-muted); }

.flow-card { display: flex; min-height: 176px; flex-direction: column; padding: 20px; text-decoration: none; transition: border-color .15s, transform .15s; }
.flow-card:hover { border-color: #9eb6bf; transform: translateY(-2px); }
.flow-step { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.step-number { color: var(--muted); font-size: 12px; font-weight: 700; }
.flow-card h3 { margin: 0 0 6px; font-size: 16px; }
.flow-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.flow-link { margin-top: auto; color: var(--primary); font-weight: 700; }

.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge-calculated { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }
.badge-blocked { color: #475467; background: #f2f4f7; border-color: #d0d5dd; }
.badge-tfs { color: var(--warning); background: var(--warning-bg); border-color: #d4a72c; }
.badge-pending { color: #475467; background: #f2f4f7; border-color: #eaecf0; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.field { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; }
.field label { color: #344054; font-size: 13px; font-weight: 650; }
.field-control { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--text); background: #fff; border: 1px solid #cfd5dd; border-radius: 7px; outline: 0; }
.field-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
textarea.field-control { min-height: 92px; resize: vertical; }
.field-control:disabled, .field-control.is-blocked { color: #667085; background: #eef1f4; border-color: #d6dae0; cursor: not-allowed; }
.field-help { color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
.table-compact th, .table-compact td { padding: 8px 10px; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: #475467; background: var(--surface-muted); font-size: 12px; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }

.placeholder { display: grid; min-height: 360px; place-items: center; padding: 40px; text-align: center; }
.placeholder-inner { max-width: 540px; }
.placeholder-icon { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 16px; color: var(--primary); background: #eaf2f4; border-radius: 10px; font-weight: 800; }
.placeholder h2 { margin: 0 0 8px; font-size: 20px; }
.placeholder p { margin: 0; color: var(--muted); }
.page-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* Encabezado de cotización: componentes reutilizables de formulario y resumen. */
.quote-form { display: block; }
.quote-heading { align-items: center; }
.status-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.badge-draft { color: #344054; background: #f2f4f7; border-color: #d0d5dd; }
.badge-version { color: var(--primary); background: #eaf2f4; border-color: #b8d1d8; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 24px; }
.field-full { grid-column: 1 / -1; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.summary-item { padding: 16px; background: #eef1f4; border: 1px solid #d6dae0; border-radius: 8px; }
.summary-item dt { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.summary-item dd { margin: 0; color: #344054; font-size: 18px; font-weight: 750; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.summary-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-grid-6 .summary-item dd { overflow-wrap: anywhere; font-size: 16px; }
.fieldset-reset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fieldset-reset legend { margin-bottom: 6px; padding: 0; color: #344054; font-size: 13px; font-weight: 650; }
.segmented-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #cfd5dd; border-radius: 7px; }
.segmented-control label { position: relative; cursor: pointer; }
.segmented-control label + label { border-left: 1px solid #cfd5dd; }
.segmented-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented-control span { display: grid; min-height: 40px; place-items: center; padding: 7px 9px; color: #475467; text-align: center; font-size: 12px; }
.segmented-control input:checked + span { color: var(--primary); background: #eaf2f4; box-shadow: inset 0 0 0 1px var(--primary); font-weight: 700; }
.segmented-control input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--primary); }
.field-span-2 { grid-column: span 2; }
.input-action { display: flex; gap: 8px; }
.input-action .field-control { flex: 1; }
.inline-message { margin: 0; padding: 8px 10px; color: #475467; background: var(--surface-muted); border-left: 3px solid var(--primary); font-size: 12px; }
.card-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.table-cell-blocked { color: #667085; background: #eef1f4; font-weight: 650; }
.table-actions { display: flex; gap: 10px; }
.btn-link { padding: 0; color: var(--primary); background: transparent; border: 0; cursor: pointer; font-weight: 650; }
.btn-link:hover { text-decoration: underline; }
.btn-link-danger { color: #b42318; }
.summary-item dt .badge { margin-left: 4px; vertical-align: middle; }
.form-actions-split { justify-content: space-between; }
.form-actions-group { display: flex; gap: 10px; }
.summary-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.summary-grid-5 .summary-item dd { overflow-wrap: anywhere; font-size: 16px; }
.part-number-card { border-top: 3px solid var(--primary); }
.part-pattern { margin-bottom: 18px; padding: 14px 18px; color: #344054; background: var(--surface-muted); border: 1px dashed #98a2b3; border-radius: 8px; font-family: "Courier New", monospace; font-size: clamp(18px, 3vw, 25px); font-weight: 700; letter-spacing: .05em; text-align: center; }
.part-number-preview .field-control { min-height: 56px; color: var(--primary); font-family: "Courier New", monospace; font-size: clamp(18px, 3vw, 25px); font-weight: 700; text-align: center; }
.code-hint { color: var(--primary); font-size: 12px; font-weight: 700; }
.input-unit { display: flex; align-items: stretch; }
.input-unit .field-control { border-radius: 7px 0 0 7px; }
.input-unit span { display: grid; min-width: 54px; place-items: center; padding: 0 10px; color: #475467; background: var(--surface-muted); border: 1px solid #cfd5dd; border-left: 0; border-radius: 0 7px 7px 0; font-size: 12px; }
.cost-table th .badge { margin-top: 4px; }
.internal-column { border-left: 3px solid #98a2b3; }
.commercial-column { border-left: 3px solid var(--primary); }
.table-cell-pending { color: var(--warning); background: var(--warning-bg); font-weight: 650; }
.section-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.selected-cost-card { border-top: 3px solid var(--primary); }
.field-internal, .field-commercial { padding: 12px; border-radius: 8px; }
.field-internal { background: #f2f4f7; border: 1px solid #d0d5dd; }
.field-commercial { background: #f0f8fa; border: 1px solid #b8d1d8; }
.data-kind { padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.data-kind-internal { color: #475467; background: #e4e7ec; }
.data-kind-commercial { color: var(--primary); background: #d7ebef; }
.money-input { display: flex; align-items: stretch; }
.money-input > span { display: grid; min-width: 36px; place-items: center; color: #475467; background: var(--surface-muted); border: 1px solid #cfd5dd; border-right: 0; border-radius: 7px 0 0 7px; }
.money-input .field-control { border-radius: 0 7px 7px 0; }
.action-message { margin: 20px 0 -8px; }
.review-actions { margin-bottom: 24px; }
.review-actions-row { display: flex; flex-wrap: wrap; gap: 10px; }
.review-message { margin: 0 24px 20px; }
.pdf-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 22px; }
.pdf-sheet { width: 100%; max-width: 860px; min-height: 980px; margin: 0 auto; padding: clamp(28px, 5vw, 56px); color: #202b33; background: #fff; border: 1px solid #d7dce2; box-shadow: 0 8px 28px rgba(16, 24, 40, .09); }
.pdf-header { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 24px; border-bottom: 2px solid var(--primary); }
.pdf-brand { display: flex; align-items: center; gap: 12px; }
.pdf-brand-mark { display: grid; width: 46px; height: 46px; place-items: center; color: #fff; background: var(--primary); border-radius: 5px; font-size: 13px; font-weight: 800; }
.pdf-brand div { display: grid; }
.pdf-brand strong { font-size: 20px; }
.pdf-brand span { color: var(--muted); font-size: 12px; }
.pdf-meta { display: grid; grid-template-columns: repeat(2, auto); gap: 7px 22px; margin: 0; }
.pdf-meta div, .pdf-client-grid div, .pdf-conditions-grid div { display: grid; gap: 2px; }
.pdf-meta dt, .pdf-client-grid dt, .pdf-conditions-grid dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pdf-meta dd, .pdf-client-grid dd, .pdf-conditions-grid dd { margin: 0; font-size: 13px; font-weight: 650; }
.pdf-section { padding: 24px 0; border-bottom: 1px solid #e4e7ec; }
.pdf-section h2 { margin: 0 0 14px; color: var(--primary); font-size: 14px; letter-spacing: .03em; text-transform: uppercase; }
.pdf-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pdf-client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; }
.pdf-table-wrap { border-radius: 0; }
.pdf-table th, .pdf-table td { padding: 9px 8px; white-space: normal; font-size: 11px; vertical-align: top; }
.pdf-table th { color: #fff; background: var(--primary); }
.pdf-table th:nth-last-child(-n+2), .pdf-table td:nth-last-child(-n+2) { text-align: right; white-space: nowrap; }
.pdf-totals { display: flex; justify-content: flex-end; padding: 22px 0; }
.pdf-totals dl { width: min(100%, 280px); margin: 0; }
.pdf-totals dl div { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; }
.pdf-totals dt, .pdf-totals dd { margin: 0; }
.pdf-totals dd { font-weight: 700; }
.pdf-total-line { margin-top: 4px; border-top: 1px solid #98a2b3; font-size: 16px; font-weight: 800; }
.pdf-conditions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
.pdf-wide { grid-column: 1 / -1; }
.pdf-notes { border-bottom: 0; }
.pdf-notes p { min-height: 54px; margin: 0; padding: 12px; color: var(--muted); background: #f8f9fa; border: 1px solid #e4e7ec; font-size: 12px; }
.validation-panel { position: sticky; top: 88px; overflow: hidden; background: #fffcf2; border-color: #e7d7a3; box-shadow: none; }
.validation-panel .card-header { background: #fff8e1; border-bottom-color: #e7d7a3; }
.internal-panel-note { margin: 0 0 20px; padding: 10px 12px; color: #664d03; background: #fff; border: 1px solid #e7d7a3; border-left: 4px solid #d4a72c; border-radius: 6px; font-size: 12px; font-weight: 700; }
.review-group + .review-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid #e7d7a3; }
.review-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.review-group-heading h3 { margin: 0; color: #344054; font-size: 13px; }
.validation-list { display: grid; gap: 10px; margin: 0; padding-left: 18px; color: #475467; font-size: 12px; }
.validation-list li::marker { color: var(--warning); }
.validation-list-confirmed li::marker { color: #067647; }
.validation-list-later li::marker { color: #667085; }
.badge-confirmed { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.badge-later { color: #475467; background: #f2f4f7; border-color: #d0d5dd; }

.parametros-costeo-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.parametros-costeo-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.parametros-costeo-column,
.parametros-costeo-column .card,
.parametros-costeo-column .card-body {
  min-width: 0;
  max-width: 100%;
}

.parametros-costeo-card-heading {
  flex-wrap: wrap;
}

.parametros-costeo-card-heading-text {
  min-width: 0;
  flex: 1 1 280px;
}

.parametros-costeo-query-form {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.parametros-costeo-query-form label {
  min-width: 0;
}

.parametros-costeo-query-form input,
.parametros-costeo-query-form button {
  max-width: 100%;
}

.parametros-costeo-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.parametros-costeo-table-wrap table {
  min-width: max-content;
}

@media (max-width: 1180px) {
  .parametros-costeo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; padding: 12px; }
  .app-shell { display: block; }
  .nav-caption { display: none; }
  .nav-list { display: flex; margin: 0; overflow-x: auto; }
  .nav-link { white-space: nowrap; }
  .main-content { width: 100%; max-width: 100vw; margin-left: 0; }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdf-workspace { grid-template-columns: 1fr; }
  .validation-panel { position: static; }
}

@media (max-width: 620px) {
  .app-header { padding: 0 15px; }
  .brand-copy span { font-size: 13px; }
  .prototype-label { display: none; }
  .main-content { padding: 22px 15px 40px; }
  .page-heading { flex-direction: column; }
  .grid-2, .flow-grid, .form-grid, .form-grid-3, .summary-grid { grid-template-columns: 1fr; }
  .page-actions { flex-wrap: wrap; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .form-actions-group { flex-direction: column; }
  .field-span-2 { grid-column: auto; }
  .input-action { align-items: stretch; flex-direction: column; }
  .segmented-control { grid-template-columns: 1fr; }
  .segmented-control label + label { border-top: 1px solid #cfd5dd; border-left: 0; }
  .pdf-sheet { min-height: 0; padding: 24px 16px; }
  .pdf-header { align-items: flex-start; flex-direction: column; }
  .pdf-client-grid, .pdf-conditions-grid { grid-template-columns: 1fr; }
  .pdf-wide { grid-column: auto; }
  .review-actions-row { flex-direction: column; }
  .review-actions-row .btn { width: 100%; }
  .parametros-costeo-grid {
    gap: 16px;
  }
  .parametros-costeo-column .card-body {
    padding: 16px;
  }
  .parametros-costeo-card-heading {
    gap: 10px !important;
  }
  .parametros-costeo-card-heading-text,
  .parametros-costeo-query-form {
    flex-basis: 100%;
  }
  .parametros-costeo-query-form {
    align-items: stretch !important;
    flex-direction: column;
    justify-content: flex-start;
  }
  .parametros-costeo-query-form input,
  .parametros-costeo-query-form button {
    width: 100%;
  }
  .parametros-costeo-page form div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Sidebar toggle support */
body.sidebar-collapsed .sidebar {
  transform: translateX(-244px);
}
body.sidebar-collapsed .main-content {
  margin-left: 0;
  width: 100%;
  max-width: 100vw;
}
.sidebar {
  transition: transform 0.3s ease;
  z-index: 15;
}
.main-content {
  transition: margin-left 0.3s ease, width 0.3s ease;
  min-width: 0;
  overflow-x: hidden;
}
.app-header {
  z-index: 25;
}



/* Form grid 5 cols for condiciones de pago */
.form-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 768px) {
  .form-grid-5 { grid-template-columns: 1fr; }
}

/* Form grid 4 cols */
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .form-grid-4 { grid-template-columns: 1fr; }
}

/* Card footer */
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-muted); border-radius: 0 0 var(--radius) var(--radius); }


/* Módulo Canastillas - Layout Específico */
.canastillas-module {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.canastillas-module .table-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.canastillas-form-grid .field {
  min-width: 0;
}

/* Tabla - Base Desktop */
.canastillas-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-inline: 2px;
  overflow-x: visible; /* Sin scroll horizontal en desktop */
  overflow-y: hidden;
}

.canastillas-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 11px;
}

/* Compactación exclusiva */
.canastillas-table th,
.canastillas-table td {
  padding: 6px 4px;
  line-height: 1.2;
  vertical-align: top;
  box-sizing: border-box;
}

.canastillas-table thead th {
  text-align: center;
  vertical-align: middle;
}

.canastillas-table .col-left {
  text-align: left !important;
}

.canastillas-table .col-center {
  text-align: center !important;
}

/* Columnas Compactas */
.canastillas-table th:nth-child(3), .canastillas-table td:nth-child(3),
.canastillas-table th:nth-child(4), .canastillas-table td:nth-child(4),
.canastillas-table th:nth-child(5), .canastillas-table td:nth-child(5),
.canastillas-table th:nth-child(6), .canastillas-table td:nth-child(6),
.canastillas-table th:nth-child(7), .canastillas-table td:nth-child(7),
.canastillas-table th:nth-child(11), .canastillas-table td:nth-child(11),
.canastillas-table th:nth-child(12), .canastillas-table td:nth-child(12),
.canastillas-table th:nth-child(13), .canastillas-table td:nth-child(13),
.canastillas-table th:nth-child(14), .canastillas-table td:nth-child(14) {
  white-space: nowrap;
}

/* No. Parte (1) */
.canastillas-table th:nth-child(1), .canastillas-table td:nth-child(1) {
  white-space: nowrap;
}

/* Textos Largos (Cuello 8, Fondo 9, Acabado 10) */
.canastillas-table th:nth-child(8), .canastillas-table td:nth-child(8),
.canastillas-table th:nth-child(9), .canastillas-table td:nth-child(9),
.canastillas-table th:nth-child(10), .canastillas-table td:nth-child(10) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.2;
}

@media (max-width: 1100px) {
  .canastillas-table-scroll {
    overflow-x: auto;
  }
  .canastillas-table {
    min-width: 900px;
    table-layout: auto;
  }
}
/* Tabla - Telas */
.telas-module {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.telas-module .page-heading,
.telas-table-card,
.telas-table-scroll {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .telas-module .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.telas-table-scroll {
  overflow: auto;
  max-height: 65vh;
}

.telas-table {
  width: 100%;
  min-width: 1640px;
  table-layout: fixed;
  font-size: 12px;
}

.telas-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-muted);
  box-shadow: 0 1px 0 #eaecf0;
}

@media (max-width: 768px) {
  .telas-table-scroll {
    max-height: 60vh;
  }
}

.telas-table th,
.telas-table td {
  padding: 8px 7px;
  line-height: 1.25;
  box-sizing: border-box;
  vertical-align: middle;
}

.telas-table .col-left {
  text-align: left;
}

.telas-table .col-center {
  text-align: center;
}

.telas-table .col-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

.telas-table .col-nowrap {
  white-space: nowrap;
}
