:root {
  font-family: Tahoma, Arial, sans-serif;
  --bg: #1b1b1d;
  --surface: #1e1e20;
  --raised: #252528;
  --hover: #2a2b30;
  --border: #343438;
  --text: #f2f2f5;
  --muted: #a0a0ac;
  --primary: #6395d9;
  --primary-bg: #27384f;
  --green: #5bb98c;
  --red: #e27b80;
  --shadow: 0 20px 80px #0006;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  color-scheme: dark;
}
:root.light {
  --bg: #f4f4f6;
  --surface: #fcfcfd;
  --raised: #f0f1f5;
  --hover: #e8ebf1;
  --border: #d8dae0;
  --text: #202128;
  --muted: #717380;
  --primary: #365e96;
  --primary-bg: #e4ebf6;
  --green: #25825d;
  --red: #bd444e;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  border-radius: 7px;
  padding: 9px 14px;
  transition: 0.15s;
}
button:hover {
  background: var(--hover);
  border-color: var(--muted);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #111b29;
  font-weight: bold;
}
.primary:hover {
  filter: brightness(1.08);
  background: var(--primary);
}
.danger {
  color: var(--red);
}
.quiet,
.icon-button {
  background: transparent;
  border-color: transparent;
}
.icon-button {
  font-size: 21px;
  padding: 4px 9px;
}
.muted,
small {
  color: var(--muted);
}
.error {
  color: var(--red);
  line-height: 1.8;
}
.full {
  width: 100%;
}
[hidden] {
  display: none !important;
}
.shell {
  display: flex;
  min-height: 100vh;
  direction: ltr;
}
aside {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 24px;
  font-size: 23px;
  font-weight: bold;
  letter-spacing: -0.5px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  margin-top: 4px;
  font-weight: normal;
}
.brandmark {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 11px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: bold;
}
.nav-label {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin: 23px 12px 10px;
}
nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  margin: 4px 0;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}
nav a span {
  width: 18px;
  font-size: 20px;
  line-height: 20px;
  text-align: center;
}
nav a:hover {
  color: var(--text);
  background: var(--hover);
}
nav a.active {
  color: var(--primary);
  background: var(--primary-bg);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 25px 5px 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  direction: rtl;
  color: var(--muted);
}
.sidebar-bottom #version {
  margin-right: auto;
  font-family: monospace;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}
.workspace {
  margin-left: 232px;
  width: calc(100% - 232px);
  direction: rtl;
  display: flex;
  flex-direction: column;
}
header {
  height: 74px;
  border-bottom: 1px solid var(--border);
  display: flex;
  direction: ltr;
  align-items: center;
  gap: 12px;
  padding: 0 34px;
  background: var(--surface);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 12px;
  color: var(--border);
}
.breadcrumb b {
  font-weight: normal;
  color: var(--text);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}
#menu-toggle {
  display: none;
}
main {
  padding: 34px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}
