/* Estoque: mesmas proporções compactas da tela original. */
.stock-page{display:flex;flex-direction:column;gap:16px}
.stock-header h1{margin:3px 0 4px;font-size:36px}
.stock-header p{margin:0;color:var(--muted);font-weight:750}
.stock-page .eyebrow{color:#22d3ee;text-transform:uppercase;font-size:11px;letter-spacing:.08em}

.stock-form-card{padding:20px;overflow:visible}
.stock-section-title{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:end;gap:14px;margin-bottom:16px}
.stock-section-title h2{margin:4px 0 0;line-height:1.15}
.stock-save-btn{width:100%;height:44px;min-height:44px}
.stock-form-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end}
.stock-form-grid label{display:grid;gap:7px;min-width:0;color:#d7e1ee;font-size:12px;font-weight:800}
.stock-form-grid input,.stock-form-grid select{width:100%;min-width:0;height:48px;padding:0 13px;border:1px solid var(--line);border-radius:10px;background:#101c2d;color:var(--text);font:inherit}
.stock-form-grid select{appearance:none;padding-right:34px;background-image:linear-gradient(45deg,transparent 50%,#9fb0c8 50%),linear-gradient(135deg,#9fb0c8 50%,transparent 50%);background-position:calc(100% - 17px) 50%,calc(100% - 11px) 50%;background-size:6px 6px;background-repeat:no-repeat}

.stock-search{min-height:54px;padding:0 16px;display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:10px}
.stock-search>span{color:var(--muted);font-size:22px;line-height:1}
.stock-search input{width:100%;min-width:0;height:50px;padding:0;border:0;background:transparent;color:var(--text);font:inherit;outline:none}

.stock-intel-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.stock-intel-grid>div{min-height:78px;padding:12px 15px;border:1px solid var(--line);border-radius:13px;background:var(--panel);display:flex;flex-direction:column;justify-content:space-between;gap:3px}
.stock-intel-grid span,.stock-intel-grid small{color:var(--muted);font-size:11px;font-weight:800;line-height:1.2}
.stock-intel-grid strong{color:var(--accent);font-size:20px;line-height:1}

.stock-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.stock-tab{min-height:56px;padding:0 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);display:flex;align-items:center;justify-content:space-between;font:inherit;font-weight:850;cursor:pointer}
.stock-tab strong{width:32px;height:32px;border-radius:50%;background:#ffffff0c;display:grid;place-items:center}
.stock-tab.active{box-shadow:0 12px 26px #0003}
.stock-tab.success strong{color:#22c55e;background:#22c55e1c}.stock-tab.success.active{border-color:#22c55e;background:#22c55e17}.stock-tab.success.active strong{color:white;background:#22c55e}
.stock-tab.warning strong{color:#fbbf24;background:#f59e0b1c}.stock-tab.warning.active{border-color:#f59e0b;background:#f59e0b17}.stock-tab.warning.active strong{color:white;background:#f59e0b}
.stock-tab.info strong{color:#60a5fa;background:#3b82f61c}.stock-tab.info.active{border-color:#3b82f6;background:#3b82f617}.stock-tab.info.active strong{color:white;background:#3b82f6}
.stock-tab.danger strong{color:#f87171;background:#ef44441c}.stock-tab.danger.active{border-color:#ef4444;background:#ef444417}.stock-tab.danger.active strong{color:white;background:#ef4444}

.stock-content{display:none}.stock-content.active{display:block}
.stock-table-card{padding:16px;overflow:auto}
.stock-table{width:100%;border-collapse:collapse;min-width:900px;overflow:hidden;border-radius:10px}
.stock-table-available{table-layout:fixed}
.stock-table-available th:nth-child(1),.stock-table-available td:nth-child(1){width:8%}
.stock-table-available th:nth-child(2),.stock-table-available td:nth-child(2){width:10%}
.stock-table-available th:nth-child(3),.stock-table-available td:nth-child(3){width:22%;white-space:normal;overflow-wrap:anywhere}
.stock-table-available th:nth-child(4),.stock-table-available td:nth-child(4){width:10%}
.stock-table-available th:nth-child(5),.stock-table-available td:nth-child(5){width:9%}
.stock-table-available th:nth-child(6),.stock-table-available td:nth-child(6){width:11%}
.stock-table-available th:nth-child(7),.stock-table-available td:nth-child(7){width:10%}
.stock-table-available th:nth-child(8),.stock-table-available td:nth-child(8){width:20%}
.stock-table th{padding:12px 10px;background:#18253a;color:#9fb0c8;text-align:center;font-size:13px;font-weight:850}
.stock-table td{padding:12px 10px;border-top:1px solid var(--line);color:#dbe6f4;font-size:14px;text-align:center;vertical-align:middle;font-weight:750}
.stock-table tbody tr:hover{background:#18c7d908}
.stock-code{color:#a8b7ca!important;font-weight:850;white-space:nowrap}.stock-model{font-weight:850}
.stock-pill{padding:6px 9px;border-radius:999px;font-size:10px;font-weight:900}.stock-pill.success{color:#22c55e;background:#22c55e1c}.stock-pill.info{color:#38d5e6;background:#18c7d91c}.stock-pill.warning{color:#fbbf24;background:#f59e0b1c}.stock-pill.danger{color:#f87171;background:#ef44441c}
.stock-qty-control{display:flex;align-items:center;justify-content:center;gap:6px}.stock-qty-control>span{min-width:32px;height:32px;display:grid;place-items:center;background:#18c7d91c;color:var(--accent);border-radius:50%;font-weight:900}.inline-action-form{display:inline}.stock-qty-btn{width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:50%;background:#17253a;color:var(--text);font-size:16px;cursor:pointer}
.stock-delete,.stock-open{min-height:34px;padding:6px 10px;white-space:nowrap}.stock-delete{border:1px solid #ef44445c;background:#ef4444;color:white}
.stock-empty{text-align:center!important;color:var(--muted)!important;padding:28px!important}.stock-empty-panel{min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:var(--muted)}.stock-empty-panel strong{color:var(--text)}
.stock-actions{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.stock-actions form{margin:0}.stock-actions .button{font-size:12px}
.stock-scrap{padding:7px;min-height:34px;min-width:34px;color:#fbbf24;background:#f59e0b18;border:1px solid #f59e0b55}
.stock-scrap:hover{background:#f59e0b30}
.stock-cost-option{display:flex;align-items:flex-start;gap:10px;margin:14px 0 0;padding:10px 12px;border:1px solid transparent;border-radius:10px;color:var(--text);font-size:13px;font-weight:750;cursor:pointer;transition:border-color .16s ease,background .16s ease}
.stock-cost-option:has(input:checked){border-color:#22c55e80;background:#22c55e14}
.stock-cost-option:has(input:checked)>span::after{content:"Ativado · este custo não entrará no financeiro";display:block;margin-top:5px;color:#4ade80;font-size:11px;font-weight:850}
.stock-cost-option input{width:17px;height:17px;flex:0 0 17px;margin:2px 0 0;accent-color:var(--accent)}
.stock-cost-option small,.stock-help{display:block;color:var(--muted);font-size:12px;font-weight:500;line-height:1.5;margin-top:4px}
.stock-cost-note{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.stock-editor h2{font-size:28px;margin:5px 0 22px;color:var(--accent)}
.stock-editor .stock-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.stock-editor .stock-help{margin:18px 0}.stock-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.stock-cost-option[hidden]{display:none}
@media(max-width:600px){.stock-editor .stock-form-grid{grid-template-columns:1fr}}

@media(max-width:1500px){.stock-form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1400px){.stock-table th,.stock-table td{padding:12px 6px}.stock-table .stock-code{font-size:13px}.stock-qty-control{gap:3px}.stock-qty-control>span{min-width:24px;height:28px}.stock-qty-btn{width:24px;height:24px}.stock-actions{gap:4px}.stock-actions .button{font-size:11px;padding:6px 7px}.stock-actions .stock-scrap{min-width:30px}}
@media(max-width:1200px){.stock-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stock-intel-grid,.stock-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.stock-form-grid,.stock-intel-grid,.stock-tabs{grid-template-columns:1fr}.stock-section-title{grid-template-columns:1fr}.stock-table-card{padding:12px}}
