/* ============== Clauss Trade — Gradient Panel Theme ============== */
:root {
  --bg:        #050d09;
  --bg-2:      #081311;
  --bg-3:      #0d1a16;
  --card:      #0d1a14;
  --card-hi:   #11241d;
  --neon:      #00ffa3;
  --neon-2:    #00d98a;
  --neon-3:    #34dcb1;
  --neon-soft: rgba(0,255,163,0.18);
  --neon-glow: rgba(0,255,163,0.38);
  --text:      #d6e6dc;
  --text-2:    #9ab5a6;
  --muted:     #5b7468;
  --border:    rgba(0,255,163,0.16);
  --danger:    #ff5e6c;
  --warn:      #ffc83d;
  --blue:      #4f8cff;

  /* Gradient palette */
  --grad-bg:        radial-gradient(120% 80% at 50% -20%, rgba(0,255,163,0.10), transparent 50%),
                    radial-gradient(80% 60% at 100% 100%, rgba(0,217,138,0.06), transparent 50%),
                    #050d09;
  --grad-card:      linear-gradient(140deg, rgba(0,255,163,0.05) 0%, rgba(0,217,138,0.015) 60%, rgba(0,0,0,0) 100%);
  --grad-card-hi:   linear-gradient(140deg, rgba(0,255,163,0.13) 0%, rgba(0,217,138,0.05) 60%, rgba(0,0,0,0) 100%);
  --grad-neon:      linear-gradient(135deg, #00ffa3 0%, #00d98a 50%, #00b377 100%);
  --grad-neon-soft: linear-gradient(135deg, rgba(0,255,163,0.22), rgba(0,217,138,0.12));
  --grad-topbar:    linear-gradient(180deg, rgba(0,255,163,0.06) 0%, transparent 100%);
  --grad-bottombar: linear-gradient(0deg,   rgba(0,255,163,0.04) 0%, transparent 100%);
  --grad-divider:   linear-gradient(90deg, transparent, var(--neon), transparent);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Space Mono','Inter',-apple-system,'Segoe UI',sans-serif;
  background: #050d09;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: relative;
}
body::before {
  /* slowly drifting neon glow blobs behind everything */
  content: '';
  position: fixed; inset: -10%;
  background:
    radial-gradient(35% 35% at 25% 18%, rgba(0,255,163,0.10), transparent 70%),
    radial-gradient(38% 38% at 78% 80%, rgba(0,217,138,0.07), transparent 70%),
    radial-gradient(30% 30% at 50% 50%, rgba(52,220,177,0.05), transparent 70%);
  animation: bg-drift 18s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}
@keyframes bg-drift {
  0%   { transform: translate(0, 0)        scale(1); }
  50%  { transform: translate(-3%, 4%)     scale(1.05); }
  100% { transform: translate(4%, -2%)     scale(1.02); }
}
button { font: inherit; }
input, select, button { font-family: inherit; }
input:focus, select:focus, button:focus { outline: none; }

.app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: transparent;
  overflow: hidden;
}
@media (min-width: 600px) {
  .app { max-width: 480px; box-shadow: 0 0 60px rgba(0,255,163,0.12); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ============== Top Bar ============== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--grad-topbar);
  flex-shrink: 0;
  position: relative;
}
.topbar::after {
  content: '';
  position: absolute; bottom: 0; left: 8px; right: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  background-size: 200% 100%;
  background-position: -100% 0;
  opacity: 0.6;
  animation: shimmer-line 5s linear infinite;
}
@keyframes shimmer-line {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background:
    linear-gradient(135deg, #00ffa3 0%, #00d98a 35%, #00b377 65%, #00ffa3 100%);
  background-size: 220% 220%;
  animation: logo-shift 5.2s ease-in-out infinite;
  box-shadow: 0 0 22px var(--neon-glow), inset 0 1px 0 rgba(255,255,255,0.35);
  overflow: hidden;
}
.logo-icon::before {
  /* slow rotating conic sheen */
  content: ''; position: absolute; inset: -25%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,0.35) 12%, transparent 30%);
  animation: logo-spin 6s linear infinite;
  pointer-events: none;
}
.logo-icon::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 14px;
  background: radial-gradient(circle, var(--neon-soft), transparent 70%);
  z-index: -1;
  filter: blur(8px);
  animation: logo-pulse 3.5s ease-in-out infinite;
}
.logo-icon svg { position: relative; z-index: 1; }
@keyframes logo-shift {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}
@keyframes logo-spin { to { transform: rotate(360deg); } }
@keyframes logo-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
/* shine handled in main rule */
.logo-text { line-height: 1; }
.logo-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  color: var(--neon);
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px var(--neon-glow);
}
.logo-sub {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-2);
  margin-top: 3px;
}
.top-actions { display: flex; gap: 8px; }
.round-ghost {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0,255,163,0.04);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.round-ghost:hover, .round-ghost:active {
  background: var(--neon-soft);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 14px var(--neon-glow);
}

/* ============== Filter row (Log Signal only) ============== */
.filter-row {
  display: flex; gap: 10px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
/* Hide it on Kelola & Konfig tabs — those rows belong to Log Signal only */
.app[data-tab="manage"] .filter-row,
.app[data-tab="config"] .filter-row { display: none; }
.filter-row .custom-select { flex: 1; }

/* ============== Custom select (theme-matched dropdown) ============== */
.custom-select { position: relative; font-family: 'Space Mono', monospace; }
.cs-trigger {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px 11px 14px;
  color: var(--text);
  font-size: 13.5px;
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  text-align: left;
}
.cs-trigger:hover, .custom-select.open .cs-trigger {
  border-color: var(--neon);
  box-shadow: 0 0 10px var(--neon-soft);
}
.cs-label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-chevron {
  width: 18px; height: 18px;
  color: var(--text-2);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.custom-select.open .cs-chevron { transform: rotate(180deg); color: var(--neon); }

.cs-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--neon);
  border-radius: 10px;
  padding: 4px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 14px var(--neon-soft);
  animation: drop 0.14s;
  max-height: 320px;
  overflow-y: auto;
  pointer-events: auto;
}
.custom-select.open { z-index: 199; }
.cs-trigger { pointer-events: auto; }
.cs-option { pointer-events: auto; min-height: 36px; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cs-option {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 13.5px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
}
.cs-option:hover { background: var(--neon-soft); }
.cs-option.selected { color: var(--neon); }
.cs-option.selected::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon-glow);
}

.set-row .custom-select { width: 56%; }
.ghost-btn {
  background: var(--card);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s;
}
.ghost-btn:hover, .ghost-btn:active {
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 12px var(--neon-glow);
}

