.mmad-root{width:100%;}
.mmad-scope{
  border-radius:24px;
  overflow:hidden;
--mmad-bg:#0b1220;
  --mmad-panel:#101b33;
  --mmad-panel2:#0f1730;
  --mmad-text:#e7eefc;
  --mmad-muted:#a7b6d8;
  --mmad-accent:#62d2ff;
  --mmad-accent2:#a78bfa;
  --mmad-good:#34d399;
  --mmad-warn:#fbbf24;
  --mmad-bad:#fb7185;
  --mmad-border:rgba(255,255,255,.10);
  --mmad-shadow:0 20px 60px rgba(0,0,0,.35);
  --mmad-radius:18px;
  --mmad-radius2:24px;
  --mmad-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-family:var(--mmad-font);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(98,210,255,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(167,139,250,.18), transparent 60%),
    radial-gradient(900px 700px at 40% 110%, rgba(52,211,153,.10), transparent 60%),
    var(--mmad-bg);
  color:var(--mmad-text);
}
.mmad-scope, .mmad-scope *{box-sizing:border-box}
/* MRI Motion AI Dashboard (mmad-) scoped styles */
.mmad-wrap{max-width:1220px;margin:0 auto;padding:22px 16px 28px}
.mmad-titlebar{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.mmad-title{
  display:flex;gap:14px;align-items:center
}
.mmad-badge{
  width:44px;height:44px;border-radius:14px;
  background:linear-gradient(135deg, rgba(98,210,255,.95), rgba(167,139,250,.85));
  box-shadow:0 14px 30px rgba(98,210,255,.12);
  display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.18);
}
.mmad-badge svg{filter:drop-shadow(0 8px 14px rgba(0,0,0,.25))}
.mmad-h1{font-size:20px;margin:0;letter-spacing:.2px}
.mmad-sub{margin:4px 0 0;color:var(--mmad-muted);font-size:13px;line-height:1.45;max-width:740px}

.mmad-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.mmad-btn{
  appearance:none;border:1px solid var(--mmad-border);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color:var(--mmad-text);
  padding:10px 12px;border-radius:14px;
  font-size:13px;cursor:pointer;
  box-shadow:0 12px 24px rgba(0,0,0,.22);
  display:flex;gap:8px;align-items:center
}
.mmad-btn:hover{border-color:rgba(255,255,255,.18);transform:translateY(-1px)}
.mmad-btn:active{transform:translateY(0)}
.mmad-btn-primary{
  border-color:rgba(98,210,255,.40);
  background:linear-gradient(180deg, rgba(98,210,255,.22), rgba(98,210,255,.10));
}

.mmad-grid{display:grid;gap:14px;margin-top:14px}
@media(min-width:980px){
  .mmad-grid{grid-template-columns: 1.05fr .95fr}
}

.mmad-panel{
  background:linear-gradient(180deg, rgba(16,27,51,.92), rgba(15,23,48,.86));
  border:1px solid var(--mmad-border);
  border-radius:var(--mmad-radius2);
  box-shadow:var(--mmad-shadow);
  overflow:hidden;
}
.mmad-panel-h{
  padding:14px 14px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  display:flex;gap:10px;align-items:flex-start;justify-content:space-between
}
.mmad-panel-h .mmad-ph-left{display:flex;gap:10px;align-items:flex-start}
.mmad-panel-h h2{margin:0;font-size:14px;letter-spacing:.25px}
.mmad-panel-h p{margin:2px 0 0;color:var(--mmad-muted);font-size:12px;line-height:1.4}
.mmad-pill{font-size:11px;color:var(--mmad-muted);border:1px solid rgba(255,255,255,.12);padding:6px 10px;border-radius:999px;background:rgba(0,0,0,.12)}

.mmad-panel-b{padding:14px}

/* tabs */
.mmad-tabs{display:flex;gap:8px;flex-wrap:wrap}
.mmad-tab{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.12);
  color:var(--mmad-muted);
  font-size:12px;
  padding:9px 10px;
  border-radius:14px;
  cursor:pointer;
}
.mmad-tab.active{
  color:var(--mmad-text);
  border-color:rgba(98,210,255,.35);
  background:linear-gradient(180deg, rgba(98,210,255,.14), rgba(98,210,255,.06));
}

