/* 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;
}