footer {
  padding: 18px 34px;
  display: flex;
  gap: 20px;
  direction: ltr;
  color: var(--muted);
  font-size: 10px;
}
footer a {
  margin-left: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.page-heading h1 {
  margin: 0 0 10px;
  font-size: 25px;
  letter-spacing: -0.5px;
  font-weight: 500;
  direction: ltr;
  text-align: right;
}
.page-heading p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  padding: 21px;
  min-height: 120px;
}
.stat .stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat .number {
  font-family: Arial, sans-serif;
  direction: ltr;
  text-align: right;
  font-size: 31px;
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
}
.stat .number small {
  font-size: 12px;
  margin-right: 9px;
}
.section {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  margin-bottom: 22px;
  overflow: hidden;
}
.section-heading {
  padding: 19px 21px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.section-body {
  padding: 22px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 10px;
  white-space: nowrap;
  color: var(--muted);
}
.badge.green {
  color: var(--green);
  background: #3c9c6b0e;
  border-color: #3c9c6b44;
}
.badge.red {
  color: var(--red);
  background: #bd444e0e;
  border-color: #bd444e44;
}
.badge.blue {
  color: var(--primary);
  background: var(--primary-bg);
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
}
.toolbar input {
  max-width: 300px;
}
.toolbar select {
  max-width: 220px;
}
input,
select,
textarea {
  padding: 10px 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 1px solid var(--primary);
  border-color: var(--primary);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
input[type="number"] {
  direction: ltr;
  text-align: right;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  margin: 0 0 19px;
  color: var(--muted);
}
label.check {
  flex-direction: row;
  align-items: center;
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
textarea {
  min-height: 85px;
  resize: vertical;
  line-height: 1.7;
}
.code,
code,
.ltr {
  font-family: monospace;
  direction: ltr;
  unicode-bidi: embed;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: right;
}
th {
  font-weight: normal;
  color: var(--muted);
  background: var(--raised);
  padding: 14px 16px;
  white-space: nowrap;
}
td {
  padding: 15px 16px;
  border-top: 1px solid var(--border);
  line-height: 1.7;
  max-width: 390px;
}
td small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
td .actions {
  flex-wrap: nowrap;
}
td button {
  padding: 5px 9px;
  font-size: 11px;
}
tr:hover td {
  background: var(--hover);
}
.empty {
  text-align: center;
  padding: 48px 18px;
  color: var(--muted);
  line-height: 1.9;
}
.empty .empty-icon {
  font-size: 35px;
  color: var(--primary);
  display: block;
  margin-bottom: 15px;
}
.empty h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 8px;
}
.empty p {
  margin: 0 0 18px;
  font-size: 12px;
}
.notice {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
  padding: 14px 0;
}
.selection-bar {
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--raised);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.selection-bar select {
  max-width: 230px;
}
.selection-bar .count {
  margin-left: auto;
  color: var(--primary);
  font-size: 12px;
}
.steps {
  counter-reset: steps;
  display: grid;
  gap: 20px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step:before {
  counter-increment: steps;
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  color: var(--primary);
  border-radius: 6px;
  flex-shrink: 0;
  font-family: monospace;
}
.step strong {
  font-size: 12px;
  font-weight: 500;
}
.step p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 7px 0 0;
}
.health-list {
  display: grid;
  gap: 18px;
}
.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.health-row small {
  margin-right: 12px;
}
.progress-track {
  height: 5px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.progress-track div {
  height: 100%;
  background: var(--primary);
  width: var(--progress, 0);
}
.usage {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 110px;
}
dialog {
  padding: 0;
  width: min(720px, 94vw);
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  direction: rtl;
}
dialog::backdrop {
  background: #090a0dbb;
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 19px 23px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}
#modal-body {
  padding: 24px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 19px;
  margin-top: 10px;
}
.modal-errors {
  color: var(--red);
  font-size: 12px;
  line-height: 1.8;
}
.help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  margin: -7px 0 20px;
}
.config-editor {
  display: grid;
  grid-template-columns: 20px 1fr 1fr 60px 65px;
  gap: 9px;
  align-items: center;
  margin-bottom: 9px;
}
.config-editor input {
  padding: 8px;
}
.config-editor .config-visible {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 10px;
}
.config-editor .config-name {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.config-scroll {
  max-height: 360px;
  overflow: auto;
  margin-bottom: 20px;
  padding: 3px;
}
.linkbox {
  display: flex;
  gap: 10px;
  margin: 10px 0 20px;
}
.linkbox input {
  direction: ltr;
  font-size: 11px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 15px;
  font-size: 11px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 23px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--raised);
  z-index: 100;
  font-size: 12px;
  max-width: 90vw;
  direction: rtl;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
}
.login-card {
  width: min(400px, 100%);
  padding: 35px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}
.login-card .brandmark {
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 9px;
  color: var(--primary);
  letter-spacing: 1.5px;
  direction: ltr;
  display: block;
}
.login-card h1 {
  font-size: 21px;
  margin: 12px 0;
}
.login-card p {
  font-size: 12px;
  margin-bottom: 28px;
}
.login-card small {
  display: block;
  margin-top: 25px;
  text-align: center;
  font-size: 10px;
}
.login-card form {
  margin-top: 32px;
}
.resource-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.resource-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 21px;
  background: var(--surface);
}
.resource-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.resource-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.resource-card .actions {
  margin-top: 20px;
}
.skeleton {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .resource-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  aside {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  aside.open {
    transform: none;
    box-shadow: var(--shadow);
  }
  .workspace {
    margin-left: 0;
    width: 100%;
  }
  #menu-toggle {
    display: block;
  }
  header {
    padding: 0 16px;
    height: 62px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .header-actions {
    gap: 4px;
  }
  main {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
    min-height: 110px;
  }
  .stat .number {
    font-size: 27px;
  }
  .resource-cards,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .two-col {
    gap: 0;
  }
  footer {
    padding: 18px 16px;
  }
  footer span {
    display: none;
  }
  .config-editor {
    grid-template-columns: 18px 1fr 1fr 45px 52px;
    gap: 5px;
  }
  .config-editor input {
    font-size: 10px;
    padding: 7px;
  }
  .config-editor .config-name {
    font-size: 10px;
  }
  #modal-body {
    padding: 18px;
  }
  .toolbar input,
  .toolbar select {
    max-width: none;
  }
  .selection-bar select {
    max-width: 100%;
  }
  .section-heading {
    padding: 16px;
  }
  .header-actions #admin-name {
    font-size: 10px;
  }
}
