/* APX Workspace v2. Business UI remains owned by New API; this layer only changes presentation. */
:root {
  --background: #f5f7fa !important;
  --foreground: #17212b !important;
  --card: #ffffff !important;
  --card-foreground: #17212b !important;
  --popover: #ffffff !important;
  --popover-foreground: #17212b !important;
  --primary: #159e8c !important;
  --primary-foreground: #ffffff !important;
  --secondary: #edf3f6 !important;
  --secondary-foreground: #35505a !important;
  --muted: #f6f8fa !important;
  --muted-foreground: #70808b !important;
  --accent: #e8f6f3 !important;
  --accent-foreground: #087d70 !important;
  --border: #e2e9ee !important;
  --input: #d7e1e6 !important;
  --ring: #28a996 !important;
  --sidebar: #ffffff !important;
  --sidebar-foreground: #37454f !important;
  --sidebar-primary: #159e8c !important;
  --sidebar-primary-foreground: #ffffff !important;
  --sidebar-accent: #eef8f6 !important;
  --sidebar-accent-foreground: #087d70 !important;
  --sidebar-border: #e6edf1 !important;
  --sidebar-ring: #28a996 !important;
  --radius: .45rem !important;
}

* {
  scrollbar-color: #cfdce1 transparent;
  scrollbar-width: thin;
}

html, body {
  min-height: 100%;
  background: #f5f7fa !important;
  color: #17212b !important;
}

body {
  font-variant-numeric: tabular-nums;
}

body::before {
  content: none !important;
}

/* Header: a restrained, data-product command bar. */
header.sticky {
  min-height: 62px !important;
  height: 62px !important;
  border-bottom: 1px solid #e6edf1 !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px);
}

header.sticky > div {
  max-width: none !important;
}

header.sticky a {
  color: #53616c !important;
}

