html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: white;
  overflow-x: hidden;

  background: radial-gradient(circle at 20% 30%, rgba(255,140,0,0.25), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(255,200,0,0.2), transparent 40%),
              linear-gradient(180deg, #0b0b0f 0%, #120a0a 100%);
}

/* Glow */
.bg-glow {
  position: fixed;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255,170,0,0.15), transparent 60%);
  filter: blur(120px);
  z-index: -1;
}

/* Particles canvas */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 60px;
  background: rgba(11, 11, 15, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  box-sizing: border-box;
}

.navbar nav a {
  color: white;
  text-decoration: none;
  margin: 0 20px;
  font-weight: 500;
  font-size: 15px;
  opacity: 0.7;
  transition: 0.3s;
}

.navbar nav a:hover {
  opacity: 1;
  color: #ffb347;
}

.header-actions,
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-actions > .btn-secondary,
.app-header-actions > .btn-secondary {
  margin-left: 0;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.network-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.network-option {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s ease;
}

.network-option:not(:disabled):hover,
.network-option.active {
  color: #0b0b0f;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  border-color: rgba(255, 204, 51, 0.45);
  box-shadow: 0 0 16px rgba(255, 179, 71, 0.22);
}

.network-option.pending {
  color: #ffcc33;
  background: rgba(255, 179, 71, 0.12);
  border-color: rgba(255, 179, 71, 0.28);
}

.network-option:disabled {
  cursor: default;
  opacity: 0.38;
}

.social-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  text-decoration: none;
  transition: 0.2s ease;
}

.social-icon:hover {
  color: #ffb347;
  border-color: rgba(255, 179, 71, 0.42);
  background: rgba(255, 179, 71, 0.1);
  transform: translateY(-1px);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.market-ticker {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  height: 34px;
  z-index: 999;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: rgba(6, 7, 10, 0.92);
  border-bottom: 1px solid rgba(255, 179, 71, 0.18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.market-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  min-width: max-content;
  animation: market-scroll 42s linear infinite;
}

.market-ticker:hover .market-ticker-track {
  animation-play-state: paused;
}

.market-coin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.market-coin strong {
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0;
}

.market-price {
  color: rgba(255, 255, 255, 0.72);
}

.market-change {
  font-weight: 700;
}

.market-up {
  color: #00d48a;
}

.market-down {
  color: #ff8f8f;
}

.market-flat {
  color: rgba(255, 255, 255, 0.5);
}

.market-protocol {
  border-color: rgba(255, 179, 71, 0.28);
  background: rgba(255, 179, 71, 0.09);
}

.market-protocol em {
  color: #ffb347;
  font-size: 11px;
  font-style: normal;
}

.market-status {
  border-color: rgba(255, 204, 51, 0.26);
  background: rgba(255, 204, 51, 0.08);
}

.market-status em {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffcc33;
  font-size: 11px;
  font-style: normal;
}

@keyframes market-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.btn-secondary.connected {
  border-color: #00ff88;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.05);
}

.header-btn {
  padding: 10px 20px !important;
  font-size: 14px;
}

.ai-audit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 255, 136, 0.48);
  border-radius: 12px;
  color: #06130d;
  background: linear-gradient(90deg, #00d48a, #00ff88);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 0 22px rgba(0, 255, 136, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ai-audit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 0 30px rgba(0, 255, 136, 0.36);
}

.launch-glow-btn {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 179, 71, 0.42) !important;
  color: #ffcc33 !important;
  background: rgba(255, 179, 71, 0.08) !important;
  box-shadow:
    0 0 0 1px rgba(255, 179, 71, 0.08) inset,
    0 0 18px rgba(255, 179, 71, 0.18);
  animation: launch-pulse 2.4s ease-in-out infinite;
}

.launch-glow-btn::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -75%;
  width: 46%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), transparent);
  transform: rotate(18deg);
  transition: left 0.55s ease;
}

.launch-glow-btn:hover {
  color: #0b0b0f !important;
  background: linear-gradient(90deg, #ffb347, #ffcc33) !important;
  box-shadow:
    0 0 0 1px rgba(255, 204, 51, 0.18) inset,
    0 0 30px rgba(255, 179, 71, 0.32);
}

.launch-glow-btn:hover::after {
  left: 130%;
}

.presale-hero-btn {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 179, 71, 0.48) !important;
  color: #ffcc33 !important;
  background:
    linear-gradient(135deg, rgba(255, 179, 71, 0.16), rgba(0, 212, 138, 0.08)),
    rgba(255, 255, 255, 0.04) !important;
  box-shadow:
    0 0 0 1px rgba(255, 179, 71, 0.10) inset,
    0 0 26px rgba(255, 179, 71, 0.22);
}

.presale-hero-btn::before {
  content: "Live";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #0b0b0f;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

.presale-hero-btn::after {
  content: "";
  position: absolute;
  inset: -50% auto -50% -70%;
  width: 44%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.34), transparent);
  transform: rotate(18deg);
  transition: left 0.6s ease;
}

.presale-hero-btn:hover {
  color: #0b0b0f !important;
  border-color: rgba(255, 204, 51, 0.7) !important;
  background: linear-gradient(90deg, #ffb347, #ffcc33) !important;
  transform: translateY(-2px);
}

.presale-hero-btn:hover::after {
  left: 130%;
}

.hero .buttons a {
  pointer-events: auto;
}

.hero .buttons a::after {
  content: none !important;
  display: none !important;
}

@keyframes launch-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 179, 71, 0.08) inset,
      0 0 18px rgba(255, 179, 71, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 204, 51, 0.16) inset,
      0 0 28px rgba(255, 179, 71, 0.34);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 35px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 230px 20px 140px;
}