/* ============== Tabs / content ============== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 100px;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-soft) transparent;
}
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: var(--neon-soft); border-radius: 2px; }
.tab { animation: tab-in 0.42s cubic-bezier(0.2, 0.85, 0.25, 1); }
@keyframes tab-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);     filter: blur(0); }
}
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Stagger cards inside Log Signal & Kelola lists */
.pair-card, .manage-item {
  animation: card-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
}
.pair-list .pair-card:nth-child(1),
.manage-list .manage-item:nth-child(1) { animation-delay: 0.02s; }
.pair-list .pair-card:nth-child(2),
.manage-list .manage-item:nth-child(2) { animation-delay: 0.06s; }
.pair-list .pair-card:nth-child(3),
.manage-list .manage-item:nth-child(3) { animation-delay: 0.10s; }
.pair-list .pair-card:nth-child(4),
.manage-list .manage-item:nth-child(4) { animation-delay: 0.14s; }
.pair-list .pair-card:nth-child(5),
.manage-list .manage-item:nth-child(5) { animation-delay: 0.18s; }
.pair-list .pair-card:nth-child(6),
.manage-list .manage-item:nth-child(6) { animation-delay: 0.22s; }
.pair-list .pair-card:nth-child(n+7),
.manage-list .manage-item:nth-child(n+7) { animation-delay: 0.26s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============== Screening (primary) button ============== */
.screen-btn {
  width: 100%;
  background: var(--grad-neon);
  color: #0a1410;
  border: none;
  border-radius: 10px;
  padding: 13px 14px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.6px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px var(--neon-glow), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.1s, box-shadow 0.18s;
}
.screen-btn::before {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}
.screen-btn.loading::before { animation-duration: 1.2s; }
@keyframes shimmer {
  0%   { left: -60%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}
.screen-btn:active { transform: scale(0.985); }
.screen-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.screen-btn svg { flex-shrink: 0; }
.screen-btn span { flex: 1; text-align: left; }
.screen-btn small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.65;
  font-family: 'Space Mono', monospace;
}

/* ============== Pair card (Log Signal) ============== */
.pair-card {
  background: var(--grad-card), var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.pair-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,255,163,0.06));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.pair-card:hover, .pair-card:active {
  border-color: var(--neon);
  box-shadow: 0 0 22px var(--neon-glow), 0 0 1px var(--neon) inset;
  background: var(--grad-card-hi), var(--card-hi);
}
.pair-card:hover::before { opacity: 1; }
.coin-icon {
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--neon);
  position: relative;
}
.coin-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.coin-letter {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--neon), var(--neon-2));
  color: #0a1410;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
}

.pair-info { flex: 1; min-width: 0; }
.pair-row1 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.pair-name {
  font-weight: 700; font-size: 14.5px;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.pair-name .arrow { color: var(--neon); font-size: 11px; }
.pair-time { font-size: 11px; color: var(--text-2); flex-shrink: 0; font-family: 'Space Mono', monospace; }
.pair-preview {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.pair-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 1.5px 7px; border-radius: 8px;
  background: var(--neon); color: #0a1410;
  letter-spacing: 0.4px;
}
.pair-tag.SELL { background: var(--danger); color: #fff; }
.pair-tag.WAIT { background: var(--warn); color: #0a1410; }
.unread-pill {
  background: var(--neon);
  color: #0a1410;
  font-size: 11px; font-weight: 700;
  border-radius: 10px;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--neon-glow);
}


/* ============== Live price strip inside signal card ============== */
.sig-live {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(0,255,163,0.10), rgba(0,217,138,0.02));
  border: 1px solid rgba(0,255,163,0.28);
  border-radius: 8px;
  padding: 7px 11px;
  margin: 8px 0 6px;
  font-family: 'Space Mono', monospace;
}
.sig-live .live-dot {
  width: 7px; height: 7px;
  background: var(--neon);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-glow);
  animation: pulse-dot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
.sig-live .live-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--neon);
  text-shadow: 0 0 6px var(--neon-glow);
}
.sig-live .live-price {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  transition: color 0.15s;
}
.sig-live .live-price.flash-up {
  animation: flash-up 0.55s ease-out;
}
.sig-live .live-price.flash-down {
  animation: flash-down 0.55s ease-out;
}
@keyframes flash-up {
  0%   { color: var(--neon); text-shadow: 0 0 8px var(--neon-glow); }
  100% { color: var(--text); text-shadow: none; }
}
@keyframes flash-down {
  0%   { color: var(--danger); text-shadow: 0 0 8px rgba(255,94,108,0.5); }
  100% { color: var(--text); text-shadow: none; }
}
.sig-live .live-change {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.3px;
}
.sig-live .live-change.up { color: var(--neon); }
.sig-live .live-change.down { color: var(--danger); }

.empty-state {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty-state svg { opacity: 0.4; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-2); font-weight: 600; margin: 8px 0; }

/* ============== Hero empty (Log Signal) ============== */
.hero-empty {
  text-align: center;
  padding: 26px 16px 22px;
  margin-bottom: 12px;
  background: var(--grad-card), var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.hero-empty::before {
  content: '';
  position: absolute; inset: -40% -10% auto -10%;
  height: 80%;
  background: radial-gradient(50% 60% at 50% 0%, rgba(0,255,163,0.10), transparent 70%);
  pointer-events: none;
}
.hero-pulse {
  width: 140px; height: 64px;
  margin: 6px auto 16px;
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
}
.hero-pulse .hp-glow {
  position: absolute; left: 50%; top: 50%;
  width: 120px; height: 120px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,255,163,0.22), transparent 60%);
  filter: blur(4px);
  pointer-events: none;
  animation: hp-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes hp-glow-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.85); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.05); }
}
.hero-pulse .hp-bars {
  position: relative;
  display: flex; align-items: flex-end; gap: 6px;
  height: 100%;
}
.hero-pulse .hp-bars span {
  display: block;
  width: 6px;
  height: 18%;
  background: linear-gradient(180deg, var(--neon), var(--neon-3));
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0,255,163,0.55), 0 0 16px rgba(0,255,163,0.25);
  animation: hp-bar 1.4s ease-in-out infinite;
  transform-origin: bottom;
}
.hero-pulse .hp-bars span:nth-child(1) { animation-delay: 0s;    }
.hero-pulse .hp-bars span:nth-child(2) { animation-delay: 0.12s; }
.hero-pulse .hp-bars span:nth-child(3) { animation-delay: 0.24s; }
.hero-pulse .hp-bars span:nth-child(4) { animation-delay: 0.36s; }
.hero-pulse .hp-bars span:nth-child(5) { animation-delay: 0.48s; }
.hero-pulse .hp-bars span:nth-child(6) { animation-delay: 0.60s; }
.hero-pulse .hp-bars span:nth-child(7) { animation-delay: 0.72s; }
.hero-pulse .hp-bars span:nth-child(8) { animation-delay: 0.84s; }
.hero-pulse .hp-bars span:nth-child(9) { animation-delay: 0.96s; }
@keyframes hp-bar {
  0%, 100% { height: 18%; opacity: 0.55; }
  20%      { height: 90%; opacity: 1;    }
  45%      { height: 38%; opacity: 0.75; }
  70%      { height: 70%; opacity: 0.95; }
}

.hero-title {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--neon), var(--neon-3));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.hero-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}
.hero-cta {
  background: var(--grad-neon);
  color: #0a1410;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 0 20px var(--neon-glow), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.1s;
  position: relative; overflow: hidden;
}
.hero-cta::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -50%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-20deg);
  animation: hero-shine 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hero-shine {
  0%, 60% { left: -50%; }
  100% { left: 150%; }
}
.hero-cta:active { transform: scale(0.97); }

/* ============== Overview cards (Top Gainers / Losers) ============== */
.overview-card,
.features-card {
  background: var(--grad-card), var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.overview-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.overview-head .ov-arrow { color: var(--neon); font-size: 10px; }
.overview-head .ov-arrow.down { color: var(--danger); }

.overview-list { display: flex; flex-direction: column; gap: 4px; }
.ov-empty {
  text-align: center; color: var(--muted); font-size: 11px;
  padding: 10px 0;
  font-family: 'Space Mono', monospace;
}
.ov-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.ov-row:hover { background: rgba(0,255,163,0.06); }
.ov-row .coin-icon { width: 26px !important; height: 26px !important; }
.ov-sym {
  flex: 1; min-width: 0;
  font-family: 'Space Mono', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-price {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px; color: var(--text-2);
  letter-spacing: 0.3px;
}
.ov-change {
  font-family: 'Space Mono', monospace;
  font-size: 11px; font-weight: 700;
  min-width: 60px;
  text-align: right;
  letter-spacing: 0.3px;
}
.ov-change.up { color: var(--neon); }
.ov-change.down { color: var(--danger); }

/* ============== Engine features list ============== */
.features-list {
  margin: 0; padding: 0; list-style: none;
}
.features-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.5;
  border-bottom: 1px dashed rgba(0,255,163,0.07);
}
.features-list li:last-child { border-bottom: 0; }
.features-list li .dot {
  position: absolute;
  left: 4px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon-glow);
}

