/* Match Emporium apps/web dark product surface (Geist + oklch tokens). */
:root {
  color-scheme: dark;
  --background: oklch(0.115 0 0);
  --foreground: oklch(0.93 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.93 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.145 0 0);
  --secondary: oklch(0.22 0 0);
  --secondary-foreground: oklch(0.93 0 0);
  --muted: oklch(0.2 0 0);
  --muted-foreground: oklch(0.65 0 0);
  --accent: oklch(0.22 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 9%);
  --input: oklch(1 0 0 / 13%);
  --ring: oklch(0.65 0 0);
  --popover: oklch(0.16 0 0);
  --popover-foreground: oklch(0.93 0 0);
  --ok: oklch(0.72 0.17 145);
  --warn: oklch(0.82 0.14 85);
  --info: oklch(0.72 0.12 245);
  --radius: 0.625rem;
  --font-sans: "Geist Variable", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  --max: 86rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
  line-height: 1.5;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) * 0.8);
  background: var(--background);
  border: 1px solid var(--border);
}
.skip:focus {
  left: 0.5rem;
}

.shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Header — sticky glass bar like apps/web SiteHeader */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 3.5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .site-header-inner {
    padding: 0 1.5rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0;
  min-width: 0;
}

.brand-mark {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
  filter: drop-shadow(0 0.35rem 0.65rem color-mix(in oklch, #7e14ff 25%, transparent));
  flex-shrink: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  min-width: 0;
}

.brand-text {
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.brand-muted {
  color: var(--muted-foreground);
  font-weight: 520;
  letter-spacing: -0.02em;
}

.app-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-nav:empty {
  display: none;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.app-nav-link {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: calc(var(--radius) * 0.8);
  color: var(--muted-foreground);
  font-size: 0.84rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link[data-state="active"] {
  color: var(--foreground);
  background: var(--accent);
}

.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.header-nav .email {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-wrap {
  position: relative;
}

.notification-wrap {
  position: relative;
}

.notification-btn {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.9);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.notification-btn:hover,
.notification-btn[aria-expanded="true"] {
  background: var(--accent);
}

.notification-btn:focus-visible,
.notification-item:focus-visible,
.notification-footer:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--ring) 70%, transparent);
  outline-offset: 2px;
}

.notification-icon {
  position: relative;
  width: 0.78rem;
  height: 0.83rem;
  margin-top: 0.1rem;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 0.52rem 0.52rem 0.2rem 0.2rem;
}

.notification-icon::before {
  content: "";
  position: absolute;
  left: -0.17rem;
  right: -0.17rem;
  bottom: -0.19rem;
  border-top: 1.5px solid currentColor;
}

.notification-icon::after {
  content: "";
  position: absolute;
  width: 0.2rem;
  height: 0.2rem;
  left: calc(50% - 0.1rem);
  bottom: -0.35rem;
  border-radius: 999px;
  background: currentColor;
}

.notification-count {
  position: absolute;
  top: -0.32rem;
  right: -0.32rem;
  min-width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.2rem;
  border: 2px solid var(--background);
  border-radius: 999px;
  background: var(--destructive);
  color: white;
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 70;
  width: min(22rem, calc(100vw - 2rem));
  overflow: hidden;
  border-radius: calc(var(--radius) * 1.05);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--foreground) 12%, transparent),
    0 18px 45px oklch(0 0 0 / 45%);
}

.notification-menu[hidden] {
  display: none;
}

.notification-menu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.notification-menu-head strong {
  font-size: 0.86rem;
  font-weight: 650;
}

.notification-menu-head span,
.notification-item small,
.notification-empty {
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.notification-list {
  display: grid;
  max-height: 20rem;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  color: inherit;
  text-decoration: none;
}

.notification-item:hover {
  background: var(--accent);
}

.notification-item > span:last-child {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

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

.notification-item strong {
  font-size: 0.8rem;
  font-weight: 600;
}

.notification-severity {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.32rem;
  border-radius: 999px;
}

.notification-critical {
  background: var(--destructive);
}

.notification-warning {
  background: var(--warn);
}

.notification-empty {
  margin: 0;
  padding: 1rem 0.75rem;
}

.notification-footer {
  display: block;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.notification-footer:hover {
  background: var(--accent);
}

.account-btn {
  appearance: none;
  min-height: 2.25rem;
  max-width: 18rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: calc(var(--radius) * 0.9);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
}

.account-btn:hover,
.account-btn[aria-expanded="true"] {
  background: var(--accent);
}

.account-avatar {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: calc(var(--radius) * 0.75);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.account-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.account-chevron {
  width: 0.42rem;
  height: 0.42rem;
  margin-top: -0.18rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.account-btn[aria-expanded="true"] .account-chevron {
  margin-top: 0.18rem;
  transform: rotate(225deg);
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 70;
  width: min(17rem, calc(100vw - 2rem));
  padding: 0.35rem;
  border-radius: calc(var(--radius) * 1.05);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--foreground) 12%, transparent),
    0 18px 45px oklch(0 0 0 / 45%);
}

.account-menu[hidden] {
  display: none;
}

.account-menu-head {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.account-menu-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
}

.account-menu-head span {
  color: var(--muted-foreground);
  font-size: 0.74rem;
}

.account-menu-item {
  width: 100%;
  min-height: 2.15rem;
  display: flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 0;
  border-radius: calc(var(--radius) * 0.75);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: var(--accent);
  outline: 0;
}

.account-menu-danger {
  color: color-mix(in oklch, var(--destructive) 85%, var(--foreground));
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

@media (min-width: 640px) {
  .site-main {
    padding: 2.5rem 1.5rem 3.5rem;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 3.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .site-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted-foreground);
}
.footer-links a:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Typography */
.page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.page-desc {
  margin: 0.35rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 36rem;
}

/* Buttons */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  border-radius: calc(var(--radius) * 0.8);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(0.96);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: transparent;
}
.btn-secondary:hover:not(:disabled) {
  background: oklch(0.26 0 0);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
  box-shadow: inset 0 0 0 0 transparent;
}
.btn-outline:hover:not(:disabled) {
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--foreground);
  background: var(--accent);
}

.btn-sm {
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.8125rem;
}

.btn-lg {
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
}

.btn-block {
  width: 100%;
}

/* Cards — ring-1 ring-foreground/10 like shadcn Card */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border-radius: calc(var(--radius) * 1.4);
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--foreground) 10%, transparent);
  overflow: hidden;
}

