.codex-general-main {
  position: relative;
  min-height: calc(100vh - 40px);
  width: 100%;
  background: #020304;
  color: #fff;
  padding-bottom: 34px;
}

body .codex-general-main,
body .codex-general-main * {
  color: #f8fafc;
}

.codex-general-shell {
  margin: 24px 30px 34px;
  padding: 30px 32px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(15, 143, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(8, 10, 12, 0.98), rgba(2, 3, 4, 0.98));
}

.codex-route-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.codex-route-actions,
.codex-route-tabs,
.codex-route-filters,
.codex-grid-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.codex-route-tabs {
  margin-bottom: 18px;
}

.codex-route-tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.codex-route-tab.is-active {
  background: rgba(35, 197, 126, 0.18);
  border-color: rgba(134, 239, 172, 0.34);
  color: #fff;
}

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

.codex-stat-card,
.codex-table-shell,
.codex-compose-shell,
.codex-summary-shell {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.codex-stat-card {
  padding: 18px 20px;
}

.codex-stat-card-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.codex-stat-card-value {
  margin-top: 10px;
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.codex-stat-card-copy {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.codex-table-shell,
.codex-compose-shell,
.codex-summary-shell {
  padding: 22px;
}

.codex-admin-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
}

.codex-admin-table th,
.codex-admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  color: rgba(255, 255, 255, 0.86);
}

.codex-admin-table th {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.codex-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.codex-inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.codex-inline-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.codex-inline-btn.is-primary {
  background: linear-gradient(135deg, #0f8fff, #23c57e);
}

.codex-inline-btn.is-success {
  background: linear-gradient(135deg, #16a34a, #059669);
}

.codex-inline-btn.is-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.codex-inline-btn.is-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.codex-inline-btn.is-muted {
  background: rgba(255, 255, 255, 0.08);
}

.codex-inline-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.codex-b365-account-logs {
  margin: 24px 0 8px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(35, 197, 126, 0.22);
  background:
    radial-gradient(circle at top right, rgba(35, 197, 126, 0.12), transparent 28%),
    rgba(7, 12, 14, 0.96);
}

.codex-b365-log-header,
.codex-b365-log-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.codex-b365-log-header h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 20px;
}

.codex-b365-log-header p,
.codex-b365-log-card-head span,
.codex-b365-balance-meta {
  margin: 6px 0 0;
  color: rgba(248, 250, 252, 0.66);
}

.codex-b365-log-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.18);
  border: 1px solid rgba(134, 239, 172, 0.28);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.codex-b365-log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.codex-b365-log-card {
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.codex-b365-log-card strong,
.codex-b365-balance {
  display: block;
  color: #ffffff;
}

.codex-b365-balance {
  white-space: nowrap;
  font-size: 18px;
}

.codex-b365-balance-meta .is-error {
  color: #fca5a5;
}

.codex-b365-log-output {
  width: 100%;
  height: 220px;
  margin: 14px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #d1fae5;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.codex-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.codex-badge.is-success {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.codex-badge.is-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.codex-badge.is-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

.codex-badge.is-muted {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
}

.codex-field,
.codex-select,
.codex-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 12px 14px;
}

.codex-textarea {
  min-height: 220px;
  resize: vertical;
}

.codex-field::placeholder,
.codex-textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.codex-empty {
  color: rgba(255, 255, 255, 0.64);
  text-align: center;
  padding: 20px 0;
}

.codex-chart-shell {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.codex-chart-shell svg {
  width: 100%;
  height: auto;
  display: block;
}

.codex-chart-shell text {
  fill: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.codex-general-shell .codex-helper {
  color: rgba(255, 255, 255, 0.68);
}

.dark-theme .sider,
.dark-theme .ant-layout-sider,
body .sider {
  background: #040506 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 18px 0 40px rgba(0, 0, 0, 0.22);
}

body .sider .logo,
body .ant-layout-sider .logo {
  filter: none !important;
}

.codex-native-hidden {
  display: none !important;
}

.codex-general-main .codex-general-shell {
  max-width: none;
  width: auto;
}

.codex-route-copy {
  max-width: 840px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.codex-route-title {
  margin: 6px 0 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.05;
}

.codex-route-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(35, 197, 126, 0.14);
  border: 1px solid rgba(110, 231, 183, 0.2);
  color: #a7f3d0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.codex-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.codex-route-meta .codex-pill {
  background: rgba(255, 255, 255, 0.05);
}

.codex-route-actions a,
.codex-route-actions button,
.codex-route-tabs a {
  text-decoration: none;
}

.codex-route-actions .codex-inline-btn,
.codex-route-tabs .codex-route-tab {
  font-weight: 600;
}

.codex-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.codex-split-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
}

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

.codex-summary-metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.codex-summary-metric-label {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.codex-summary-metric-value {
  margin-top: 8px;
  color: #fff;
  font-size: 26px;
  line-height: 1.1;
}

.codex-summary-metric-copy {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.6;
  font-size: 14px;
}

.codex-overflow {
  overflow-x: auto;
  width: 100%;
}

.codex-admin-table td small {
  color: rgba(255, 255, 255, 0.58);
  display: block;
  line-height: 1.5;
}

.codex-admin-table td strong {
  color: #fff;
}

.codex-admin-table td .codex-inline-buttons {
  min-width: 220px;
}

.codex-admin-table td .codex-pill {
  margin-bottom: 6px;
}

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

.codex-tipster-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.codex-tipster-card-cover {
  min-height: 138px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.codex-tipster-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.92));
}

.codex-tipster-card-cover.is-fallback::after {
  background: linear-gradient(135deg, rgba(15, 143, 255, 0.26), rgba(35, 197, 126, 0.42));
}

.codex-tipster-avatar {
  position: absolute;
  left: 18px;
  bottom: -24px;
  width: 74px;
  height: 74px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid rgba(4, 5, 6, 0.96);
  z-index: 2;
  background: #0f172a;
}

.codex-tipster-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f8fff, #23c57e);
}

.codex-tipster-card-body {
  padding: 34px 18px 18px;
}

.codex-tipster-card-title {
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

.codex-tipster-card-copy {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.codex-tipster-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.codex-tipster-mini-item {
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.codex-tipster-mini-item span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.codex-tipster-mini-item strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 17px;
}

.codex-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
}

.codex-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.codex-modal-shell {
  width: min(720px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 26px;
  background: #050607;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
}

.codex-modal-header,
.codex-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
}

.codex-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.codex-modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.codex-modal-body {
  padding: 22px;
}

.codex-modal-title {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.codex-modal-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

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

.codex-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.codex-form-field.is-span-2 {
  grid-column: span 2;
}

.codex-form-field label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.codex-compose-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.4fr);
  gap: 20px;
}

.codex-select[multiple] {
  min-height: 280px;
}

.codex-select option {
  background: #050607;
  color: #fff;
}

.codex-inline-alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
}

.codex-inline-alert.is-success {
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(74, 222, 128, 0.2);
  color: #bbf7d0;
}

.codex-inline-alert.is-error {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(252, 165, 165, 0.2);
  color: #fecaca;
}

.codex-empty-state {
  padding: 30px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.66);
}

