* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  background: #0b0f16;
  color: #fff;
  display: flex;
  overflow-x: hidden;
}

/*header*/
.bot-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  margin-bottom: 24px;
}

.bot-icon-container {
  background-color: #1a1e29;
  /* Background color as per image */
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #2a2e39;
}

.bot-icon-container i {
  font-size: 30px;
  color: #5d78ff;
  /* Icon color */
}

.bot-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #8e9297;
  /* Gray text color */
  margin-top: 4px;
}

.breadcrumb i {
  font-size: 10px;
  color: #4a4f5d;
}

.bot-id {
  color: #8e9297;
  font-weight: 500;
}

/* Responsive adjustment */
@media (max-width: 480px) {
  .bot-title {
    font-size: 20px;
  }

  .breadcrumb {
    font-size: 12px;
  }

  .bot-icon-container {
    width: 50px;
    height: 50px;
  }
}

/* ================= SIDEBAR ================= */
.sidebar {
  width: 240px;
  background: #060a12;
  padding: 22px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.logo {
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 25px;
}

.logo span:last-child {
  color: #9da8ff;
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-top: 8px;
  border-radius: 12px;
  cursor: pointer;
}

.nav.active {
  background: #131a2a;
}

.nav.muted {
  color: #6b7280;
}

/* ================= MAIN ================= */
.main {
  flex: 1;
  padding: 18px 26px;
  min-width: 0;
}

/* ================= TOPBAR ================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hamburger {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

.search {
  display: flex;
  align-items: center;
  background: #121726;
  padding: 10px 14px;
  border-radius: 12px;
  min-width: 200px;
  flex: 1;
}

.search input {
  background: none;
  border: none;
  color: #fff;
  width: 100%;
  margin-left: 10px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  background: #121726;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.wallet {
  background: #4f6cff;
  padding: 8px 14px;
  border-radius: 10px;
}

/* ================= CARDS ================= */
.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 18px;
  margin-bottom: 40px;
}

.card {
  background: linear-gradient(180deg, var(--card-bg), var(--bg-dark));
  border-radius: 18px;
  padding: 18px;
  min-height: 135px;
  border: 1px solid var(--border);
}

.card.unrealized {
  background: linear-gradient(180deg, #111827, #0c30cf);
  border: 1px solid #1f2937;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  color: #9ca3af;
}

.card h3 {
  font-size: 22px;
  margin: 10px 0 4px;
}

.card p,
small {
  font-size: 13px;
  color: #9ca3af;
}

/* AMOUNT ROW */
.amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 6px;
}

.amount-row h3 {
  font-size: 28px;
  font-weight: 600;
}

.amount-row span {
  font-size: 16px;
  opacity: 0.85;
}

.amount-row .usd {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 6px;
  position: relative;
  top: 1px;
}

/* ICON */
.exact-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1b2230, #141a26);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.45);
}

.exact-icon svg {
  width: 18px;
  height: 18px;
}

.exact-icon rect:nth-child(1) {
  fill: #67e8f9;
}

.exact-icon rect:nth-child(2) {
  fill: #a78bfa;
}

.exact-icon rect:nth-child(3) {
  fill: #34d399;
}

/* ================= OVERLAY ================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 9;
}

.overlay.show {
  display: block;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  body {
    display: block;
  }

  .hamburger {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 10;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar {
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
    order: 3;
  }

  .cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 10px;
  }

  .card {
    min-width: 85%;
    scroll-snap-align: start;
  }

  .cards::-webkit-scrollbar {
    display: none;
  }
}

/*---panel*/
:root {
  --red: #ff4d4f;
  --green: #22c55e;
  --border: #1f2937;
  --muted: #94a3b8;
  --bg-dark: #020617;
  --card-bg: #111827;
  --bg-wrapper: #0b1220;
  --bg-card: linear-gradient(180deg, #0f172a, #0b1220);
  --text-muted: #9ca3af;
  --blue: #3b82f6;
  --border-light: rgba(255, 255, 255, 0.05);
}

/* Main Wrapper*/
.main-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1400px;
  margin: 20px auto 40px;
  align-items: stretch;
}

.left-panel {
  flex: 1 1 650px;
  min-width: 0;
}


.right-panel {
  flex: 0 1 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.right-panel .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}


.right-panel .stats-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Headers */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.header h2 {
  font-size: 16px;
  margin: 0;
}

/* Tabs Scrollable on Mobile */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 5px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 20px;
  background: #0f172a;
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
}

.tab.active {
  background: #1e293b;
  color: white;
  border-color: #3b82f6;
}


/* --- TABLE FIXES --- */
.table-container {
  width: 100%;
  overflow-x: auto;
  /* Mobile par swipe karne ke liye */
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  /* Table ka structure maintain rakhne ke liye */
}

th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  padding: 12px 10px;
}

td {
  padding: 14px 10px;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid var(--border);
}

/* Token Info */
.token {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1f2937;
  flex-shrink: 0;
}

.token-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.token-name span {
  font-size: 11px;
  color: var(--muted);
  font-weight: normal;
}

/* Badges */
.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: inline-block;
  margin: 10px 0;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.badge.blue {
  color: #60a5fa;
  background: rgba(30, 58, 138, 0.3);
}

.badge.green {
  color: #4ade80;
  background: rgba(6, 78, 59, 0.3);
}

.pl.up {
  color: var(--green);
}

.pl.down {
  color: var(--red);
}

/* Buttons */
.manage {
  background: transparent;
  border: 1px solid #1d4ed8;
  color: #60a5fa;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.view-all {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  background: linear-gradient(90deg, #1e3a8a, #0f172a);
  border: 1px solid #1d4ed8;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

/* Right Panel Stats */
.stats-group {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row span {
  color: var(--muted);
  font-size: 13px;
}

.stat-row b {
  color: white;
  font-size: 14px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .header h2 {
    width: 100%;
    margin-bottom: 10px;
  }

  .main-container {
    gap: 30px;
  }
}

/*last*/
.wrapper {
  padding: 20px 24px;
  background: var(--bg-wrapper);
  border-radius: 14px;
  width: 100%;
  margin: 20px 0;
  overflow: hidden;
}

/* HEADER */

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-left h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.refresh {
  font-size: 16px;
  color: var(--blue);
  cursor: pointer;
}

.nav-btns {
  display: flex;
  gap: 8px;
}

.nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}

/* RESPONSIVE SCROLL CONTAINER */
.ai-ai-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.ai-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border-light);
  min-width: 0;
  /* Grid item shrink fix */
}

/* CARD CONTENT */
.ai-card-top {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-card-title {
  font-size: 13px;
  font-weight: 600;
}

.ai-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.stat {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 8px 0;
  color: var(--text-muted);
}

.stat p {
  margin: 0;
}

.stat span {
  color: var(--green);
}

.icons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #d1d5db;
}

/* FOOTER BUTTONS */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.btn {
  width: 100%;
  height: 50px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-discover {
  background: #5b7cfa;
  color: #fff;
}

.btn-manage {
  background: #0f1a33;
  color: #5b7cfa;
  border: 1px solid #5b7cfa;
}

.btn-stop {
  background: #c4413b;
  color: #fff;
}

/* ---------- SCROLL RESPONSIVE LOGIC ---------- */
@media (max-width: 1100px) {
  .ai-ai-cards {
    display: flex;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .ai-ai-cards::-webkit-scrollbar {
    display: none;
  }

  .ai-card {
    flex: 0 0 280px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}