/* Immersive portfolio overview and repaired CRM board.
   Loaded after the legacy prototype styles so the deployed demo and Vite source
   share one visual/runtime contract. */

aside .side,
.sidebar-note {
  display: none !important;
}

.immersive-host {
  display: block !important;
  min-width: 0;
}

.immersive-overview,
.immersive-leads {
  --ix-bg: #070b15;
  --ix-panel: rgba(14, 21, 38, 0.88);
  --ix-panel-soft: rgba(255, 255, 255, 0.055);
  --ix-line: rgba(255, 255, 255, 0.1);
  --ix-text: #f7f9ff;
  --ix-muted: #9aa6bd;
  --ix-blue: #6ea8ff;
  --ix-cyan: #4de4e4;
  --ix-green: #4fe0a1;
  --ix-amber: #ffbd68;
  --ix-red: #ff747d;
  --ix-violet: #9d86ff;
  min-width: 0;
  color: var(--ix-text);
}

.immersive-overview button,
.immersive-leads button {
  font: inherit;
}

.immersive-overview a,
.immersive-leads a {
  color: inherit;
  text-decoration: none;
}

.ix-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.ix-page-head__copy {
  min-width: 0;
}

.ix-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: #3775f4;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ix-eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(55, 117, 244, 0.12);
  content: "";
}

.ix-page-head h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(31px, 4vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.ix-page-head p {
  max-width: 720px;
  margin: 12px 0 0;
  color: #667085;
  font-size: 15px;
}

.ix-head-actions,
.ix-scene-actions,
.ix-lead-toolbar,
.ix-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.ix-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 14px;
  background: #fff;
  color: #172033 !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ix-button:hover {
  transform: translateY(-1px);
  border-color: rgba(55, 117, 244, 0.35);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ix-button--dark {
  border-color: #111827;
  background: #111827;
  color: #fff !important;
}

.ix-button--glass {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  box-shadow: none;
}

.ix-button--icon {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 13px;
}

.ix-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ix-metric {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 14px 15px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.ix-metric::after {
  position: absolute;
  top: -22px;
  right: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--metric-color, #3775f4);
  opacity: 0.1;
  content: "";
}

.ix-metric span,
.ix-metric small {
  position: relative;
  z-index: 1;
  display: block;
  color: #667085;
  font-size: 11px;
}

.ix-metric strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 5px 0 2px;
  color: #101828;
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ix-portfolio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: stretch;
}

.ix-scene-panel {
  position: relative;
  min-width: 0;
  min-height: 580px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 5%, rgba(76, 117, 255, 0.28), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(77, 228, 228, 0.12), transparent 28%),
    linear-gradient(150deg, #111b34 0%, #090e1b 52%, #050812 100%);
  box-shadow: 0 28px 70px rgba(7, 12, 25, 0.28);
  isolation: isolate;
}

.ix-scene-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 90%);
  content: "";
}

