/* Sub2API compact global layer. Managed by Codex. */
html {
  font-size: 14px !important;
}

body,
button,
input,
select,
textarea {
  font-size: 0.875rem !important;
  line-height: 1.38 !important;
}

h1,
.text-4xl {
  font-size: 1.75rem !important;
  line-height: 2.05rem !important;
}

h2,
.text-3xl {
  font-size: 1.5rem !important;
  line-height: 1.85rem !important;
}

h3,
.text-2xl {
  font-size: 1.25rem !important;
  line-height: 1.6rem !important;
}

.text-xl {
  font-size: 1.08rem !important;
  line-height: 1.45rem !important;
}

.text-lg {
  font-size: 0.98rem !important;
  line-height: 1.35rem !important;
}

.text-base {
  font-size: 0.875rem !important;
  line-height: 1.3rem !important;
}

.text-sm {
  font-size: 0.8rem !important;
  line-height: 1.15rem !important;
}

.text-xs {
  font-size: 0.7rem !important;
  line-height: 1rem !important;
}

.btn,
button.btn,
a.btn {
  min-height: 2.25rem !important;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.85rem !important;
  line-height: 1.15rem !important;
  gap: 0.45rem !important;
}

.input,
input.input,
select.input,
textarea.input {
  min-height: 2.3rem !important;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
  font-size: 0.85rem !important;
  line-height: 1.2rem !important;
}

.input-label,
label {
  font-size: 0.8rem !important;
  line-height: 1.1rem !important;
}

.input-error-text,
.input-hint {
  font-size: 0.72rem !important;
  line-height: 1rem !important;
}

table th,
table td {
  padding: 0.45rem 0.65rem !important;
  font-size: 0.8rem !important;
  line-height: 1.15rem !important;
}

.table-container,
.overflow-x-auto {
  font-size: 0.82rem !important;
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 0.9rem 1rem !important;
}

.card,
.panel,
[class*="card"],
[class*="Card"],
[class*="panel"],
[class*="Panel"] {
  --compact-card-pad: 1rem;
}

.p-10 { padding: 1.6rem !important; }
.p-8 { padding: 1.25rem !important; }
.p-7 { padding: 1.15rem !important; }
.p-6 { padding: 1rem !important; }
.p-5 { padding: 0.85rem !important; }
.p-4 { padding: 0.75rem !important; }

.px-10 { padding-left: 1.6rem !important; padding-right: 1.6rem !important; }
.px-8 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 0.85rem !important; padding-right: 0.85rem !important; }
.px-4 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }

.py-8 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.py-6 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-5 { padding-top: 0.85rem !important; padding-bottom: 0.85rem !important; }
.py-4 { padding-top: 0.7rem !important; padding-bottom: 0.7rem !important; }
.py-3 { padding-top: 0.55rem !important; padding-bottom: 0.55rem !important; }

.gap-10 { gap: 1.5rem !important; }
.gap-8 { gap: 1.25rem !important; }
.gap-6 { gap: 1rem !important; }
.gap-5 { gap: 0.85rem !important; }
.gap-4 { gap: 0.7rem !important; }
.gap-3 { gap: 0.55rem !important; }

.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem !important; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem !important; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.85rem !important; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.7rem !important; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.55rem !important; }

.mt-10 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 1.25rem !important; }
.mt-6 { margin-top: 1rem !important; }
.mt-5 { margin-top: 0.85rem !important; }
.mt-4 { margin-top: 0.7rem !important; }
.mb-10 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 0.85rem !important; }
.mb-4 { margin-bottom: 0.7rem !important; }

.rounded-2xl,
.rounded-3xl {
  border-radius: 0.75rem !important;
}

.shadow-xl,
.shadow-2xl {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18) !important;
}

nav,
header,
aside {
  font-size: 0.84rem !important;
}

@media (max-width: 640px) {
  html { font-size: 13.5px !important; }
  .p-8,
  .p-6 { padding: 0.85rem !important; }
  .px-6,
  .px-8 { padding-left: 0.85rem !important; padding-right: 0.85rem !important; }
}

/* Keep the create-key group picker aligned with the admin group description layout. */
.select-dropdown-portal:has(.groupOptionItemBadge) {
  width: min(720px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-options {
  max-height: min(26rem, calc(100vh - 180px)) !important;
  padding: 0 !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-option {
  display: block !important;
  align-items: initial !important;
  white-space: normal !important;
  padding: 0.72rem 0.95rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-option:last-child {
  border-bottom: 0 !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-option > div {
  width: 100% !important;
  min-width: 0 !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-option > [data-v-fe1ef91f].flex {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 76px !important;
  align-items: start !important;
  gap: 1rem !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-option > [data-v-fe1ef91f].flex > [data-v-fe1ef91f].flex-1 {
  min-width: 0 !important;
  padding-top: 0 !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .groupOptionItemBadge {
  max-width: 100% !important;
  line-height: 1.25 !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .groupOptionItemBadge span.truncate {
  max-width: 100% !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .line-clamp-2 {
  display: block !important;
  max-width: 100% !important;
  margin-top: 0.42rem !important;
  overflow: visible !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: initial !important;
  line-height: 1.35 !important;
  white-space: pre-line !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .select-option > [data-v-fe1ef91f].flex > [data-v-fe1ef91f].shrink-0 {
  width: 76px !important;
  min-width: 76px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  justify-self: end !important;
  padding-top: 0 !important;
}

.select-dropdown-portal:has(.groupOptionItemBadge) .inline-flex.whitespace-nowrap.rounded-full {
  min-width: 66px !important;
  justify-content: center !important;
  padding: 0.28rem 0.55rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}

/* Match the existing-key group switcher dropdown to the create-key modal width. */
body > div.fixed:has(.groupOptionItemBadge):not(.select-dropdown-portal) {
  width: min(740px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 32px) !important;
}

body > div.fixed:has(.groupOptionItemBadge):not(.select-dropdown-portal) > div:last-child {
  max-height: min(26rem, calc(100vh - 180px)) !important;
  overflow-x: hidden !important;
}

body > div.fixed:has(.groupOptionItemBadge):not(.select-dropdown-portal) button {
  width: 100% !important;
  min-width: 0 !important;
}

body > div.fixed:has(.groupOptionItemBadge):not(.select-dropdown-portal) button > [data-v-fe1ef91f].flex {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 76px !important;
  align-items: start !important;
  gap: 1rem !important;
}

body > div.fixed:has(.groupOptionItemBadge):not(.select-dropdown-portal) .line-clamp-2 {
  display: block !important;
  overflow: visible !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: initial !important;
  white-space: pre-line !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

@media (max-width: 640px) {
  .select-dropdown-portal:has(.groupOptionItemBadge) {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  body > div.fixed:has(.groupOptionItemBadge):not(.select-dropdown-portal) {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

}

/* Keep embedded custom pages tall enough to expose the external product area. */
.custom-page-layout > .card:has(.custom-embed-shell) {
  overflow: visible !important;
}

.custom-page-layout .custom-embed-shell {
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100vh - 8rem) !important;
  overflow: visible !important;
}

.custom-page-layout .custom-embed-frame {
  display: block !important;
  width: 100% !important;
  height: 1000px !important;
  min-height: 1000px !important;
  flex: 0 0 auto !important;
  border: 0 !important;
}

@media (max-width: 640px) {
  .custom-page-layout .custom-embed-frame {
    height: 1100px !important;
    min-height: 1100px !important;
  }
}