.card-header {
  padding: 1.15rem 1.25rem 0.35rem;
  display: grid;
  gap: 0.35rem;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.card-desc {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.5;
}

.card-body {
  padding: 1rem 1.25rem 1.15rem;
}

.card-footer {
  padding: 0 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Forms */
.field {
  display: grid;
  gap: 0.4rem;
}

.field + .field {
  margin-top: 0.9rem;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.field-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.45;
}

.input,
.select {
  width: 100%;
  min-height: 2.25rem;
  border-radius: calc(var(--radius) * 0.8);
  border: 1px solid var(--input);
  background: transparent;
  color: var(--foreground);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.875rem;
}

.input:focus,
.select:focus {
  outline: 2px solid color-mix(in oklch, var(--ring) 55%, transparent);
  outline-offset: 0;
  border-color: var(--ring);
}

.input:disabled,
.select:disabled {
  opacity: 0.55;
}

.field-error {
  margin: 0;
  color: var(--destructive);
  font-size: 0.8125rem;
}

/* Layout helpers */
.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.auth-wrap {
  max-width: 26.25rem;
  margin: 0 auto;
  min-height: calc(100svh - 13rem);
  display: flex;
  align-items: center;
}

.auth-wrap .card {
  width: 100%;
}

/* Dashboard */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: start;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.stat {
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
}

.stat-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.stat-value {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0;
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.9rem 1rem;
  border-radius: calc(var(--radius) * 1.1);
  background: color-mix(in oklch, var(--warn) 8%, var(--card));
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--warn) 28%, var(--border));
  margin-bottom: 1rem;
}

.banner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.45;
  max-width: 40rem;
}

.banner strong {
  color: var(--foreground);
  font-weight: 600;
}

.shop-list {
  display: grid;
  gap: 0.65rem;
}

.shop {
  padding: 1rem 1.05rem;
  border-radius: calc(var(--radius) * 1.1);
  background: color-mix(in oklch, var(--background) 55%, var(--card));
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--foreground) 8%, transparent);
}

.shop-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.shop-host {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-decoration: none;
  word-break: break-all;
}
.shop-host:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.shop-meta {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.shop-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.12rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.badge-live {
  color: var(--ok);
  border-color: color-mix(in oklch, var(--ok) 35%, var(--border));
}
.badge-provisioning {
  color: var(--warn);
  border-color: color-mix(in oklch, var(--warn) 35%, var(--border));
}
.badge-failed {
  color: var(--destructive);
  border-color: color-mix(in oklch, var(--destructive) 35%, var(--border));
}

.empty {
  padding: 1.5rem 1.1rem;
  border-radius: calc(var(--radius) * 1.1);
  border: 1px dashed var(--border);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: center;
}

.muted-link {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.inline-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(28rem, calc(100% - 2rem));
  padding: 0.7rem 1rem;
  border-radius: calc(var(--radius) * 0.9);
  background: var(--card);
  color: var(--foreground);
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--foreground) 12%, transparent),
    0 12px 40px oklch(0 0 0 / 35%);
  font-size: 0.875rem;
}

.toast[data-kind="error"] {
  color: var(--destructive);
}

.spin {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid color-mix(in oklch, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84em;
}

/* Built-out Cloud console */
.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.head-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

.dashboard-content {
  display: grid;
  gap: 1.25rem;
}

.projects-page {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
}

.project-page-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.project-page-heading {
  min-width: 0;
  display: grid;
  gap: 0.48rem;
}

.project-title-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.project-count {
  min-width: 1.45rem;
  height: 1.45rem;
  display: inline-grid;
  place-items: center;
  padding-inline: 0.42rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  font-weight: 650;
}

.projects-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem 0.9rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.projects-summary-stat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.projects-summary-stat + .projects-summary-stat::before {
  content: "";
  width: 0.2rem;
  height: 0.2rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: color-mix(in oklch, var(--muted-foreground) 55%, transparent);
}

.projects-summary-stat strong {
  color: var(--foreground);
  font-weight: 620;
}

.projects-summary-attention {
  color: var(--destructive);
}

.projects-summary-attention:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.projects-summary-clear {
  color: var(--ok);
}

.console-stack {
  display: grid;
  gap: 1.4rem;
}

.console-section {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
}

.section-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
}

.section-strip strong {
  color: var(--foreground);
  font-size: 0.82rem;
}

.project-list {
  min-width: 0;
  display: grid;
  gap: 0.75rem;
  container-name: projects-list;
  container-type: inline-size;
}

.project-list > .empty {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.2);
  background: color-mix(in oklch, var(--card) 84%, var(--background));
}

.admin-list {
  min-width: 0;
  border-top: 1px solid var(--border);
}

.project-row,
.admin-row {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 0;
}

.admin-row {
  border-bottom: 1px solid var(--border);
}

.project-row {
  grid-template-columns: minmax(12rem, 0.78fr) minmax(14rem, 1fr) auto;
  grid-template-areas:
    "identity state actions"
    "metrics metrics metrics";
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.2);
  background: color-mix(in oklch, var(--card) 84%, var(--background));
  overflow: clip;
  transition: border-color 160ms ease, background 160ms ease;
}

.project-row:hover {
  border-color: color-mix(in oklch, var(--foreground) 15%, var(--border));
  background: color-mix(in oklch, var(--card) 92%, var(--background));
}

.admin-customer-row {
  grid-template-columns: minmax(18rem, 1.5fr) minmax(7rem, 0.55fr) minmax(7rem, 0.55fr) minmax(10rem, 0.75fr);
}

.admin-project-row {
  grid-template-columns:
    minmax(16rem, 1.2fr)
    minmax(16rem, 1.2fr)
    minmax(7rem, 0.55fr)
    minmax(8rem, 0.6fr)
    minmax(8rem, 0.6fr)
    minmax(8rem, 0.6fr);
}

