:root {
  --ico-bg: #091320;
  --ico-panel: #12243a;
  --ico-panel-soft: #172e4a;
  --ico-text: #e8eef8;
  --ico-muted: #a9b8cc;
  --ico-accent: #22c55e;
  --ico-accent-2: #38bdf8;
  --ico-line: rgba(169, 184, 204, 0.22);
}

.ico-page {
  position: relative;
  width: 100%;
  color: var(--ico-text);
  overflow: visible;
  padding: 4rem 0 3.5rem;
  min-height: calc(100vh - 9rem);
}

.ico-hero-bg {
  display: none;
}

.ico-orb {
  display: none;
}

.orb-left {
  left: -4rem;
  top: 10rem;
  background: #38bdf8;
}

.orb-right {
  right: -5rem;
  top: 3rem;
  background: #22c55e;
}

.ico-wrap {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
}

.ico-hero {
  background: linear-gradient(145deg, rgba(18, 36, 58, 0.9), rgba(11, 28, 45, 0.9));
  border: 1px solid var(--ico-line);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(3, 12, 22, 0.4);
}

.ico-kicker {
  display: inline-flex;
  margin: 0 0 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cbf5dd;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.38);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.ico-hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.1vw, 2.45rem);
  line-height: 1.18;
}

.ico-subtitle {
  color: var(--ico-muted);
  margin: 1rem 0 0;
  max-width: 640px;
  font-size: 0.96rem;
  line-height: 1.68;
}

.ico-hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.ico-btn {
  border-radius: 10px;
  padding: 0.62rem 0.92rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.ico-btn-primary {
  color: #092110;
  background: linear-gradient(130deg, #59f7a1, #26ce74);
}

.ico-btn-ghost {
  color: #ddedfd;
  border-color: #3f607f;
  background: rgba(23, 46, 74, 0.8);
}

.ico-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--ico-line);
  background: rgba(11, 25, 40, 0.85);
}

.metric-label {
  margin: 0;
  color: var(--ico-muted);
  font-size: 0.8rem;
}

.metric-value {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.ico-section {
  border: 1px solid var(--ico-line);
  background: rgba(10, 22, 35, 0.88);
  border-radius: 18px;
  padding: 1.5rem;
}

.section-head p {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  color: #7fcaef;
}

.section-head h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.08rem, 2vw, 1.52rem);
}

.utility-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.utility-card {
  border: 1px solid var(--ico-line);
  border-radius: 14px;
  background: var(--ico-panel);
  padding: 1rem;
}

.utility-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.utility-card p {
  margin: 0.75rem 0 0;
  color: var(--ico-muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.flow-panel {
  margin-top: 1rem;
  border: 1px solid var(--ico-line);
  border-radius: 14px;
  background: var(--ico-panel-soft);
  padding: 1rem;
}

.flow-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 0;
  color: var(--ico-muted);
  font-size: 0.92rem;
}

.flow-row strong {
  color: var(--ico-text);
}

.flow-row.highlight strong,
.flow-row.highlight span {
  color: var(--ico-accent);
  font-weight: 700;
}

.flow-panel hr {
  border: 0;
  border-top: 1px solid var(--ico-line);
  margin: 0.65rem 0;
}

.governance-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--ico-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.disclaimer p {
  margin: 1rem 0 0;
  color: #dce6f4;
  font-size: 0.92rem;
  line-height: 1.68;
}

.sale-panel {
  background: linear-gradient(145deg, rgba(9, 28, 20, 0.75), rgba(13, 34, 54, 0.9));
}

.sale-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.sale-grid > * {
  min-width: 0;
}

.sale-item {
  border: 1px solid var(--ico-line);
  border-radius: 12px;
  padding: 0.9rem;
  background: rgba(10, 26, 40, 0.84);
  min-width: 0;
}

.sale-item.total {
  border-color: rgba(34, 197, 94, 0.45);
}

.sale-item.referral {
  grid-column: span 2;
}

.sale-label {
  margin: 0;
  color: var(--ico-muted);
  font-size: 0.78rem;
}


.referral-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.my-referral-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--ico-text);
  font-size: 0.74rem;
}

