/* ============================================================
   Carteira do cliente — compacto, responsivo, usa a paleta do site
   Escopo: .wallet-shell
   ============================================================ */

.wallet-shell {
  --wk-panel: var(--client-panel, #161d23);
  --wk-line: var(--client-line, #34434e);
  --wk-text: var(--client-text, #f4f6f8);
  --wk-muted: var(--client-muted, #b6c2cd);
  --wk-green: #22c07a;
  --wk-amber: #f5bd54;
  --wk-blue: #74bcff;
  --wk-red: #ff8b8b;
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 12px 40px;
  box-sizing: border-box;
  overflow-x: clip;
  color: var(--wk-text);
}
.wallet-shell *,
.wallet-shell *::before,
.wallet-shell *::after { box-sizing: border-box; }

/* cabeçalho ------------------------------------------------- */
.wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wallet-head h1 {
  margin: 0;
  font-size: clamp(19px, 5vw, 22px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.wallet-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--wk-muted);
}
.wallet-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  text-decoration: none;
  color: var(--wk-muted);
  border: 1px solid var(--wk-line);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.wallet-link:hover { color: var(--wk-text); border-color: #4e616e; }

/* avisos ---------------------------------------------------- */
.wallet-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  padding: 9px 11px;
  border-radius: 9px;
  margin-bottom: 12px;
  border: 1px solid;
}
.wallet-note.is-warn {
  color: #ffd07a;
  border-color: rgba(245, 189, 84, .38);
  background: rgba(245, 189, 84, .10);
}
.wallet-feedback {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
}
.wallet-feedback:empty { display: none; }
.wallet-feedback.is-error { color: var(--wk-red); }
.wallet-feedback.is-success { color: var(--wk-green); }

/* resumo do saldo ------------------------------------------- */
.wallet-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  background: var(--wk-panel);
  border: 1px solid var(--wk-line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.ws-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  min-width: 0;
  overflow: hidden;
}
.ws-cell + .ws-cell { border-left: 1px solid var(--wk-line); }
.ws-cell span {
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--wk-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-cell strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-main { background: linear-gradient(180deg, rgba(34, 192, 122, .16), rgba(34, 192, 122, .06)); }
.ws-main strong { color: var(--wk-green); font-size: clamp(17px, 4.6vw, 20px); font-weight: 700; }

/* painéis ---------------------------------------------------- */
.wallet-panel {
  background: var(--wk-panel);
  border: 1px solid var(--wk-line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.wp-head { margin-bottom: 12px; }
.wp-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.3;
}
.wp-head h2 i { font-size: 14px; color: var(--wk-green); }
.wp-head p {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--wk-muted);
}
.wp-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wp-count {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--wk-muted);
  border: 1px solid var(--wk-line);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.wp-empty { margin: 0; font-size: 12px; color: var(--wk-muted); padding: 4px 0; }

/* formulário ------------------------------------------------- */
.wp-form { display: flex; flex-direction: column; gap: 11px; }
.wp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wp-field label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--wk-muted);
}
.wp-field input,
.wp-field select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 11px;
  font-size: 14px;
  color: var(--wk-text);
  background: #202b34;
  border: 1px solid #42525f;
  border-radius: 9px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.wp-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6c2cd' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}
.wp-field input::placeholder { color: #7d8b96; }
.wp-field input:focus,
.wp-field select:focus {
  outline: none;
  border-color: var(--wk-green);
  box-shadow: 0 0 0 3px rgba(34, 192, 122, .14);
}
.wp-field select option { background: #1b242b; color: var(--wk-text); }
.wp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.wp-money {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 11px;
  background: #202b34;
  border: 1px solid #42525f;
  border-radius: 9px;
  transition: border-color .15s, box-shadow .15s;
}
.wp-money:focus-within {
  border-color: var(--wk-green);
  box-shadow: 0 0 0 3px rgba(34, 192, 122, .14);
}
.wp-money span { font-size: 12px; font-weight: 600; color: var(--wk-muted); }
.wp-money input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.wp-money input:focus { border: 0; box-shadow: none; }

.wp-hint {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--wk-muted);
}
.wp-hint i { margin-top: 1px; }

.wp-submit.btn {
  height: 44px;
  min-height: 44px;
  margin-top: 2px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.wp-submit.btn:disabled { opacity: .55; }

/* senha de 6 dígitos ---------------------------------------- */
.pin-wrap { display: flex; flex-direction: column; gap: 5px; }
.pin-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--wk-muted);
}
.pin-group { display: flex; gap: 6px; align-items: center; }
.pin-group .pin-digit {
  width: clamp(38px, 11.4vw, 44px);
  height: clamp(46px, 12.6vw, 50px);
  padding: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--wk-text);
  background: #202b34;
  border: 1px solid #42525f;
  border-radius: 9px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -moz-appearance: textfield;
}
.pin-group .pin-digit::-webkit-outer-spin-button,
.pin-group .pin-digit::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pin-group .pin-digit:focus {
  outline: none;
  border-color: var(--wk-green);
  background: #26333d;
  box-shadow: 0 0 0 3px rgba(34, 192, 122, .16);
}

/* lista de saques ------------------------------------------- */
.wd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wd-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--wk-line);
  border-radius: 10px;
  background: #1b242b;
}
.wd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.wd-id {
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--wk-muted);
  font-variant-numeric: tabular-nums;
}
.wd-main strong {
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wd-main small, .wd-muted { font-size: 10.5px; color: var(--wk-muted); white-space: nowrap; }
.wd-actions { justify-content: flex-end; }
.wd-btn {
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--wk-line);
  background: transparent;
  color: var(--wk-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.wd-btn:hover { color: var(--wk-red); border-color: rgba(255, 139, 139, .5); }
.wd-btn:disabled { opacity: .5; }

.wd-status {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.wd-status.is-pending { color: var(--wk-amber); }
.wd-status.is-approved { color: var(--wk-blue); }
.wd-status.is-paid { color: var(--wk-green); }
.wd-status.is-rejected { color: var(--wk-red); }
.wd-status.is-cancelled { color: var(--wk-muted); }

/* extrato ---------------------------------------------------- */
.ex-list { list-style: none; margin: 0; padding: 0; }
.ex-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  min-width: 0;
}
.ex-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ex-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.ex-icon.is-in { color: var(--wk-green); background: rgba(34, 192, 122, .14); }
.ex-icon.is-out { color: var(--wk-red); background: rgba(255, 139, 139, .13); }
.ex-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ex-body strong { font-size: 12.5px; font-weight: 600; }
.ex-body small {
  font-size: 10.5px;
  color: var(--wk-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex-value {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ex-value.is-in { color: var(--wk-green); }
.ex-value.is-out { color: var(--wk-red); }

/* responsivo ------------------------------------------------- */
@media (max-width: 640px) {
  .wallet-shell { padding: 2px 10px 32px; }
  .wallet-head { margin-bottom: 10px; }
  .wallet-link { font-size: 10px; padding: 4px 8px; }
  .wallet-panel { padding: 12px 11px; }
  .wp-grid { grid-template-columns: 1fr; gap: 10px; }
  .ws-cell { padding: 9px 9px; }
  .ws-cell span { font-size: 9px; letter-spacing: .04em; }
  .ws-cell strong { font-size: 13.5px; }
  .ws-main strong { font-size: 17px; }
  .ex-value { font-size: 12px; }
}

@media (max-width: 359px) {
  .wallet-summary { grid-template-columns: 1fr 1fr; }
  .ws-main { grid-column: 1 / -1; }
  .ws-main + .ws-cell { border-left: 0; }
  .pin-group { gap: 4px; }
  .pin-group .pin-digit { width: 34px; height: 44px; font-size: 15px; }
}
