
:root {
  --bg: #f5f7fb;
  --bg-card: #ffffff;
  --primary: #23395b;
  --primary-soft: #2f4f7f;
  --accent: #8c4aca;
  --text: #333333;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #ffffff;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-left img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

header span {
  font-size: 0.9rem;
  opacity: 0.9;
}

.tag {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.4rem;
  padding: 1.4rem;
}

nav {
  background: var(--bg-card);
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
  height: max-content;
  position: sticky;
  top: 1.4rem;
}

nav h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--primary-soft);
}

nav h3 {
  font-size: 0.85rem;
  margin: 0.75rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

nav ul {
  list-style: none;
  margin-bottom: 0.5rem;
}

nav li {
  margin-bottom: 0.15rem;
}

nav a {
  display: block;
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 0.4rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

nav a:hover,
nav a.active {
  background: rgba(140, 74, 202, 0.08);
  color: var(--primary-soft);
  transform: translateX(2px);
}

main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
}

.card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--primary-soft);
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.chip {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: var(--muted);
}

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

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pill-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.entity-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.entity-card small {
  font-size: 0.8rem;
  color: var(--muted);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  background: rgba(140, 74, 202, 0.04);
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn-link:hover {
  background: rgba(140, 74, 202, 0.1);
  transform: translateY(-1px);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 0.6rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

thead {
  background: #f3f4f6;
}

th, td {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  font-weight: 600;
  color: var(--primary-soft);
}

tfoot td {
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 1rem 1.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }
  nav {
    position: static;
  }
}