.hero h1 {
  font-size: clamp(32px, 8vw, 64px);
  background: linear-gradient(90deg, #ffb347, #ffcc33);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  background-clip: text;
  color: transparent;

  text-shadow: 0 0 20px rgba(255,180,0,0.3);
}

.highlight-defi {
  display: inline-block;
  font-family: 'Cookie', cursive;
  font-size: 1.3em;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 1px;
  background: linear-gradient(
    120deg,
    #ffb347 0%,
    #ffcc33 25%,
    #fff 50%,
    #ffcc33 75%,
    #ffb347 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite, glow-pulse 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 15px rgba(255, 180, 0, 0.5));
  margin-bottom: 10px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes glow-pulse {
  from { filter: drop-shadow(0 0 8px rgba(255, 179, 71, 0.4)); transform: scale(1); }
  to { filter: drop-shadow(0 0 20px rgba(255, 204, 51, 0.8)); transform: scale(1.02); }
}

.hero p {
  opacity: 0.7;
  font-size: 20px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  padding: 15px 30px;
  border-radius: 12px;
  color: black;
  text-decoration: none;
}

.btn-secondary {
  margin-left: 15px;
  padding: 15px 30px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

button:disabled,
button.is-disabled {
  cursor: not-allowed !important;
  opacity: 0.45;
  filter: grayscale(0.35);
  transform: none !important;
  box-shadow: none !important;
}

/* Sections */
.section {
  text-align: center;
  padding: 100px 20px;
}

section[id] {
  scroll-margin-top: 80px;
}

.container-small {
  max-width: 700px;
  margin: 0 auto;
}

.badge {
  background: rgba(255, 179, 71, 0.1);
  color: #ffb347;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 179, 71, 0.2);
}

.description-large {
  font-size: 22px;
  line-height: 1.6;
  opacity: 0.9;
  margin-top: 20px;
}

.description-large strong {
  color: #ffcc33;
}

/* Roadmap Styles */
.roadmap-container {
  max-width: 800px;
  margin: 40px auto 80px;
  border-left: 2px solid rgba(255, 180, 0, 0.2);
  padding-left: 40px;
  text-align: left;
  position: relative;
}

.roadmap-item {
  position: relative;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease-out;
}

.roadmap-item::before {
  content: '';
  position: absolute;
  left: -47px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: #ffb347;
  border-radius: 50%;
  box-shadow: 0 0 10px #ffb347;
}

.roadmap-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.roadmap-item h3 {
  font-size: 24px;
  margin: 0 0 10px 0;
  color: #ffcc33;
}

.roadmap-objective {
  display: block;
  font-weight: bold;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.roadmap-list li {
  margin-bottom: 8px;
  opacity: 0.7;
  padding-left: 10px;
  font-size: 16px;
  line-height: 1.5;
}

.roadmap-outcome {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 0 12px 12px 0;
  border-left: 4px solid #ffb347;
  font-style: italic;
  font-size: 0.95em;
}

/* Cards */
.grid {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: rgba(255,255,255,0.05);
  padding: 30px;
  border-radius: 20px;
  width: 240px;
  backdrop-filter: blur(10px);
  transition: 0.3s;
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 179, 71, 0.4);
  background: rgba(255,255,255,0.08);
}

.icon-box {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(255,179,71,0.2), rgba(255,204,51,0.05));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #ffb347;
}

.icon-box svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #ffcc33;
}

.card p {
  margin: 0;
  font-size: 14px;
  opacity: 0.6;
  line-height: 1.5;
}

/* Chart */
.chart-container {
  width: 300px;
  margin: 40px auto;
}

/* Legend */
.legend {
  margin-top: 30px;
  display: inline-block;
  text-align: left;
}

.legend div {
  margin: 8px 0;
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 10px;
}

/* Footer */
footer {
  text-align: center;
  padding: 50px;
  opacity: 0.5;
}

.site-footer {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.app-footer {
  margin-left: 240px;
  padding: 22px 60px 34px;
  background: #050507;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.presale-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 179, 71, 0.18), transparent 34%),
    radial-gradient(circle at 78% 64%, rgba(0, 212, 138, 0.12), transparent 32%),
    linear-gradient(180deg, #06070a 0%, #0b0b0f 52%, #120a0a 100%);
}

.presale-navbar .logo small {
  color: #ffb347;
  font-size: 12px;
  font-weight: 600;
}

.presale-screen {
  min-height: calc(100vh - 86px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.78fr);
  gap: 34px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 138px 42px 42px;
}

.presale-copy {
  min-width: 0;
}

.presale-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.2);
}

.presale-kicker span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.presale-kicker strong {
  color: #ffcc33;
  font-size: 12px;
}

.presale-copy h1 {
  max-width: 760px;
  margin: 24px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
}

.presale-lead {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  line-height: 1.6;
}

.presale-equation {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-top: 22px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(0, 212, 138, 0.075);
  border: 1px solid rgba(0, 212, 138, 0.18);
}

.presale-equation span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.presale-equation strong {
  color: #00d48a;
  font-size: 13px;
}

.presale-signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin-top: 34px;
}

.presale-signal-grid div {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.presale-signal-grid span,
.presale-price-row span,
.presale-terminal-header span,
.presale-progress-copy span,
.presale-buy-box label,
.presale-receive-row span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.presale-signal-grid strong {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 22px;
}

.presale-stage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 640px;
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

.presale-stage-strip span {
  padding: 13px 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.presale-stage-strip span:last-child {
  border-right: none;
}

.presale-stage-strip .active {
  color: #0b0b0f;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  font-weight: 800;
}

.presale-countdown {
  display: grid;
  gap: 8px;
  max-width: 640px;
  margin-top: 16px;
  padding: 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.presale-countdown span {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.presale-countdown strong {
  display: block;
  margin-top: 7px;
  color: #ffcc33;
  font-size: 26px;
}

.presale-countdown small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 1.4;
}

.presale-terminal {
  min-width: 0;
  padding: 24px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    #0d1016;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.presale-terminal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.presale-terminal-header strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
}

.presale-live-dot {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #ffcc33 !important;
  background: rgba(255, 204, 51, 0.08);
  border: 1px solid rgba(255, 204, 51, 0.2);
  white-space: nowrap;
}

.presale-live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffcc33;
}

.presale-progress-wrap {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 26px 0;
}

.presale-ring {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#ffb347 calc(var(--progress) * 1turn), rgba(255,255,255,0.08) 0);
}

.presale-ring > div {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #0d1016;
}

.presale-ring strong {
  font-size: 28px;
}

.presale-ring span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.presale-progress-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.presale-progress-copy small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.54);
}

.presale-raised-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.presale-raised-bar div {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 212, 138, 0.055);
  border: 1px solid rgba(0, 212, 138, 0.16);
}

