.nm-icm-shell {
  --nm-primary: #14b8a6;
  --nm-accent: #0f172a;
  --nm-bg: #111827;
  background: var(--nm-bg);
  color: #f8fafc;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
  font-family: inherit;
}

.nm-icm-header,
.nm-players-head,
.nm-summary-grid,
.nm-icm-field-grid,
.nm-player-row,
.nm-icm-brand {
  display: flex;
  gap: 14px;
}

.nm-icm-header,
.nm-players-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.nm-icm-brand h2,
.nm-icm-card h3 {
  margin: 0 0 6px;
  color: inherit;
}

.nm-icm-brand p,
.nm-help {
  margin: 0;
  color: #cbd5e1;
}

.nm-icm-brand {
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}

.nm-icm-logo {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  object-position: left center;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  padding: 10px 12px;
  box-sizing: border-box;
  flex: 0 1 280px;
}

.nm-icm-ad-slot {
  flex: 0 0 320px;
  width: 320px;
  max-width: 100%;
}

.nm-icm-ad-link {
  display: block;
  width: 100%;
}

.nm-icm-ad-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.nm-icm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.nm-icm-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}

.nm-icm-field-grid,
#nm-payout-fields,
#nm-player-fields {
  display: grid;
  gap: 12px;
}

.nm-icm-field-grid,
#nm-payout-fields,
#nm-player-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nm-player-row {
  flex-direction: column;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 12px;
}

.nm-icm-shell label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.nm-icm-shell input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15, 23, 42, 1);
  color: #fff;
  padding: 12px 14px;
  box-sizing: border-box;
}

#nm-deal-amount {
  opacity: 0.85;
  cursor: not-allowed;
}

.nm-toggle {
  margin-top: 12px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
}

.nm-toggle input {
  width: auto;
}

.nm-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 12px 18px;
  font-weight: 700;
}

.nm-btn-primary {
  background: var(--nm-primary);
  color: #052e2b;
  width: 100%;
  font-size: 16px;
}

.nm-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nm-mobile-calc-wrap {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  margin: 10px 0 16px;
}

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

.nm-summary-grid > div {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 12px;
}

.nm-summary-grid span {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 4px;
}

.nm-results-table {
  width: 100%;
  border-collapse: collapse;
}

.nm-results-table th,
.nm-results-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}

.nm-table-wrap {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .nm-icm-grid,
  .nm-summary-grid,
  #nm-player-fields,
  #nm-payout-fields,
  .nm-icm-field-grid {
    grid-template-columns: 1fr;
  }

  .nm-icm-header,
  .nm-players-head,
  .nm-icm-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .nm-icm-ad-slot {
    width: 100%;
    flex: 1 1 auto;
  }

  .nm-mobile-calc-wrap {
    bottom: 8px;
  }
}

.nm-icm-header {
  gap: 16px;
}

.nm-icm-brand > div:last-child {
  min-width: 0;
}
