/* Server service inventory, shared by Services and the administrator dashboard. */
.services-page { display: grid; gap: 1rem; min-width: 0; }
.svc-header { padding: 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; }
.svc-header .wp-page-title { margin: 0 0 .35rem; }
.svc-header .wp-page-subtitle { margin: 0; }
.svc-refresh { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.svc-refresh > span { color: #64748b; font-size: .78rem; }
.svc-refresh > button { flex-shrink: 0; }
.svc-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.svc-summary-card { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.svc-summary-card > span { color: #64748b; font-size: .85rem; }
.svc-summary-card > strong { color: #0f274b; font-size: 1.5rem; line-height: 1.3; }
.svc-summary-card--running { border-left: 3px solid #10b981; }
.svc-summary-card--attention { border-left: 3px solid #f59e0b; }
.svc-inventory { overflow: hidden; }
.svc-inventory-header { padding: 1.1rem 1.3rem; border-bottom: 1px solid #e2e8f0; }
.svc-inventory-header h2 { margin: 0 0 .35rem; color: #0f274b; font-size: 1rem; }
.svc-inventory-header p { margin: 0; color: #64748b; font-size: .82rem; }
.svc-table-wrap { width: 100%; overflow-x: auto; }
.svc-table { width: 100%; border-collapse: collapse; font-size: .85rem; text-align: left; }
.svc-table th { color: #64748b; background: #f8fafc; font-size: .71rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; padding: .85rem 1.3rem; border-bottom: 1px solid #e2e8f0; }
.svc-table td { padding: 1rem 1.3rem; vertical-align: top; border-bottom: 1px solid #edf2f7; }
.svc-table tr:last-child td { border-bottom: 0; }
.svc-table th:first-child, .svc-table td:first-child { width: 27%; }
.svc-table th:last-child, .svc-table td:last-child { width: 22%; }
.svc-table tbody tr:hover { background: #fbfcff; }
.svc-name { display: block; color: #0f274b; line-height: 1.5; font-weight: 650; }
.svc-unit { color: #64748b; margin-top: .3rem; font-size: .76rem; overflow-wrap: anywhere; }
.svc-unit code { background: #f1f5f9; padding: .12rem .3rem; color: #475569; font-size: .74rem; border-radius: 4px; }
.svc-category { display: block; margin-top: .4rem; color: #64748b; font-size: .72rem; }
.svc-status { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .55rem; border: 1px solid transparent; border-radius: 999px; font-size: .7rem; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.svc-status > span { width: 5px; height: 5px; border-radius: 100%; background: currentColor; }
.svc-status--success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.svc-status--info { background: #F6F2FE; color: #6F3DDB; border-color: #D8C8FB; }
.svc-status--muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.svc-status--danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.svc-status--warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.svc-meta { font-size: .74rem; color: #64748b; margin-top: .45rem; line-height: 1.5; overflow-wrap: anywhere; }
.svc-detail { margin: .45rem 0 0; color: #475569; font-size: .78rem; line-height: 1.55; overflow-wrap: anywhere; }
.svc-substate { display: block; margin-top: .3rem; color: #64748b; font-size: .72rem; }
.svc-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.svc-btn { appearance: none; background: #fff; border: 1px solid #dbe4f0; border-radius: 7px; padding: .44rem .7rem; color: #15385e; font: inherit; font-size: .76rem; font-weight: 500; line-height: 1.4; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.svc-btn:hover:not(:disabled) { color: #8352F1; background: #F6F2FE; border-color: #BCA2F8; }
.svc-btn:focus-visible { outline: 3px solid #D8C8FB; outline-offset: 2px; }
.svc-btn--start { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.svc-btn--start:hover:not(:disabled) { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.svc-btn--danger { color: #b91c1c; border-color: #fecaca; }
.svc-btn--danger:hover:not(:disabled) { background: #fef2f2; color: #991b1b; border-color: #f87171; }
.svc-btn:disabled { opacity: .5; cursor: not-allowed; }
.svc-no-actions { color: #64748b; font-size: .76rem; }
.svc-message { margin: 0; padding: .85rem 1rem; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 9px; font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.svc-message--error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.svc-message[hidden] { display: none; }
.svc-empty { color: #64748b; padding: 1.5rem; font-size: .85rem; }
.svc-dashboard-meta { display: grid; gap: .35rem; padding: .9rem 1.25rem 0; color: #64748b; font-size: .75rem; }
.svc-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: .8rem; padding: 1.1rem 1.25rem 1.25rem; }
.svc-dashboard-inventory { min-width: 0; }
.svc-dashboard-other { margin: 0 1.25rem 1.25rem; border: 1px solid #e2e8f0; border-radius: 9px; overflow: hidden; }
.svc-dashboard-other > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; background: #f8fafc; color: #183c66; font-size: .8rem; font-weight: 600; cursor: pointer; list-style: none; }
.svc-dashboard-other > summary::-webkit-details-marker { display: none; }
.svc-dashboard-other > summary:hover { background: #F6F2FE; }
.svc-dashboard-other > summary:focus-visible { outline: 3px solid #BCA2F8; outline-offset: -3px; }
.svc-dashboard-other > summary > span { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.svc-extra-count { display: inline-flex; border-radius: 99px; padding: .12rem .45rem; background: #e2e8f0; color: #475569; font-size: .7rem; }
.svc-collapse-label, .svc-dashboard-other[open] .svc-expand-label { display: none; }
.svc-dashboard-other[open] .svc-collapse-label { display: inline; }
.svc-dashboard-other[open] > summary { border-bottom: 1px solid #e2e8f0; }
.svc-dashboard-other[open] > summary > i { transform: rotate(180deg); }
.svc-dashboard-other .svc-dashboard-grid { padding: 1rem; }
.svc-dashboard-card { background: #fbfcff; border: 1px solid #e2e8f0; padding: .9rem; border-radius: 9px; min-width: 0; }
.svc-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.svc-card-heading > strong { color: #0f274b; font-size: .83rem; line-height: 1.5; }
.svc-dashboard-card .svc-actions, .svc-dashboard-card .svc-no-actions { margin-top: .7rem; }
#dashboard-services-message:not([hidden]) { margin: 1rem 1.25rem 0; }
@media (max-width: 1080px) { .svc-dashboard-layout { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 800px) {
    .svc-header { align-items: flex-start; flex-direction: column; padding: 1.1rem; }
    .svc-refresh { justify-content: flex-start; }
    .svc-summary { gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .svc-summary-card { padding: .8rem; }
    .svc-table th, .svc-table td { padding: .85rem 1rem; }
}
@media (max-width: 560px) {
    .svc-table, .svc-table tbody { display: block; }
    .svc-table thead { display: none; }
    .svc-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 1rem; border-bottom: 1px solid #e2e8f0; }
    .svc-table tr:last-child { border-bottom: 0; }
    .svc-table td, .svc-table td:first-child, .svc-table td:last-child { display: block; width: 100%; border: 0; padding: .45rem 0; }
    .svc-table td::before { content: attr(data-label); display: block; margin-bottom: .4rem; color: #64748b; font-size: .67rem; letter-spacing: .04em; text-transform: uppercase; }
    .svc-dashboard-grid, .svc-dashboard-meta { padding-left: 1rem; padding-right: 1rem; }
    .svc-dashboard-other { margin-left: 1rem; margin-right: 1rem; }
    .svc-card-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .svc-btn { transition: none; } }