.presale-raised-bar span,
.presale-terms-grid span,
.presale-contract-grid span,
.presale-referral-box span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.presale-raised-bar strong {
  display: block;
  margin-top: 8px;
  color: #00d48a;
  font-size: 20px;
}

.presale-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.presale-price-row div,
.presale-receive-row,
.presale-buy-box {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.presale-price-row strong,
.presale-receive-row strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.presale-terms-grid,
.presale-contract-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.presale-contract-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.presale-terms-grid div,
.presale-contract-grid div {
  min-width: 0;
  padding: 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.presale-terms-grid strong,
.presale-contract-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.presale-buy-box {
  margin-bottom: 12px;
}

.presale-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 0 12px 0 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.presale-input-row input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 14px;
  color: white;
  background: transparent;
  border: none;
  font-size: 22px;
  outline: none;
}

.presale-input-row span {
  color: #ffcc33;
  font-weight: 800;
}

.presale-footnote.error {
  color: #ff8f8f;
}

.presale-referral-status {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.presale-referral-status.active {
  background: rgba(0, 212, 138, 0.07);
  border-color: rgba(0, 212, 138, 0.20);
}

.presale-referral-status.error {
  background: rgba(255, 123, 123, 0.08);
  border-color: rgba(255, 123, 123, 0.22);
}

.presale-referral-status span {
  display: block;
  color: rgba(255, 255, 255, 0.50);
  font-size: 12px;
}

.presale-referral-status strong {
  display: block;
  margin-top: 7px;
  color: #ffcc33;
  font-size: 15px;
}

.presale-referral-status.active strong {
  color: #00d48a;
}

.presale-referral-status.error strong {
  color: #ff8f8f;
}

.presale-referral-status small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
  line-height: 1.4;
}

.presale-quick-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.presale-quick-row button {
  min-height: 36px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
}

.presale-quick-row button:hover {
  color: #ffcc33;
  border-color: rgba(255, 204, 51, 0.34);
}

.presale-receive-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.presale-receive-row strong {
  margin-top: 0;
  color: #00d48a;
  text-align: right;
}

.presale-referral-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 179, 71, 0.075);
  border: 1px solid rgba(255, 179, 71, 0.18);
}

.presale-referral-box strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 7px;
  color: #ffcc33;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.presale-referral-box button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  color: #0b0b0f;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.presale-referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.presale-referral-stats div {
  min-width: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.presale-referral-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
}

.presale-referral-stats strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
}

.presale-claim-btn {
  width: 100%;
  min-height: 42px;
  margin: 12px 0 0 !important;
  padding: 0 16px !important;
  border-radius: 10px;
}

.presale-cta {
  width: 100%;
  margin-top: 14px;
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.presale-cta:disabled,
.presale-claim-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.presale-footnote {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.presale-allocation {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.presale-allocation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.presale-allocation-head span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.presale-allocation-head strong {
  color: #ffcc33;
  font-size: 13px;
}

.allocation-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 9px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.allocation-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: calc(var(--allocation) * 1%);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
}

.allocation-row strong {
  color: rgba(255, 255, 255, 0.96);
}

.presale-footer {
  padding: 16px 24px 28px;
}

.presale-account-panel {
  max-width: 1240px;
  margin: 0 auto 24px;
  padding: 0 42px;
}

.presale-account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}

.presale-account-header span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.presale-account-header h2 {
  margin: 7px 0 0;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.presale-account-header .btn-secondary {
  min-height: 42px;
  margin-left: 0;
  padding: 0 18px;
  border-radius: 10px;
  white-space: nowrap;
}

.presale-account-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.presale-account-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.presale-account-table th,
.presale-account-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  text-align: left;
  font-size: 13px;
}

.presale-account-table th {
  color: rgba(255, 255, 255, 0.50);
  background: rgba(0, 0, 0, 0.18);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.presale-account-table tr:last-child td {
  border-bottom: none;
}

.presale-account-table td:nth-child(3) {
  color: #ffcc33;
  font-weight: 800;
}

.table-action-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #0b0b0f;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  border: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.table-action-btn.reward {
  background: linear-gradient(90deg, #00d48a, #9dffca);
}

.table-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.25);
}

.table-muted-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
  white-space: nowrap;
}

.vesting-section {
  max-width: 1240px;
  margin: 0 auto 28px;
  padding: 0 42px;
}

.vesting-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 16px;
}

.vesting-header span,
.vesting-total-card span,
.vesting-chart-head span,
.vesting-chart-head small {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.vesting-header h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.vesting-total-card {
  min-width: 260px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 212, 138, 0.08);
  border: 1px solid rgba(0, 212, 138, 0.22);
}

.vesting-total-card strong {
  display: block;
  margin-top: 8px;
  color: #00ff88;
  font-size: 18px;
}

.vesting-chart-card {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)),
    #0d1016;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.vesting-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

.vesting-chart-head strong {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
}

.vesting-chart-head small {
  max-width: 300px;
  text-align: right;
  line-height: 1.45;
}

.vesting-chart-bar {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vesting-segment {
  width: var(--segment-width);
  min-width: 5px;
  background: var(--segment-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--segment-color), transparent 62%);
}

.vesting-segment + .vesting-segment {
  border-left: 1px solid rgba(5, 5, 7, 0.52);
}