/* ============== Konfig settings ============== */
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 14px;
  margin-bottom: 10px;
}
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.set-row:last-of-type { border-bottom: none; }
.set-label {
  font-size: 13px; color: var(--text-2);
  font-family: 'Space Mono', monospace;
}
.set-row select { width: 56%; }
.about { padding: 16px 14px; }
.about-title { font-size: 11px; color: var(--text-2); letter-spacing: 1px; font-family: 'Space Mono', monospace; }
.about-pill {
  display: inline-block;
  margin: 8px 0;
  padding: 4px 12px;
  background: var(--neon-soft);
  color: var(--neon);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Space Mono', monospace;
}
.about-desc { color: var(--text-2); font-size: 12.5px; line-height: 1.6; margin: 4px 0 0; }

/* ============== Kelola list ============== */
.manage-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  height: 38px;
  margin-bottom: 10px;
  color: var(--muted);
}
.manage-search input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 13.5px;
}
.manage-search input::placeholder { color: var(--muted); }

.manage-list { display: flex; flex-direction: column; gap: 8px; }
.manage-item {
  background: var(--grad-card), var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s;
}
.manage-item::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,255,163,0.08));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.manage-item::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,163,0.18), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.manage-item:hover {
  border-color: var(--neon);
  box-shadow: 0 0 22px var(--neon-soft), 0 0 1px var(--neon) inset;
}
.manage-item:hover::before,
.manage-item:hover::after { opacity: 1; }
.manage-item:active { transform: scale(0.995); }

.kelola-info { flex: 1; min-width: 0; }
.kelola-name {
  font-family: 'Space Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--neon);
  text-shadow: 0 0 10px var(--neon-glow);
  background: linear-gradient(135deg, var(--neon), var(--neon-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kelola-sub {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
  font-family: 'Space Mono', monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.kelola-price {
  text-align: right;
  font-family: 'Space Mono', monospace;
  flex-shrink: 0;
  min-width: 78px;
}
.kelola-price .price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  transition: color 0.15s;
}
.kelola-price .price.flash-up {
  animation: flash-up 0.55s ease-out;
}
.kelola-price .price.flash-down {
  animation: flash-down 0.55s ease-out;
}
.kelola-price .change {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.kelola-price .change.up { color: var(--neon); }
.kelola-price .change.down { color: var(--danger); }

/* ============== Floating action button ============== */
.fab {
  position: absolute;
  right: 16px;
  bottom: 86px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--neon);
  color: #0a1410;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px var(--neon-glow), 0 4px 12px rgba(0,0,0,0.5);
  z-index: 30;
  transition: transform 0.15s;
}
.fab:active { transform: scale(0.92); }
/* Only show FAB di tab log signal */
.app[data-tab="config"] .fab,
.app[data-tab="manage"] .fab,
.app[data-tab="positions"] .fab { display: none; }

/* ============== Bottom navigation ============== */
.bottom-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--grad-bottombar);
  padding: 6px 0 4px;
  flex-shrink: 0;
}
.bottom-nav::before {
  content: '';
  position: absolute; top: 0; left: 8px; right: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  background-size: 200% 100%;
  background-position: 100% 0;
  opacity: 0.5;
  animation: shimmer-line-rev 5s linear infinite;
}
@keyframes shimmer-line-rev {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}
.nav-item {
  background: transparent; border: none;
  color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px;
  font-size: 10.5px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
  min-width: 0;
}
.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.nav-item svg {
  width: 20px; height: 20px;
}
.nav-item.active {
  color: var(--neon);
  text-shadow: 0 0 8px var(--neon-glow);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 30%; right: 30%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  border-radius: 2px;
  animation: nav-glow 2.2s ease-in-out infinite;
}
@keyframes nav-glow {
  0%, 100% { box-shadow: 0 0 6px var(--neon-soft);  filter: brightness(1); }
  50%      { box-shadow: 0 0 14px var(--neon-glow); filter: brightness(1.25); }
}
.nav-item svg { transition: transform 0.2s ease; }
.nav-item:active svg { transform: scale(0.9); }
.nav-item.active svg { transform: scale(1.05); }
.nav-item span { font-family: 'Space Mono', monospace; font-weight: 700; }

/* ============== Brand footer ============== */
.brand {
  text-align: center;
  font-size: 11px;
  color: var(--text-2);
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.4px;
  padding: 12px 0 14px;
  background: linear-gradient(180deg, transparent, rgba(0,255,163,0.04));
  flex-shrink: 0;
}
.brand .heart {
  color: #ff4763;
  text-shadow: 0 0 8px rgba(255,71,99,0.6), 0 0 16px rgba(255,71,99,0.35);
  display: inline-block;
  margin: 0 3px;
  animation: brand-heart-beat 1.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes brand-heart-beat {
  0%, 100%      { transform: scale(1);    text-shadow: 0 0 8px rgba(255,71,99,0.6),  0 0 16px rgba(255,71,99,0.35); }
  15%, 35%      { transform: scale(1.28); text-shadow: 0 0 14px rgba(255,71,99,0.95), 0 0 28px rgba(255,71,99,0.55); }
  25%           { transform: scale(1.12); }
  60%           { transform: scale(1);    }
}

/* ============== Chat overlay ============== */
.chat-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  z-index: 50;
  animation: slidein 0.2s;
}
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon-2));
  color: #0a1410;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 11px;
}
.chat-meta { flex: 1; min-width: 0; }
.chat-title { font-weight: 700; font-size: 15px; color: var(--neon); text-shadow: 0 0 8px var(--neon-glow); }
.chat-sub { font-size: 11.5px; color: var(--text-2); margin-top: 1px; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,255,163,0.04), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(0,255,163,0.04), transparent 40%),
    var(--bg);
}
.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--neon-soft); border-radius: 2px; }
.msgs { display: flex; flex-direction: column; gap: 6px; }

.day-divider {
  align-self: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 12px;
  margin: 6px 0;
  font-family: 'Space Mono', monospace;
}
.system-note {
  align-self: center;
  background: rgba(0,255,163,0.06);
  border: 1px dashed var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 8px;
  text-align: center;
  margin: 4px 0;
  max-width: 90%;
}

.bubble {
  max-width: 78%;
  padding: 8px 11px 8px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  word-wrap: break-word;
}
.bubble.in {
  background: var(--card);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-top-left-radius: 4px;
  color: var(--text);
}
.bubble.out {
  background: var(--neon);
  color: #0a1410;
  align-self: flex-end;
  border-top-right-radius: 4px;
  font-weight: 600;
  box-shadow: 0 0 12px var(--neon-glow);
}
.bubble .meta {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  text-align: right;
  font-family: 'Space Mono', monospace;
  opacity: 0.7;
}

.signal-card {
  align-self: stretch;
  background: var(--card);
  border: 1px solid var(--neon);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 6px 0 4px;
  box-shadow: 0 0 14px var(--neon-glow);
}
.signal-card.SELL { border-color: var(--danger); box-shadow: 0 0 14px rgba(255,94,108,0.35); }
.signal-card.WAIT { border-color: var(--warn); box-shadow: 0 0 14px rgba(255,200,61,0.32); }

