/* ================================================================
   SA UNIVERSE — PAINEL  |  GTA San Andreas Theme
   Coloca em: assets/css/main.css?v=5
   Adiciona <link rel="stylesheet" href="../assets/css/main.css?v=5">
   em TODAS as páginas do painel (painel.php, wallet.php, etc.)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

/* ===== VARIÁVEIS ===== */
:root {
  --gold:     #f5c518;
  --orange:   #ff6b00;
  --red:      #c0392b;
  --green:    #2ecc71;
  --dark:     #0c0c0c;
  --dark2:    #111111;
  --dark3:    #161616;
  --dark4:    #1d1d1d;
  --border:   rgba(245,197,24,0.14);
  --text:     #dcdcdc;
  --muted:    rgba(255,255,255,0.32);
  --sidebar-w: 260px;
}

/* ================================================================
   BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body,
html body,
body.w3-light-grey {
  background: var(--dark) !important;
  color: var(--text) !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 15px !important;
}

/* Grid texture */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(245,197,24,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,197,24,0.022) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Scanlines leves */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 4px
  );
}

.w3-bar.w3-top, .w3-sidebar, .w3-main, .w3-overlay { position: relative; z-index: 1; }

/* ================================================================
   TOP BAR
   ================================================================ */
.w3-bar.w3-top,
.w3-bar.w3-top.w3-black,
.w3-bar.w3-top.w3-large {
  background: rgba(8,8,8,0.97) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(12px) !important;
  height: 46px !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.6) !important;
}

.w3-bar.w3-top .w3-bar-item {
  font-family: 'Oswald', sans-serif !important;
  font-size: 11px !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: var(--gold) !important;
  line-height: 46px !important;
  padding: 0 18px !important;
}

.w3-bar.w3-top .w3-button {
  color: var(--muted) !important;
  transition: color 0.2s !important;
}
.w3-bar.w3-top .w3-button:hover { color: var(--gold) !important; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.w3-sidebar,
.w3-sidebar.w3-white,
nav.w3-sidebar {
  background: var(--dark2) !important;
  width: var(--sidebar-w) !important;
  border-right: 1px solid var(--border) !important;
  padding-top: 0px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-shadow: 4px 0 24px rgba(0,0,0,0.5) !important;
}

.w3-sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, var(--gold) 0%, var(--orange) 40%, transparent 100%);
  pointer-events: none;
}

/* Bloco do usuário */
.w3-sidebar .w3-container.w3-row {
  padding: 18px 14px !important;
  background: rgba(245,197,24,0.04) !important;
  border-bottom: 1px solid var(--border) !important;
  margin-bottom: 6px !important;
}

.w3-sidebar .w3-col.s4 img {
  width: 42px !important; height: 42px !important;
  border-radius: 50% !important;
  border: 2px solid var(--gold) !important;
  box-shadow: 0 0 10px rgba(245,197,24,0.35) !important;
}

.w3-sidebar .w3-col.s8 span {
  font-family: 'Oswald', sans-serif !important;
  font-size: 12px !important; letter-spacing: 1px !important;
  color: var(--muted) !important;
}
.w3-sidebar .w3-col.s8 strong { color: var(--gold) !important; }

.w3-sidebar .w3-col.s8 hr {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  margin: 6px 0 !important;
}

.w3-sidebar .w3-col.s8 a {
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 13px !important; font-weight: 600 !important;
  color: var(--muted) !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}
.w3-sidebar .w3-col.s8 a:hover { color: var(--gold) !important; }

/* Título Dashboard */
.w3-sidebar .w3-container h5 {
  font-family: 'Oswald', sans-serif !important;
  font-size: 9px !important; letter-spacing: 4px !important;
  text-transform: uppercase !important;
  color: rgba(245,197,24,0.35) !important;
  padding: 14px 16px 4px !important; margin: 0 !important;
}

