:root {
  color-scheme: dark;
  --bg: #09090b;
  --sidebar: #08080a;
  --surface: rgba(24, 24, 27, 0.58);
  --surface-solid: #111113;
  --surface-raised: #18181b;
  --field: #0c0c0f;
  --text: #fafafa;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --line: rgba(63, 63, 70, 0.62);
  --line-strong: #3f3f46;
  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --emerald: #34d399;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --red: #f87171;
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open,
body.nav-open {
  overflow: hidden;
}

::selection {
  background: rgba(99, 102, 241, 0.34);
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #27272a;
}

*::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

a {
  color: inherit;
}

.ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sidebar {
  z-index: 50;
}

.is-authed .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 288px;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  border-right: 1px solid rgba(39, 39, 42, 0.72);
  background: rgba(8, 8, 10, 0.96);
  backdrop-filter: blur(24px);
}

.brand {
  min-width: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #6366f1, #4f46e5);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.32);
}

.brand-mark .ui-icon {
  width: 21px;
  height: 21px;
}

.brand-copy {
  min-width: 0;
  display: grid;
}

.brand-copy strong {
  color: #e4e4e7;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 3px;
  color: #52525b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  margin-top: 19px;
  overflow-y: auto;
}

.nav-label {
  padding: 0 12px 8px;
  color: #52525b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav a {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 12px;
  color: #a1a1aa;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

nav a::after {
  content: "›";
  margin-left: auto;
  color: transparent;
  font-size: 20px;
  font-weight: 400;
}

nav a:hover {
  border-color: rgba(63, 63, 70, 0.4);
  background: rgba(39, 39, 42, 0.42);
  color: #f4f4f5;
}

nav a.active {
  border-color: rgba(99, 102, 241, 0.08);
  background: rgba(99, 102, 241, 0.12);
  color: var(--indigo-light);
}

nav a.active::after {
  color: rgba(129, 140, 248, 0.55);
}

.operator-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(63, 63, 70, 0.45);
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.56);
}

.operator-avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  border: 1px solid #52525b;
  border-radius: 50%;
  background: linear-gradient(145deg, #3f3f46, #27272a);
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 600;
}

.operator-copy {
  min-width: 0;
  display: grid;
  flex: 1;
}

.operator-copy strong,
.operator-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-copy strong {
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 600;
}

.operator-copy small {
  color: #71717a;
  font-size: 11px;
}

.operator-card form {
  flex: 0 0 auto;
}

.operator-exit {
  width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  color: #71717a;
}

.operator-exit:hover {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
}

.operator-exit .ui-icon {
  width: 17px;
  height: 17px;
}

.mobile-bar,
.sidebar-overlay {
  display: none;
}

.is-authed main {
  position: relative;
  min-height: 100vh;
  margin-left: 288px;
  overflow: hidden;
  background: #09090b;
}

.is-authed main::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -300px;
  left: 50%;
  width: 850px;
  height: 520px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.12);
  filter: blur(130px);
  pointer-events: none;
  transform: translateX(-50%);
}

.content-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1344px);
  margin: 0 auto;
  padding: 32px 32px 56px;
}

.is-login {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(79, 70, 229, 0.14), transparent 34%),
    #09090b;
}

.is-login .sidebar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(39, 39, 42, 0.72);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(18px);
}

.is-login .sidebar .brand {
  width: auto;
}

.is-login main {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: start center;
}

.is-login .content-shell {
  width: min(100%, 472px);
  margin: 0;
  padding: 72px 16px 40px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 24px;
}