/* cards */
.mmad-cards{display:grid;gap:12px}
@media(min-width:640px){.mmad-cards.two{grid-template-columns:1fr 1fr}}
@media(min-width:980px){.mmad-cards.three{grid-template-columns:1fr 1fr 1fr}}

.mmad-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.mmad-card h3{margin:0;font-size:13px}
.mmad-card p{margin:6px 0 0;color:var(--mmad-muted);font-size:12px;line-height:1.5}
.mmad-mini{margin-top:10px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.mmad-kpi{display:flex;flex-direction:column;gap:2px;min-width:140px}
.mmad-kpi .k{color:var(--mmad-muted);font-size:11px}
.mmad-kpi .v{font-size:18px}
.mmad-kpi .v small{font-size:11px;color:var(--mmad-muted)}
.mmad-dot{width:10px;height:10px;border-radius:999px;background:var(--mmad-accent)}

/* sliders */
.mmad-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.mmad-field{flex:1;min-width:240px}
.mmad-field label{display:flex;justify-content:space-between;gap:10px;color:var(--mmad-muted);font-size:12px}
.mmad-field input[type="range"]{width:100%}
.mmad-field input[type="number"], .mmad-field select, .mmad-field input[type="text"]{
  width:100%;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:var(--mmad-text);
  outline:none;
}
.mmad-field input[type="number"]::-webkit-outer-spin-button,
.mmad-field input[type="number"]::-webkit-inner-spin-button{ -webkit-appearance: none; margin:0; }

.mmad-help{
  margin-top:10px;
  border:1px dashed rgba(255,255,255,.14);
  border-radius:18px;
  padding:10px;
  background:rgba(0,0,0,.10)
}
.mmad-help h4{margin:0;font-size:12px}
.mmad-help ul{margin:8px 0 0;padding-left:18px;color:var(--mmad-muted);font-size:12px;line-height:1.55}

/* band */
.mmad-band{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.mmad-band .tag{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.10);
}
.mmad-band .tag.low{border-color:rgba(52,211,153,.35); color:#bbf7d0}
.mmad-band .tag.mod{border-color:rgba(251,191,36,.35); color:#fde68a}
.mmad-band .tag.high{border-color:rgba(251,113,133,.35); color:#fecdd3}

/* progress */
.mmad-progress{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;border:1px solid rgba(255,255,255,.10)}
.mmad-progress > i{display:block;height:100%;width:50%;background:linear-gradient(90deg, rgba(98,210,255,.85), rgba(167,139,250,.85))}

/* table */
.mmad-table{width:100%;border-collapse:collapse}
.mmad-table th,.mmad-table td{padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.08);font-size:12px}
.mmad-table th{text-align:left;color:var(--mmad-muted);font-weight:600}
.mmad-table td{color:var(--mmad-text)}

/* alert */
.mmad-alert{border:1px solid rgba(251,113,133,.35);background:rgba(251,113,133,.12);padding:10px;border-radius:16px;color:#fecdd3;font-size:12px;line-height:1.5}
.mmad-ok{border:1px solid rgba(52,211,153,.30);background:rgba(52,211,153,.10);padding:10px;border-radius:16px;color:#bbf7d0;font-size:12px;line-height:1.5}

/* footer */
.mmad-foot{margin-top:14px;color:var(--mmad-muted);font-size:11px;line-height:1.45}
.mmad-foot code{color:#dbeafe}

.mmad-linklike{color:#bfe7ff;text-decoration:underline;text-decoration-color:rgba(191,231,255,.45);cursor:pointer}

.mmad-toggle{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--mmad-muted)}
.mmad-toggle input{width:18px;height:18px}

/* print */
@media print{
  .mmad-scope{background:#fff;color:#000}
  .mmad-wrap{max-width:none}
  .mmad-panel{box-shadow:none}
  .mmad-btn, .mmad-tab{display:none!important}
}