.sig-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.sig-pill {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 12px;
  background: var(--neon); color: #0a1410;
  letter-spacing: 0.4px;
  box-shadow: 0 0 10px var(--neon-glow);
}
.signal-card.SELL .sig-pill { background: var(--danger); color: #fff; box-shadow: 0 0 10px rgba(255,94,108,0.5); }
.signal-card.WAIT .sig-pill { background: var(--warn); color: #0a1410; box-shadow: 0 0 10px rgba(255,200,61,0.45); }
.sig-title { font-weight: 700; font-size: 13.5px; color: var(--text); }
.sig-sub { color: var(--text-2); font-size: 11.5px; margin-top: 2px; }

.confidence-bar {
  height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden;
  margin: 8px 0;
}
.confidence-bar > div { height: 100%; background: var(--neon); transition: width .4s; box-shadow: 0 0 6px var(--neon-glow); }
.signal-card.SELL .confidence-bar > div { background: var(--danger); }
.signal-card.WAIT .confidence-bar > div { background: var(--warn); }

.sig-table { width: 100%; border-collapse: collapse; margin: 4px 0; font-size: 12.5px; font-family: 'Space Mono', monospace; }
.sig-table td { padding: 3px 0; color: var(--text-2); }
.sig-table td:last-child { text-align: right; color: var(--text); font-weight: 700; }

.sig-reasons { margin: 6px 0 0 16px; padding: 0; font-size: 12px; color: var(--text-2); }
.sig-reasons li { margin: 2px 0; }
.sig-time {
  display: block; text-align: right; margin-top: 6px;
  font-size: 10.5px; color: var(--muted);
  font-family: 'Space Mono', monospace;
}

.typing {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-top-left-radius: 4px;
  padding: 10px 14px;
  display: flex; gap: 4px;
  margin: 4px 0;
}
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--neon);
  animation: bounce 1.2s infinite;
  box-shadow: 0 0 6px var(--neon-glow);
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-foot {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 12px 10px;
  background: var(--grad-bottombar);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.quick-chips {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.quick-chips::-webkit-scrollbar { display: none; }
.qchip {
  flex-shrink: 0;
  background: rgba(0,255,163,0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 14px;
  padding: 5px 11px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.15s;
}
.qchip:hover, .qchip:active {
  color: var(--neon);
  border-color: var(--neon);
  background: rgba(0,255,163,0.14);
  box-shadow: 0 0 8px var(--neon-soft);
}
.composer-row { display: flex; align-items: center; gap: 8px; }
.chat-foot input {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 11px 16px;
  color: var(--text);
  font-size: 13.5px;
  font-family: 'Space Mono', monospace;
}
.chat-foot input:focus { border-color: var(--neon); box-shadow: 0 0 10px var(--neon-glow); }
.send-btn {
  background: var(--neon);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px var(--neon-glow);
  transition: transform 0.1s;
}
.send-btn:active { transform: scale(0.92); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Hide brand under chat overlay */
.app:has(#chatOverlay:not([hidden])) .brand,
.app:has(#chatOverlay:not([hidden])) .fab { display: none; }

/* ============== Inline scan panel (Konfig tab) ============== */
.scan-panel {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Space Mono', monospace;
}
.scan-bar {
  width: 100%;
  height: 4px;
  background: rgba(0,255,163,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}
.scan-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
  transition: width 0.3s ease-out;
}
.scan-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 24px; height: 100%;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0.6;
  filter: blur(2px);
  animation: scan-glide 1s linear infinite;
}
@keyframes scan-glide {
  from { transform: translateX(-30px); }
  to   { transform: translateX(0); }
}
.scan-panel.done .scan-bar-fill::after { animation: none; opacity: 0; }

.scan-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.scan-found { color: var(--neon); font-weight: 700; text-shadow: 0 0 6px var(--neon-glow); }
.scan-hint { font-size: 10.5px; color: var(--muted); letter-spacing: 0.4px; margin-top: 4px; }

/* Spinner inside the screening button while scanning */
.screen-btn.loading svg { animation: spin 1s linear infinite; }
.screen-btn.loading { opacity: 0.92; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== Alert banner (SL / TP hit) ============== */
.alert-banner {
  position: fixed;
  top: 12px; left: 12px; right: 12px;
  max-width: 460px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(0,255,163,0.18), rgba(0,217,138,0.05) 60%), var(--card);
  border: 1px solid var(--neon);
  border-radius: 14px;
  padding: 12px 14px 12px 14px;
  z-index: 500;
  display: flex; align-items: center; gap: 12px;
  font-family: 'Space Mono', monospace;
  box-shadow: 0 0 36px var(--neon-glow), 0 12px 40px rgba(0,0,0,0.65);
  animation: alert-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.alert-banner::after {
  /* light sweep across banner */
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  animation: alert-sweep 1.4s 0.35s ease-out;
  pointer-events: none;
}
.alert-banner.SL {
  background: linear-gradient(135deg, rgba(255,94,108,0.18), rgba(194,52,47,0.04) 60%), var(--card);
  border-color: var(--danger);
  box-shadow: 0 0 36px rgba(255,94,108,0.45), 0 12px 40px rgba(0,0,0,0.65);
}
.alert-banner.hide { animation: alert-out 0.35s forwards; }

.alert-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-neon);
  color: #0a1410;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 14px var(--neon-glow);
}
.alert-banner.SL .alert-icon {
  background: linear-gradient(135deg, var(--danger), #c2342f);
  color: #fff;
  box-shadow: 0 0 14px rgba(255,94,108,0.55);
}
.alert-icon::before, .alert-icon::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--neon);
  opacity: 0;
  animation: alert-ring 1.6s ease-out infinite;
}
.alert-icon::after { animation-delay: 0.6s; }
.alert-banner.SL .alert-icon::before,
.alert-banner.SL .alert-icon::after { border-color: var(--danger); }

.alert-text { flex: 1; min-width: 0; }
.alert-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alert-banner.SL .alert-title { color: #ffd5d8; }
.alert-banner:not(.SL) .alert-title { text-shadow: 0 0 10px var(--neon-glow); }
.alert-sub {
  font-size: 11px; color: var(--text-2);
  margin-top: 3px;
  letter-spacing: 0.3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alert-close {
  background: transparent; border: 1px solid var(--border);
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.alert-close:hover { color: var(--text); border-color: var(--text-2); }

@keyframes alert-in {
  0%   { transform: translateY(-120%) scale(0.92); opacity: 0; }
  60%  { transform: translateY(8px)   scale(1.03); opacity: 1; }
  100% { transform: translateY(0)     scale(1);    opacity: 1; }
}
@keyframes alert-out {
  to { transform: translateY(-120%); opacity: 0; }
}
@keyframes alert-ring {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}
@keyframes alert-sweep {
  to { left: 200%; }
}

/* ============== Toast ============== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 16px; right: 16px;
  max-width: 448px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--neon);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-family: 'Space Mono', monospace;
  color: var(--text);
  z-index: 200;
  animation: slideup 0.22s;
  pointer-events: none;
}
.toast.error { border-color: var(--danger); }
.toast.warn  { border-color: var(--warn); }
@keyframes slideup { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============== Modal ============== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  padding: 20px;
  animation: fadein 0.18s;
}
.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  max-width: 320px;
  width: 100%;
  font-family: 'Space Mono', monospace;
}
.modal-msg {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.modal-actions { display: flex; gap: 10px; }
.modal-btn {
  flex: 1;
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.modal-btn.cancel:hover { border-color: var(--text-2); color: var(--text); }
.modal-btn.ok {
  background: var(--neon);
  color: #0a1410;
  border-color: var(--neon);
}
.modal-btn.ok:hover { background: #00ffb3; }

/* ============== Favorite toggle (clean circle pill) ============== */
.toggle-fav {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,255,163,0.05);
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.toggle-fav:hover {
  color: var(--neon);
  border-color: var(--neon);
  background: rgba(0,255,163,0.10);
}
.toggle-fav.active {
  background: var(--grad-neon);
  border-color: transparent;
  color: #0a1410;
  box-shadow: 0 0 14px var(--neon-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}
.toggle-fav.active:hover { background: var(--grad-neon); }
.toggle-fav svg { transition: transform 0.18s; }
.toggle-fav.active svg { transform: scale(1.12); }

/* ============== Login Screen ============== */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(0,255,163,0.08), transparent 70%),
    radial-gradient(40% 35% at 18% 22%, rgba(0,255,163,0.06), transparent 70%),
    radial-gradient(45% 40% at 82% 78%, rgba(0,217,138,0.05), transparent 70%),
    var(--bg);
  z-index: 9999;
  overflow-y: auto;
  animation: login-fade 0.5s ease;
}
@keyframes login-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.login-screen.hide {
  animation: login-out 0.45s ease forwards;
}
@keyframes login-out {
  to { opacity: 0; transform: scale(0.97); }
}
.login-card {
  width: 100%;
  max-width: 420px;
  background:
    linear-gradient(140deg, rgba(0,255,163,0.06) 0%, rgba(0,217,138,0.02) 60%, rgba(0,0,0,0) 100%),
    rgba(13,26,20,0.85);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px 22px 20px;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.55),
    0 0 50px rgba(0,255,163,0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  animation: login-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes login-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 20px;
}
.login-logo {
  width: 78px; height: 78px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #00ffa3 0%, #00d98a 35%, #00b377 65%, #00ffa3 100%);
  background-size: 220% 220%;
  animation: logo-shift 5.2s ease-in-out infinite;
  box-shadow:
    0 0 36px var(--neon-glow),
    0 0 70px rgba(0,255,163,0.20),
    inset 0 1px 0 rgba(255,255,255,0.4);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.login-logo::before {
  content: ''; position: absolute; inset: -25%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,0.35) 12%, transparent 30%);
  animation: logo-spin 6s linear infinite;
  pointer-events: none;
}
.login-title { display: flex; flex-direction: column; line-height: 1; }
.login-name {
  font-family: 'Space Mono', monospace;
  font-size: 32px; font-weight: 700;
  color: var(--neon);
  letter-spacing: -0.5px;
  text-shadow: 0 0 18px rgba(0,255,163,0.45);
}
.login-sub {
  font-family: 'Space Mono', monospace;
  font-size: 13px; font-weight: 700;
  color: var(--text-2);
  letter-spacing: 4px;
  margin-top: 4px;
}
.login-tag {
  margin-top: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

/* Admin badge */
.login-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(0,255,163,0.08);
  border: 1px solid var(--neon-soft);
  border-radius: 999px;
  color: var(--neon);
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
  box-shadow: 0 0 20px rgba(0,255,163,0.10);
}
.login-badge svg { color: var(--neon); }

/* Input with icon + eye toggle */
.input-wrap { position: relative; }
.input-ico {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.login-input.has-ico { padding-left: 38px; }
.login-input.has-ico + .input-eye,
.input-wrap .input-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
}
.input-eye:hover { color: var(--neon); background: rgba(0,255,163,0.06); }
.input-eye.active { color: var(--neon); }

/* Form */
.login-pane { display: flex; flex-direction: column; }
.login-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.login-input {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  letter-spacing: 1px;
  transition: all 0.18s ease;
}
.login-input::placeholder { color: var(--muted); letter-spacing: 1.5px; }
.login-input:focus {
  border-color: var(--neon);
  background: rgba(0,255,163,0.04);
  box-shadow: 0 0 0 3px rgba(0,255,163,0.10), 0 0 16px rgba(0,255,163,0.12);
}
.login-hint {
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
}
.login-hint svg { flex-shrink: 0; color: var(--neon-3); opacity: 0.8; }

/* Submit button */
.login-submit {
  margin-top: 20px;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: var(--grad-neon);
  background-size: 200% 100%;
  color: #0a1410;
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(0,255,163,0.28),
    0 0 30px rgba(0,255,163,0.18),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: all 0.2s ease;
  animation: btn-shift 4s linear infinite;
}
@keyframes btn-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.login-submit:hover { transform: translateY(-1px); filter: brightness(1.05); }
.login-submit:active { transform: translateY(0); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; filter: none; }
.login-submit.loading { pointer-events: none; }
.login-submit.loading span::after {
  content: '...';
  display: inline-block;
  animation: dots 1s steps(4, end) infinite;
}
@keyframes dots {
  0%,20%   { content: ''; }
  40%      { content: '.'; }
  60%      { content: '..'; }
  80%,100% { content: '...'; }
}

/* Error */
.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255,94,108,0.10);
  border: 1px solid rgba(255,94,108,0.30);
  border-radius: 10px;
  color: var(--danger);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-align: center;
  animation: shake 0.32s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* Footer */
.login-foot {
  margin-top: 20px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.login-foot .heart {
  color: var(--danger);
  margin: 0 3px;
  display: inline-block;
  animation: heart-pulse 1.4s ease-in-out infinite;
}
@keyframes heart-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

/* WhatsApp FAB */
.login-wa {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--grad-neon);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 10px 24px rgba(0,255,163,0.32),
    0 0 30px rgba(0,255,163,0.22),
    inset 0 1px 0 rgba(255,255,255,0.35);
  text-decoration: none;
  transition: transform 0.18s ease;
  z-index: 10000;
}
.login-wa:hover { transform: scale(1.08); }
.login-wa::after {
  /* soft outer ring pulse */
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,255,163,0.45);
  animation: wa-pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0;   }
}

/* Responsive tweaks */
@media (max-width: 380px) {
  .login-card { padding: 22px 16px 18px; }
  .login-name { font-size: 28px; }
  .login-logo { width: 68px; height: 68px; }
}

/* ============== Account settings card (in Konfig tab) ============== */
.settings-card.account {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.settings-card.account::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 0% 0%, rgba(0,255,163,0.05), transparent 60%);
  pointer-events: none;
}
.account-head {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.account-head svg { color: var(--neon); }
.account-current {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 10px;
  background: rgba(0,0,0,0.30);
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin-bottom: 4px;
}
.account-current b { color: var(--neon-3); font-weight: 700; }
.acc-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.4px;
  margin-top: 6px;
}
.acc-input-wrap { position: relative; }
.acc-input {
  width: 100%;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  transition: all 0.18s ease;
}
.acc-input::placeholder { color: var(--muted); }
.acc-input:focus {
  border-color: var(--neon);
  background: rgba(0,255,163,0.04);
  box-shadow: 0 0 0 2px rgba(0,255,163,0.10);
}
.acc-input-wrap .acc-input { padding-right: 38px; }
.acc-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 7px;
  transition: color 0.18s ease, background 0.18s ease;
}
.acc-eye:hover { color: var(--neon); background: rgba(0,255,163,0.06); }
.acc-eye.active { color: var(--neon); }
.acc-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.acc-btn {
  padding: 12px 10px;
  border: none;
  border-radius: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.acc-btn.save {
  background: var(--grad-neon);
  color: #0a1410;
  box-shadow: 0 4px 14px rgba(0,255,163,0.20), inset 0 1px 0 rgba(255,255,255,0.3);
}
.acc-btn.save:hover { transform: translateY(-1px); filter: brightness(1.06); }
.acc-btn.reset {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.acc-btn.reset:hover { color: var(--danger); border-color: rgba(255,94,108,0.40); background: rgba(255,94,108,0.06); }
.acc-msg {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  text-align: center;
}
.acc-msg.ok {
  background: rgba(0,255,163,0.10);
  border: 1px solid var(--neon-soft);
  color: var(--neon);
}
.acc-msg.err {
  background: rgba(255,94,108,0.10);
  border: 1px solid rgba(255,94,108,0.30);
  color: var(--danger);
}

/* ============== Wallet pill in topbar ============== */
.wallet-pill {
  width: auto !important;
  padding: 0 10px 0 8px;
  display: flex; align-items: center; gap: 6px;
  height: 38px;
}
.wallet-pill-tag {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(155, 165, 175, 0.18);
  color: var(--text-2);
}
.wallet-pill.connected .wallet-pill-tag {
  background: rgba(0,255,163,0.18);
  color: var(--neon);
}
.wallet-pill.mainnet .wallet-pill-tag {
  background: rgba(255,94,108,0.18);
  color: var(--danger);
}

/* ============== Wallet card (Konfig tab) ============== */
.settings-card.wallet-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  background:
    linear-gradient(140deg, rgba(0,255,163,0.06) 0%, rgba(0,217,138,0.02) 60%, rgba(0,0,0,0) 100%),
    rgba(13,26,20,0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.wallet-head {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--neon);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.wallet-net-badge {
  margin-left: auto;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 6px;
  background: rgba(0,255,163,0.10);
  color: var(--neon-3);
}
.wallet-net-badge.mainnet {
  background: rgba(255,94,108,0.18);
  color: var(--danger);
}
.wallet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.30);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.wstat { display: flex; flex-direction: column; gap: 3px; }
.wstat-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.wstat-val {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}
.wstat-val.accent { color: var(--neon); font-weight: 700; }
.wallet-actions {
  display: flex; gap: 8px;
  flex-wrap: wrap;
}
.wallet-actions .acc-btn { flex: 1 1 auto; }

.wallet-config {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.20);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.wcfg-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.wcfg-row label {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
}
.acc-input.small {
  width: 90px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: right;
}

.net-toggle {
  display: flex;
  background: rgba(0,0,0,0.40);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.net-opt {
  padding: 7px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.net-opt:hover { color: var(--text); }
.net-opt.active {
  background: rgba(0,255,163,0.18);
  color: var(--neon);
}
.net-opt.mainnet.active {
  background: rgba(255,94,108,0.20);
  color: var(--danger);
}

.wallet-warn {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--warn);
  padding: 8px 10px;
  background: rgba(255,200,61,0.08);
  border: 1px solid rgba(255,200,61,0.20);
  border-radius: 8px;
  line-height: 1.45;
}
.wallet-warn.danger {
  color: var(--danger);
  background: rgba(255,94,108,0.10);
  border-color: rgba(255,94,108,0.30);
}

/* ============== Open Trade button on signal cards ============== */
.sig-trade-btn {
  margin-top: 10px;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--grad-neon);
  color: #0a1410;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,255,163,0.20), inset 0 1px 0 rgba(255,255,255,0.30);
  transition: all 0.18s ease;
}
.sig-trade-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.sig-trade-btn:disabled {
  background: rgba(155,181,166,0.18);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: none;
}
.sig-trade-btn .net-tag {
  padding: 1px 6px;
  font-size: 10px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.85);
  border-radius: 4px;
  font-weight: 700;
}

/* ============== Trade preview modal ============== */
.modal-card.trade-modal {
  max-width: 380px;
  padding: 20px;
}
.trade-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.trade-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.trade-pill.BUY {
  background: rgba(0,255,163,0.18);
  color: var(--neon);
}
.trade-pill.SELL {
  background: rgba(255,94,108,0.18);
  color: var(--danger);
}
.trade-title {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.trade-sub {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  padding: 12px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}
.trade-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}
.trade-grid span {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.trade-grid b {
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 700;
}
.trade-grid b.up   { color: var(--neon); }
.trade-grid b.dn   { color: var(--danger); }
.trade-warn {
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(255,200,61,0.08);
  border: 1px solid rgba(255,200,61,0.25);
  border-radius: 8px;
  color: var(--warn);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  text-align: center;
}
.trade-warn.danger {
  color: var(--danger);
  background: rgba(255,94,108,0.10);
  border-color: rgba(255,94,108,0.30);
}

/* ============== Wallet picker modal ============== */
.modal-card.wallet-picker {
  max-width: 380px;
  padding: 22px 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.wp-head {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 6px;
  text-align: center;
}
.wp-title {
  font-family: 'Space Mono', monospace;
  font-size: 16px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.4px;
}
.wp-sub {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.wp-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}
.wp-option:hover {
  background: rgba(0,255,163,0.06);
  border-color: var(--neon-soft);
  transform: translateX(2px);
}
.wp-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.wp-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.20);
}
.wp-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wp-name {
  font-family: 'Space Mono', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.wp-desc {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
}
.wp-arrow { color: var(--muted); }
.wp-foot {
  display: flex; justify-content: center;
  margin-top: 4px;
}
.wp-foot .modal-btn { width: 100%; }

.wp-retry {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px;
  background: rgba(0,255,163,0.08);
  border: 1px dashed var(--neon-soft);
  border-radius: 10px;
  color: var(--neon);
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}
.wp-retry:hover { background: rgba(0,255,163,0.15); }
.wp-loader {
  display: inline-block;
  width: 11px; height: 11px;
  border: 1.5px solid var(--neon-soft);
  border-top-color: var(--neon);
  border-radius: 50%;
  animation: wp-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes wp-spin { to { transform: rotate(360deg); } }

.wallet-pill.reconnecting .wallet-pill-tag {
  background: rgba(255,200,61,0.18);
  color: var(--warn);
  animation: pill-pulse 1.2s ease-in-out infinite;
}
@keyframes pill-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ============== Wallet error panel (persistent, actionable) ============== */
.wallet-error {
  background: rgba(255,94,108,0.10);
  border: 1px solid rgba(255,94,108,0.30);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.we-row {
  display: flex; align-items: flex-start; gap: 10px;
}
.we-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.2;
}
.we-msg {
  flex: 1;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--danger);
  word-break: break-word;
  line-height: 1.4;
}
.we-close {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,94,108,0.30);
  border-radius: 5px;
  color: var(--danger);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}
.we-close:hover { background: rgba(255,94,108,0.18); }
.we-hint {
  padding: 8px 10px;
  background: rgba(255,200,61,0.10);
  border: 1px solid rgba(255,200,61,0.25);
  border-radius: 8px;
  color: var(--warn);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  line-height: 1.55;
}
.we-hint a {
  color: var(--neon);
  text-decoration: underline;
}
.we-hint a:hover { color: var(--neon-3); }
.we-hint b { color: var(--neon-3); font-weight: 700; }

/* ============== Signing overlay (full-screen, very visible) ============== */
.signing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 13, 9, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.so-card {
  max-width: 360px;
  width: 100%;
  background: linear-gradient(140deg, rgba(0,255,163,0.08) 0%, rgba(0,217,138,0.02) 60%, rgba(0,0,0,0) 100%), rgba(13,26,20,0.95);
  border: 1px solid var(--neon-soft);
  border-radius: 18px;
  padding: 28px 22px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 50px rgba(0,255,163,0.10);
}
.so-spinner {
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  border: 3px solid rgba(0,255,163,0.18);
  border-top-color: var(--neon);
  border-radius: 50%;
  animation: so-spin 0.8s linear infinite;
}
@keyframes so-spin { to { transform: rotate(360deg); } }
.so-title {
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.so-msg {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 12px;
}
.so-msg b { color: var(--neon-3); }
.so-hint {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--warn);
  background: rgba(255,200,61,0.10);
  border: 1px solid rgba(255,200,61,0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 14px;
  line-height: 1.45;
}
.so-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.so-cancel:hover { color: var(--danger); border-color: rgba(255,94,108,0.40); }

.so-timer {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
  letter-spacing: 0.4px;
}
.so-timer b { color: var(--neon-3); font-weight: 700; }
.so-actions {
  display: flex; flex-direction: column;
  gap: 8px;
}
.so-reset {
  background: rgba(255,94,108,0.15);
  border: 1px solid rgba(255,94,108,0.40);
  color: var(--danger);
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.so-reset:hover { background: rgba(255,94,108,0.25); }

.ws-refresh {
  background: rgba(0,255,163,0.12);
  border: 1px solid var(--neon-soft);
  color: var(--neon);
  width: 18px; height: 18px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 4px;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease;
}
.ws-refresh:hover { background: rgba(0,255,163,0.22); }
.ws-refresh.spinning { animation: ws-rot 0.8s linear infinite; }
@keyframes ws-rot { to { transform: rotate(360deg); } }

.wallet-reset-total {
  width: 100%;
  font-size: 11px !important;
  padding: 10px !important;
  margin-top: 6px;
  opacity: 0.75;
}
.wallet-reset-total:hover { opacity: 1; }

.wallet-reliability-warn {
  margin-top: 10px;
  padding: 12px;
  background: rgba(255,200,61,0.10);
  border: 1px solid rgba(255,200,61,0.35);
  border-radius: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--warn);
  line-height: 1.55;
}
.wallet-reliability-warn b { color: var(--neon-3); }
.wallet-reliability-warn code {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 4px;
  color: var(--neon);
  font-size: 10.5px;
}

/* Bybit-flavored Open Trade button (orange tint) */
.sig-trade-btn.bybit {
  background: linear-gradient(135deg, #f7a600 0%, #ff8800 50%, #ffb84d 100%);
  margin-bottom: 8px;
}
.sig-trade-btn.bybit:hover { filter: brightness(1.06); }

#bybitCard .wallet-head svg { color: #f7a600; }
#bybitCard .wallet-net-badge {
  background: rgba(247, 166, 0, 0.15);
  color: #f7a600;
}
#bybitCard .wallet-net-badge.mainnet {
  background: rgba(255, 94, 108, 0.18);
  color: var(--danger);
}

/* ============== Venue selector tabs ============== */
.venue-tabs {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 4px;
}
.venue-label {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.venue-row { display: flex; gap: 8px; }
.venue-tab {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  color: var(--text-2);
}
.venue-tab:hover {
  border-color: var(--neon-soft);
  color: var(--text);
}
.venue-tab.active {
  background: rgba(0,255,163,0.08);
  border-color: var(--neon);
  box-shadow: 0 0 12px rgba(0,255,163,0.12);
  color: var(--text);
}
.vt-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.vt-dot.bybit { background: #f7a600; color: #f7a600; }
.vt-dot.hl    { background: var(--neon); color: var(--neon); }
.vt-name {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
}
.vt-desc {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Venue card hide rules consolidated below (after MEXC theme block) */

/* Mode toggle (normal vs scalping) — same look as net-toggle */
.mode-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.net-opt.scalping.active {
  background: rgba(247, 166, 0, 0.20);
  color: #f7a600;
}

/* ============== Input suffix indicators (% / $ / x) ============== */
.acc-input.small {
  position: relative;
}
.wcfg-row { position: relative; }
.acc-input.small.suffix-pct,
.acc-input.small.suffix-usd,
.acc-input.small.suffix-x {
  padding-right: 26px;
}
.wcfg-row:has(.suffix-pct)::after,
.wcfg-row:has(.suffix-usd)::after,
.wcfg-row:has(.suffix-x)::after {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.wcfg-row:has(.suffix-pct)::after { content: '%'; }
.wcfg-row:has(.suffix-usd)::after { content: '$'; }
.wcfg-row:has(.suffix-x)::after   { content: 'x'; }

/* Cleaner card spacing — less crowded */
.settings-card { gap: 10px; }
.wallet-card { gap: 10px !important; }
.wcfg-row { padding: 2px 0; }

/* Lighter dividers */
.wallet-stats { padding: 10px 12px; }
.wstat-label { font-size: 9.5px; }
.wstat-val { font-size: 12.5px; }

/* ============== Mode toggle (3 buttons: Normal/Scalping/Super) ============== */
.mode-row {
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
}
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: rgba(0,0,0,0.40);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.mode-opt {
  padding: 8px 4px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.mode-opt:hover { color: var(--text); }
.mode-opt.active[data-mode="normal"] {
  background: rgba(0,255,163,0.18);
  color: var(--neon);
}
.mode-opt.active[data-mode="scalping"] {
  background: rgba(247,166,0,0.20);
  color: #f7a600;
}
.mode-opt.active[data-mode="superscalping"] {
  background: rgba(255,94,108,0.20);
  color: var(--danger);
  box-shadow: 0 0 10px rgba(255,94,108,0.18);
}

/* ============== Bell badge ============== */
#bellBtn { position: relative; }
.bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px rgba(255,94,108,0.6);
  animation: badge-pop 0.3s ease;
}
@keyframes badge-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ============== Notification panel ============== */
.notif-panel {
  position: fixed;
  inset: 0;
  background: rgba(5, 13, 9, 0.65);
  z-index: 9000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 16px 16px;
  backdrop-filter: blur(6px);
}
.notif-card {
  width: 100%; max-width: 380px;
  background: linear-gradient(140deg, rgba(0,255,163,0.06) 0%, rgba(0,217,138,0.02) 60%, rgba(0,0,0,0) 100%), rgba(13,26,20,0.95);
  border: 1px solid var(--neon-soft);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,163,0.10);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 80px);
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--neon);
}
.notif-head > div { display: flex; gap: 6px; align-items: center; }
.notif-clear {
  background: rgba(255,94,108,0.10);
  border: 1px solid rgba(255,94,108,0.30);
  color: var(--danger);
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.notif-clear:hover { background: rgba(255,94,108,0.20); }
.notif-close {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px; line-height: 1;
}
.notif-close:hover { color: var(--text); border-color: var(--neon); }
.notif-list { overflow-y: auto; max-height: 65vh; padding: 8px; }
.notif-item {
  display: flex; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(0,0,0,0.20);
  border-left: 3px solid var(--muted);
  transition: background 0.15s;
}
.notif-item.unread {
  background: rgba(0,255,163,0.05);
  border-left-color: var(--neon);
}
.notif-item.warn { border-left-color: var(--warn); }
.notif-item.error { border-left-color: var(--danger); }
.notif-icon { font-size: 14px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-msg {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.notif-time {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.notif-empty {
  text-align: center;
  padding: 30px 16px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ============== MEXC venue + card theme (cyan) ============== */
.venue-row.venue-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.venue-tab {
  flex: unset;
  padding: 10px 8px;
}
.venue-tab .vt-name { font-size: 12.5px; }
.venue-tab .vt-desc { font-size: 9px; }

.vt-dot.mexc { background: #00d4d4; color: #00d4d4; }

/* Hyperliquid disabled for now — always hide HL card */
#walletCard { display: none !important; }
.app[data-venue="bybit"] #mexcCard { display: none; }
.app[data-venue="mexc"] #bybitCard { display: none; }

#mexcCard .wallet-head svg { color: #00d4d4; }
#mexcCard .wallet-net-badge {
  background: rgba(0, 212, 212, 0.15);
  color: #00d4d4;
}
.mexc-badge { background: rgba(0,212,212,0.15) !important; color: #00d4d4 !important; }

/* MEXC-flavored Open Trade button (cyan) */
.sig-trade-btn.mexc {
  background: linear-gradient(135deg, #00d4d4 0%, #00a8a8 50%, #4ddede 100%);
  margin-bottom: 8px;
  color: #002;
}
.sig-trade-btn.mexc:hover { filter: brightness(1.06); }

/* ============== Card collapse (minimize) ============== */
.card-collapse {
  margin-left: auto;
  width: 26px; height: 26px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  transition: all 0.18s ease;
  display: flex; align-items: center; justify-content: center;
}
.card-collapse:hover {
  color: var(--neon);
  border-color: var(--neon-soft);
  background: rgba(0,255,163,0.06);
}
.wallet-card.collapsed .card-collapse {
  transform: rotate(-90deg);
  color: var(--muted);
}
/* When collapsed, hide stats/config/error/warn — keep header + status row + connect/disconnect button */
.wallet-card.collapsed .wallet-config,
.wallet-card.collapsed .wallet-error,
.wallet-card.collapsed .wallet-warn,
.wallet-card.collapsed .wallet-reliability-warn,
.wallet-card.collapsed .wallet-reset-total {
  display: none !important;
}
/* Compact stats when collapsed: only show balance + status inline */
.wallet-card.collapsed .wallet-stats {
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 4px;
}
.wallet-card.collapsed .wstat:nth-child(n+3) { display: none; }
.wallet-card.collapsed .wstat-label { font-size: 9px; }
.wallet-card.collapsed .wstat-val { font-size: 12px; }
.wallet-card.collapsed .wallet-actions { gap: 6px; }
.wallet-card.collapsed .wallet-actions .acc-btn { padding: 8px; font-size: 12px; }

/* When collapsed AND not connected, hide stats too — just show header + Connect */
.wallet-card.collapsed .wallet-stats[hidden] { display: none !important; }

/* ============== Positions tab ============== */
.positions-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
  gap: 12px;
}
.positions-title {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--neon);
}
.positions-sub {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.positions-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 0 14px 12px;
  padding: 12px;
  background: rgba(0,0,0,0.30);
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.psum-cell {
  display: flex; flex-direction: column; gap: 2px;
  text-align: center;
}
.psum-label {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.psum-val {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.psum-val.up { color: var(--neon); }
.psum-val.down { color: var(--danger); }

.positions-list {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 0 12px 80px;
}
.pos-item {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pos-row1 {
  display: flex; align-items: center; gap: 8px;
}
.pos-side {
  padding: 3px 8px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
}
.pos-side.BUY  { background: rgba(0,255,163,0.18); color: var(--neon); }
.pos-side.SELL { background: rgba(255,94,108,0.18); color: var(--danger); }
.pos-side.LONG { background: rgba(0,255,163,0.18); color: var(--neon); }
.pos-side.SHORT { background: rgba(255,94,108,0.18); color: var(--danger); }
.pos-symbol {
  font-family: 'Space Mono', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.pos-source {
  margin-left: auto;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  color: var(--muted);
  padding: 2px 6px;
  background: rgba(0,0,0,0.30);
  border-radius: 5px;
}
.pos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px 10px;
}
.pos-cell {
  display: flex; flex-direction: column; gap: 2px;
}
.pos-cell-label {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
}
.pos-cell-val {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--text);
}
.pos-cell-val.up   { color: var(--neon); }
.pos-cell-val.down { color: var(--danger); }
.pos-pnl {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--border);
}
.pos-pnl.up   { background: rgba(0,255,163,0.06); border-color: var(--neon-soft); }
.pos-pnl.down { background: rgba(255,94,108,0.06); border-color: rgba(255,94,108,0.30); }
.pos-pnl-label {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
}
.pos-pnl-val {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
}
.pos-pnl.up .pos-pnl-val   { color: var(--neon); }
.pos-pnl.down .pos-pnl-val { color: var(--danger); }
.pos-empty {
  padding: 60px 20px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

/* Bottom-nav badge */
.nav-badge {
  display: inline-block;
  margin-left: 3px;
  padding: 0 4px;
  font-size: 8.5px;
  font-weight: 700;
  background: var(--neon);
  color: #0a1410;
  border-radius: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

/* Close position button */
.pos-close-btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  background: rgba(255,94,108,0.10);
  border: 1px solid rgba(255,94,108,0.30);
  border-radius: 8px;
  color: var(--danger);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: all 0.15s ease;
}
.pos-close-btn:hover {
  background: rgba(255,94,108,0.20);
  border-color: rgba(255,94,108,0.50);
}
.pos-close-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============== Bell ring animation on click ============== */
#bellBtn { transition: transform 0.12s ease; }
#bellBtn:active { transform: scale(0.88); }
#bellBtn.bell-ringing svg { animation: bell-ring 0.6s ease; transform-origin: top center; }
@keyframes bell-ring {
  0%   { transform: rotate(0deg) scale(1); }
  15%  { transform: rotate(-22deg) scale(1.1); }
  30%  { transform: rotate(18deg) scale(1.1); }
  45%  { transform: rotate(-14deg) scale(1.05); }
  60%  { transform: rotate(10deg) scale(1.05); }
  75%  { transform: rotate(-6deg) scale(1.02); }
  90%  { transform: rotate(3deg) scale(1.01); }
  100% { transform: rotate(0deg) scale(1); }
}

/* ============== Notification panel — minimalist refinements ============== */
.notif-panel {
  animation: notif-fade-in 0.18s ease;
}
@keyframes notif-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.notif-card {
  animation: notif-slide-down 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes notif-slide-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--neon-soft);
  color: var(--neon);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.notif-head-actions { display: flex; gap: 6px; align-items: center; }

/* Item — clickable, hover, delete button */
.notif-item {
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, background 0.15s, opacity 0.18s;
  animation: notif-item-in 0.2s ease;
}
@keyframes notif-item-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.notif-item:hover {
  background: rgba(0,255,163,0.08);
  transform: translateX(2px);
}
.notif-item:active { transform: scale(0.98); }
.notif-item.removing {
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
}
.notif-item.unread::before {
  content: '';
  position: absolute;
  right: 36px;
  top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon-glow);
  animation: unread-pulse 1.6s ease-in-out infinite;
}
@keyframes unread-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
/* Per-item delete button */
.notif-del {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.notif-item:hover .notif-del,
.notif-item .notif-del { opacity: 0.5; }
.notif-item:hover .notif-del { opacity: 1; }
.notif-del:hover {
  background: rgba(255,94,108,0.15);
  color: var(--danger);
}
/* Make body breathing room for delete button */
.notif-item .notif-body { padding-right: 28px; }

/* Refined item layout */
.notif-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.30);
  border-radius: 6px;
  font-size: 12px;
  flex-shrink: 0;
}
.notif-item.warn .notif-icon  { background: rgba(255,200,61,0.15); color: var(--warn); }
.notif-item.error .notif-icon { background: rgba(255,94,108,0.15); color: var(--danger); }
.notif-item.info .notif-icon  { background: rgba(0,255,163,0.10); color: var(--neon); }
