/* SAM LAB: presentation-only, independent from FIELD core and SOS human. */
body.field-shell{padding-bottom:calc(108px + env(safe-area-inset-bottom))}
.field-shell .field-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding-left:5px;padding-right:5px}
.field-shell .field-bottom-nav button{min-width:0;padding:5px 2px;font-size:10px;line-height:1.2;overflow-wrap:anywhere}
.field-shell .field-bottom-nav .sam-nav-trigger{background:#a61b29!important;color:#fff!important;border-radius:15px 15px 8px 8px;border:2px solid #fff!important;box-shadow:0 0 0 1px #861521;min-height:62px;font-weight:850;transform:translateY(-5px)}
.field-shell .field-bottom-nav .sam-nav-trigger[aria-current=page]{background:#90121f!important;color:#fff!important;border-bottom:4px solid #ffc44d!important}
.field-shell .field-bottom-nav .sam-nav-trigger span{font-size:24px}
.field-shell .field-bottom-nav .sam-nav-trigger:focus-visible{outline:3px solid #ffd166;outline-offset:2px}
.field-shell .field-sam-section .sam-safety{background:#fff4e9;border:1px solid #e5ab65;border-left:5px solid #a55a00;padding:12px 14px;border-radius:12px;margin-bottom:16px;color:#5e3908}
.field-shell .field-sam-section .sam-safety p{font-size:13px;line-height:1.5;margin:7px 0 0}
.field-shell .sam-form{display:grid;gap:10px}
.field-shell .sam-overline{font-size:10px;font-weight:850;letter-spacing:1.5px;color:#4f6173}
.field-shell #samEquipmentName{font-size:19px}
.field-shell .sam-equipment-id{font:12px ui-monospace,monospace;color:#526577;margin-bottom:8px}
.field-shell .sam-form textarea{display:block;width:100%;max-width:100%;box-sizing:border-box;border:1px solid #b4c5d2;background:#fff;color:#152839;border-radius:10px;padding:12px;font:16px/1.45 inherit;resize:vertical}
.field-shell .sam-form label{font-weight:750}
.field-shell .sam-submit{background:#a61b29!important;color:white!important;min-height:60px;border:0!important;font-weight:850;font-size:16px}
.field-shell .sam-disclaimer{font-size:12px;color:#576b7d;margin:0}
.field-shell #samMessage:not(:empty){background:#edf7ef;border:1px solid #7bb891;color:#155e36;border-radius:9px;padding:12px;line-height:1.5}
.field-shell #samError:not(:empty){background:#ffeded;border:1px solid #db8484;color:#821d25;border-radius:9px;padding:12px}
.field-shell .sam-history-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:16px 0}
.field-shell .sam-history-heading h3{font-size:18px;margin:0}
.field-shell .sam-history-heading span{font-size:12px;color:#526577}
.field-shell .sam-empty{padding:14px;background:#e6edf2;border-radius:9px}
.field-shell .sam-case{padding:16px;margin-bottom:10px}
.field-shell .sam-case-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
.field-shell .sam-case-heading strong{font-size:15px}
.field-shell .sam-case-status{font-size:11px;font-weight:750;background:#fff0d9;border:1px solid #ca8f36;color:#6c4408;border-radius:20px;padding:5px 8px}
.field-shell .sam-case p{font-size:12px;margin:8px 0;overflow-wrap:anywhere}
.field-shell .sam-case-id{font:11px ui-monospace,monospace;overflow-wrap:anywhere}
.field-shell .sam-case-local{font-weight:750;color:#795017}
.field-shell .sam-case-note{padding:8px;background:#edf2f6;border-radius:8px}
body.field-shell.field-e4[data-field-theme="night"] .field-sam-section .sam-safety{background:#352715;border-color:#bd894c;color:#ffe2ae}
body.field-shell.field-e4[data-field-theme="night"] .sam-form,body.field-shell.field-e4[data-field-theme="night"] .sam-case{background:#142e43;border-color:#47677c;color:#eff7ff}
body.field-shell.field-e4[data-field-theme="night"] .sam-overline,body.field-shell.field-e4[data-field-theme="night"] .sam-equipment-id,body.field-shell.field-e4[data-field-theme="night"] .sam-disclaimer,body.field-shell.field-e4[data-field-theme="night"] .sam-history-heading span{color:#c4dbe9}
body.field-shell.field-e4[data-field-theme="night"] .sam-form textarea{background:#193b52;border-color:#58758b;color:#fff}
body.field-shell.field-e4[data-field-theme="night"] .sam-case-status{background:#4d361d;color:#ffe2a1;border-color:#ab7d37}
body.field-shell.field-e4[data-field-theme="night"] .sam-case-local{color:#ffd27a}
body.field-shell.field-e4[data-field-theme="night"] .sam-empty,body.field-shell.field-e4[data-field-theme="night"] .sam-case-note{background:#234358;color:#e9f4ff}
body.field-shell.field-e4[data-field-theme="night"] #samMessage:not(:empty){background:#173c30;border-color:#42916a;color:#bff7d4}
body.field-shell.field-e4[data-field-theme="night"] #samError:not(:empty){background:#4d1d23;color:#ffd3d3}
@media(max-width:365px){.field-shell .field-bottom-nav{padding-left:2px;padding-right:2px}.field-shell .field-bottom-nav button{font-size:9px}}
@media(prefers-reduced-motion:reduce){.field-shell .sam-nav-trigger{transition:none!important}}


/* SAM MEDIA LAB — optional evidence, local-only (no server acknowledgement). */
.field-shell .sam-media-fieldset{min-width:0;border:1px solid #b7cbd9;border-radius:12px;padding:12px;display:grid;gap:9px;margin-top:8px}
.field-shell .sam-media-fieldset legend{font-weight:800;font-size:14px;padding:0 7px}
.field-shell .sam-media-notice{font-size:12px;line-height:1.5;color:#425970;margin:0}
.field-shell .sam-media-fieldset input[type=file]{width:100%;min-width:0;font-size:13px;padding:8px;border-radius:9px;white-space:normal}
.field-shell .sam-media-fieldset input[type=file]::file-selector-button{padding:9px;background:#e4eff7;border:1px solid #86a9bf;border-radius:8px;color:#123b56;margin-right:8px}
.field-shell .sam-draft-media{display:grid;gap:8px;min-width:0}
.field-shell .sam-draft-media>p{font-size:12px;margin:0}
.field-shell .sam-media-preview{display:grid;gap:5px;min-width:0;background:#edf2f6;padding:8px;border-radius:9px}
.field-shell .sam-media-preview img,.field-shell .sam-media-preview video{display:block;width:100%;max-height:260px;object-fit:contain;background:#152c3d;border-radius:7px}
.field-shell .sam-media-preview small{overflow-wrap:anywhere;font-size:11px}
.field-shell .sam-media-invalid{color:#ab2027;font-weight:800}
.field-shell .sam-evidence-details{border-top:1px solid #d1dee7;padding-top:9px;margin-top:10px}
.field-shell .sam-evidence-details summary{cursor:pointer;font-size:13px;font-weight:750;color:#165581;min-height:40px}
.field-shell .sam-saved-media{font-weight:700;color:#245f74}
body.field-shell.field-e4[data-field-theme="night"] .sam-media-fieldset{border-color:#5f7a8d;color:#e9f4ff}
body.field-shell.field-e4[data-field-theme="night"] .sam-media-notice{color:#c6dbe9}
body.field-shell.field-e4[data-field-theme="night"] .sam-media-fieldset input[type=file]{background:#193b52;color:#fff;border-color:#638298}
body.field-shell.field-e4[data-field-theme="night"] .sam-media-preview{background:#25475d;color:#fff}
body.field-shell.field-e4[data-field-theme="night"] .sam-evidence-details summary{color:#a8ddff}
body.field-shell.field-e4[data-field-theme="night"] .sam-saved-media{color:#a6e5ee}
body.field-shell.field-e4[data-field-theme="night"] .sam-media-invalid{color:#ffc4c9}


/* REF-002: SAM must remain RED also when the Night theme overrides active nav. */
body.field-shell.field-e4[data-field-theme="night"] .field-bottom-nav button.sam-nav-trigger,
body.field-shell.field-e4[data-field-theme="night"] .field-bottom-nav button.sam-nav-trigger[aria-current="page"]{
  background:#90121f!important;color:#ffffff!important;
  border:2px solid #ffd9de!important;border-bottom:4px solid #ffd166!important;
  box-shadow:0 0 0 1px #a92936,0 0 12px #a9293640!important;
}


/* SAM Refinería 003 — continuación fiel a FIELD E4 con los 5 recortes originales. */
.field-shell .sam-machine-context{
  display:grid;grid-template-columns:minmax(104px,39%) minmax(0,1fr);align-items:center;gap:13px;
  padding:13px;border-radius:14px;background:linear-gradient(135deg,#0a2a4a,#113d5c);
  border:1px solid #285d7b;min-width:0
}
.field-shell .sam-machine-image{
  display:block;width:100%;height:126px;max-width:100%;object-fit:contain;
  background:radial-gradient(circle at center,#41627e 0%,#11334c 75%);border-radius:10px;
  filter:none;opacity:1
}
.field-shell .sam-machine-details{display:grid;gap:7px;min-width:0}
.field-shell .sam-machine-context .sam-overline{color:#b6d2e1}
.field-shell .sam-machine-context #samEquipmentName{font-weight:800;font-size:20px;line-height:1.2;color:#fff;overflow-wrap:anywhere}
.field-shell .sam-machine-context .sam-equipment-id{color:#bfd8e5;overflow-wrap:anywhere;margin:0}
.field-shell .sam-machine-context #samEquipmentImageCaption{color:#f6d785;font-weight:750;font-size:9px;line-height:1.5;letter-spacing:.4px}
.field-shell .sam-section-label{font-weight:850;letter-spacing:1.15px;font-size:11px;padding-top:9px;padding-bottom:6px;color:#1c5a7b;border-bottom:1px solid #d4e2ed}
.field-shell .sam-field-note{margin:0!important;font-size:12px;line-height:1.45;color:#526878}
.field-shell .sam-safety-confirm{
  display:flex;align-items:flex-start;gap:13px;background:#e9f2f8;border:1px solid #93b5ca;border-radius:12px;
  padding:13px;color:#153f58;font-size:13px;font-weight:700;line-height:1.5
}
.field-shell .sam-safety-confirm input[type="checkbox"]{
  flex:0 0 22px;min-height:22px;width:22px;height:22px;margin:2px 0 0;accent-color:#1c607e
}
.field-shell .sam-hse-alert{background:#fff0e7;color:#772c13;border:2px solid #c64b28;border-left:6px solid #c64b28;border-radius:10px;padding:13px;font-size:13px;font-weight:800;line-height:1.5}
.field-shell .sam-case-triage{font-weight:850;color:#184c69}
.field-shell .sam-case-condition{color:#305e72;font-weight:650}
.field-shell .sam-case-hse{color:#8d2927;background:#fff0ec;border:1px solid #df9f91;padding:8px;border-radius:7px;font-weight:800}
body.field-shell.field-e4[data-field-theme="night"] .sam-machine-context{
  background:linear-gradient(135deg,#071d30,#0c3048);border-color:#526e83
}
body.field-shell.field-e4[data-field-theme="night"] .sam-section-label{color:#b8dff5;border-bottom-color:#47677c}
body.field-shell.field-e4[data-field-theme="night"] .sam-field-note{color:#bbd6e7}
body.field-shell.field-e4[data-field-theme="night"] .sam-safety-confirm{background:#17394e;border-color:#6087a0;color:#f1f7ff}
body.field-shell.field-e4[data-field-theme="night"] .sam-hse-alert{background:#502522;border-color:#e99770;color:#fff0da}
body.field-shell.field-e4[data-field-theme="night"] .sam-case-triage{color:#a7d9f2}
body.field-shell.field-e4[data-field-theme="night"] .sam-case-condition{color:#b6ddec}
body.field-shell.field-e4[data-field-theme="night"] .sam-case-hse{background:#4a2025;border-color:#bb7575;color:#fff0e3}
@media(max-width:365px){
 .field-shell .sam-machine-context{grid-template-columns:105px minmax(0,1fr);gap:9px;padding:10px}
 .field-shell .sam-machine-image{height:112px}
 .field-shell .sam-machine-context #samEquipmentName{font-size:18px}
}


/* SAM REF-004 / Etapa 1: iconografía funcional de maquinaria y síntomas observables.
   Los tonos diferencian sistemas, NO alertas mecánicas ni gravedad. */
.field-shell .sam-visual-fieldset{
  border:0;min-width:0;margin:0;padding:0;display:grid;gap:10px
}
.field-shell .sam-visual-fieldset legend{
  float:none;width:auto;display:block;padding:0;margin:0 0 4px;
  color:#173951;font-size:15px;font-weight:850;line-height:1.4
}
.field-shell .sam-visual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.field-shell .sam-system-card{
  --sam-system-color:#416482;position:relative;display:flex;align-items:center;
  flex-direction:column;justify-content:center;gap:7px;
  min-width:0;min-height:112px;width:100%;padding:13px 9px!important;
  border:1.5px solid #c0d1dd!important;border-radius:14px!important;
  background:linear-gradient(155deg,#fff,#eef4f8)!important;color:#18384f!important;
  box-shadow:0 2px 10px #12314c08;text-align:center;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.field-shell .sam-system-card.sam-tone-engine{--sam-system-color:#936227}
.field-shell .sam-system-card.sam-tone-hydraulic{--sam-system-color:#246c8c}
.field-shell .sam-system-card.sam-tone-rolling{--sam-system-color:#47677e}
.field-shell .sam-system-card.sam-tone-electric{--sam-system-color:#986b24}
.field-shell .sam-system-card.sam-tone-brakes{--sam-system-color:#985e46}
.field-shell .sam-system-card.sam-tone-drivetrain{--sam-system-color:#536884}
.field-shell .sam-system-card.sam-tone-structure{--sam-system-color:#5a6980}
.field-shell .sam-system-card.sam-tone-other{--sam-system-color:#686c78}
.field-shell .sam-system-card .sam-system-icon{
  display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;
  border-radius:12px;background:#e4eef4;color:var(--sam-system-color)
}
.field-shell .sam-system-card .sam-system-icon svg{display:block}
.field-shell .sam-system-card .sam-system-copy{display:grid;gap:3px;min-width:0}
.field-shell .sam-system-card .sam-system-name{
  font-size:14px;font-weight:850;line-height:1.2;overflow-wrap:anywhere
}
.field-shell .sam-system-card .sam-system-detail{
  font-size:10px;line-height:1.35;color:#5a6e7c;overflow-wrap:anywhere
}
.field-shell .sam-system-card .sam-card-check{
  position:absolute;right:8px;top:8px;width:19px;height:19px;
  border-radius:50%;display:none;place-items:center;
  background:#145c7b;color:#fff;font-size:13px;font-weight:900
}
.field-shell .sam-system-card[aria-pressed="true"]{
  border:2.5px solid #156285!important;background:linear-gradient(155deg,#e8f6fc,#f7fbff)!important;
  box-shadow:0 0 0 2px #1a7ca426,0 6px 14px #16496720
}
.field-shell .sam-system-card[aria-pressed="true"] .sam-card-check{display:grid}
.field-shell .sam-system-card[aria-pressed="true"] .sam-system-icon{background:#cce7f4}
.field-shell .sam-system-card:focus-visible,.field-shell .sam-symptom-chip:focus-visible{
  outline:3px solid #cc8d19!important;outline-offset:2px!important
}
.field-shell .sam-symptom-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.field-shell .sam-symptom-chip{
  display:flex;align-items:center;justify-content:center;
  width:100%;min-width:0;min-height:58px;
  padding:11px 10px!important;border-radius:12px!important;
  border:1.5px solid #c1d1de!important;background:#f7fafc!important;
  font-size:12px!important;font-weight:750!important;line-height:1.35!important;
  text-align:center;color:#204057!important;overflow-wrap:anywhere
}
.field-shell .sam-symptom-chip[aria-pressed="true"]{
  border:2px solid #1b678b!important;background:#dfecf6!important;
  color:#08384f!important;box-shadow:inset 0 0 0 1px #1b678b20!important
}
.field-shell .sam-symptom-chip[aria-pressed="true"]::before{
  content:"✓";font-weight:900;padding-right:5px;color:#146487
}
.field-shell .sam-symptom-empty{
  grid-column:1/-1;padding:18px 12px;text-align:center;
  color:#526b7c;background:#eaf1f6;border:1px dashed #a5bdcc;border-radius:12px;font-size:13px
}
.field-shell .sam-selection-feedback{
  font-size:12px!important;font-weight:750;color:#246083;margin:0!important;
  line-height:1.4
}
.field-shell .sam-alternative-select{
  border-top:1px solid #d7e3eb;padding-top:6px;
  font-size:12px;color:#587087
}
.field-shell .sam-alternative-select summary{cursor:pointer;min-height:35px;padding:8px 0;font-weight:700}
.field-shell .sam-alternative-select label{display:block;margin-top:8px}
.field-shell .sam-alternative-select select{margin-top:6px}
body.field-shell.field-e4[data-field-theme="night"] .sam-visual-fieldset legend{color:#f1f7ff}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card{
  background:linear-gradient(150deg,#183a51,#112b3d)!important;
  border-color:#5b7a8d!important;color:#f2f7fc!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card .sam-system-icon{
  background:#294b62;color:#b6ddec
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card .sam-system-detail{color:#c5dbe8}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card[aria-pressed="true"]{
  background:linear-gradient(150deg,#214d68,#193e59)!important;border-color:#85d3ff!important;
  box-shadow:0 0 0 2px #56aecc33!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card[aria-pressed="true"] .sam-card-check{
  background:#d4a017;color:#102233
}
body.field-shell.field-e4[data-field-theme="night"] .sam-symptom-chip{
  background:#19384c!important;color:#e7f4ff!important;border-color:#5e7e94!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-symptom-chip[aria-pressed="true"]{
  border-color:#89d4ff!important;color:#fff!important;background:#275875!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-symptom-chip[aria-pressed="true"]::before{color:#f4cb6b}
body.field-shell.field-e4[data-field-theme="night"] .sam-symptom-empty{
  background:#1a394d;border-color:#66849b;color:#c6e0f0
}
body.field-shell.field-e4[data-field-theme="night"] .sam-selection-feedback{color:#a5dafa}
body.field-shell.field-e4[data-field-theme="night"] .sam-alternative-select{
  color:#c2ddec;border-color:#48667c
}
@media(min-width:650px){
 .field-shell .sam-visual-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .field-shell .sam-symptom-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:365px){
 .field-shell .sam-visual-grid{gap:7px}
 .field-shell .sam-system-card{padding:9px 6px!important;min-height:104px}
 .field-shell .sam-system-card .sam-system-detail{font-size:9px}
 .field-shell .sam-symptom-chip{font-size:11px!important;padding:9px 7px!important}
}
@media(prefers-reduced-motion:reduce){
 .field-shell .sam-system-card,.field-shell .sam-symptom-chip{transition:none!important}
}


/* SAM REF-004 / Etapa 02 — condición y riesgo HSE DECLARATIVOS.
   NO equivale a liberar equipo, autorización operativa, ni recepción del servicio de emergencia. */
.field-shell .sam-context-fieldset,.field-shell .sam-risk-fieldset{gap:9px}
.field-shell .sam-context-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0
}
.field-shell .sam-context-card{
  --sam-context-accent:#577189;
  position:relative;display:flex;flex-direction:column;align-items:center;
  justify-content:flex-start;gap:6px;min-width:0;min-height:126px;width:100%;
  padding:14px 5px 13px!important;border-radius:13px!important;
  border:1.5px solid #b6cbd8!important;background:#f5f9fb!important;
  color:#193e55!important;text-align:center;
  font-weight:700;box-shadow:none!important;overflow-wrap:anywhere;
  transition:border-color .15s ease,background-color .15s ease
}
.field-shell .sam-context-card.sam-context-attention{--sam-context-accent:#996b25}
.field-shell .sam-context-card.sam-context-reference{--sam-context-accent:#2f6d91}
.field-shell .sam-context-card.sam-context-observed{--sam-context-accent:#2b7688}
.field-shell .sam-context-card.sam-context-warning{--sam-context-accent:#a92f37}
.field-shell .sam-context-icon{
  flex:0 0 39px;width:39px;height:39px;border-radius:12px;
  display:grid;place-items:center;background:#e4edf3;color:var(--sam-context-accent)
}
.field-shell .sam-context-icon svg{display:block}
.field-shell .sam-context-name{font-weight:850;font-size:12px;line-height:1.22}
.field-shell .sam-context-detail{font-weight:650;font-size:10px;line-height:1.25;color:#536a7c}
.field-shell .sam-context-check{
  position:absolute;right:5px;top:5px;display:none;place-items:center;
  width:16px;height:16px;border-radius:50%;background:#185f81;color:#fff;
  font-size:11px;font-weight:900
}
.field-shell .sam-context-card[aria-pressed="true"]{
  border:2.5px solid var(--sam-context-accent)!important;background:#eaf4f9!important;
  box-shadow:0 0 0 2px #195b791f!important
}
.field-shell .sam-context-card[aria-pressed="true"] .sam-context-icon{background:#d7eaf5}
.field-shell .sam-context-card[aria-pressed="true"] .sam-context-check{display:grid}
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"]{
  background:#fff7f4!important;border-color:#c78d86!important
}
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]{
  background:#ffebe7!important;border-color:#b52233!important;
  box-shadow:0 0 0 2px #b5223326!important
}
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"][aria-pressed="true"] .sam-context-icon{
  background:#f7caca;color:#8e1e2b
}
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"] .sam-context-check{background:#a92f37}
.field-shell .sam-context-card:focus-visible{
  outline:3px solid #cf9f36!important;outline-offset:2px!important
}
.field-shell .sam-context-explanation{
  background:#f0f5f8;color:#3a5366;border-left:4px solid #577189;
  border-radius:6px;padding:9px 11px;margin:0!important;font-size:12px;line-height:1.4
}
.field-shell .sam-risk-fieldset:has([data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]) .sam-context-explanation{
  background:#fff0e9;color:#8a3023;border-left-color:#c04b29;font-weight:750
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card{
  border-color:#5e8096!important;background:#16384d!important;color:#eef7ff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-icon{
  background:#2b4d63;color:#badfed
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-detail{color:#c6dbe8}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card[aria-pressed="true"]{
  border-color:#a3dcfd!important;background:#255472!important;box-shadow:0 0 0 2px #7bcbe033!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card[aria-pressed="true"] .sam-context-icon{background:#336884}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-check{background:#d0a533;color:#132a3e}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"]{
  background:#422b36!important;border-color:#b37b82!important;color:#fff1f1!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]{
  background:#6e283b!important;border-color:#ffaf9c!important;box-shadow:0 0 0 2px #ee8c8c33!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"][aria-pressed="true"] .sam-context-icon{
  background:#914152;color:#fff
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-explanation{
  background:#1b3d52;color:#c5e2f3;border-left-color:#9ab7ca
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset:has([data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]) .sam-context-explanation{
  background:#522936;color:#ffe5dc;border-left-color:#ffb49e
}
@media(max-width:365px){
 .field-shell .sam-context-grid{gap:5px}
 .field-shell .sam-context-card{min-height:120px;padding:12px 3px 11px!important}
 .field-shell .sam-context-name{font-size:11px}
 .field-shell .sam-context-detail{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
 .field-shell .sam-context-card{transition:none!important}
}


/* NARA / REF-004 COLOR-01 — Energía cromática industrial.
   Objetivo: que las tarjetas sean reconocibles a simple vista, sin usar color como
   indicador de gravedad mecánica. Riesgo HSE conserva el significado de ROJO.
   Layer-only: NO modifica categorías, dominio, validación, multimedia ni envío. */

/* Ritmo de la pantalla y encabezado del equipo: azul profundo + línea ámbar. */
.field-shell .sam-machine-context{
  background:linear-gradient(124deg,#08233d 0%,#104b6b 72%,#146583 100%)!important;
  border:2px solid #2a93b9!important;
  box-shadow:inset 0 4px 0 #ffca48,0 12px 26px #09274627!important;
}
.field-shell .sam-section-label{
  display:block;background:linear-gradient(90deg,#ffcd4b 0%,#ffb129 64%,#f8df8e 100%);
  color:#193146!important;border:none;border-left:5px solid #133f63;
  padding:10px 12px!important;border-radius:9px;font-size:12px!important;
  letter-spacing:.65px;margin:9px 0 4px;
}
.field-shell .sam-visual-fieldset legend{
  color:#103a56;font-weight:900;font-size:15px;
}

/* Cada sistema recibe acento, icono sólido y superficie con color propio.
   Los tonos SOLO codifican familias de componentes. */
.field-shell .sam-system-card.sam-tone-engine{
  --sam-vivid:#f5a623;--sam-icon-ink:#192f42;
}
.field-shell .sam-system-card.sam-tone-hydraulic{
  --sam-vivid:#05bce1;--sam-icon-ink:#0c2e42;
}
.field-shell .sam-system-card.sam-tone-rolling{
  --sam-vivid:#94ce33;--sam-icon-ink:#17321e;
}
.field-shell .sam-system-card.sam-tone-electric{
  --sam-vivid:#ffd13d;--sam-icon-ink:#332b0c;
}
.field-shell .sam-system-card.sam-tone-brakes{
  --sam-vivid:#f27d60;--sam-icon-ink:#3a1f28;
}
.field-shell .sam-system-card.sam-tone-drivetrain{
  --sam-vivid:#4b89f5;--sam-icon-ink:#ffffff;
}
.field-shell .sam-system-card.sam-tone-structure{
  --sam-vivid:#a478ec;--sam-icon-ink:#ffffff;
}
.field-shell .sam-system-card.sam-tone-other{
  --sam-vivid:#7b96b8;--sam-icon-ink:#132a43;
}
.field-shell .sam-system-card{
  --sam-vivid:#4b89f5;--sam-icon-ink:#ffffff;
  background:linear-gradient(153deg,color-mix(in srgb,var(--sam-vivid) 29%,white),#ffffff 95%)!important;
  border:2px solid color-mix(in srgb,var(--sam-vivid) 60%,white)!important;
  border-top:5px solid var(--sam-vivid)!important;
  border-radius:15px!important;min-height:118px;
  color:#112d45!important;box-shadow:0 4px 11px #14344a17!important;
}
.field-shell .sam-system-card .sam-system-icon{
  width:51px;height:51px;flex:0 0 51px;border-radius:13px;
  color:var(--sam-icon-ink)!important;
  background:var(--sam-vivid)!important;
  box-shadow:0 5px 11px color-mix(in srgb,var(--sam-vivid) 34%,transparent)!important;
}
.field-shell .sam-system-card .sam-system-icon svg{width:33px;height:33px}
.field-shell .sam-system-card .sam-system-name{
  font-weight:900;color:#122c44;font-size:14px
}
.field-shell .sam-system-card .sam-system-detail{
  color:#334c60;font-size:10px;font-weight:700
}
.field-shell .sam-system-card[aria-pressed="true"]{
  background:linear-gradient(145deg,color-mix(in srgb,var(--sam-vivid) 52%,white),
    color-mix(in srgb,var(--sam-vivid) 20%,white))!important;
  border:3px solid var(--sam-vivid)!important;
  border-top-width:6px!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--sam-vivid) 35%,transparent),
    0 10px 18px #0b35532e!important;
  transform:translateY(-2px);
}
.field-shell .sam-system-card[aria-pressed="true"] .sam-card-check{
  background:#102f47;color:#fff;box-shadow:0 0 0 2px #fff;
}
.field-shell .sam-system-card[aria-pressed="true"] .sam-system-icon{
  background:var(--sam-vivid)!important;color:var(--sam-icon-ink)!important
}

/* Chips nítidos: una selección azul intenso se ve distinta a todas las opciones libres. */
.field-shell .sam-symptom-chip{
  background:linear-gradient(145deg,#e3f5ff,#f6fbff)!important;
  border:2px solid #8dc9e8!important;color:#154d71!important;
  box-shadow:inset 0 3px 0 #b3e8ff!important;
}
.field-shell .sam-symptom-chip[aria-pressed="true"]{
  background:linear-gradient(125deg,#1563af,#1186bb)!important;
  border:2.5px solid #0a477f!important;color:#ffffff!important;
  box-shadow:0 0 0 3px #3babed44,0 5px 13px #145e9d33!important;
}
.field-shell .sam-symptom-chip[aria-pressed="true"]::before{color:#ffe37b!important}
.field-shell .sam-symptom-empty{
  background:#e3f6fc;border-color:#41a9c6;color:#225b6c
}
.field-shell .sam-selection-feedback{
  color:#12608b!important;font-weight:800
}

/* Tres estados con superficies cromáticas propias, no un conjunto gris.
   Celeste/verde-agua representa solo observación, NUNCA equipo liberado. */
.field-shell .sam-context-card.sam-context-neutral{
  --sam-status-vivid:#6e8ba9;--sam-status-ink:#fff
}
.field-shell .sam-context-card.sam-context-attention{
  --sam-status-vivid:#ffb328;--sam-status-ink:#302508
}
.field-shell .sam-context-card.sam-context-reference{
  --sam-status-vivid:#3a9ddd;--sam-status-ink:#0b3247
}
.field-shell .sam-context-card.sam-context-observed{
  --sam-status-vivid:#13bfae;--sam-status-ink:#073a3d
}
.field-shell .sam-context-card.sam-context-warning{
  --sam-status-vivid:#d72d46;--sam-status-ink:#fff
}
.field-shell .sam-context-card{
  --sam-status-vivid:#6e8ba9;--sam-status-ink:#fff;
  background:linear-gradient(150deg,
    color-mix(in srgb,var(--sam-status-vivid) 29%,white),#fff 100%)!important;
  border:2px solid color-mix(in srgb,var(--sam-status-vivid) 62%,white)!important;
  border-top:5px solid var(--sam-status-vivid)!important;
  color:#12354d!important;
  min-height:132px;box-shadow:0 4px 10px #14344a10!important;
}
.field-shell .sam-context-card .sam-context-icon{
  background:var(--sam-status-vivid)!important;
  color:var(--sam-status-ink)!important;
  width:46px;height:46px;flex:0 0 46px;border-radius:12px;
  box-shadow:0 5px 12px #17354a20
}
.field-shell .sam-context-card .sam-context-icon svg{width:28px;height:28px}
.field-shell .sam-context-card .sam-context-name{
  font-size:12px;font-weight:900;color:#102d43
}
.field-shell .sam-context-card .sam-context-detail{
  color:#294961;font-weight:720
}
.field-shell .sam-context-card[aria-pressed="true"]{
  background:linear-gradient(155deg,
    color-mix(in srgb,var(--sam-status-vivid) 52%,white),
    color-mix(in srgb,var(--sam-status-vivid) 22%,white))!important;
  border:3px solid var(--sam-status-vivid)!important;
  border-top-width:6px!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--sam-status-vivid) 32%,transparent),
    0 7px 16px #143a5826!important;
  transform:translateY(-1px)
}
.field-shell .sam-context-card[aria-pressed="true"] .sam-context-check{
  background:#10364e;color:#fff;
  box-shadow:0 0 0 2px white;width:20px;height:20px;font-size:13px
}

/* Posible riesgo: el rojo es el indicador semántico exclusivo de HSE.
   Se destaca incluso antes de la selección, con título verbal explícito. */
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"]{
  border:2px solid #d93e54!important;border-top:5px solid #d72d46!important;
  background:linear-gradient(150deg,#ffb5bf,#fff2f2 100%)!important
}
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]{
  background:linear-gradient(145deg,#e44b60,#ffd0d4 95%)!important;
  border:3px solid #ab182d!important;border-top-width:6px!important;
  box-shadow:0 0 0 3px #d72d4650,0 7px 18px #a61a3533!important
}
.field-shell .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"] .sam-context-icon{
  background:#be1831!important;color:#fff!important;
}
.field-shell .sam-context-explanation{
  border-left:5px solid #1e9ab5;background:#e6f7fc!important;color:#174c5c!important;
  font-weight:700;box-shadow:none
}
.field-shell .sam-risk-fieldset:has([data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]) .sam-context-explanation{
  border-left-color:#be1831!important;background:#ffe4e7!important;color:#77172b!important
}
.field-shell .sam-safety-confirm{background:#edfaff;border-color:#55b8dc}
.field-shell .sam-submit{
  background:linear-gradient(110deg,#9d1425,#d52b3b)!important;
  box-shadow:0 8px 18px #8f1a2e39!important;border-radius:13px!important;
}
.field-shell .sam-alternative-select summary{color:#13597b;font-weight:750}

/* Noche: superficies pigmentadas, iconos saturados y alto contraste.
   No invertir, filtrar ni sustituir fotografías de maquinaria. */
body.field-shell.field-e4[data-field-theme="night"] .sam-section-label{
  background:linear-gradient(90deg,#ffce4d,#ed9824)!important;
  border-left-color:#ffe3a1;color:#102c41!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-visual-fieldset legend{
  color:#f5faff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card{
  background:linear-gradient(150deg,
    color-mix(in srgb,var(--sam-vivid) 34%,#102a3e),
    color-mix(in srgb,var(--sam-vivid) 14%,#0d2437))!important;
  border:2px solid color-mix(in srgb,var(--sam-vivid) 78%,#142f45)!important;
  border-top:5px solid var(--sam-vivid)!important;
  box-shadow:0 5px 17px #040f1991!important;color:#fff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card .sam-system-icon{
  background:var(--sam-vivid)!important;color:var(--sam-icon-ink)!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card .sam-system-name{
  color:#fff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card .sam-system-detail{
  color:#e1effb!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card[aria-pressed="true"]{
  background:linear-gradient(145deg,
    color-mix(in srgb,var(--sam-vivid) 40%,#123247),
    color-mix(in srgb,var(--sam-vivid) 25%,#142e43))!important;
  border:3px solid var(--sam-vivid)!important;border-top-width:6px!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--sam-vivid) 34%,transparent),
    0 8px 20px #061322ba!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card[aria-pressed="true"] .sam-system-icon{
  background:var(--sam-vivid)!important;color:var(--sam-icon-ink)!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-system-card[aria-pressed="true"] .sam-card-check{
  background:#082b40;color:#fff
}
body.field-shell.field-e4[data-field-theme="night"] .sam-symptom-chip{
  background:linear-gradient(150deg,#174d70,#17384f)!important;
  border:2px solid #319cc6!important;
  color:#eaf8ff!important;box-shadow:inset 0 2px 0 #22739b!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-symptom-chip[aria-pressed="true"]{
  background:linear-gradient(120deg,#1681c1,#08a5c4)!important;
  color:#fff!important;border:2.5px solid #a3eeff!important;
  box-shadow:0 0 0 3px #28c3e855,0 6px 18px #08b7df37!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card{
  background:linear-gradient(145deg,
    color-mix(in srgb,var(--sam-status-vivid) 37%,#10283e),
    color-mix(in srgb,var(--sam-status-vivid) 14%,#14283a))!important;
  border:2px solid color-mix(in srgb,var(--sam-status-vivid) 82%,#142c41)!important;
  border-top:5px solid var(--sam-status-vivid)!important;
  color:#fff!important;box-shadow:0 4px 14px #030f1b9c!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card .sam-context-icon{
  background:var(--sam-status-vivid)!important;color:var(--sam-status-ink)!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card .sam-context-name,
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card .sam-context-detail{
  color:#f5faff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-card[aria-pressed="true"]{
  background:linear-gradient(145deg,
    color-mix(in srgb,var(--sam-status-vivid) 40%,#153349),
    color-mix(in srgb,var(--sam-status-vivid) 30%,#112b41))!important;
  border:3px solid var(--sam-status-vivid)!important;
  border-top-width:6px!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--sam-status-vivid) 34%,transparent)!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"]{
  background:linear-gradient(140deg,#78293e,#3f2232)!important;
  border:2px solid #ef7287!important;border-top:5px solid #ff526f!important;
  color:#fff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]{
  background:linear-gradient(145deg,#bb2a45,#682439)!important;
  border:3px solid #ff8296!important;border-top-width:6px!important;
  box-shadow:0 0 0 3px #ff526f55!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset .sam-context-card[data-sam-value="POSSIBLE_RISK"] .sam-context-icon{
  background:#e53b57!important;color:#fff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-context-explanation{
  background:#194457!important;color:#d6f8ff!important;border-left-color:#24c7db
}
body.field-shell.field-e4[data-field-theme="night"] .sam-risk-fieldset:has([data-sam-value="POSSIBLE_RISK"][aria-pressed="true"]) .sam-context-explanation{
  background:#532537!important;color:#ffe7eb!important;border-left-color:#ff607c
}
body.field-shell.field-e4[data-field-theme="night"] .sam-alternative-select summary{
  color:#95dfff!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-safety-confirm{
  background:#193c56;border-color:#3e9cba;color:#edf8ff
}
@media(max-width:365px){
  .field-shell .sam-system-card{min-height:108px}
  .field-shell .sam-system-card .sam-system-icon{width:43px;height:43px;flex-basis:43px}
  .field-shell .sam-context-card{min-height:130px}
}
@media(prefers-reduced-motion:reduce){
  .field-shell .sam-system-card[aria-pressed="true"],
  .field-shell .sam-context-card[aria-pressed="true"]{transform:none!important}
}


/* SAM PRINT-01 · CTA for a saved local report. Only original SAM record is printable. */
.field-shell .sam-print-report-button{
  display:flex;align-items:center;justify-content:center;gap:9px;
  width:100%;min-height:49px;margin:12px 0 5px;padding:12px 13px!important;
  background:linear-gradient(115deg,#0d5484,#0b8eb1)!important;
  border:2px solid #136f96!important;border-radius:11px!important;
  box-shadow:0 5px 13px #12394f22!important;
  color:#fff!important;font-size:13px!important;font-weight:850!important;
  letter-spacing:.1px;text-align:center;
}
.field-shell .sam-print-report-button::before{
  content:"▣";display:inline-grid;place-items:center;background:#ffce58;
  color:#13334a;width:28px;height:28px;border-radius:7px;flex:0 0 28px;
  font-size:19px;line-height:1
}
.field-shell .sam-print-report-button:focus-visible{
  outline:3px solid #eeb43b!important;outline-offset:3px!important
}
body.field-shell.field-e4[data-field-theme="night"] .sam-print-report-button{
  background:linear-gradient(115deg,#176e9e,#128cad)!important;
  border-color:#7bdcff!important;color:#fff!important
}