.vesting-chart-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.vesting-chart-legend div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "dot label"
    "dot amount";
  column-gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.vesting-chart-legend i {
  grid-area: dot;
  width: 10px;
  height: 28px;
  border-radius: 999px;
}

.vesting-chart-legend span {
  grid-area: label;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.vesting-chart-legend strong {
  grid-area: amount;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
}

.vesting-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  background: #0d1016;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.vesting-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.vesting-table th,
.vesting-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.vesting-table th {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.vesting-table td {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.vesting-table tr:last-child td {
  border-bottom: none;
}

.vesting-table td:nth-child(1),
.vesting-table td:nth-child(2) {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
}

.vesting-table td:nth-child(3) {
  color: rgba(255, 255, 255, 0.62);
}

.vesting-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.vesting-status.pending {
  color: #ffcc33;
  background: rgba(255, 204, 51, 0.10);
  border: 1px solid rgba(255, 204, 51, 0.22);
}

.vesting-status.locked {
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.vesting-status.unlocked,
.vesting-status.claimable {
  color: #00ff88;
  background: rgba(0, 212, 138, 0.10);
  border: 1px solid rgba(0, 212, 138, 0.24);
}

.vesting-status.not-claimed,
.vesting-status.partial {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.10);
  border: 1px solid rgba(255, 179, 71, 0.22);
}

.vesting-status.claimed {
  color: #0b0b0f;
  background: linear-gradient(90deg, #00d48a, #00ff88);
  border: 1px solid rgba(0, 255, 136, 0.40);
}

.vesting-empty-cell {
  color: rgba(255, 255, 255, 0.54) !important;
  font-weight: 500 !important;
  text-align: center !important;
}

.referral-rewards {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 42px 28px;
}

.referral-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.referral-header span,
.referral-summary-grid span,
.referral-points-card span {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.referral-header h2 {
  max-width: 720px;
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.referral-points-card {
  min-width: 260px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.22);
}

.referral-points-card strong {
  display: block;
  margin-top: 8px;
  color: #ffcc33;
  font-size: 18px;
}

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

.referral-summary-grid div {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.referral-summary-grid strong {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 18px;
}

.referral-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  background: #0d1016;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.referral-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.referral-table th,
.referral-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.referral-table th {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.referral-table td {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.referral-table tr:last-child td {
  border-bottom: none;
}

.referral-table td:nth-child(1),
.referral-table td:nth-child(3),
.referral-table td:nth-child(4) {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
}

.referral-table td:nth-child(2) {
  color: #ffcc33;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.referral-empty-cell {
  color: rgba(255, 255, 255, 0.54) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  text-align: center !important;
}

.referral-table .podium td {
  background: rgba(255, 179, 71, 0.045);
}

.referral-table .first td:first-child {
  color: #ffcc33;
}

.referral-table .second td:first-child {
  color: #d8e4ff;
}

.referral-table .third td:first-child {
  color: #ffb38a;
}

.referral-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.5;
}

#tokenChart {
  position: relative;
  z-index: 1;
}

/* APP LAYOUT */
.app-body {
  background: #050507;
}

.app-main {
  display: flex;
  padding-top: 114px;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  border-right: 1px solid rgba(255,255,255,0.05);
  padding: 40px 20px;
  background: rgba(0,0,0,0.2);
}

.sidebar nav a {
  display: block;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  opacity: 0.6;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: 0.3s;
}

.sidebar nav a.active, .sidebar nav a:hover {
  opacity: 1;
  background: rgba(255, 179, 71, 0.1);
  color: #ffb347;
}

.dashboard {
  flex: 1;
  min-width: 0;
  padding: 60px;
}

.dashboard-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 24px;
}

.vault-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(120px, auto);
  gap: 12px;
  align-items: end;
  margin-top: 28px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
}

.vault-search,
.vault-sort {
  min-width: 0;
}

.vault-toolbar label,
.vault-result-count span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.56);
  font-size: 11px;
}

.vault-toolbar input,
.vault-toolbar select {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 13px;
}

.vault-toolbar select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #ffcc33 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #ffcc33 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    #141820;
  border-color: rgba(255, 204, 51, 0.18);
  cursor: pointer;
}

.vault-toolbar select option {
  color: #f7f7f8;
  background: #141820;
}

.vault-toolbar select:focus,
.vault-toolbar input:focus {
  outline: none;
  border-color: rgba(255, 204, 51, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 204, 51, 0.10);
}

.vault-result-count {
  min-height: 44px;
  padding: 10px 12px;
  box-sizing: border-box;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.vault-result-count strong {
  display: block;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
}

.vault-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 20px;
  backdrop-filter: blur(20px);
}

.vault-card.paused {
  border-color: rgba(255, 179, 71, 0.28);
}

.vault-card.vault-card-reward-live {
  border-color: rgba(255, 179, 71, 0.58);
  box-shadow:
    0 0 0 1px rgba(255, 179, 71, 0.14),
    0 0 24px rgba(255, 179, 71, 0.22);
}

.vault-info {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.vault-title-stack {
  min-width: 0;
}

.vault-title-stack h3 {
  margin-bottom: 8px;
}

.vault-id {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  word-break: break-all;
}

.vault-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.24);
  color: #8dffbf;
}

.vault-status.paused {
  background: rgba(255, 179, 71, 0.1);
  border-color: rgba(255, 179, 71, 0.25);
  color: #ffd69a;
}

.vault-status.out-of-range {
  background: rgba(255, 204, 51, 0.1);
  border-color: rgba(255, 204, 51, 0.28);
  color: #ffdf80;
}

.vault-empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.premium-vault {
  border-color: rgba(255, 179, 71, 0.3);
  background: linear-gradient(145deg, rgba(255, 179, 71, 0.05), rgba(0,0,0,0));
}

.tag {
  font-size: 11px;
  opacity: 0.5;
  background: rgba(255,255,255,0.1);
  padding: 3px 8px;
  border-radius: 5px;
}