.admin-request-row {
  grid-template-columns:
    minmax(17rem, 1.4fr)
    minmax(10rem, 0.85fr)
    minmax(7rem, 0.55fr)
    minmax(7rem, 0.55fr)
    minmax(10rem, 0.75fr);
}

.admin-cell-row {
  grid-template-columns:
    minmax(14rem, 1.1fr)
    minmax(8rem, 0.7fr)
    minmax(8rem, 0.65fr)
    minmax(6rem, 0.45fr)
    minmax(6rem, 0.45fr)
    minmax(6rem, 0.45fr);
}

.project-row-head,
.admin-row-head {
  min-height: 2.3rem;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.project-cell,
.admin-cell,
.project-row-head > div,
.admin-row-head > div {
  min-width: 0;
  padding: 0.7rem 0.75rem;
}

.project-cell,
.admin-cell {
  display: grid;
  gap: 0.14rem;
  color: var(--foreground);
  font-size: 0.84rem;
  line-height: 1.35;
}

.project-cell:first-child,
.admin-cell:first-child,
.project-row-head > div:first-child,
.admin-row-head > div:first-child {
  padding-left: 0;
}

.project-cell strong,
.admin-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 600;
}

.project-cell > span,
.admin-cell > span,
.project-subtle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.project-cell > .shop-runtime.shop-health-ok {
  color: var(--ok);
}

.project-cell > .shop-runtime.shop-health-warn {
  color: var(--warn);
}

.project-cell > .shop-runtime.shop-health-danger {
  color: var(--destructive);
}

.project-error {
  margin-top: 0.25rem;
}

.project-identity,
.project-state,
.project-metrics,
.project-actions-cell {
  min-width: 0;
  padding: 1rem;
}

.project-identity {
  grid-area: identity;
  display: flex;
  align-items: center;
  padding-left: 1.1rem;
}

.project-identity::before {
  content: "";
  width: 0.3rem;
  align-self: stretch;
  margin-right: 0.8rem;
  border-radius: 999px;
  background: var(--muted-foreground);
  box-shadow: 0 0 1rem color-mix(in oklch, var(--muted-foreground) 24%, transparent);
}

.project-row[data-tone="healthy"] .project-identity::before {
  background: var(--ok);
  box-shadow: 0 0 1rem color-mix(in oklch, var(--ok) 32%, transparent);
}

.project-row[data-tone="warning"] .project-identity::before {
  background: var(--warn);
  box-shadow: 0 0 1rem color-mix(in oklch, var(--warn) 28%, transparent);
}

.project-row[data-tone="critical"] .project-identity::before {
  background: var(--destructive);
  box-shadow: 0 0 1rem color-mix(in oklch, var(--destructive) 32%, transparent);
}

.project-state,
.project-actions-cell {
  border-left: 1px solid var(--border);
}

.project-state {
  grid-area: state;
  display: grid;
  align-content: center;
  gap: 0.42rem;
}

.project-state-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.project-state-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.4;
}

.project-state-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.65rem;
}

.project-state-link {
  color: var(--foreground);
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.project-state-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.project-state-alert {
  color: var(--destructive);
}

.project-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 0;
  padding: 0.72rem 0;
  border-top: 1px solid var(--border);
}

.project-metric {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 0.16rem;
  padding: 0.25rem 0.9rem;
}

.project-metric + .project-metric {
  border-left: 1px solid var(--border);
}