.page-heading,
.hero-panel {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading h2,
.hero-panel h2 {
  font-size: 29px;
  font-weight: 750;
}

.page-heading p,
.hero-panel p,
.panel-title p,
.muted {
  margin: 6px 0 0;
  color: var(--muted);
}

.page-heading p,
.hero-panel p {
  font-size: 14px;
}

.page-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  margin-bottom: 20px;
  padding: 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.panel-title {
  margin-bottom: 20px;
}

.panel-title > span {
  display: block;
  margin-bottom: 6px;
  color: var(--indigo-light);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel-title h2 {
  font-size: 18px;
  font-weight: 700;
}

.panel-title p {
  font-size: 13px;
}

.table-panel {
  padding: 0;
  overflow-x: auto;
}

.table-panel .panel-title {
  min-width: 720px;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(63, 63, 70, 0.48);
}

.login {
  margin: 0;
  padding: 28px;
  background: rgba(17, 17, 19, 0.82);
  box-shadow: var(--shadow);
}

.login .panel-title {
  margin-bottom: 24px;
}

.login .panel-title h2 {
  font-size: 24px;
}

.login form {
  display: grid;
  gap: 17px;
}

.flash {
  margin-bottom: 18px;
  padding: 11px 13px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 9px;
  background: rgba(52, 211, 153, 0.08);
  color: #a7f3d0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.activation-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  min-width: 0;
  min-height: 106px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.5);
  transition: transform 180ms ease, background 180ms ease;
}

.stat-card:hover {
  background: rgba(24, 24, 27, 0.74);
  transform: translateY(-2px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  border-radius: 12px;
}

.stat-copy {
  min-width: 0;
  display: grid;
}

.stat-copy small {
  overflow: hidden;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-copy strong {
  margin-top: 2px;
  overflow: hidden;
  color: #fafafa;
  font-size: 25px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.stat-blue {
  border-color: rgba(96, 165, 250, 0.24);
}

.stat-blue .stat-icon {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
}

.stat-emerald {
  border-color: rgba(52, 211, 153, 0.25);
}

.stat-emerald .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
}

.stat-indigo,
.stat-violet {
  border-color: rgba(129, 140, 248, 0.24);
}

.stat-indigo .stat-icon,
.stat-violet .stat-icon {
  background: rgba(99, 102, 241, 0.13);
  color: var(--indigo-light);
}

.stat-amber {
  border-color: rgba(251, 191, 36, 0.23);
}

.stat-amber .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

form {
  margin: 0;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.grid-form > button,
.grid-form > .check-field:last-of-type {
  align-self: end;
}

.query-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px;
  gap: 14px;
  align-items: end;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.filter-form button {
  min-width: 96px;
}

.form-span-2 {
  grid-column: 1 / -1;
}

.duration-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 110px;
  gap: 10px;
}

label {
  display: grid;
  gap: 8px;
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 600;
}

.check-field {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 9, 11, 0.54);
}

.check-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--indigo);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 9px 12px;
  outline: none;
  background: var(--field);
  color: #f4f4f5;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  cursor: pointer;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #52525b;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(99, 102, 241, 0.82);
  background: #0f0f12;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.13);
}

button,
.primary-link,
.primary-button,
.table-action {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #5b4ff7);
  color: #fff;
  font-weight: 650;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

button:hover,
.primary-link:hover,
.primary-button:hover,
.table-action:hover {
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--indigo-light);
  outline-offset: 2px;
}

.primary-link,
.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #4f46e5, #5b4ff7);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.18);
}

.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
  box-shadow: none;
}

.secondary-button:hover {
  border-color: rgba(129, 140, 248, 0.58);
  background: rgba(99, 102, 241, 0.18);
}

.secondary-button .ui-icon {
  width: 17px;
  height: 17px;
}

.danger-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(185, 28, 28, 0.18);
  color: #fecaca;
  box-shadow: none;
}

.danger-button:hover {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(185, 28, 28, 0.3);
}

.danger-button .ui-icon {
  width: 17px;
  height: 17px;
}

.primary-link .ui-icon,
.primary-button .ui-icon {
  width: 17px;
  height: 17px;
}

.ghost-button {
  border: 1px solid transparent;
  background: transparent;
  color: #a1a1aa;
  box-shadow: none;
}

