/* RG Engine Dashboard Widget System */
.rg-dashboard{display:grid;gap:18px}
.rg-dashboard__header h2{margin:0}
.rg-dashboard__header p{margin:6px 0 0;color:var(--text-muted)}
.rg-dashboard__grid{
  display:grid;
  grid-template-columns:repeat(var(--rg-dashboard-columns,4),minmax(0,1fr));
  gap:16px
}
.rg-widget{
  grid-column:span var(--rg-widget-col,1);
  grid-row:span var(--rg-widget-row,1);
  display:grid;align-content:start;gap:16px;min-height:150px;padding:20px;
  border:1px solid var(--border);border-radius:var(--radius-lg);
  background:linear-gradient(145deg,color-mix(in srgb,var(--surface) 95%,var(--orange) 5%),var(--surface));
  box-shadow:var(--shadow)
}
.rg-widget>header{display:flex;justify-content:space-between;gap:12px}
.rg-widget>header span{color:var(--text-muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.08em}
.rg-widget>header h3{margin:4px 0 0;font-size:1rem}
.rg-widget-refresh{color:var(--orange);white-space:nowrap}
.rg-widget-metric{display:flex;align-items:end;justify-content:space-between;gap:14px}
.rg-widget-metric strong{font-size:clamp(2rem,5vw,3.3rem);line-height:1}
.rg-widget-metric small{font-weight:850}.rg-widget-metric .positive{color:#78ecad}.rg-widget-metric .negative{color:#ff9d9d}
.rg-widget-progress{display:grid;gap:12px}.rg-widget-progress>div:first-child{display:flex;justify-content:space-between}
.rg-widget-progress__track{height:12px;overflow:hidden;border-radius:999px;background:var(--bg-elevated)}
.rg-widget-progress__track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--orange),var(--blue))}
.rg-widget-list{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.rg-widget-list li{display:flex;justify-content:space-between;gap:12px;padding-bottom:9px;border-bottom:1px solid var(--border)}
.rg-widget-sparkline{width:100%;height:90px;color:var(--orange)}
.rg-widget-bars{display:grid;gap:12px}
.rg-widget-bar{display:grid;grid-template-columns:80px 1fr 44px;align-items:center;gap:10px}
.rg-widget-bar>div{height:10px;overflow:hidden;border-radius:999px;background:var(--bg-elevated)}
.rg-widget-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue),var(--orange))}
.rg-widget-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rg-widget-status-grid>div{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 8px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-md)}
.rg-widget-status-grid small{grid-column:2;color:var(--text-muted)}
.rg-status-dot{width:10px;height:10px;border-radius:50%;background:#94a3b8}
.rg-status-dot--online{background:#5ee29b;box-shadow:0 0 0 5px #5ee29b18}
.rg-status-dot--warning{background:#ffb45b;box-shadow:0 0 0 5px #ffb45b18}
.rg-status-dot--offline{background:#ff6b6b;box-shadow:0 0 0 5px #ff6b6b18}
@media(max-width:1000px){.rg-dashboard__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.rg-dashboard__grid{grid-template-columns:1fr}.rg-widget{grid-column:span 1!important}.rg-widget-status-grid{grid-template-columns:1fr}}
