/* AMS V130 — System Health connected integration baseline */
.system-health-workspace{background:#f5f7fb!important;overflow:auto!important}
.system-health-workspace>.topbar{background:#fff!important}
.system-health-dashboard{padding:16px 18px 20px;max-width:1800px;margin:0 auto;font-family:inherit;color:#20324a}

/* Overall status */
.system-health-overall{background:#fff;border:1px solid #dbe2eb;border-left:4px solid #2f9965;border-radius:9px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:14px}
.system-health-overall-left{display:flex;align-items:center;gap:14px;min-width:0}
.system-health-status-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#168451;color:#fff;font-size:24px;font-weight:600;flex:0 0 auto}
.system-health-overall-left>div{display:flex;flex-direction:column;gap:3px}
.system-health-overall-left strong{font-size:15px;color:#198052}
.system-health-overall-left small{font-size:11px;color:#53667b}
.system-health-updated{font-size:9px;color:#697a8d;margin-top:3px}
.system-health-overall-metrics{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr));gap:0;min-width:560px}
.system-health-overall-metrics>div{padding:4px 16px;border-left:1px solid #e5eaf0;display:flex;flex-direction:column;gap:2px}
.system-health-overall-metrics span{font-size:9px;text-transform:uppercase;letter-spacing:.035em;color:#6a7a8d;font-weight:800}
.system-health-overall-metrics strong{font-size:14px;color:#23364c}
.system-health-overall-metrics small{font-size:10px;color:#68798b}

/* Shared panel language */
.system-health-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(330px,.9fr);gap:14px;align-items:start}
.system-health-card{background:#fff;border:1px solid #dbe2eb;border-radius:9px;overflow:hidden;min-width:0}
.system-health-card>header{padding:13px 15px;border-bottom:1px solid #e7ebf0;background:#fbfcfe;display:flex;align-items:center;justify-content:space-between;gap:12px}
.system-health-card h2{margin:0;font-size:14px;color:#26384d}
.system-health-card header p{margin:3px 0 0;font-size:10px;color:#758497}
.system-health-link{border:0!important;background:transparent!important;color:#1f5fc4!important;padding:4px 5px!important;font-size:10px!important;font-weight:700!important;box-shadow:none!important;white-space:nowrap}

/* Integration cards */
.system-health-service-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;padding:11px}
.system-health-service-grid article{border:1px solid #e2e7ee;border-radius:8px;padding:11px 10px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;background:#fff}
.system-health-mini-icon{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eef4ff;color:#31589c;font-size:10px;font-weight:800}
.system-health-service-grid strong{font-size:11px;color:#26394f;line-height:1.3}
.system-health-service-grid small{font-size:9px;line-height:1.35;color:#738194}
.system-health-service-grid button,.system-health-table-wrap button,.system-health-notification-grid button{margin-top:auto;width:100%;border:1px solid #b9c7d9;background:#fff;color:#28529a;border-radius:6px;padding:6px 8px;font-size:10px;font-weight:700}
.system-health-pill{display:inline-flex;align-items:center;width:max-content;border-radius:999px;padding:3px 7px;font-size:9px;font-weight:800;line-height:1.2}
.system-health-pill.good{background:#edf8f1;color:#28744e;border:1px solid #c9e7d4}
.system-health-pill.warn{background:#fff7e8;color:#9b6808;border:1px solid #eed9aa}

/* Issues */
.system-health-issues{grid-column:2;grid-row:1}
.system-health-empty{min-height:173px;padding:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px}
.system-health-empty>span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eaf7ef;color:#278052;font-weight:900}
.system-health-empty strong{font-size:12px;color:#287d52}
.system-health-empty p{max-width:270px;margin:3px 0 0;font-size:10px;line-height:1.45;color:#66788c}

/* Sync table */
.system-health-sync{grid-column:1}
.system-health-table-wrap{overflow-x:auto}
.system-health-table-wrap table{width:100%;border-collapse:collapse;font-size:10px}
.system-health-table-wrap th{padding:8px 9px;background:#f4f7fb;border-bottom:1px solid #dde4ec;text-align:left;color:#5e6e82;font-size:9px;text-transform:uppercase;letter-spacing:.025em;white-space:nowrap}
.system-health-table-wrap td{padding:8px 9px;border-bottom:1px solid #edf1f5;vertical-align:middle;color:#485a70;white-space:nowrap}
.system-health-table-wrap tr:last-child td{border-bottom:0}
.system-health-table-wrap td:first-child{white-space:normal;min-width:165px}
.system-health-table-wrap td strong{display:block;font-size:10.5px;color:#263950}
.system-health-table-wrap td small{display:block;font-size:9px;color:#78879a;margin-top:2px}
.system-health-table-wrap button{margin:0;white-space:nowrap;width:auto;padding:5px 7px}

/* Recent activity */
.system-health-activity{grid-column:2;grid-row:2}
.system-health-activity-list{padding:5px 11px}
.system-health-activity-list>div{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid #edf1f5}
.system-health-activity-list>div:last-child{border-bottom:0}
.system-health-event{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#eef3f9;color:#3a5f8e;font-size:10px;font-weight:800}
.system-health-event.good{background:#eaf7ef;color:#287c52}
.system-health-activity-list p{margin:0;display:flex;flex-direction:column;gap:2px}
.system-health-activity-list strong{font-size:10px;color:#2b3e53;line-height:1.3}
.system-health-activity-list small{font-size:9px;color:#718196}
.system-health-activity-list em{font-style:normal;font-size:9px;font-weight:800;color:#53815f;background:#eef8f1;border-radius:999px;padding:3px 6px}

/* Notifications */
.system-health-notifications{grid-column:1/-1}
.system-health-notification-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:11px}
.system-health-notification-grid article{border:1px solid #e3e8ee;border-radius:8px;padding:11px;min-width:0}
.system-health-notification-grid h3{margin:0 0 8px;font-size:11px;color:#33475e}
.system-health-notification-grid h3 small{font-size:9px;font-weight:500;color:#78879a}
.system-health-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.system-health-counts span{font-size:9px;color:#5d6f83;display:flex;flex-direction:column;gap:2px}
.system-health-counts b{font-size:15px;color:#2f435a}
.system-health-notification-grid p{margin:7px 0 0;font-size:9px;color:#75859a;line-height:1.4}
.system-health-notification-grid ul{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:6px 9px}
.system-health-notification-grid li{font-size:9.5px;color:#45596f}
.system-health-notification-grid li:before{content:'✓';color:#2f8b5c;font-weight:900;margin-right:5px}
.system-health-ack{display:grid;grid-template-columns:24px 1fr;gap:2px 7px;align-items:center;margin-bottom:9px}
.system-health-ack>span{grid-row:1/3;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#eaf7ef;color:#278052;font-weight:900}
.system-health-ack strong{font-size:10px;color:#2d7651}
.system-health-ack small{font-size:9px;color:#758397}
.system-health-footer{margin-top:14px;border:1px solid #d9e3ee;border-radius:8px;background:#fff;padding:9px 11px;text-align:center;font-size:9px;color:#627489}

/* Test environment remains persistent and unmistakable */
.prototype-test-env{margin:8px 12px 0;padding:7px 8px;border:1px solid #ffbf47;border-radius:6px;background:#fff2cc;color:#6e4700;text-align:center;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}

@media(max-width:1400px){.system-health-service-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1250px){.system-health-overall{align-items:flex-start;flex-direction:column}.system-health-overall-metrics{min-width:0;width:100%}}
@media(max-width:900px){.system-health-layout{grid-template-columns:1fr}.system-health-issues,.system-health-sync,.system-health-activity,.system-health-notifications{grid-column:1;grid-row:auto}.system-health-service-grid{grid-template-columns:repeat(2,1fr)}.system-health-notification-grid{grid-template-columns:1fr}.system-health-overall-metrics{grid-template-columns:1fr}.system-health-overall-metrics>div{border-left:0;border-top:1px solid #e5eaf0;padding:8px 0}}
@media(max-width:600px){.system-health-dashboard{padding:10px}.system-health-service-grid{grid-template-columns:1fr}.system-health-overall{padding:13px}.system-health-counts{grid-template-columns:repeat(3,1fr)}}


/* V130 service icons */
.system-health-mini-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.system-health-mini-icon-image{overflow:hidden;background:#f2f4f7}
.system-health-mini-icon-image img{width:24px;height:24px;object-fit:contain;display:block;filter:contrast(1.05)}

/* V130 integration detail dialog */
.system-health-dialog{width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 48px);padding:0;border:1px solid #cfd8e4;border-radius:10px;background:#fff;color:#20324a;box-shadow:0 22px 60px rgba(18,32,50,.22)}
.system-health-dialog::backdrop{background:rgba(20,31,48,.46)}
.system-health-dialog-shell{display:flex;flex-direction:column;max-height:calc(100vh - 52px)}
.system-health-dialog header{padding:18px 20px 14px;border-bottom:1px solid #e2e7ed;display:flex;justify-content:space-between;gap:16px;align-items:flex-start;background:#fbfcfe}
.system-health-dialog header>div{min-width:0}
.system-health-dialog header h2{font-size:19px;margin:7px 0 2px;color:#22354c}
.system-health-dialog header p{margin:0;color:#64758a;font-size:11px}
.system-health-dialog-close{border:0!important;background:transparent!important;box-shadow:none!important;font-size:24px!important;line-height:1!important;color:#607188!important;width:32px!important;height:32px!important;padding:0!important}
.system-health-dialog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:16px 20px 8px}
.system-health-dialog-grid>div{border:1px solid #e0e6ed;border-radius:7px;padding:10px 11px;display:flex;flex-direction:column;gap:3px;background:#fff}
.system-health-dialog-grid small{font-size:9px;text-transform:uppercase;letter-spacing:.025em;color:#728297;font-weight:800}
.system-health-dialog-grid strong{font-size:11px;color:#2d4057}
.system-health-protection,.system-health-dialog-note{margin:8px 20px 0;padding:12px 13px;border-radius:8px}
.system-health-protection{border:1px solid #c8e2d2;background:#f3faf6}
.system-health-protection strong{font-size:11px;color:#24744b}
.system-health-protection p,.system-health-dialog-note p{margin:4px 0 0;font-size:10px;line-height:1.45;color:#5c6f84}
.system-health-dialog-note{border:1px solid #dbe3ed;background:#f8fafc}
.system-health-dialog-note strong{font-size:11px;color:#31465f}
.system-health-dialog footer{display:flex;justify-content:flex-end;gap:8px;padding:16px 20px 8px;margin-top:6px}
.system-health-dialog footer button{border:1px solid #aebcd0;background:#fff;color:#263b55;border-radius:6px;padding:8px 12px;font-size:10px;font-weight:800}
.system-health-dialog footer .system-health-dialog-primary{background:#3f51cc;color:#fff;border-color:#3f51cc}
.system-health-technical-note{padding:0 20px 16px;text-align:right;color:#75869a;font-size:9px}
@media(max-width:720px){.system-health-dialog-grid{grid-template-columns:1fr 1fr}.system-health-dialog footer{flex-wrap:wrap}.system-health-dialog footer button{flex:1 1 160px}}

/* AMS V136.1 — External File Feed row constrained to dialog width */
.system-health-feed-summary{padding-bottom:12px}
.system-health-feed-section{margin:8px 20px 0;border:1px solid #dbe3ed;border-radius:8px;background:#fff;overflow:hidden;min-width:0}
.system-health-feed-section-title{padding:11px 13px;background:#f8fafc;border-bottom:1px solid #e1e7ee;display:flex;align-items:center;justify-content:space-between;gap:10px}
.system-health-feed-section-title>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.system-health-feed-section-title strong{font-size:11px;color:#31465f}
.system-health-feed-section-title small{font-size:9px;color:#718196}
.system-health-feed-list{display:flex;flex-direction:column;min-width:0}
.system-health-feed-item{width:100%;max-width:100%;min-width:0;box-sizing:border-box;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;padding:12px 13px!important;margin:0!important;display:grid;grid-template-columns:minmax(185px,1.45fr) repeat(3,minmax(0,1fr)) 18px;gap:10px;align-items:center;text-align:left;color:#2d4057!important;overflow:hidden}
.system-health-feed-item:hover{background:#f8fbff!important}
.system-health-feed-primary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:center;min-width:0}
.system-health-feed-status{display:flex;align-items:center}
.system-health-feed-name{display:flex;flex-direction:column;gap:2px;min-width:0}
.system-health-feed-name strong{font-size:11px;line-height:1.3;color:#2c4058;white-space:normal;overflow-wrap:anywhere}
.system-health-feed-name small{font-size:9px;line-height:1.35;color:#718196;white-space:normal;overflow-wrap:anywhere}
.system-health-feed-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.system-health-feed-meta small{font-size:9px;text-transform:uppercase;letter-spacing:.02em;color:#77879a;font-weight:800;white-space:normal}
.system-health-feed-meta strong{font-size:10px;line-height:1.3;color:#344960;font-weight:700;white-space:normal;overflow-wrap:anywhere}
.system-health-feed-more{font-size:19px;line-height:1;font-weight:700;color:#2859aa;justify-self:end}
.system-health-feed-detail-dialog .system-health-dialog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:760px){.system-health-feed-item{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) 18px}.system-health-feed-meta:nth-of-type(2),.system-health-feed-meta:nth-of-type(3){display:none}.system-health-feed-primary{grid-column:1}.system-health-feed-more{grid-column:3}.system-health-feed-detail-dialog .system-health-dialog-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.system-health-feed-item{grid-template-columns:minmax(0,1fr) 18px}.system-health-feed-meta{display:none!important}.system-health-feed-detail-dialog .system-health-dialog-grid{grid-template-columns:1fr}}


/* AMS V137 — clickable System Health details */
.system-health-overall-metric-button{padding:4px 16px;border:0;border-left:1px solid #e5eaf0;background:transparent;display:flex;flex-direction:column;gap:2px;text-align:left;cursor:pointer;min-width:0;color:inherit;font:inherit}
.system-health-overall-metric-button:hover{background:#f7faff}
.system-health-overall-metric-button span{font-size:9px;text-transform:uppercase;letter-spacing:.035em;color:#6a7a8d;font-weight:800}
.system-health-overall-metric-button strong{font-size:14px;color:#23364c}
.system-health-overall-metric-button small{font-size:10px;color:#68798b}
.system-health-activity-list>button{width:100%;border:0;background:transparent;box-shadow:none;display:grid;grid-template-columns:24px minmax(0,1fr) auto 14px;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid #edf1f5;text-align:left;color:inherit;cursor:pointer}
.system-health-activity-list>button:last-child{border-bottom:0}
.system-health-activity-list>button:hover{background:#f8fbff}
.system-health-row-more{font-size:17px;color:#3562a7;font-weight:800;justify-self:end}
.system-health-dialog-empty{margin:16px 20px 0;padding:24px 18px;border:1px solid #dce5ee;border-radius:8px;background:#fbfcfe;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px}
.system-health-dialog-empty>span{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#eaf7ef;color:#278052;font-weight:900}
.system-health-dialog-empty strong{font-size:12px;color:#287d52}
.system-health-dialog-empty p{margin:0;max-width:480px;font-size:10px;line-height:1.5;color:#66788c}
.system-health-dialog-activity-list{margin:14px 20px 0;border:1px solid #dce4ed;border-radius:8px;overflow:hidden}
.system-health-dialog-activity-list>button{width:100%;border:0;border-bottom:1px solid #e7ecf2;background:#fff;box-shadow:none;display:grid;grid-template-columns:26px minmax(0,1fr) auto 14px;gap:9px;align-items:center;padding:11px 12px;text-align:left;color:inherit;cursor:pointer}
.system-health-dialog-activity-list>button:last-child{border-bottom:0}
.system-health-dialog-activity-list>button:hover{background:#f8fbff}
.system-health-dialog-activity-list>button>span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0}
.system-health-dialog-activity-list strong{font-size:10.5px;color:#2b3e53}
.system-health-dialog-activity-list small{font-size:9px;color:#718196}
.system-health-dialog-activity-list em{font-style:normal;font-size:9px;font-weight:800;color:#53815f;background:#eef8f1;border-radius:999px;padding:3px 6px}
.system-health-dialog-activity-list b{font-size:17px;color:#3562a7}
@media(max-width:900px){.system-health-overall-metric-button{border-left:0;border-top:1px solid #e5eaf0;padding:8px 0}}
