/* REVTEK Management R2.1 — isolated corrective layer */
/* Restore readable status badges only on the requested management pages. */
body[data-r21-view="clients"] .b04-status.ok,body[data-r21-view="gateways"] .b04-status.ok,body[data-r21-view="phones"] .b04-status.ok,body[data-r21-view="billing"] .b04-status.ok,body[data-r21-view="users"] .b04-status.ok,
body[data-r21-view="clients"] .online,body[data-r21-view="gateways"] .online,body[data-r21-view="phones"] .online,body[data-r21-view="billing"] .online,body[data-r21-view="users"] .online{background:linear-gradient(180deg,#78f09a,#43d978)!important;color:#07140a!important;border:1px solid #22a957!important;font-weight:950!important;text-shadow:none!important;border-radius:999px;padding:4px 9px}
body[data-r21-view="clients"] .b04-status.bad,body[data-r21-view="gateways"] .b04-status.bad,body[data-r21-view="phones"] .b04-status.bad,body[data-r21-view="billing"] .b04-status.bad,body[data-r21-view="users"] .b04-status.bad,
body[data-r21-view="clients"] .offline,body[data-r21-view="gateways"] .offline,body[data-r21-view="phones"] .offline,body[data-r21-view="billing"] .offline,body[data-r21-view="users"] .offline{background:linear-gradient(180deg,#ff8a8a,#ff6262)!important;color:#170303!important;border:1px solid #d83b3b!important;font-weight:950!important;text-shadow:none!important;border-radius:999px;padding:4px 9px}
body[data-r21-view="clients"] .b04-status.warn,body[data-r21-view="gateways"] .b04-status.warn,body[data-r21-view="phones"] .b04-status.warn,body[data-r21-view="billing"] .b04-status.warn,body[data-r21-view="users"] .b04-status.warn{background:linear-gradient(180deg,#ffe67a,#f7c948)!important;color:#171005!important;border:1px solid #d6a719!important;font-weight:950!important;text-shadow:none!important}

/* Live-call summary: each state is immediately recognizable, Answered keeps its green look. */
.live-summary-metrics .metric{transition:transform .15s ease,border-color .15s ease;overflow:hidden}.live-summary-metrics .metric:hover{transform:translateY(-1px)}
.live-summary-metrics .r21-live-total{border-top:4px solid #14b8a6!important;background:linear-gradient(180deg,rgba(20,184,166,.20),rgba(20,184,166,.03)),var(--panel,#111827)!important}
.live-summary-metrics .r21-live-dialing{border-top:4px solid #3b82f6!important;background:linear-gradient(180deg,rgba(59,130,246,.20),rgba(59,130,246,.03)),var(--panel,#111827)!important}
.live-summary-metrics .r21-live-ringing{border-top:4px solid #06b6d4!important;background:linear-gradient(180deg,rgba(6,182,212,.22),rgba(6,182,212,.03)),var(--panel,#111827)!important}
.live-summary-metrics .r21-live-early{border-top:4px solid #f59e0b!important;background:linear-gradient(180deg,rgba(245,158,11,.22),rgba(245,158,11,.03)),var(--panel,#111827)!important}
.live-summary-metrics .r21-live-local{border-top:4px solid #a855f7!important;background:linear-gradient(180deg,rgba(168,85,247,.22),rgba(168,85,247,.03)),var(--panel,#111827)!important}
.live-summary-metrics .r21-live-answered{border-top:4px solid #22c55e!important;background:linear-gradient(180deg,rgba(34,197,94,.30),rgba(34,197,94,.05)),var(--panel,#111827)!important;box-shadow:inset 0 0 0 1px rgba(34,197,94,.20)}
.r21-connected-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-left:8px;background:#14532d;vertical-align:middle}.r21-connected-dot.active{background:#32e86f;box-shadow:0 0 0 4px rgba(50,232,111,.14),0 0 16px rgba(50,232,111,.95);animation:r21Blink .9s infinite}@keyframes r21Blink{0%,45%{opacity:1;transform:scale(1)}50%,100%{opacity:.18;transform:scale(.78)}}

/* Statistics: coloured but lightweight SVG/CSS charts. */
body[data-r21-view="statistics"] .stats-kpis article:nth-child(1){border-top:4px solid #3b82f6;background:linear-gradient(180deg,rgba(59,130,246,.13),transparent),var(--panel,#111827)}
body[data-r21-view="statistics"] .stats-kpis article:nth-child(2){border-top:4px solid #22c55e;background:linear-gradient(180deg,rgba(34,197,94,.13),transparent),var(--panel,#111827)}
body[data-r21-view="statistics"] .stats-kpis article:nth-child(3){border-top:4px solid #06b6d4}body[data-r21-view="statistics"] .stats-kpis article:nth-child(4){border-top:4px solid #a855f7}body[data-r21-view="statistics"] .stats-kpis article:nth-child(5){border-top:4px solid #f59e0b}body[data-r21-view="statistics"] .stats-kpis article:nth-child(6){border-top:4px solid #14b8a6}
body[data-r21-view="statistics"] .stats-chart-grid .panel:nth-child(1){border-color:rgba(59,130,246,.45)}body[data-r21-view="statistics"] .stats-chart-grid .panel:nth-child(2){border-color:rgba(34,197,94,.45)}
body[data-r21-view="statistics"] .stats-bar-row:nth-child(4n+1) .stats-bar-track span{background:linear-gradient(90deg,#2563eb,#38bdf8)}body[data-r21-view="statistics"] .stats-bar-row:nth-child(4n+2) .stats-bar-track span{background:linear-gradient(90deg,#7c3aed,#c084fc)}body[data-r21-view="statistics"] .stats-bar-row:nth-child(4n+3) .stats-bar-track span{background:linear-gradient(90deg,#ea580c,#fbbf24)}body[data-r21-view="statistics"] .stats-bar-row:nth-child(4n) .stats-bar-track span{background:linear-gradient(90deg,#059669,#34d399)}

.r21-monitor-launch{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0 14px;padding:9px 11px;border:1px solid rgba(56,189,248,.35);border-radius:11px;background:linear-gradient(90deg,rgba(37,99,235,.11),rgba(16,185,129,.08))}.r21-monitor-button{background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;border-color:#38bdf8!important;box-shadow:0 5px 18px rgba(14,165,233,.18)}.r21-monitor-launch small{color:var(--muted,#94a3b8)}
.r21-alarm-metrics .metric:nth-child(1){border-top:4px solid #ef4444}.r21-alarm-metrics .metric:nth-child(2){border-top:4px solid #f97316}.r21-alarm-metrics .metric:nth-child(3){border-top:4px solid #facc15}.r21-alarm-metrics .metric:nth-child(4){border-top:4px solid #22c55e}

/* Routing status: explicit high-contrast states across light and dark themes. */
.route-status{display:inline-flex;align-items:center;gap:7px;min-width:94px;justify-content:center;padding:6px 10px;border:1px solid transparent;border-radius:999px;font-size:10px;font-weight:950;letter-spacing:.045em;line-height:1;text-shadow:none!important}
.route-status i{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.route-status.is-enabled{background:#b9f6ca!important;color:#063d1d!important;border-color:#22a957!important}
.route-status.is-enabled i{background:#07883b;box-shadow:0 0 0 3px rgba(7,136,59,.14)}
.route-status.is-disabled{background:#ffd0d0!important;color:#5f0909!important;border-color:#e34a4a!important}
.route-status.is-disabled i{background:#c81e1e;box-shadow:0 0 0 3px rgba(200,30,30,.13)}

body[data-r21-view="routing"] .b04-status.ok,
body[data-r21-view="routing"] .b04-status.bad{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:88px!important;min-height:27px!important;padding:5px 11px!important;
  border-radius:999px!important;font-size:10px!important;font-weight:950!important;
  letter-spacing:.045em!important;line-height:1!important;text-shadow:none!important;
}
body[data-r21-view="routing"] .b04-status.ok{background:#b9f6ca!important;color:#063d1d!important;border:1px solid #22a957!important}
body[data-r21-view="routing"] .b04-status.bad{background:#ffd0d0!important;color:#5f0909!important;border:1px solid #e34a4a!important}
