:root {
  color-scheme: dark;
  --dxh-bg: #050706;
  --dxh-bg-2: #0b1110;
  --dxh-ink: #f5f1e8;
  --dxh-muted: #aab5af;
  --dxh-dim: #6f7b76;
  --dxh-line: rgba(245, 241, 232, 0.12);
  --dxh-line-2: rgba(245, 241, 232, 0.22);
  --dxh-gold: #d6b96f;
  --dxh-blue: #6aa8d8;
  --dxh-green: #68c39a;
  --dxh-red: #ec6b65;
  --dxh-panel: rgba(11, 17, 16, 0.86);
  --dxh-panel-2: rgba(17, 26, 24, 0.92);
  --dxh-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --dxh-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --dxh-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body.dxh-suite {
  background:
    radial-gradient(circle at 16% -10%, rgba(104, 195, 154, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(214, 185, 111, 0.12), transparent 30rem),
    linear-gradient(180deg, #07100f 0%, #050706 44%, #030504 100%) !important;
  color: var(--dxh-ink);
  font-family: var(--dxh-font);
  letter-spacing: 0;
}

body.dxh-suite:not(.dxh-suite-portal) {
  padding-top: 74px;
}

body.dxh-suite #dxh-suite-bar {
  position: fixed;
  z-index: 2147482000;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border: 1px solid var(--dxh-line);
  border-radius: 8px;
  background: rgba(5, 8, 7, 0.82);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.dxh-suite-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.dxh-suite-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(214, 185, 111, 0.55);
  background: linear-gradient(145deg, rgba(104, 195, 154, 0.22), rgba(106, 168, 216, 0.12));
  color: var(--dxh-gold);
  font-family: var(--dxh-mono);
  font-size: 11px;
  font-weight: 800;
}

.dxh-suite-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dxh-ink);
  line-height: 1;
}

.dxh-suite-app {
  margin-top: 4px;
  font-size: 11px;
  color: var(--dxh-muted);
}

.dxh-suite-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.dxh-suite-nav a,
.dxh-suite-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--dxh-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.dxh-suite-nav a:hover,
.dxh-suite-action:hover {
  border-color: var(--dxh-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dxh-ink);
}

.dxh-suite-nav a.is-active {
  border-color: rgba(214, 185, 111, 0.38);
  color: var(--dxh-ink);
  background: rgba(214, 185, 111, 0.09);
}

.dxh-suite-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dxh-muted);
  font-size: 12px;
  white-space: nowrap;
}

.dxh-suite-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dxh-red);
  box-shadow: 0 0 0 4px rgba(236, 107, 101, 0.12);
}

.dxh-suite-dot.is-online {
  background: var(--dxh-green);
  box-shadow: 0 0 0 4px rgba(104, 195, 154, 0.14);
}

.dxh-suite-feed {
  position: fixed;
  z-index: 2147481999;
  right: 18px;
  bottom: 18px;
  width: min(360px, calc(100vw - 36px));
  max-height: min(520px, calc(100vh - 110px));
  border: 1px solid var(--dxh-line);
  border-radius: 8px;
  background: var(--dxh-panel);
  box-shadow: var(--dxh-shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.dxh-suite-feed.is-collapsed .dxh-suite-feed-body {
  display: none;
}

.dxh-suite-feed-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dxh-line);
}

.dxh-suite-feed-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dxh-ink);
}

.dxh-suite-feed-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--dxh-dim);
}

.dxh-suite-feed-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid var(--dxh-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--dxh-muted);
  cursor: pointer;
}

.dxh-suite-feed-body {
  display: grid;
  gap: 8px;
  padding: 10px;
  overflow: auto;
  max-height: 430px;
}

.dxh-suite-event {
  border: 1px solid rgba(245, 241, 232, 0.09);
  border-left: 3px solid var(--dxh-blue);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.dxh-suite-event.is-warning {
  border-left-color: var(--dxh-gold);
}

.dxh-suite-event.is-critical,
.dxh-suite-event.is-danger {
  border-left-color: var(--dxh-red);
}

.dxh-suite-event-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--dxh-ink);
}

.dxh-suite-event-msg {
  margin-top: 4px;
  color: var(--dxh-muted);
  font-size: 12px;
  line-height: 1.45;
}

.dxh-suite-event-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dxh-dim);
  font-family: var(--dxh-mono);
  font-size: 10px;
  text-transform: uppercase;
}

body.dxh-suite:not(.dxh-suite-portal) button,
body.dxh-suite:not(.dxh-suite-portal) .btn,
body.dxh-suite:not(.dxh-suite-portal) input,
body.dxh-suite:not(.dxh-suite-portal) select,
body.dxh-suite:not(.dxh-suite-portal) textarea {
  border-radius: 6px !important;
}