.ix-scene-top {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 18px;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.ix-scene-title {
  max-width: 430px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(6, 10, 20, 0.46);
  backdrop-filter: blur(14px);
}

.ix-scene-title b {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 14px;
}

.ix-scene-title span {
  color: var(--ix-muted);
  font-size: 12px;
}

.ix-scene-actions {
  justify-content: flex-end;
  pointer-events: auto;
}

.ix-scene-stage {
  --tilt: 58deg;
  --spin: -34deg;
  --zoom: 1;
  position: absolute;
  inset: 78px 0 82px;
  overflow: hidden;
  perspective: 1150px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ix-scene-stage.is-dragging {
  cursor: grabbing;
}

.ix-scene-world {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 690px;
  height: 460px;
  transform: translate(-50%, -48%) rotateX(var(--tilt)) rotateZ(var(--spin)) scale(var(--zoom));
  transform-style: preserve-3d;
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
}

.ix-scene-stage.is-dragging .ix-scene-world {
  transition: none;
}

.ix-ground {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(126, 173, 255, 0.2);
  border-radius: 52px;
  background:
    radial-gradient(circle at 50% 38%, rgba(74, 121, 255, 0.16), transparent 52%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 46px),
    linear-gradient(135deg, rgba(31, 47, 78, 0.9), rgba(10, 16, 29, 0.92));
  box-shadow: inset 0 0 80px rgba(72, 110, 225, 0.09), 0 0 100px rgba(35, 74, 168, 0.18);
  transform: translateZ(-3px);
}

.ix-ground::before,
.ix-ground::after {
  position: absolute;
  border: 1px solid rgba(116, 175, 255, 0.16);
  border-radius: 34px;
  content: "";
}

.ix-ground::before {
  inset: 58px 84px;
}

.ix-ground::after {
  inset: 126px 190px;
}

.ix-scene-object {
  --object-color: #6ea8ff;
  position: absolute;
  width: 124px;
  height: 94px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate3d(var(--x), var(--y), 2px);
  transform-style: preserve-3d;
  cursor: pointer;
}

.ix-scene-object[data-tone="green"] { --object-color: #4fe0a1; }
.ix-scene-object[data-tone="amber"] { --object-color: #ffbd68; }
.ix-scene-object[data-tone="red"] { --object-color: #ff747d; }
.ix-scene-object[data-tone="violet"] { --object-color: #9d86ff; }
.ix-scene-object[data-tone="blue"] { --object-color: #6ea8ff; }

.ix-building {
  position: absolute;
  inset: 8px 14px 16px 10px;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.ix-scene-object:hover .ix-building,
.ix-scene-object.is-selected .ix-building {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--object-color) 50%, transparent));
  transform: translateZ(10px);
}

.ix-building__roof,
.ix-building__front,
.ix-building__side {
  position: absolute;
  border: 1px solid rgba(255,255,255,.28);
  background: color-mix(in srgb, var(--object-color) 76%, #1a2440);
  box-shadow: inset 0 0 18px rgba(255,255,255,.08);
  backface-visibility: hidden;
}

.ix-building__roof {
  inset: 0;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.3), transparent 45%),
    color-mix(in srgb, var(--object-color) 80%, #24304f);
  transform: translateZ(46px);
}

.ix-building__front {
  right: 0;
  bottom: 0;
  left: 0;
  height: 46px;
  border-radius: 0 0 10px 10px;
  background:
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(255,255,255,.14) 17px 20px),
    color-mix(in srgb, var(--object-color) 54%, #101827);
  transform: rotateX(-90deg) translateZ(23px);
  transform-origin: bottom;
}

.ix-building__side {
  top: 0;
  right: 0;
  width: 46px;
  height: 100%;
  border-radius: 0 10px 10px 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(255,255,255,.13) 17px 20px),
    color-mix(in srgb, var(--object-color) 38%, #0d1425);
  transform: rotateY(90deg) translateZ(23px);
  transform-origin: right;
}

.ix-object-beacon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.82);
  border-radius: 50%;
  background: var(--object-color);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--object-color) 36%, transparent);
  transform: translate(-50%, -50%) translateZ(72px);
  animation: ix-pulse 2.2s infinite;
}

.ix-object-label {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 118px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(7, 11, 21, 0.86);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  text-align: left;
  transform: translate(-50%, -100%) translateZ(82px) rotateZ(calc(var(--spin) * -1)) rotateX(calc(var(--tilt) * -1));
  transform-origin: center;
  pointer-events: none;
}

.ix-object-label strong,
.ix-object-label small {
  display: block;
}

.ix-object-label strong {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ix-object-label small {
  margin-top: 2px;
  color: #aeb9cf;
  font-size: 9px;
}

.ix-scene-object.is-selected .ix-object-label {
  border-color: color-mix(in srgb, var(--object-color) 68%, white);
  background: rgba(11, 18, 35, 0.96);
}

.ix-scene-bottom {
  position: absolute;
  right: 18px;
  bottom: 17px;
  left: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.ix-scene-hint,
.ix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(5, 9, 18, 0.52);
  color: #aeb9cf;
  backdrop-filter: blur(12px);
  font-size: 10px;
  pointer-events: auto;
}

.ix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ix-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--legend-color);
}

.ix-object-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0, rgba(85, 114, 255, 0.16), transparent 45%),
    linear-gradient(160deg, #121b30, #080d19);
  box-shadow: 0 26px 65px rgba(7, 12, 25, 0.24);
}

.ix-object-panel__hero {
  position: relative;
  min-height: 184px;
  padding: 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--ix-line);
}

.ix-object-panel__hero::after {
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--active-color, #6ea8ff);
  filter: blur(10px);
  opacity: 0.17;
  content: "";
}

.ix-status-pill,
.ix-source-pill,
.ix-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 850;
}

