/* V33.10.98 — dark controls need semantic colour, not a wall of navy. */
html[data-theme="dark"] .quick-status-grid .quick-action.start,html[data-theme="dark"] .quick-status-grid .quick-action.reopen{background:#2563eb!important;border-color:#60a5fa!important;color:#fff!important}html[data-theme="dark"] .quick-status-grid .quick-action.waiting{background:#d97706!important;border-color:#fbbf24!important;color:#fff!important}html[data-theme="dark"] .quick-status-grid .quick-action.resolved,html[data-theme="dark"] .quick-status-grid .quick-action.closed{background:#15803d!important;border-color:#4ade80!important;color:#fff!important}
html[data-theme="dark"] .quick-status-grid .quick-action:hover{filter:brightness(1.16)!important;box-shadow:0 0 0 2px rgba(255,255,255,.08)!important}
/* The Tool/Service Desk rail is a separate readable viewport on desktop. */
@media(min-width:981px){.case-reader .ticket-side{position:sticky!important;top:82px!important;max-height:calc(100vh - 98px)!important;overflow-y:auto!important;overflow-x:hidden!important;padding-right:6px}.case-reader .ticket-side::-webkit-scrollbar{width:8px}.case-reader .ticket-side::-webkit-scrollbar-track{background:transparent}.case-reader .ticket-side::-webkit-scrollbar-thumb{background:#718096;border-radius:999px}html[data-theme="dark"] .case-reader .ticket-side::-webkit-scrollbar-thumb{background:#444c56}.case-reader .ticket-side{scrollbar-width:thin;scrollbar-color:#718096 transparent}html[data-theme="dark"] .case-reader .ticket-side{scrollbar-color:#444c56 transparent}}
/* Company Memory: every legacy white surface is neutralized in dark mode. */
html[data-theme="dark"] .mini-stats div,html[data-theme="dark"] .memory-categories span,html[data-theme="dark"] .v2851-contact-rule-card,html[data-theme="dark"] .v284-rule-form,html[data-theme="dark"] .v289-branch-card,html[data-theme="dark"] .branch-edit-form,html[data-theme="dark"] .asset-card,html[data-theme="dark"] .customer-service-row{background:#21262d!important;color:#c9d1d9!important;border-color:#30363d!important}html[data-theme="dark"] .mini-stats div:hover,html[data-theme="dark"] .v2851-contact-rule-card:hover,html[data-theme="dark"] .v289-branch-card:hover{background:#2d333b!important}html[data-theme="dark"] .mini-stats b,html[data-theme="dark"] .memory-categories b,html[data-theme="dark"] .v2851-rule-title,html[data-theme="dark"] .memory-list-item b{color:#c9d1d9!important}html[data-theme="dark"] .memory-list-item,html[data-theme="dark"] .linked-asset{border-color:#30363d!important}html[data-theme="dark"] .memory-list-item small,html[data-theme="dark"] .linked-asset small,html[data-theme="dark"] .v2851-media-row small{color:#8b949e!important}
/* One contact becomes one compact, readable row: identity | channels | automation. */
.v284-contact-rule-item{display:grid!important;grid-template-columns:minmax(170px,.8fr) minmax(210px,1fr) minmax(440px,2.2fr)!important;gap:14px!important;align-items:start!important;margin:10px 0!important;padding:14px!important;border:1px solid var(--border-color,#d8d2c8)!important;border-radius:12px!important;background:var(--bg-card,#f8f5ef)!important}.v284-contact-rule-item>div:first-child b,.v284-contact-rule-item>div:nth-child(2)>span{display:block;font-size:15px;line-height:1.35}.v284-contact-rule-item>div:nth-child(2) small{overflow-wrap:anywhere}.v2851-contact-rule-card{height:100%;margin:0!important;padding:12px!important}.v284-rule-form{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin:0!important;padding:0!important;background:transparent!important}.v284-rule-form label{margin:0!important;min-width:0}.v284-rule-form label.check{align-self:center;min-height:38px}.v284-rule-form .btn{grid-column:span 1;align-self:end;min-height:40px!important}.v284-rule-form select{min-height:40px!important}
html[data-theme="dark"] .v284-contact-rule-item{background:#21262d!important;border-color:#30363d!important}html[data-theme="dark"] .v2851-contact-rule-card{background:#2d333b!important;border-color:#444c56!important}html[data-theme="dark"] .v284-rule-form{background:transparent!important}
@media(max-width:1450px){.v284-contact-rule-item{grid-template-columns:minmax(170px,.85fr) minmax(220px,1.15fr)!important}.v2851-contact-rule-card{grid-column:1/-1}.v284-rule-form{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media(max-width:760px){.v284-contact-rule-item{grid-template-columns:1fr!important;padding:12px!important}.v2851-contact-rule-card{grid-column:auto}.v284-rule-form{grid-template-columns:1fr!important}.v284-rule-form .btn{grid-column:auto;width:100%}}