.codex-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.codex-sidebar-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  margin-right: 0;
  text-align: center;
  line-height: 1;
}

.ant-layout-sider .ant-menu-item[data-codex-link],
.sider .ant-menu-item[data-codex-link] {
  display: flex !important;
  align-items: center;
  padding-left: 24px !important;
}

.ant-layout-sider .ant-menu-item[data-codex-link] .codex-sidebar-link,
.sider .ant-menu-item[data-codex-link] .codex-sidebar-link {
  display: flex !important;
  align-items: center;
  line-height: inherit;
}

body .codex-general-main,
body .codex-general-main h1,
body .codex-general-main h2,
body .codex-general-main h3,
body .codex-general-main h4,
body .codex-general-main p,
body .codex-general-main span,
body .codex-general-main div,
body .codex-general-main td,
body .codex-general-main th,
body .codex-general-main label,
body .codex-general-main strong,
body .codex-general-main small,
body .codex-general-main a {
  color: inherit;
}

body .codex-general-main .codex-route-title,
body .codex-general-main .codex-modal-title,
body .codex-general-main .codex-stat-card-value,
body .codex-general-main .codex-summary-metric-value,
body .codex-general-main .codex-tipster-card-title,
body .codex-general-main .codex-admin-table td strong {
  color: #fff !important;
}

