:root {
  --bg: #0f172a;
  --fg: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --green: #22c55e;
  --orange: #f59e0b;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body, #app {
  height: 100%;
  width: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, sans-serif;
  min-height: 100vh;
  min-width: 100vw;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  min-width: 100vw;
}

.screen {
  min-height: 100vh;
  min-width: 100vw;
  display: flex;
  flex-direction: column;
}

header {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  font-weight: 700;
  letter-spacing: 1px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.center {
  display: grid;
  place-items: center;
  text-align: center;
}

.card {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 16px;
}

.facility-card {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.facility-card h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
}

.facility-card .subtitle {
  color: var(--muted);
  margin: 0 0 24px 0;
  font-size: 14px;
}

.facility-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.facility-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.facility-btn.active {
  background: var(--green);
  color: #051014;
}

.facility-btn.active:hover {
  background: #16a34a;
  transform: translateY(-2px);
}

.facility-btn.coming-soon {
  background: #1f2937;
  color: var(--orange);
  border-color: var(--orange);
  cursor: not-allowed;
  opacity: 0.8;
}

.facility-btn.coming-soon .badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--orange);
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
}

.facility-btn.offline {
  background: #1f2937;
  color: var(--muted);
  border-color: #374151;
}

.facility-btn.offline .badge {
  font-size: 11px;
  font-weight: 700;
  background: #374151;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
}

.facility-btn .last-seen {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #1f2937;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  color: #ef4444;
  padding: 16px;
  text-align: center;
}

.retry-btn {
  margin-top: 12px;
  padding: 8px 16px;
  background: #1f2937;
  border: 1px solid #334155;
  border-radius: 8px;
  color: var(--fg);
  cursor: pointer;
}

.retry-btn:hover {
  background: #374151;
}
