/* Refs #119. Page rules of 생산 (production-overview-ui.js) and 알람·작업 (alarms-ui.js) on top of insight.css,
   after mockups insight-production.html and insight-alarms.html. Long-text rules: design/wording.md §3. */
/* 첫 수신 대기 status chip (status.js awaiting_first_report): an expected wait, blue like information. */
.status-chip.status-awaiting_first_report{--chip-bg:var(--ds-color-scale-primary-100);--chip-fg:var(--ds-color-scale-primary-600);--chip-line:var(--ds-color-scale-primary-200)}
.status-summary .summary-awaiting_first_report:not(.summary-zero) b{color:var(--ds-color-scale-primary-600)}

/* Head actions that open in place: 시리얼 검색 (asset lookup form) and the lot list. */
.insight .serial-search,.insight .lot-menu{position:relative}
.insight .serial-search>summary,.insight .lot-menu>summary{list-style:none}
.insight .serial-search>summary::-webkit-details-marker,.insight .lot-menu>summary::-webkit-details-marker{display:none}
.insight .lot-menu>summary{max-width:13rem}
.insight .lot-menu>summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.insight .serial-form,.insight .lot-list{position:absolute;right:0;top:2.25rem;z-index:5;background:var(--floating);border:1px solid var(--line);border-radius:var(--i-radius);box-shadow:var(--ds-elevation-shadow-s3-value);padding:.75rem}
.insight .serial-form,.insight #asset-lookup-form.serial-form{display:flex;align-items:flex-end;gap:.5rem;width:min(22rem,calc(100vw - 2rem))}
.insight #asset-lookup-form.serial-form .btn{height:2rem;min-height:2rem}
.insight .serial-form label{display:flex;flex-direction:column;gap:.25rem;flex:1 1 0%;min-width:0;font-size:.75rem;color:var(--muted);font-weight:700}
.insight .serial-form .btn{flex:none;width:auto;min-width:0}
.insight .serial-form input{width:100%;height:2rem;min-height:2rem;font-size:.8125rem}
.insight .serial-search .form-error{position:absolute;right:0;top:6.5rem;z-index:5;width:min(22rem,calc(100vw - 2rem))}
.insight .lot-list{display:flex;flex-direction:column;min-width:10rem;max-width:16rem;max-height:18rem;overflow-y:auto;padding:.375rem}
.insight .lot-list a{padding:.375rem .5rem;border-radius:.25rem;color:var(--ink);text-decoration:none;font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.insight .lot-list a[aria-current=true]{font-weight:700;background:var(--surface)}

/* 알람 table spans the card edge to edge. */
.insight .alarm-card{padding:0}
.insight .alarm-card table.t th:first-child,.insight .alarm-card table.t td:first-child{padding-left:1rem}
.insight .alarm-card .note{padding:0 1rem .875rem}
.insight .alarm-card .err,.insight .alarm-card .empty{margin:1rem}
.insight .alarm-card .err+table.t{margin-top:0}
.insight td.what b.clamp2{font-weight:700}
.insight td.who-c .site.who{color:inherit;font-size:.8125rem;max-width:10rem}
.insight b.rule-name{white-space:nowrap}

/* 현장 작업 지시: title + one line of who/when, then the four-step strip. */
.insight table.wo{table-layout:fixed}
.insight table.wo td.wo-what{width:45%;min-width:0}
.insight table.wo .wo-title{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:73.75rem){.insight td.who-c .site.who{max-width:6.25rem}}
@media(max-width:47.5rem){
 .insight table.wo,.insight table.wo tbody,.insight table.wo tr,.insight table.wo td,.insight table.wo td.wo-what{display:block;width:auto}
 .insight table.wo tr{padding:.5rem 0;border-bottom:1px solid var(--line)}.insight table.wo tr:last-child{border-bottom:0}
 .insight table.wo td{border:0;padding:.125rem 0}
 .insight td.who-c .site.who{max-width:none}
 .insight .serial-form,.insight .lot-list{right:auto;left:0}
 .insight .serial-search .form-error{right:auto;left:0}
}