/* Links nav */
.w3-sidebar .w3-bar-block a,
.w3-sidebar .w3-bar-item.w3-button {
  font-family: 'Oswald', sans-serif !important;
  font-size: 12px !important; font-weight: 400 !important;
  letter-spacing: 2px !important; text-transform: uppercase !important;
  color: var(--muted) !important;
  background: transparent !important;
  text-decoration: none !important;
  padding: 12px 16px 12px 18px !important;
  display: flex !important; align-items: center !important; gap: 10px !important;
  border-left: 2px solid transparent !important;
  transition: all 0.2s ease !important;
}

.w3-sidebar .w3-bar-block a:hover,
.w3-sidebar .w3-bar-item.w3-button:hover {
  color: var(--gold) !important;
  background: rgba(245,197,24,0.06) !important;
  border-left-color: var(--gold) !important;
}

.w3-sidebar .w3-bar-block a i { width: 16px; text-align: center; color: var(--orange); }

.w3-sidebar .w3-bar-block a.w3-dark-grey {
  background: rgba(255,255,255,0.04) !important;
  color: var(--muted) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* ================================================================
   CONTEÚDO PRINCIPAL
   ================================================================ */
.w3-main {
  background: transparent !important;
  margin-left: var(--sidebar-w) !important;
  margin-top: 46px !important;
  padding: 0 !important;
  min-height: calc(100vh - 46px);
}

.w3-main header.w3-container {
  padding: 22px 24px 14px !important;
  border-bottom: 1px solid var(--border) !important;
  background: rgba(255,255,255,0.015) !important;
}

.w3-main header h5,
.w3-main header h5 b {
  font-family: 'Oswald', sans-serif !important;
  font-size: 14px !important; font-weight: 400 !important;
  letter-spacing: 4px !important; text-transform: uppercase !important;
  color: var(--gold) !important;
}

.w3-main header h5 i { color: var(--orange) !important; margin-right: 8px !important; }

/* ================================================================
   TÍTULOS E TABELAS
   ================================================================ */
.w3-panel h5, .w3-container h5, .w3-container h3 {
  font-family: 'Oswald', sans-serif !important;
  font-size: 10px !important; letter-spacing: 4px !important;
  text-transform: uppercase !important;
  color: rgba(245,197,24,0.5) !important;
  margin-bottom: 10px !important;
}
.w3-container h3 { font-size: 12px !important; }

.w3-table, .w3-table-all {
  background: var(--dark3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 14px !important;
  width: 100% !important;
}

.w3-table tr, .w3-table-all tr {
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  transition: background 0.15s !important;
}
.w3-table tr:hover, .w3-table-all tr:hover { background: rgba(245,197,24,0.04) !important; }

.w3-table td, .w3-table-all td {
  padding: 10px 14px !important;
  color: var(--text) !important;
  border: none !important;
}
.w3-table td:first-child, .w3-table-all td:first-child { color: var(--muted) !important; }
.w3-table td:last-child, .w3-table-all td:last-child {
  color: var(--gold) !important;
  font-weight: 600 !important; font-style: italic !important;
}
.w3-table td i, .w3-table-all td i { color: var(--orange) !important; margin-right: 6px !important; }
.w3-striped tr:nth-child(even) { background: rgba(255,255,255,0.025) !important; }

.w3-panel hr, .w3-main hr {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  margin: 18px 0 !important;
}

.w3-main .w3-container { padding: 18px 24px !important; }

/* ================================================================
   FORMULÁRIOS (card-form)
   ================================================================ */
.bkdeposit {
  background: var(--dark) !important;
  padding: 28px 24px !important;
}

.card-form {
  background: var(--dark3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5) !important;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%) !important;
}

.card-form .form-title, .form-title {
  background: rgba(245,197,24,0.07) !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--gold) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 13px !important; font-weight: 400 !important;
  letter-spacing: 3px !important; text-transform: uppercase !important;
  border-radius: 0 !important;
  height: 52px !important; padding: 0 18px !important;
  display: flex !important; align-items: center !important;
}

.card-form .form-title::before { content: '▌'; color: var(--orange); margin-right: 10px; font-size: 16px; }

.card-form .form-body, .form-body {
  padding: 18px !important;
  background: transparent !important;
}

