:root {
  --bg: #070814;
  --panel: rgba(19, 20, 43, .9);
  --line: rgba(158, 139, 255, .18);
  --text: #f7f6ff;
  --muted: #aaa8c5;
  --purple: #8d69ff;
  --purple2: #b86dff;
  --green: #72e7ab;
  --gold: #ffc76b;
  --danger: #ff7993;
  --blue: #73b7ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, Segoe UI, sans-serif; color: var(--text); background: radial-gradient(circle at 20% 10%, #21134d 0, transparent 32%), radial-gradient(circle at 90% 20%, #28103d 0, transparent 30%), var(--bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.ambient { position: fixed; width: 280px; height: 280px; border-radius: 50%; filter: blur(90px); opacity: .18; pointer-events: none; }
.ambient-one { background: #7448ff; top: 10%; left: -100px; }
.ambient-two { background: #d54fff; right: -100px; bottom: 0; }
.shell { width: min(1480px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 60px; position: relative; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.eyebrow, small { font-size: 12px; letter-spacing: .16em; color: #b9a8ff; font-weight: 800; }
h1 { margin: 4px 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.04em; }
h2 { margin: 3px 0 0; font-size: 22px; }
p { color: var(--muted); line-height: 1.55; }
.hero p, .auth-card p { margin: 0; }
.mode { border: 1px solid var(--line); background: rgba(141,105,255,.12); color: #c8baff; border-radius: 999px; padding: 10px 15px; font-size: 12px; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 24px 80px rgba(0,0,0,.25); backdrop-filter: blur(18px); border-radius: 22px; }
.auth-card { min-height: 220px; padding: 30px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.auth-card.warning { border-color: rgba(255,199,107,.25); }
.discord-mark { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-size: 34px; font-weight: 900; background: linear-gradient(135deg, rgba(141,105,255,.35), rgba(184,109,255,.15)); border: 1px solid var(--line); }
.discord-button, .secondary-button { min-height: 48px; padding: 0 20px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.discord-button { color: white; background: linear-gradient(135deg, #5865f2, #8d69ff); }
.secondary-button { border: 1px solid var(--line); color: #d8d1ff; background: rgba(141,105,255,.1); }
.account-bar { padding: 13px 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 14px; }
.identity { display: flex; align-items: center; gap: 12px; }
.identity img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(184,109,255,.45); background: #101126; }
.identity strong { display: block; margin-top: 2px; }
.balance-box { text-align: center; padding: 7px 18px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.balance-box strong { display: block; margin-top: 3px; color: var(--gold); font-size: 17px; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 12px; }
.logout, .ghost-button { padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); color: #d9d1ff; background: transparent; }
.configuration-banner { padding: 13px 17px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; border-color: rgba(255,199,107,.22); background: rgba(255,199,107,.06); }
.configuration-banner strong { color: var(--gold); }
.configuration-banner span { color: var(--muted); font-size: 13px; }
.tabs { padding: 8px; display: flex; gap: 8px; margin-bottom: 14px; }
.tab { min-height: 43px; padding: 0 18px; border: 1px solid transparent; border-radius: 14px; color: var(--muted); background: transparent; font-weight: 850; }
.tab:hover { color: var(--text); background: rgba(141,105,255,.08); }
.tab.active { color: white; background: linear-gradient(135deg,rgba(114,83,232,.85),rgba(155,93,231,.85)); border-color: rgba(255,255,255,.08); }
.tab-count { margin-left: 5px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 11px; }
.toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; padding: 16px; align-items: end; margin-bottom: 14px; }
label span { display: block; color: var(--muted); font-size: 12px; margin: 0 0 7px 4px; }
input { width: 100%; height: 46px; border-radius: 13px; border: 1px solid var(--line); background: #0c0d20; color: var(--text); padding: 0 14px; outline: none; }
input:focus { border-color: rgba(170,139,255,.65); box-shadow: 0 0 0 3px rgba(141,105,255,.12); }
.toolbar-note { color: var(--muted); font-size: 13px; padding: 0 5px 12px; }
.toolbar-note strong { color: var(--text); font-size: 20px; }
.primary, .item-action, .buy-button { border: 0; border-radius: 13px; font-weight: 850; }
.primary { height: 46px; padding: 0 18px; color: white; background: linear-gradient(135deg,var(--purple),var(--purple2)); }
.primary.full { width: 100%; }
button:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.65); }
.inventory-panel, .listings-panel, .deposit-guide { padding: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.last-update { color: #77758f; font-size: 12px; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 12px; }
.item-card { border: 1px solid var(--line); border-radius: 18px; background: rgba(7,8,20,.65); padding: 14px; transition: .18s ease; }
.item-card:hover { transform: translateY(-2px); border-color: rgba(176,142,255,.45); }
.item-top { display: flex; gap: 12px; align-items: center; }
.item-info { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.item-icon { width: 58px; height: 58px; padding: 6px; object-fit: contain; border-radius: 15px; background: linear-gradient(135deg,rgba(141,105,255,.18),rgba(184,109,255,.08)); border: 1px solid var(--line); }
.item-name { font-weight: 850; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.blocked-note { display: inline-flex; margin-top: 5px; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; color: #ffd6d6; background: rgba(255,78,112,.14); border: 1px solid rgba(255,78,112,.25); }
.item-id { color: #77758f; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 145px; margin-top: 3px; }
.item-count { margin-left: auto; border-radius: 999px; padding: 6px 9px; background: rgba(114,231,171,.11); color: var(--green); font-weight: 900; font-size: 12px; }
.item-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.item-action { min-height: 39px; color: white; background: rgba(141,105,255,.18); border: 1px solid var(--line); }
.item-action.deposit { background: linear-gradient(135deg,#386fa8,#6557cd); }
.item-action.list { background: linear-gradient(135deg,#7551d9,#a94fc9); }
.market-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 14px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.market-card { padding: 15px; border-radius: 18px; border: 1px solid var(--line); background: rgba(7,8,20,.65); }
.market-head { display: flex; align-items: center; gap: 12px; }
.market-head img { width: 62px; height: 62px; object-fit: contain; padding: 6px; border-radius: 15px; background: rgba(141,105,255,.12); border: 1px solid var(--line); }
.market-head .grow { min-width: 0; flex: 1; }
.market-head h3 { margin: 0 0 4px; font-size: 16px; }
.market-meta { color: var(--muted); font-size: 12px; }
.market-price { margin: 14px 0; padding: 12px; border-radius: 14px; background: rgba(255,199,107,.07); border: 1px solid rgba(255,199,107,.16); display: flex; justify-content: space-between; align-items: center; }
.market-price strong { color: var(--gold); }
.buy-button { width: 100%; min-height: 42px; color: white; background: linear-gradient(135deg,#4778d0,#7b54d4); }
.listing-list { display: flex; flex-direction: column; gap: 9px; }
.my-listing { padding: 12px; border-radius: 14px; background: rgba(7,8,20,.58); border: 1px solid var(--line); }
.my-listing-top { display: flex; gap: 9px; align-items: center; }
.my-listing img { width: 42px; height: 42px; object-fit: contain; }
.my-listing strong { flex: 1; }
.status { padding: 4px 7px; border-radius: 999px; background: rgba(115,183,255,.1); color: var(--blue); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.status.active { color: var(--green); background: rgba(114,231,171,.1); }
.status.issue, .status.failed { color: var(--danger); background: rgba(255,121,147,.1); }
.status.sold { color: var(--gold); background: rgba(255,199,107,.1); }
.cancel-button { margin-top: 9px; width: 100%; min-height: 35px; border-radius: 11px; border: 1px solid rgba(255,121,147,.25); background: rgba(255,121,147,.08); color: #ffc4cf; font-weight: 800; }
.deposit-layout { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 14px; }
.deposit-guide p { margin-bottom: 18px; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow span { padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(141,105,255,.08); font-size: 12px; font-weight: 800; }
.flow b { color: #887f9e; }
.safety-note { margin-top: 18px; padding: 13px; border-radius: 14px; border: 1px solid rgba(114,231,171,.15); color: var(--green); background: rgba(114,231,171,.06); font-size: 12px; line-height: 1.5; }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 9px; }
.vault-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(7,8,20,.58); border: 1px solid var(--line); }
.vault-item img { width: 42px; height: 42px; object-fit: contain; }
.vault-item .grow { min-width: 0; flex: 1; }
.vault-item strong { color: #d8cfff; }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); line-height: 1.5; font-size: 13px; border: 1px dashed var(--line); border-radius: 16px; }
.modal { position: fixed; z-index: 40; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(3,4,12,.76); backdrop-filter: blur(8px); }
.modal-card { width: min(480px,100%); padding: 24px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: white; font-size: 22px; }
.modal-item { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; padding-right: 32px; }
.modal-item img { width: 68px; height: 68px; object-fit: contain; padding: 7px; border-radius: 17px; border: 1px solid var(--line); background: rgba(141,105,255,.1); }
.modal-item p { margin: 4px 0 0; font-size: 11px; }
.modal-card label { display: block; margin-top: 12px; }
.modal-summary { min-height: 46px; margin: 15px 0; padding: 12px; border-radius: 13px; background: rgba(141,105,255,.07); color: var(--muted); font-size: 13px; line-height: 1.5; }
.toast { position: fixed; z-index: 60; right: 22px; bottom: 22px; max-width: 430px; padding: 13px 16px; border-radius: 14px; background: #181a35; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.45); transform: translateY(30px); opacity: 0; pointer-events: none; transition: .22s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: rgba(255,121,147,.35); color: #ffc4cf; }
@media (max-width: 1000px) {
  .market-layout, .deposit-layout { grid-template-columns: 1fr; }
  .account-bar { grid-template-columns: 1fr auto; }
  .balance-box { order: 3; grid-column: 1 / -1; border: 0; border-top: 1px solid var(--line); padding-top: 13px; }
}
@media (max-width: 760px) {
  .toolbar, .auth-card { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; flex-direction: column; }
  .discord-button, .secondary-button { width: 100%; }
  .account-bar { grid-template-columns: 1fr; }
  .account-actions { justify-content: space-between; flex-wrap: wrap; }
  .balance-box { grid-column: auto; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
  .configuration-banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1480px); padding-top: 22px; }
  .items-grid, .market-grid, .vault-grid { grid-template-columns: 1fr; }
}

/* Beta 0.7: mercado sem depósito */
.item-actions.single-action { grid-template-columns: 1fr; }
.market-online-note {
  margin: -4px 0 16px;
  padding: 11px 13px;
  border: 1px solid rgba(92, 204, 166, .25);
  border-radius: 12px;
  background: rgba(40, 145, 112, .10);
  color: #bfeedd;
  font-size: .9rem;
  line-height: 1.45;
}