.copy-ref-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #35516d;
  border-radius: 6px;
  background: #0d2235;
  color: #bfe9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.copy-ref-btn svg {
  width: 14px;
  height: 14px;
}

.copy-icon-success {
  display: none;
}

.copy-ref-btn.is-copied {
  color: #59f7a1;
  border-color: #2f7d5a;
}

.copy-ref-btn.is-copied .copy-icon-default {
  display: none;
}

.copy-ref-btn.is-copied .copy-icon-success {
  display: block;
}

.sale-value {
  margin: 0.45rem 0 0;
  font-size: 1.02rem;
  font-weight: 700;
}

.sale-qty-box {
  margin-top: 0.45rem;
  display: inline-flex;
  border: 1px solid #35516d;
  border-radius: 10px;
  overflow: hidden;
}

.sale-qty-box input {
  width: 62px;
  text-align: center;
  border: 0;
  background: #091a2b;
  color: var(--ico-text);
  padding: 0.5rem 0.4rem;
  font-size: 0.92rem;
  outline: none;
}

.sale-referral-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 0.45rem;
  border: 1px solid #35516d;
  border-radius: 10px;
  background: #091a2b;
  color: var(--ico-text);
  padding: 0.52rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
  text-transform: uppercase;
}

.qty-btn {
  width: 36px;
  border: 0;
  background: #15314b;
  color: var(--ico-text);
  font-weight: 700;
  cursor: pointer;
}

.sale-pay-btn {
  margin-top: 1rem;
}

.ico-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 12, 19, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1600;
}

.ico-modal.is-open {
  display: flex;
}

.ico-modal-card {
  width: min(460px, 100%);
  border: 1px solid var(--ico-line);
  border-radius: 16px;
  background: #0d2236;
  padding: 1.25rem;
  position: relative;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

.ico-modal-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.08rem;
}

.ico-modal-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  border: 0;
  background: transparent;
  color: #d9e9f8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding: 0.62rem 0;
  border-bottom: 1px solid rgba(169, 184, 204, 0.14);
  color: var(--ico-muted);
  font-size: 0.9rem;
}

.modal-row strong {
  color: var(--ico-text);
}

.modal-address {
  word-break: break-all;
  text-align: right;
}

.modal-confirm-btn {
  margin-top: 1rem;
  width: 100%;
  cursor: pointer;
}

.modal-note {
  margin: 0.75rem 0 0;
  color: var(--ico-muted);
  font-size: 0.78rem;
}

body.ico-modal-open {
  overflow: hidden;
}

.ico-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2100;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 32px));
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(191, 233, 255, 0.16);
  color: #eff7ff;
  background: linear-gradient(145deg, rgba(11, 24, 39, 0.96), rgba(15, 35, 58, 0.96));
  box-shadow: 0 18px 50px rgba(2, 8, 16, 0.42);
  backdrop-filter: blur(14px);
  font-size: 0.94rem;
  line-height: 1.45;
  transform: translate3d(0, -14px, 0);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.ico-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: #38bdf8;
}

.ico-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ico-toast.is-leaving {
  opacity: 0;
  transform: translate3d(0, -12px, 0);
}

.ico-toast-success::before {
  background: #59f7a1;
}

.ico-toast-error::before {
  background: #ff6b7a;
}

.ico-toast-warning::before {
  background: #ffb84d;
}

@media (max-width: 1000px) {
  .ico-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .utility-grid {
    grid-template-columns: 1fr;
  }

  .sale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sale-item.referral {
    grid-column: span 2;
  }

}

@media (max-width: 640px) {
  .ico-page {
    padding-top: 2.8rem;
  }

  .ico-toast {
    top: 16px;
    right: 16px;
    left: 16px;
    min-width: auto;
    max-width: none;
  }

  .ico-hero,
  .ico-section,
  .metric-card {
    padding: 1rem;
  }

  .ico-metrics {
    grid-template-columns: 1fr;
  }

  .sale-grid {
    grid-template-columns: 1fr;
  }

  .sale-item.referral {
    grid-column: span 1;
  }

}