.vault-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 25px 0;
}

.vault-tvl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -8px 0 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.vault-tvl-row span {
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.vault-tvl-row strong {
  color: rgba(255,255,255,0.92);
  font-size: 18px;
}

.vault-range-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -4px 0 16px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
}

.vault-range-row strong {
  color: #ffcc33;
  white-space: nowrap;
}

.vault-reward-strip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.78);
  font-size: 12px;
}

.vault-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}

.metric span { display: block; font-size: 11px; opacity: 0.5; }
.metric .val { font-size: 18px; font-weight: 700; margin-top: 5px; }
.metric small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 1.35;
}
.high { color: #00ff88; }

.full-width {
  width: 100%;
  display: block;
  text-align: center;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

.protocol-metrics-panel {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.protocol-metric-card {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  padding: 16px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.028)),
    #0d1016;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.protocol-metric-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -42px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 179, 71, 0.08);
  pointer-events: none;
}

.protocol-metric-card.primary {
  border-color: rgba(255, 179, 71, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 179, 71, 0.15), rgba(255,255,255,0.035)),
    #111318;
}

.protocol-metric-card.rate-card {
  border-color: rgba(0, 255, 136, 0.22);
}

.protocol-metric-card span,
.protocol-metric-card small {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
}

.protocol-metric-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 10px 0 8px;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(18px, 2.1vw, 28px);
}

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

.connection-item {
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.connection-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
}

.connection-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.connection-item strong.ok {
  color: #00d48a;
}

.connection-item strong.warn {
  color: #ffcc33;
}

.connection-item strong.error {
  color: #ff8f8f;
}

.risk-notice {
  margin-top: 40px;
  padding: 20px;
  border-radius: 15px;
  background: rgba(255, 179, 71, 0.05);
  border: 1px solid rgba(255, 179, 71, 0.1);
  font-size: 13px;
}

.lending-panel {
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.lending-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.lending-header h2 {
  margin: 0 0 8px;
}

.lending-header p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.45;
}

.lending-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lending-reward-btn {
  margin-left: 0;
  white-space: nowrap;
}

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

.lending-stat {
  min-height: 72px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lending-stat.primary {
  border-color: rgba(0, 255, 136, 0.22);
  background: rgba(0, 255, 136, 0.07);
}

.lending-stat span,
.lending-reserve-grid span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.lending-stat strong,
.lending-reserve-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.lending-stat small,
.lending-option small,
.utilization-panel p {
  display: block;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
  line-height: 1.35;
}

.lending-stat.primary strong {
  color: #00ff88;
}

.utilization-panel {
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
}

.utilization-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.utilization-label strong {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.utilization-label em {
  padding: 2px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.08);
  font-style: normal;
  font-size: 11px;
}

.utilization-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.utilization-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00ff88, #ffcc33);
  transition: width 0.25s ease;
}

.utilization-panel.low .utilization-fill {
  background: linear-gradient(90deg, #8dffbf, #00ff88);
}

.utilization-panel.healthy .utilization-fill {
  background: linear-gradient(90deg, #00ff88, #ffcc33);
}

.utilization-panel.elevated {
  border-color: rgba(255, 204, 51, 0.22);
}

.utilization-panel.elevated .utilization-fill {
  background: linear-gradient(90deg, #ffcc33, #ff9f43);
}

.utilization-panel.maxed {
  border-color: rgba(255, 143, 143, 0.28);
}

.utilization-panel.maxed .utilization-fill {
  background: linear-gradient(90deg, #ffcc33, #ff8f8f);
}

.lending-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.lending-option {
  position: relative;
}

.lending-option input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 58px 15px 15px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 16px;
}

.lending-max-btn {
  top: 39px;
  right: 10px;
}

.lending-inline-action {
  width: 100%;
  min-height: 50px;
  margin: 12px 0 0;
  padding: 12px 20px;
}

.lending-withdraw-action {
  color: #111318;
  border-color: rgba(255, 204, 51, 0.72);
  background: linear-gradient(135deg, #ffcc33, #ff9f43);
  box-shadow: 0 10px 24px rgba(255, 159, 67, 0.16);
}

.lending-withdraw-action:hover:not(:disabled) {
  border-color: rgba(255, 219, 92, 0.9);
  background: linear-gradient(135deg, #ffdb5c, #ffb347);
}

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

.lending-reserve-grid div {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
}

.lending-reserve-grid strong {
  font-size: 14px;
}

.liquidation-panel {
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  background: #111318;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.liquidation-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.liquidation-header h2 {
  margin: 0 0 8px;
}

.liquidation-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.45;
}

.liquidation-watchlist {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 10px;
  background: #0d1016;
  border: 1px solid rgba(255,255,255,0.12);
}

.watchlist-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.watchlist-toolbar h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.watchlist-toolbar p {
  margin: 0;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  line-height: 1.4;
}

.watchlist-filters {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  font-size: 12px;
}

.filter-chip.active {
  color: #111318;
  border-color: rgba(255, 204, 51, 0.55);
  background: #ffcc33;
}

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

.watchlist-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
}

.watchlist-title strong {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.09);
  text-align: center;
  font-size: 12px;
}

.liquidation-check-grid,
.liquidation-execute-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.liquidation-field {
  position: relative;
}

.liquidation-field label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.62);
  font-size: 12px;
}

.liquidation-field input,
.liquidation-field select {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  padding: 14px 15px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 15px;
}

.liquidation-field select {
  cursor: pointer;
}

.liquidation-table-wrap {
  margin-bottom: 16px;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0b0d12;
}

.liquidation-table-wrap.compact {
  margin-bottom: 0;
}

.liquidation-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.watchlist-table {
  min-width: 720px;
}

