:root {
  font:
    14px/1.5 Inter,
    Segoe UI,
    system-ui,
    sans-serif;
  color: #e4e7ef;
  background: #0b0e14;
  --muted: #8e98ac;
  --line: #252b38;
  --accent: #9ab7ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  background: #adc3ff;
  color: #101727;
  border-radius: 8px;
  padding: 10px 17px;
  font-weight: 600;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.secondary {
  background: #191f2b;
  border-color: var(--line);
  color: #d8dfef;
}
.danger {
  background: #38212a;
  border-color: #663344;
  color: #ffabb7;
}
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.hidden {
  display: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.mark {
  display: inline-grid;
  place-items: center;
  background: #b3c8ff;
  color: #111827;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 20px;
}
.redirect-screen {
  width: min(400px, calc(100% - 36px));
  margin: 10vh auto;
}
h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 600;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 19px;
  margin: 0;
}
h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
label {
  display: block;
  color: #aab4c7;
  font-size: 13px;
  margin: 16px 0;
}
input,
select {
  display: block;
  margin-top: 7px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #333c4e;
  border-radius: 7px;
  background: #0e131c;
  color: #edf1fb;
  outline: none;
}
input:focus,
select:focus {
  border-color: #9ab7ff;
  box-shadow: 0 0 0 2px #9ab7ff20;
}
input[type="checkbox"] {
  width: auto;
  display: inline;
  margin: 0 8px 0 0;
}
form > button {
  margin-top: 8px;
}
#shell {
  display: flex;
  min-height: 100vh;
}
aside {
  width: 238px;
  flex-shrink: 0;
  background: #10141d;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.nav-caption {
  font-size: 10px;
  color: #67758e;
  letter-spacing: 1.4px;
  margin: 45px 10px 15px;
}
nav {
  display: grid;
  gap: 5px;
}
nav button {
  text-align: left;
  background: transparent;
  color: #9ba7bd;
  padding: 11px 13px;
  font-weight: 500;
}
nav .selected {
  background: #26324a;
  color: #c7d7ff;
}
.aside-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.aside-bottom button {
  margin-top: 16px;
  width: 100%;
}
main {
  width: 100%;
  min-width: 0;
  max-width: 1500px;
  padding: 42px 44px 20px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
header h1 {
  margin: 8px 0 0;
}
.eyebrow {
  font-size: 10px;
  color: #788aa8;
  letter-spacing: 2px;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid #314c43;
  background: #142822;
  color: #9ad7b8;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
}
.badge.off {
  background: #252330;
  color: #afa6c9;
  border-color: #494156;
}
.badge.warn {
  background: #332a18;
  color: #dfc88e;
  border-color: #57472c;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: #121822;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
}
.card .number {
  font-size: 34px;
  color: #e9efff;
  margin: 10px 0 0;
  letter-spacing: -1px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 20px;
}
.toolbar p {
  margin: 0;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  background: #121822;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 22px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th {
  font-weight: 500;
  color: #8190aa;
  background: #151c28;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
th,
td {
  padding: 14px 17px;
  border-bottom: 1px solid #232a37;
  vertical-align: middle;
}
tr:last-child > td {
  border-bottom: none;
}
td button {
  padding: 5px 9px;
  font-size: 12px;
  margin: 2px;
  white-space: nowrap;
}
td .muted {
  font-size: 12px;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.spaced {
  margin-top: 25px;
}
dialog {
  background: #141b27;
  color: #edf1fa;
  border: 1px solid #374256;
  border-radius: 13px;
  padding: 24px;
  width: min(510px, calc(100% - 30px));
  max-height: 90vh;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}
.icon {
  padding: 2px 10px;
  font-size: 24px;
}
#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  max-width: 450px;
  background: #23314b;
  border: 1px solid #52688e;
  padding: 14px 20px;
  border-radius: 9px;
  z-index: 10;
  box-shadow: 0 8px 40px #0006;
}
#toast.error {
  background: #422532;
  border-color: #8b4c62;
}
code {
  color: #c1d0ef;
  overflow-wrap: anywhere;
}
.result-link {
  font-family: Consolas, monospace;
  font-size: 12px;
}
footer {
  color: #49566b;
  font-size: 11px;
  margin-top: 55px;
}
a {
  color: var(--accent);
}
@media (max-width: 1050px) {
  main {
    padding: 30px 22px;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  aside {
    width: 205px;
    padding: 25px 14px;
  }
}
@media (max-width: 720px) {
  #shell {
    display: block;
  }
  aside {
    width: 100%;
    height: auto;
    position: static;
    padding: 18px;
  }
  nav {
    display: flex;
    overflow-x: auto;
    margin-top: 17px;
  }
  nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 9px 12px;
  }
  .nav-caption {
    display: none;
  }
  .aside-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
  }
  .aside-bottom button {
    width: auto;
    margin: 0;
    padding: 5px 12px;
  }
  main {
    padding: 25px 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  header .badge {
    display: none;
  }
  .toolbar {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
}
.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 520px;
}
.chips span {
  padding: 3px 7px;
  background: #202b3e;
  color: #b4c6e8;
  border: 1px solid #34425a;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
}
.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-bar input,
.search-bar select {
  margin: 0;
}
.search-bar > input {
  flex: 1;
  min-width: 140px;
}
.search-bar select {
  width: auto;
  max-width: 220px;
}
.pagination {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.pagination select {
  margin: 0;
  width: 85px;
}
.pagination input {
  margin: 0;
  width: 80px;
}
@media (max-width: 850px) {
  .search-bar {
    flex-wrap: wrap;
  }
  .search-bar > input {
    width: 100%;
    flex: auto;
  }
  .pagination,
  .toolbar {
    flex-wrap: wrap;
  }
}

.module-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.module-options label {
  font-size: 13px;
  margin: 0;
}

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

.hash {
  overflow-wrap: anywhere;
  max-width: 320px;
  margin-top: 8px;
}
.actions {
  flex-wrap: wrap;
}
dialog {
  max-height: 90vh;
  overflow: auto;
}

hr {
  border: 0;
  border-top: 1px solid #303e56;
  margin: 24px 0;
}
@media (max-width: 600px) {
  .module-options {
    flex-direction: column;
  }
  .template-grid {
    grid-template-columns: 1fr;
  }
}
:root {
  accent-color: #9ab7ff;
}
.license-card progress {
  display: block;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #252e40;
}
.license-card progress::-webkit-progress-bar {
  background: #252e40;
}
.license-card progress::-webkit-progress-value {
  background: #9ab7ff;
}
.license-card progress::-moz-progress-bar {
  background: #9ab7ff;
}
.license-card .toolbar {
  margin-bottom: 18px;
}
.dashboard-heading p {
  margin-top: 8px;
}
.dashboard-metrics {
  margin-bottom: 30px;
}
.account-action {
  display: inline-block;
  padding: 10px 17px;
  border-radius: 8px;
  background: #adc3ff;
  color: #101727;
  text-decoration: none;
  font-weight: 600;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #283652;
  color: #ceddff;
  overflow: hidden;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
.person-info strong {
  font-weight: 600;
}
#identity .person {
  min-width: 0;
  align-items: center;
}
#identity .avatar {
  width: 32px;
  height: 32px;
}
#identity .person-info {
  font-size: 12px;
}