.ix-status-pill {
  position: relative;
  z-index: 1;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--active-color, #6ea8ff) 18%, transparent);
  color: color-mix(in srgb, var(--active-color, #6ea8ff) 78%, white);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ix-object-panel h2 {
  position: relative;
  z-index: 1;
  margin: 15px 0 5px;
  color: #fff;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.ix-object-panel__hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ix-muted);
  font-size: 12px;
}

.ix-progress-orbit {
  position: absolute;
  right: 22px;
  bottom: 19px;
  z-index: 2;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--active-color, #6ea8ff) var(--progress, 68%), rgba(255,255,255,.09) 0);
  box-shadow: 0 10px 30px rgba(0,0,0,.26);
}

.ix-progress-orbit::before {
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #0d1527;
  content: "";
}

.ix-progress-orbit strong,
.ix-progress-orbit small {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.ix-progress-orbit strong {
  font-size: 19px;
}

.ix-progress-orbit small {
  color: #8d9ab2;
  font-size: 8px;
}

.ix-object-panel__body {
  display: grid;
  gap: 15px;
  padding: 18px 20px 20px;
}

.ix-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ix-detail-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--ix-line);
  border-radius: 13px;
  background: var(--ix-panel-soft);
}

.ix-detail-item span,
.ix-detail-item strong {
  display: block;
}

.ix-detail-item span {
  margin-bottom: 4px;
  color: #8490a8;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ix-detail-item strong {
  overflow: hidden;
  color: #f7f9ff;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ix-risk-card {
  padding: 12px 13px;
  border: 1px solid rgba(255, 189, 104, 0.18);
  border-radius: 14px;
  background: rgba(255, 189, 104, 0.08);
}

.ix-risk-card b,
.ix-risk-card span {
  display: block;
}

.ix-risk-card b {
  margin-bottom: 3px;
  color: #ffcf8d;
  font-size: 11px;
}

.ix-risk-card span {
  color: #b7c0d1;
  font-size: 11px;
  line-height: 1.45;
}

.ix-mini-feed {
  display: grid;
  gap: 8px;
}

.ix-mini-feed__row {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  gap: 8px;
  align-items: center;
  color: #dce3f1;
  font-size: 10px;
}

.ix-mini-feed__row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--active-color, #6ea8ff);
}

.ix-mini-feed__row time {
  color: #77849d;
}

.ix-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.ix-panel-actions .ix-button {
  width: 100%;
  min-width: 0;
}

.ix-object-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ix-object-card {
  --card-color: #6ea8ff;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: #172033;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ix-object-card:hover,
.ix-object-card.is-selected {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--card-color) 60%, #fff);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--card-color) 16%, transparent);
}

.ix-object-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: color-mix(in srgb, var(--card-color) 16%, #fff);
  color: color-mix(in srgb, var(--card-color) 70%, #101828);
  font-size: 16px;
  font-weight: 950;
}

.ix-object-card strong,
.ix-object-card small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ix-object-card strong {
  font-size: 12px;
}

.ix-object-card small {
  margin-top: 3px;
  color: #667085;
  font-size: 9px;
}

.ix-object-card__progress {
  color: color-mix(in srgb, var(--card-color) 72%, #101828);
  font-size: 13px;
  font-weight: 950;
}

.ix-activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 12px;
  margin-top: 12px;
}

.ix-light-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 19px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 12px 28px rgba(15,23,42,.05);
}

.ix-light-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ix-light-card h3 {
  margin: 0;
  color: #101828;
  font-size: 15px;
}

.ix-light-card__head span {
  color: #98a2b3;
  font-size: 10px;
}

.ix-alert-list,
.ix-team-list {
  display: grid;
  gap: 8px;
}

.ix-alert-row,
.ix-team-row {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(16,24,40,.075);
  border-radius: 13px;
  background: #f9fafb;
}

.ix-alert-row {
  grid-template-columns: 8px 1fr auto;
}

.ix-alert-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alert-color, #ffbd68);
}

.ix-alert-row strong,
.ix-alert-row span,
.ix-team-row strong,
.ix-team-row span {
  display: block;
}

.ix-alert-row strong,
.ix-team-row strong {
  color: #344054;
  font-size: 11px;
}

.ix-alert-row span,
.ix-team-row span {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 9px;
}

.ix-alert-row time {
  color: #667085;
  font-size: 9px;
}

.ix-team-row {
  grid-template-columns: 34px 1fr auto;
}

.ix-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #111827, #3775f4);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.ix-team-row b {
  color: #16a36f;
  font-size: 10px;
}

/* Leads board */
.immersive-leads {
  color: #101828;
}

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

.ix-lead-summary__item {
  padding: 13px 14px;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 24px rgba(15,23,42,.045);
}

.ix-lead-summary__item span,
.ix-lead-summary__item strong {
  display: block;
}

.ix-lead-summary__item span {
  color: #667085;
  font-size: 10px;
}

.ix-lead-summary__item strong {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -.04em;
}

.ix-lead-toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 17px;
  background: rgba(255,255,255,.75);
}

.ix-filter-chip {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(16,24,40,.08);
  background: #fff;
  color: #667085;
  font-size: 10px;
  cursor: pointer;
}

.ix-filter-chip.is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.ix-lead-search {
  min-width: 220px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(16,24,40,.1);
  border-radius: 12px;
  background: #fff;
  color: #344054;
}

.ix-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 2px 1px 12px;
  overscroll-behavior-x: contain;
}

.ix-kanban-column {
  min-width: 0;
  min-height: 445px;
  padding: 12px;
  border: 1px solid rgba(16,24,40,.065);
  border-radius: 20px;
  background: rgba(236,240,246,.82);
}

