/* Viscose v3.0 — Stock + Dashboard */
.stock-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#C62828;color:#fff;font-size:11px;font-weight:700;margin-left:auto;}
.stk-head{gap:12px;flex-wrap:wrap;}
.stk-actions{display:flex;gap:8px;flex-wrap:wrap;}
.stk-low-banner{display:flex;gap:12px;align-items:flex-start;background:#FDECEA;border:1px solid rgba(198,40,40,.45);color:#8E1B1B;border-radius:12px;padding:12px 14px;margin:14px 0;cursor:pointer;}
.stk-low-ic{font-size:20px;line-height:1.2;}
.stk-low-item{display:inline-block;background:#fff;border:1px solid rgba(198,40,40,.35);border-radius:8px;padding:2px 8px;margin:3px 4px 0 0;font-size:13px;}
.stk-low-item small{color:#9b5a5a;}
.stk-low-sub{font-size:12px;margin-top:4px;color:#9b3a3a;}
.stk-setup{margin:12px 0;}
.stk-legend{margin:10px 0 6px;line-height:1.5;}
.stk-all{display:inline-flex;align-items:center;gap:8px;font-size:14px;margin:6px 0 8px;cursor:pointer;}
.stk-all input{width:18px;height:18px;}
.stk-table td,.stk-table th{white-space:nowrap;}
.stk-table td:first-child{white-space:normal;min-width:150px;}
.stk-in{width:78px;text-align:right;}
.stk-sub{font-size:11.5px;color:var(--sub);font-weight:500;margin-top:2px;}
.stk-sub.danger{color:#C62828;font-weight:600;}
.stk-link{font:inherit;font-weight:700;color:var(--accent-deep,var(--accent-hover,#3F650C));background:none;border:0;border-bottom:1px dashed currentColor;padding:0;cursor:pointer;}
tr.stk-low td{background:#FFF6F5;}
tr.stk-overdue td{background:#FFF6F5;}
.ok-num{color:#1E7A4C;}
.stk-sec{margin-top:22px;gap:8px;flex-wrap:wrap;}
.stk-holders tr,.dash-unpaid tr[data-open-order],.dash-top tr{cursor:pointer;}
.stk-modal{max-width:720px;}
.stk-order-warn{background:#FFF4E5;border:1px solid #F0B35A;color:#7A4A00;border-radius:10px;padding:10px 12px;font-size:14px;margin:6px 0;}
.stk-order-warn div{margin-top:3px;}
.ci-mode{display:flex;gap:8px;margin:0 0 16px;}
.ci-mode button{flex:1;font:inherit;font-size:16px;font-weight:700;padding:12px 10px;border-radius:12px;border:1px solid var(--line-strong);background:var(--surface);cursor:pointer;color:var(--ink);}
.ci-mode button.on{background:var(--forest,#0F1F1F);color:#fff;border-color:var(--forest,#0F1F1F);}
.stk-pc-btn{margin-bottom:14px;border-color:var(--accent,var(--accent,#4E7A12));background:var(--accent-soft,var(--accent-soft,#EEF6DD));color:var(--accent-deep,var(--accent-deep,#2F4D07));}
.stk-s-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 14px;}
.stk-s-card.low{border-color:rgba(198,40,40,.5);background:#FFF8F7;}
.stk-s-name{font-size:17px;font-weight:700;}
.stk-s-name small{display:block;font-size:12px;color:var(--sub);font-weight:500;}
.stk-s-nums{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px;}
.stk-s-nums span{display:flex;flex-direction:column;align-items:center;background:var(--tint,#F8FCF3);border-radius:10px;padding:6px 2px;text-align:center;}
.stk-s-nums b{font-size:20px;}
.stk-s-nums small{font-size:11px;color:var(--sub);line-height:1.2;}
.stk-s-h2{font-size:18px;margin:20px 0 8px;}
.stk-s-log{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:4px 12px;}
.stk-s-log div{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;}
.stk-s-log div:last-child{border-bottom:0;}
/* dashboard */
.dash-cards{margin-top:14px;}
.dash-card[role=button]{cursor:pointer;}
.dash-cmp{font-size:12.5px;color:var(--sub);margin-top:6px;}
.dash-cmp.up{color:#1E7A4C;}
.dash-cmp.down{color:#B42318;}
.dash-cmp span{color:var(--sub);}
.dash-unit{font-size:14px;font-weight:500;color:var(--sub);}
.dash-panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin-top:16px;min-width:0;}
.dash-panel h2{margin:0;font-size:18px;}
.dash-chart{width:100%;height:auto;display:block;margin-top:8px;}
.dash-bar{fill:var(--accent-line,#C9E09A);}
.dash-bar.now{fill:var(--accent,#4E7A12);}
.dash-bar-val{font-size:11px;fill:#464A44;font-weight:600;}
.dash-bar-lbl{font-size:11.5px;fill:#77767F;}
.dash-axis{stroke:#DFE4DB;stroke-width:1;}
.dash-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,470px),1fr));gap:16px;}
.dash-two .dash-panel{margin-top:16px;}
.dash-ph{gap:8px;flex-wrap:wrap;margin-bottom:8px;}
.dash-tools{display:flex;gap:6px;align-items:center;}
.dash-tools select{padding:6px 8px;font-size:13px;}
.dash-unpaid-wrap{max-height:420px;overflow:auto;}
.dash-ops-h{margin-top:26px;}
@media (max-width:900px){ .dash-two{gap:0;} }
.dash-panel .invoice-report-table th,.dash-panel .invoice-report-table td{padding:8px 8px;}
.dash-panel .invoice-report-table td.num,.dash-panel .invoice-report-table th.num{white-space:nowrap;}
.dash-panel .table-wrap{overflow-x:auto;}
.dash-chart{max-height:260px;}
@media (max-width:560px){
  .dash-bar-val{font-size:15px;} .dash-bar-lbl{font-size:16px;}
  .stk-actions{width:100%;} .stk-actions .btn{flex:1;}
  .dash-panel{padding:12px;}
}
.dash-rank{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--tint,var(--accent-soft,#EEF6DD));font-size:11px;font-weight:700;margin-right:8px;color:#5B5A63;vertical-align:1px;}
.dash-top .stk-sub{margin-left:30px;}
.dash-panel .table-wrap .invoice-report-table{min-width:0;}
.stk-modal .table-wrap .invoice-report-table{min-width:0;}
@media (max-width:560px){ .stk-holders.invoice-report-table,.stk-log.invoice-report-table{min-width:560px;} }
.stk-lbl{display:none;}
@media (max-width:620px){
  .table-wrap .stk-table.invoice-report-table{min-width:0;}
  .stk-table thead{display:none;}
  .stk-table,.stk-table tbody,.stk-table tr,.stk-table td{display:block;width:100%;box-sizing:border-box;}
  .stk-table tr{border-bottom:1px solid var(--line);padding:8px 0;}
  .stk-table tbody tr:last-child{border-bottom:0;}
  .stk-table td{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 14px;border:0!important;white-space:normal;}
  .stk-table td:first-child{display:block;padding-top:6px;font-size:15px;}
  .stk-lbl{display:inline;color:var(--sub);font-size:13px;font-weight:500;text-align:left;}
  .stk-table td.num > .stk-lbl{margin-right:auto;}
  .stk-table td .stk-sub{margin:0 0 0 8px;}
  .stk-table td .stk-sub{text-align:right;}
}
