:root{
  --bg:#263652;
  --panel:#0f1a33;
  --card:#0f1a33;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --primary:#22c55e;
  --primary2:#60a5fa;
  --danger:#ef4444;
  --border:rgba(148,163,184,.18);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --radius: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 900px at 10% 0%, rgba(96,165,250,.18), transparent 45%),
              radial-gradient(1200px 900px at 90% 10%, rgba(34,197,94,.14), transparent 50%),
              var(--bg);
  color:var(--text);
  font-size: 16px;
}

a{color:inherit; text-decoration:none}

/* App shell (Flexbox) */
.app{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:280px;
  flex:0 0 280px;
  position:sticky;
  top:0;
  height:100vh;
  padding:18px 14px;
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,26,51,.9), rgba(15,26,51,.55));
  backdrop-filter: blur(8px);
}

.brand{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand .logo{
  width:40px;height:40px;border-radius:12px;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
  color:#07101f;
}

.brand .meta{line-height:1.1}
.brand .meta .title{font-weight:800}
.brand .meta .sub{font-size:12px;color:var(--muted)}

.nav{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.nav a{
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid transparent;
  color: rgba(229,231,235,.92);
  display:flex; align-items:center; gap:10px;
}

.nav a:hover{background: rgba(148,163,184,.08); border-color: rgba(148,163,184,.14)}
.nav a.active{background: rgba(96,165,250,.12); border-color: rgba(96,165,250,.30)}

.nav .section{margin-top:10px; font-size:12px; color:var(--muted); padding:8px 12px 2px}

.main{
  flex:1 1 auto;
  min-width:0;
  padding:18px;
}

.topbar{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15,26,51,.55);
  backdrop-filter: blur(8px);
}

.topbar .left{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color: var(--muted);
  font-size:12px;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(148,163,184,.08);
  color:var(--text);
  cursor:pointer;
  font-size: 15px;
}

.btn:hover{background: rgba(148,163,184,.12)}
.btn.primary{background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.28)}
.btn.primary:hover{background: rgba(34,197,94,.18)}
.btn.danger{background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25)}
.btn.danger:hover{background: rgba(239,68,68,.16)}

.content{ margin-top:16px; }

/* Cards row (Flexbox replacement for grid) */
.cards-row{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:stretch;
}

.cards-row > .card{
  flex: 1 1 320px;
  min-width: 280px;
}

/* Cadastro UI helpers */
.radio-group{ display:flex; gap:14px; flex-wrap:wrap; margin: 6px 0 4px 0; align-items:center; }
.radio-option{ display:flex; align-items:center; gap:10px; cursor:pointer; user-select:none; }
.radio-option input{ transform: translateY(1px); }

.docs-row{ display:flex; flex-wrap:wrap; gap:12px; }
.docs-row .doc-card{ flex:1 1 260px; min-width: 100%;}
.doc-card{ display:flex; flex-direction:column; gap:10px; }
.doc-card input[type="file"]{ width:100%; }

.card{
  border:1px solid var(--border);
  background: rgba(15,26,51,.55);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}

.card h2,.card h3{margin:0 0 8px 0}
.muted{color:var(--muted)}

.kpi{display:flex; flex-direction:column; gap:6px}
.kpi .value{font-size:22px; font-weight:900}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 12px;
}

.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(148,163,184,.12);
  text-align:left;
  font-size:14px;
}

.table th{font-size:12px;color:var(--muted); text-transform:uppercase; letter-spacing:.06em}
.table tr:hover td{background: rgba(148,163,184,.06)}

.form{ display:flex; flex-direction:column; gap:10px; }

label{font-size:16px; color: var(--muted);padding: 5px 0;display: grid;} 
input,select,textarea{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.35);
  color: var(--text);
  outline:none;
  font-size:15px;
}
input:focus,select:focus,textarea:focus{border-color: rgba(96,165,250,.55)}

.row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.row > div{ flex: 1 1 260px; min-width: 220px; }

.alert{
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(96,165,250,.25);
  background: rgba(96,165,250,.10);
  color: rgba(229,231,235,.96);
}

.alert.danger{border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.10)}
.alert.success{border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.10)}

.pager{display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top:12px; flex-wrap:wrap}
.pager a{padding:8px 10px; border:1px solid var(--border); border-radius:10px; background: rgba(148,163,184,.06)}
.pager a.active{background: rgba(96,165,250,.12); border-color: rgba(96,165,250,.30)}

