:root {
  color-scheme: dark;
  --bg: #07101d;
  --panel: rgba(19, 31, 49, .72);
  --panel-hover: rgba(26, 42, 65, .9);
  --border: rgba(148, 163, 184, .13);
  --border-hover: rgba(148, 163, 184, .28);
  --text: #f7fafc;
  --muted: #8fa1b8;
  --faint: #607086;
  --green: #32d583;
  --red: #f97066;
  --blue: #60a5fa;
  --shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(37, 99, 235, .17), transparent 64%),
    radial-gradient(800px 500px at 93% 5%, rgba(14, 165, 233, .08), transparent 68%),
    linear-gradient(160deg, #091321 0%, #060d18 60%, #07101d 100%);
}
button, input { font: inherit; }
button { color: inherit; }
.shell { width: min(1480px, calc(100% - 64px)); margin: 0 auto; }
.topbar { min-height: 104px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #2563eb, #0ea5e9); box-shadow: 0 9px 24px rgba(37, 99, 235, .25); }
.brand-mark svg { width: 24px; fill: white; }
.eyebrow { margin: 0 0 3px; color: var(--blue); font-weight: 750; font-size: 10px; letter-spacing: .18em; }
h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .ghost-button { height: 42px; border: 1px solid var(--border); background: rgba(15, 25, 40, .75); cursor: pointer; transition: .18s ease; }
.icon-button:hover, .ghost-button:hover { background: #17263b; border-color: var(--border-hover); transform: translateY(-1px); }
.icon-button { width: 42px; display: grid; place-items: center; border-radius: 11px; }
.icon-button svg { width: 19px; fill: none; stroke: #b7c5d6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.spinning svg { animation: spin .7s linear infinite; }
.ghost-button { padding: 0 15px; border-radius: 11px; color: #cbd5e1; }
.hero { padding: 54px 0 34px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.greeting { margin: 0 0 7px; font-size: clamp(26px, 3vw, 38px); font-weight: 720; letter-spacing: -.045em; }
.subtext { margin: 0; color: var(--muted); font-size: 15px; }
.summary { display: flex; align-items: center; padding: 13px 17px; border: 1px solid var(--border); border-radius: 13px; background: rgba(12, 21, 34, .62); box-shadow: var(--shadow); }
.summary-item { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.summary-item strong { color: var(--text); font-size: 14px; }
.summary-divider { width: 1px; height: 18px; margin: 0 14px; background: var(--border); }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.online { background: var(--green); box-shadow: 0 0 0 3px rgba(50, 213, 131, .1); }
.dot.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(249, 112, 102, .1); }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 40px; }
.search { width: min(380px, 100%); height: 43px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(15, 25, 40, .65); transition: .18s ease; }
.search:focus-within { border-color: rgba(96, 165, 250, .55); box-shadow: 0 0 0 3px rgba(96, 165, 250, .08); }
.search svg { width: 18px; flex: 0 0 auto; fill: none; stroke: #718198; stroke-width: 1.8; stroke-linecap: round; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: #65758a; }
.sync { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.sync-dot.loading { background: var(--blue); animation: pulse 1s ease-in-out infinite; }
.service-section { margin-bottom: 42px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { display: flex; align-items: center; gap: 9px; margin: 0; color: #dce5ef; font-size: 12px; font-weight: 750; letter-spacing: .095em; text-transform: uppercase; }
.section-line { height: 1px; flex: 1; margin-left: 15px; background: linear-gradient(90deg, var(--border), transparent); }
.section-count { margin-left: 12px; color: var(--faint); font-size: 11px; font-weight: 600; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.service-card { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; color: inherit; text-decoration: none; background: var(--panel); box-shadow: 0 6px 22px rgba(0,0,0,.1); transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.service-card:hover { transform: translateY(-2px); border-color: var(--border-hover); background: var(--panel-hover); box-shadow: 0 13px 28px rgba(0,0,0,.2); }
.service-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; background: color-mix(in srgb, var(--accent) 72%, #0c1726); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.service-copy { min-width: 0; flex: 1; }
.service-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.service-description { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.service-status { width: 16px; height: 16px; display: grid; place-items: center; flex: 0 0 auto; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.service-card.online .status-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(50,213,131,.09); }
.service-card.offline { opacity: .66; }
.service-card.offline .status-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(249,112,102,.08); }
.service-card.checking .status-dot { background: var(--blue); animation: pulse 1s ease-in-out infinite; }
.discovered-badge { display: inline-block; margin-left: 5px; color: #60a5fa; font-size: 8px; vertical-align: 1px; }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 35px; color: var(--faint); }
.empty h2 { margin: 12px 0 4px; color: var(--text); font-size: 18px; }
.empty p { margin: 0; font-size: 13px; }
.hidden { display: none !important; }
footer { display: flex; justify-content: center; align-items: center; gap: 9px; padding: 12px 0 35px; color: #506176; font-size: 11px; }
.footer-dot { color: #334155; }
.skeleton-section { margin-top: 20px; }
.skeleton { position: relative; overflow: hidden; background: #101d2d; }
.skeleton::after { position: absolute; inset: 0; content: ""; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent); animation: shimmer 1.7s infinite; }
.skeleton.heading { width: 130px; height: 13px; margin-bottom: 16px; border-radius: 4px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.skeleton.card { height: 74px; border-radius: 14px; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 1080px) { .service-grid, .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) {
  .shell { width: min(100% - 32px, 700px); }
  .topbar { min-height: 82px; }
  .hero { align-items: flex-start; flex-direction: column; padding: 36px 0 26px; }
  .summary { width: 100%; justify-content: center; }
  .service-grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools { margin-bottom: 32px; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 24px); }
  .brand-mark { width: 38px; height: 38px; }
  h1 { font-size: 15px; }
  .eyebrow { font-size: 8px; }
  .hero { padding-top: 30px; }
  .greeting { font-size: 28px; }
  .service-grid, .skeleton-grid { grid-template-columns: 1fr; }
  .service-card { padding: 14px; }
  .tools { align-items: stretch; flex-direction: column; }
  .search { max-width: none; }
  .sync { padding-left: 3px; }
  footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