.ghost-button:hover {
  border-color: var(--line);
  background: rgba(39, 39, 42, 0.54);
  color: #f4f4f5;
}

button.danger {
  margin-top: 14px;
  background: #dc2626;
}

.danger-zone {
  border-color: rgba(248, 113, 113, 0.26);
  background: rgba(69, 10, 10, 0.16);
}

.danger-zone .panel-title > span {
  color: var(--red);
}

.danger-zone form {
  margin-top: 18px;
}

.danger-zone button.danger {
  margin-top: 0;
}

.summary-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -8px 0 22px;
}

.summary-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.48);
  color: #a1a1aa;
  font-size: 12px;
}

.summary-chips strong {
  color: #f4f4f5;
}

.inline-copy,
.copy-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-copy code,
.copy-field code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy-field code {
  min-height: 43px;
  display: flex;
  align-items: center;
  flex: 1;
  padding: 9px 12px;
}

.copy-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 7px;
  padding: 8px 11px;
  background: rgba(99, 102, 241, 0.09);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: none;
}

.copy-button:hover {
  border-color: rgba(129, 140, 248, 0.42);
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
}

.copy-button .ui-icon {
  width: 16px;
  height: 16px;
}

.copy-button-compact {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}

.copy-button-primary {
  min-height: 42px;
  border-color: transparent;
  padding: 10px 15px;
  background: linear-gradient(135deg, #4f46e5, #5b4ff7);
  color: #fff;
}

.copy-button-primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #5b52eb, #695df8);
  color: #fff;
}

.copy-button.is-copied {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

.copy-button.is-copy-error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.credentials-panel {
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
}

.credential-warning {
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.07);
  color: #d4d4d8;
  font-size: 13px;
}

.credential-app-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 9, 11, 0.36);
}

.credential-app-name span {
  color: #71717a;
  font-size: 12px;
}

.credential-app-name strong {
  color: #f4f4f5;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.credential-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.credential-field:nth-child(1),
.credential-field:nth-child(3) {
  grid-column: 1 / -1;
}

.credential-label {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 650;
}

.credential-actions,
.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(63, 63, 70, 0.52);
}

.edit-app-key,
.edit-license-identity {
  margin-bottom: 20px;
}

.onboarding-step {
  display: grid;
  gap: 18px;
}

.onboarding-step + .onboarding-step {
  margin-top: 18px;
}

.onboarding-actions {
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  flex-wrap: wrap;
}

.onboarding-prompt {
  min-height: 360px;
  resize: vertical;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}

.edit-license-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #a1a1aa;
}

.table-actions,
.action-cell,
.export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.export-actions {
  margin: 18px 0;
}

.table-actions form {
  margin: 0;
}

.table-actions form .table-action {
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.08);
  color: #a5b4fc;
}

.table-scroll {
  overflow-x: auto;
}

.release-table {
  min-width: 1120px;
}

.release-table th:nth-child(n+2),
.release-table td:nth-child(n+2) {
  white-space: nowrap;
}

.release-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.artifact-upload-panel {
  overflow: visible;
}

.artifact-upload-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.file-input-field input[type="file"] {
  min-height: 46px;
  padding: 7px;
  cursor: pointer;
}

.file-input-field input[type="file"]::file-selector-button {
  height: 30px;
  margin-right: 12px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  cursor: pointer;
}

