/* ─── Reset / Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0d;
  --panel:     #111111;
  --card:      #1a1a1a;
  --border:    #2a2a2a;
  --green:     #00e676;
  --red:       #ff1744;
  --yellow:    #ffea00;
  --blue:      #2979ff;
  --purple:    #aa00ff;
  --text:      #e0e0e0;
  --sub:       #757575;
  --indigo:    #1a237e;
  --indigo-b:  #3949ab;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
  background: var(--card);
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 52px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.logo    { color: var(--green); font-size: 1.25rem; font-weight: bold; flex: 1; }
.byline  { color: var(--sub); font-size: .82rem; margin-right: 20px; }
.logout  { color: var(--sub); font-size: .82rem; text-decoration: none; }
.logout:hover { color: var(--red); }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  flex: 1;
  padding: 10px;
  gap: 10px;
  overflow: hidden;
}

/* ─── Left panel ─────────────────────────────────────────────────────────── */
.left-panel {
  background: var(--panel);
  border-radius: 8px;
  padding: 14px 12px;
  width: 270px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-title {
  color: var(--blue);
  font-size: .78rem;
  font-weight: bold;
  margin-top: 6px;
}

label {
  color: var(--sub);
  font-size: .75rem;
  margin-top: 4px;
}

input, select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: Consolas, monospace;
  font-size: .88rem;
  padding: 8px 10px;
  width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--blue); }
select option { background: var(--card); }

hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* Buttons */
button {
  width: 100%; padding: 9px;
  border: none; border-radius: 6px;
  font-family: Consolas, monospace; font-size: .9rem; font-weight: bold;
  cursor: pointer; transition: opacity .15s;
}
button:hover   { opacity: .85; }
button:disabled { opacity: .35; cursor: default; }

.btn-blue   { background: var(--blue);   color: #fff; }
.btn-green  { background: #1b5e20;       color: #fff; }
.btn-green:hover:not(:disabled) { background: var(--green); color: #000; }
.btn-red    { background: #b71c1c;       color: #fff; }
.btn-red:hover:not(:disabled)   { background: var(--red);   }
.btn-ghost  { background: var(--card);   color: var(--sub); border: 1px solid var(--border); font-weight: normal; }
.btn-ghost:hover { color: var(--text); }

/* ─── Right panel ────────────────────────────────────────────────────────── */
.right-panel {
  background: var(--panel);
  border-radius: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow: hidden;
}

/* Stats */
.stats-row {
  background: var(--card);
  border-radius: 6px;
  display: flex;
  height: 58px;
  flex-shrink: 0;
  padding: 0 10px;
}
.stat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stat-label { color: var(--sub); font-size: .7rem; }
.stat-val   { font-size: 1.4rem; font-weight: bold; color: var(--text); }
.stat-val.green  { color: var(--green);  }
.stat-val.red    { color: var(--red);    }
.stat-val.yellow { color: var(--yellow); }
.stat-val.purple { color: var(--purple); }

/* Log */
.log-box {
  flex: 1;
  background: var(--bg);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-y: auto;
  font-size: .82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-box .verde   { color: var(--green);  }
.log-box .vermelho{ color: var(--red);    }
.log-box .amarelo { color: var(--yellow); }
.log-box .azul    { color: var(--blue);   }
.log-box .roxo    { color: var(--purple); }
.log-box .cinza   { color: var(--sub);    }

/* Buy panel */
.buy-panel {
  background: var(--card);
  border-radius: 8px;
  padding: 12px 14px;
  flex-shrink: 0;
}
.buy-info {
  color: var(--text);
  font-size: .8rem;
  margin-bottom: 10px;
  white-space: pre-line;
}
.buy-btns  { display: flex; flex-direction: column; gap: 6px; }
.buy-row   { display: flex; gap: 8px; }

.btn-buy-green  { background: var(--green);  color: #000; flex: 1; padding: 8px; }
.btn-buy-ghost  { background: var(--card);   color: var(--text); border: 1px solid var(--border); flex: 1; padding: 8px; font-weight: normal; }
.btn-buy-indigo { background: var(--indigo); color: var(--text); border: 1px solid var(--indigo-b); flex: 1; padding: 8px; font-weight: normal; }

/* ─── Footer status ──────────────────────────────────────────────────────── */
footer {
  padding: 5px 16px;
  font-size: .78rem;
  flex-shrink: 0;
}
.status-disconnected { color: var(--red);   }
.status-connected    { color: var(--green); }
.status-loading      { color: var(--yellow); }

/* Scroll personalizado */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 4px; }