.project-metric > span {
  color: var(--muted-foreground);
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-metric strong {
  color: var(--foreground);
  font-size: 0.84rem;
  font-weight: 630;
  line-height: 1.3;
}

.project-metric small {
  color: var(--muted-foreground);
  font-size: 0.71rem;
  line-height: 1.35;
}

.project-metric .shop-health-danger {
  color: var(--destructive);
}

.project-metric .shop-health-warn {
  color: var(--warn);
}

.project-metric .shop-health-ok {
  color: var(--ok);
}

.project-metric .shop-health-muted {
  color: var(--muted-foreground);
}

.project-actions-cell {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  justify-content: end;
  gap: 0.38rem;
  white-space: nowrap;
}

.project-action-short {
  display: none;
}

.billing-list,
.support-list,
.support-shop-list {
  border-top: 1px solid var(--border);
}

.billing-row,
.support-row,
.support-shop-row {
  min-width: 0;
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.billing-row,
.support-shop-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.billing-shop {
  min-width: 0;
}

.billing-actions,
.support-shop-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.inline-badge {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: calc(var(--radius) * 0.75);
  border: 1px solid color-mix(in oklch, var(--warn) 35%, var(--border));
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.billing-page {
  width: 100%;
  max-width: 72rem;
  min-width: 0;
  display: grid;
  gap: 1.65rem;
  margin-inline: auto;
}

.billing-page-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.billing-page-head > div,
.billing-page-head .page-title {
  min-width: 0;
}

.billing-page-head .page-subtitle {
  margin-bottom: 0;
}

.billing-ledger {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(20rem, 0.82fr) minmax(0, 1.18fr);
  border: 1px solid color-mix(in oklch, var(--foreground) 12%, transparent);
  border-radius: calc(var(--radius) * 1.35);
  background:
    radial-gradient(circle at 0 0, color-mix(in oklch, var(--info) 10%, transparent), transparent 42%),
    var(--card);
  box-shadow: 0 1px 0 color-mix(in oklch, var(--foreground) 3%, transparent);
  overflow: clip;
}

.billing-ledger-total {
  min-width: 0;
  padding: clamp(1.25rem, 2.8vw, 1.9rem);
  border-right: 1px solid var(--border);
}

.billing-ledger-amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-top: 0.28rem;
}

.billing-ledger-amount strong {
  font-size: clamp(2.15rem, 4.6vw, 3.2rem);
  font-weight: 580;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.billing-ledger-amount span {
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.billing-ledger-description {
  margin: 0.8rem 0 0;
  color: var(--foreground);
  font-size: 0.86rem;
  font-weight: 560;
}

.billing-ledger-disclosure {
  max-width: 32rem;
  margin: 0.48rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.74rem;
  line-height: 1.48;
}

.billing-ledger-signals {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-signal {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem;
  border-left: 1px solid var(--border);
}

.billing-signal:first-child {
  border-left: 0;
}

.billing-signal > span,
.billing-project-label,
.billing-project-rate > span {
  color: var(--muted-foreground);
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.billing-signal strong {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 630;
  line-height: 1.35;
}

.billing-signal small {
  color: var(--muted-foreground);
  font-size: 0.7rem;
  line-height: 1.42;
}

.billing-project-section,
.billing-catalog {
  min-width: 0;
  display: grid;
  gap: 0.85rem;
}

.billing-section-head,
.billing-catalog-head {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
}

.billing-section-head h2,
.billing-catalog h2,
.billing-plan-detail h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 670;
  letter-spacing: -0.02em;
}

.billing-section-head p,
.billing-catalog-head > div:first-child > p:last-child {
  margin: 0.3rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.77rem;
  line-height: 1.45;
}

.billing-section-count {
  min-width: 1.65rem;
  height: 1.65rem;
  display: inline-grid;
  place-items: center;
  padding-inline: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  font-weight: 680;
}

.billing-project-list {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
  container: billing-projects / inline-size;
}

.billing-project {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.2);
  background: var(--card);
  box-shadow: 0 1px 0 color-mix(in oklch, var(--foreground) 3%, transparent);
}

.billing-project.is-selected {
  border-color: color-mix(in oklch, var(--info) 42%, var(--border));
  box-shadow: inset 3px 0 0 color-mix(in oklch, var(--info) 70%, transparent);
}

.billing-project-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.95fr) minmax(9rem, 0.45fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
}

.billing-project-identity,
.billing-project-usage,
.billing-project-rate {
  min-width: 0;
}

.billing-project-heading {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.billing-project-heading .shop-host {
  min-width: 0;
  overflow-wrap: anywhere;
}

.billing-project-status {
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.42rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 0.62rem;
  font-weight: 680;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.billing-project-status-pending {
  border-color: color-mix(in oklch, var(--warn) 42%, var(--border));
  color: var(--warn);
}

.billing-project-usage {
  display: grid;
  gap: 0.22rem;
  padding: 0.7rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.85);
  background: color-mix(in oklch, var(--background) 42%, var(--card));
}

.billing-project-usage > div {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
}

.billing-project-usage strong {
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 620;
  line-height: 1.35;
}

.billing-project-usage small {
  color: var(--muted-foreground);
  font-size: 0.68rem;
  line-height: 1.4;
}

.billing-usage-dot {
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  margin-top: 0.28rem;
  border-radius: 999px;
  background: var(--ok);
}

.billing-usage-pending .billing-usage-dot {
  background: var(--muted-foreground);
}

.billing-usage-warning .billing-usage-dot {
  background: var(--warn);
}

.billing-usage-critical .billing-usage-dot {
  background: var(--destructive);
}

.billing-project-rate {
  display: grid;
  justify-items: end;
  gap: 0.14rem;
  text-align: right;
}

.billing-project-rate > strong {
  font-size: 1.15rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.billing-project-rate small {
  color: var(--muted-foreground);
  font-size: 0.66rem;
}

.billing-project-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.68rem 0.75rem 0.68rem 1.05rem;
  border-top: 1px solid var(--border);
  background: color-mix(in oklch, var(--accent) 26%, transparent);
}

.billing-project-note {
  min-width: 0;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  line-height: 1.4;
}

.billing-request {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
}

.billing-request-mark {
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  margin-top: 0.36rem;
  border-radius: 999px;
  background: var(--warn);
}

.billing-request p {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.68rem;
  line-height: 1.38;
}

.billing-request strong {
  color: var(--foreground);
  font-weight: 620;
}

.billing-project-actions {
  flex: 0 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.38rem;
}

.billing-action-short {
  display: none;
}

.billing-policy-note {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.85);
  background: color-mix(in oklch, var(--accent) 36%, var(--card));
}

.billing-policy-note > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.billing-policy-note p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.71rem;
  line-height: 1.42;
}

.billing-policy-note strong {
  color: var(--foreground);
  font-weight: 620;
}

.billing-policy-note > a {
  flex: 0 0 auto;
  color: var(--foreground);
  font-size: 0.71rem;
  font-weight: 620;
  text-decoration: none;
}

.billing-policy-note > a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.billing-policy-mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--info) 38%, var(--border));
  border-radius: 999px;
  color: var(--info);
  font-size: 0.68rem;
  font-weight: 750;
}

.billing-empty,
.billing-pricing-error {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) * 1.05);
}

.billing-empty p,
.billing-pricing-error p {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.74rem;
  line-height: 1.45;
}

.billing-catalog {
  padding-top: 0.2rem;
}

.billing-catalog-controls {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.55rem;
}