.form-hint {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.signature-import-form {
  display: grid;
  gap: 14px;
}

.signature-import-form button {
  justify-self: start;
}

.inline-status-form {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.inline-status-form select {
  width: auto;
  min-width: 96px;
  min-height: 32px;
  padding: 5px 9px;
}

.release-details pre {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table-action,
td form button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 7px;
  padding: 6px 10px;
  background: rgba(99, 102, 241, 0.08);
  color: #a5b4fc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

td form button,
.table-danger {
  margin: 0;
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

.license-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

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

.detail-grid > div {
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 9, 11, 0.42);
  overflow-wrap: anywhere;
}

.detail-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 650;
}

.detail-grid strong {
  color: #e4e4e7;
  font-size: 13px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(63, 63, 70, 0.48);
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(9, 9, 11, 0.32);
  color: #71717a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

td {
  color: #a1a1aa;
  font-size: 13px;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(39, 39, 42, 0.25);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  min-height: 100px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(63, 63, 70, 0.72);
  border-radius: 9px;
  background: rgba(9, 9, 11, 0.2);
  color: #71717a;
}

code,
pre {
  border: 1px solid rgba(63, 63, 70, 0.62);
  border-radius: 7px;
  background: #0a0a0c;
  color: #c7d2fe;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 7px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

pre {
  padding: 15px;
  overflow-x: auto;
}

.badge {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(63, 63, 70, 0.72);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(63, 63, 70, 0.28);
  color: #d4d4d8;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.badge-active,
.badge-success,
.badge-verification {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.09);
  color: #6ee7b7;
}

.badge-disabled,
.badge-unbound {
  color: #a1a1aa;
}

.badge-expired {
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.09);
  color: #fcd34d;
}

.badge-revoked,
.badge-failure,
.badge-blocked {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.09);
  color: #fca5a5;
}

.badge-admin {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(96, 165, 250, 0.09);
  color: #93c5fd;
}

.badge-draft,
.badge-dev,
.badge-no_update {
  border-color: rgba(161, 161, 170, 0.22);
  background: rgba(161, 161, 170, 0.08);
  color: #d4d4d8;
}

.badge-published,
.badge-stable,
.badge-update_available {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.09);
  color: #6ee7b7;
}

.badge-beta {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(96, 165, 250, 0.09);
  color: #93c5fd;
}

.badge-withdrawn,
.badge-denied {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.09);
  color: #fca5a5;
}

.alert,
.toast,
.error-state,
.loading-state {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(24, 24, 27, 0.64);
  color: var(--muted);
}

.error-state {
  border-color: rgba(248, 113, 113, 0.24);
  color: #fecaca;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px;
  border-top: 1px solid rgba(63, 63, 70, 0.48);
  color: var(--muted);
}

.pagination-meta,
.pagination-status {
  font-size: 12px;
  white-space: nowrap;
}

