:root {
  --bg: #101216;
  --panel: #191d23;
  --panel2: #222831;
  --line: #343c48;
  --text: #edf0f5;
  --muted: #a2adbd;
  --gold: #e7be65;
  --gold2: #b88c34;
  --green: #73d5a0;
  --red: #ef9696;
  --orange: #edbf79;
  --blue: #8ebcff;
  --metric-line: #303845;
  --header-height: 76px;
  --workspace-gutter: 32px;
  --workspace-gap: 16px;
  --button-height: 42px;
  --button-radius: 9px;
  --button-gap: 10px;
}
* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html {
  background: var(--bg);
  color-scheme: dark;
  scrollbar-gutter: auto;
  scroll-padding-top: 96px;
}
/* Hide the tracks only; document, table and dialog scrolling remain available. */
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  vertical-align: middle;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
  touch-action: manipulation;
}
.hidden {
  display: none !important;
}
.center-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: radial-gradient(ellipse at 50% 20%, rgba(231, 190, 101, 0.055), transparent 65%);
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid #4a5361;
  border-radius: 16px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}
.logo-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.logo {
  display: block;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  forced-color-adjust: none;
}
h1 {
  margin: 0;
  text-align: center;
  font-size: 24px;
}
.sub {
  margin: 8px 0 30px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
label {
  display: block;
  margin-bottom: 8px;
  color: #cfd8e5;
  font-size: 13px;
  font-weight: 500;
}
.field {
  margin-bottom: 18px;
}
input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: #13181e;
  border: 1px solid #526075;
  border-radius: 9px;
  outline: none;
}
input,
select {
  height: 44px;
  padding: 0 13px;
}
textarea {
  min-height: 88px;
  padding: 12px 13px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(231, 190, 101, 0.16);
}
.primary {
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  background: var(--gold);
  color: #241c0d;
  font-weight: 700;
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0 17px;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.secondary {
  border: 1px solid #465262;
  border-radius: var(--button-radius);
  background: #252c35;
  color: #e3e9f2;
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0 14px;
  line-height: 1;
}
.danger {
  border: 1px solid rgba(224, 90, 90, 0.5);
  border-radius: var(--button-radius);
  background: rgba(224, 90, 90, 0.12);
  color: #ffb1b1;
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0 14px;
  line-height: 1;
}
.success-btn {
  border: 1px solid rgba(70, 197, 111, 0.45);
  border-radius: var(--button-radius);
  background: rgba(70, 197, 111, 0.12);
  color: #baf4cb;
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0 14px;
  line-height: 1;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.primary:hover:not(:disabled) {
  background: #f1ce83;
  box-shadow: 0 3px 14px rgba(231, 190, 101, 0.12);
}
.secondary:hover:not(:disabled) {
  background: #303947;
  border-color: #6b7b90;
}
.danger:hover:not(:disabled) {
  background: rgba(224, 90, 90, 0.2);
}
.success-btn:hover:not(:disabled) {
  background: rgba(70, 197, 111, 0.2);
}
.login-btn {
  width: 100%;
  height: 48px;
  min-height: 48px;
}
.message {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}
.message.error {
  display: block;
  color: #ffb4b4;
  background: rgba(180, 40, 40, 0.13);
  border: 1px solid rgba(220, 70, 70, 0.35);
}
.message.success {
  display: block;
  color: #b8f7c7;
  background: rgba(30, 150, 70, 0.13);
  border: 1px solid rgba(70, 190, 100, 0.35);
}
.security {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}
.auth-card {
  max-width: 480px;
  padding: 32px 36px;
  background: linear-gradient(155deg, #282b30, #1a2029 45%);
  border-color: #4a5361;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.22);
  color-scheme: dark;
}
.auth-card h1 {
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.3px;
}
.auth-card .sub {
  margin: 8px 0 24px;
  font-size: 13px;
  line-height: 1.6;
  color: #9da3ae;
}
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  font-size: 13px;
  color: #8f97a4;
}
.auth-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.auth-steps li + li::before {
  content: "";
  width: 34px;
  height: 1px;
  background: #353b43;
  margin-right: 15px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid #555e6b;
  border-radius: 50%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.auth-steps .is-current {
  color: #d9b858;
  font-weight: 600;
}
.is-current .step-number {
  background: #c6a343;
  border-color: #c6a343;
  color: #151515;
}
.is-complete .step-number {
  background: #4baf74;
  border-color: #4baf74;
  color: #102118;
}
.auth-card .field {
  margin-bottom: 20px;
}
.auth-card label {
  font-size: 13px;
  line-height: 1.5;
  color: #c7ccd4;
}
.auth-card input,
.auth-card select {
  height: 48px;
  background: #111316;
  border-color: #5c6c83;
  color: #e4e7ec;
  font-size: 14px;
  padding: 0 14px;
}
.auth-card input:disabled,
.auth-card select:disabled {
  opacity: 0.6;
}
.auth-card input::placeholder {
  color: #a0adc0;
}
.auth-card input:focus,
.auth-card select:focus {
  border-color: #b89a48;
  box-shadow: 0 0 0 3px rgba(196, 163, 76, 0.1);
}
.auth-card input:-webkit-autofill {
  -webkit-text-fill-color: #e4e7ec;
  caret-color: #e4e7ec;
  -webkit-box-shadow: 0 0 0 1000px #111316 inset;
}
.auth-card input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 1000px #111316 inset,
    0 0 0 3px rgba(196, 163, 76, 0.1);
}
.auth-card input:autofill {
  background: #111316;
  color: #e4e7ec;
}
.auth-card .login-btn {
  font-size: 14px;
  font-weight: 700;
  background: var(--gold);
  color: #241c0d;
}
.auth-card .message {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: calc(1em + 6px);
  overflow-wrap: anywhere;
}
.auth-card .message:empty {
  display: none;
}
.auth-card .message.success {
  color: #9fd4b1;
  background: rgba(70, 150, 96, 0.08);
  border-color: rgba(85, 164, 111, 0.3);
}
.auth-card .message.pending {
  display: block;
  color: #c5b786;
  background: rgba(196, 163, 76, 0.06);
  border: 1px solid rgba(196, 163, 76, 0.25);
}
.auth-card .message.error {
  color: #f0b2b0;
  background: rgba(176, 71, 66, 0.08);
  border-color: rgba(208, 103, 95, 0.35);
}
#mfaForm .message {
  margin: 0 0 16px;
}
#mfaMessage.success {
  position: relative;
  padding: 0 0 0 16px;
  border: 0;
  background: transparent;
}
#mfaMessage.success::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #65b783;
}
.auth-link {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #c4a754;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
}
.auth-link:hover:not(:disabled) {
  color: #ead18b;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.auth-security {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #414d5d;
  text-align: center;
  color: #a9b6c9;
  font-size: 11px;
  line-height: calc(1em + 6px);
}
.auth-security p {
  margin: 0;
}
.auth-security p + p {
  margin-top: 8px;
  color: #7e8795;
}
.auth-security svg {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: calc(1em + 6px);
  overflow-wrap: anywhere;
}
.auth-card .otp-input {
  height: 52px;
  text-align: center;
  font-family: Consolas, monospace;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
}
.auth-card .otp-input::placeholder {
  font-size: 20px;
  letter-spacing: 0.2em;
  color: #7d8694;
  opacity: 1;
}
.auth-card #mfaSetup {
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid #333a44;
  border-radius: 10px;
  background: #14171b;
}
.auth-card #mfaSetup .notice {
  margin: 0 0 12px;
  line-height: calc(1em + 6px);
}
.auth-card #mfaEnrollment .notice {
  margin-top: 16px;
}
.auth-card #mfaSecret {
  font-size: 12px;
}

