/* =====================================================================
   DIRETOR · Central de Missões — estética inspirada no Diretor do Destiny 2
   ===================================================================== */
:root {
  --txt: #f4f4f2;
  --txt-2: #c8c8c6;
  --txt-3: #8d8d8b;
  --line: rgba(255, 255, 255, .22);
  --line-2: rgba(255, 255, 255, .45);
  --card: rgba(255, 255, 255, .085);
  --card-h: rgba(255, 255, 255, .14);
  --slot: rgba(255, 255, 255, .028);
  --gold: #f2d46a;
  --green: #5ea16a;
  --green-2: #6fcf7c;
  --red: #c4483e;

  /* raridades (cores do Destiny) */
  --r-comum: #c2bcb4;
  --r-incomum: #366f42;
  --r-raro: #5076a3;
  --r-lendario: #522f65;
  --r-exotico: #ceae33;

  --font: "Inter", "Neue Haas Grotesk Display Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M3 2.5 27 13.5 15.5 15.6 11.5 27.5Z' fill='%23fff' stroke='rgba(0,0,0,.55)' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2, default;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--txt);
  background: #1b1c1e;
  font-size: 14px;
  line-height: 1.35;
  overflow-x: hidden;
  cursor: var(--cursor);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button, a, label, input, select, textarea, [data-id], .slot-add { cursor: var(--cursor); }
input, textarea { user-select: text; cursor: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

/* ------------------------------------------------------------ fundo */
.bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255,255,255,.075), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, #2a2b2d 0%, #1d1e20 55%, #111213 100%);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: overlay;
}
#dust { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ------------------------------------------------------------ teclas */
.key {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 3px;
  font-size: 10.5px; font-weight: 500; line-height: 1; color: #fff;
}

