/* Admin console → Triage rules (admin-triage-rules.js). Uses the site tokens so light and dark both work. */
.tr-rules{margin:32px 0;padding:24px;border:1px solid var(--line,#dce5e8);border-radius:16px;background:var(--panel,#fff)}
.tr-rules h2{margin-top:0}.tr-rules h3{margin:22px 0 10px}.tr-rules h4{margin:16px 0 8px}
.tr-rules-live{padding:12px 14px;border-radius:10px;background:var(--brand-soft,#eef6f5)}
.tr-rules-form{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}.tr-rules-form>*,.tr-rules-bt{min-width:0}
.tr-rules-form fieldset{border:1px solid var(--line,#dce5e8);border-radius:12px;padding:14px 16px;margin:0;min-width:0}
.tr-rules-form legend{font-weight:700;padding:0 6px}
.tr-rules-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.tr-rules-field{display:grid;gap:6px;font-weight:700;font-size:.85rem}
.tr-rules-field small{font-weight:400}
.tr-rules-field input,.tr-rules-field textarea,.tr-rules-card textarea{width:100%;box-sizing:border-box;padding:10px;border:1px solid var(--line,#bbcfd4);border-radius:9px;background:var(--bg,#fff);color:var(--ink,#1d3f4c);font:inherit;font-weight:400}
.tr-rules-total{display:block;margin-top:8px;font-weight:700}
.tr-rules-floors{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.tr-rules-floors label{display:flex;gap:8px;align-items:flex-start;line-height:1.5}
.tr-rules-floors input{margin-top:4px}
.tr-rules-problems{color:#9a3412;margin:0;padding-left:20px}.tr-rules-problems:empty{display:none}
.tr-rules-actions{display:flex;flex-wrap:wrap;gap:10px}
.tr-rules-actions .btn{min-height:44px}
.tr-rules-bt{border:1px solid var(--line,#dce5e8);border-radius:12px;padding:14px 16px}
.tr-rules-block{padding:12px;border-radius:10px;background:#fdecea;color:#7f1d1d}
.tr-rules-warn{padding:10px 12px;border-radius:10px;background:#fff4e5;color:#7a4b00}
.tr-rules-ok{padding:10px 12px;border-radius:10px;background:#e8f5ee;color:#14532d}
.tr-rules-kpis{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:12px 0}
.tr-rules-kpis dt{font-weight:700}
.tr-rules-table{overflow-x:auto}
.tr-rules-table table{border-collapse:collapse;min-width:520px;font-size:.85rem}
.tr-rules-table caption{text-align:left;font-size:.8rem;padding-bottom:6px}
.tr-rules-table th,.tr-rules-table td{border:1px solid var(--line,#dce5e8);padding:6px 10px;text-align:right}
.tr-rules-table th[scope=row]{text-align:left}
.tr-rules-calib{margin-top:12px}
.tr-rules-same{font-weight:700}.tr-rules-moved{background:#fff4e5;color:#7a4b00;font-weight:700}
.tr-rules-list summary{cursor:pointer;font-weight:700;min-height:32px}
.tr-rules-card{border:1px solid #c6dcd7;border-radius:14px;padding:16px 18px;background:var(--brand-soft,#f6fbf9)}
.tr-rules-history{padding-left:22px;line-height:1.6}.tr-rules-history li{margin:10px 0}
.tr-rules-msg{min-height:1.2em}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */:where([data-theme="dark"]) .tr-rules-block{background:#3b1515;color:#fecaca}:where([data-theme="dark"]) .tr-rules-warn,:where([data-theme="dark"]) .tr-rules-moved{background:#3a2a0c;color:#fde68a}:where([data-theme="dark"]) .tr-rules-ok{background:#12301f;color:#bbf7d0}@media (prefers-color-scheme: dark){:where(:not([data-theme])) .tr-rules-block{background:#3b1515;color:#fecaca}:where(:not([data-theme])) .tr-rules-warn,:where(:not([data-theme])) .tr-rules-moved{background:#3a2a0c;color:#fde68a}:where(:not([data-theme])) .tr-rules-ok{background:#12301f;color:#bbf7d0}}
@media(max-width:600px){.tr-rules{padding:16px}.tr-rules-kpis{grid-template-columns:1fr}}
