:root {
  --accent: #1759a4;
  --on-accent: #fff;
  --background: #f3f6fb;
  --ink: #18324c;
  --muted: #5a6e82;
  --border: #d9e3ee;
  --surface: #fff;
  --soft: #eaf1fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font:
    15px/1.55 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
.site-header {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 22px max(24px, calc((100vw - 1240px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #235a90;
}
.brand img {
  width: 42px;
  height: 42px;
}
.environment,
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 30px;
  background: #edf3fb;
  color: #315d89;
  font-size: 12px;
  font-weight: 700;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
#identity {
  font-size: 13px;
  color: var(--muted);
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px max(24px, calc((100vw - 1240px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.nav-link {
  border: 0;
  background: none;
  color: #34516d;
  padding: 10px 13px;
  border-radius: 7px;
  cursor: pointer;
}
.nav-link.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin: 8px 0 12px;
}
h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 16px;
}
h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
p {
  margin: 0 0 14px;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero {
  padding: 30px;
  background: linear-gradient(120deg, #fff, #eaf1fb);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 24px;
}
.hero p {
  max-width: 750px;
  color: var(--muted);
}
.row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.split {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.grow {
  flex: 1;
}
.push {
  margin-left: auto;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px #18324c04;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric strong {
  display: block;
  font-size: 30px;
  color: var(--accent);
}
.metric span {
  font-size: 13px;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
.button:hover {
  filter: brightness(0.95);
}
.button.quiet {
  background: #fff;
  color: var(--accent);
  border-color: var(--border);
}
.button.small {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12px;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.toolbar h1 {
  margin-right: auto;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
td,
th {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 12px;
  background: #f7f9fc;
  color: #4b637b;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.auth {
  max-width: 520px;
  margin: 24px auto;
}
.auth .panel {
  padding: 30px;
}
.auth h1 {
  font-size: 26px;
}
.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.auth-tabs button {
  flex: 1;
}
.field {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 650;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  margin-top: 6px;
  border: 1px solid #c3d2e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.field input[type="color"] {
  padding: 4px;
  height: 45px;
}
.field input[type="checkbox"],
.field input[type="radio"] {
  display: inline;
  width: auto;
  margin-right: 8px;
}
.field small {
  display: block;
  font-weight: 400;
  margin-top: 5px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.empty {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}
.loading {
  padding: 45px;
  color: var(--muted);
  text-align: center;
}
.error {
  color: #9d2940;
}
.success {
  color: #24744c;
}
.status {
  position: fixed;
  right: 20px;
  bottom: 22px;
  max-width: min(500px, calc(100vw - 40px));
  padding: 14px 20px;
  background: #193d60;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 30px #193d6030;
  z-index: 20;
  display: none;
}
.status.visible {
  display: block;
}
.quick {
  position: fixed;
  left: 18px;
  bottom: 20px;
  z-index: 15;
}
.quick > button {
  border-radius: 40px;
  box-shadow: 0 4px 16px #18324c35;
}
.quick > div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  max-height: 65vh;
  overflow: auto;
  box-shadow: 0 8px 30px #18324c20;
  margin-bottom: 12px;
  min-width: 230px;
}
.quick .nav-link {
  display: block;
  width: 100%;
  text-align: left;
}
dialog {
  width: min(800px, calc(100vw - 30px));
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 25px;
  color: var(--ink);
}
dialog::backdrop {
  background: #112d4c60;
}
.dialog-header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog-header h2 {
  margin: 0;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 18px;
  margin-bottom: 16px;
}
legend {
  font-size: 13px;
  font-weight: 700;
  padding: 0 8px;
}
.note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.line-item {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}
.readable {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  background: #f2f5f9;
  padding: 12px;
  border-radius: 7px;
}
.course {
  cursor: pointer;
}
.progress {
  height: 8px;
  background: #e5edf6;
  border-radius: 5px;
  overflow: hidden;
  margin: 12px 0;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
}
footer {
  padding: 20px 24px 75px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    display: block;
  }
  .header-actions #identity {
    display: none;
  }
  .site-header {
    padding: 16px 20px;
    gap: 12px;
  }
  .brand {
    font-size: 21px;
  }
  .environment {
    font-size: 10px;
  }
  nav {
    padding: 8px 12px;
  }
  main {
    padding: 24px 16px 80px;
  }
  .hero {
    padding: 24px;
  }
  .grid.two {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
}
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .site-header {
    flex-wrap: wrap;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-actions #install {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 8px;
  }
  .panel {
    padding: 18px;
  }
  .auth .panel {
    padding: 22px;
  }
  h1 {
    font-size: 25px;
  }
  td,
  th {
    padding: 11px;
  }
  .quick {
    left: 12px;
    bottom: 12px;
  }
  .button {
    min-height: 42px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar h1 {
    width: 100%;
  }
}
@media print {
  header,
  nav,
  .quick,
  .toolbar button,
  .status,
  footer {
    display: none !important;
  }
  body {
    background: white;
  }
  main {
    padding: 0;
  }
  .panel {
    box-shadow: none;
    break-inside: avoid;
  }
  .hero {
    background: white;
  }
}

nav details {
  position: relative;
}
nav summary {
  list-style: none;
}
.nav-dropdown {
  position: absolute;
  top: 45px;
  left: 0;
  background: white;
  z-index: 12;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 30px #18324c20;
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  max-height: 65vh;
  overflow: auto;
}
@media (max-width: 480px) {
  .nav-dropdown {
    grid-template-columns: 1fr;
    min-width: 230px;
    left: auto;
    right: 0;
  }
}
