/* --- LAYOUT OVERRIDES --- */
.cyber-console {
  /* Adjust grid for Dashboard: Left side (Bots) is wider */
  grid-template-columns: 1.8fr 1.2fr;
  height: 75vh;
  /* Fixed height for scrolling */
}

/* --- BOT DECK (Left) --- */
.bot-deck {
  overflow: hidden;
  /* Contains the scrollable area */
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  overflow-y: auto;
  /* Scrollable bots */
  padding-bottom: 20px;
  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--neon-teal) #000;
}

/* --- BOT CARD DESIGN --- */
.bot-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 4px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.bot-card:hover {
  border-color: var(--neon-teal);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.bot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--neon-teal);
}

.bot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  gap: 10px;
  /* 1. Ensures they never touch */
}

.bot-name {
  font-family: 'Fira Mono', monospace;
  font-weight: bold;
  color: #fff;
  letter-spacing: 1px;

  /* 2. Truncation Logic */
  white-space: nowrap;
  /* Force text on one line */
  overflow: hidden;
  /* Hide overflow */
  text-overflow: ellipsis;
  /* Add "..." at the end */
  min-width: 0;
  /* crucial for flexbox truncation */
}

.bot-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  background: #333;
  color: #aaa;

  /* 3. Prevent Squishing */
  flex-shrink: 0;
  /* Never let the badge shrink */
  white-space: nowrap;
  /* Keep status text on one line */
}

.bot-badge.success {
  background: rgba(29, 205, 159, 0.2);
  color: var(--neon-teal);
}

.bot-badge.stopped {
  background: rgba(29, 205, 159, 0.2);
  color: #f39c12;
}

/* Card Stats */
.bot-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #888;
}

.stat-row {
  display: flex;
  justify-content: space-between;
}

.stat-row .val {
  color: #eee;
  font-family: 'Fira Mono', monospace;
}

.stat-row .val.leverage {
  color: #f39c12;
}

.stat-row .val.profit {
  color: var(--neon-teal);
  text-shadow: 0 0 5px rgba(29, 205, 159, 0.4);
}

.stat-row .val.loss {
  color: #ff4444;
}

/* Small Action Button */
.bot-action {
  margin-top: 15px;
}

.cyber-sm-btn {
  width: 100%;
  background: transparent;
  border: 1px solid #444;
  color: #888;
  font-size: 11px;
  padding: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.cyber-sm-btn:hover {
  border-color: var(--neon-teal);
  color: var(--neon-teal);
}

/* --- SUMMARY DECK (Right) --- */
.summary-deck {
  display: flex;
  flex-direction: column;
}

.compact-body {
  padding: 20px;
}

.equity-box {
  text-align: center;
  padding: 15px;
  background: radial-gradient(circle, rgba(29, 205, 159, 0.05) 0%, transparent 70%);
  border: 1px solid rgba(29, 205, 159, 0.1);
}

.equity-val {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  margin: 10px 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.equity-sub {
  font-size: 12px;
}

.equity-sub.profit {
  color: var(--neon-teal);
}

.border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- TERMINAL ADJUSTMENTS --- */
.fill-height {
  flex: 1;
  /* Fills remaining space */
  border: none;
  background: transparent;
  margin: 0;
  border-top: 1px solid #333;
}

.log-time {
  color: #555;
  margin-right: 5px;
}

.log-info {
  color: #aaa;
}

.log-success {
  color: var(--neon-teal);
}

.log-warn {
  color: #f39c12;
}

.log-err {
  color: #ff4444;
}

/* Mobile */
@media (max-width: 768px) {
  .cyber-console {
    grid-template-columns: 1fr;
    height: auto;
  }

  .bot-grid {
    max-height: 400px;
  }

  .fill-height {
    height: 200px;
  }
}

/* Container for the table to allow scrolling */
.trans-list-container {
    height: 300px; /* Adjust to match your box height */
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
}

/* The Table */
.cyber-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #aaddff;
}

.cyber-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #333;
    color: #666;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.cyber-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

/* Typography & Colors */
.mono { font-family: 'Courier New', monospace; }

/* TYPE COLUMN */
.tx-type { 
    font-weight: normal; /* Remove bold to reduce glare */
    opacity: 0.7;        /* Slightly dim the text */
}
/* Keep original hex codes */
.tx-type.in { color: #00ff9d; } 
.tx-type.out { color: #ff0055; }

.icon { margin-right: 5px; font-size: 0.8em; }

/* STATUS PILLS */
.status-pill {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: bold;
}
.status-pill.success { background: rgba(0, 255, 157, 0.1); color: #00ff9d; border: 1px solid #00ff9d; }
.status-pill.pending { background: rgba(255, 204, 0, 0.1); color: #ffcc00; border: 1px solid #ffcc00; animation: pulse 2s infinite; }
.status-pill.failed  { background: rgba(255, 0, 85, 0.1); color: #ff0055; border: 1px solid #ff0055; }

/* Scrollbar styling (optional) */
.custom-scroll::-webkit-scrollbar { width: 5px; }
.custom-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: #00f0ff; }

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