.card-form .form-body p, .form-body p {
  color: var(--muted) !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 13px !important;
  margin-bottom: 12px !important; line-height: 1.5 !important;
}

/* Inputs */
.card-form input[type=text],
.card-form input[type=number],
.card-form input[type=password],
.form-body input[type=text],
.form-body input[type=number],
.dep-qty-row input[type=number],
input[type=text], input[type=number], input[type=password] {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-left: 3px solid rgba(245,197,24,0.4) !important;
  color: #fff !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 14px !important; font-weight: 600 !important;
  padding: 10px 14px !important;
  width: 100% !important;
  outline: none !important;
  border-radius: 0 !important;
  transition: all 0.25s ease !important;
  margin-bottom: 10px !important;
}

input[type=text]:focus, input[type=number]:focus, input[type=password]:focus {
  background: rgba(245,197,24,0.06) !important;
  border-left-color: var(--gold) !important;
  box-shadow: 0 0 16px rgba(245,197,24,0.1) !important;
}

input[type=text]::placeholder, input[type=number]::placeholder { color: rgba(255,255,255,0.2) !important; }
input[readonly], input[disabled] { opacity: 0.5 !important; cursor: not-allowed !important; }

.form-body b, .form-body strong, .card-form b, .card-form strong {
  color: var(--text) !important;
  font-family: 'Oswald', sans-serif !important; letter-spacing: 1px !important;
}

/* ================================================================
   BOTÕES
   ================================================================ */
