:root {
  color-scheme: dark;
  --bg: #0b0d16;
  --panel: #121520;
  --line: #242837;
  --muted: #8b93ab;
  --text: #e8ecf9;
  --blue: #7999ff;
  --purple: #a487ff;
  --green: #5cddae;
  --red: #ff8291;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:hover:not(:disabled) {
  filter: brightness(1.15);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
button {
  border: 0;
  border-radius: 8px;
  color: var(--text);
  padding: 11px 15px;
}
button.primary {
  background: linear-gradient(110deg, #667ce5, #8d6ee5);
  box-shadow: 0 4px 20px #765fe51c;
  font-weight: 600;
}
button.secondary {
  background: #222737;
  border: 1px solid #343b50;
}
.subtle {
  background: transparent;
  color: var(--muted);
}
.danger {
  background: #572631;
  color: #ffb6c2;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 2px;
}
.brand span:not(.brand-icon) {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 4px;
}
.brand-icon {
  font-size: 36px;
  color: #9b8bfa;
  line-height: 1;
}
.eyebrow {
  font-size: 10px;
  color: var(--purple);
  font-weight: 650;
  letter-spacing: 2px;
}
h1 {
  font-size: 31px;
  letter-spacing: -1px;
  font-weight: 600;
  margin: 9px 0;
}
p {
  color: var(--muted);
  line-height: 1.7;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  background: #0e111b;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
aside .brand {
  margin-left: 10px;
  margin-bottom: 51px;
}
.nav-label {
  font-size: 9px;
  color: #626c86;
  letter-spacing: 1.7px;
  margin: 20px 14px 13px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--muted);
  margin: 6px 0;
  padding: 13px 17px;
  font-size: 18px;
}
nav button span {
  font-size: 13px;
}
nav button.active {
  background: linear-gradient(90deg, #25243f, #1a1d31);
  color: #c4b9ff;
  border: 1px solid #3b335b;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 11px;
  color: #a4acc0;
  border-top: 1px solid var(--line);
  padding: 22px 7px 0;
}
.sidebar-bottom small {
  display: block;
  color: #5d6881;
  font-size: 10px;
  margin: 9px 15px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  box-shadow: 0 0 10px #5cddae66;
}
main {
  margin-left: 230px;
}
header {
  height: 82px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 13px;
  color: #4b5369;
}
.breadcrumb strong {
  font-weight: 500;
  color: #d3d8eb;
}
.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 12px;
}
.content {
  max-width: 1600px;
  margin: auto;
  padding: 38px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}
.page-heading p {
  margin: 7px 0;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 22px;
}
.stat {
  background: linear-gradient(120deg, #161a29, #12151f);
  border: 1px solid var(--line);
  padding: 23px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.stat:after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  background: #7573ff0b;
  border-radius: 50%;
  top: -20px;
  right: -20px;
}
.stat .label {
  font-size: 12px;
  color: var(--muted);
}
.stat .value {
  font-size: 34px;
  font-weight: 600;
  margin: 13px 0 9px;
  letter-spacing: -1px;
}
.stat small {
  font-size: 10px;
  color: #78839e;
}
.stat .icon {
  float: right;
  color: var(--purple);
  font-size: 18px;
}
.green {
  color: var(--green);
}
.red {
  color: var(--red);
}
.purple {
  color: var(--purple);
}
.blue {
  color: var(--blue);
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  margin-bottom: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-head {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 550;
}
.panel-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.tag {
  border: 1px solid #393750;
  background: #26243a;
  color: #beb1f9;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 9px;
  white-space: nowrap;
}
.health {
  padding: 25px;
}
.health-score {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -2px;
  margin: 10px 0;
}
.health-track {
  height: 7px;
  border-radius: 8px;
  background: #283044;
  margin: 17px 0;
}
.health-fill {
  height: 100%;
  background: linear-gradient(90deg, #747bff, #55dfb8);
  border-radius: 8px;
  width: 0;
}
.metric-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.metric-line strong {
  color: var(--text);
}
.callout {
  padding: 18px 22px;
  background: linear-gradient(110deg, #201d35, #151a2c);
  border: 1px solid #3d355a;
  border-radius: 10px;
  margin: 20px 0;
  display: flex;
  gap: 16px;
  align-items: center;
}
.callout b {
  font-size: 13px;
  font-weight: 500;
}
.callout p {
  font-size: 12px;
  margin: 4px 0;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input {
  min-width: 160px;
  flex: 1;
}
.toolbar select {
  width: auto;
  min-width: 140px;
}
.toolbar label {
  font-size: 10px;
  gap: 4px;
}
.toolbar label input {
  min-width: 140px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  text-align: left;
}
th {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #8490aa;
  font-weight: 500;
  text-transform: uppercase;
  background: #141824;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid #202534;
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #191d2c;
}
td small {
  display: block;
  color: #697790;
  font-size: 10px;
  margin-top: 6px;
}
td .title {
  font-weight: 550;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  background: #18362e;
  color: #70deba;
}
.pill:before {
  content: "•";
}
.pill.suspended,
.pill.denied {
  color: #ffa0ac;
  background: #3b222d;
}
.pill.expired {
  color: #e5bd75;
  background: #362f24;
}
.row-actions {
  display: flex;
  gap: 5px;
}
.row-actions button {
  font-size: 11px;
  padding: 6px 8px;
  background: #242a3b;
  color: #bfc9e3;
}
.row-actions .remove {
  color: #fa9cae;
}
.empty {
  padding: 48px 20px;
  text-align: center;
  color: #7e8ba6;
}
.empty strong {
  display: block;
  color: #cad2e6;
  font-weight: 500;
  margin-bottom: 9px;
}
.pager {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.pager button {
  padding: 7px 10px;
  background: #252b3d;
  margin-left: 6px;
}
footer {
  display: flex;
  gap: 17px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #59637d;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 40px;
}
footer span {
  letter-spacing: 0;
}
footer span:last-child {
  margin-left: auto;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #30374c;
  background: #10141f;
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--text);
  outline: none;
}
input::placeholder {
  color: #59677f;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #a9b4cd;
}
dialog {
  border: 1px solid #3a3d55;
  border-radius: 15px;
  background: #151925;
  color: var(--text);
  padding: 28px;
  width: min(620px, 94vw);
  max-height: 90vh;
  box-shadow: 0 30px 100px #0008;
}
dialog::backdrop {
  background: #050711bf;
}
dialog h2 {
  font-size: 22px;
  margin: 8px 0 12px;
  font-weight: 550;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  align-items: flex-start;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-grid small {
  color: #77829d;
  font-size: 10px;
  line-height: 1.5;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
#editor-error,
#login-error {
  color: var(--red);
  font-size: 12px;
}
#key-value {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  background: #0d111d;
  padding: 18px;
  color: #b6a9ff;
  border: 1px solid #383451;
  border-radius: 8px;
  line-height: 1.8;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-card {
  padding: 60px max(35px, calc((50vw - 390px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card .brand {
  margin-bottom: 70px;
}
.login-card h1 {
  font-size: 40px;
  line-height: 1.2;
  margin: 18px 0;
}
.login-card p {
  font-size: 13px;
}
.login-card form {
  display: grid;
  gap: 20px;
  margin-top: 25px;
}
.login-card button {
  display: flex;
  justify-content: space-between;
  padding: 15px;
}
.login-card small {
  font-size: 9px;
  letter-spacing: 1px;
  color: #68748c;
  margin-top: 30px;
}
.login-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 45%,
    #5143964d,
    #1a1c33 45%,
    #111321 70%
  );
  border-left: 1px solid var(--line);
}
.shield {
  font-size: 150px;
  color: #9f97f5;
  text-shadow: 0 0 80px #8e6bff66;
  z-index: 1;
  transform: translateY(-40px);
}
.orbit {
  position: absolute;
  border: 1px solid #6c65aa44;
  border-radius: 50%;
  width: 360px;
  height: 360px;
  transform: translateY(-40px) rotateX(35deg);
}
.o2 {
  width: 490px;
  height: 490px;
  border-color: #6c65aa26;
}
.o3 {
  width: 640px;
  height: 640px;
  border-color: #6c65aa15;
}
.login-art > span {
  position: absolute;
  bottom: 18%;
  text-align: center;
  font-size: 23px;
  line-height: 1.5;
  letter-spacing: -0.6px;
  color: #b5b1d6;
}
#toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: grid;
  gap: 10px;
  z-index: 10;
}
.toast {
  padding: 15px 21px;
  border: 1px solid #3b4c57;
  border-radius: 9px;
  background: #202c32;
  box-shadow: 0 10px 30px #0005;
  max-width: 380px;
  animation: appear 0.2s ease;
}
.toast.error {
  border-color: #824154;
  background: #3e2532;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
[hidden] {
  display: none !important;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1200px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .health {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 25px;
  }
}
@media (max-width: 800px) {
  aside {
    position: static;
    width: auto;
    padding: 18px;
  }
  aside .brand {
    margin: 0 0 15px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }
  nav button {
    white-space: nowrap;
    width: auto;
    margin: 0;
    padding: 10px;
    gap: 7px;
  }
  nav button span {
    font-size: 11px;
  }
  main {
    margin-left: 0;
  }
  header {
    height: 60px;
    padding: 0 20px;
  }
  .content {
    padding: 25px 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .page-heading button {
    font-size: 11px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat .value {
    font-size: 29px;
  }
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login-card {
    padding: 40px 28px;
    max-width: 500px;
    margin: auto;
    width: 100%;
  }
  .login-card .brand {
    margin-bottom: 50px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  footer {
    flex-wrap: wrap;
  }
  .toolbar {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