.pagination-sizes {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.pagination-sizes a,
.pagination-sizes strong {
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  padding: 4px 6px;
  color: #a5b4fc;
  text-decoration: none;
}

.pagination-sizes strong {
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
}

.modal-shell {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
}

.modal-backdrop:hover {
  transform: none;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 448px);
  max-height: calc(100vh - 36px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid rgba(63, 63, 70, 0.72);
  border-radius: 16px;
  background: #0c0c0f;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  animation: modal-in 180ms ease-out;
}

.modal-card-wide {
  width: min(100%, 620px);
}

.modal-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.modal-accent-danger {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 22px;
}

.modal-header h2 {
  font-size: 21px;
}

.modal-header p {
  margin: 5px 0 0;
  color: #71717a;
  font-size: 12px;
}

.modal-close {
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #71717a;
}

.modal-close:hover {
  background: rgba(39, 39, 42, 0.6);
  color: #f4f4f5;
}

.modal-close .ui-icon {
  width: 18px;
  height: 18px;
}

.modal-form {
  display: grid;
  gap: 16px;
}

.modal-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-field,
.modal-form-grid .modal-actions {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-top: 17px;
  border-top: 1px solid rgba(63, 63, 70, 0.56);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .is-authed .sidebar {
    width: 272px;
    pointer-events: none;
    background: #08080a;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: translateX(-100%);
    transition: transform 140ms ease;
  }

  .nav-open .sidebar {
    pointer-events: auto;
    transform: translateX(0);
  }

  .mobile-bar {
    position: fixed;
    z-index: 40;
    inset: 0 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(39, 39, 42, 0.72);
    background: #09090b;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .mobile-bar .brand {
    height: 48px;
    padding: 0;
    gap: 9px;
  }

  .mobile-bar .brand-mark {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 9px;
  }

  .mobile-bar .brand-mark .ui-icon {
    width: 17px;
    height: 17px;
  }

  .mobile-bar .brand-copy strong {
    font-size: 16px;
  }

  .mobile-bar .brand-copy small {
    display: none;
  }

  .mobile-menu {
    width: 38px;
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: #a1a1aa;
  }

  .mobile-menu:hover {
    background: rgba(39, 39, 42, 0.55);
    color: #fff;
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 45;
    inset: 0;
    width: 100%;
    min-height: 100%;
    display: block;
    pointer-events: none;
    visibility: hidden;
    border: 0;
    border-radius: 0;
    padding: 0;
    opacity: 0;
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: opacity 140ms ease, visibility 140ms ease;
  }

  .nav-open .sidebar-overlay {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
  }

  .sidebar-overlay:hover {
    transform: none;
  }

  .is-authed main {
    margin-left: 0;
    padding-top: 64px;
  }

  .is-authed main::before {
    display: none;
  }

  .is-authed .panel {
    background: #121214;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .modal-backdrop {
    background: rgba(0, 0, 0, 0.76);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .modal-card {
    animation-duration: 120ms;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.56);
  }

  .content-shell {
    padding: 24px 20px 44px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .content-shell {
    padding: 20px 14px 40px;
  }

  .page-heading,
  .hero-panel {
    min-height: 0;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .page-heading h2,
  .hero-panel h2 {
    font-size: 25px;
  }

  .page-heading .primary-button,
  .hero-panel .primary-link {
    width: 100%;
  }

  .page-heading-actions {
    width: 100%;
  }

  .page-heading-actions > * {
    flex: 1;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .activation-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 91px;
  }

  .panel {
    padding: 18px;
    border-radius: 11px;
  }

  .table-panel {
    padding: 0;
  }

  .table-panel .panel-title {
    min-width: 0;
    padding: 18px;
  }

  .table-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 16px 18px;
  }

  .pagination {
    justify-content: flex-start;
  }

  .grid-form,
  .query-form,
  .filter-form,
  .artifact-upload-form,
  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .full-field,
  .form-span-2,
  .modal-form-grid .modal-actions {
    grid-column: auto;
  }

  .modal-shell {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 20px;
    border-radius: 15px;
  }

  .modal-actions button {
    flex: 1;
  }

  .duration-row {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .summary-chips {
    margin-top: 0;
  }

  .credential-grid {
    grid-template-columns: 1fr;
  }

  .credential-field:nth-child(1),
  .credential-field:nth-child(3) {
    grid-column: auto;
  }

  .copy-field {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-field .copy-button,
  .credential-actions .copy-button,
  .result-actions .primary-link,
  .export-actions > * {
    width: 100%;
    min-height: 44px;
  }

  .inline-copy .copy-button {
    min-height: 44px;
  }

  .credential-actions,
  .result-actions,
  .export-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .is-login .content-shell {
    padding-top: 40px;
  }
}

.permission-fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.permission-fieldset legend {
  padding: 0 8px;
  color: var(--text);
  font-weight: 700;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-grid .check-field {
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 640px) {
  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none), (pointer: coarse) {
  button,
  a,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  button:hover,
  .primary-link:hover,
  .primary-button:hover,
  .table-action:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.session-intel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  max-width: 420px;
}

.session-ip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.session-ip .badge {
  margin: 0;
}

.session-geo {
  color: var(--muted);
  font-size: 12px;
}

.session-ua {
  font-size: 13px;
}

.session-raw {
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
}

.session-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.action-cell form {
  margin: 0;
}
