/* Clinic stock box under each medicine of a treatment plan or report update (stk-). Mobile first. */
.nav-stock-link { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 10px 12px; margin: 2px 0; border-radius: var(--radius, 8px); color: var(--gray-600, #4b5563); font-weight: 550; font-size: var(--text-base, 0.88rem); text-decoration: none; }
.nav-stock-link:hover, .nav-stock-link:focus-visible { background: var(--gray-50, #f9fafb); color: var(--gray-900, #111827); }
.stk-slot { margin-top: 8px; }
.stk { border: 1px solid #e5e7eb; border-left: 4px solid #9ca3af; border-radius: 10px; padding: 8px 10px; background: #f9fafb; font-size: 0.86rem; line-height: 1.45; color: #1f2937; }
.stk-box-green { border-left-color: #16a34a; background: #f0fdf4; }
.stk-box-amber { border-left-color: #d97706; background: #fffbeb; }
.stk-box-red { border-left-color: #dc2626; background: #fef2f2; }
.stk-box-gray { border-left-color: #9ca3af; }
.stk-loading, .stk-error { color: #6b7280; font-size: 0.82rem; border-left-color: #cbd5e1; }
.stk-quiet { border: 0; background: none; padding: 0; }
.stk-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.stk-summary { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.stk-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.stk-chip-green { background: #dcfce7; color: #166534; }
.stk-chip-amber { background: #fef3c7; color: #92400e; }
.stk-chip-red { background: #fee2e2; color: #991b1b; }
.stk-chip-blue { background: #dbeafe; color: #1e40af; }
.stk-chip-gray { background: #f3f4f6; color: #4b5563; }
.stk p { margin: 4px 0; }
.stk-dose { color: #374151; }
.stk-checks { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 2px; }
.stk-checks li { display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.stk-check-warn { color: #92400e; }
.stk-check-block { color: #991b1b; font-weight: 600; }
.stk-check-ok { color: #166534; }
.stk-compact { font-size: 0.82rem; }
.stk-given { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 8px; border-radius: 8px; background: #dcfce7; color: #14532d; font-weight: 600; }
.stk-given small { font-weight: 400; color: #166534; }
.stk-undone { background: #f3f4f6; color: #4b5563; font-weight: 400; text-decoration: line-through; }
.stk-undone small { text-decoration: none; }
.stk-alts { margin-top: 8px; display: grid; gap: 8px; }
.stk-alt-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 40px; padding: 6px 12px; border: 1px solid #93c5fd; border-radius: 999px; background: #eff6ff; color: #1e40af; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.stk-alt-toggle:hover { background: #dbeafe; }
.stk-alts h5 { margin: 0; font-size: 0.84rem; color: #1e3a8a; }
.stk-alt { border: 1px solid #dbeafe; border-radius: 10px; background: #fff; padding: 8px 10px; }
.stk-alt header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.stk-alt header b { overflow-wrap: anywhere; }
.stk-stock { margin-left: auto; color: #4b5563; font-size: 0.8rem; white-space: nowrap; }
.stk-chosen { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.stk-why { color: #1f2937; }
.stk-watch { color: #92400e; }
.stk-source { color: #6b7280; font-size: 0.78rem; }
.stk-detail summary, .stk-blocked summary { cursor: pointer; color: #374151; font-weight: 600; padding: 4px 0; min-height: 32px; display: flex; align-items: center; }
.stk-blocked ul { margin: 4px 0 0; padding-left: 4px; list-style: none; display: grid; gap: 3px; }
.stk-none { color: #7f1d1d; font-weight: 600; }
.stk-noted { color: #166534; font-weight: 600; }
.stk .btn { margin: 6px 6px 0 0; min-height: 40px; }
.stk-btn-quiet { background: #fff; border: 1px solid #d1d5db; color: #374151; }
.stk-give { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; margin-top: 6px; padding: 8px; border: 1px dashed #93c5fd; border-radius: 8px; background: #eff6ff; }
.stk-give label { display: grid; gap: 2px; font-size: 0.8rem; color: #374151; }
.stk-give input { width: 110px; padding: 8px; border: 1px solid #93c5fd; border-radius: 8px; font-size: 1rem; }
.rp-swap { display: block; color: #1e40af; font-weight: 600; }
.rp-substitute { margin-top: 8px; }
@media print { .stk-slot { display: none !important; } }
