/* SilentGain inventory module: scoped additions to the existing console. */
.inventory-shell{min-width:0}
.inventory-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.inventory-tabs{flex:0 0 auto}
.inventory-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:20px}
.inventory-kpi{display:flex;flex-direction:column;align-items:flex-start;text-align:left;width:100%;color:var(--text);font-family:inherit;cursor:pointer}
.inventory-kpi:hover{border-color:var(--line2);transform:translateY(-1px)}
.inventory-kpi.is-active{border-color:var(--text);box-shadow:0 0 0 1px var(--text)}
.inventory-kpi .lab,.inventory-kpi .sub,.inventory-kpi .val{display:block}
.inventory-toolbar{padding:14px 0 16px;margin:0;border-bottom:1px solid var(--line)}
.inventory-toolbar .search{min-width:220px}
.inventory-table-wrap{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.inventory-table{table-layout:fixed}
.inventory-table th:nth-child(1){width:21%}
.inventory-table th:nth-child(2){width:16%}
.inventory-table th:nth-child(3){width:12%}
.inventory-table th:nth-child(4){width:12%}
.inventory-table th:nth-child(5){width:15%}
.inventory-table th:nth-child(6){width:19%}
.inventory-table th:last-child{width:54px}
.inventory-table tbody tr{cursor:pointer}
.inventory-table tbody tr:has(.cancel){box-shadow:inset 3px 0 #b33a2f}
.inventory-table td{overflow-wrap:anywhere}
.inventory-table td:last-child{text-align:right}
.inventory-catalog-table th:nth-child(1){width:31%}
.inventory-catalog-table th:nth-child(2){width:17%}
.inventory-catalog-table th:nth-child(3){width:14%}
.inventory-catalog-table th:nth-child(4){width:17%}
.inventory-catalog-table th:nth-child(5){width:13%}
.inventory-title,.inventory-cell-stack,.inventory-quantity{display:flex;flex-direction:column;gap:3px;min-width:0}
.inventory-title strong,.inventory-cell-stack strong{font-size:13.5px;line-height:1.35;overflow-wrap:anywhere}
.inventory-title>span,.inventory-sub,.inventory-quantity>span{font-size:11.5px;color:var(--g5);line-height:1.4;overflow-wrap:anywhere}
.inventory-quantity strong{font-family:var(--mono);font-size:15px}
.inventory-danger{color:#b33a2f;font-size:11.5px;font-weight:700}
.inventory-badge-warning{background:#fff5de;border-color:#e5c876;color:#8a5a00}
[data-theme="dark"] .inventory-badge-warning{background:rgba(217,164,65,.16);border-color:rgba(217,164,65,.38);color:#e6c074}
[data-theme="dark"] .inventory-danger{color:#ed8e82}
.inventory-empty{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:28px;color:var(--g5)}
.inventory-empty strong{color:var(--text);font-size:15px}
.inventory-empty.compact{min-height:90px;border-style:dashed;box-shadow:none}
.inventory-inline-error,.inventory-inline-alert{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border:1px solid var(--line);border-left:3px solid var(--text);background:var(--g1);padding:12px 14px;margin-bottom:18px}
.inventory-inline-error{border-left-color:#b33a2f}
.inventory-inline-error>span,.inventory-inline-alert>span{font-size:11.5px;color:var(--g6);text-align:right;line-height:1.45;overflow-wrap:anywhere}
.inventory-inline-alert strong{font-size:12.5px;line-height:1.4}
.inventory-modal.modal-wide{max-width:900px}
.inventory-form{min-width:0}
.inventory-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.inventory-check{display:flex;align-items:center;gap:9px;min-height:44px;font-size:13px;font-weight:500;cursor:pointer}
.inventory-check input{width:18px;height:18px;accent-color:var(--text)}
.inventory-field-hint{display:block;color:var(--g5);font-size:11.5px;line-height:1.45;margin-top:6px}
.inventory-detail{display:flex;flex-direction:column;gap:0}
.inventory-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:20px}
.inventory-detail-header h4{font-size:19px;line-height:1.25;margin:9px 0 2px;letter-spacing:0}
.inventory-detail-header p{color:var(--g5);font-size:12.5px}
.inventory-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.inventory-section{padding:20px 0;border-top:1px solid var(--line)}
.inventory-section:first-of-type{border-top:0}
.inventory-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.inventory-section-title h4{font-size:14px;line-height:1.3;letter-spacing:0}
.inventory-section-title>span{color:var(--g5);font-size:11.5px;text-align:right}
.inventory-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:8px;overflow:hidden}
.inventory-facts-two{grid-template-columns:1fr 1fr}
.inventory-facts>div{background:var(--surface);padding:13px;min-width:0}
.inventory-facts span{display:block;color:var(--g5);font-size:10.5px;text-transform:uppercase;font-weight:600;letter-spacing:.05em;margin-bottom:4px}
.inventory-facts strong{display:block;font-size:12.5px;line-height:1.35;overflow-wrap:anywhere}
.inventory-timeline{display:flex;flex-direction:column}
.inventory-event{display:grid;grid-template-columns:14px 1fr;gap:10px;position:relative;padding:0 0 16px}
.inventory-event:not(:last-child)::before{content:"";position:absolute;left:5px;top:10px;bottom:0;width:1px;background:var(--line2)}
.inventory-event-mark{width:11px;height:11px;border-radius:50%;background:var(--surface);border:2px solid var(--g5);margin-top:4px;z-index:1}
.inventory-event>div>div{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.inventory-event strong{font-size:12.5px}
.inventory-event time{font-size:11px;color:var(--g5);text-align:right}
.inventory-event p{font-size:12px;line-height:1.5;color:var(--g6);margin-top:5px;overflow-wrap:anywhere}

@media(max-width:1080px){
  .inventory-kpis{grid-template-columns:1fr 1fr}
  .inventory-table{table-layout:auto}
  .inventory-table th:nth-child(n){width:auto}
}
@media(max-width:640px){
  .inventory-head{align-items:stretch;flex-direction:column;margin-bottom:14px}
  .inventory-tabs{width:100%}
  .inventory-tabs button{flex:1 0 auto;min-height:44px}
  .inventory-kpis{display:grid;grid-template-columns:1fr 1fr;gap:9px}
  .inventory-kpi{min-height:108px;padding:14px}
  .inventory-kpi .val{font-size:27px}
  .inventory-toolbar{display:grid;grid-template-columns:1fr;gap:9px}
  .inventory-toolbar input,.inventory-toolbar select,.inventory-toolbar .btn{width:100%;min-width:0;min-height:44px}
  .inventory-table-wrap{border:0;box-shadow:none;overflow:visible;background:transparent}
  .inventory-table,.inventory-table tbody{display:block;width:100%}
  .inventory-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
  .inventory-table tr{display:block;border:1px solid var(--line);border-radius:8px;margin-bottom:10px;background:var(--surface);padding:3px 2px;box-shadow:var(--shadow)}
  .inventory-table td{display:flex;align-items:flex-start;justify-content:space-between;gap:13px;border:0;border-bottom:1px solid var(--g1);padding:10px 12px;text-align:right;min-height:42px;width:100%}
  .inventory-table td:last-child{border-bottom:0;justify-content:flex-end}
  .inventory-table td::before{content:attr(data-label);flex:0 0 auto;font-size:10px;line-height:1.5;text-transform:uppercase;color:var(--g5);font-weight:600;letter-spacing:.05em;text-align:left}
  .inventory-table td[data-label=""]::before{display:none}
  .inventory-table td>span,.inventory-table td>strong,.inventory-table td>.inventory-title,.inventory-table td>.inventory-cell-stack,.inventory-table td>.inventory-quantity{max-width:68%;text-align:right}
  .inventory-title,.inventory-cell-stack,.inventory-quantity{align-items:flex-end}
  .inventory-form-grid{grid-template-columns:1fr;gap:0}
  .inventory-inline-error,.inventory-inline-alert{flex-direction:column;gap:5px}
  .inventory-inline-error>span,.inventory-inline-alert>span{text-align:left}
  .inventory-detail-header{flex-direction:column;gap:12px}
  .inventory-detail-header>.btn{width:100%;min-height:44px}
  .inventory-facts{grid-template-columns:1fr 1fr}
  .inventory-facts>div{padding:11px}
  .inventory-section-title{align-items:flex-start}
  .inventory-event>div>div{flex-direction:column;gap:2px}
  .inventory-event time{text-align:left}
  .inventory-modal .modal-f{display:grid;grid-template-columns:1fr;gap:8px}
  .inventory-modal .modal-f .btn{width:100%;min-height:44px;white-space:normal}
}
@media(max-width:360px){
  .inventory-kpis{grid-template-columns:1fr}
  .inventory-kpi{min-height:94px}
  .inventory-facts{grid-template-columns:1fr}
  .inventory-table td>span,.inventory-table td>strong,.inventory-table td>.inventory-title,.inventory-table td>.inventory-cell-stack,.inventory-table td>.inventory-quantity{max-width:62%}
}
.inventory-consumption{display:flex;flex-direction:column;gap:6px}
.inventory-consumption label{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--g5)}
.inventory-consumption-row{display:flex;gap:8px;align-items:center}
.inventory-consumption-row input{width:140px}
.inventory-consumption small{color:var(--g5);font-size:12.5px}