body .codex-general-main .codex-route-copy,
body .codex-general-main .codex-helper,
body .codex-general-main .codex-summary-metric-copy,
body .codex-general-main .codex-stat-card-copy,
body .codex-general-main .codex-tipster-card-copy,
body .codex-general-main .codex-admin-table td small {
  color: rgba(255, 255, 255, 0.68) !important;
}

body .codex-general-main .codex-route-kicker {
  color: #a7f3d0 !important;
}

body .codex-general-main .codex-badge.is-success {
  color: #86efac !important;
}

body .codex-general-main .codex-badge.is-danger {
  color: #fca5a5 !important;
}

body .codex-general-main .codex-badge.is-warning {
  color: #fcd34d !important;
}

body .codex-general-main .codex-badge.is-muted {
  color: rgba(255, 255, 255, 0.74) !important;
}

body .codex-general-main .codex-admin-table th,
body .codex-general-main .codex-admin-table td,
body .codex-general-main .codex-admin-table td strong,
body .codex-general-main .codex-admin-table td small,
body .codex-general-main .codex-route-copy,
body .codex-general-main .codex-helper,
body .codex-general-main .codex-pill,
body .codex-general-main .codex-route-tab,
body .codex-general-main .codex-summary-metric-copy {
  color: #f8fafc !important;
}