body.dxh-suite:not(.dxh-suite-portal) button,
body.dxh-suite:not(.dxh-suite-portal) .btn,
body.dxh-suite:not(.dxh-suite-portal) .auth-btn {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.dxh-suite:not(.dxh-suite-portal) button:hover,
body.dxh-suite:not(.dxh-suite-portal) .btn:hover,
body.dxh-suite:not(.dxh-suite-portal) .auth-btn:hover {
  transform: translateY(-1px);
}

body.dxh-suite:not(.dxh-suite-portal) input,
body.dxh-suite:not(.dxh-suite-portal) select,
body.dxh-suite:not(.dxh-suite-portal) textarea {
  background: rgba(6, 10, 9, 0.78) !important;
  border-color: var(--dxh-line) !important;
  color: var(--dxh-ink) !important;
}

body.dxh-suite:not(.dxh-suite-portal) input:focus,
body.dxh-suite:not(.dxh-suite-portal) select:focus,
body.dxh-suite:not(.dxh-suite-portal) textarea:focus {
  border-color: rgba(214, 185, 111, 0.54) !important;
  box-shadow: 0 0 0 3px rgba(214, 185, 111, 0.11);
}

body.dxh-suite-cad .cm-box,
body.dxh-suite-owner .auth-box {
  border-radius: 8px !important;
  border-color: rgba(214, 185, 111, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(17, 26, 24, 0.94), rgba(7, 12, 11, 0.96)) !important;
  box-shadow: var(--dxh-shadow);
}

body.dxh-suite-cad .cm-heading,
body.dxh-suite-owner .auth-title,
body.dxh-suite-cms .page-title,
body.dxh-suite-owner .topbar-title {
  color: var(--dxh-ink) !important;
  letter-spacing: 0.02em !important;
}

body.dxh-suite-cad .cm-agency,
body.dxh-suite-cms .topbar-brand,
body.dxh-suite-owner .sb-logo-name {
  color: var(--dxh-gold) !important;
}

body.dxh-suite-cad .cm-dept-row,
body.dxh-suite-cms .sidebar-item,
body.dxh-suite-owner .sb-item {
  border-radius: 6px !important;
}

body.dxh-suite-cad .cm-dept-row:hover,
body.dxh-suite-cms .sidebar-item:hover,
body.dxh-suite-owner .sb-item:hover {
  background: rgba(214, 185, 111, 0.08) !important;
  color: var(--dxh-ink) !important;
}

body.dxh-suite-cms .topbar,
body.dxh-suite-owner #sidebar,
body.dxh-suite-cad .topbar {
  background: rgba(5, 8, 7, 0.78) !important;
  border-color: var(--dxh-line) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

body.dxh-suite-cms .shell,
body.dxh-suite-owner #main,
body.dxh-suite-cad #cadMain {
  color: var(--dxh-ink);
}

body.dxh-suite-cms .stat-cell,
body.dxh-suite-cms .panel,
body.dxh-suite-cms .app-dept-card,
body.dxh-suite-owner .section-block,
body.dxh-suite-owner .stat-box,
body.dxh-suite-owner .setup-card,
body.dxh-suite-cad .panel,
body.dxh-suite-cad .card,
body.dxh-suite-cad .unit-card,
body.dxh-suite-cad .agency-card {
  border-radius: 8px !important;
  border-color: var(--dxh-line) !important;
  background: rgba(11, 17, 16, 0.72) !important;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

body.dxh-suite-cms table,
body.dxh-suite-owner table,
body.dxh-suite-cad table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.dxh-suite-cms th,
body.dxh-suite-owner th,
body.dxh-suite-cad th {
  color: var(--dxh-dim) !important;
  letter-spacing: 0.08em !important;
}

body.dxh-suite-cms td,
body.dxh-suite-owner td,
body.dxh-suite-cad td {
  border-color: rgba(245, 241, 232, 0.08) !important;
}

body.dxh-suite-cms tr:hover td,
body.dxh-suite-owner tr:hover td,
body.dxh-suite-cad tr:hover td {
  background: rgba(214, 185, 111, 0.045) !important;
}

body.dxh-suite-owner .auth-box {
  position: relative;
  overflow: hidden;
}

body.dxh-suite-owner .auth-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 2px solid rgba(214, 185, 111, 0.5);
}

body.dxh-suite-owner .auth-sub,
body.dxh-suite-owner .auth-footer,
body.dxh-suite-cad .cm-sub,
body.dxh-suite-cad .cm-footer {
  color: var(--dxh-muted) !important;
}

@media (max-width: 900px) {
  body.dxh-suite:not(.dxh-suite-portal) {
    padding-top: 118px;
  }

  body.dxh-suite #dxh-suite-bar {
    height: auto;
    min-height: 90px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px;
  }

  .dxh-suite-brand {
    min-width: 0;
    flex: 1 1 100%;
  }

  .dxh-suite-status {
    margin-left: auto;
  }

  .dxh-suite-feed {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}