.ix-kanban-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
  padding: 1px 3px;
}

.ix-kanban-column__head strong {
  font-size: 12px;
}

.ix-kanban-column__head span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  color: #667085;
  font-size: 10px;
  font-weight: 900;
}

.ix-kanban-list {
  display: grid;
  gap: 9px;
}

.ix-lead-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15,23,42,.045);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.ix-lead-card:hover {
  transform: translateY(-2px);
  border-color: rgba(55,117,244,.35);
  box-shadow: 0 13px 26px rgba(15,23,42,.09);
}

.ix-lead-card__top,
.ix-lead-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ix-source-pill {
  padding: 5px 8px;
  background: #edf3ff;
  color: #245fd8;
  font-size: 9px;
}

.ix-source-pill[data-source="Telegram"] { background:#eaf8ff;color:#0878a6; }
.ix-source-pill[data-source="Сайт"] { background:#f0ecff;color:#6848c7; }
.ix-source-pill[data-source="Рекомендация"] { background:#ecfdf3;color:#087b55; }

.ix-lead-card__age {
  color: #98a2b3;
  font-size: 9px;
}

.ix-lead-card h3 {
  margin: 0;
  color: #101828;
  font-size: 14px;
}

.ix-lead-card__request {
  margin: -5px 0 0;
  color: #475467;
  font-size: 11px;
  line-height: 1.42;
}

.ix-lead-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.ix-lead-card__meta span {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
  color: #667085;
  font-size: 9px;
}

.ix-lead-card__meta b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ix-lead-card__footer {
  padding-top: 9px;
  border-top: 1px solid #eef1f5;
}

.ix-next-action {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 9px;
}

.ix-next-action i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffbd68;
}

.ix-lead-owner {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #111827;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}

.ix-empty-drop {
  min-height: 68px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(16,24,40,.15);
  border-radius: 14px;
  color: #98a2b3;
  font-size: 9px;
}

@keyframes ix-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--object-color) 34%, transparent); }
  55% { box-shadow: 0 0 0 14px transparent; }
}

@media (max-width: 1320px) {
  .ix-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ix-portfolio-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .ix-object-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ix-kanban { grid-template-columns: repeat(4, 280px); }
}

@media (max-width: 1030px) {
  .ix-portfolio-grid { grid-template-columns: 1fr; }
  .ix-scene-panel { min-height: 570px; }
  .ix-object-panel { display: grid; grid-template-columns: minmax(250px,.8fr) minmax(0,1.2fr); }
  .ix-object-panel__hero { border-right: 1px solid var(--ix-line); border-bottom: 0; }
  .ix-object-panel__body { grid-template-columns: 1fr 1fr; align-content: center; }
  .ix-panel-actions { grid-column: 1/-1; }
  .ix-activity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .ix-page-head { display: grid; align-items: start; }
  .ix-page-head h1 { font-size: 36px; }
  .ix-head-actions { width: 100%; }
  .ix-head-actions .ix-button { flex: 1 1 130px; }
  .ix-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ix-scene-panel { min-height: 525px; border-radius: 23px; }
  .ix-scene-top { top: 12px; right: 12px; left: 12px; }
  .ix-scene-title { max-width: 260px; }
  .ix-scene-title span { display: none; }
  .ix-scene-stage { inset: 70px 0 72px; }
  .ix-scene-world { width: 600px; height: 420px; }
  .ix-scene-bottom { right: 12px; bottom: 12px; left: 12px; }
  .ix-scene-hint { display: none; }
  .ix-object-panel { display: block; border-radius: 23px; }
  .ix-object-panel__hero { border-right: 0; border-bottom: 1px solid var(--ix-line); }
  .ix-object-panel__body { display: grid; grid-template-columns: 1fr; }
  .ix-object-rail { display: flex; overflow-x: auto; padding-bottom: 6px; }
  .ix-object-card { min-width: 235px; }
  .ix-lead-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ix-lead-toolbar { align-items: stretch; }
  .ix-lead-search { width: 100%; min-width: 0; }
  .ix-kanban { grid-template-columns: repeat(4, 275px); }
}

@media (max-width: 480px) {
  .ix-metrics { grid-template-columns: 1fr 1fr; }
  .ix-metric { padding: 12px; }
  .ix-metric strong { font-size: 20px; }
  .ix-scene-panel { min-height: 475px; }
  .ix-scene-title { max-width: 190px; }
  .ix-scene-actions .ix-button--icon:nth-child(2) { display: none; }
  .ix-detail-grid { grid-template-columns: 1fr; }
  .ix-panel-actions { grid-template-columns: 1fr; }
  .ix-lead-summary { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ix-object-beacon { animation: none; }
  .ix-scene-world,
  .ix-button,
  .ix-object-card,
  .ix-lead-card { transition: none !important; }
}
