:root {
  --surface: #ffffff;
  --surface-soft: #f5f4fa;
  --border: #e7e5ed;
  --text: #24212d;
  --subtle: #787381;
  --accent: #7258f5;
  --accent-soft: #eee9ff;
  --success: #23845c;
  --danger: #bd3855;
}

html[data-theme="dark"] {
  --surface: #211e2a;
  --surface-soft: #19171f;
  --border: #3b3548;
  --text: #f4f1fa;
  --subtle: #b6aec3;
  --accent: #ab98ff;
  --accent-soft: #33294e;
  --success: #80d6ae;
  --danger: #ff9cb2;
}

.product-body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  font-family: "DM Sans", sans-serif;
  line-height: 1.5;
}

.product-body h1,
.product-body h2,
.product-body h3,
.product-body .brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.product-body [hidden] {
  display: none !important;
}

.product-body button,
.product-body input,
.product-body select,
.product-body textarea {
  font: inherit;
}

.product-body button {
  cursor: pointer;
}

.product-body button:focus-visible,
.product-body a:focus-visible,
.product-body input:focus-visible,
.product-body select:focus-visible,
.product-body textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  justify-content: stretch;
  gap: 3px;
  width: 30px;
  height: 30px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent-soft), color-mix(in srgb, var(--accent) 26%, var(--surface)));
  transform: rotate(-8deg);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

.brand-mark span {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--text);
}

.brand-mark span:nth-child(1) {
  height: 45%;
}

.brand-mark span:nth-child(2) {
  height: 75%;
  background: var(--accent);
}

.brand-mark span:nth-child(3) {
  height: 100%;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

.header-links > a {
  color: var(--subtle);
  text-decoration: none;
}

.header-links > a:hover {
  color: var(--text);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mobile-logout {
  display: none !important;
}

.account-wrap {
  position: relative;
}

.account {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 170px;
  padding: 5px 0 5px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.account:hover {
  color: var(--accent);
}

.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}

.account-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.account-copy strong {
  font-size: 13px;
}

.account-copy small {
  color: var(--subtle);
  font-size: 12px;
}

.account-chevron {
  margin-left: auto;
  color: var(--subtle);
  font-size: 16px;
}

.account-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgb(15 10 30 / 18%);
}

.account-menu-heading {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
}

.account-menu-heading > span {
  margin-bottom: 5px;
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.account-menu-heading strong {
  color: var(--text);
  font-size: 13px;
}

.account-menu-heading small {
  overflow: hidden;
  color: var(--subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-divider {
  height: 1px;
  margin: 3px 0 7px;
  background: var(--border);
}

.account-menu-item {
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.account-menu-item:hover {
  background: var(--surface-soft);
}

.account-menu-item.danger {
  color: var(--danger);
}

.account-signout {
  color: var(--danger);
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 600px);
  gap: clamp(50px, 6vw, 90px);
  align-items: center;
  max-width: 1420px;
  min-height: calc(100vh - 77px);
  margin: 0 auto;
  padding: 72px 50px;
}

.access-intro {
  align-self: center;
}

.access-intro h1 {
  max-width: 650px;
  margin: 27px 0 34px;
  color: var(--text);
  font-size: clamp(46px, 5.5vw, 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.065em;
  white-space: nowrap;
}

.access-intro h1 em {
  font-style: normal;
  color: var(--accent);
}

.access-intro > p {
  max-width: 610px;
  color: var(--subtle);
  font-size: 18px;
  line-height: 1.65;
}

.access-steps {
  display: grid;
  gap: 18px;
  margin-top: 45px;
}

.access-steps > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
}

.access-steps > div > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.access-steps > div strong {
  display: block;
  margin: 3px 0 5px;
  color: var(--text);
}

.access-steps > div p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.5;
}

.access-card {
  align-self: center;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 25px 70px rgb(15 10 30 / 12%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 42px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.auth-tabs button {
  padding: 12px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--subtle);
  font-weight: 700;
}

.auth-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgb(15 10 30 / 8%);
}

.access-card h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.access-card p {
  color: var(--subtle);
  line-height: 1.5;
}

#authForm {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

#authForm > label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

#authForm > label input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
}

#authForm .full {
  width: 100%;
}

.auth-switch {
  min-height: 20px;
  margin: 18px 0 0;
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
}

.auth-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.back-link,
.back-button {
  color: var(--accent);
  text-decoration: none;
}

.back-link {
  display: block;
  margin-top: 22px;
  text-align: center;
}

.back-button {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.back-button:hover,
.back-link:hover {
  color: var(--text);
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--text);
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.product-sidebar select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  min-height: 105px;
  resize: vertical;
}

.field-help {
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.4;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.button-row,
.actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary,
.secondary,
.quiet,
.danger,
.icon-button {
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  filter: brightness(1.08);
}

.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.secondary:hover,
.quiet:hover,
.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--subtle);
}

