:root {
  --bg: #0a0a0a;
  --panel: #121212;
  --border: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --muted: #a1a1a1;
  --accent: #4ade80;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.systems-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.systems-header a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.systems-header a:hover { color: var(--text); }

.brand {
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand span { color: var(--muted); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.hero p { color: var(--muted); max-width: 640px; }

.tenant-badge {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card h2 { font-size: 1.15rem; }

.card p { color: var(--muted); font-size: 0.92rem; flex: 1; }

.card a, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #fff;
  color: #000;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.auth-panel {
  max-width: 420px;
  margin: 4rem auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.auth-panel h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.auth-panel p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.auth-panel input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0a0a;
  color: var(--text);
  margin-bottom: 1rem;
}

.error {
  color: #f87171;
  font-size: 0.85rem;
  min-height: 1.25rem;
  margin-top: 0.75rem;
}

.auth-denied {
  color: #f87171;
  font-size: 0.88rem;
  margin-top: 0.75rem;
}

.auth-denied.hidden { display: none !important; }

.hidden { display: none !important; }

.user-bar {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-bar button {
  background: none;
  border: none;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-list a {
  color: var(--accent);
  text-decoration: none;
}

.link-list a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .systems-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
}