.btn-sol, .btn-black, .btn-connect, .btn-deposit {
  background: linear-gradient(135deg, #1a1a1a, #222) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 12px !important; font-weight: 400 !important;
  letter-spacing: 2px !important; text-transform: uppercase !important;
  padding: 11px 18px !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  width: 100% !important; display: block !important;
  transition: all 0.25s ease !important;
  clip-path: polygon(0 0, 100% 0, 100% 65%, calc(100% - 10px) 100%, 0 100%) !important;
  margin-bottom: 8px !important;
}

.btn-sol:hover, .btn-black:hover, .btn-connect:hover, .btn-deposit:hover {
  background: rgba(245,197,24,0.1) !important;
  border-color: rgba(245,197,24,0.5) !important;
  color: var(--gold) !important;
  transform: translateY(-1px) !important;
}

/* Botão principal (dourado) */
.btn-phantom, .btn-connect.connected {
  background: linear-gradient(135deg, var(--gold), var(--orange)) !important;
  border-color: transparent !important;
  color: #000 !important; font-weight: 700 !important;
}
.btn-phantom:hover { filter: brightness(1.1) !important; color: #000 !important; }

/* Botão vermelho */
button[name="acao"][value="desativar"] {
  background: rgba(192,57,43,0.15) !important;
  border-color: rgba(192,57,43,0.4) !important;
  color: #e74c3c !important;
}

.btn-deposit[disabled] { opacity: 0.4 !important; cursor: not-allowed !important; transform: none !important; }

/* ================================================================
   STEPS DE DEPÓSITO
   ================================================================ */
.dep-step { border-bottom: 1px solid rgba(255,255,255,0.05) !important; }
.dep-snum { border-color: rgba(255,255,255,0.15) !important; background: transparent !important; color: var(--muted) !important; }
.dep-snum.active, .dep-snum.done { border-color: var(--green) !important; color: var(--green) !important; background: rgba(46,204,113,0.1) !important; }
.dep-snum.error { border-color: var(--red) !important; color: var(--red) !important; background: rgba(192,57,43,0.1) !important; }
.dep-stitle { color: var(--text) !important; font-family: 'Oswald', sans-serif !important; letter-spacing: 1px !important; }
.dep-sdesc { color: var(--muted) !important; }
.dep-sdesc.active, .dep-sdesc.done { color: var(--green) !important; }
.dep-sdesc.error { color: var(--red) !important; }
.dep-result-ok { background: rgba(46,204,113,0.06) !important; border-color: rgba(46,204,113,0.25) !important; }
.dep-rtitle { color: var(--green) !important; font-family: 'Oswald', sans-serif !important; letter-spacing: 2px !important; }
.dep-rrow { border-bottom-color: rgba(46,204,113,0.1) !important; }
.dep-rkey { color: var(--muted) !important; }
.dep-rval { color: var(--text) !important; }
.dep-rval.green { color: var(--green) !important; }
#dep-status { color: var(--muted) !important; font-style: italic; font-family: 'Rajdhani', sans-serif !important; }
#dep-status.err { color: var(--red) !important; font-style: normal !important; }

/* ================================================================
   SEPARADORES / RODAPÉ DO CARD
   ================================================================ */
.card-form .rule { background: var(--border) !important; height: 1px !important; margin: 0 14px !important; }
.card-form .form-footer { padding: 14px 18px !important; }

/* ================================================================
   W3 HELPERS RESET
   ================================================================ */
.w3-white,
.w3-hover-white:hover { background: var(--dark3) !important; color: var(--text) !important; }
.w3-light-grey { background: var(--dark) !important; }
.w3-black  { background: var(--dark2) !important; }
.w3-dark-grey { background: var(--dark4) !important; }
.w3-panel  { background: transparent !important; }
.w3-row-padding { background: transparent !important; }
.w3-border { border-color: var(--border) !important; }
.w3-hover-black:hover { background: rgba(245,197,24,0.06) !important; }

/* ================================================================
   OVERLAY MOBILE
   ================================================================ */
.w3-overlay { background: rgba(0,0,0,0.7) !important; backdrop-filter: blur(4px) !important; }

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: rgba(245,197,24,0.25); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ================================================================
   ANIMAÇÕES
   ================================================================ */
.w3-main header, .card-form, .w3-panel, .w3-container {
  animation: fadeUp 0.35s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   RESPONSIVO
   ================================================================ */
@media (max-width: 900px) {
  .w3-main { margin-left: 0 !important; }
  .w3-sidebar { display: none; }
  .w3-sidebar.w3-show { display: block !important; }
  .card-form { width: 95% !important; }
}

/* ================================================================
   TABELAS COM w3-white — OVERRIDE FORÇADO
   ================================================================ */
.w3-table.w3-white,
.w3-table-all.w3-white,
.w3-table.w3-striped.w3-white,
.w3-table-all.w3-striped.w3-white {
  background: var(--dark3) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
}

.w3-table.w3-white tr,
.w3-table-all.w3-white tr,
.w3-table.w3-striped.w3-white tr {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}

.w3-table.w3-white tr:hover,
.w3-table-all.w3-white tr:hover,
.w3-table.w3-striped.w3-white tr:hover {
  background: rgba(245,197,24,0.04) !important;
}

.w3-table.w3-striped.w3-white tr:nth-child(even) {
  background: rgba(255,255,255,0.025) !important;
}

.w3-table.w3-white td,
.w3-table-all.w3-white td,
.w3-table.w3-striped.w3-white td {
  color: var(--text) !important;
  border: none !important;
  padding: 10px 14px !important;
}

.w3-table.w3-white td:first-child,
.w3-table.w3-striped.w3-white td:first-child {
  color: var(--orange) !important;
}

.w3-table.w3-white td:nth-child(2),
.w3-table.w3-striped.w3-white td:nth-child(2) {
  color: var(--muted) !important;
}

.w3-table.w3-white td:last-child,
.w3-table.w3-striped.w3-white td:last-child {
  color: var(--gold) !important;
  font-weight: 600 !important;
  font-style: italic !important;
}

/* Ícones dentro das tabelas w3-white */
.w3-table.w3-white td i.fa,
.w3-table.w3-striped.w3-white td i.fa {
  color: var(--orange) !important;
}

/* ================================================================
   VEHICLE CARDS
   ================================================================ */
.veh-card {
  padding: 8px !important;
}

.veh-card-inner {
  background: var(--dark3) !important;
  border: 1px solid var(--border) !important;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  overflow: hidden;
}

.veh-img-wrap {
  width: 100%;
  background: #1a1a1a;
  border-bottom: 1px solid var(--border);
}

.veh-img-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
}