.service-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 14px 16px; color: #ad3d54; background: #ffedf0; border: 1px solid #f7d8df; border-radius: 10px; }
.service-notice.success { color: #21865f; background: #e9f8f1; border-color: #cdebdc; }
.service-notice .btn { flex-shrink: 0; }
.service-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.service-summary { display: flex; align-items: center; gap: 18px; min-height: 130px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--card-shadow); }
.service-summary-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 17px; color: #fff; flex-shrink: 0; }
.service-summary-icon .ui-icon { width: 33px; height: 33px; stroke-width: 2; }
.service-summary.total .service-summary-icon { background: linear-gradient(145deg, #684cf1, #4e37da); box-shadow: 0 9px 18px #5b43ed38; }
.service-summary.operational .service-summary-icon { background: linear-gradient(145deg, #58bd67, #359849); box-shadow: 0 9px 18px #45ae5538; }
.service-summary.problems .service-summary-icon { background: linear-gradient(145deg, #ffb71c, #ff8d00); box-shadow: 0 9px 18px #ff9d1338; }
.service-summary div { display: grid; gap: 2px; min-width: 0; }
.service-summary div > span { color: #3d4a61; font-size: 14px; font-weight: 700; }
.service-summary strong { color: var(--ink); font-size: 34px; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; }
.service-summary small { color: var(--muted); font-size: 12px; }
.service-card { padding: 0; overflow: hidden; margin-bottom: 24px; }
.availability-card { padding: 0; overflow: hidden; margin-bottom: 20px; }
.availability-list { display: grid; padding: 4px 22px 12px; }
.availability-row { display: grid; gap: 9px; padding: 16px 0; border-bottom: 1px solid #edf1f7; }
.availability-row:last-child { border-bottom: 0; }
.availability-head { display: flex; align-items: center; gap: 16px; }
.availability-head { justify-content: space-between; }
.availability-context { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.availability-name { min-width: 0; color: var(--ink); font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.availability-value { min-width: 118px; color: var(--ink); font-size: 13px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.availability-value.empty { color: var(--muted); }
.availability-evidence { color: var(--muted); font-size: 11px; }
.partial-sample { color: #9a6700; cursor: help; font-weight: 700; }
.progress-track { display: block; width: 100%; height: 9px; overflow: hidden; background: #edf1f6; border-radius: 999px; }
.progress-track span { display: block; height: 100%; min-width: 2px; background: #45ae55; border-radius: inherit; }
.progress-track.degraded span { background: #ffad13; }
.progress-track.down span { background: #ed6077; }
.progress-track.unknown span { background: #9aa7b8; }
.updated-at { color: var(--muted); font-size: 12px; white-space: nowrap; }
.panel-state { display: grid; place-items: center; min-height: 220px; padding: 28px; color: var(--muted); text-align: center; }
.panel-state.compact { min-height: 120px; background: #fff; border: 1px dashed #dce5f1; border-radius: 12px; }
.panel-state .btn { margin-top: 14px; }
.services-table td { height: 76px; }
.services-table tbody tr { cursor: pointer; }
.services-table tbody tr:focus-within { outline: 2px solid #9fbcf2; outline-offset: -2px; }
.service-name { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; }
.service-name:hover { color: var(--primary); }
.service-logo { display: grid; place-items: center; width: 40px; height: 40px; color: var(--primary); background: #f0edff; border-radius: 11px; flex-shrink: 0; }
.service-logo .ui-icon { width: 21px; height: 21px; }
.service-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 6px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-badge .ui-icon { width: 14px; height: 14px; stroke-width: 2.2; }
.status-badge.operational { color: #21865f; background: #e9f8f1; }
.status-badge.degraded { color: #a66b11; background: #fff4df; }
.status-badge.down { color: #bd435a; background: #ffedf0; }
.status-badge.unknown { color: #62758e; background: #eef2f7; }
.latency { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.uptime-value { color: #2f7f51; font-variant-numeric: tabular-nums; white-space: nowrap; }
.uptime-value.empty { color: var(--muted); }
.failure-count { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 7px; color: #52647c; background: #eef2f7; border-radius: 7px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.failure-count.has-failures { color: #bd435a; background: #ffedf0; }
.error-preview { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-error { color: #9aa7b8; }
.incidents-section { margin-top: 28px; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.subsection-heading h2 { margin-bottom: 4px; }
.count-pill { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; color: #755d17; background: #fff4d9; border-radius: 15px; font-size: 12px; font-weight: 800; }
.incident-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.incident-card { position: relative; display: grid; grid-template-columns: 42px 1fr auto; gap: 13px; align-items: start; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--card-shadow); }
.incident-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #a66b11; background: #fff4df; border-radius: 11px; }
.incident-card.down .incident-icon { color: #bd435a; background: #ffedf0; }
.incident-card h3 { margin: 0 0 4px; color: var(--ink); font-size: 15px; font-weight: 800; }
.incident-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.incident-card .status-badge { align-self: center; }
.incident-service { color: var(--primary); text-decoration: none; font-size: 12px; font-weight: 800; }
.incident-service:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; color: #61738d; text-decoration: none; font-weight: 800; }
.back-link:hover { color: var(--primary); }
.back-link .ui-icon { width: 17px; height: 17px; }
.detail-loading { min-height: 360px; }
.detail-hero { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; margin-bottom: 18px; }
.service-identity { display: flex; align-items: center; gap: 16px; }
.service-identity .service-logo { width: 58px; height: 58px; border-radius: 15px; }
.service-identity .service-logo .ui-icon { width: 29px; height: 29px; }
.service-identity .eyebrow { margin: 0 0 4px; }
.service-identity h1 { margin: 0 0 8px; }
.detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.detail-facts article { min-width: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--card-shadow); }
.detail-facts article > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.detail-facts strong { color: var(--ink); font-size: 14px; line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.detail-facts .fact-highlight { border-color: #d8d1ff; background: #faf9ff; }
.detail-facts .fact-highlight strong { color: var(--primary-dark); font-size: 20px; }
.detail-facts .fact-highlight small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.analytics-card, .timeline-card { padding: 0; overflow: hidden; margin-bottom: 20px; }
.analytics-heading { align-items: flex-start; }
.chart-stats { display: flex; align-items: center; gap: 26px; }
.chart-stats span { display: grid; gap: 2px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.chart-stats strong { color: var(--ink); font-size: 16px; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.latency-chart { position: relative; height: 310px; min-height: 310px; padding: 18px 22px 22px; }
.latency-chart canvas { width: 100% !important; height: 100% !important; }
.status-timeline { position: relative; height: 72px; min-height: 72px; padding: 16px 22px 8px; }
.status-timeline canvas { width: 100% !important; height: 100% !important; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 0 22px 22px; color: var(--muted); font-size: 11px; }
.timeline-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; background: #9aa7b8; }
.timeline-legend .operational::before { background: #45ae55; }
.timeline-legend .degraded::before { background: #ffad13; }
.timeline-legend .down::before { background: #ed6077; }
.timeline-legend .unknown::before { background: #9aa7b8; }
.history-table td { height: 68px; }
.result-message { display: block; max-width: 520px; color: #52647c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#service-detail .incidents-section { margin-bottom: 28px; }

@media (max-width: 1000px) {
    .service-summary-grid { grid-template-columns: 1fr; }
    .service-summary { min-height: 108px; }
    .detail-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .service-summary-grid { gap: 10px; }
    .service-summary { min-height: 102px; padding: 16px; border-radius: 12px; }
    .service-summary-icon { width: 52px; height: 52px; border-radius: 13px; }
    .service-summary-icon .ui-icon { width: 26px; height: 26px; }
    .service-summary strong { font-size: 29px; }
    .updated-at { display: none; }
    .incidents-section { margin-top: 22px; }
    .incident-grid { grid-template-columns: 1fr; }
    .incident-card { grid-template-columns: 40px 1fr; }
    .incident-card .status-badge { grid-column: 2; }
    .detail-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
    .detail-hero .btn { width: 100%; }
    .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-facts article:last-child { grid-column: 1 / -1; }
    .analytics-heading { align-items: flex-start; }
    .chart-stats { width: 100%; justify-content: space-between; gap: 10px; }
    .latency-chart { height: 260px; min-height: 260px; padding: 12px 10px 18px; }
    .availability-list { padding-left: 14px; padding-right: 14px; }
    .availability-head, .availability-context { gap: 10px; }
    .availability-value { min-width: 105px; font-size: 12px; }
}
