* ,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --accent-glow: rgba(0, 212, 255, 0.3);
  --bg-body: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  --header-bg: rgba(0, 51, 102, 0.95);
  --glass: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.15);
  --text: #e0e0e0;
  --text-muted: rgba(224, 224, 224, 0.7);
  --green: #2ecc71;
  --yellow: #f1c40f;
  --gray: #95a5a6;
  --red: #e74c3c;
  --blue: #3b82f6;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text);
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-row1,
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
}

.header-update,
.header-subtitle {
  font-size: 0.9em;
  color: #888;
  font-style: italic;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#status-box { margin-left: 8px; }

.top-btn,
.btn-action,
.sap-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
  font-weight: 700;
}

.top-btn,
.btn-action {
  font-size: 0.75rem;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid var(--blue);
}

.top-btn:hover,
.btn-action:hover { background: rgba(59, 130, 246, 0.3); }

.btn-refresh {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.4);
}
.btn-refresh:hover { background: rgba(0, 212, 255, 0.25); }

.btn-fullscreen {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--border-card);
}
.btn-fullscreen:hover { background: rgba(255, 255, 255, 0.13); }

.links-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0.75rem 0;
  padding: 0.6rem 1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.links-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.links-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.sap-btn {
  font-size: 0.78rem;
  background: var(--blue);
  color: #fff;
  border: 2px solid #2563eb;
}
.sap-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.sep { color: var(--border); font-size: 1rem; }

.container {
  max-width: 1900px;
  margin: 0 auto;
  padding: 0.75rem;
}

.section-card {
  padding: 1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-title {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--accent);
}

.legend-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) { .systems-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .systems-grid { grid-template-columns: 1fr; } }

.system-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeInUp 0.3s ease both;
}

.system-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-dim), transparent 70%);
}

.system-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
}
.system-card:hover::before { opacity: 1; }

.system-card.status-green { border-left: 4px solid var(--green); box-shadow: 0 10px 24px rgba(46, 204, 113, 0.18); }
.system-card.status-yellow { border-left: 4px solid var(--yellow); box-shadow: 0 10px 24px rgba(241, 196, 15, 0.18); }
.system-card.status-gray { border-left: 4px solid var(--gray); box-shadow: 0 10px 24px rgba(149, 165, 166, 0.18); }
.system-card.status-red { border-left: 4px solid var(--red); box-shadow: 0 10px 24px rgba(231, 76, 60, 0.22); }
.system-card.status-down { border-left: 4px solid var(--red); box-shadow: 0 10px 24px rgba(231, 76, 60, 0.22); }

.sys-sid {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.sys-host {
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.sys-details {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.sys-details strong {
  color: var(--text);
  font-weight: 600;
}

.sys-info-italic {
  margin-top: 0.2rem;
  font-style: italic;
  color: rgba(224, 224, 224, 0.55);
}

.loading,
.error {
  padding: 3rem 1rem;
  text-align: center;
  font-size: 1rem;
  color: #888;
}
.error { color: var(--red); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.cloud-card {
  width: 33.333%;
  min-width: 280px;
}

.status-icon {
  display: inline-block;
  margin-right: 0.35rem;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: middle;
}

.dot-green { background: var(--green); box-shadow: 0 0 10px rgba(46, 204, 113, 0.9); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 10px rgba(241, 196, 15, 0.9); }
.dot-gray { background: var(--gray); box-shadow: 0 0 10px rgba(149, 165, 166, 0.7); }
.dot-red { background: var(--red); box-shadow: 0 0 10px rgba(231, 76, 60, 0.95); }