.billing-project-context,
.billing-shop-select {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.billing-project-context {
  max-width: 15rem;
}

.billing-project-context span,
.billing-shop-select > span {
  color: var(--muted-foreground);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.billing-project-context strong {
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-shop-select select {
  max-width: 15rem;
  min-height: 2.15rem;
  padding: 0.3rem 1.9rem 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.75);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 0.74rem;
}

.billing-period-switch {
  display: inline-flex;
  gap: 0.16rem;
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.85);
  background: var(--card);
}

.billing-period-option {
  min-height: 1.8rem;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: calc(var(--radius) * 0.62);
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 620;
  text-decoration: none;
}

.billing-period-option:hover,
.billing-period-option[aria-current="true"] {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.billing-plan-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.billing-plan-card {
  min-width: 0;
  min-height: 10.5rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.72rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.05);
  background: color-mix(in oklch, var(--background) 34%, var(--card));
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.billing-plan-card:hover {
  border-color: color-mix(in oklch, var(--foreground) 24%, var(--border));
  background: var(--accent);
  transform: translateY(-1px);
}

.billing-plan-card[aria-current="true"] {
  border-color: color-mix(in oklch, var(--info) 68%, var(--border));
  background: color-mix(in oklch, var(--info) 7%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--info) 22%, transparent);
}

.billing-plan-card-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.billing-plan-card-head > span:first-child {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.billing-plan-card-head strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-plan-card-head small,
.billing-plan-price small {
  color: var(--muted-foreground);
  font-size: 0.63rem;
  line-height: 1.35;
}

.billing-plan-current {
  min-height: 1.2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.03rem 0.35rem;
  border-radius: 999px;
  background: color-mix(in oklch, var(--info) 15%, transparent);
  color: var(--info);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
}

.billing-plan-price {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.billing-plan-price > strong {
  font-size: 1.05rem;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.billing-plan-card-limits {
  display: grid;
  align-content: start;
  gap: 0.28rem;
  color: var(--muted-foreground);
  font-size: 0.66rem;
}

.billing-plan-card-limits > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.billing-plan-card-limits strong {
  color: var(--foreground);
  font-size: 0.68rem;
  font-weight: 620;
  text-align: right;
}

.billing-plan-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--foreground);
  font-size: 0.66rem;
  font-weight: 620;
}

.billing-plan-detail {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in oklch, var(--info) 28%, var(--border));
  border-radius: calc(var(--radius) * 1.05);
  background: color-mix(in oklch, var(--info) 4%, var(--card));
}

.billing-plan-detail-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.billing-plan-detail-head > div:first-child {
  min-width: 0;
}

.billing-plan-detail-head > div:first-child > p:last-child {
  max-width: 42rem;
  margin: 0.35rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.45;
}

.billing-plan-detail-rate {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 0.12rem;
  text-align: right;
}

.billing-plan-detail-rate span {
  color: var(--muted-foreground);
  font-size: 0.64rem;
}

.billing-plan-detail-rate strong {
  font-size: 1.1rem;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}

.billing-plan-detail-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(13rem, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.billing-plan-detail-body > div {
  min-width: 0;
}

.billing-plan-detail-body h3 {
  margin: 0 0 0.42rem;
  color: var(--muted-foreground);
  font-size: 0.65rem;
  font-weight: 670;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.billing-plan-detail-body .feature-list {
  gap: 0.34rem;
  margin: 0;
}

.billing-plan-detail-body .feature-list li {
  font-size: 0.73rem;
}

.billing-plan-detail-body .limit-pills {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
}

.billing-plan-detail-body .limit-pill {
  min-width: 0;
  padding: 0.48rem;
  background: var(--card);
}

.billing-plan-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.billing-plan-limits {
  min-width: 0;
  border-top: 1px solid var(--border);
}

.billing-plan-limits > summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0 0;
  cursor: pointer;
  list-style: none;
}

.billing-plan-limits > summary::-webkit-details-marker {
  display: none;
}

.billing-plan-limits > summary > span:first-child {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.billing-plan-limits > summary strong {
  font-size: 0.74rem;
  font-weight: 630;
}

.billing-plan-limits > summary small {
  color: var(--muted-foreground);
  font-size: 0.66rem;
}

.billing-plan-limits > summary > span:last-child {
  color: var(--muted-foreground);
  font-size: 1rem;
  transition: transform 140ms ease;
}

.billing-plan-limits[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.billing-plan-limits .plan-limit-table {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding-top: 0.75rem;
}

.billing-plan-limits .plan-limit-table div {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.7);
  background: var(--card);
}

.billing-plan-limits .plan-limit-table span {
  color: var(--muted-foreground);
  font-size: 0.64rem;
}

.billing-plan-limits .plan-limit-table strong {
  overflow-wrap: anywhere;
  font-size: 0.74rem;
  font-weight: 630;
}

.billing-usage:focus-visible,
.billing-period-option:focus-visible,
.billing-plan-card:focus-visible,
.billing-plan-limits > summary:focus-visible,
.billing-shop-select select:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--ring) 72%, transparent);
  outline-offset: 2px;
}

.billing-skeleton-kicker {
  width: 5.5rem;
  height: 0.65rem;
  border-radius: 999px;
}

.billing-skeleton-amount {
  width: 8rem;
  height: 2.8rem;
  margin-top: 0.45rem;
  border-radius: calc(var(--radius) * 0.6);
}

.billing-skeleton-copy {
  width: min(12rem, 72%);
  height: 0.68rem;
  margin-top: 0.45rem;
  border-radius: 999px;
}

.billing-skeleton-copy-wide {
  width: min(24rem, 92%);
}

.billing-skeleton-heading {
  width: min(12rem, 72%);
  height: 1rem;
  border-radius: calc(var(--radius) * 0.5);
}

.billing-skeleton-amount-small {
  width: 5rem;
  height: 1.25rem;
  justify-self: end;
  border-radius: calc(var(--radius) * 0.5);
}

.billing-skeleton-actions {
  width: 16rem;
  max-width: 100%;
  height: 1.8rem;
  border-radius: calc(var(--radius) * 0.65);
}

.billing-skeleton-toggle {
  width: 8rem;
  height: 2.15rem;
  border-radius: calc(var(--radius) * 0.75);
}

.billing-project-skeleton .billing-project-summary .skeleton-block {
  width: 100%;
  height: 3.8rem;
  border-radius: calc(var(--radius) * 0.8);
}

.billing-plan-card-skeleton {
  min-height: 10.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.05);
}

.billing-plan-detail-skeleton {
  width: 100%;
  min-height: 13rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.05);
}

.support-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.support-row:hover span,
.support-row:hover strong {
  color: var(--foreground);
}

.support-row span {
  color: var(--foreground);
  font-weight: 600;
}

.support-row strong {
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 500;
}

.summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: -0.35rem 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.summary-line > :not(:first-child)::before {
  content: "/";
  margin-right: 0.85rem;
  color: color-mix(in oklch, var(--muted-foreground) 45%, transparent);
}

.summary-attention {
  color: inherit;
  text-decoration: none;
}

.summary-attention:hover {
  color: var(--foreground);
}

