/* Restored live deployment visual adjustments, 2026-07-05. */
:root {
  --hk-restored-content-max: 1460px;
}

.hero-shell,
.trust-strip-inner,
.section-inner,
.cta-band-inner {
  width: min(var(--hk-restored-content-max), 100%);
}

.hero {
  min-height: min(820px, calc(100svh - 72px));
}

.hero-shell {
  padding: clamp(70px, 8.6vw, 116px) clamp(26px, 5.8vw, 92px) clamp(78px, 8.4vw, 112px);
}

.hero-content {
  max-width: 1080px;
  gap: 22px;
}

.hero-content h1 {
  max-width: 1040px;
}

.hero-content p {
  max-width: 860px;
}

@media (min-width: 980px) {
  .hero-content h1,
  .public-page .hero-content h1 {
    font-size: clamp(58px, 5.2vw, 78px);
    line-height: 0.98;
  }

  .hero-content p {
    font-size: 20px;
    line-height: 1.55;
  }
}

.trust-strip-inner {
  justify-items: start;
  padding-block: 22px;
}

.trust-strip-line {
  width: auto !important;
  max-width: 100%;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.trust-strip .trust-separator {
  display: block !important;
  width: 1px;
  height: 22px;
  flex: 0 0 auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--hk-border-blue-grey) !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.platform-logo-row {
  width: auto !important;
  max-width: 100%;
  padding-left: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px 30px;
  align-items: center;
}

.platform-logo {
  min-width: 0;
  justify-content: flex-start;
}

.platform-logo img {
  flex: 0 0 auto;
}

.service-icon {
  overflow: hidden;
  animation: hk-service-icon-settle 760ms cubic-bezier(0.22, 1, 0.36, 1) 120ms 1 both !important;
}

.service-icon .icon * {
  animation-iteration-count: 1 !important;
  animation-fill-mode: both !important;
}

.service-icon-template .icon-template-frame {
  stroke-dasharray: 72;
  stroke-dashoffset: 72;
  animation: hk-service-stroke-draw 720ms cubic-bezier(0.22, 1, 0.36, 1) 140ms 1 both !important;
}

.service-icon-template .icon-template-header,
.service-icon-template .icon-template-nav {
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  animation: hk-service-stroke-draw 540ms cubic-bezier(0.22, 1, 0.36, 1) 420ms 1 both !important;
}

.service-icon-template .icon-template-tile {
  animation: hk-service-tile-assemble 620ms cubic-bezier(0.22, 1, 0.36, 1) 660ms 1 both !important;
  transform-origin: left center;
}

.service-icon-template .icon-template-tile-two {
  animation-delay: 760ms !important;
}

.service-icon-analytics .icon-analytics-axis,
.service-icon-analytics .icon-analytics-trend {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: hk-service-stroke-draw 760ms cubic-bezier(0.22, 1, 0.36, 1) 180ms 1 both !important;
}

.service-icon-analytics .icon-analytics-trend {
  animation-delay: 720ms !important;
}

.service-icon-analytics .icon-analytics-bar {
  animation: hk-service-bar-rise 620ms cubic-bezier(0.22, 1, 0.36, 1) 520ms 1 both !important;
  transform-origin: center bottom;
}

.service-icon-analytics .icon-analytics-bar-two {
  animation-delay: 620ms !important;
}

.service-icon-analytics .icon-analytics-bar-three {
  animation-delay: 720ms !important;
}

.service-icon-analytics .icon-analytics-dot {
  animation: hk-service-node-pop 420ms cubic-bezier(0.22, 1, 0.36, 1) 980ms 1 both !important;
  transform-origin: center;
}

.service-icon-analytics .icon-analytics-dot-two {
  animation-delay: 1060ms !important;
}

.service-icon-action .icon-action-track {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: hk-service-stroke-draw 560ms cubic-bezier(0.22, 1, 0.36, 1) 180ms 1 both !important;
}

.service-icon-action .icon-action-packet {
  animation: hk-service-packet-route 920ms cubic-bezier(0.22, 1, 0.36, 1) 460ms 1 both !important;
  transform-origin: center;
}

.service-icon-action .icon-action-arrow {
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  animation: hk-service-stroke-draw 500ms cubic-bezier(0.22, 1, 0.36, 1) 700ms 1 both !important;
}

.service-icon-action .icon-action-check {
  stroke-dasharray: 9;
  stroke-dashoffset: 9;
  animation: hk-service-stroke-draw 360ms cubic-bezier(0.22, 1, 0.36, 1) 1040ms 1 both !important;
}

.service-icon-updates .icon-ai-context,
.service-icon-updates .icon-ai-suggestion,
.service-icon-updates .icon-ai-approval {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: hk-service-stroke-draw 620ms cubic-bezier(0.22, 1, 0.36, 1) 260ms 1 both !important;
}

.service-icon-updates .icon-ai-suggestion {
  animation-delay: 720ms !important;
}

.service-icon-updates .icon-ai-suggestion-short {
  animation-delay: 820ms !important;
}

.service-icon-updates .icon-ai-approval {
  animation-delay: 980ms !important;
}

.service-icon-updates .icon-ai-node {
  animation: hk-service-node-pop 520ms cubic-bezier(0.22, 1, 0.36, 1) 480ms 1 both !important;
  transform-origin: center;
}

.service-icon-updates .icon-ai-node-two {
  animation-delay: 580ms !important;
}

.service-icon-updates .icon-ai-node-three {
  animation-delay: 680ms !important;
}

@keyframes hk-service-icon-settle {
  0% {
    opacity: 0.86;
    transform: translate3d(0, 3px, 0) scale(0.96);
  }

  70% {
    opacity: 1;
    transform: translateZ(0) scale(1.035);
  }

  100% {
    opacity: 1;
    transform: translateZ(0) scale(1);
  }
}

@keyframes hk-service-stroke-draw {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes hk-service-tile-assemble {
  0% {
    opacity: 0;
    transform: translate3d(-4px, 0, 0) scaleX(0.45);
  }

  72% {
    opacity: 1;
    transform: translateZ(0) scaleX(1.08);
  }

  100% {
    opacity: 1;
    transform: translateZ(0) scaleX(1);
  }
}

@keyframes hk-service-bar-rise {
  0% {
    opacity: 0;
    transform: scaleY(0.2);
  }

  72% {
    opacity: 1;
    transform: scaleY(1.12);
  }

  100% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes hk-service-node-pop {
  0% {
    opacity: 0;
    transform: scale(0.42);
  }

  70% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hk-service-packet-route {
  0% {
    opacity: 0;
    transform: translate3d(-2px, 0, 0) scale(0.66);
  }

  28% {
    opacity: 1;
    transform: translateZ(0) scale(1);
  }

  72% {
    opacity: 1;
    transform: translate3d(8.5px, 0, 0) scale(1);
  }

  100% {
    opacity: 1;
    transform: translate3d(10px, 0, 0) scale(0.72);
  }
}

.cta-band-inner {
  width: min(var(--hk-restored-content-max), calc(100% - 56px));
  max-width: none !important;
  padding-left: 0;
  padding-right: 0;
}

.cta-band-primary,
.site-footer {
  width: 100%;
}

@media (min-width: 980px) {
  .cta-band-primary {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 760px) {
  .trust-strip-line {
    gap: 9px 14px;
  }

  .trust-strip .trust-separator {
    display: none !important;
  }

  .platform-logo-row {
    gap: 10px 18px;
  }

  .platform-logo {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .hero-shell,
  .cta-band-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cta-band-inner {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-icon,
  .service-icon .icon * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* Internal console restore: protected CRM and usage workspaces only. */
.app-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}

.internal-nav {
  z-index: 30;
  width: 72px;
  overflow: hidden;
  gap: 22px;
  padding: 22px 14px;
  transition: width 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.internal-nav:hover,
.internal-nav:focus-within {
  width: 272px;
  background: rgba(6, 40, 61, 0.98);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.22);
}

.internal-nav .brand-link,
.internal-nav nav a,
.internal-nav .button,
.internal-nav .nav-user {
  width: 44px;
  min-width: 44px;
  justify-content: center;
  overflow: hidden;
  padding-inline: 0;
  transition: width 180ms ease, padding 180ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.internal-nav:hover .brand-link,
.internal-nav:focus-within .brand-link,
.internal-nav:hover nav a,
.internal-nav:focus-within nav a,
.internal-nav:hover .button,
.internal-nav:focus-within .button,
.internal-nav:hover .nav-user,
.internal-nav:focus-within .nav-user {
  width: 100%;
  justify-content: flex-start;
  padding-inline: 12px;
}

.internal-nav .brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.internal-nav .brand-mark::before,
.internal-nav .brand-mark::after,
.internal-nav .brand-mark span {
  display: none;
}

.internal-nav .brand-mark img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.internal-nav .nav-user {
  padding-inline: 4px;
}

.internal-nav .nav-label {
  width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 140ms ease, width 180ms ease;
}

.internal-nav:hover .nav-label,
.internal-nav:focus-within .nav-label {
  width: auto;
  opacity: 1;
}

.internal-nav .nav-dot {
  position: absolute;
  right: 8px;
}

.internal-nav:hover .nav-dot,
.internal-nav:focus-within .nav-dot {
  position: static;
  margin-left: auto;
}

.internal-nav nav a.active::before {
  left: -4px;
}

.topbar-user {
  position: relative;
}

.profile-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  display: grid;
  width: min(320px, calc(100vw - 32px));
  gap: 14px;
  border: 1px solid rgba(130, 205, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 24, 39, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  color: var(--hk-portal-text);
  padding: 16px;
}

.profile-popover-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-popover-header div,
.profile-popover dl,
.profile-popover dl div {
  display: grid;
  gap: 3px;
}

.profile-popover dl {
  margin: 0;
  gap: 10px;
}

.profile-popover dd {
  color: #e8f4ff;
}

.app-main.crm-main,
.app-main.usage-main {
  max-width: none;
  padding: 24px clamp(20px, 2.4vw, 40px);
}

.app-main.crm-main .topbar {
  margin-bottom: 14px;
}

.app-main.crm-main .app-header,
.app-main.usage-main .app-header {
  align-items: center;
  margin-bottom: 14px;
}

.app-main.crm-main .app-header > div:first-child,
.app-main.usage-main .app-header > div:first-child {
  gap: 0;
}

.app-main.crm-main .app-header h1,
.app-main.usage-main .app-header h1 {
  font-size: clamp(34px, 3.2vw, 50px);
  line-height: 1;
}

.app-main.crm-main .app-header-actions,
.app-main.usage-main .app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-add-button {
  position: relative;
  overflow: hidden;
  border-color: rgba(83, 205, 255, 0.42) !important;
  animation: crm-add-pulse 4.8s ease-in-out infinite;
}

.crm-add-button:hover,
.crm-add-button:focus-visible {
  animation-play-state: paused;
}

.crm-kpi-grid,
.usage-kpi-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.crm-kpi-grid,
.usage-kpi-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.crm-kpi-card,
.usage-kpi-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 104px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(130, 205, 255, 0.11);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 0%, rgba(86, 199, 255, 0.11), transparent 64%),
    linear-gradient(180deg, rgba(18, 76, 117, 0.56), rgba(8, 43, 68, 0.66));
  color: var(--hk-portal-text);
  padding: 14px 10px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

button.crm-kpi-card {
  cursor: pointer;
  font: inherit;
}

.crm-kpi-card:hover,
.crm-kpi-card:focus-visible,
.usage-kpi-card:hover,
.usage-kpi-card:focus-visible {
  border-color: rgba(83, 205, 255, 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(86, 199, 255, 0.16), transparent 64%),
    linear-gradient(180deg, rgba(20, 86, 132, 0.62), rgba(8, 43, 68, 0.7));
  outline: none;
  transform: translate3d(0, -2px, 0);
}

.crm-kpi-card strong,
.usage-kpi-card strong {
  color: #ffffff;
  font-size: clamp(26px, 2.6vw, 44px);
  font-weight: 760;
  line-height: 0.95;
  white-space: nowrap;
}

.crm-kpi-card span,
.usage-kpi-card span {
  color: #b7cce0;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.usage-kpi-info {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  place-items: center;
  border: 1px solid rgba(130, 205, 255, 0.24);
  border-radius: 999px;
  color: #d7edff;
  font-size: 10px;
  font-style: normal;
  text-transform: none;
}

.usage-trend-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 40;
  display: grid;
  min-width: 180px;
  gap: 3px;
  border: 1px solid rgba(130, 205, 255, 0.2);
  border-radius: 10px;
  background: rgba(4, 18, 33, 0.96);
  color: #edf7ff;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  text-align: left;
  transform: translate3d(-50%, 4px, 0);
  transition: opacity 140ms ease, transform 140ms ease;
}

.usage-kpi-card:hover .usage-trend-tooltip,
.usage-kpi-card:focus-within .usage-trend-tooltip {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.usage-trend-tooltip b,
.usage-trend-tooltip em {
  font-size: 11px;
  font-style: normal;
}

.usage-kpi-card.is-positive strong,
.usage-trend-tooltip .is-positive {
  color: #bbf7d0;
}

.usage-kpi-card.is-negative strong,
.usage-trend-tooltip .is-negative {
  color: #fecaca;
}

.usage-trend-tooltip .is-neutral {
  color: #d9e7f4;
}

.crm-action-health-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.crm-action-health-strip div {
  display: grid;
  min-height: 62px;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border: 1px solid rgba(130, 205, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.crm-action-health-strip strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.crm-action-health-strip span {
  color: #a9bfd4;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.crm-control-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.crm-view-toggle {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.crm-add-panel,
.usage-chart-card,
.usage-pages-card {
  padding: 18px;
}

.crm-table {
  display: grid;
  overflow: visible;
  border: 1px solid rgba(130, 205, 255, 0.13);
  border-radius: 12px;
  background: rgba(8, 42, 65, 0.5);
}

.crm-table-shell {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 4px;
}

.crm-table-shell .crm-table {
  width: max-content;
  min-width: 100%;
}

.crm-table-item {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.crm-table-item:first-of-type {
  border-top: 0;
}

.crm-table-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.05fr) 132px 132px 118px 90px minmax(280px, 1.75fr) 136px 132px;
  min-width: 1312px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 9px 14px;
}

.crm-table-row > :nth-child(2),
.crm-table-row > :nth-child(3),
.crm-table-row > :nth-child(4),
.crm-table-row > :nth-child(5),
.crm-table-row > :nth-child(7),
.crm-table-row > :nth-child(8) {
  justify-self: center;
  text-align: center;
}

.crm-table-row > :nth-child(1),
.crm-table-row > :nth-child(6) {
  justify-self: stretch;
  text-align: left;
}

.crm-table-head {
  min-height: 38px;
  background: rgba(255, 255, 255, 0.08);
  color: #a9bfd4;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-opportunity-row {
  min-height: 48px;
  background: rgba(12, 61, 94, 0.52);
  transition: background 150ms ease, transform 150ms ease;
}

.crm-opportunity-row:hover,
.crm-opportunity-row:focus-visible {
  background: rgba(22, 86, 128, 0.62);
  outline: none;
}

.crm-opportunity-row span {
  display: inline-flex;
  justify-content: inherit;
}

.crm-total-row {
  min-height: 46px;
  border-top: 1px solid rgba(130, 205, 255, 0.16);
  border-bottom: 1px solid rgba(130, 205, 255, 0.1);
  background:
    linear-gradient(90deg, rgba(83, 205, 255, 0.08), transparent 70%),
    rgba(3, 20, 34, 0.62);
}

.crm-total-row strong,
.crm-total-row span {
  color: #ffffff;
  font-weight: 820;
}

.company-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.company-cell > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-opportunity-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.62);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.crm-table-item.is-priority-opportunity .crm-opportunity-row {
  background:
    linear-gradient(90deg, rgba(83, 205, 255, 0.11), rgba(12, 61, 94, 0.52) 34%),
    rgba(12, 61, 94, 0.52);
}

.next-action-cell {
  position: relative;
  display: block !important;
  overflow: visible !important;
  color: #ffffff !important;
  font-weight: 680;
}

.next-action-text {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: ellipsis;
  white-space: normal;
}

.next-action-cell::after {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 20;
  width: max-content;
  max-width: min(420px, 42vw);
  border: 1px solid rgba(130, 205, 255, 0.2);
  border-radius: 10px;
  background: rgba(4, 18, 33, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  color: #edf7ff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  text-align: left;
  transform: translate3d(0, 4px, 0);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.next-action-cell:hover::after,
.next-action-cell:focus-visible::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.crm-row-actions {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.crm-action-button,
.crm-edit-button,
.crm-delete-button,
.crm-edit-modal-header button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(130, 205, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #dceeff;
}

.crm-action-button {
  grid-template-columns: auto auto;
  width: auto;
  min-width: 44px;
  padding: 0 8px;
}

.crm-action-button.has-overdue-actions {
  border-color: rgba(248, 113, 113, 0.48);
  color: #fecaca;
}

.crm-delete-button {
  color: #fecaca;
}

.crm-expanded-row {
  display: grid;
  gap: 16px;
  border-top: 1px solid rgba(130, 205, 255, 0.1);
  background: rgba(3, 20, 34, 0.46);
  padding: 16px;
}

.crm-expanded-details,
.crm-edit-grid,
.crm-edit-modal-grid,
.crm-action-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.crm-expanded-details {
  margin: 0;
}

.crm-expanded-details div {
  display: grid;
  gap: 3px;
}

.crm-expanded-details dd {
  overflow-wrap: anywhere;
}

.crm-checkbox-field {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(144, 216, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef6;
  padding: 8px 10px;
}

.crm-checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--hk-sky);
}

.crm-checkbox-field span {
  color: #d9ecff;
  font-size: 12px;
  font-weight: 780;
}

.crm-main input[type="date"] {
  color-scheme: dark;
}

.crm-main .status-pill {
  min-height: 22px;
  justify-content: center;
  padding: 3px 8px;
  font-size: 10px;
  line-height: 1;
}

.crm-main .status-pill.neutral {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.crm-main .status-pill.warning,
.crm-main .status-pill.medium {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.crm-main .status-pill.royal {
  border-color: rgba(59, 130, 246, 0.42);
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
}

.crm-main .status-pill.filled,
.crm-main .status-pill.high {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.crm-main .status-pill.signed {
  border-color: rgba(20, 184, 166, 0.68);
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.26), rgba(5, 150, 105, 0.2));
  color: #ccfbf1;
}

.crm-main .status-pill.ready {
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
}

.crm-main .status-pill.complete {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(22, 163, 74, 0.1);
  color: #c7f9d4;
}

.crm-main .status-pill.low,
.crm-main .status-pill.lost {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.13);
  color: #fecaca;
}

.crm-main .status-pill.overdue {
  border-color: rgba(248, 113, 113, 0.82);
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.34), rgba(127, 29, 29, 0.28)),
    rgba(239, 68, 68, 0.2);
  color: #ffffff;
}

.crm-table-item.is-overdue .crm-opportunity-row {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(12, 61, 94, 0.52));
}

.crm-table-item.is-no-next-action .crm-opportunity-row {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.17), rgba(12, 61, 94, 0.52));
}

.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(2, 10, 18, 0.72);
  padding: 20px;
}

.crm-edit-modal {
  display: grid;
  width: min(920px, 100%);
  max-height: min(840px, calc(100svh - 40px));
  overflow: auto;
  gap: 16px;
  border: 1px solid rgba(130, 205, 255, 0.22);
  border-radius: 16px;
  background: #06283d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  color: var(--hk-portal-text);
  padding: 20px;
}

.crm-edit-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.crm-edit-modal-header h2 {
  color: #ffffff;
}

.crm-edit-modal-grid .form-field:nth-of-type(4),
.crm-edit-modal-grid .crm-edit-modal-actions {
  grid-column: 1 / -1;
}

.crm-edit-modal-actions,
.crm-action-record-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.crm-action-modal {
  width: min(860px, 100%);
}

.crm-action-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crm-action-modal-summary div {
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 1px solid rgba(130, 205, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.crm-action-list {
  display: grid;
  gap: 8px;
}

.crm-action-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(130, 205, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.crm-action-record > div:first-child {
  display: grid;
  gap: 5px;
}

.crm-action-record span,
.crm-action-empty {
  color: #a9bfd4;
}

.usage-cockpit {
  display: grid;
  gap: 18px;
}

.usage-dashboard {
  grid-template-columns: minmax(0, 1fr) clamp(240px, 20vw, 330px);
  align-items: start;
  gap: 14px;
}

.usage-chart-card {
  min-height: 0;
  overflow: hidden;
}

.usage-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.usage-chart-header h2,
.usage-pages-card h2,
.usage-events-section h2 {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.usage-date-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(130, 205, 255, 0.18);
  border-radius: 999px;
  background: rgba(83, 205, 255, 0.08);
  color: #dff4ff;
  font-size: 12px;
  font-weight: 760;
  padding: 7px 10px;
}

.usage-date-filter span {
  color: #8fdcff;
}

.usage-date-filter.is-muted {
  border-color: rgba(130, 205, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #a9bfd4;
}

.usage-combo-chart {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.usage-chart-plot {
  position: relative;
  height: 352px;
  overflow: hidden;
  padding-top: 12px;
}

.usage-visitors-line {
  position: absolute;
  inset: 18px 0 52px;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.usage-visitors-line polyline {
  fill: none;
  stroke: rgba(95, 213, 255, 0.76);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.usage-visitors-line circle {
  fill: #c7f3ff;
  opacity: 0.72;
}

.usage-secondary-axis {
  position: absolute;
  inset: 22px 0 54px auto;
  z-index: 1;
  display: grid;
  align-content: space-between;
  color: #6f8ba5;
  font-size: 10px;
  pointer-events: none;
}

.usage-chart-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(var(--usage-day-count), minmax(68px, 1fr));
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.usage-chart-day {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 34px;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
}

.usage-chart-day:focus-visible {
  outline: 2px solid rgba(95, 213, 255, 0.85);
  outline-offset: 3px;
}

.usage-chart-day.is-selected .usage-pageviews-bar {
  box-shadow: 0 0 0 2px rgba(95, 213, 255, 0.42), 0 0 22px rgba(95, 213, 255, 0.24);
}

.usage-chart-bars {
  position: relative;
  display: flex;
  height: auto;
  min-height: 0;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid rgba(185, 205, 224, 0.14);
  padding-top: 26px;
}

.usage-chart-bars i {
  position: relative;
  z-index: 3;
  display: block;
  width: clamp(16px, 2.1vw, 30px);
  min-height: 0;
  border-radius: 999px 999px 3px 3px;
  transition: filter 160ms ease;
}

.usage-chart-day:hover .usage-chart-bars i {
  filter: brightness(1.12);
}

.usage-pageviews-bar {
  background: linear-gradient(180deg, #3b82f6, #1d4f9e);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.22);
}

.usage-bar-value {
  position: absolute;
  z-index: 5;
  bottom: min(calc(var(--bar-height, 0%) + 9px), calc(100% - 16px));
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(3, 10, 18, 0.38);
}

.usage-chart-day small {
  display: flex;
  min-height: 0;
  align-items: flex-start;
  justify-content: center;
  color: #b7cce0;
  font-size: 11px;
  line-height: 1.15;
}

.usage-chart-tooltip {
  position: fixed;
  z-index: 90;
  display: grid;
  width: 240px;
  gap: 6px;
  border: 1px solid rgba(130, 205, 255, 0.22);
  border-radius: 12px;
  background: rgba(4, 18, 33, 0.98);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.36);
  color: #edf7ff;
  padding: 12px;
  pointer-events: none;
}

.usage-chart-tooltip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c8daec;
  font-size: 12px;
}

.usage-chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.legend-pageviews {
  background: #3b82f6;
}

.legend-visitors {
  background: #5fd5ff;
}

.usage-tooltip-hint {
  color: #8fdcff !important;
}

.usage-pages-card {
  gap: 14px;
}

.usage-list,
.usage-event-list {
  gap: 8px;
}

.usage-pages-card .usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(185, 205, 224, 0.09);
  color: #b7cce0;
  padding: 7px 0;
}

.usage-pages-card .usage-row:last-child {
  border-bottom: 0;
}

.usage-pages-card .usage-row span,
.usage-pages-card .usage-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-pages-card .usage-row strong {
  color: #ffffff;
}

.usage-events-section {
  margin-top: 2px;
  opacity: 0.92;
}

.usage-events-section .section-heading {
  margin-bottom: 8px;
}

.usage-feed-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.usage-feed-title > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 760;
  padding: 5px 8px;
}

.usage-feed-title i,
.usage-event-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.usage-event-table-head,
.usage-event-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(110px, 1.1fr) minmax(88px, 0.85fr) minmax(150px, 1.3fr) minmax(92px, 0.75fr) minmax(68px, 0.62fr) minmax(68px, 0.62fr) minmax(68px, 0.62fr) minmax(120px, 0.9fr);
  gap: 10px;
  align-items: center;
  min-width: 1060px;
}

.usage-event-table-head {
  border-bottom: 1px solid rgba(185, 205, 224, 0.12);
  color: #7897b2;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  padding: 0 0 8px;
  text-transform: uppercase;
}

.usage-event-table {
  overflow-x: auto;
}

.usage-event-row {
  min-height: 38px;
  border-bottom: 1px solid rgba(185, 205, 224, 0.08);
  color: #c8daec;
  padding: 7px 0;
}

.usage-event-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.usage-event-row strong {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #f7fbff;
  font-size: 12px;
}

.usage-event-row span:not(.usage-event-live),
.usage-event-row time {
  overflow: hidden;
  color: #a9bfd4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes crm-add-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(83, 205, 255, 0), 0 0 0 0 rgba(83, 205, 255, 0);
  }

  46% {
    box-shadow: 0 0 26px rgba(83, 205, 255, 0.2), 0 0 0 6px rgba(83, 205, 255, 0.045);
  }
}

@media (max-width: 1280px) {
  .crm-kpi-grid,
  .usage-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .usage-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .internal-nav {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .internal-nav:hover,
  .internal-nav:focus-within {
    width: auto;
  }

  .internal-nav .brand-link,
  .internal-nav nav a,
  .internal-nav .button,
  .internal-nav .nav-user {
    width: auto;
    min-width: 44px;
    padding-inline: 10px;
  }

  .internal-nav .nav-label {
    width: auto;
    opacity: 1;
  }

  .internal-nav nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1 1 100%;
  }

  .app-main.crm-main,
  .app-main.usage-main {
    padding: 22px 18px;
  }

  .app-main.crm-main .app-header,
  .app-main.usage-main .app-header {
    align-items: flex-start;
  }

  .crm-kpi-grid,
  .usage-kpi-grid,
  .crm-control-strip,
  .crm-action-health-strip,
  .crm-action-modal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-table,
  .usage-chart-card {
    overflow-x: auto;
    overflow-y: visible;
  }

  .usage-chart-plot {
    min-width: 700px;
  }

  .usage-event-table-head,
  .usage-event-table {
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .crm-kpi-grid,
  .usage-kpi-grid,
  .crm-control-strip,
  .crm-action-health-strip,
  .crm-expanded-details,
  .crm-edit-grid,
  .crm-edit-modal-grid,
  .crm-action-add-form,
  .crm-action-record,
  .crm-action-modal-summary {
    grid-template-columns: 1fr;
  }

  .crm-view-toggle,
  .crm-edit-modal-actions,
  .crm-action-record-buttons {
    justify-content: flex-start;
  }

  .usage-feed-title {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .internal-nav,
  .internal-nav .brand-link,
  .internal-nav nav a,
  .internal-nav .button,
  .internal-nav .nav-user,
  .internal-nav .nav-label,
  .crm-add-button,
  .crm-kpi-card,
  .usage-kpi-card,
  .next-action-cell::after,
  .usage-chart-bars i {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