.liquidation-table th,
.liquidation-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.liquidation-table th {
  color: rgba(255,255,255,0.52);
  background: #151820;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.liquidation-table td {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}

.watchlist-table th,
.watchlist-table td {
  padding: 11px 12px;
  font-size: 12px;
}

.empty-row td {
  color: rgba(255,255,255,0.48);
  text-align: center;
}

.table-action {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
  background: rgba(74, 222, 128, 0.10);
  cursor: pointer;
  font-size: 12px;
}

.table-action:hover {
  background: rgba(74, 222, 128, 0.18);
}

.table-action.secondary {
  color: #ffdf80;
  border-color: rgba(255, 204, 51, 0.28);
  background: rgba(255, 204, 51, 0.08);
}

.table-action.secondary:hover {
  background: rgba(255, 204, 51, 0.14);
}

.watchlist-actions {
  display: flex;
  gap: 8px;
}

.liquidation-table tbody tr:last-child td {
  border-bottom: none;
}

.liquidation-table tbody tr:hover td {
  background: rgba(255,255,255,0.035);
}

.liquidation-estimate {
  min-height: 68px;
  padding: 14px;
  border-radius: 8px;
  background: #0b0d12;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.liquidation-estimate span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.liquidation-estimate strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.92);
  font-size: 16px;
}

.liquidation-execute-panel {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr) auto;
  padding-top: 4px;
}

.admin-panel {
  max-width: 100%;
  min-width: 0;
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  background: #111318;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.admin-header-row h2,
.admin-section-title h3 {
  margin: 0 0 8px;
}

.admin-header-row p {
  margin: 0;
  color: rgba(255,255,255,0.64);
  line-height: 1.45;
}

.admin-gate {
  padding: 18px;
  border-radius: 10px;
  background: rgba(255, 143, 143, 0.08);
  border: 1px solid rgba(255, 143, 143, 0.22);
  color: #ffb4b4;
}

.admin-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-section {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 16px;
  border-radius: 10px;
  background: #0d1016;
  border: 1px solid rgba(255,255,255,0.12);
}

.admin-section-title {
  margin-bottom: 12px;
}

.admin-status-grid,
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.admin-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.admin-flow-step {
  min-height: 86px;
  padding: 13px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-flow-step.ok {
  border-color: rgba(0, 255, 136, 0.28);
  background: rgba(0, 255, 136, 0.06);
}

.admin-flow-step.warn {
  border-color: rgba(255, 204, 51, 0.28);
  background: rgba(255, 204, 51, 0.06);
}

.admin-flow-step.error {
  border-color: rgba(255, 143, 143, 0.30);
  background: rgba(255, 143, 143, 0.07);
}

.admin-status-grid div {
  min-height: 64px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-status-grid span,
.admin-flow-step span,
.admin-form-grid label {
  display: block;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
}

.admin-flow-step strong {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
}

.admin-flow-step small {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
  line-height: 1.35;
}

.admin-status-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 8px;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
}

.admin-form-grid input,
.admin-form-grid select {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 13px;
}

.admin-form-grid input[readonly] {
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.035);
}

.admin-form-grid small {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: #ffcc33;
  font-size: 11px;
  line-height: 1.35;
}

.tick-percent-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tick-percent-panel div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.tick-percent-panel span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.tick-percent-panel strong {
  color: rgba(255,255,255,0.92);
  font-size: 14px;
}

.admin-preflight-grid,
.admin-risk-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.admin-risk-preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-rebalance-section {
  border-color: rgba(255, 128, 0, 0.30);
  background:
    linear-gradient(180deg, rgba(255, 128, 0, 0.055), rgba(13, 16, 22, 0) 155px),
    #0d1016;
}

.admin-rebalance-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.admin-rebalance-status-grid strong {
  white-space: normal;
  line-height: 1.3;
}

.admin-campaign-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.admin-campaign-card {
  min-width: 0;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.10);
}

.admin-section-title h4 {
  margin: 0 0 6px;
}

.admin-section-title p {
  margin: 0;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  line-height: 1.4;
}

.admin-campaign-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.admin-campaign-status-grid div {
  min-height: 58px;
  padding: 11px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-campaign-status-grid div.ok {
  border-color: rgba(0, 255, 136, 0.28);
  background: rgba(0, 255, 136, 0.06);
}

.admin-campaign-status-grid div.warn {
  border-color: rgba(255, 204, 51, 0.28);
  background: rgba(255, 204, 51, 0.06);
}

.admin-campaign-status-grid span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.admin-campaign-status-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
}

.admin-preflight-grid div,
.admin-risk-preview-grid div {
  min-height: 62px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-preflight-grid div.ok,
.admin-risk-preview-grid div.ok {
  border-color: rgba(0, 255, 136, 0.28);
  background: rgba(0, 255, 136, 0.06);
}

.admin-preflight-grid div.warn,
.admin-risk-preview-grid div.warn {
  border-color: rgba(255, 204, 51, 0.28);
  background: rgba(255, 204, 51, 0.06);
}

.admin-preflight-grid div.error,
.admin-risk-preview-grid div.error {
  border-color: rgba(255, 143, 143, 0.30);
  background: rgba(255, 143, 143, 0.07);
}

.admin-preflight-grid span,
.admin-risk-preview-grid span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.admin-preflight-grid strong,
.admin-risk-preview-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.admin-actions .btn-primary,
.admin-actions .btn-secondary {
  min-height: 42px;
  margin-left: 0;
  padding: 10px 14px;
}

.admin-section-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-section-title-row p {
  margin: 0;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
}

.admin-section-title-row > div {
  min-width: 0;
}

.admin-section-title-row .btn-secondary {
  flex: 0 0 auto;
  margin-left: 0;
}

.admin-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-title-actions .btn-secondary {
  margin-left: 0;
}

.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0b0d12;
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-table th,
.admin-table td {
  max-width: 160px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.admin-table th {
  color: rgba(255,255,255,0.52);
  background: #151820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table td {
  color: rgba(255,255,255,0.88);
}

.admin-command-box {
  max-width: 100%;
  overflow: hidden;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.admin-command-box span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.admin-command-box code {
  display: block;
  max-height: 132px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  border-radius: 7px;
  color: #bbf7d0;
  background: #090b10;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  font-size: 12px;
}

.table-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}

.table-pill.ok {
  color: #8dffbf;
  background: rgba(0, 255, 136, 0.10);
  border: 1px solid rgba(0, 255, 136, 0.22);
}

.table-pill.warn {
  color: #ffdf80;
  background: rgba(255, 204, 51, 0.10);
  border: 1px solid rgba(255, 204, 51, 0.22);
}

/* LENDING ADMIN PANEL */
.lending-admin {
  margin-top: 28px;
  margin-bottom: 32px;
}

.admin-card {
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.08) 0%, rgba(255, 200, 0, 0.05) 100%);
  border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(255, 179, 71, 0.1);
}