.quota-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.quota-table th,
.quota-table td {
  padding: 6px 12px;
  text-align: left;
}
.quota-table th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.quota-table td {
  font-size: 13px;
}
.quota-table th:first-child,
.quota-table td:first-child {
  padding-left: 0;
}
.quota-table th:last-child,
.quota-table td:last-child {
  padding-right: 0;
  text-align: right;
}
.quota-table tbody tr:last-child > td {
  border-bottom: 0;
}

/* Shared spacing for forms, tables and responsive layouts. */
.person-info strong {
  display: block;
  line-height: 1.4;
}
.module-options {
  gap: 8px 16px;
}
.module-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.module-options input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

.card .spaced {
  margin-top: 20px;
}
.template-grid {
  margin-top: 20px;
}
.dashboard-metrics + .spaced {
  margin-top: 28px;
}
.search-bar {
  margin-bottom: 20px;
}
.search-bar + .table-wrap {
  margin-top: 0;
}
.pagination .actions {
  align-items: center;
  gap: 8px;
}
.quota-table th {
  background: transparent;
}
.quota-table td {
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 0;
}
dialog form > label:first-child {
  margin-top: 0;
}

@media (max-width: 720px) {
  .aside-bottom {
    gap: 12px;
  }
  .aside-bottom #identity {
    min-width: 0;
    flex: 1;
  }
  .aside-bottom button {
    flex-shrink: 0;
  }
  .toolbar {
    gap: 12px;
  }
  .toolbar h3 {
    margin: 0;
  }
  .pagination {
    align-items: flex-start;
    gap: 12px;
  }
  .pagination .actions {
    flex-wrap: wrap;
  }
  .search-bar select {
    flex: 1;
    max-width: none;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .engineers-table > table > thead {
    display: none;
  }
  .engineers-table > table > tbody > tr {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }
  .engineers-table > table > tbody > tr:last-child {
    border-bottom: 0;
  }
  .engineers-table > table > tbody > tr > td {
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .engineers-table > table > tbody > tr > td:nth-child(2),
  .engineers-table > table > tbody > tr > td:nth-child(4) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .engineers-table > table > tbody > tr > td:nth-child(2)::before,
  .engineers-table > table > tbody > tr > td:nth-child(4)::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
  }
  .engineers-table .quota-table th,
  .engineers-table .quota-table td {
    padding: 7px 5px;
  }
  .engineers-table .quota-table th:first-child,
  .engineers-table .quota-table td:first-child {
    padding-left: 0;
  }
  .engineers-table .quota-table th:last-child,
  .engineers-table .quota-table td:last-child {
    padding-right: 0;
  }
}