.danger {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: var(--border);
  background: var(--surface);
  color: var(--subtle);
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--subtle);
  line-height: 1.5;
}

.notice.error {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
}

.loading-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: var(--subtle);
}

.spinner {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.product-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: calc(100vh - 77px);
  background: var(--surface);
}

.product-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 77px);
  padding: 45px 26px 24px;
  border-right: 1px solid var(--border);
  background: var(--surface-soft);
}

.sidebar-label {
  margin: 0 12px 14px;
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.product-sidebar select {
  margin-bottom: 19px;
}

.sidebar-create {
  align-self: flex-start;
  padding: 0 12px 23px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.sidebar-create:hover {
  color: var(--text);
}

.product-sidebar nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--subtle);
  text-align: left;
}

.nav-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.nav-item .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  color: currentColor;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 22px 12px 0;
}

.sidebar-bottom a {
  color: var(--subtle);
  text-decoration: none;
}

.sidebar-bottom a:hover {
  color: var(--accent);
}

.product-main {
  min-width: 0;
  min-height: calc(100vh - 77px);
  padding: 39px 45px 75px;
  background: var(--surface);
}

.workspace-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 51px;
  color: var(--subtle);
  font-size: 13px;
}

.connected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.connected i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent);
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.06em;
}

.page-heading p {
  margin: 9px 0 0;
  color: var(--subtle);
  font-size: 16px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric,
.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.metric {
  padding: 22px;
}

.metric > span {
  color: var(--subtle);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: 34px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.metric small {
  display: block;
  margin-top: 7px;
  color: var(--subtle);
}

.panel {
  padding: 22px;
}

.panel + .panel {
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.panel > h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar input {
  min-width: min(100%, 280px);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

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

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.table-wrap th {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-wrap td {
  color: var(--text);
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.person-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.customer-link {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.customer-link:hover {
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.badge.active,
.badge.unused {
  background: color-mix(in srgb, var(--success) 13%, var(--surface));
  color: var(--success);
}

.badge.revoked,
.badge.expired {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.mono-value,
.key-box {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mono-value {
  color: var(--subtle);
  font-size: 12px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 52px 25px;
  color: var(--subtle);
  text-align: center;
}

.empty-state h2,
.empty-state h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.empty-state p {
  max-width: 520px;
  margin: 0 0 8px;
  line-height: 1.55;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
}

.onboarding {
  display: grid;
  gap: 22px;
}

.onboarding .panel {
  padding: 42px 30px;
}

.onboarding .step-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.step-card > b {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.step-card h3 {
  margin: 14px 0 7px;
  color: var(--text);
  font-size: 16px;
}

.step-card p {
  margin: 0 0 14px;
  color: var(--subtle);
  line-height: 1.5;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.app-card h2,
.app-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.app-card p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.5;
}

.license-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.license-item:last-child {
  border-bottom: 0;
}

.license-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
}

.license-title h3 {
  margin: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
}

.license-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 12px;
}

.license-meta > div {
  display: grid;
  gap: 4px;
}

.license-meta small {
  color: var(--subtle);
  font-size: 11px;
}

.license-meta span {
  color: var(--text);
}

.key-box {
  overflow-wrap: anywhere;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
}

.product-body pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.profile-summary .person-avatar {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.profile-name {
  color: var(--text);
  font-weight: 800;
}

.profile-email {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 13px;
}

.profile-summary h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.profile-summary p {
  margin: 4px 0 0;
  color: var(--subtle);
}

.profile-details {
  display: grid;
  gap: 14px;
}

.profile-field {
  display: grid;
  gap: 3px;
}

.profile-field span {
  color: var(--subtle);
  font-size: 12px;
}

.profile-field strong {
  color: var(--text);
}

.profile-details > div {
  display: grid;
  gap: 3px;
}

.profile-details small {
  color: var(--subtle);
  font-size: 12px;
}

.profile-details strong {
  color: var(--text);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline > div {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.timeline > div:last-child {
  border-bottom: 0;
}

.timeline > div::before {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.timeline > div strong {
  color: var(--text);
}

.timeline > div small {
  display: block;
  margin-top: 4px;
  color: var(--subtle);
}

.editor-dialog {
  width: min(600px, calc(100vw - 30px));
  max-width: 600px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 25px 80px rgb(15 10 30 / 28%);
}

.editor-dialog::backdrop {
  background: rgb(15 10 30 / 52%);
}

.editor-dialog form {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.editor-dialog form > label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

.editor-dialog form > label input,
.editor-dialog form > label select,
.editor-dialog form > label textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.editor-dialog form > label textarea {
  min-height: 100px;
  resize: vertical;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 22px;
}

.dialog-heading h2 {
  margin: 8px 0 4px;
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.dialog-actions {
  justify-content: flex-end;
  padding-top: 24px;
}

.notification {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 40px rgb(15 10 30 / 18%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1050px) {
  .access-layout {
    gap: 40px;
  }

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

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

@media (max-width: 760px) {
  .product-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-links {
    gap: 10px;
  }

  .header-links > a {
    display: none;
  }

  .account {
    min-width: 0;
    padding-right: 0;
  }

  .account-copy,
  .account-chevron {
    display: none;
  }

  .account-avatar {
    width: 38px;
    height: 38px;
  }

  .account-menu {
    right: -4px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .access-layout {
    display: block;
    min-height: auto;
    padding: 48px 20px;
  }

  .access-intro {
    margin-bottom: 42px;
  }

  .access-intro h1 {
    margin-top: 20px;
    font-size: clamp(42px, 13vw, 66px);
    white-space: normal;
  }

  .access-intro > p {
    font-size: 16px;
  }

  .access-card {
    padding: 24px;
  }

  .product-layout {
    display: block;
  }

  .product-sidebar {
    min-height: auto;
    padding: 20px 18px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .product-sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 2px;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .sidebar-bottom {
    display: none;
  }

  .product-main {
    min-height: auto;
    padding: 27px 18px 50px;
  }

  .workspace-topline {
    align-items: flex-start;
    margin-bottom: 32px;
  }

  .connected {
    display: none;
  }

  .page-heading {
    display: block;
  }

  .page-heading .primary {
    margin-top: 17px;
  }

  .metrics,
  .app-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .panel,
  .metric {
    padding: 18px;
  }

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

  .table-wrap th,
  .table-wrap td {
    padding: 12px 9px;
  }
}

@media (max-width: 460px) {
  .auth-switch {
    margin-bottom: 30px;
  }

  .auth-card h2 {
    font-size: 29px;
  }

  .access-card {
    padding: 20px;
  }

  .workspace-topline {
    display: block;
  }

  .page-heading h1 {
    font-size: 34px;
  }

  .license-meta {
    grid-template-columns: 1fr;
  }

  .notification {
    right: 15px;
    bottom: 15px;
    max-width: calc(100vw - 30px);
  }
}