.admin-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 179, 71, 0.15);
}

.admin-header h3 {
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.admin-param {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 179, 71, 0.15);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.admin-param:hover {
  border-color: rgba(255, 179, 71, 0.35);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 16px rgba(255, 179, 71, 0.08);
}

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

.param-header label {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.info-badge {
  display: inline-block;
  background: rgba(255, 179, 71, 0.2);
  color: #ffb347;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.param-desc {
  margin: 0 0 16px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}

.param-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.param-input-group input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.param-input-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 179, 71, 0.5);
  box-shadow: 0 0 12px rgba(255, 179, 71, 0.15);
}

.param-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Protocol Fees Card */
.admin-fees-card {
  background: rgba(0, 200, 136, 0.08);
  border: 1px solid rgba(0, 200, 136, 0.25);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.fees-header h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  color: #00c888;
}

.fees-description {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.fees-display {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 200, 136, 0.15);
}

.fees-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.fees-amount .label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.fees-amount .amount {
  font-weight: 700;
  font-size: 1.1rem;
  color: #00c888;
}

.full-width {
  width: 100% !important;
}

.admin-fees-card .btn-primary {
  background: linear-gradient(135deg, #00c888, #00e899);
  border-color: rgba(0, 200, 136, 0.5);
  color: #0a0a0a;
  font-weight: 600;
  transition: all 0.3s ease;
}

.admin-fees-card .btn-primary:hover {
  background: linear-gradient(135deg, #00e899, #00ff99);
  box-shadow: 0 6px 24px rgba(0, 232, 153, 0.3);
  transform: translateY(-2px);
}

/* MODAL STYLES */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: 0.3s;
  overflow-y: auto;
  padding: 32px 20px;
  box-sizing: border-box;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: #121217;
  border: 1px solid rgba(255, 179, 71, 0.2);
  border-radius: 24px;
  padding: 30px;
  width: 100%;
  max-width: 450px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-content.large {
  max-width: 800px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  background: #121217;
}

.header-main {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.header-main h2 { margin: 0; }

.modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px;
  border-radius: 14px;
}

.tab-btn {
  flex: 1 1 86px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
}

.tab-btn.active {
  background: rgba(255, 179, 71, 0.18);
  color: #ffcc33;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.wallet-balance {
  font-size: 11px;
  opacity: 0.5;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.tick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.tick-grid input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  box-sizing: border-box;
}

.guard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.guard-grid input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  box-sizing: border-box;
}

.guard-hints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
}

.deposit-ratio-hint {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.66);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  line-height: 1.4;
}

.deposit-ratio-hint.warn {
  color: #ffdf80;
  border-color: rgba(255, 204, 51, 0.24);
  background: rgba(255, 204, 51, 0.08);
}

.top-gap {
  margin-top: 10px;
}

.modal-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.mini-metric {
  min-height: 62px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.mini-metric span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.52);
  font-size: 11px;
}

.mini-metric strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
}

.reward-admin-panel {
  margin-top: 12px;
  padding-top: 6px;
}

.max-btn {
  position: absolute;
  right: 10px;
  background: rgba(255, 179, 71, 0.2);
  border: none;
  color: #ffb347;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.modal-stats-panel {
  background: rgba(255,255,255,0.02);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

.stat-section {
  margin-bottom: 25px;
}

.stat-section label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.4;
  margin-bottom: 15px;
}

.detailed-stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

/* PORTFOLIO PANEL */
.portfolio-panel {
  margin-top: 24px;
  padding: 20px;
  border-radius: 14px;
  background-color: rgba(138, 43, 226, 0.07);
  border: 1px solid rgba(138, 43, 226, 0.35);
}

.portfolio-panel h2 {
  margin-bottom: 12px;
}

.portfolio-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.portfolio-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(138, 43, 226, 0.15);
}

.portfolio-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  color: #fff;
}

.positions-list {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.position-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
}

.position-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(138, 43, 226, 0.4);
}

.position-card.empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.position-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.position-type {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.position-type.vault {
  background: rgba(3, 157, 255, 0.2);
  color: #039dff;
}

.position-type.lending {
  background: rgba(255, 179, 71, 0.2);
  color: #ffb347;
}

.position-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.summary-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.summary-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.summary-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.summary-value#portfolioHealth {
  color: #00c888;
}

.detailed-stat .val { font-weight: 600; }

.info-box.mini {
  margin-top: 20px;
  margin-bottom: 0;
  background: none;
  padding: 0;
}

.close-modal {
  background: none; border: none; color: white; font-size: 24px; cursor: pointer;
}

.input-group { margin-bottom: 25px; }
.input-group label { display: block; font-size: 12px; opacity: 0.6; margin-bottom: 10px; }
.input-group input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  box-sizing: border-box;
}

.share-preview {
  background: rgba(255, 179, 71, 0.05);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 25px;
}

.config-notice {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.config-notice.ready {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.2);
}

.config-notice.no-margin {
  margin-bottom: 0;
}

