:root {
  --bg: #0f172a;
  --bg-soft: #111c34;
  --sidebar: #0b1328;
  --card: #17233e;
  --card-alt: #1d2b4a;
  --line: #2d3b5c;
  --text: #e6edf8;
  --muted: #9cb0d7;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --danger: #fb7185;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.15), transparent 30%),
    radial-gradient(circle at 0% 100%, rgba(56, 189, 248, 0.2), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: "Satoshi", "General Sans", "Avenir Next", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar), #0d1730);
  border-right: 1px solid var(--line);
  padding: 1.1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-head {
  margin-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-weight: 700;
}

.brand-logo {
  height: 1.95rem;
  width: auto;
}

.sidebar-nav {
  display: grid;
  gap: 0.5rem;
}

.nav-item {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  border-color: var(--line);
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
}

.nav-button {
  margin-top: 0.75rem;
}

.main-panel {
  padding: 1rem 1.25rem 2rem;
}

.content-shell {
  width: min(1120px, 100%);
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-alt));
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 24px rgba(3, 9, 24, 0.2);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

h1,
h2,
h3 {
  margin: 0 0 0.55rem;
  color: #f4f8ff;
}

p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.stat {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.action-link {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.45rem 0.75rem;
  background: rgba(56, 189, 248, 0.12);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.55rem;
  font: inherit;
  color: var(--text);
  background: rgba(11, 19, 40, 0.6);
}

button,
input[type="submit"] {
  border: 1px solid #1a759f;
  background: linear-gradient(145deg, #0891b2, #0ea5e9);
  color: #ecfeff;
  border-radius: 0.65rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font: inherit;
}

.flash {
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.8rem;
}

.notice {
  border: 1px solid #0e7490;
  background: rgba(8, 145, 178, 0.15);
}

.alert {
  border: 1px solid #be123c;
  background: rgba(190, 18, 60, 0.14);
  color: #fecdd3;
}

code,
pre {
  background: rgba(11, 19, 40, 0.65);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

code {
  padding: 0.1rem 0.35rem;
}

pre {
  padding: 0.8rem;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