body .sider .small-font,
body .sider .font-bg-md,
body .ant-layout-sider .small-font,
body .ant-layout-sider .font-bg-md {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

body .sider,
body .ant-layout-sider {
  width: 266px !important;
  min-width: 266px !important;
  max-width: 266px !important;
  flex: 0 0 266px !important;
}

body main {
  padding-left: 266px !important;
}

body .sider .ant-menu-item,
body .sider .ant-menu-submenu-title,
body .ant-layout-sider .ant-menu-item,
body .ant-layout-sider .ant-menu-submenu-title {
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  height: auto !important;
  min-height: 40px !important;
  white-space: normal !important;
  word-break: break-word;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

body .sider .ant-menu-sub .ant-menu-item,
body .ant-layout-sider .ant-menu-sub .ant-menu-item,
body .sider .ant-menu-submenu-title,
body .ant-layout-sider .ant-menu-submenu-title {
  font-size: 13px !important;
}

body .sider .ant-menu-item a,
body .ant-layout-sider .ant-menu-item a,
body .sider .ant-menu-submenu-title span,
body .ant-layout-sider .ant-menu-submenu-title span,
body .sider .ant-menu-sub .ant-menu-item a,
body .ant-layout-sider .ant-menu-sub .ant-menu-item a {
  color: #fff !important;
}

body .sider .ant-menu-item-selected,
body .sider .ant-menu-submenu-selected,
body .ant-layout-sider .ant-menu-item-selected,
body .ant-layout-sider .ant-menu-submenu-selected {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.dark-theme .ant-layout-content,
.dark-theme main {
  background: #020304 !important;
}

.dark-theme .ant-card,
.dark-theme .card,
.dark-theme .ant-table-wrapper,
.dark-theme .ant-table,
.dark-theme .ant-table-container,
.dark-theme .ant-table-content,
.dark-theme .ant-pagination-item,
.dark-theme .ant-select-selector,
.dark-theme .ant-input,
.dark-theme .ant-input-number,
.dark-theme .ant-input-affix-wrapper {
  border-radius: 18px !important;
}

.dark-theme .ant-layout-sider .ant-menu,
.dark-theme .sider .ant-menu,
.dark-theme .ant-layout-sider .ant-menu-root {
  background: transparent !important;
}

.dark-theme .ant-layout-sider .ant-menu-item,
.dark-theme .ant-layout-sider .ant-menu-submenu-title,
.dark-theme .sider .ant-menu-item {
  border-radius: 14px !important;
  margin: 6px 10px !important;
  width: auto !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

.dark-theme .ant-layout-sider .ant-menu-item-selected,
.dark-theme .sider .ant-menu-item-selected {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.dark-theme .ant-layout-sider .ant-menu-item a,
.dark-theme .sider .ant-menu-item a {
  color: inherit !important;
}

.dark-theme .ant-layout-sider .ant-menu-item .anticon,
.dark-theme .sider .ant-menu-item .anticon {
  color: rgba(255, 255, 255, 0.72) !important;
}

@media (max-width: 1220px) {
  .codex-card-grid,
  .codex-summary-metrics,
  .codex-tipster-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .codex-compose-layout,
  .codex-two-column,
  .codex-split-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body .sider,
  body .ant-layout-sider {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  body main {
    padding-left: 0 !important;
  }

  .codex-general-shell {
    margin: 18px 16px 24px;
    padding: 24px 18px;
  }

  .codex-route-title {
    font-size: 28px;
  }

  .codex-card-grid,
  .codex-summary-metrics,
  .codex-tipster-card-grid,
  .codex-form-grid {
    grid-template-columns: 1fr;
  }

  .codex-form-field.is-span-2 {
    grid-column: span 1;
  }
}

body .sider .ant-menu,
body .ant-layout-sider .ant-menu {
  background: transparent !important;
}

body .sider .ant-menu-item,
body .ant-layout-sider .ant-menu-item {
  margin: 8px 12px !important;
  width: auto !important;
  border-radius: 14px !important;
}

body .sider .ant-menu-item-selected,
body .ant-layout-sider .ant-menu-item-selected {
  background: rgba(255, 255, 255, 0.08) !important;
}

body .sider .ant-menu-item a,
body .ant-layout-sider .ant-menu-item a,
body .sider .ant-menu-item,
body .ant-layout-sider .ant-menu-item {
  color: rgba(255, 255, 255, 0.86) !important;
}

.codex-pagination-shell {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

html:not(.dark-theme) body .codex-general-main {
  background: #f3f6fb !important;
  color: #0f172a !important;
}

html:not(.dark-theme) body .codex-general-main *,
html:not(.dark-theme) body .codex-general-main .codex-helper,
html:not(.dark-theme) body .codex-general-main .codex-route-copy,
html:not(.dark-theme) body .codex-general-main .codex-admin-table th,
html:not(.dark-theme) body .codex-general-main .codex-admin-table td,
html:not(.dark-theme) body .codex-general-main .codex-admin-table td strong,
html:not(.dark-theme) body .codex-general-main .codex-admin-table td small {
  color: #0f172a !important;
}

html:not(.dark-theme) body .codex-general-shell,
html:not(.dark-theme) body .codex-general-main .codex-summary-shell,
html:not(.dark-theme) body .codex-general-main .codex-table-shell,
html:not(.dark-theme) body .codex-general-main .codex-compose-shell,
html:not(.dark-theme) body .codex-general-main .codex-stat-card,
html:not(.dark-theme) body .codex-general-main .codex-chart-shell,
html:not(.dark-theme) body .codex-general-main .codex-summary-metric,
html:not(.dark-theme) body .codex-general-main .codex-tipster-card,
html:not(.dark-theme) body .codex-general-main .codex-tipster-mini-item {
  background: #fff !important;
  border-color: rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

html:not(.dark-theme) body .codex-general-main .codex-route-title,
html:not(.dark-theme) body .codex-general-main .codex-stat-card-value,
html:not(.dark-theme) body .codex-general-main .codex-summary-metric-value,
html:not(.dark-theme) body .codex-general-main .codex-tipster-card-title,
html:not(.dark-theme) body .codex-general-main .codex-admin-table td strong {
  color: #020617 !important;
}

html:not(.dark-theme) body .codex-general-main .codex-stat-card-label,
html:not(.dark-theme) body .codex-general-main .codex-summary-metric-label,
html:not(.dark-theme) body .codex-general-main .codex-tipster-mini-item span,
html:not(.dark-theme) body .codex-general-main .codex-admin-table th,
html:not(.dark-theme) body .codex-general-main .codex-chart-shell text {
  color: #475569 !important;
  fill: #475569 !important;
}

html:not(.dark-theme) body .codex-general-main .codex-pill,
html:not(.dark-theme) body .codex-general-main .codex-route-tab,
html:not(.dark-theme) body .codex-general-main .codex-inline-btn.is-muted {
  background: #eef2f7 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html:not(.dark-theme) body .codex-general-main .codex-route-kicker {
  background: rgba(35, 197, 126, 0.12) !important;
  color: #047857 !important;
  border-color: rgba(5, 150, 105, 0.18) !important;
}

html:not(.dark-theme) body .codex-general-main .codex-field,
html:not(.dark-theme) body .codex-general-main .codex-select,
html:not(.dark-theme) body .codex-general-main .codex-textarea {
  background: #fff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

html:not(.dark-theme) body .codex-general-main .codex-field::placeholder,
html:not(.dark-theme) body .codex-general-main .codex-textarea::placeholder {
  color: #64748b !important;
}

body .codex-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
  flex-wrap: wrap;
}

body .codex-topbar-actions.is-floating {
  position: fixed;
  top: 18px;
  right: 86px;
  z-index: 2100;
  margin-right: 0;
}

body .codex-topbar-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none !important;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a !important;
  font-size: 14px;
  font-weight: 600;
}

body .codex-topbar-btn.is-primary {
  background: linear-gradient(135deg, #0f8fff, #23c57e);
  color: #fff !important;
  border-color: transparent;
}

body .codex-topbar-btn.is-alert {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

body .codex-topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
}

html.dark-theme body .codex-topbar-btn {
  background: #050505;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.16);
}

html.dark-theme body main .ant-tabs-content,
html.dark-theme body main .ant-tabs-tabpane,
html.dark-theme body main .ant-card,
html.dark-theme body main .ant-card-body,
html.dark-theme body main .ant-card-head,
html.dark-theme body main .ant-descriptions,
html.dark-theme body main .ant-descriptions-view,
html.dark-theme body main .ant-descriptions-row,
html.dark-theme body main .ant-descriptions-bordered .ant-descriptions-item-label,
html.dark-theme body main .ant-descriptions-bordered .ant-descriptions-item-content,
html.dark-theme body main table,
html.dark-theme body main table tbody,
html.dark-theme body main table thead,
html.dark-theme body main table tr,
html.dark-theme body main table th,
html.dark-theme body main table td,
html.dark-theme body main .border-grey,
html.dark-theme body main .editable-cell-value-wrap,
html.dark-theme body main .bg-white,
html.dark-theme body main .well,
html.dark-theme body main .actions {
  background: #000 !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html.dark-theme body main table th *,
html.dark-theme body main table td *,
html.dark-theme body main .ant-descriptions-item-label *,
html.dark-theme body main .ant-descriptions-item-content *,
html.dark-theme body main .ant-tabs-tabpane *,
html.dark-theme body main .editable-cell-value-wrap *,
html.dark-theme body main .actions *,
html.dark-theme body main .bg-white * {
  color: #fff !important;
}

@media only screen and (max-width: 1180px) {
  .codex-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media only screen and (max-width: 768px) {
  .codex-general-shell {
    margin: 18px 14px 24px;
    padding: 22px 18px;
    border-radius: 22px;
  }

  .codex-route-header {
    flex-direction: column;
  }

  .codex-card-grid {
    grid-template-columns: 1fr;
  }
}