.app {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.admin-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.sidebar {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: #14181e;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar-link {
  position: relative;
  width: 100%;
  min-height: 50px;
  justify-content: flex-start;
  gap: 13px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #b4c0d1;
  font-size: 14px;
  line-height: 1.5;
}
.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #e2e4e9;
}
.sidebar-link.is-active {
  background: linear-gradient(90deg, rgba(231, 190, 101, 0.16), rgba(231, 190, 101, 0.07));
  border-color: rgba(231, 190, 101, 0.2);
  color: #f1ce83;
  font-weight: 600;
}
.sidebar-link.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: var(--gold);
}
.sidebar-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.admin-workspace {
  width: 100%;
  min-width: 0;
}
.topbar {
  flex-shrink: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: #12161b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 26px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 38px;
  height: 38px;
  margin: 0;
}
.brand-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.2px;
  line-height: 1.5;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}
.header-tools,
.connection-tools,
.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-tools {
  gap: 20px;
}
.user-area {
  border-left: 1px solid #35363c;
  padding-left: 20px;
  flex-shrink: 0;
}
.user-name {
  font-size: 12px;
  color: #d0d9e7;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: max-content;
  max-width: 300px;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.connection-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #737780;
  flex-shrink: 0;
}
.connection-status.is-ready {
  color: #a7cbb4;
}
.connection-status.is-ready::before {
  background: var(--green);
  box-shadow: 0 0 8px rgba(70, 197, 111, 0.2);
}
.connection-status.is-error {
  color: #e4a0a0;
}
.connection-status.is-error::before {
  background: var(--red);
}
.connection-status.is-checking::before {
  background: var(--gold);
}
.container {
  width: 100%;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.2px;
}
.page-heading p {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar button {
  height: 42px;
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
}
.button-icon,
.search-field svg,
.stat-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button-icon {
  width: 16px;
  height: 16px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  min-width: 0;
  min-height: 96px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
  align-content: center;
  background: var(--panel2);
  border: 1px solid var(--metric-line);
  border-radius: 8px;
  padding: 16px 20px;
}
.stat-label {
  grid-column: 2;
  grid-row: 1;
  color: #c3cedd;
  font-size: 12px;
  line-height: 1.5;
}
.stat-value {
  grid-column: 2;
  grid-row: 2;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.stat-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 2px;
  width: 24px;
  height: 24px;
  color: #a0aec4;
}
.stat-active .stat-icon {
  color: #65b783;
}
.stat-pending .stat-icon {
  color: #c4a34c;
}
.stat-blocked .stat-icon {
  color: #d17770;
}
.stat-online .stat-icon {
  color: #669dd7;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.panel-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.panel-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.6;
}
.search-field {
  position: relative;
  width: 300px;
  max-width: 100%;
  flex-shrink: 0;
}
.search-field svg {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: #999fac;
}
.search {
  height: 44px;
  padding-left: 40px;
  border-color: #4b596c;
  background: #13181f;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
.license-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1240px;
}
.col-key {
  width: 170px;
}
.col-status {
  width: 88px;
}
.col-duration {
  width: 74px;
}
.col-date {
  width: 124px;
}
.col-online {
  width: 78px;
}
.col-actions {
  width: 260px;
}
.col-ip {
  width: 164px;
}
.col-result {
  width: 145px;
}
.col-count {
  width: 90px;
}
.access-table {
  min-width: 1020px;
}
.access-table .col-purpose {
  width: 210px;
}
.ip-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ip-address {
  font-size: 12px;
  font-family: Consolas, monospace;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.ip-region {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ip-empty {
  color: #828894;
}
.license-table th,
.license-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid #333c49;
  font-size: 12px;
  vertical-align: middle;
}
.license-table th {
  padding-top: 13px;
  padding-bottom: 13px;
  border-top: 1px solid var(--line);
  color: #b0bed1;
  font-size: 11px;
  font-weight: 500;
  background: #242b35;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.license-table th:first-child,
.license-table td:first-child {
  padding-left: 20px;
}
.license-table tbody tr:last-child td {
  border-bottom: 0;
}
.license-table tbody tr {
  height: 68px;
  transition: background-color 0.15s;
}
.license-table tbody tr:hover {
  background: #242d39;
}
.license-table td {
  color: #e1e8f3;
}
.key-hint {
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: -0.1px;
  color: #d5e1f1;
}
.date-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.date-time {
  font-size: 11px;
  color: var(--muted);
}
.cell-empty {
  color: #828894;
}
.permanent {
  color: #d7b55b;
}
.purpose-text {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.mono {
  font-family: Consolas, monospace;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid;
}
.badge.green {
  color: #a1ebbd;
  border-color: #416e54;
  background: rgba(115, 213, 160, 0.08);
}
.badge.gray {
  color: #c0ccdc;
  border-color: #536176;
  background: #293342;
}
.badge.red {
  color: #f4b2b2;
  border-color: #805454;
  background: rgba(239, 150, 150, 0.08);
}
.badge.orange {
  color: #f3cf99;
  border-color: #7a6441;
  background: rgba(237, 191, 121, 0.08);
}
.badge.blue {
  color: #b5d5ff;
  border-color: #4a6b94;
  background: rgba(142, 188, 255, 0.08);
}
.actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.mini {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
}
.license-table .actions button {
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 400;
  border-radius: 6px;
}
.license-table .secondary {
  background: #293341;
  border-color: #526176;
  color: #d3dfef;
}
.license-table .danger {
  background: rgba(239, 150, 150, 0.04);
  border-color: #765050;
  color: #efa8a8;
}
.license-table .danger:hover:not(:disabled) {
  background: rgba(208, 103, 95, 0.15);
  border-color: #b16b65;
  color: #f1b2ab;
}
.license-table .warning-btn {
  background: rgba(231, 190, 101, 0.05);
  border: 1px solid #7b6741;
  color: #eccb8c;
}
.license-table .warning-btn:hover:not(:disabled) {
  background: rgba(196, 163, 76, 0.14);
  border-color: #b29449;
}
.delete-icon {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty {
  padding: 52px 24px;
  text-align: center;
  color: #b1bdce;
  font-size: 13px;
  line-height: 1.8;
}
.panel-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #171c23;
}
.privacy-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.pagination-footer {
  justify-content: flex-end;
}
.about-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(115deg, rgba(231, 190, 101, 0.09), transparent 65%), var(--panel);
}
.about-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  forced-color-adjust: none;
}
.about-identity {
  min-width: 0;
  flex: 1;
}
.about-identity h3 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.45;
}
.about-identity p {
  margin: 8px 0 12px;
  color: #a6abb6;
  font-size: 13px;
  line-height: 1.8;
}
.about-caption {
  color: #cfb66c;
  font-size: 12px;
  line-height: 1.6;
}
.about-admin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #39372e;
  border-radius: 7px;
  color: #c7b989;
  background: rgba(195, 161, 64, 0.06);
  font-size: 12px;
  white-space: nowrap;
}
.about-admin svg,
.about-footnote svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.about-card {
  padding: 28px;
  min-width: 0;
}
.about-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.about-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 163, 76, 0.18);
  border-radius: 11px;
  background: rgba(196, 163, 76, 0.08);
  color: #d6b666;
}
.about-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.about-icon-blue {
  border-color: rgba(102, 157, 215, 0.18);
  background: rgba(102, 157, 215, 0.08);
  color: #82acda;
}
.about-card-heading h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}
.about-card-heading p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9098a7;
  line-height: 1.6;
}
.about-details {
  margin: 0;
}
.about-details > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid #292d34;
  font-size: 13px;
  line-height: 1.8;
}
.about-details dt {
  color: #8f98a7;
}
.about-details dd {
  margin: 0;
  color: #d3d7df;
  overflow-wrap: anywhere;
}
.about-provider {
  padding: 20px;
  border: 1px solid #485972;
  border-radius: 10px;
  background: #141c26;
}
.about-provider-label {
  font-size: 11px;
  color: #949dab;
  line-height: 1.5;
}
.about-provider h4 {
  margin: 8px 0 12px;
  font-size: 23px;
  letter-spacing: 0.2px;
  font-weight: 600;
  line-height: 1.4;
}
.about-attribution {
  margin: 0;
  color: #b7bfcc;
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.about-attribution a {
  color: #dfbd61;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.about-attribution a:hover {
  color: #f0d694;
}
.about-attribution a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}
.about-provider-note {
  margin-top: 18px;
  color: #979fac;
  font-size: 12px;
  line-height: 1.9;
}
.about-provider-note p {
  margin: 6px 0 0;
}
.about-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 22px 0 0;
  color: #878f9d;
  font-size: 12px;
  line-height: 1.7;
}
.about-footnote svg {
  margin-top: 2px;
}
@media (max-width: 1100px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-admin {
    display: none;
  }
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #b1b7c3;
  font-size: 12px;
  white-space: nowrap;
}
.pagination .secondary {
  background: #1b1e23;
  border-color: #343941;
  color: #bbc1cc;
}
.pagination button:disabled {
  opacity: 0.4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 13, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 540px;
  max-height: calc(100dvh - 44px);
  display: flex;
  flex-direction: column;
  background: #1c242e;
  border: 1px solid #56657a;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.modal-title {
  font-size: 17px;
  font-weight: 800;
}
.close {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  background: #2a3544;
  border: 1px solid #56657a;
  border-radius: 8px;
  color: #ccd7e7;
  font-size: 22px;
  line-height: 1;
}
.modal-body {
  padding: 24px;
  min-height: 0;
  overflow-y: auto;
}
.modal-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--button-gap);
  flex-shrink: 0;
  background: #171d26;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notice {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.create-license-modal {
  max-width: 640px;
  max-height: calc(100vh - 44px);
}
.create-license-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
}
.create-message {
  margin-top: 10px;
  color: var(--orange);
}
.generated-status {
  margin-top: 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}
