* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo span {
  color: #38bdf8;
}

.portal-title {
  margin-left: 1rem;
  font-size: 0.95rem;
  color: #9ca3af;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.env-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.main-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  border: none;
  background: transparent;
  color: #9ca3af;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

.nav-link-current {
  background: #1d4ed8;
  color: #f9fafb;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
}

.sidebar {
  border-right: 1px solid #1e293b;
  padding: 1rem;
  background: #020617;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-link {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #e5e7eb;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.sidebar-link:hover {
  background: #111827;
}

.sidebar-link.is-active {
  background: #1f2937;
  border-left: 3px solid #38bdf8;
}

.content {
  padding: 1.5rem;
}

.content-view {
  display: block;
}

.view-header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}

.view-subtitle {
  margin: 0 0 1.25rem 0;
  color: #9ca3af;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: #020617;
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid #1e293b;
}

.card h2 {
  margin-top: 0;
  font-size: 1rem;
}

.kpi-number {
  font-size: 2rem;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid #4ade80;
  color: #bbf7d0;
}

.badge-warn {
  border-color: #fbbf24;
  color: #fef9c3;
}

.badge-error {
  border-color: #f97373;
  color: #fee2e2;
}

.footer {
  border-top: 1px solid #1e293b;
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  background: #020617;
}

.dev-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.dev-table thead tr {
  background: #020617;
}

.dev-table th,
.dev-table td {
  border: 1px solid #1f2937;
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.dev-table th {
  font-weight: 600;
  color: #e5e7eb;
}

.dev-table tbody tr:hover {
  background: #111827;
}