/* Auth pages (Flexbox) */
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.auth{
  width:min(750px, 100%);
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.auth > .panel{ flex: 1 1 420px; min-width: 100%; padding:18px; }
.auth > .hero{ flex: 1 1 320px; min-width: 280px; padding:18px; display:flex; flex-direction:column; justify-content:space-between; }

.auth h1{margin:0 0 6px 0}

@media (max-width: 920px){
  .app{flex-direction:column;}
  .sidebar{position:relative;height:auto;width:100%;flex:0 0 auto}
}

@media (max-width: 540px){
  .cards-row > .card{ flex-basis: 100%; min-width: 0; }
  .row > div{ flex-basis: 100%; min-width: 0; }
  .auth > .panel, .auth > .hero{ flex-basis: 100%; min-width: 0; }
}

/* =============================
   Layout option 1: Float/Clearfix
   ============================= */
.clearfix::after{content:"";display:block;clear:both}

.app{display:block;min-height:100vh}
.sidebar{float:left;position:sticky;top:0}
.main{margin-left:280px;min-width:0}

@media (max-width: 980px){
  .sidebar{float:none;position:relative;width:auto;flex:none;height:auto}
  .main{margin-left:0}
}

/* Cards layout: float + percent widths */
.cards-float{margin:0 -7px}
.cards-float .card{float:left;margin:0 7px 14px 7px}
.cards-float .w-100{width: calc(100% - 14px)}
.cards-float .w-66{width: calc(66.666% - 14px)}
.cards-float .w-50{width: calc(50% - 14px)}
.cards-float .w-33{width: calc(33.333% - 14px)}

@media (max-width: 980px){
  .cards-float .w-66{width: calc(100% - 14px)}
  .cards-float .w-50{width: calc(100% - 14px)}
  .cards-float .w-33{width: calc(50% - 14px)}
}
@media (max-width: 640px){
  .cards-float .card{width: calc(100% - 14px)}
}

/* helpers */
.grid-like > div{margin: 6px 0}


.kpi-pendente-inicio{
    text-align: center;
}

.compra-box {
  padding: 22px;
  border-radius: 16px;
}

.compra-form {
  margin: 0;
}

.compra-top {
  margin: 0 -10px 18px -10px;
}

.compra-col {
  float: left;
  padding: 0 10px;
  box-sizing: border-box;
}

.compra-col-50 {
  width: 50%;
}

.compra-label {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #d9e2f2;
}

.compra-input {
  width: 100%;
  height: 64px;
  border: 1px solid #2a3750;
  border-radius: 14px;
  background: #0f1726;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  padding: 0 18px;
  box-sizing: border-box;
  outline: none;
  transition: 0.2s ease;
}

.compra-input::placeholder {
  color: #7f8aa3;
  font-size: 18px;
  font-weight: 500;
}

.compra-input:focus {
  border-color: #4c8dff;
  box-shadow: 0 0 0 3px rgba(76, 141, 255, 0.15);
}

.compra-resumo {
  background: #111b2d;
  border: 1px solid #24314b;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.compra-resumo-titulo {
  margin: 0 0 14px 0;
  font-size: 20px;
  color: #ffffff;
}

.compra-resumo-grid {
  margin: 0 -8px;
}

.resumo-item {
  float: left;
  width: 25%;
  padding: 0 8px;
  box-sizing: border-box;
}

.resumo-item > div {
  background: #0d1523;
  /*border: 1px solid #24314b;*/
  border-radius: 14px;
  padding: 12px;
}

.resumo-label {
  font-size: 13px;
  color: #8ea0bf;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.resumo-valor {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  color: #ffffff;
}

.compra-resumo-texto {
  margin-top: 12px;
  font-size: 13px;
}

.compra-btn {
  display: block;
  width: 100%;
  height: 64px;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 800;
  margin-top: 6px;
}

.compra-rodape {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
}

.clearfix::after,
.compra-top::after,
.compra-resumo-grid::after {
  content: "";
  display: table;
  clear: both;
}

.chart-card {
  margin-top: 12px;
  overflow: hidden !important;
  position: relative;
}

.chart-box {
  width: 100%;
  height: 420px;
  overflow: hidden !important;
  position: relative;
  overscroll-behavior: contain;
}

#usdtCandleChart {
  width: 100%;
  height: 420px;
  overflow: hidden !important;
  position: relative;
  overscroll-behavior: contain;
}

#usdtCandleChart * {
  overscroll-behavior: contain;
}

.apexcharts-canvas,
.apexcharts-svg,
.apexcharts-inner {
  overflow: hidden !important;
  max-height: 420px !important;
}

.apexcharts-tooltip,
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  background: #0b0b0b !important;
  color: #fff !important;
  border: 1px solid #2a2a2a !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.35) !important;
  pointer-events: none !important;
}

.apexcharts-tooltip-title {
  background: #111827 !important;
  color: #fff !important;
  border-bottom: 1px solid #2a2a2a !important;
}

html, body {
  overflow-x: hidden !important;
}
.wallet-help-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid black;
  border-radius: 12px;
  background: black;
}

.wallet-help-box .btn {
  margin-top: 8px;
}

.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.wallet-modal-overlay.open {
  display: flex;
}

.wallet-modal-card {
  width: 100%;
  max-width: 620px;
  background: black;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
  padding: 22px;
}

.wallet-modal-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

#walletConfirmAddress{
    color: black;
}

.wallet-modal-actions button{
    padding: 15px 20px;
    margin: 9px 0;
    font-size: 18px;
}

.wallet-address-box {
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  word-break: break-all;
  font-weight: 600;
}

.wallet-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn-sm{padding:8px 10px;font-size:13px;border-radius:10px;white-space:nowrap}

