.service-analysis { min-width:0; }
.service-analysis h2,.service-analysis h3 { margin:0; font-size:17px; display:flex; align-items:center; gap:9px; }
.service-analysis h2 { font-size:21px; }
.service-analysis svg { width:19px; height:19px; flex-shrink:0; }
.sa-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.sa-heading p { margin:8px 0 0; color:var(--muted); overflow-wrap:anywhere; }
.sa-actions { display:flex; gap:8px; flex-wrap:wrap; }
.sa-period { display:flex; flex-wrap:wrap; align-items:end; gap:12px; border-block:1px solid var(--line); padding:14px 0; margin-bottom:18px; }
.service-analysis label { display:grid; gap:6px; font-size:12px; color:var(--muted); min-width:0; }
.service-analysis label[hidden] { display:none; }
.sa-period select { min-width:205px; }
.sa-period input { width:155px; }
.sa-period-note { margin-left:auto; max-width:400px; color:var(--muted); font-size:12px; padding-bottom:12px; }
.sa-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.service-analysis .sa-card { background:var(--panel); color:var(--text); border:1px solid var(--line); border-top:3px solid var(--sa-accent); border-radius:8px; display:flex; flex-direction:column; align-items:stretch; text-align:left; min-height:133px; gap:12px; padding:14px; white-space:normal; }
.service-analysis .sa-card:hover,.service-analysis .sa-card:focus-visible { background:var(--panel-2); outline:2px solid var(--sa-accent); outline-offset:2px; }
.service-analysis .sa-card.is-selected { border-bottom-color:var(--sa-accent); }
.sa-card span { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
.sa-card svg { color:var(--sa-accent); }
.sa-card b { font-size:23px; font-weight:700; line-height:1.25; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.sa-card small { color:var(--muted); font-size:12px; line-height:1.5; margin-top:auto; }
.sa-tone-blue { --sa-accent:var(--cyan); }
.sa-tone-green { --sa-accent:var(--green); }
.sa-tone-amber { --sa-accent:var(--amber); }
.sa-tone-red { --sa-accent:var(--red); }
.sa-status.sa-tone-green { color:var(--green); }
.sa-status.sa-tone-red { color:var(--red); }
.sa-summary { display:grid; grid-template-columns:1.1fr 1fr; gap:30px; padding:22px 0; border-bottom:1px solid var(--line); }
.sa-summary p,.sa-summary li,.sa-notes li { line-height:1.65; margin:8px 0 0; }
.sa-summary ul,.sa-notes ul { padding-left:20px; }
.sa-summary li::marker { color:var(--amber); }
.sa-financial,.sa-notes { padding:15px 0; border-bottom:1px solid var(--line); }
.service-analysis summary { font-weight:700; cursor:pointer; padding:6px 0; }
.sa-financial[open] .sa-table { margin-top:12px; }
.sa-details { padding-top:22px; min-width:0; scroll-margin-top:85px; }
.sa-details h3 { margin:16px 0 12px; font-size:14px; }
.sa-detail-tools { display:flex; align-items:end; flex-wrap:wrap; gap:14px; justify-content:space-between; }
.sa-tabs { display:flex; gap:4px; max-width:100%; overflow-x:auto; padding:3px 0; }
.sa-tabs button { background:transparent; border-color:transparent; color:var(--muted); min-height:40px; }
.sa-tabs button.active { background:var(--panel-2); border-color:var(--line-strong); color:var(--text); }
.sa-table { overflow-x:auto; max-width:100%; border:1px solid var(--line); border-radius:6px; }
.sa-table table { width:100%; border-collapse:collapse; table-layout:auto; }
.sa-table th,.sa-table td { padding:12px; text-align:left; vertical-align:top; border-bottom:1px solid var(--line); line-height:1.5; }
.sa-table th { background:var(--panel-3); font-size:12px; color:var(--muted); white-space:nowrap; }
.sa-table td { min-width:95px; overflow-wrap:anywhere; }
.sa-table td small { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.sa-table tr:nth-child(even) { background:var(--panel); }
.sa-table .sa-num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sa-table tr:last-child td { border-bottom:0; }
.sa-pagination { display:flex; gap:8px; align-items:center; padding:12px 0; }
.sa-pagination span { margin-right:auto; color:var(--muted); font-size:12px; }
.sa-empty,.sa-state { text-align:center; padding:36px 18px; }
.sa-state { border:1px solid var(--line); border-radius:8px; background:var(--panel); }
.sa-state h2 { justify-content:center; margin:14px 0; }
.sa-state p { color:var(--muted); line-height:1.6; }
.sa-state > svg { width:35px; height:35px; color:var(--cyan); }
.sa-notice { border-left:3px solid var(--cyan); padding:12px 16px; background:var(--panel); margin-top:16px; }
.service-analysis input,.service-analysis select { min-height:40px; max-width:100%; color:var(--text); background:var(--panel-2); border-color:var(--line-strong); }
.service-analysis .btn-secondary { color:var(--text); }
.service-analysis .btn-secondary:hover { background:var(--panel-2); }
.sa-dashboard-shortcut { display:flex; justify-content:flex-end; margin-bottom:14px; }
@media(max-width:1150px) { .sa-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .sa-period-note { margin-left:0; } }
@media(max-width:650px) {
  .sa-heading { align-items:flex-start; flex-direction:column; gap:14px; }
  .sa-actions { width:100%; }
  .sa-summary { grid-template-columns:1fr; gap:20px; }
  .sa-period label { flex:1 1 140px; } .sa-period label:first-child { flex-basis:100%; }
  .sa-period select,.sa-period input { width:100%; min-width:0; }
  .sa-period-note { padding-bottom:0; }
  .sa-cards { gap:8px; } .service-analysis .sa-card { padding:12px 10px; min-height:140px; gap:10px; }
  .sa-card b { font-size:19px; } .sa-card span { align-items:flex-start; line-height:1.45; }
  .sa-table th,.sa-table td { padding:10px; }
  .sa-detail-tools > label { width:100%; } .sa-tabs { width:100%; }
}
@media(max-width:350px) { .sa-cards { grid-template-columns:1fr; } }
@media(max-height:680px) and (min-width:821px) { .service-analysis .sa-card { min-height:108px; gap:8px; padding:10px 12px; } .sa-period { padding:10px 0; } }
@media(prefers-reduced-motion:reduce) { .service-analysis * { scroll-behavior:auto; } }