.generated-key {
  margin-top: 12px;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #78643d;
  background: #141b24;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.8;
}
.delivery-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.delivery-label {
  color: #b9b9bf;
}
.delivery-key {
  font-family: Consolas, monospace;
  font-size: 14px;
  color: #ead28b;
}
.delivery-url {
  color: #c5d2e0;
}
.delivery-footer {
  font-size: 12px;
  color: var(--muted);
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  background: #263a30;
  border: 1px solid #537e63;
  color: #c8eed5;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  max-width: min(400px, calc(100vw - 32px));
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.toast.error {
  border-color: rgba(224, 90, 90, 0.5);
  color: #ffb5b5;
  background: #39272c;
}

/* Current-page filters do not change server pagination or request frequency. */
.admin-workspace:focus {
  outline: none;
}
.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.sidebar-footer svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}
.sidebar-footer strong {
  font-size: 12px;
  font-weight: 500;
  color: #d5dfed;
  margin-bottom: 3px;
}
.table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px 16px;
}
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid #414e61;
  border-radius: 9px;
  background: #141b24;
  max-width: 100%;
}
.filter-tab {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #b1c0d5;
  font-size: 12px;
}
.filter-tab:hover {
  color: var(--text);
  background: #2b3748;
}
.filter-tab.is-active {
  background: #353c46;
  border-color: #6b6657;
  color: #f6dca4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.filter-note {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.license-table tbody[aria-busy="true"] {
  opacity: 0.5;
  pointer-events: none;
}
input::placeholder,
textarea::placeholder {
  color: #a1aec1;
}
button:active:not(:disabled) {
  filter: brightness(0.93);
}
.close:hover {
  background: #3a485c;
}
@media (min-width: 1600px) {
  .license-table {
    min-width: 1280px;
  }
  .col-key {
    width: 182px;
  }
  .col-date {
    width: 138px;
  }
  .col-ip {
    width: 184px;
  }
  .col-actions {
    width: 280px;
  }
  .license-table th,
  .license-table td {
    font-size: 13px;
  }
  .license-table .actions button {
    padding: 0 10px;
    font-size: 12px;
  }
  .key-hint {
    font-size: 12px;
  }
}
@media (max-width: 1599px) {
  .license-table {
    min-width: 960px;
  }
  .col-key {
    width: 156px;
  }
  .col-status {
    width: 76px;
  }
  .col-duration {
    width: 60px;
  }
  .col-date {
    width: 104px;
  }
  .col-online {
    width: 68px;
  }
  .col-ip {
    width: 136px;
  }
  .col-actions {
    width: 146px;
  }
  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .license-table .actions button {
    padding: 0 6px;
    height: 28px;
    min-height: 28px;
  }
  .license-table td {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .access-table {
    min-width: 960px;
  }
  .access-table .col-purpose {
    width: 200px;
  }
}

@media (max-width: 1150px) {
  .admin-layout {
    grid-template-columns: 208px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 14px;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 14px;
  }
  .header-tools {
    flex-wrap: wrap;
    gap: 14px;
  }
  .connection-status {
    max-width: 300px;
    line-height: 1.5;
  }
  .cards {
    gap: 10px;
  }
  .stat {
    column-gap: 12px;
    padding: 16px;
  }

  :root {
    --workspace-gutter: 24px;
  }
}
/* The overview and list share one panel surface; only data rows scroll. */
.container.admin-workspace {
  height: 100%;
  min-height: 0;
  max-width: none;
  padding: 0;
  overflow: hidden;
}
#licensesView,
#accessView {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.workspace-overview {
  flex-shrink: 0;
  padding: 24px var(--workspace-gutter) 0;
}
.workspace-overview.overview-panel {
  margin: 24px var(--workspace-gutter) 0;
  padding: 20px;
}
.workspace-overview .page-heading {
  margin-bottom: 20px;
  align-items: flex-start;
}
.workspace-overview .page-heading h2 {
  font-size: 26px;
}
.workspace-overview .page-heading p {
  margin-top: 4px;
}
.workspace-overview .toolbar {
  padding-top: 4px;
}
#accessView .workspace-overview .page-heading {
  margin-bottom: 0;
}
.workspace-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: var(--workspace-gap) var(--workspace-gutter) 24px;
}
.workspace-panel > .panel-head,
.workspace-panel > .table-controls,
.workspace-panel > .panel-footer {
  flex-shrink: 0;
}
.workspace-panel > .panel-head {
  padding: 12px 20px 8px;
}
.workspace-panel > .panel-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.workspace-panel .panel-note {
  margin-top: 0;
}
.workspace-panel .search {
  height: 40px;
}
.workspace-panel .search-field svg {
  top: 11px;
}
.workspace-panel > .table-controls {
  padding: 0 20px 10px;
}
.workspace-panel .filter-tabs {
  padding: 3px;
}
.workspace-panel .filter-tab {
  min-height: 28px;
}
.workspace-panel > .panel-footer {
  padding: 12px 20px;
}
.workspace-panel > .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-top: 52px;
  scroll-padding-bottom: 8px;
}
#aboutView {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px var(--workspace-gutter) 32px;
}
#aboutView:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
}
@media (max-height: 650px) and (min-width: 801px) {
  .workspace-overview {
    padding-top: 12px;
  }
  .workspace-overview.overview-panel {
    margin-top: 12px;
    padding: 16px;
  }
  .workspace-overview .page-heading {
    margin-bottom: 12px;
  }
  .workspace-overview .page-heading h2 {
    font-size: 24px;
  }
  .workspace-overview .stat {
    min-height: 80px;
    padding: 12px 16px;
  }
  .workspace-overview .stat-value {
    font-size: 26px;
  }
  .workspace-panel {
    margin-top: 12px;
    margin-bottom: 12px;
  }
  .workspace-panel > .panel-head {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .workspace-panel > .table-controls {
    padding-bottom: 8px;
  }
  .workspace-panel > .panel-footer {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@media (max-width: 800px) {
  .topbar {
    position: static;
  }
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar {
    height: auto;
    overflow: visible;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 0;
  }
  .sidebar-footer {
    display: none;
  }
  .table-controls {
    flex-wrap: wrap;
    gap: 10px;
  }
  .sidebar-nav {
    flex-direction: row;
    gap: 8px;
  }
  .sidebar-link {
    width: auto;
    min-width: 128px;
    justify-content: center;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .cards {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    overflow-x: auto;
    gap: 10px;
  }

  .panel-footer {
    flex-wrap: wrap;
  }

  :root {
    --workspace-gutter: 18px;
  }
  .workspace-overview {
    padding-top: 18px;
  }
  .workspace-overview.overview-panel {
    margin-top: 18px;
    padding: 16px;
  }
  .workspace-overview .page-heading {
    margin-bottom: 16px;
    gap: 12px;
  }
  .workspace-overview .toolbar {
    padding-top: 0;
  }
  .workspace-overview .stat {
    min-height: 88px;
    padding: 14px 12px;
    column-gap: 10px;
    grid-template-columns: 20px minmax(0, 1fr);
  }
  .workspace-overview .stat-icon {
    width: 20px;
    height: 20px;
  }
  .workspace-overview .stat-value {
    font-size: 26px;
  }
  .workspace-panel {
    margin-bottom: 18px;
  }
}
@media (max-height: 800px) and (min-width: 551px) {
  .auth-card {
    padding: 24px 32px;
  }
  .auth-card .logo {
    margin-bottom: 12px;
  }
  .auth-card .sub {
    margin-bottom: 18px;
  }
  .auth-steps {
    margin-bottom: 20px;
  }
  .auth-card .field {
    margin-bottom: 16px;
  }
  .auth-link {
    margin-top: 8px;
  }
  .auth-security {
    margin-top: 14px;
    padding-top: 14px;
  }
}
@media (max-width: 550px) {
  .center-page {
    padding: 24px 14px;
  }
  .table-controls {
    padding: 0 16px 14px;
  }
  .filter-tabs {
    width: 100%;
    gap: 2px;
  }
  .filter-tab {
    flex: 1;
    min-height: 38px;
    padding: 0 8px;
    font-size: 11px;
  }
  .filter-note {
    width: 100%;
    text-align: right;
  }
  .search {
    font-size: 16px;
  }
  .auth-card input,
  .auth-card select,
  .modal input,
  .modal textarea,
  .modal select {
    font-size: 16px;
  }
  .modal-backdrop {
    padding: 12px;
  }
  .modal,
  .create-license-modal {
    max-height: calc(100dvh - 24px);
  }
  .modal-head {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 20px 18px;
  }
  .modal-actions {
    padding: 14px 18px;
  }
  .close {
    width: 38px;
    min-height: 38px;
  }
  .auth-card {
    padding: 26px 22px;
  }
  .auth-card h1 {
    font-size: 22px;
  }
  .auth-steps {
    gap: 16px;
    font-size: 12px;
  }
  .auth-steps li {
    gap: 7px;
  }
  .auth-steps li + li::before {
    width: 24px;
    margin-right: 9px;
  }
  .auth-card .otp-input {
    font-size: 23px;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
  }
  .topbar {
    padding: 16px;
  }
  .brand-title {
    font-size: 15px;
  }
  .header-tools {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .connection-tools {
    flex: 1;
    justify-content: space-between;
  }
  .connection-status {
    font-size: 11px;
    overflow-wrap: anywhere;
    flex: 1;
    width: auto;
  }
  .user-area {
    width: 100%;
    justify-content: flex-end;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #2b2d32;
    padding-top: 12px;
  }
  .user-name {
    margin-right: auto;
  }
  .sidebar {
    padding: 12px;
  }
  .sidebar-link {
    flex: 1;
    min-width: 0;
    gap: 8px;
    padding: 12px 10px;
    font-size: 13px;
  }
  .sidebar-link svg {
    width: 18px;
    height: 18px;
  }
  .about-hero {
    padding: 22px;
    gap: 16px;
    align-items: flex-start;
  }
  .about-logo {
    width: 44px;
    height: 44px;
  }
  .about-identity h3 {
    font-size: 18px;
  }
  .about-identity p {
    margin-bottom: 10px;
  }
  .about-card {
    padding: 22px 18px;
  }
  .about-card-heading {
    gap: 12px;
    margin-bottom: 20px;
  }
  .about-details > div {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
  }
  .about-provider {
    padding: 16px;
  }
  .page-heading h2 {
    font-size: 24px;
  }
  .toolbar {
    width: 100%;
    gap: 8px;
  }
  .toolbar button {
    flex: 1;
    padding: 0 10px;
    font-size: 12px;
  }
  .panel-head {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .search-field {
    width: 100%;
  }
  .panel-footer {
    padding: 16px;
    gap: 12px;
  }
  .pagination {
    width: 100%;
    justify-content: space-between;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }

  :root {
    --workspace-gutter: 12px;
    --workspace-gap: 12px;
  }
  .sidebar {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .workspace-overview {
    padding-top: 14px;
  }
  .workspace-overview.overview-panel {
    margin-top: 12px;
    padding: 12px;
  }
  .workspace-overview .page-heading {
    gap: 10px;
    margin-bottom: 12px;
  }
  .workspace-overview .page-heading h2 {
    font-size: 22px;
  }
  .workspace-overview .page-heading p {
    display: none;
  }
  .workspace-overview .toolbar button {
    height: 38px;
    min-height: 38px;
  }
  .workspace-overview .cards {
    grid-template-columns: repeat(5, 140px);
    gap: 8px;
  }
  .workspace-overview .stat {
    min-height: 74px;
    padding: 10px 12px;
    column-gap: 8px;
  }
  .workspace-overview .stat-label {
    font-size: 11px;
  }
  .workspace-overview .stat-value {
    font-size: 23px;
  }
  .workspace-panel {
    margin-bottom: 12px;
  }
  .workspace-panel > .panel-head {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 8px;
  }
  .workspace-panel > .panel-head > div:first-child {
    display: block;
    min-width: 78px;
  }
  .workspace-panel .panel-title {
    font-size: 15px;
  }
  .workspace-panel .panel-note {
    margin-top: 3px;
    font-size: 10px;
  }
  .workspace-panel .search-field {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  .workspace-panel .search {
    font-size: 13px;
  }
  .workspace-panel > .table-controls {
    padding: 0 14px 10px;
    gap: 7px;
  }
  .workspace-panel .filter-tab {
    min-height: 32px;
  }
  .workspace-panel > .panel-footer {
    padding: 8px 14px;
    gap: 6px;
  }
  .workspace-panel .pagination .mini {
    height: 30px;
    min-height: 30px;
  }
  #aboutView {
    padding-top: 22px;
    padding-bottom: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button,
  .license-table tbody tr {
    transition: none;
  }
}
.mfa-qr {
  display: block;
  width: 210px;
  height: 210px;
  background: white;
  margin: 18px auto;
}
.mfa-cancel {
  margin-top: 14px;
  width: 100%;
}
#mfaSecret {
  font-family: Consolas, monospace;
  margin-bottom: 18px;
}

/* The filing link follows content and stays visible on short pages. */
.site-registration {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  color: var(--muted, #62686f);
  font-weight: 400;
  font-family: inherit;
  font-size: 12px;
  line-height: 24px;
  text-align: center;
}
.site-registration a {
  color: inherit;
  text-decoration: none;
}
.site-registration a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-registration a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.center-page {
  min-height: calc(100vh - var(--header-height) - 40px);
  min-height: calc(100dvh - var(--header-height) - 40px);
}
