/* Monitor Insight customer portal. Built on CDM's tokens (cdm.css = CDM app.css) with the documented values as
   fallbacks. Portal-only classes use mp-; MonitorInsight.Web's insight.css (mi-) is not loaded here. */
:root {
    --mp-navy: var(--dark-blue, #262262);
    --mp-blue: var(--bright-blue, #12c3f4);
    --mp-ink: var(--ink-900, #1d1c3f);
    --mp-ink-soft: var(--ink-600, #55557a);
    --mp-ink-faint: var(--ink-300, #9a9ab5);
    --mp-line: var(--line, #e4e6ef);
    --mp-card: var(--card, #ffffff);
    --mp-good: #1f9d6b;
}

/* signed-in shell */
.mp-shell { min-height: 100vh; display: flex; flex-direction: column; }
.mp-top { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 10px 28px;
          background: #fff; border-bottom: 1px solid var(--mp-line); }
.mp-brand { display: flex; align-items: center; gap: 10px; }
.mp-logo { height: 28px; }
.mp-brand-name { font-weight: 700; color: var(--mp-navy); }
/* pages use the full width (0.1.142) */
.mp-main { flex: 1; width: 100%; padding: 24px 28px; box-sizing: border-box; }

/* hamburger and pop-out menu (0.1.142): <details>; the summary's backdrop closes it on a click outside */
.mp-menu { position: relative; }
.mp-burger { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
             border-radius: 999px; cursor: pointer; color: var(--mp-navy); font-size: 22px; }
.mp-burger::-webkit-details-marker { display: none; }
.mp-burger:hover { background: #f2f3f8; }
.mp-menu[open] > .mp-burger::before { content: ""; position: fixed; inset: 0; background: rgba(29, 28, 63, .35); z-index: 40; cursor: default; }
.mp-pop { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw; background: #fff; z-index: 50;
          border-right: 1px solid var(--mp-line); box-shadow: 0 10px 40px rgba(29, 28, 63, .18); display: flex; flex-direction: column;
          padding: 16px 12px; box-sizing: border-box; animation: mp-pop-in .18s ease-out; }
@keyframes mp-pop-in { from { transform: translateX(-100%); } to { transform: none; } }
.mp-pop-head { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.mp-pop-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; color: var(--mp-ink-soft);
               text-decoration: none; font-size: 14px; }
.mp-pop-link i { font-size: 18px; }
.mp-pop-link:hover { background: #f2f3f8; color: var(--mp-ink); }
.mp-pop-link.is-active { background: var(--mp-navy); color: #fff; }
.mp-pop-foot { margin-top: auto; border-top: 1px solid var(--mp-line); padding-top: 10px; }
.mp-pop-user { padding: 6px 14px 8px; font-size: 12px; color: var(--mp-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-pop-version { padding: 8px 14px 0; font-size: 11px; color: var(--mp-ink-faint); }

/* dashboard (0.1.144): data cards, tiles, bars; explainers behind an info button */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; align-items: start; margin-top: 4px; }
.mp-card { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 14px; padding: 16px 20px; min-width: 0; }
.mp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.mp-card-why { margin: 0 0 12px; font-size: 13px; color: var(--mp-ink-soft); line-height: 1.4; }
.mp-card-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--mp-navy); }
.mp-h3 { margin: 14px 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mp-ink-faint); }
.mp-h3:first-of-type { margin-top: 0; }
.mp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mp-tile { border: 1px solid var(--mp-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mp-tile b { font-size: 20px; font-weight: 600; color: var(--mp-navy); line-height: 1.2; }
.mp-tile span { font-size: 12px; color: var(--mp-ink-soft); }
.mp-tile.is-warn b { color: #b4610a; }
.mp-tile.is-good b { color: var(--mp-good); }
.mp-bars { display: flex; flex-direction: column; gap: 6px; }
.mp-bar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.mp-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mp-ink); }
.mp-bar-track { height: 8px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.mp-bar-track i { display: block; height: 100%; border-radius: 999px; background: var(--mp-navy); }
.mp-bar-track i.is-good { background: var(--mp-good); }
.mp-bar-track i.is-warn { background: #f0a14a; }
.mp-bar-n { font-weight: 600; min-width: 56px; text-align: right; }
.mp-dev { margin: 0 0 16px; padding: 8px 12px; border-radius: 10px; background: #f2f3f8; font-size: 12px; color: var(--mp-ink-soft); }
.mp-empty { font-size: 13px; color: var(--mp-ink-faint); }

.mp-info { position: relative; }
.mp-info > summary { list-style: none; cursor: pointer; color: var(--mp-ink-faint); font-size: 18px; line-height: 1; display: inline-flex; }
.mp-info > summary::-webkit-details-marker { display: none; }
.mp-info > summary:hover, .mp-info[open] > summary { color: var(--mp-navy); }
.mp-info-pop { position: absolute; right: 0; top: 26px; z-index: 30; width: min(340px, 80vw); background: #fff; border: 1px solid var(--mp-line);
               border-radius: 12px; box-shadow: 0 10px 30px rgba(29, 28, 63, .15); padding: 12px 14px; font-size: 13px; line-height: 1.5;
               color: var(--mp-ink); }
.mp-foot { padding: 12px 28px; font-size: 11px; color: var(--mp-ink-faint); text-align: center; }

/* text */
.mp-title { margin: 0 0 4px; font-size: 22px; font-weight: 600; color: var(--mp-navy); }
.mp-sub { margin: 0 0 20px; color: var(--mp-ink-soft); }
.mp-small { font-size: 12px; }
/* stat tiles: as MonitorInsight.Web's .mi-stat-val / .mi-stat-lbl (0.1.141) */
.mp-stat-val { font-size: 24px; font-weight: 600; line-height: 1.2; }
.mp-stat-lbl { font-size: 12px; opacity: .8; }
.mp-muted { color: var(--mp-ink-soft); }
.cdm-stat-lead .mp-muted { color: rgba(255, 255, 255, .78); }

/* controls */
.mp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px;
          font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--mp-line); background: #fff;
          color: var(--mp-ink); text-decoration: none; cursor: pointer; box-sizing: border-box; }
.mp-btn:hover { border-color: var(--mp-blue); }
.mp-btn.is-primary { background: var(--mp-navy); border-color: var(--mp-navy); color: #fff; }
.mp-btn.is-primary:hover { background: #1b1850; }
.mp-wide { width: 100%; }
.mp-form { display: flex; flex-direction: column; gap: 6px; }
.mp-label { font-size: 12px; font-weight: 500; color: var(--mp-ink-soft); margin-top: 6px; }
.mp-input { font: inherit; font-size: 14px; padding: 10px 14px; border: 1px solid var(--mp-line); border-radius: 10px;
            background: #fff; color: var(--mp-ink); box-sizing: border-box; width: 100%; }
.mp-input:focus { outline: none; border-color: var(--mp-blue); box-shadow: 0 0 0 3px rgba(18, 195, 244, .18); }
.mp-form .mp-btn { margin-top: 14px; }
.mp-or { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--mp-ink-faint); font-size: 12px; }
.mp-or::before, .mp-or::after { content: ""; flex: 1; border-top: 1px solid var(--mp-line); }

/* messages */
.mp-alert, .mp-notice { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 10px 14px;
                        margin-bottom: 16px; font-size: 13px; }
.mp-alert { background: rgba(247, 147, 30, .12); color: #8a4b05; }
.mp-notice { background: rgba(31, 157, 107, .10); color: var(--mp-good); }

/* sign-in pages */
.mp-login-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
                  padding: 24px 16px; box-sizing: border-box; }
.mp-login-card { width: 100%; max-width: 400px; background: var(--mp-card); border: 1px solid var(--mp-line);
                 border-radius: 14px; padding: 28px; box-sizing: border-box; }
.mp-login-brand { margin-bottom: 22px; }

@media (max-width: 600px) {
    .mp-top { padding: 10px 16px; }
    .mp-main { padding: 20px 16px; }
    .mp-grid { grid-template-columns: 1fr; }
    .mp-login-card { padding: 22px 18px; }
}

/* dashboard tiles and cards as links (0.1.148) */
a.mp-tile { text-decoration: none; color: inherit; transition: border-color .15s; }
a.mp-tile:hover { border-color: var(--mp-blue); }
.mp-card-tools { display: inline-flex; align-items: center; gap: 10px; }
.mp-card-link { font-size: 12px; font-weight: 500; text-decoration: none; color: var(--mp-navy); display: inline-flex; align-items: center; gap: 4px; }
.mp-card-link:hover { color: var(--mp-blue); }

/* ABR data / CRMS data tables (0.1.148) */
.mp-page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.mp-page-head .mp-title { margin: 0; }
.mp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.mp-search { width: 280px; max-width: 100%; }
.mp-select { width: auto; padding: 8px 12px; }
.mp-count { margin-left: auto; font-size: 13px; color: var(--mp-ink-soft); }
.mp-setting { font-size: 13px; color: var(--mp-ink-soft); }
.mp-check { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.mp-check span { flex: 1; }
.mp-check b { font-weight: 500; color: var(--mp-ink-faint); font-size: 12px; }
.mp-drop { position: relative; display: inline-block; }
.mp-drop > summary { list-style: none; }
.mp-drop > summary::-webkit-details-marker { display: none; }
.mp-drop-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 25; min-width: 240px; max-width: min(420px, 90vw); max-height: 60vh;
               overflow: auto; background: #fff; border: 1px solid var(--mp-line); border-radius: 12px; padding: 10px 12px;
               box-shadow: 0 10px 30px rgba(29, 28, 63, .15); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--mp-ink); }
.mp-drop-pop.is-wide { min-width: 320px; }
.mp-drop-group { margin: 8px 0 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mp-ink-faint); }
.mp-drop-group:first-child { margin-top: 0; }
.mp-drop-foot { position: sticky; bottom: -10px; background: #fff; padding: 8px 0 2px; margin-top: 6px; border-top: 1px solid var(--mp-line); }
.mp-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; text-decoration: none;
           background: rgba(18, 195, 244, .12); color: var(--mp-navy); }
.mp-pill.is-lens { background: var(--mp-navy); color: #fff; }
.mp-pill:hover { filter: brightness(.95); }
.mp-table-wrap { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 14px; overflow-x: auto; }
.mp-data { width: 100%; border-collapse: collapse; font-size: 13px; }
.mp-data th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mp-ink-faint);
              padding: 10px 12px 6px; white-space: nowrap; border-bottom: 1px solid var(--mp-line); vertical-align: top; }
.mp-data td { padding: 8px 12px; border-bottom: 1px solid #f0f1f6; vertical-align: top; }
.mp-data tbody tr:hover { background: #fafbfe; }
.mp-data tr.is-archived td { color: var(--mp-ink-faint); }
.mp-data.is-compact th { padding: 6px 8px; }
.mp-data.is-compact td { padding: 5px 8px; }
.mp-filter-row th { padding-top: 0; padding-bottom: 8px; }
.mp-cell-input { padding: 5px 8px; font-size: 12px; min-width: 90px; border-radius: 8px; }
.mp-filter { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--mp-line); border-radius: 8px;
             font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--mp-ink-soft); cursor: pointer; background: #fff; }
.mp-filter.is-on { border-color: var(--mp-navy); color: var(--mp-navy); }
.mp-sort { color: inherit; text-decoration: none; }
.mp-sort:hover { color: var(--mp-navy); }
.mp-row-link { color: var(--mp-navy); font-weight: 500; text-decoration: none; }
.mp-row-link:hover { text-decoration: underline; }
.mp-cell-sub { font-size: 11px; color: var(--mp-ink-faint); }
.mp-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.mp-ok { color: var(--mp-good); }
.mp-warn { color: #b4610a; }
.mp-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; font-size: 13px; }

/* the business sheet over a table (0.1.148): a link back closes it */
.mp-overlay { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.mp-overlay-back { position: absolute; inset: 0; background: rgba(29, 28, 63, .35); }
.mp-sheet { position: relative; width: min(1100px, 100vw); height: 100%; overflow: auto; background: var(--surface, #f5f6fa);
            padding: 20px 24px; box-sizing: border-box; box-shadow: -10px 0 40px rgba(29, 28, 63, .2); animation: mp-sheet-in .18s ease-out; }
@keyframes mp-sheet-in { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.mp-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.mp-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.mp-tab { padding: 7px 14px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--mp-ink-soft); background: #fff; border: 1px solid var(--mp-line); }
.mp-tab.is-active { background: var(--mp-navy); border-color: var(--mp-navy); color: #fff; }
.mp-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.mp-two.is-main { grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); }
.mp-two > div, .mp-two > aside { min-width: 0; }
.mp-sheet aside, .mp-sheet .mp-two > div { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 14px; padding: 12px 16px; }
.mp-org { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.mp-org.is-marked { border-color: var(--mp-blue); box-shadow: 0 0 0 2px rgba(18, 195, 244, .2); }
.mp-org .mp-two > div { border: none; padding: 0; }
.mp-card-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--mp-navy); }
.mp-def { padding: 6px 0; border-bottom: 1px dashed var(--mp-line); }
@media (max-width: 800px) {
    .mp-two, .mp-two.is-main { grid-template-columns: 1fr; }
    .mp-sheet { padding: 16px; }
    .mp-count { margin-left: 0; width: 100%; }
}
.mp-kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--mp-line); font-size: 13px; }
.mp-kv > span:last-child { text-align: right; }