/* ------------------------------------------------------------ topo */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 26px 32px 0; gap: 16px;
}
.tabs { display: flex; align-items: center; gap: 28px; }
.key-nav { opacity: .85; }
.tab {
  position: relative;
  min-width: 98px; height: 30px; padding: 0 22px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
  color: #d6d6d4; font-size: 13.5px; font-weight: 500; letter-spacing: .14em;
  transition: background .15s, border-color .15s, color .15s;
}
.tab:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); color: #fff; }
.tab.active { background: #0e0e0f; border: 1.5px solid #fff; color: #fff; }
.tab.active::after {
  content: ""; position: absolute; left: -1.5px; right: -1.5px; bottom: -6px; height: 3px; background: #fff;
}

/* guardião no topo esquerdo */
.player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player .p-emb {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.3);
}
.player .p-emb svg { width: 30px; height: 30px; }
.player .p-name { font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.player .p-sub { font-size: 12px; color: var(--txt-2); display: flex; gap: 6px; align-items: center; }
.player .p-sub .lvl { color: var(--gold); font-weight: 600; }
.player .p-bar { height: 3px; background: rgba(255,255,255,.15); margin-top: 5px; width: 150px; }
.player .p-bar i { display: block; height: 100%; background: var(--gold); transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* ------------------------------------------------------------ diretor */
.director { padding: 56px 32px 90px; }
.view { display: flex; justify-content: center; align-items: flex-start; }

.sidebar { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; margin-right: 58px; }
.side-btn {
  position: relative; width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(0,0,0,.12);
  color: #bdbdbb;
  transition: border-color .12s, background .12s, color .12s;
}
.side-btn svg { width: 30px; height: 30px; fill: currentColor; }
.side-btn:hover { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.08); color: #fff; }
.side-btn.active { border: 2px solid #fff; color: #fff; background: rgba(255,255,255,.06); }
.side-btn .badge {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  background: #e8e8e6; color: #111; font-size: 10px; font-weight: 700; display: grid; place-items: center;
}

.panel-head {
  display: flex; align-items: baseline; gap: 18px;
  height: 20px; margin-bottom: 10px;
}
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.count { margin-left: auto; color: #9a9a98; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.count .of { color: #5e5e5c; }

.owner-filter { display: flex; gap: 2px; }
.owner-filter button {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3);
  padding: 2px 8px; border-bottom: 2px solid transparent;
}
.owner-filter button:hover { color: #fff; }
.owner-filter button.on { color: #fff; border-color: #fff; }

.panel-quests { width: 660px; flex: none; }
.panel-bounties { flex: none; }
.panel-bounties { width: 290px; margin-left: 100px; }

/* ------------------------------------------------------------ cards de missão */
.quest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qcard, .slot {
  position: relative; height: 96px;
}
.slot { background: var(--slot); }
.slot-add { display: grid; place-items: center; color: transparent; transition: background .15s, color .15s; }
.slot-add:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.65); outline: 1px dashed rgba(255,255,255,.35); outline-offset: -1px; }
.slot-add span { font-size: 12px; letter-spacing: .14em; display: flex; align-items: center; gap: 8px; }
.slot-add span b { font-size: 22px; font-weight: 300; }

.qcard {
  display: flex; gap: 12px; padding: 10px 12px 14px 10px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.1);
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.qcard:hover, .qcard.hot { background: var(--card-h); border-color: rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.qicon {
  flex: none; width: 62px; height: 62px; position: relative;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.35);
  overflow: hidden;
}
.qicon svg { width: 38px; height: 38px; fill: #fff; position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.qbody { min-width: 0; flex: 1; }
.qtitle { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdesc {
  margin-top: 3px; color: var(--txt-2); font-size: 14px; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qowner {
  position: absolute; bottom: 11px; right: 12px;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--txt-3); display: flex; align-items: center; gap: 4px;
}
.qowner.livre { color: var(--gold); }
.qowner.meu { color: #fff; }
.qowner svg { width: 9px; height: 9px; fill: currentColor; }
.qbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.14); }
.qbar i { display: block; height: 100%; background: #e9e9e7; transition: width .5s cubic-bezier(.2,.8,.2,1); }

.qcard.pronta { border-color: rgba(242,212,106,.7); }
.qcard.pronta .qbar i { background: var(--gold); }
.qcard.pronta::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  box-shadow: 0 0 14px rgba(242,212,106,.35), inset 0 0 18px rgba(242,212,106,.12);
  animation: pulso 2s ease-in-out infinite;
}
.qcard .ready-tag {
  position: absolute; bottom: 10px; right: 12px; font-size: 10px; letter-spacing: .12em; font-weight: 700;
  color: #1a1408; background: var(--gold); padding: 2px 6px;
}
.qcard.atrasada .qowner::after { content: "· ATRASADA"; color: #ff7b6e; }
.newdot {
  position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; background: var(--gold);
  transform: rotate(45deg); box-shadow: 0 0 6px rgba(242,212,106,.8); z-index: 2;
}
@keyframes pulso { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* fundos por raridade (ícones e tiles) */
.rbg-comum    { background: linear-gradient(160deg, #8d877f, #5a5650); }
.rbg-incomum  { background: linear-gradient(160deg, #3f8a4f, #1f4428); }
.rbg-raro     { background: linear-gradient(160deg, #5f8dc2, #2c4566); }
.rbg-lendario { background: linear-gradient(160deg, #7b4797, #351c43); }
.rbg-exotico  { background: linear-gradient(160deg, #e3c34a, #8a6d12); }
.rbg-comum::after, .rbg-incomum::after, .rbg-raro::after, .rbg-lendario::after, .rbg-exotico::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.22), transparent 62%);
}

/* ------------------------------------------------------------ contratos */
.bounty-grid { display: grid; grid-template-columns: repeat(4, 66px); gap: 8px; }
.btile, .bslot { position: relative; width: 66px; height: 66px; }
.bslot { background: var(--slot); }
.bslot.slot-add span b { font-size: 24px; }
.btile {
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.35);
  display: grid; place-items: center; overflow: hidden;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.btile > svg { width: 36px; height: 36px; fill: #fff; position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.btile:hover, .btile.hot { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.85), inset 0 0 0 2px rgba(0,0,0,.35); }
.bbar { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 4px; background: rgba(0,0,0,.45); z-index: 2; }
.bbar i { display: block; height: 100%; background: var(--green-2); }
.bowner {
  position: absolute; top: 3px; right: 3px; z-index: 2;
  min-width: 15px; height: 15px; padding: 0 3px;
  font-size: 9.5px; font-weight: 700; display: grid; place-items: center;
  background: rgba(0,0,0,.65); color: #fff;
}
.bowner.meu { background: #fff; color: #111; }
.bowner.livre { background: transparent; color: var(--gold); font-size: 12px; }
.btile.pronta { border-color: var(--gold); }
.btile.pronta::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 18px rgba(242,212,106,.55);
  animation: pulso 2s ease-in-out infinite;
}
.btile .check {
  position: absolute; left: 3px; top: 3px; z-index: 3; width: 16px; height: 16px;
  background: var(--gold); display: grid; place-items: center;
}
.btile .check svg { width: 12px; height: 12px; fill: #1a1408; }
.btile.atrasada { box-shadow: inset 0 0 0 2px rgba(196,72,62,.9); }

/* ------------------------------------------------------------ tooltip */
.tooltip {
  position: fixed; z-index: 50; width: 360px; pointer-events: none;
  background: rgba(14,14,15,.94);
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  animation: ttIn .12s ease-out;
}
@keyframes ttIn { from { opacity: 0; transform: translateY(4px); } }
.tt-head { padding: 10px 14px 9px; position: relative; overflow: hidden; }
.tt-head::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 10px);
}
.tt-head > * { position: relative; z-index: 1; }
.tt-title { font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.tt-sub { display: flex; justify-content: space-between; margin-top: 3px; font-size: 13px; opacity: .85; }
.thead-comum    { background: #c2bcb4; color: #1d1d1d; }
.thead-incomum  { background: #366f42; }
.thead-raro     { background: #5076a3; }
.thead-lendario { background: #522f65; }
.thead-exotico  { background: #ceae33; color: #1a1408; }
.tt-body { padding: 12px 14px 10px; }
.tt-desc { color: #d9d9d7; font-size: 14px; line-height: 1.4; white-space: pre-line; }
.tt-desc:empty { display: none; }
.tt-sec { margin-top: 12px; }
.tt-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--txt-3); text-transform: uppercase; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
.tt-info { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--txt-2); }
.tt-info b { color: #fff; font-weight: 600; }
.tt-info .warn { color: #ff8a7e; }
.tt-foot {
  display: flex; flex-wrap: wrap; gap: 14px; padding: 9px 14px; font-size: 12.5px; color: var(--txt-2);
  border-top: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
}
.tt-foot span { display: inline-flex; align-items: center; gap: 6px; }
.tt-hold { position: relative; }
.tt-hold .hbar { position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: rgba(255,255,255,.12); }
.tt-hold .hbar i { display: block; height: 100%; width: 0; background: #fff; }
.tt-foot .gold { color: var(--gold); }

/* objetivos (estilo Destiny) */
.objs { display: flex; flex-direction: column; gap: 4px; }
.obj { display: flex; align-items: center; gap: 6px; }
.obox {
  flex: none; width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.55);
  display: grid; place-items: center; background: rgba(0,0,0,.2);
}
.obox svg { width: 12px; height: 12px; fill: #fff; opacity: 0; }
.obj.feito .obox { background: var(--green); border-color: var(--green); }
.obj.feito .obox svg { opacity: 1; }
.obar {
  flex: 1; position: relative; height: 22px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; background: rgba(255,255,255,.07); overflow: hidden; font-size: 13px;
}
.obar > i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(94,161,106,.55); transition: width .35s ease; }
.obar > span { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obar .oval { flex: none; margin-left: 10px; font-variant-numeric: tabular-nums; }
.obj.feito .obar { color: var(--txt-2); }
.obj.feito .olabel { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }

.reward { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.reward .rw-ico {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, #3b3c3e, #1f2022); border: 1px solid rgba(255,255,255,.35);
}
.reward .rw-ico svg { width: 18px; height: 18px; fill: var(--gold); }

/* ------------------------------------------------------------ rodapé */
.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 50px; height: 58px; font-size: 16px;
  background: linear-gradient(to top, rgba(17,18,19,.95), rgba(17,18,19,0));
}
.foot-left { color: #fff; display: flex; gap: 14px; align-items: baseline; }
.foot-left .cap { font-variant-numeric: tabular-nums; }
.foot-dim { color: #a3a3a1; }
.foot-right { display: flex; align-items: center; }
.foot-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; height: 22px; color: #f0f0ee; font-size: 15.5px;
  border-left: 1px solid rgba(255,255,255,.2);
}
.foot-item:first-child { border-left: 0; }
button.foot-item:hover, a.foot-item:hover { color: var(--gold); }
.foot-item:empty { display: none; }
.ico-sm { width: 16px; height: 16px; fill: currentColor; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 6px var(--green-2); }

/* ------------------------------------------------------------ botões */
.btn {
  position: relative; overflow: hidden;
  height: 40px; padding: 0 22px; min-width: 120px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.07);
  font-size: 13.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.btn > span, .btn > svg { position: relative; z-index: 1; }
.btn-primary { background: #e9e9e7; color: #111; border-color: #e9e9e7; }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-gold { background: rgba(242,212,106,.14); border-color: var(--gold); color: var(--gold); }
.btn-gold:hover { background: rgba(242,212,106,.25); }
.btn-danger { border-color: rgba(196,72,62,.75); color: #ff9a90; background: rgba(196,72,62,.1); }
.btn-danger:hover { background: rgba(196,72,62,.22); border-color: #e0574b; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .key { border-color: currentColor; color: inherit; }
/* segurar para confirmar */
.hold .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.28); z-index: 0; }
.btn-gold.hold .fill { background: rgba(242,212,106,.45); }
.btn-danger.hold .fill { background: rgba(196,72,62,.5); }
.hold .hold-ring { width: 16px; height: 16px; flex: none; }
.hold .hold-ring circle { fill: none; stroke: currentColor; stroke-width: 2; }
.hold .hold-ring .bgc { opacity: .3; }

/* ------------------------------------------------------------ modais */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(8,8,9,.72); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 30px 16px;
  animation: fade .18s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(880px, 100%); max-height: calc(100vh - 60px); overflow: auto;
  background: rgba(22,23,24,.97); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.1);
  animation: rise .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.m-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; position: relative; overflow: hidden; }
.m-head::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 10px); pointer-events: none; }
.m-head > * { position: relative; z-index: 1; }
.m-head .qicon { width: 72px; height: 72px; }
.m-head .qicon svg { width: 44px; height: 44px; }
.m-title { font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
.m-sub { margin-top: 5px; font-size: 14px; opacity: .85; letter-spacing: .04em; }
.m-close {
  margin-left: auto; align-self: flex-start; width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4);
}
.m-close:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.m-close svg { width: 14px; height: 14px; fill: currentColor; }
.m-head.thead-comum .m-close, .m-head.thead-exotico .m-close { border-color: rgba(0,0,0,.4); }
.m-body { display: grid; grid-template-columns: 1fr 260px; gap: 28px; padding: 22px 22px 8px; }
.m-desc { font-size: 15px; color: #dcdcda; line-height: 1.5; white-space: pre-line; margin: 0 0 18px; }
.m-desc:empty { display: none; }
.m-body .objs { gap: 6px; }
.m-body .obj.click { cursor: var(--cursor); }
.m-body .obj.click:hover .obar { background: rgba(255,255,255,.13); }
.m-body .obj.click:hover .obox { border-color: #fff; }
.m-body .obar { height: 30px; font-size: 14px; }
.m-body .obox { width: 22px; height: 22px; }
.m-body .obox svg { width: 14px; height: 14px; }
.m-note { margin-top: 10px; color: var(--txt-3); font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.stepper .btn { min-width: 44px; padding: 0 14px; height: 34px; font-size: 18px; letter-spacing: 0; }
.stepper .num { font-size: 16px; min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.m-side .tt-info { font-size: 14px; gap: 6px; }
.m-actions {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 22px 20px; margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.m-actions .spacer { flex: 1; }

/* formulário */
.form { padding: 20px 22px 4px; display: grid; gap: 16px; }
.form-head { padding: 18px 22px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.form-head h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .08em; }
.field label, .flabel { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; color: var(--txt-3); margin-bottom: 7px; text-transform: uppercase; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15px; color: #fff;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.22);
  padding: 10px 12px; outline: none; border-radius: 0;
  transition: border-color .12s, background .12s;
}
.field textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { border-color: #fff; background: rgba(0,0,0,.5); }
.field input[type=date] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button {
  text-align: left; padding: 10px 12px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04);
}
.seg button b { display: block; font-size: 14px; letter-spacing: .1em; }
.seg button small { color: var(--txt-3); font-size: 12.5px; }
.seg button:hover { border-color: rgba(255,255,255,.6); }
.seg button.on { border: 2px solid #fff; background: rgba(255,255,255,.1); padding: 9px 11px; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pick button {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); font-size: 13.5px;
}
.cat-pick button svg { width: 22px; height: 22px; fill: currentColor; }
.cat-pick button:hover { border-color: rgba(255,255,255,.6); }
.cat-pick button.on { border-color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px #fff; }
.rar-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rar-pick button { padding: 0; border: 1px solid rgba(255,255,255,.18); text-align: left; overflow: hidden; }
.rar-pick button .sw { display: block; height: 8px; }
.rar-pick button .tx { display: block; padding: 7px 8px 8px; font-size: 13px; }
.rar-pick button .tx small { display: block; color: var(--gold); font-weight: 600; font-size: 12px; margin-top: 1px; }
.rar-pick button:hover { border-color: rgba(255,255,255,.6); }
.rar-pick button.on { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; background: rgba(255,255,255,.08); }
.steps-edit { display: flex; flex-direction: column; gap: 6px; }
.step-row { display: flex; gap: 6px; align-items: center; }
.step-row .n { width: 22px; color: var(--txt-3); font-size: 13px; text-align: right; flex: none; }
.step-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 15px; color: #fff; height: 40px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.22); padding: 0 12px; outline: none; border-radius: 0;
}
.step-row input:focus { border-color: #fff; background: rgba(0,0,0,.5); }
.step-row .rm { width: 38px; height: 40px; flex: none; border: 1px solid rgba(255,255,255,.18); color: var(--txt-3); font-size: 18px; }
.step-row .rm:hover { color: #ff9a90; border-color: #e0574b; }
.link-btn { align-self: flex-start; color: var(--txt-2); font-size: 13px; letter-spacing: .08em; padding: 6px 0; }
.link-btn:hover { color: #fff; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--txt-2); }
.check-line input { width: 18px; height: 18px; accent-color: #e9e9e7; }
.form-err { color: #ff9a90; font-size: 14px; min-height: 0; }

/* ------------------------------------------------------------ roster */
.roster-wrap { width: min(1100px, 100%); }
.section-title { margin: 0 0 16px; font-size: 16px; font-weight: 500; letter-spacing: .02em; }
.roster-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.r-card { display: flex; flex-direction: column; gap: 14px; }
.r-level { display: flex; align-items: baseline; gap: 12px; }
.r-level .big { font-size: 46px; font-weight: 300; color: var(--gold); line-height: 1; }
.r-level .t { font-size: 13px; letter-spacing: .14em; color: var(--txt-3); text-transform: uppercase; }
.r-level .tt { font-size: 18px; font-weight: 600; }
.r-xpbar { height: 6px; background: rgba(255,255,255,.12); position: relative; }
.r-xpbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.r-xptext { display: flex; justify-content: space-between; font-size: 13px; color: var(--txt-2); margin-top: -6px; }
.r-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.r-stat { background: var(--card); padding: 10px 12px; border: 1px solid rgba(255,255,255,.06); }
.r-stat b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.r-stat span { font-size: 11px; letter-spacing: .12em; color: var(--txt-3); text-transform: uppercase; }
.r-active { display: flex; flex-direction: column; gap: 4px; }
.r-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: rgba(255,255,255,.04); font-size: 14px; }
.r-row:hover { background: rgba(255,255,255,.1); }
.r-row .mini { width: 26px; height: 26px; flex: none; position: relative; display: grid; place-items: center; overflow: hidden; }
.r-row .mini svg { width: 17px; height: 17px; fill: #fff; position: relative; z-index: 1; }
.r-row .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-row .dim { color: var(--txt-3); font-size: 12.5px; white-space: nowrap; }
.r-row .xp { color: var(--gold); font-weight: 600; font-size: 13px; white-space: nowrap; }
.r-empty { color: var(--txt-3); font-size: 13.5px; padding: 8px 0; }
.rivalry { margin: 34px 0 10px; }
.rival-bar { display: flex; height: 10px; background: rgba(255,255,255,.08); }
.rival-bar i { display: block; height: 100%; transition: width .8s; }
.rival-names { display: flex; justify-content: space-between; font-size: 13px; color: var(--txt-2); margin-top: 6px; }
.log { margin-top: 34px; }

/* ------------------------------------------------------------ arquivo */
.arch-wrap { width: min(1100px, 100%); }
.arch-head { display: flex; align-items: baseline; margin-bottom: 10px; }
.arch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.arch-grid .qcard { opacity: .72; }
.arch-grid .qcard:hover { opacity: 1; }
.arch-grid .qicon { filter: grayscale(.55); }
.arch-tag { position: absolute; bottom: 11px; right: 12px; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--green-2); }

/* ------------------------------------------------------------ emblemas */
.emblem {
  position: relative; display: flex; align-items: center; gap: 0;
  width: 100%; max-width: 474px; height: 96px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  background: var(--em-bg, #333);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.emblem::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--em-art);
  opacity: .9;
}
.emblem > * { position: relative; z-index: 1; }
.em-icon { width: 96px; height: 96px; flex: none; display: grid; place-items: center; background: rgba(0,0,0,.22); }
.em-icon svg { width: 58px; height: 58px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.em-text { display: flex; flex-direction: column; padding-left: 16px; min-width: 0; }
.em-name { font-size: 26px; font-weight: 600; color: #fff; letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.em-sub { font-size: 14px; color: rgba(255,255,255,.8); }
.em-level { margin-left: auto; padding-right: 18px; display: flex; align-items: center; gap: 3px; font-size: 32px; font-weight: 400; color: var(--gold); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.em-level svg { width: 15px; height: 15px; fill: var(--gold); margin-top: -12px; }
.em-bar { position: absolute; left: 96px; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.35); }
.em-bar i { display: block; height: 100%; background: var(--gold); }
.em-1 {
  --em-bg: linear-gradient(100deg, #0b2440 0%, #164e6b 48%, #3f8ea0 78%, #9fd4d6 100%);
  --em-art: repeating-linear-gradient(115deg, rgba(255,255,255,.07) 0 1px, transparent 1px 14px),
            radial-gradient(circle at 82% 30%, rgba(255,255,255,.35), transparent 40%),
            linear-gradient(115deg, transparent 55%, rgba(255,255,255,.12) 55% 57%, transparent 57%);
}
.em-2 {
  --em-bg: linear-gradient(100deg, #2a0a0e 0%, #6e1d18 45%, #b9512a 78%, #f0a54d 100%);
  --em-art: repeating-linear-gradient(65deg, rgba(255,255,255,.06) 0 1px, transparent 1px 12px),
            radial-gradient(circle at 85% 70%, rgba(255,230,180,.4), transparent 42%),
            linear-gradient(65deg, transparent 60%, rgba(255,255,255,.12) 60% 62%, transparent 62%);
}
.emblem:not(.em-1):not(.em-2) {
  --em-bg: linear-gradient(100deg, #1d1d1f, #4a4a4c 60%, #8a8a8c);
}
.emblem input { position: absolute; opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------ login */
body.login { display: flex; align-items: center; justify-content: flex-end; min-height: 100vh; padding: 40px 9vw 90px; }
.login-brand { position: fixed; left: 50px; top: 40px; display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); }
.brand-mark svg { width: 26px; height: 26px; fill: var(--gold); }
.brand-name { font-size: 22px; font-weight: 600; letter-spacing: .3em; }
.brand-sub { font-size: 13px; color: var(--txt-2); letter-spacing: .08em; }
.login-panel { width: min(474px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-roster { display: flex; flex-direction: column; gap: 10px; }
.login .emblem { opacity: .75; }
.login .emblem:hover { opacity: 1; border-color: rgba(255,255,255,.7); }
.login .emblem:has(input:checked) { opacity: 1; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.3), 0 0 24px rgba(255,255,255,.15); transform: translateX(-8px); }
.login-erro { color: #ff9a90; font-size: 14px; background: rgba(196,72,62,.12); border-left: 3px solid #e0574b; padding: 8px 12px; }
.login-footer { justify-content: flex-start; }

/* ------------------------------------------------------------ toasts e recompensa */
#toastRoot { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; min-width: 260px;
  background: rgba(14,14,15,.95); border-left: 3px solid #fff; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toastIn .25s cubic-bezier(.2,.8,.2,1);
}
.toast.erro { border-color: #e0574b; }
.toast.ok { border-color: var(--green-2); }
.toast.gold { border-color: var(--gold); }
.toast.saindo { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

.reward-pop {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 70;
  width: min(420px, calc(100% - 32px)); padding: 14px 18px 16px;
  background: rgba(14,14,15,.95); border-top: 2px solid var(--gold);
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
  animation: toastIn .3s cubic-bezier(.2,.8,.2,1);
}
.reward-pop.saindo { animation: toastOut .4s forwards; }
.rp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rp-xp { font-size: 30px; font-weight: 300; color: var(--gold); }
.rp-title { font-size: 13px; color: var(--txt-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-lvl { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .12em; color: var(--txt-3); margin-top: 8px; text-transform: uppercase; }
.rp-bar { height: 5px; background: rgba(255,255,255,.12); margin-top: 6px; }
.rp-bar i { display: block; height: 100%; background: var(--gold); }

.levelup {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(242,212,106,.18), rgba(0,0,0,.55) 70%);
  animation: fade .3s ease-out;
}
.levelup.saindo { animation: toastOut .5s forwards; }
.lu-in { text-align: center; }
.lu-line { height: 1px; width: 0; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: lineGrow .9s .1s forwards cubic-bezier(.2,.8,.2,1); }
@keyframes lineGrow { to { width: min(620px, 90vw); } }
.lu-kicker { font-size: 13px; letter-spacing: .4em; color: var(--gold); margin: 16px 0 4px; }
.lu-num { font-size: 92px; font-weight: 200; line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(242,212,106,.6); animation: luNum .7s cubic-bezier(.2,.8,.2,1); }
.lu-title { font-size: 16px; letter-spacing: .2em; color: var(--txt-2); margin: 8px 0 16px; text-transform: uppercase; }
@keyframes luNum { from { opacity: 0; transform: scale(1.4); letter-spacing: .3em; } }

/* ------------------------------------------------------------ responsivo */
@media (max-width: 1240px) {
  .panel-quests { width: auto; flex: 1 1 auto; max-width: 660px; min-width: 0; }
  .panel-bounties { margin-left: 48px; }
  .sidebar { margin-right: 32px; }
}
@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr; justify-items: center; padding: 18px 16px 0; }
  .topbar-spacer { display: none; }
  .tabs { gap: 10px; }
  .tab { min-width: 0; padding: 0 14px; font-size: 12.5px; }
  .director { padding: 28px 16px 90px; }
  .view { flex-direction: column; align-items: stretch; }
  .sidebar { flex-direction: row; margin: 0 0 18px; overflow-x: auto; padding: 6px 2px; }
  .side-btn { flex: none; }
  .panel-quests, .panel-bounties { width: 100%; max-width: none; margin: 0; flex: none; }
  .panel-bounties { margin-top: 30px; }
  .bounty-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
  .btile, .bslot { width: auto; aspect-ratio: 1; height: auto; }
  .roster-cols { grid-template-columns: 1fr; }
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .m-body { grid-template-columns: 1fr; }
  .footer { padding: 0 16px; font-size: 14px; }
  .foot-dim { display: none; }
  .foot-item { padding: 0 9px; font-size: 14px; }
  body.login { justify-content: center; padding: 110px 16px 90px; }
  .login-brand { left: 16px; top: 24px; }
}
@media (max-width: 640px) {
  .quest-grid, .arch-grid { grid-template-columns: 1fr; }
  .owner-filter button { padding: 2px 5px; letter-spacing: .06em; }
  .panel-head { flex-wrap: wrap; height: auto; row-gap: 6px; }
  .rar-pick { grid-template-columns: repeat(3, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .m-title { font-size: 21px; }
  .r-stats { grid-template-columns: repeat(2, 1fr); }
  #btnNova .key, .foot-item .key { display: none; }
  .em-name { font-size: 21px; }
}
@media (max-width: 640px) {
  .quest-grid .slot:not(.slot-add), .bounty-grid .bslot:not(.slot-add) { display: none; }
  .quest-grid .slot-add { height: 56px; }
  .footer { background: rgba(17,18,19,.97); height: 52px; }
  #onlineInfo { display: none; }
  .foot-left .cap { font-size: 14px; }
}
@media (hover: none) {
  .tooltip { display: none !important; }
  .slot-add { color: rgba(255,255,255,.55); outline: 1px dashed rgba(255,255,255,.25); outline-offset: -1px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