header.sticky nav a {
  padding: 7px 9px !important;
  border-radius: 5px !important;
  color: #5b6873 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

header.sticky nav a:hover,
header.sticky nav a[aria-current=page] {
  background: #eff8f6 !important;
  color: #0d897a !important;
}

header.sticky [data-slot=button],
header.sticky button {
  border-radius: 6px !important;
}

header.sticky input {
  min-height: 33px !important;
  background: #f7f9fa !important;
  border: 1px solid #e6edf1 !important;
}

/* Fixed navigation with the information density of an operations console. */
[data-slot=sidebar-wrapper] {
  --sidebar-width: 16rem !important;
  background: #ffffff !important;
}

[data-slot=sidebar-container] {
  padding: 0 !important;
  background: #ffffff !important;
}

[data-slot=sidebar-inner] {
  border: 0 !important;
  border-right: 1px solid #e6edf1 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

[data-slot=sidebar-header] {
  min-height: 14px !important;
  padding: 12px 13px 6px !important;
}

[data-slot=sidebar-content] {
  padding: 6px 8px 16px !important;
}

[data-slot=sidebar-group] {
  padding: 7px 0 !important;
}

[data-slot=sidebar-group-label] {
  height: auto !important;
  padding: 6px 12px 5px !important;
  color: #99a6ae !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
}

[data-slot=sidebar-menu] {
  gap: 1px !important;
}

[data-slot=sidebar-menu-button] {
  min-height: 36px !important;
  border-radius: 5px !important;
  padding: 8px 11px !important;
  color: #53616c !important;
  font-size: 13px !important;
  font-weight: 520 !important;
}

[data-slot=sidebar-menu-button] svg {
  width: 16px !important;
  height: 16px !important;
  color: #7f9099 !important;
}

[data-slot=sidebar-menu-button]:hover {
  background: #f4f8f9 !important;
  color: #168f80 !important;
}

[data-slot=sidebar-menu-button].active,
[data-slot=sidebar-menu-button][data-active=true] {
  position: relative;
  background: #e9f7f4 !important;
  color: #087d70 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

[data-slot=sidebar-menu-button].active::before,
[data-slot=sidebar-menu-button][data-active=true]::before {
  position: absolute;
  content: "";
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #16a18f;
}

[data-slot=sidebar-menu-button].active svg,
[data-slot=sidebar-menu-button][data-active=true] svg {
  color: #159e8c !important;
}

[data-slot=sidebar-footer] {
  border-top: 1px solid #eef2f4 !important;
  padding: 8px !important;
}

/* Remove the previous floating-shell look. */
[data-slot=sidebar-inset] {
  min-width: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f5f7fa !important;
  box-shadow: none !important;
}

main {
  min-width: 0;
}

[data-slot=sidebar-inset] > main,
main > main {
  width: 100% !important;
}

/* Content pages use a consistent, wide desktop working canvas. */
main > main {
  box-sizing: border-box !important;
  max-width: 1680px !important;
  margin: 0 auto !important;
  padding: 26px 30px 34px !important;
}

main h1, main h2 {
  margin: 0 !important;
  color: #1d2933 !important;
  font-size: 22px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
}

main h3 {
  color: #2f414b !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

main h4 {
  color: #43545e !important;
  font-weight: 700 !important;
}

.apx-page-caption {
  margin: 5px 0 20px !important;
  color: #7d8a93 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.apx-page-heading {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin-bottom: 2px !important;
}

.apx-page-heading::before {
  flex: 0 0 auto;
  width: 4px;
  height: 28px;
  margin-top: 1px;
  border-radius: 4px;
  background: #18a18f;
  content: "";
}

.apx-page-heading h1,
.apx-page-heading h2 {
  flex: 1 1 auto;
}

/* Common panels become practical data surfaces, not decorative cards. */
main [data-slot=card],
main [class*='rounded-xl'][class*='border'],
main [class*='rounded-2xl'][class*='border'],
main [class*='rounded-lg'][class*='border'] {
  border-color: #e3eaee !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(24, 49, 59, .025) !important;
}

main [data-slot=card-header] {
  min-height: 46px !important;
  padding: 15px 17px 12px !important;
  border-bottom: 1px solid #edf1f3 !important;
}

main [data-slot=card-content] {
  padding: 16px 17px !important;
}

main [data-slot=card-title] {
  color: #31424b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Statistic cards in dashboards, wallets and usage screens. */
main [data-slot=card] [class*='text-2xl'],
main [data-slot=card] [class*='text-3xl'],
main [data-slot=card] [class*='text-4xl'] {
  color: #1e313a !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

main [class*='grid'] > [data-slot=card] {
  min-height: 126px;
}

main [class*='grid'] > [data-slot=card] [data-slot=card-content] {
  position: relative;
}

main [class*='grid'] > [data-slot=card] [data-slot=card-content]::after {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7fd4c6;
  content: "";
}

/* Buttons and form controls. */
button, [role=button], [data-slot=button], a[class*='button'] {
  border-radius: 5px !important;
  font-weight: 650 !important;
}

button.bg-primary,
a.bg-primary,
[data-slot=button].bg-primary {
  min-height: 34px !important;
  border-color: #159e8c !important;
  background: #159e8c !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

button.bg-primary:hover,
a.bg-primary:hover,
[data-slot=button].bg-primary:hover {
  border-color: #087e70 !important;
  background: #087e70 !important;
}

button[class*='outline'],
[data-slot=button][class*='outline'] {
  border-color: #dbe5e9 !important;
  background: #ffffff !important;
  color: #50616b !important;
}

button[class*='outline']:hover,
[data-slot=button][class*='outline']:hover {
  border-color: #b9d9d3 !important;
  background: #f1faf8 !important;
  color: #087d70 !important;
}

input, textarea, select, [role=combobox] {
  min-height: 34px !important;
  border-color: #dce5e9 !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #33434c !important;
  box-shadow: none !important;
}

textarea {
  min-height: 88px !important;
}

input::placeholder, textarea::placeholder {
  color: #a3afb5 !important;
}

input:focus, textarea:focus, [role=combobox]:focus {
  border-color: #44b8a7 !important;
  box-shadow: 0 0 0 3px rgba(43, 169, 150, .11) !important;
}

label, [data-slot=label] {
  color: #52636c !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

/* Tables are the primary visual primitive for usage, keys, orders and admin data. */
main table {
  overflow: hidden !important;
  border: 1px solid #e5ecef !important;
  border-radius: 7px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #ffffff !important;
}

main thead, main thead tr, main th {
  height: 40px !important;
  border-bottom: 1px solid #e7eef1 !important;
  background: #f8fafb !important;
  color: #7b8991 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
}

main td {
  min-height: 53px !important;
  border-color: #edf1f3 !important;
  color: #394a53 !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

main tbody tr {
  transition: background-color .15s ease;
}

main tbody tr:hover td {
  background: #f8fcfb !important;
}

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

main [data-slot=badge] {
  min-height: 21px !important;
  border-radius: 4px !important;
  padding: 2px 7px !important;
  font-size: 11px !important;
  font-weight: 650 !important;
}

main [data-slot=badge][class*='green'],
main [data-slot=badge][class*='success'] {
  border-color: #c7ebe3 !important;
  background: #ebfaf6 !important;
  color: #138674 !important;
}

/* Tabs, toolbars, pagination and filters. */
[role=tablist] {
  gap: 4px !important;
  padding: 3px !important;
  border: 1px solid #e4ebee !important;
  border-radius: 6px !important;
  background: #f8fafb !important;
}

[role=tab] {
  min-height: 29px !important;
  border-radius: 4px !important;
  color: #70808a !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

[role=tab][data-state=active], [role=tab][aria-selected=true] {
  background: #ffffff !important;
  color: #087d70 !important;
  box-shadow: 0 1px 2px rgba(33, 72, 76, .08) !important;
}

main [class*='pagination'] button,
main button[aria-label*='page'] {
  min-width: 30px !important;
  min-height: 30px !important;
}

/* Dialogs and menus are deliberately compact. */
[role=dialog], [data-slot=dialog-content], [role=menu], [role=listbox] {
  border-color: #dde7ea !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(22, 51, 60, .16) !important;
}

[role=menuitem]:hover, [role=option][data-highlighted] {
  background: #eff9f7 !important;
  color: #087d70 !important;
}

/* Route-specific density refinements. */
body[data-apx-route*='usage'],
body[data-apx-route*='logs'] {
  --apx-table-row: 60px;
}

body[data-apx-route*='channels'] main [class*='grid'] > [class*='border'] {
  min-height: 184px !important;
  border-radius: 7px !important;
  background: #ffffff !important;
}

body[data-apx-route*='wallet'] main [class*='grid'] > button,
body[data-apx-route*='wallet'] main button[class*='border'] {
  border-color: #dfe8eb !important;
  background: #ffffff !important;
}

body[data-apx-route*='wallet'] main [class*='grid'] > button:hover,
body[data-apx-route*='wallet'] main button[class*='border']:hover {
  border-color: #8fccc3 !important;
  background: #effaf7 !important;
}

body[data-apx-route*='system-settings'] [data-slot=sidebar-inner] {
  background: #ffffff !important;
}

body[data-apx-route*='system-settings'] main > main {
  max-width: 1760px !important;
}

/* Responsive behavior stays functional instead of shrinking the desktop canvas. */
@media (max-width: 1024px) {
  main > main {
    padding: 22px 20px 30px !important;
  }

  [data-slot=sidebar-wrapper] {
    --sidebar-width: 15rem !important;
  }
}

@media (max-width: 767px) {
  header.sticky {
    min-height: 54px !important;
    height: 54px !important;
  }

  [data-slot=sidebar-inset] {
    background: #f5f7fa !important;
  }

  main > main {
    padding: 18px 12px 28px !important;
  }

  main h1, main h2 {
    font-size: 19px !important;
  }

  .apx-page-caption {
    margin-bottom: 15px !important;
  }

  main [data-slot=card-header], main [data-slot=card-content] {
    padding-left: 13px !important;
    padding-right: 13px !important;
  }

  main table {
    min-width: 690px;
  }
}

/* Authentication routes use the same restrained product language as the console. */
body:has(#root > .relative.grid.h-svh form) {
  background: #f5f7fa !important;
}

body:has(#root > .relative.grid.h-svh form) #root > .relative.grid.h-svh {
  background: #f5f7fa !important;
}

body:has(#root > .relative.grid.h-svh form) .container.flex.items-center {
  width: 100% !important;
  max-width: none !important;
  padding: 86px 24px 32px !important;
  background: #f5f7fa !important;
}

body:has(#root > .relative.grid.h-svh form) .container.flex.items-center > .mx-auto {
  width: min(100%, 500px) !important;
  padding: 28px 32px 30px !important;
  border: 1px solid #e0e8ec !important;
  border-top: 3px solid #159e8c !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 26px rgba(24, 49, 59, .07) !important;
}

body:has(#root > .relative.grid.h-svh form) .container h1,
body:has(#root > .relative.grid.h-svh form) .container h2 {
  color: #1d2933 !important;
  font-size: 22px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

body:has(#root > .relative.grid.h-svh form) .container form {
  gap: 18px !important;
}

body:has(#root > .relative.grid.h-svh form) .container input {
  min-height: 40px !important;
  border-color: #dce5e9 !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  font-size: 14px !important;
}

body:has(#root > .relative.grid.h-svh form) .container button[type='submit'] {
  min-height: 40px !important;
  margin-top: 4px !important;
  border-color: #159e8c !important;
  border-radius: 5px !important;
  background: #159e8c !important;
  box-shadow: none !important;
}

body:has(#root > .relative.grid.h-svh form) .container button[type='submit']:hover {
  border-color: #087e70 !important;
  background: #087e70 !important;
}

body:has(#root > .relative.grid.h-svh form) .container a {
  color: #0c8879 !important;
  font-weight: 650 !important;
}

@media (max-width: 767px) {
  body:has(#root > .relative.grid.h-svh form) .container.flex.items-center {
    padding: 74px 14px 24px !important;
  }

  body:has(#root > .relative.grid.h-svh form) .container.flex.items-center > .mx-auto {
    width: 100% !important;
    padding: 24px 20px 26px !important;
  }
}

/* The public model catalogue is a data directory, not a marketing hero. */
body[data-apx-route='/pricing'] [class*='max-w-[1800px]'] {
  max-width: 1680px !important;
  padding: 82px 30px 34px !important;
}

body[data-apx-route='/pricing'] header.mx-auto {
  max-width: none !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  text-align: left !important;
}

body[data-apx-route='/pricing'] header.mx-auto h1 {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  color: #1d2933 !important;
  font-size: 27px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
}

body[data-apx-route='/pricing'] header.mx-auto h1::before {
  width: 4px;
  height: 30px;
  border-radius: 3px;
  background: #18a18f;
  content: "";
}

body[data-apx-route='/pricing'] header.mx-auto p {
  max-width: 760px !important;
  margin: 5px 0 0 !important;
  color: #7d8a93 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

body[data-apx-route='/pricing'] header.mx-auto [role='search'],
body[data-apx-route='/pricing'] header.mx-auto form {
  max-width: 760px !important;
  margin: 16px 0 0 !important;
}

body[data-apx-route='/pricing'] aside {
  top: 76px !important;
  border-color: #e3eaee !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(24, 49, 59, .025) !important;
}

body[data-apx-route='/pricing'] aside h2 {
  color: #31424b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body[data-apx-route='/pricing'] aside button {
  border-radius: 4px !important;
  font-size: 12px !important;
}

body[data-apx-route='/pricing'] main {
  gap: 12px !important;
}

body[data-apx-route='/pricing'] main > :first-child {
  min-height: 46px !important;
  border-color: #e3eaee !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(24, 49, 59, .025) !important;
}

body[data-apx-route='/pricing'] main h3 {
  font-size: 14px !important;
}

@media (max-width: 767px) {
  body[data-apx-route='/pricing'] [class*='max-w-[1800px]'] {
    padding: 70px 12px 28px !important;
  }

  body[data-apx-route='/pricing'] header.mx-auto h1 {
    font-size: 22px !important;
  }
}