.strategy-alert {
  margin-bottom: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.strategy-alert-neutral {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.strategy-alert-safe {
  color: #00d48a;
  background: rgba(0, 212, 138, 0.10);
  border-color: rgba(0, 212, 138, 0.24);
}

.strategy-alert-warn {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.10);
  border-color: rgba(255, 179, 71, 0.24);
}

.strategy-alert-danger {
  color: #ff7b7b;
  background: rgba(255, 123, 123, 0.10);
  border-color: rgba(255, 123, 123, 0.24);
}

.tx-status {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 179, 71, 0.06);
  border: 1px solid rgba(255, 179, 71, 0.14);
}

.tx-status.active {
  color: #ffcc33;
  border-color: rgba(255, 204, 51, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 204, 51, 0.08) inset;
}

.slippage-control {
  margin-bottom: 20px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.slippage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr)) minmax(86px, 1.1fr);
  gap: 8px;
}

.slippage-preset {
  border: 1px solid rgba(255, 179, 71, 0.18);
  background: rgba(255, 179, 71, 0.08);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.slippage-preset.active {
  color: #ffcc33;
  border-color: rgba(255, 204, 51, 0.38);
  background: rgba(255, 179, 71, 0.18);
}

.slippage-grid input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.val-highlight { color: #ffcc33; font-weight: 700; }

.risk-safe {
  color: #00ff88 !important;
}

.risk-warning {
  color: #ffcc33 !important;
}

.risk-danger {
  color: #ff8f8f !important;
}

.info-box {
  font-size: 12px; opacity: 0.5; line-height: 1.4; margin-bottom: 25px;
}

/* Responsividad */
@media (max-width: 768px) {
  .market-ticker {
    display: none;
  }

  .connection-panel,
  .protocol-metrics-panel {
    grid-template-columns: 1fr 1fr;
  }

  .navbar {
    padding: 15px 20px;
  }

  .navbar nav {
    display: none; /* Oculta el menú principal en móvil; idealmente añadirías un menú hamburguesa aquí */
  }

  .header-actions,
  .app-header-actions {
    gap: 8px;
  }

  .header-btn {
    padding: 8px 10px !important;
    font-size: 11px;
  }

  .ai-audit-btn {
    min-height: 34px;
  }

  .network-selector {
    padding: 3px;
  }

  .network-option {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  .network-option:disabled {
    display: none;
  }

  .social-links {
    gap: 6px;
  }

  .social-icon {
    width: 34px;
    height: 34px;
  }

  .app-header-actions .social-links {
    display: none;
  }

  .hero {
    padding: 150px 20px 80px;
  }

  .hero p {
    font-size: 16px;
  }

  .grid {
    gap: 15px;
  }

  .card {
    width: 100%;
    max-width: 320px;
  }

  .roadmap-container {
    padding-left: 25px;
  }

  /* App Responsiveness */
  .app-main {
    flex-direction: column;
    padding-top: 80px;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 20px;
    box-sizing: border-box;
  }

  .sidebar nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
  }

  .dashboard {
    padding: 30px 20px;
  }

  .protocol-metrics-panel {
    gap: 10px;
  }

  .protocol-metric-card {
    min-height: 78px;
    padding: 13px;
  }

  .protocol-metric-card strong {
    font-size: 18px;
  }

  .app-footer {
    margin-left: 0;
    padding: 22px 20px 30px;
  }

  .presale-screen {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 110px 20px 28px;
  }

  .presale-copy h1 {
    font-size: 38px;
    line-height: 1.02;
  }

  .presale-lead {
    font-size: 15px;
  }

  .presale-equation {
    align-items: flex-start;
    flex-direction: column;
  }

  .presale-signal-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 24px;
  }

  .presale-allocation-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .presale-stage-strip {
    grid-template-columns: 1fr 1fr;
  }

  .presale-terminal {
    padding: 18px;
  }

  .presale-progress-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .presale-price-row {
    grid-template-columns: 1fr;
  }

  .presale-raised-bar,
  .presale-terms-grid,
  .presale-contract-grid,
  .presale-referral-box,
  .presale-referral-stats {
    grid-template-columns: 1fr;
  }

  .presale-receive-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .presale-receive-row strong {
    text-align: left;
  }

  .referral-rewards {
    padding: 0 20px 26px;
  }

  .presale-account-panel {
    padding: 0 20px 24px;
  }

  .presale-account-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .presale-account-header .btn-secondary {
    width: 100%;
  }

  .vesting-section {
    padding: 0 20px 24px;
  }

  .vesting-header,
  .vesting-chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .vesting-total-card {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .vesting-chart-head small {
    max-width: none;
    text-align: left;
  }

  .vesting-chart-legend {
    grid-template-columns: 1fr;
  }

  .referral-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .referral-points-card {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .referral-summary-grid {
    grid-template-columns: 1fr;
  }

  .vault-toolbar {
    grid-template-columns: 1fr;
  }

  .lending-header {
    flex-direction: column;
  }

  .lending-header-actions,
  .lending-reward-btn {
    width: 100%;
  }

  .lending-header-actions {
    flex-direction: column;
  }

  .lending-stats-grid,
  .lending-reserve-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .liquidation-header,
  .watchlist-toolbar,
  .admin-header-row {
    flex-direction: column;
  }

  .liquidation-header .btn-secondary,
  .watchlist-toolbar .btn-secondary,
  .admin-header-row .btn-secondary {
    width: 100%;
  }

  .admin-section-title-row {
    flex-direction: column;
  }

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

  .admin-status-grid,
  .admin-flow-grid,
  .admin-form-grid,
  .tick-percent-panel,
  .admin-preflight-grid,
  .admin-risk-preview-grid {
    grid-template-columns: 1fr;
  }

  .liquidation-check-grid,
  .liquidation-execute-panel {
    grid-template-columns: 1fr;
  }

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

  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    padding: 22px;
    max-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  .guard-grid,
  .guard-hints,
  .tick-grid {
    grid-template-columns: 1fr;
  }
}