.page-subtitle {
  max-width: 46rem;
  margin: 0.35rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.attention-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  margin: -0.35rem 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.attention-counter {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.15rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 650;
}

.attention-counter.attention-critical {
  border-color: color-mix(in oklch, var(--destructive) 35%, var(--border));
  color: var(--destructive);
}

.attention-counter.attention-warning {
  border-color: color-mix(in oklch, var(--warn) 35%, var(--border));
  color: var(--warn);
}

.attention-list,
.usage-stack {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.attention-item {
  display: grid;
  grid-template-columns: 0.22rem minmax(0, 1fr) auto;
  gap: 0.95rem;
  align-items: center;
  min-width: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.attention-item:focus-visible,
.attention-item.is-selected {
  outline: 2px solid color-mix(in oklch, var(--ring) 58%, transparent);
  outline-offset: -2px;
}

.attention-indicator {
  align-self: stretch;
  min-height: 2.75rem;
  border-radius: 999px;
  background: var(--warn);
}

.attention-critical .attention-indicator {
  background: var(--destructive);
}

.attention-content {
  min-width: 0;
}

.attention-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.attention-shop {
  margin: 0 0 0.12rem;
  color: var(--muted-foreground);
  font-size: 0.76rem;
}

.attention-heading h2 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 620;
  line-height: 1.35;
}

.attention-content > p {
  max-width: 52rem;
  margin: 0.35rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  line-height: 1.45;
}

.attention-actions {
  display: flex;
  justify-content: flex-end;
}

.attention-empty {
  display: grid;
  justify-items: start;
  gap: 0.55rem;
  padding: 1.25rem 0;
}

.attention-empty span {
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.usage-shop {
  display: grid;
  gap: 0.9rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.usage-shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.usage-shop-state {
  display: grid;
  justify-items: end;
  gap: 0.16rem;
  text-align: right;
}

.quota-grid-page {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.25rem;
}

.usage-metric.is-selected {
  margin: 0 -0.45rem;
  padding: 0 0.45rem;
  border-radius: calc(var(--radius) * 0.9);
  background: color-mix(in oklch, var(--warn) 8%, transparent);
}

.usage-shop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-grid-expanded {
  grid-template-columns: minmax(20rem, 0.75fr) minmax(0, 1.25fr);
  gap: 1.15rem;
}

.plan-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.plan-option,
.upgrade-plan-option,
.interval-option,
.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
}

.plan-option {
  min-height: 4.15rem;
  padding: 0.75rem;
  border-radius: calc(var(--radius) * 1.1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.plan-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.plan-option:not(:disabled):hover,
.upgrade-plan-option:hover,
.interval-option:hover {
  background: var(--accent);
}

.plan-option[data-state="selected"],
.upgrade-plan-option[data-state="selected"],
.interval-option[data-state="selected"] {
  border-color: color-mix(in oklch, var(--primary) 60%, var(--border));
  background: color-mix(in oklch, var(--primary) 8%, var(--card));
}

.plan-option strong,
.upgrade-plan-option strong {
  display: block;
  font-size: 0.92rem;
}

.plan-option small,
.upgrade-plan-option small {
  color: var(--muted-foreground);
  font-size: 0.76rem;
}

.plan-option-check {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.plan-option[data-state="selected"] .plan-option-check {
  background: var(--primary);
  box-shadow: inset 0 0 0 3px var(--card);
}

.selected-plan-detail {
  margin-top: 0.2rem;
  display: grid;
  gap: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.selected-plan-head,
.quota-row-head,
.section-head,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.selected-plan-head h3,
.upgrade-detail h3,
.section-head h2,
.section-head h3,
.modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.selected-plan-head p,
.upgrade-detail p,
.section-head p,
.modal-header p {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.83rem;
  line-height: 1.45;
}

.plan-price {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
  min-width: max-content;
}

.plan-price strong {
  font-size: 1rem;
  line-height: 1.2;
}

.plan-price span {
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.limit-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.limit-pill {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.limit-pill span,
.plan-limit-table span {
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.limit-pill strong,
.plan-limit-table strong {
  font-size: 0.86rem;
  font-weight: 600;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.feature-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  line-height: 1.4;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--ok);
}

.shop-panel {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
}

.section-head {
  align-items: flex-end;
}

.shop-list {
  gap: 0;
  border-top: 1px solid var(--border);
}

.shop-row {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 0.65rem;
}

.shop-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
}

.shop-identity {
  min-width: 0;
}

.shop-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.shop-health {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.shop-health-ok {
  color: var(--ok);
}

.shop-health-warn {
  color: var(--warn);
}

.shop-health-danger {
  color: var(--destructive);
}

.shop-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.badge-outline {
  color: var(--muted-foreground);
  border-color: var(--border);
}

.shop-error {
  padding: 0.65rem 0.75rem;
  border-radius: calc(var(--radius) * 0.9);
  background: color-mix(in oklch, var(--destructive) 9%, var(--card));
  border: 1px solid color-mix(in oklch, var(--destructive) 25%, var(--border));
}

.inline-status,
.quota-section,
.upgrade-detail {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.inline-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  color: var(--warn);
  padding: 0.65rem 0 0.65rem 0.75rem;
  border-left: 2px solid var(--warn);
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.inline-status span {
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.quota-section {
  display: grid;
  gap: 0.8rem;
}

.quota-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.quota-toolbar > span:first-child {
  color: var(--foreground);
  font-weight: 600;
}

.quota-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.quota-row {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--border);
}

.quota-row-head {
  gap: 0.75rem;
}

.quota-name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.quota-desc {
  margin: 0.1rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.74rem;
  line-height: 1.35;
}

.quota-numbers {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
  text-align: right;
  min-width: max-content;
}

.quota-numbers strong {
  font-size: 0.82rem;
  font-weight: 600;
}

.quota-numbers span {
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.quota-track {
  height: 0.42rem;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}

.quota-track span {
  display: block;
  height: 100%;
  min-width: 0.25rem;
  border-radius: inherit;
  background: var(--ok);
}

.quota-warning .quota-track span,
.quota-limit .quota-track span {
  background: var(--warn);
}

.quota-critical .quota-track span,
.quota-exceeded .quota-track span {
  background: var(--destructive);
}

.quota-unlimited .quota-track span {
  background: var(--info);
}

.plan-catalog {
  margin-top: 1.35rem;
  display: grid;
  gap: 0.8rem;
}

.catalog-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.catalog-scroll:focus-visible {
  outline: 2px solid color-mix(in oklch, var(--ring) 55%, transparent);
  outline-offset: 0.2rem;
}

.catalog-matrix {
  min-width: 66rem;
  display: grid;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(15rem, 1.15fr) repeat(5, minmax(9.5rem, 1fr));
  border-bottom: 1px solid var(--border);
}

.catalog-row > div {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border-left: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.4;
}

.catalog-row > div:first-child {
  border-left: 0;
}

.catalog-row-head {
  position: sticky;
  top: 3.5rem;
  z-index: 2;
  background: var(--background);
}

.catalog-row-head > div {
  font-weight: 600;
}

.catalog-row strong {
  display: block;
  font-weight: 600;
}

.catalog-row span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted-foreground);
  font-size: 0.74rem;
}

.catalog-row-features > div:not(:first-child) {
  color: var(--muted-foreground);
}

.plan-limit-table {
  display: grid;
  gap: 0.38rem;
}

.plan-limit-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.38rem;
  border-bottom: 1px solid var(--border);
}

.plan-limit-table div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: oklch(0 0 0 / 58%);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(42rem, 100%);
  max-height: min(48rem, calc(100svh - 2rem));
  overflow: auto;
  border-radius: calc(var(--radius) * 1.4);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow:
    0 0 0 1px color-mix(in oklch, var(--foreground) 12%, transparent),
    0 24px 80px oklch(0 0 0 / 55%);
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.limits-modal {
  width: min(54rem, 100%);
  max-height: min(44rem, calc(100svh - 2rem));
  overflow: clip;
}

.dialog-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.2rem;
  gap: 0.2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.95);
  background: color-mix(in oklch, var(--background) 45%, var(--popover));
}

.dialog-tabs button {
  min-height: 2rem;
  padding: 0.3rem 0.8rem;
  border: 0;
  border-radius: calc(var(--radius) * 0.7);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.dialog-tabs button[data-state="selected"] {
  background: var(--popover);
  color: var(--foreground);
  box-shadow: 0 1px 2px oklch(0 0 0 / 15%);
}

.dialog-tabs button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.limits-dialog-content {
  min-height: 0;
}

.limits-overview,
.limits-upgrade-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.72rem;
}

.limits-overview > div {
  display: grid;
  gap: 0.1rem;
}

.limits-overview span,
.limits-upgrade-toolbar > span {
  color: var(--muted-foreground);
  font-size: 0.78rem;
  text-align: right;
}

.quota-grid-modal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.1rem;
}

.quota-grid-modal .quota-row {
  padding: 0.58rem 0;
}

.quota-grid-modal .quota-track {
  margin-top: 0;
}

.limits-modal .plan-limit-table {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
}

.account-modal {
  width: min(34rem, 100%);
}

.account-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.account-summary > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.account-summary strong,
.account-summary span:not(.account-avatar):not(.badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.account-summary span:not(.account-avatar):not(.badge) {
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.account-avatar-lg {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.84rem;
}

.account-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.account-detail-grid > div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.7rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.account-detail-grid span {
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.account-detail-grid strong {
  font-size: 1rem;
  font-weight: 600;
}

.modal-header {
  align-items: flex-start;
}

.modal-header > div,
.modal-header h2 {
  min-width: 0;
}

.modal-header h2 {
  overflow-wrap: anywhere;
}

.icon-btn {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: calc(var(--radius) * 0.8);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 1.25rem;
  line-height: 1;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  color: var(--foreground);
  background: var(--accent);
}

.interval-toggle {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem;
  gap: 0.2rem;
  border-radius: calc(var(--radius) * 0.95);
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 45%, var(--popover));
}

.interval-option {
  min-height: 2rem;
  padding: 0.3rem 0.8rem;
  border-radius: calc(var(--radius) * 0.75);
  border-color: transparent;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.interval-option[data-state="selected"] {
  color: var(--foreground);
}

.interval-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.upgrade-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.upgrade-plan-option {
  min-height: 3.75rem;
  padding: 0.8rem;
  border-radius: calc(var(--radius) * 1.1);
  display: grid;
  align-content: start;
  gap: 0.55rem;
  text-align: left;
}

.upgrade-plan-option > span + span {
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.35;
}

.create-form {
  display: grid;
  gap: 1rem;
}

.upgrade-detail {
  display: grid;
  gap: 0.85rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

.modal-footer .field-error {
  margin-right: auto;
}

.dashboard-skeleton {
  display: grid;
  gap: 1rem;
}

.skeleton-line,
.skeleton-block,
.skeleton-card,
.skeleton-row {
  position: relative;
  overflow: hidden;
  background: color-mix(in oklch, var(--foreground) 8%, transparent);
}

.skeleton-line::after,
.skeleton-block::after,
.skeleton-card::after,
.skeleton-row::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in oklch, var(--foreground) 8%, transparent),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

.skeleton-title {
  width: 16rem;
  height: 1.8rem;
  border-radius: calc(var(--radius) * 0.7);
}

.skeleton-text {
  width: min(34rem, 100%);
  height: 0.9rem;
  border-radius: 999px;
}

.skeleton-summary {
  margin-top: -0.25rem;
  margin-bottom: 0.5rem;
}

.skeleton-summary .skeleton-line {
  width: 5.5rem;
  height: 0.8rem;
}

.skeleton-action {
  width: 6.5rem;
  height: 2rem;
  border-radius: calc(var(--radius) * 0.8);
}

.project-card-skeleton {
  min-height: 8.75rem;
  display: grid;
  grid-template-columns: minmax(12rem, 0.78fr) minmax(14rem, 1fr) minmax(18rem, auto);
  grid-template-rows: 1fr 3.75rem;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.2);
}

.project-card-skeleton .skeleton-line {
  width: min(12rem, 100%);
  height: 0.85rem;
  border-radius: 999px;
}

.project-card-skeleton .skeleton-block {
  grid-column: 1 / -1;
  width: 100%;
  height: 3.75rem;
  border-radius: calc(var(--radius) * 0.7);
}

.skeleton-row {
  height: 5.8rem;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.skeleton-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: min(24rem, 62%);
  height: 0.9rem;
  border-radius: 999px;
  background: color-mix(in oklch, var(--foreground) 9%, transparent);
}

.skeleton-card {
  min-height: 24rem;
}

.skeleton-card-wide {
  min-height: 31rem;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1100px) {
  .dash-grid-expanded {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .site-header-inner {
    height: auto;
    min-height: 3.5rem;
    flex-wrap: wrap;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .app-nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: wrap;
    gap: 0.22rem;
    overflow: visible;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
  }

  .app-nav-link {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .site-main {
    padding-top: 1.5rem;
  }

  .site-header-inner {
    gap: 0.65rem;
  }

  .brand-muted {
    display: none;
  }

  .app-nav-link {
    padding-inline: 0.55rem;
  }

  .account-email {
    display: none;
  }

  .selected-plan-head,
  .quota-row-head,
  .section-head,
  .usage-shop-head,
  .attention-heading {
    flex-direction: column;
  }

  .usage-shop-state {
    justify-items: start;
    text-align: left;
  }

  .attention-item {
    grid-template-columns: 0.22rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .attention-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .shop-main {
    grid-template-columns: 1fr;
  }

  .shop-state {
    justify-content: flex-start;
  }

  .billing-row,
  .support-row,
  .support-shop-row,
  .project-row,
  .admin-customer-row,
  .admin-project-row,
  .admin-request-row,
  .admin-cell-row {
    grid-template-columns: 1fr;
  }

  .billing-actions,
  .support-shop-state,
  .project-actions,
  .project-actions-cell {
    justify-content: flex-start;
    justify-items: start;
  }

  .project-row-head,
  .admin-row-head {
    display: none;
  }

  .project-cell,
  .admin-cell {
    grid-template-columns: minmax(6.5rem, 0.42fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 0.55rem;
    padding: 0.52rem 0;
  }

  .project-cell::before,
  .admin-cell::before {
    content: attr(data-label);
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
  }

  .project-cell > *,
  .admin-cell > * {
    grid-column: 2;
  }

  .project-cell:first-child,
  .admin-cell:first-child {
    padding-top: 0.85rem;
  }

  .project-cell:last-child,
  .admin-cell:last-child {
    padding-bottom: 0.85rem;
  }

  .plan-price,
  .quota-numbers {
    justify-items: start;
    text-align: left;
  }

  .quota-grid,
  .upgrade-plan-grid,
  .plan-selector {
    grid-template-columns: 1fr;
  }

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

  .limits-modal .plan-limit-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .limits-overview,
  .limits-upgrade-toolbar {
    align-items: flex-start;
  }

  .modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-footer .field-error {
    margin-right: 0;
  }

  .account-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-summary .badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

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

@media (max-width: 520px) {
  .limit-pills {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    padding-inline: 0.75rem;
    gap: 0.55rem;
  }

  .brand-text {
    display: none;
  }

  .shop-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .shop-actions .btn,
  .project-actions .btn {
    width: 100%;
  }

  .project-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .billing-ledger {
    grid-template-columns: 1fr;
  }

  .billing-ledger-total {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .billing-signal {
    border-top: 0;
  }

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

  .billing-plan-detail-body .limit-pills,
  .billing-plan-limits .plan-limit-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .billing-catalog-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-catalog-controls {
    width: 100%;
    justify-content: space-between;
  }

  .billing-plan-detail-head {
    flex-direction: column;
  }

  .billing-plan-detail-rate {
    justify-items: start;
    text-align: left;
  }

  .billing-plan-detail-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .billing-ledger-signals {
    grid-template-columns: 1fr;
  }

  .billing-signal {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .billing-signal:first-child {
    border-top: 0;
  }

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

  .billing-policy-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-policy-note > a {
    margin-left: 1.9rem;
  }

  .billing-empty,
  .billing-pricing-error {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .billing-page {
    gap: 1.35rem;
  }

  .billing-page-head {
    align-items: flex-start;
  }

  .billing-ledger-total {
    padding: 1.1rem;
  }

  .billing-project-actions .btn {
    min-width: 0;
    padding-inline: 0.52rem;
  }

  .billing-plan-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-plan-detail-actions .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .billing-action-wide {
    display: none;
  }

  .billing-action-short {
    display: inline;
  }

  .billing-catalog-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-project-context,
  .billing-shop-select select,
  .billing-period-switch {
    width: 100%;
    max-width: none;
  }

  .billing-period-option {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .billing-plan-grid,
  .billing-plan-detail-body .limit-pills,
  .billing-plan-limits .plan-limit-table,
  .billing-plan-detail-actions {
    grid-template-columns: 1fr;
  }

  .billing-page-head .btn {
    padding-inline: 0.6rem;
  }
}

@container billing-projects (max-width: 48rem) {
  .billing-project-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .billing-project-usage {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .billing-project-rate {
    grid-column: 2;
    grid-row: 1;
  }

  .billing-project-skeleton .billing-project-summary .skeleton-block {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@container billing-projects (max-width: 34rem) {
  .billing-project-summary {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .billing-project-usage,
  .billing-project-rate,
  .billing-project-skeleton .billing-project-summary .skeleton-block {
    grid-column: 1;
    grid-row: auto;
  }

  .billing-project-rate {
    justify-items: start;
    text-align: left;
  }

  .billing-project-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 0.7rem;
  }

  .billing-project-actions {
    width: 100%;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .billing-project-actions .btn {
    width: 100%;
  }

  .billing-skeleton-amount-small {
    justify-self: start;
  }
}

@container projects-list (max-width: 58rem) {
  .project-card-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity actions"
      "state state"
      "metrics metrics";
  }

  .project-state {
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@container projects-list (max-width: 44rem) {
  .project-card-skeleton {
    min-height: 15rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }

  .project-card-skeleton .skeleton-block {
    grid-column: 1;
  }

  .project-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "identity"
      "state"
      "metrics"
      "actions";
  }

  .project-identity,
  .project-state,
  .project-metrics,
  .project-actions-cell {
    border-left: 0;
    padding: 0.9rem 1rem;
  }

  .project-state,
  .project-actions-cell {
    border-top: 1px solid var(--border);
  }

  .project-identity {
    padding-left: 1rem;
  }

  .project-actions-cell {
    justify-content: stretch;
  }

  .project-actions {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-actions .btn {
    width: 100%;
  }

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

  .project-metric:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@container projects-list (max-width: 30rem) {
  .project-action-long {
    display: none;
  }

  .project-action-short {
    display: inline;
  }
}

@media (max-width: 520px) {
  .brand-lockup {
    display: none;
  }

  .project-page-toolbar {
    align-items: stretch;
  }

  .project-page-toolbar .head-actions {
    align-items: flex-start;
  }
}
