:root{--bg:#07111f;--bg2:#0b1728;--panel:#0f1d30;--panel2:#13243a;--line:#213550;--text:#f5f8fc;--muted:#8ea1b8;--blue:#46a3ff;--green:#27d17f;--yellow:#f5b942;--red:#ff5d73;--shadow:0 22px 60px rgba(0,0,0,.28)}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:linear-gradient(180deg,#07111f 0,#081523 40%,#091522 100%);color:var(--text);font-family:Inter,system-ui,sans-serif}
.wrap{width:min(1180px,calc(100% - 36px));margin:auto}
.topbar{position:sticky;top:0;z-index:50;background:rgba(7,17,31,.78);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.06)}
.nav{height:72px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:12px;color:white;text-decoration:none}
.brandmark{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#176cf4,#5bb8ff);font-weight:800;box-shadow:0 8px 24px rgba(44,135,255,.3)}
.brand b,.brand small{display:block}
.brand small{font-size:11px;color:var(--muted);margin-top:2px}
.nav nav{display:flex;gap:28px;align-items:center}
.nav nav a{color:#b9c7d8;text-decoration:none;font-size:14px}
.nav nav a:hover{color:white}
.admin-link{padding:10px 14px;border:1px solid var(--line);border-radius:10px}
.hero{position:relative;overflow:hidden;border-bottom:1px solid rgba(255,255,255,.06)}
.hero-glow{position:absolute;inset:-50% -20% auto 40%;height:700px;background:radial-gradient(circle,rgba(40,132,255,.18),transparent 58%);pointer-events:none}
.hero-inner{position:relative;display:grid;grid-template-columns:1.15fr .85fr;gap:70px;align-items:center;padding:92px 0 82px}
.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800;color:#78baff}
.pulse{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px}
.pulse.good{background:var(--green);box-shadow:0 0 0 7px rgba(39,209,127,.10)}
.hero h1{font-size:58px;line-height:1.02;letter-spacing:-.055em;margin:16px 0 18px}
.hero h1 span{background:linear-gradient(90deg,#5baeff,#8ad5ff);-webkit-background-clip:text;color:transparent}
.hero p{color:var(--muted);font-size:18px;line-height:1.65;max-width:680px}
.overall-card{display:flex;gap:18px;padding:26px;border:1px solid var(--line);background:linear-gradient(145deg,rgba(18,36,58,.95),rgba(9,24,41,.96));border-radius:22px;box-shadow:var(--shadow)}
.overall-card.good{border-color:rgba(39,209,127,.25)}
.overall-card.warn{border-color:rgba(245,185,66,.30)}
.overall-card.bad{border-color:rgba(255,93,115,.35)}
.overall-icon{width:54px;height:54px;flex:0 0 54px;border-radius:50%;display:grid;place-items:center;background:rgba(39,209,127,.12);color:var(--green);font-size:24px}
.overall-card small{font-size:10px;color:var(--muted);letter-spacing:.13em}
.overall-card h2{margin:7px 0 6px;font-size:25px}
.overall-card p{font-size:13px;margin:0}
.hero-metrics{display:flex;gap:18px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.hero-metrics span{font-size:11px;color:var(--muted)}
.hero-metrics b{font-size:18px;color:white;margin-right:5px}
.stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:-25px;position:relative;z-index:3}
.mini-stat{padding:20px 22px;border:1px solid var(--line);border-radius:16px;background:rgba(14,29,48,.94);box-shadow:0 12px 30px rgba(0,0,0,.16)}
.mini-stat span{font-size:12px;color:var(--muted)}
.mini-stat strong{display:block;font-size:27px;margin-top:6px}
.txt-good{color:var(--green)!important}.txt-warn{color:var(--yellow)!important}.txt-bad{color:var(--red)!important}
.section{padding:72px 0 0}
.section-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:24px}
.section-head h2{margin:7px 0 0;font-size:28px;letter-spacing:-.03em}
.auto-refresh{font-size:12px;color:var(--muted)}
.auto-refresh span{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:6px}
.category{margin:32px 0}
.category h3{display:flex;align-items:center;gap:10px;font-size:14px;color:#c9d6e5;margin-bottom:14px}

/* FIXED SERVICE GRID */
.service-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;width:100%}
.service-card{padding:18px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,rgba(15,29,48,.95),rgba(11,24,41,.92));transition:.2s transform,.2s border-color;min-width:0}
.service-card:hover{transform:translateY(-2px);border-color:#345277}

.service-top{display:flex;align-items:center;justify-content:space-between}
.service-logo{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#162b46;color:#83c5ff;font-weight:800;font-size:12px}
.service-status{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.service-status i{width:7px;height:7px;border-radius:50%;background:currentColor}
.good{color:var(--green)}.warn{color:var(--yellow)}.bad{color:var(--red)}.neutral{color:#8194ab}
.service-card h4{font-size:16px;margin:16px 0 6px}
.service-card>p{font-size:12px;color:var(--muted);min-height:34px}
.service-meta{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line);margin-top:14px;padding-top:12px;gap:10px}
.service-meta span{font-size:10px;color:var(--muted)}
.service-meta b{display:block;color:#d9e5f2;margin-top:3px;font-size:11px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.panel,.admin-panel{border:1px solid var(--line);border-radius:18px;background:rgba(13,27,45,.92);overflow:hidden}
.empty{text-align:center;padding:52px 20px}
.empty div{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;background:rgba(39,209,127,.1);color:var(--green);font-size:22px}
.empty h3{margin:0}.empty p{color:var(--muted);font-size:13px}
.incident{display:flex;align-items:flex-start;gap:14px;padding:18px;border-bottom:1px solid var(--line)}
.incident:last-child{border-bottom:0}
.incident-dot{width:9px;height:9px;border-radius:50%;background:currentColor;margin-top:6px}
.incident>div{flex:1}
.incident b{font-size:12px;color:#9fb3c9}
.incident h4{margin:4px 0;font-size:14px}
.incident p{margin:0;color:var(--muted);font-size:11px}
.pill{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;letter-spacing:.06em;background:rgba(255,255,255,.05)}
.pill.good{background:rgba(39,209,127,.1)}.pill.warn{background:rgba(245,185,66,.1)}.pill.bad{background:rgba(255,93,115,.1)}
.history-row{display:flex;justify-content:space-between;gap:15px;padding:15px 18px;border-bottom:1px solid var(--line)}
.history-row:last-child{border-bottom:0}
.history-row b,.history-row span,.history-row small{display:block}
.history-row b{font-size:12px}.history-row span{font-size:11px;color:var(--muted);margin-top:4px}
.history-row>div:last-child{text-align:right}.history-row small{color:#677d96;margin-top:6px}
.uptime-list{padding:8px 20px}
.uptime-row{display:grid;grid-template-columns:180px 1fr 78px;align-items:center;gap:20px;padding:14px 0;border-bottom:1px solid var(--line);font-size:12px}
.uptime-row:last-child{border-bottom:0}
.bar{height:8px;background:#172a42;border-radius:999px;overflow:hidden}
.bar i{display:block;height:100%;background:linear-gradient(90deg,#21c978,#55e79b);border-radius:inherit}
footer{margin-top:80px;border-top:1px solid var(--line);padding:35px 0 100px;color:var(--muted);font-size:12px}
footer .wrap{display:flex;justify-content:space-between}
footer b,footer span{display:block}footer b{color:#dce6f2;margin-bottom:5px}
.mobile-nav{display:none}
.login-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top,#11294a,#07111f 55%)}
.login-card{width:min(430px,100%);padding:32px;border:1px solid var(--line);border-radius:22px;background:#0e1c2e;box-shadow:var(--shadow)}
.login-brand{margin-bottom:35px}.login-card h1{margin-bottom:6px}.login-card>p{color:var(--muted);margin-top:0}
.login-card label,.form-grid label{display:block;color:#aebfd1;font-size:12px;margin-top:16px}
.login-card input,.form-grid input,.form-grid select{width:100%;margin-top:7px;border:1px solid #29415f;background:#0a1727;color:white;padding:13px 14px;border-radius:10px;outline:none}
.login-card input:focus,.form-grid input:focus,.form-grid select:focus{border-color:#4aa6ff}
.btn{display:inline-flex;justify-content:center;align-items:center;border:1px solid var(--line);background:#10223a;color:white;text-decoration:none;border-radius:10px;padding:11px 16px;font-weight:700;cursor:pointer}
.btn.primary{background:linear-gradient(135deg,#217ff0,#46a8ff);border-color:transparent}
.login-card .btn{width:100%;margin-top:22px}
.back-link{display:block;text-align:center;color:#7e95af;text-decoration:none;font-size:12px;margin-top:18px}
.form-alert{padding:10px 12px;border-radius:9px;background:rgba(255,93,115,.1);color:#ff8b9c;font-size:12px}
.admin-body{background:#081421}
.sidebar{position:fixed;inset:0 auto 0 0;width:240px;border-right:1px solid var(--line);padding:22px;background:#091625}
.sidebar nav{display:grid;gap:7px;margin-top:38px}
.sidebar nav a{padding:11px 12px;color:#8fa5be;text-decoration:none;border-radius:9px;font-size:13px}
.sidebar nav a.active,.sidebar nav a:hover{background:#11253e;color:white}
.admin-main{margin-left:240px;padding:42px;max-width:1500px}
.admin-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}
.admin-top h1{margin:7px 0 0;font-size:31px}
.admin-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:24px}
.admin-cards>div{padding:20px;border:1px solid var(--line);background:#0e1d30;border-radius:15px}
.admin-cards span{color:var(--muted);font-size:11px}
.admin-cards b{display:block;font-size:28px;margin-top:8px}
.admin-panel{padding:22px}
.table-wrap{overflow:auto;padding:0}
.table-wrap table{width:100%;border-collapse:collapse}
.table-wrap th,.table-wrap td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--line);font-size:12px}
.table-wrap th{color:#7890aa;font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.table-wrap td small{display:block;color:var(--muted);margin-top:3px}
.actions{display:flex;gap:9px}
.actions a,.actions button{color:#74b8ff;background:none;border:0;text-decoration:none;font-size:11px;cursor:pointer}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 18px;max-width:900px}
.span-2{grid-column:span 2}
.checks{display:flex;gap:20px;margin:18px 0}
.checks label{display:flex;align-items:center;gap:7px;margin:0}
.checks input{width:auto;margin:0}
.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.field-help{display:block;margin-top:7px;color:#91a9c4;font-size:.82rem}
#test-result{font-size:.85rem;color:#7dd3a7;align-self:center}

@media(max-width:980px){
  .hero-inner{grid-template-columns:1fr;padding:65px 0}
  .service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .two-col{grid-template-columns:1fr}
  .nav nav a:not(.admin-link){display:none}
  .admin-cards{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:720px){
  .wrap{width:min(100% - 24px,1180px)}
  .topbar .nav{height:62px}
  .nav nav{display:none}
  .hero-inner{padding:42px 0 38px;gap:30px}
  .hero h1{font-size:39px}
  .hero p{font-size:14px}
  .overall-card{padding:20px}
  .hero-metrics{gap:12px;flex-wrap:wrap}
  .stat-row{grid-template-columns:1fr 1fr;margin-top:14px}
  .section{padding-top:50px}
  .service-grid{grid-template-columns:1fr}
  .service-card>p{min-height:0}
  .two-col{gap:6px}
  .uptime-row{grid-template-columns:95px 1fr 65px;gap:10px}
  .mobile-nav{position:fixed;z-index:60;left:10px;right:10px;bottom:10px;height:64px;display:grid;grid-template-columns:repeat(4,1fr);background:rgba(10,23,39,.94);backdrop-filter:blur(18px);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
  .mobile-nav a{display:grid;place-items:center;align-content:center;gap:3px;color:#9eb2c9;text-decoration:none;font-size:18px}
  .mobile-nav span{font-size:9px}
  .section-head{align-items:center}
  .admin-body{display:block}
  .sidebar{position:static;width:auto;height:auto;border-right:0;border-bottom:1px solid var(--line)}
  .sidebar nav{display:flex;overflow:auto;margin-top:20px}
  .sidebar nav a{white-space:nowrap}
  .admin-main{margin-left:0;padding:24px 14px 90px}
  .admin-top{align-items:flex-end}
  .admin-cards{grid-template-columns:1fr 1fr}
  .form-grid{grid-template-columns:1fr}
  .span-2{grid-column:span 1}
  .table-wrap table{min-width:760px}
}
.health-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.health-modal.open {
    display: flex;
}

.health-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 18, .82);
    backdrop-filter: blur(8px);
}

.health-modal-panel {
    position: relative;
    z-index: 2;
    width: min(920px, 100%);
    max-height: 88vh;
    overflow-y: auto;

    background:
        linear-gradient(
            145deg,
            rgba(15,29,48,.99),
            rgba(7,17,31,.99)
        );

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;

    box-shadow:
        0 30px 80px rgba(0,0,0,.55);

    padding: 28px;
}

.health-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;

    width: 38px;
    height: 38px;

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;

    background: rgba(255,255,255,.05);
    color: #fff;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;
}

.health-modal-close:hover {
    background: rgba(255,255,255,.10);
}

.modal-loading {
    min-height: 300px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 16px;

    color: #8fa5ba;
}

.modal-spinner {
    width: 32px;
    height: 32px;

    border: 3px solid rgba(255,255,255,.10);
    border-top-color: #fff;
    border-radius: 50%;

    animation: modalSpin .8s linear infinite;
}

@keyframes modalSpin {
    to {
        transform: rotate(360deg);
    }
}

.modal-error {
    padding: 60px 20px;
    text-align: center;
    color: #ff8f8f;
}

@media(max-width:720px) {

    .health-modal {
        padding: 10px;
        align-items: flex-end;
    }

    .health-modal-panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 12px 12px;
        padding: 22px 18px;
    }
}

/* ================================================================
   MATRIX CENTRALIZED SERVICE HEALTH — CORPORATE LIGHT THEME
   Visual-only override. Existing layout, service grid and behavior
   remain unchanged.
   ================================================================ */

:root{
  --bg:#f4f7fb;
  --bg2:#eef4f9;
  --panel:#ffffff;
  --panel2:#f8fbfe;
  --line:#dce6ef;
  --text:#10243a;
  --muted:#6f8297;
  --blue:#087ff5;
  --green:#16b86b;
  --yellow:#f3a800;
  --red:#ef4655;
  --shadow:0 10px 30px rgba(27,62,92,.08);
}

body{
  background:linear-gradient(180deg,#eef5fa 0,#f7f9fb 330px,#f4f7fa 100%);
  color:var(--text);
}

/* Header / MATRIX branding */
.topbar{
  background:rgba(7,27,45,.97);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 1px 12px rgba(4,20,35,.16);
}
.brand{color:#fff}
.brandmark{
  width:auto;
  min-width:58px;
  height:38px;
  padding:0 10px;
  border-radius:8px;
  background:linear-gradient(135deg,#ffffff,#b8dcff);
  color:#0b65b9;
  font-size:16px;
  letter-spacing:.04em;
  box-shadow:none;
}
.brand b{color:#fff}
.brand small{color:#a9bed0}
.nav nav a{color:#c4d1dd}
.nav nav a:hover{color:#fff}
.admin-link{
  color:#fff!important;
  border-color:#1587ee!important;
  background:linear-gradient(135deg,#0879e9,#1294ff);
}

/* Dark navy hero */
.hero{
  background:
    radial-gradient(circle at 84% 15%,rgba(16,133,221,.24),transparent 34%),
    linear-gradient(115deg,#0b2a43 0%,#0b3554 58%,#0b2942 100%);
  border-bottom:1px solid #d9e5ef;
}
.hero-glow{
  inset:-60% -10% auto 42%;
  background:radial-gradient(circle,rgba(43,161,255,.24),transparent 58%);
}
.hero .eyebrow{color:#75bfff}
.hero h1{color:#fff}
.hero h1 span{
  background:linear-gradient(90deg,#ffffff,#a8d9ff);
  -webkit-background-clip:text;
  color:transparent;
}
.hero p{color:#c1d1df}
.overall-card{
  border-color:rgba(151,194,226,.22);
  background:rgba(9,38,61,.55);
  box-shadow:none;
  backdrop-filter:blur(10px);
}
.overall-card.good{border-color:rgba(39,209,127,.35)}
.overall-card.warn{border-color:rgba(245,185,66,.4)}
.overall-card.bad{border-color:rgba(255,93,115,.45)}
.overall-card h2{color:#fff}
.overall-card small,.overall-card p,.hero-metrics span{color:#b9ccdc}
.hero-metrics{border-top-color:rgba(255,255,255,.12)}
.hero-metrics b{color:#fff}

/* Floating summary */
.stat-row{margin-top:-25px}
.mini-stat{
  background:#fff;
  border-color:#dce6ef;
  box-shadow:0 10px 26px rgba(31,71,103,.09);
}
.mini-stat span{color:#72869a}
.mini-stat strong{color:#10243a}

/* Main content */
.section-head h2{color:#10243a}
.eyebrow{color:#087fe8}
.auto-refresh{color:#71869a}
.category h3{color:#30475e}

/* Keep the existing 4-column grid exactly as-is */
.service-card{
  background:#fff;
  border-color:#dce6ef;
  box-shadow:0 5px 18px rgba(30,69,101,.055);
}
.service-card:hover{
  transform:translateY(-2px);
  border-color:#a8cbe8;
  box-shadow:0 10px 26px rgba(30,69,101,.10);
}
.service-logo{
  background:#edf6ff;
  color:#087ff5;
  border:1px solid #dbeeff;
}
.service-card h4{color:#13283e}
.service-card>p{color:#71859a}
.service-meta{border-top-color:#e5edf4}
.service-meta span{color:#8092a5}
.service-meta b{color:#253c53}

/* Panels / incidents */
.panel,.admin-panel{
  background:#fff;
  border-color:#dce6ef;
  box-shadow:0 5px 18px rgba(30,69,101,.05);
}
.empty h3{color:#173049}
.empty p{color:#71859a}
.incident{border-bottom-color:#e6edf3}
.incident b{color:#536b81}
.incident h4{color:#183049}
.incident p{color:#7a8da0}
.pill{background:#eef3f7}
.pill.good{background:#e5f8ef}
.pill.warn{background:#fff4d9}
.pill.bad{background:#ffe8eb}
.history-row{border-bottom-color:#e6edf3}
.history-row b{color:#1b344d}
.history-row span{color:#71859a}
.history-row small{color:#8999a9}

/* Uptime */
.uptime-row{border-bottom-color:#e7edf3}
.bar{background:#e6edf2}
.bar i{background:linear-gradient(90deg,#14a962,#27c878)}

/* Footer */
footer{
  border-top-color:#dce6ef;
  color:#7c8ea0;
  background:#f7f9fb;
}
footer b{color:#173049}

/* Login / admin keep a professional light appearance */
.login-body{
  background:linear-gradient(135deg,#eaf3fa,#f8fafc);
}
.login-card{
  background:#fff;
  border-color:#d7e4ee;
  box-shadow:0 22px 55px rgba(28,65,96,.12);
}
.login-card h1{color:#10243a}
.login-card>p{color:#71859a}
.login-card label,.form-grid label{color:#536b81}
.login-card input,.form-grid input,.form-grid select{
  border-color:#cfdce7;
  background:#fff;
  color:#142a40;
}
.btn{
  border-color:#d2e0eb;
  background:#fff;
  color:#173049;
}
.btn.primary{
  background:linear-gradient(135deg,#0878e8,#1596ff);
  color:#fff;
}
.admin-body{background:#f3f6f9}
.sidebar{
  background:#0b2338;
  border-right-color:#183b57;
}
.sidebar nav a{color:#a9bdce}
.sidebar nav a.active,.sidebar nav a:hover{
  background:#123a59;
  color:#fff;
}
.admin-top h1{color:#10243a}
.admin-cards>div{
  background:#fff;
  border-color:#dce6ef;
}
.admin-cards span{color:#71859a}
.admin-cards b{color:#13283e}
.table-wrap th,.table-wrap td{border-bottom-color:#e3ebf2}
.table-wrap th{color:#698096}
.table-wrap td{color:#243b52}
.field-help{color:#71869a}

/* Modal — same functionality, matching the light corporate theme */
.health-modal-backdrop{
  background:rgba(4,20,34,.58);
  backdrop-filter:blur(8px);
}
.health-modal-panel{
  background:#fff;
  border-color:#d7e4ee;
  box-shadow:0 30px 80px rgba(10,38,62,.28);
}
.health-modal-close{
  border-color:#d5e1eb;
  background:#f1f5f8;
  color:#20384f;
}
.health-modal-close:hover{background:#e6edf3}
.modal-loading{color:#70859a}
.modal-spinner{
  border-color:#dce6ef;
  border-top-color:#087ff5;
}
.modal-error{color:#d83e4c}

/* service-modal.php currently injects its own dark component styles.
   These overrides intentionally win after the fragment is inserted. */
.health-modal-panel .service-modal-category{color:#087fe8}
.health-modal-panel .service-modal-heading h2{color:#10243a}
.health-modal-panel .service-modal-description{color:#71859a}
.health-modal-panel .modal-status-pill{
  border-color:#dce6ef;
  background:#f5f8fb;
}
.health-modal-panel .modal-metric{
  border-color:#dce6ef;
  background:#f8fafc;
}
.health-modal-panel .modal-metric span{color:#75899d}
.health-modal-panel .modal-metric strong{color:#1b344d}
.health-modal-panel .modal-components{
  border-color:#dce6ef;
  background:#fff;
}
.health-modal-panel .modal-components-header{
  border-bottom-color:#dce6ef;
}
.health-modal-panel .modal-components-header h3{color:#173049}
.health-modal-panel .modal-components-header span{color:#7b8fa2}
.health-modal-panel .modal-component-row{
  border-bottom-color:#e4ebf1;
}
.health-modal-panel .modal-component-name{color:#263e55}
.health-modal-panel .modal-no-components{color:#7b8fa2}

/* Health colors always remain semantic */
.good,.green{color:var(--green)!important}
.warn,.yellow{color:var(--yellow)!important}
.bad,.red{color:var(--red)!important}
.neutral,.gray{color:#8194ab!important}

/* Mobile nav */
@media(max-width:720px){
  .mobile-nav{
    background:rgba(7,27,45,.96);
    border-color:#173b58;
  }
  .mobile-nav a{color:#b9cad8}
  .stat-row{margin-top:14px}
}


/* ================================================================
   MATRIX DASHBOARD LAYOUT
   Category-first dashboard based on the approved corporate mockup.
   ================================================================ */

.matrix-dashboard{
  background:#f4f7fa;
  color:#10243a;
}

.matrix-dashboard .wrap{
  width:min(1440px,calc(100% - 72px));
}

/* Header */
.matrix-topbar{
  position:sticky;
  top:0;
  z-index:80;
  background:#071c2d;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.matrix-nav{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}

.matrix-brand{
  display:flex;
  align-items:center;
  gap:18px;
  color:#fff;
  text-decoration:none;
}

.matrix-wordmark{
  font-size:25px;
  line-height:1;
  font-weight:800;
  letter-spacing:-.055em;
  color:#fff;
}

.matrix-wordmark::after{
  content:"";
  display:inline-block;
  width:10px;
  height:10px;
  margin-left:6px;
  border-radius:2px;
  background:#168cff;
  transform:skew(-12deg);
}

.matrix-brand-copy b,
.matrix-brand-copy small{
  display:block;
}

.matrix-brand-copy b{
  font-size:14px;
  letter-spacing:-.01em;
}

.matrix-brand-copy small{
  margin-top:2px;
  color:#a9bdcc;
  font-size:9px;
}

.matrix-nav-links{
  display:flex;
  align-items:center;
  gap:31px;
}

.matrix-nav-links a{
  position:relative;
  color:#d6e0e8;
  text-decoration:none;
  font-size:11px;
  font-weight:600;
}

.matrix-nav-links a.active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-22px;
  height:2px;
  background:#2b9cff;
}

.matrix-nav-links .matrix-signin{
  padding:10px 21px;
  border-radius:7px;
  background:linear-gradient(135deg,#0878e8,#0d8dff);
  color:#fff;
  box-shadow:0 5px 16px rgba(0,126,245,.2);
}

/* Hero */
.matrix-hero{
  position:relative;
  overflow:hidden;
  padding:48px 0 27px;
  color:#fff;
  background:
    radial-gradient(circle at 88% 20%,rgba(29,125,191,.22),transparent 33%),
    linear-gradient(110deg,#0b2b45 0%,#0a304d 55%,#0b2943 100%);
  border-bottom:1px solid #dbe5ee;
}

.matrix-world{
  position:absolute;
  right:-40px;
  top:-70px;
  width:470px;
  height:280px;
  opacity:.16;
  background:
    radial-gradient(circle at 55% 45%,rgba(137,202,245,.9) 0 2px,transparent 2.6px) 0 0/18px 18px;
  -webkit-mask-image:radial-gradient(ellipse at center,#000 0 52%,transparent 72%);
  mask-image:radial-gradient(ellipse at center,#000 0 52%,transparent 72%);
  transform:rotate(-7deg);
}

.matrix-hero-inner{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:60px;
  align-items:center;
}

.matrix-hero-status{
  display:flex;
  align-items:center;
  gap:25px;
}

.matrix-hero-check{
  width:70px;
  height:70px;
  flex:0 0 70px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-size:34px;
  font-weight:800;
  color:#063b28;
  background:#31d779;
  box-shadow:0 0 32px rgba(49,215,121,.35);
}

.matrix-hero-check.warn{
  color:#593b00;
  background:#ffbf35;
  box-shadow:0 0 32px rgba(255,191,53,.3);
}

.matrix-hero-check.bad{
  color:#fff;
  background:#f14a58;
  box-shadow:0 0 32px rgba(241,74,88,.3);
}

.matrix-hero-check.neutral{
  color:#fff;
  background:#7790a5;
}

.matrix-hero-status h1{
  margin:0;
  font-size:37px;
  line-height:1.06;
  letter-spacing:-.045em;
}

.matrix-hero-status p{
  max-width:650px;
  margin:12px 0 0;
  color:#c5d5e2;
  font-size:13px;
  line-height:1.75;
}

.matrix-hero-summary{
  min-height:138px;
  display:grid;
  grid-template-columns:repeat(4,1fr) 1.15fr;
  gap:14px;
  align-items:center;
  padding:19px 23px;
  border:1px solid rgba(152,194,223,.18);
  border-radius:11px;
  background:rgba(6,29,48,.25);
}

.matrix-summary-number strong{
  display:block;
  color:#fff;
  font-size:29px;
  line-height:1;
}

.matrix-summary-number.good strong{color:#33cf79}
.matrix-summary-number.warn strong{color:#ffba2e}
.matrix-summary-number.bad strong{color:#f35b67}

.matrix-summary-number span{
  display:block;
  margin-top:11px;
  color:#bdd0de;
  font-size:10px;
}

.matrix-summary-message{
  padding-left:18px;
  border-left:1px solid rgba(255,255,255,.09);
}

.matrix-summary-message b,
.matrix-summary-message span{
  display:block;
  font-size:10px;
}

.matrix-summary-message span{
  margin-top:4px;
  color:#c3d4e0;
}

.matrix-last-updated{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:27px;
  margin-top:29px;
  color:#bed0dd;
  font-size:10px;
}

.matrix-last-updated b{color:#e9f2f8}
.matrix-refresh-note{padding-left:16px;border-left:1px solid rgba(255,255,255,.16)}

/* Sections */
.matrix-section{
  padding-top:23px;
}

.matrix-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:13px;
}

.matrix-section-title h2{
  margin:0;
  font-size:18px;
  letter-spacing:-.025em;
}

.matrix-section-hint{
  color:#087ce4;
  font-size:10px;
  font-weight:600;
}

/* Category grid */
.matrix-category-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:17px;
}

.matrix-category-card{
  overflow:hidden;
  background:#fff;
  border:1px solid #dfe7ee;
  border-radius:9px;
  box-shadow:0 5px 16px rgba(28,65,96,.045);
}

.matrix-category-head{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 18px;
  border-bottom:1px solid #e6edf2;
}

.matrix-category-heading{
  display:flex;
  align-items:center;
  gap:14px;
}

.matrix-category-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#edf5fd;
  color:#087ce4;
  font-size:20px;
  font-weight:800;
}

.matrix-category-heading h3{
  margin:0;
  color:#13283d;
  font-size:14px;
  letter-spacing:-.015em;
}

.matrix-category-heading span{
  display:block;
  margin-top:4px;
  color:#18a95f;
  font-size:10px;
}

.matrix-chevron{
  color:#153f62;
  font-size:23px;
}

.matrix-service-list{
  padding:3px 14px 7px;
}

.matrix-service-row{
  width:100%;
  min-height:31px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:6px 5px;
  border:0;
  border-bottom:1px solid #edf1f4;
  background:transparent;
  color:#193047;
  font:inherit;
  cursor:pointer;
  text-align:left;
}

.matrix-service-row:last-child{
  border-bottom:0;
}

.matrix-service-row:hover{
  background:#f6f9fb;
}

.matrix-service-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
}

.matrix-service-left b{
  overflow:hidden;
  color:#22384d;
  font-size:11px;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.matrix-state-dot{
  width:10px;
  height:10px;
  flex:0 0 10px;
  display:inline-block;
  border-radius:50%;
  background:currentColor;
}

.matrix-service-state{
  flex:0 0 auto;
  font-size:10px;
  font-weight:500;
}

/* Incident panels */
.matrix-incident-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:17px;
}

.matrix-panel{
  overflow:hidden;
  border:1px solid #dfe7ee;
  border-radius:9px;
  background:#fff;
  box-shadow:0 5px 16px rgba(28,65,96,.04);
}

.matrix-panel-head{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 17px;
  border-bottom:1px solid #e5ecf2;
}

.matrix-panel-head>span{
  color:#087ce4;
  font-size:10px;
  font-weight:600;
}

.matrix-panel-title{
  display:flex;
  align-items:center;
  gap:10px;
}

.matrix-panel-title h2{
  margin:0;
  font-size:15px;
  letter-spacing:-.02em;
}

.matrix-panel-icon{
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  font-size:11px;
  font-weight:800;
}

.red-icon{background:#ef4655}
.blue-icon{background:#0b84ef}

.matrix-panel-body{
  padding:7px 12px 9px;
}

.matrix-empty-state{
  min-height:128px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  color:#687e91;
}

.matrix-empty-check{
  width:35px;
  height:35px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#e4f8ee;
  color:#13a65e;
  font-weight:800;
}

.matrix-empty-state b,
.matrix-empty-state span{
  display:block;
}

.matrix-empty-state b{
  color:#1a344c;
  font-size:12px;
}

.matrix-empty-state span{
  margin-top:5px;
  font-size:10px;
}

.matrix-active-incident{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:11px 9px;
  border-bottom:1px solid #edf1f4;
}

.matrix-active-incident:last-child{border-bottom:0}

.matrix-incident-dot{
  width:13px;
  height:13px;
  flex:0 0 13px;
  margin-top:4px;
  border-radius:50%;
  background:currentColor;
}

.matrix-incident-copy{
  min-width:0;
  flex:1;
}

.matrix-incident-title-line{
  display:flex;
  align-items:center;
  gap:10px;
}

.matrix-incident-title-line b{
  color:#172d43;
  font-size:12px;
}

.matrix-severity{
  display:inline-flex;
  padding:3px 8px;
  border-radius:999px;
  font-size:8px;
  font-weight:700;
  background:#f3f5f7;
}

.matrix-severity.bad{background:#ffe1e5}
.matrix-severity.warn{background:#fff1cf}

.matrix-active-incident p{
  margin:4px 0;
  color:#4e6579;
  font-size:10px;
}

.matrix-active-incident small{
  color:#7d8fa0;
  font-size:9px;
}

.matrix-recent-row{
  min-height:31px;
  display:grid;
  grid-template-columns:12px minmax(120px,1fr) 80px minmax(130px,auto);
  align-items:center;
  gap:10px;
  padding:7px 8px;
  border-bottom:1px solid #edf1f4;
}

.matrix-recent-row:last-child{border-bottom:0}

.matrix-recent-row b{
  color:#1c344b;
  font-size:10px;
}

.matrix-resolved{
  width:max-content;
  padding:3px 8px;
  border-radius:999px;
  background:#e0f7eb;
  color:#0d8f4e;
  font-size:8px;
  font-weight:700;
}

.matrix-recent-date{
  color:#64798c;
  font-size:9px;
  text-align:right;
}

/* Uptime */
.matrix-uptime-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  column-gap:47px;
  row-gap:9px;
  padding:13px 23px 18px;
}

.matrix-uptime-item{
  display:grid;
  grid-template-columns:125px minmax(90px,1fr) 54px;
  align-items:center;
  gap:11px;
}

.matrix-uptime-item>span{
  overflow:hidden;
  color:#263c50;
  font-size:9px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.matrix-uptime-item>b{
  color:#586e82;
  font-size:9px;
  text-align:right;
}

.matrix-uptime-bar{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:#e5edf2;
}

.matrix-uptime-bar i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#11a65e,#23be72);
}

/* Footer */
.matrix-footer{
  margin-top:24px;
  padding:17px 0 20px;
  border-top:1px solid #e0e7ed;
  background:#f6f8fa;
  color:#7a8d9f;
  font-size:9px;
}

.matrix-footer .wrap{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  align-items:center;
}

.matrix-footer b{
  display:inline;
  color:#0e3f65;
  font-size:15px;
  margin-right:7px;
}

.matrix-footer-center{text-align:center}
.matrix-footer .wrap>div:last-child{text-align:right}

/* Force dynamically injected modal content into the same light theme */
.health-modal-panel{
  background:#fff!important;
  border-color:#d7e4ee!important;
  color:#10243a!important;
}

.health-modal-panel .service-modal-heading h2,
.health-modal-panel .modal-components-header h3{
  color:#10243a!important;
}

.health-modal-panel .service-modal-description,
.health-modal-panel .modal-components-header span,
.health-modal-panel .modal-metric span,
.health-modal-panel .modal-no-components{
  color:#71859a!important;
}

.health-modal-panel .modal-metric,
.health-modal-panel .modal-components{
  background:#fff!important;
  border-color:#dce6ef!important;
}

.health-modal-panel .modal-metric{
  background:#f8fafc!important;
}

.health-modal-panel .modal-metric strong,
.health-modal-panel .modal-component-name{
  color:#233b51!important;
}

.health-modal-panel .modal-components-header,
.health-modal-panel .modal-component-row{
  border-color:#e1e9f0!important;
}

/* Responsive */
@media(max-width:1100px){
  .matrix-dashboard .wrap{
    width:min(100% - 32px,1440px);
  }

  .matrix-hero-inner{
    grid-template-columns:1fr;
    gap:30px;
  }

  .matrix-category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .matrix-uptime-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .matrix-dashboard .wrap{
    width:min(100% - 22px,1440px);
  }

  .matrix-nav{
    min-height:59px;
  }

  .matrix-brand-copy small{
    display:none;
  }

  .matrix-nav-links a:not(.matrix-signin){
    display:none;
  }

  .matrix-nav-links{
    gap:10px;
  }

  .matrix-hero{
    padding:31px 0 22px;
  }

  .matrix-hero-status{
    align-items:flex-start;
    gap:16px;
  }

  .matrix-hero-check{
    width:52px;
    height:52px;
    flex-basis:52px;
    font-size:25px;
  }

  .matrix-hero-status h1{
    font-size:29px;
  }

  .matrix-hero-summary{
    grid-template-columns:repeat(2,1fr);
  }

  .matrix-summary-message{
    grid-column:1/-1;
    border-left:0;
    border-top:1px solid rgba(255,255,255,.1);
    padding:12px 0 0;
  }

  .matrix-last-updated{
    flex-direction:column;
    align-items:flex-start;
    gap:7px;
  }

  .matrix-refresh-note{
    border:0;
    padding:0;
  }

  .matrix-category-grid,
  .matrix-incident-grid,
  .matrix-uptime-grid{
    grid-template-columns:1fr;
  }

  .matrix-section-title{
    align-items:flex-end;
  }

  .matrix-section-hint{
    display:none;
  }

  .matrix-recent-row{
    grid-template-columns:12px minmax(100px,1fr) 70px;
  }

  .matrix-recent-date{
    display:none;
  }

  .matrix-uptime-item{
    grid-template-columns:105px 1fr 55px;
  }

  .matrix-footer .wrap{
    grid-template-columns:1fr;
    gap:6px;
    text-align:center;
  }

  .matrix-footer-center,
  .matrix-footer .wrap>div:last-child{
    text-align:center;
  }
}
/* MATRIX navigation active section */

#home,
#services,
#incidents,
#uptime {
    scroll-margin-top: 82px;
}

.matrix-nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: -22px;
    height: 2px;
    background: #2b9cff;
    opacity: 0;
    transition:
        left .22s ease,
        right .22s ease,
        opacity .18s ease;
}

.matrix-nav-links a.active::after {
    left: 0;
    right: 0;
    opacity: 1;
}

.matrix-nav-links .matrix-signin::after {
    display: none;
}