/* Compact quota and template editors. */
dialog.wide {
  width: min(740px, calc(100% - 30px));
}
.program-settings {
  margin: 16px 0;
}
.program-settings table {
  table-layout: fixed;
}
.program-settings th:first-child {
  width: 29%;
}
.program-settings th:nth-child(2) {
  width: 24%;
}
.program-settings th,
.program-settings td {
  padding: 12px;
}
.program-settings td {
  vertical-align: top;
}
.program-settings td > strong,
.program-toggle {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  gap: 6px;
}
.program-toggle input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}
.program-settings .program-limit {
  margin: 0;
  width: 100%;
  padding: 8px 10px;
}
.quota-minimum {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
}
.module-picker summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
  list-style: none;
}
.module-picker summary::-webkit-details-marker {
  display: none;
}
.module-picker summary::after {
  content: "⌄";
  margin-left: auto;
  color: var(--muted);
}
.module-picker[open] summary::after {
  content: "⌃";
}
.module-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.module-picker .module-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  margin: 10px 0 4px;
}
.module-picker .module-options label {
  min-width: 0;
  overflow-wrap: anywhere;
  align-items: flex-start;
}
.module-picker .module-choice {
  margin-top: 3px;
}
.quota-form > label {
  margin: 16px 0 12px;
}
.template-programs td:nth-child(2) {
  white-space: nowrap;
}
@media (max-width: 600px) {
  dialog.wide {
    padding: 18px;
  }
  .program-settings th:first-child {
    width: 32%;
  }
  .program-settings th:nth-child(2) {
    width: 30%;
  }
  .program-settings th,
  .program-settings td {
    padding: 10px 8px;
  }
  .program-settings .program-limit {
    padding: 8px 6px;
  }
  .module-picker summary .small {
    display: none;
  }
  .module-picker .module-options {
    grid-template-columns: minmax(0, 1fr);
  }
  .templates-table > table > thead {
    display: none;
  }
  .templates-table > table > tbody > tr {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  .templates-table > table > tbody > tr:last-child {
    border-bottom: 0;
  }
  .templates-table > table > tbody > tr > td {
    border: 0;
    padding: 0;
    min-width: 0;
  }
  .templates-table .actions {
    gap: 8px;
  }
}
