/* Tema NEXO escuro: ajustes sobre os componentes (cores que eram fixas do tema claro) + tela Home do Campo.
   Carregado depois de views.css. Referência visual: public/referencia.html. */

body { background: #050608; }
html { color-scheme: dark; }
::-webkit-scrollbar-thumb { background: var(--border); }
.app--campo { background: var(--bg-base); box-shadow: 0 0 0 1px var(--border); }
@media (min-width: 560px) and (max-width: 1199px) { body { background: #050608; } }
.sidebar { background: var(--bg-card); }
.sidebar .nav__item.is-active { color: var(--on-accent); }
.sidebar__brand .ms { color: var(--on-accent); }

/* Títulos continuam em sans; rótulos e números ficam em mono */
.page-title, .dossier-id h2, .rank-now h2, .layer__head h2, .fullscreen__title, .splash h1, .onb__card h1, .sidebar__brand { font-family: var(--font-text); }
.page-title, .fullscreen__title, .splash h1 { letter-spacing: -0.02em; }

/* Botões */
.btn { padding: 12px 18px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.btn--xl { padding: 15px 24px; font-size: 0.8rem; }
.btn--sm { padding: 8px 12px; font-size: 0.7rem; min-height: 38px; }
.btn--primary, .btn--primary:hover:not(:disabled) { box-shadow: none; color: var(--on-accent); }
.btn--ghost:hover:not(:disabled) { border-color: var(--subtle); }
.btn--danger { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }
.btn--text { text-transform: none; letter-spacing: 0; }

/* Chips e recompensas */
.chip { border-radius: 4px; font-size: 0.62rem; }
.chip--main { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(132, 204, 22, 0.25); }
.chip--daily { background: rgba(34, 211, 238, 0.12); color: var(--cyan); }
.chip--secondary { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; }
.chip--bonus { background: rgba(251, 191, 36, 0.14); color: var(--yellow); }
.chip-btn.is-on, .chip-check input:checked + span, .icon-pick__opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-btn--accent { border-color: var(--accent); }
.reward--xp { padding: 0; background: none; color: var(--accent); }
.reward--coin { color: #34d399; }
.reward--lg { background: var(--bg-card); }
.streak { border-radius: 12px; color: #fb923c; background: rgba(251, 146, 60, 0.12); border-color: rgba(251, 146, 60, 0.35); }
.coins { border-color: var(--border); color: #34d399; }

/* Barras */
.bar__track { height: 8px; background: var(--bg-base); border: 1px solid var(--border); }
.bar__fill--cyan { background: var(--cyan); }

/* Avatares e balões */
.avatar { background: color-mix(in srgb, var(--c) 18%, var(--bg-card)); border-color: color-mix(in srgb, var(--c) 45%, var(--bg-card)); color: color-mix(in srgb, var(--c) 80%, #fff); }
.bubble__name { color: color-mix(in srgb, var(--c) 75%, #fff); }

/* Vazio, aviso, cartões */
.notice { color: var(--cyan); background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.25); }
.mission-card:hover { border-color: var(--subtle); box-shadow: none; }
.mission-card--main { border-color: rgba(132, 204, 22, 0.4); }
.mission-card__micro { color: var(--cyan); }
.mission-card.is-offer { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.flash-card, .gift-banner, .gift-card, .medal.is-unlocked { background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), var(--bg-card)); }
.flash-card__timer, .fullscreen__note--gold { color: var(--yellow); }
.gift-banner > .ms { color: var(--yellow); }
.medal.is-unlocked .medal__icon { background: rgba(251, 191, 36, 0.16); color: var(--yellow); }
.hint-card { border-color: rgba(132, 204, 22, 0.35); background: var(--accent-soft); }

/* Formulários */
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus, #giveup-input:focus { background: var(--bg-card); border-color: var(--accent); }
.field__error, .onb__error { color: #fca5a5; }
.radio:has(input:checked), .radio-card input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.toggle input:checked + .toggle__ui, .switch input:checked + .toggle__ui { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle__ui::after, .switch input:checked + .toggle__ui::after { background: var(--on-accent); }
.toggle__ui::after { background: #cbd5e1; box-shadow: none; }
.select__btn:hover { border-color: var(--subtle); }
.select__list { background: var(--bg-card); }
.select__opt.is-selected { color: var(--accent); background: var(--accent-soft); }
.tabs__tab.is-on { background: var(--accent); color: var(--on-accent); }
.dots__dot.is-on { background: var(--accent); }
.icon-pick__opt input:checked + span { color: var(--on-accent); }

/* Camadas, toast, overlays */
.layer__backdrop { background: rgba(0, 0, 0, 0.65); }
.toast { background: var(--bg-active); border-color: var(--border); color: var(--text); }
.toast[data-type="success"] { border-color: var(--accent); }
.toast[data-type="error"] { background: #7f1d1d; }
.toast[data-type="warn"] { background: #78350f; }
.fullscreen { background: rgba(5, 6, 8, 0.97); }
.fullscreen--fail { background: rgba(28, 8, 8, 0.97); }
.fullscreen__icon { border: 1px solid rgba(132, 204, 22, 0.4); background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.fullscreen__icon--gold { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.12); color: var(--yellow); }
.fullscreen__icon--danger { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.12); color: #f87171; }
.fullscreen__title--danger { color: #f87171; }
.fullscreen__note { color: var(--cyan); }
.splash__logo { color: var(--on-accent); box-shadow: none; }
.splash__logo--error { background: rgba(239, 68, 68, 0.12); color: #f87171; box-shadow: none; }

/* Navegação inferior */
.nav { background: rgba(11, 13, 16, 0.95); border-radius: 0; }
.nav__item.is-active { color: var(--accent); }
.nav__item.is-active .nav__icon::before { display: none; }
.nav__badge { background: var(--accent); color: var(--on-accent); }
.nav__fab { color: var(--on-accent); box-shadow: none; border-color: var(--bg-base); }

/* Superfícies que eram escuras no tema claro */
.agent-head, .focus-card, .next-rank { background: var(--bg-card); border: 1px solid var(--border); }
.agent-head { border-radius: 0 0 16px 16px; }
.agent-head__avatar { color: var(--on-accent); }
.agent-head__level { border-color: var(--bg-card); background: var(--text); color: var(--on-accent); }
.focus-card { box-shadow: none; border-color: rgba(132, 204, 22, 0.35); }
.micro-box { background: var(--accent-soft); color: #d9f99d; }
.hub__item > .ms, .dossier-id__avatar, .rank-now__icon { color: var(--on-accent); }
.dossier-id__avatar, .rank-now__icon { background: var(--accent); }
.rank-step.is-current > .ms:first-child, .empty .ms { color: var(--accent); }
.chart__bar { box-shadow: none; }
.list__item { border-bottom-color: var(--border); }

/* ================= HOME do Campo (igual a referencia.html) ================= */
.nexo-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; background: rgba(11, 13, 16, 0.95); border-bottom: 1px solid rgba(38, 45, 56, 0.6); }
.nexo-top__brand { display: flex; align-items: center; gap: 8px; font: 600 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; }
.nexo-top__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nexo-top__right { display: flex; align-items: center; gap: 12px; font: 11px var(--font-mono); color: var(--text-muted); }
.nexo-top__lvl { padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-card); color: var(--accent); font-weight: 700; }
.nexo-top__safe { display: flex; align-items: center; gap: 4px; color: #34d399; }
.nexo-top__safe .ms { font-size: 14px; }

.home { display: flex; flex-direction: column; gap: 16px; }
.home__hello { display: flex; align-items: center; justify-content: space-between; }
.home__eyebrow { font: 500 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.home__title { font: 700 20px var(--font-text); letter-spacing: -0.01em; color: #fff; }
.home__tools { display: flex; align-items: center; gap: 8px; }
.sq-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); color: #cbd5e1; transition: border-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease); }
.sq-btn:hover { border-color: var(--subtle); color: #fff; }
.sq-btn .ms { font-size: 16px; }
.sq-btn--gift { color: var(--yellow); }
.sq-btn__dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sq-btn--gift .sq-btn__dot { background: var(--yellow); animation: gift-pulse 2.2s ease-in-out infinite; }

.cred { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); }
.cred__who { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cred__avatar { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-active); color: var(--accent); font-size: 1.4rem; }
.cred__id { flex: 1; min-width: 0; }
.cred__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cred__name { overflow: hidden; font: 700 14px var(--font-text); color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.cred__rank { padding: 2px 8px; border: 1px solid rgba(132, 204, 22, 0.2); border-radius: 4px; background: var(--accent-soft); color: var(--accent); font: 600 10px var(--font-mono); text-transform: uppercase; }
.cred__sub { margin-top: 2px; font: 12px var(--font-mono); color: var(--text-muted); }
.cred__bars { display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid rgba(38, 45, 56, 0.6); }
.cred .bar__head { margin-bottom: 6px; font: 11px var(--font-mono); letter-spacing: 0; text-transform: none; }
.cred .bar__head span:last-child { color: #e2e8f0; font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); }
.tile__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font: 10px var(--font-mono); text-transform: uppercase; color: var(--text-muted); }
.tile__head .ms { font-size: 14px; }
.tile b { display: block; font: 700 18px var(--font-mono); color: #fff; }
.tile small { display: block; margin-top: 2px; font-size: 10px; color: var(--text-muted); }

.hsec { margin-top: 4px; }
.hsec__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hsec__title { display: flex; align-items: center; gap: 8px; font: 700 14px var(--font-text); color: #fff; }
.hsec__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.hsec__dot--daily { background: var(--yellow); } .hsec__dot--main { background: var(--accent); }
.hsec__note { font: 11px var(--font-mono); color: var(--text-muted); }
.hsec__link { color: var(--accent); font-size: 12px; font-weight: 500; background: none; border: 0; }
.hsec__link:hover { text-decoration: underline; }
.hlist { display: flex; flex-direction: column; gap: 8px; }

.mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); cursor: pointer; }
.mrow--lg { padding: 14px; border-radius: 16px; }
.mrow__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mrow__main > .ms { font-size: 16px; color: var(--yellow); }
.mrow h4 { font: 700 12px var(--font-text); color: #fff; }
.mrow p { margin-top: 2px; font: 10px var(--font-mono); color: var(--text-muted); }
.mrow__go { flex: none; padding: 4px 10px; border: 1px solid rgba(132, 204, 22, 0.3); border-radius: 8px; background: rgba(132, 204, 22, 0.1); color: var(--accent); font: 700 10px var(--font-mono); }
.mrow__go:hover { background: var(--accent); color: var(--on-accent); }
.mrow__go--ghost { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-color: var(--border); border-radius: 12px; background: var(--bg-card); color: #fff; font-size: 12px; }
.mrow__go--ghost .ms { color: var(--accent); font-size: 14px; }
.mrow__go--ghost:hover { background: var(--bg-active); color: #fff; }

.hmain { position: relative; overflow: hidden; padding: 16px; border: 1px solid rgba(132, 204, 22, 0.4); border-radius: 16px; background: var(--bg-card); cursor: pointer; }
.hmain__top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hmain__text { flex: 1; min-width: 0; }
.hmain h3 { margin-bottom: 6px; font: 800 16px var(--font-text); color: #fff; }
.hmain__desc { font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.hmain__foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(38, 45, 56, 0.6); font-size: 12px; }
.hmain__foot > span:first-child { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); color: var(--text-muted); }
.hmain__foot .ms { font-size: 14px; }
.hmain__reward { font: 700 12px var(--font-mono); color: var(--accent); }
.hmain .btn { margin-top: 12px; }
.is-off-context { opacity: 0.62; }
.mrow__warn { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--yellow); font-size: 11px; }
.hmain .mrow__warn { margin: 0 0 12px; }

/* Missões: cabeçalho com "Nova missão" */

/* Notificações (igual à referência) */
.notifs { display: flex; flex-direction: column; gap: 8px; }
.notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); font-size: 12px; cursor: pointer; }
.notif.is-read { opacity: 0.7; }
.notif__dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent); }
.notif.is-read .notif__dot { background: #475569; }
.notif p { color: #fff; font-weight: 500; line-height: 1.45; }
.notif.is-read p { color: #cbd5e1; font-weight: 400; }
.notif small { font: 10px var(--font-mono); color: var(--text-muted); }
.nav__fab { display: none; }

/* Disponibilidade no topo (no lugar do antigo "SEGURO") */
.nexo-top__avail { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.nexo-top__avail .ms { font-size: 14px; }
.nexo-top__avail.is-on { color: #34d399; }
.nexo-top__avail.is-off { color: var(--yellow); }

/* Retratos ilustrados dos personagens */
.avatar--portrait { overflow: hidden; background: var(--bg-card); }
.avatar--portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar--xl.avatar--portrait, .avatar--lg.avatar--portrait { border-width: 2px; }

/* Cabeçalho de página (Quadro de Missões, Agência) */
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.phead__eyebrow { display: block; font: 500 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.phead__title { font: 700 20px var(--font-text); letter-spacing: -0.01em; color: #fff; }
.phead .row-actions { flex: none; flex-wrap: nowrap; }
.phead .row-actions .icon-btn--box { width: 38px; height: 38px; }
.icon-btn--box { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); color: #cbd5e1; }
.icon-btn--box .ms { font-size: 16px; }
.icon-btn--lg.icon-btn--box { flex: none; width: 44px; height: 44px; }
.icon-btn--lg.icon-btn--box .ms { font-size: 22px; }

/* Abas segmentadas */
.segtabs { display: flex; margin-bottom: 12px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); font-size: 12px; font-weight: 500; }
.segtabs__tab { flex: 1; padding: 6px 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-muted); }
.segtabs__tab:hover { color: #fff; }
.segtabs__tab.is-on { border-color: var(--border); background: var(--bg-base); color: #fff; font-weight: 600; }

/* Quadro de Missões: cartões de detalhe */
.bboard { display: flex; flex-direction: column; gap: 12px; }
.app--central .bboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.bcard { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); cursor: pointer; transition: border-color var(--duration-fast) var(--ease); }
.bcard:hover { border-color: var(--subtle); }
.bcard__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bcard__reward { font: 700 12px var(--font-mono); color: var(--accent); }
.bcard h3 { font: 700 14px var(--font-text); color: #fff; }
.bcard__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.bcard .mrow__warn { margin-top: 6px; }
.bcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(38, 45, 56, 0.6); font-size: 12px; }
.bcard__who { display: flex; align-items: center; gap: 6px; color: #cbd5e1; font-weight: 500; }
.bcard__more { display: flex; align-items: center; gap: 2px; font: 10px var(--font-mono); color: var(--accent); }
.bcard__more .ms { font-size: 12px; }

/* Agência: grade de membros */
.members { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.app--central .members { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.member { display: flex; flex-direction: column; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); text-align: center; cursor: pointer; transition: border-color var(--duration-fast) var(--ease); }
.member:hover { border-color: var(--subtle); }
.member .avatar { margin-bottom: 8px; }
.member h3 { font: 700 14px var(--font-text); color: #fff; }
.member__role { font: 12px var(--font-mono); color: var(--text-muted); }
.member__foot { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 12px; padding-top: 8px; border-top: 1px solid rgba(38, 45, 56, 0.6); font: 11px var(--font-mono); color: var(--text-muted); }
.member__foot b { color: var(--accent); font-weight: 600; }
.members__hint { margin-top: 16px; }

/* Sem cabeçalho fixo: respeita a área segura do topo no celular */
.app--campo .main { padding-top: max(var(--space-4), env(safe-area-inset-top)); }

/* Fim da rolagem: sem folga sobrando abaixo do último bloco e sem "puxar" a página além do conteúdo */
.app--campo .main { padding-bottom: calc(76px + var(--space-4) + env(safe-area-inset-bottom)); }
.app--campo.is-focus .main { padding-bottom: var(--space-6); }
.page > :last-child, .home > :last-child { margin-bottom: 0; }
.page > :last-child > .section:last-child, .page .section:last-child { margin-bottom: 0; }

/* Campo: quem rola é a própria página (assim a barra de endereço do navegador recolhe e volta normalmente).
   A barra inferior é fixa e não aceita gesto de rolagem. Puxar para atualizar fica liberado. */
.app--campo { height: auto; min-height: 100dvh; }
.app--campo .main { overflow: visible; }
.app--campo .nav { touch-action: none; }
.nexo-top { position: sticky; top: 0; z-index: 20; }

/* Detalhe aberto pelo Quadro: escolha de principal, secundária ou diária */
.segtabs--pick { margin-bottom: 0; background: var(--bg-base); }
.segtabs--pick .segtabs__tab { min-height: 40px; }
.segtabs--pick .segtabs__tab.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Bônus: cor por raridade */
.rarity--common { --rare: #94a3b8; } .rarity--rare { --rare: var(--cyan); } .rarity--epic { --rare: var(--purple); } .rarity--legendary { --rare: var(--yellow); }
.chip.rarity { border: 1px solid color-mix(in srgb, var(--rare, #94a3b8) 40%, transparent); background: color-mix(in srgb, var(--rare, #94a3b8) 14%, transparent); color: var(--rare, #94a3b8); }
.gift-card[class*="rarity--"] { border-color: color-mix(in srgb, var(--rare, var(--yellow)) 45%, var(--border)); }
.daily-bonus { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--rare) 45%, var(--border)); border-radius: 16px; background: var(--bg-card); }
.daily-bonus > .ms { color: var(--rare); font-size: 1.6rem; }
.daily-bonus > div { flex: 1; min-width: 0; }
.daily-bonus b { display: block; font-size: 14px; }
.daily-bonus small { color: var(--text-muted); }
.gift-reveal--legendary { box-shadow: 0 0 80px -4px var(--yellow); }

/* Nova missão: "Ideia pronta" e "Meus modelos" lado a lado, metade cada */
.gen-bar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.gen-bar .btn { min-width: 0; padding-inline: 8px; white-space: nowrap; }

/* Prazo e fila de secundárias */
.chip--due { background: var(--bg-active); color: var(--text-muted); }
.chip--due.is-late, .mrow p .is-late { color: var(--danger); }
.chip--due.is-late { background: rgba(248, 113, 113, 0.12); }
.bcard__top { gap: 8px; }
.hsec__wait { display: flex; align-items: center; gap: 8px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-muted); font-size: 12px; }

/* Popup do bônus diário: 7 dias em duas linhas (4 em cima, 3 embaixo; o 7º ocupa duas colunas) */
.daily-pop { display: grid; gap: 14px; }
.daily-pop__lead { text-align: center; font-size: 13px; color: var(--text-muted); }
.daily-pop__lead b { color: var(--text); }
.daily-week { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.daily-day { display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 10px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-base); }
.daily-day:nth-child(7) { grid-column: span 2; border-color: color-mix(in srgb, var(--rare) 55%, var(--border)); }
.daily-day span:not(.ms) { font: 600 10px var(--font-mono); text-transform: uppercase; color: var(--text-muted); }
.daily-day .ms { font-size: 1.5rem; color: var(--rare); }
.daily-day small { font-size: 10px; color: var(--rare); }
.daily-day--next .ms { color: var(--subtle); }
.daily-day--done { opacity: 0.6; }
.daily-day--done .ms { color: var(--accent); }
.daily-day--today { border: 2px solid var(--rare); background: color-mix(in srgb, var(--rare) 14%, var(--bg-base)); }
.daily-day--today span:not(.ms) { color: var(--text); }

/* Busca do Quadro de Missões */
.search { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); color: var(--text-muted); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; color: var(--text); font-size: 14px; }
.search input:focus, .search input:focus-visible { outline: none; }
.search input::-webkit-search-cancel-button { filter: invert(0.7); cursor: pointer; }

/* Faixa do topo mais alta, com o menu sanduíche */
.nexo-top { justify-content: flex-start; gap: 4px; min-height: 64px; padding: 10px 20px 10px 8px; }
.nexo-top__right { margin-left: auto; }
.nexo-top__menu { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--text); }
.nexo-top__menu .ms { font-size: 24px; }
/* Menu: gaveta que entra pela esquerda */
.layer--drawer { justify-content: flex-start; }
.layer--drawer .layer__panel { width: min(85%, 320px); height: 100dvh; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; transform: translateX(-100%); }
.layer--drawer.is-open .layer__panel { transform: none; }
.menu { display: grid; gap: 8px; }
.menu__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-base); color: var(--text); text-align: left; }
.menu__item > .ms { flex: none; padding: 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; }
.menu__item span:not(.ms) { flex: 1; min-width: 0; }
.menu__item b { display: block; font-size: 14px; }
.menu__item small { display: block; color: var(--text-muted); font-size: 11px; }
.menu__item.is-active { border-color: var(--accent); background: var(--accent-soft); }
.menu__item:disabled { opacity: 0.45; cursor: not-allowed; }
.menu__note { margin-bottom: 12px; }

/* Menu aberto: a tela de trás não rola; só o conteúdo do menu, quando não couber. */
html:has(.layer--drawer.is-open), html:has(.layer--drawer.is-open) body { overflow: hidden; }
.layer--drawer .layer__backdrop, .layer--drawer .layer__head { touch-action: none; }
.layer--drawer .layer__body { flex: 1; min-height: 0; overscroll-behavior: contain; touch-action: pan-y; }

/* ================= PERFIL ================= */
.profile { display: flex; flex-direction: column; gap: 16px; }
.profile .phead, .profile .next-rank { margin-bottom: 0; }
.profile .next-rank { gap: 14px; padding: 14px 16px; border-color: rgba(132, 204, 22, 0.4); border-radius: 16px; }
.profile .next-rank b { display: block; font-size: 14px; }
.profile .next-rank small { font: 11px var(--font-mono); }
.attrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.attr { --tone: var(--accent); display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); }
.attr--cyan { --tone: var(--cyan); } .attr--purple { --tone: var(--purple); } .attr--pink { --tone: var(--pink); } .attr--green { --tone: var(--green); }
.attr__head { display: flex; align-items: center; justify-content: space-between; }
.attr__head .ms { color: var(--tone); font-size: 18px; }
.attr__head small { font: 600 10px var(--font-mono); color: var(--text-muted); text-transform: uppercase; }
.attr b { font: 700 20px var(--font-mono); color: #fff; }
.attr > span { font-size: 12px; color: var(--text-muted); }
.attr .bar__track { height: 6px; margin-top: 4px; }
.attr .bar__fill { background: var(--tone); }
.bond { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); text-align: left; }
.bond:hover { border-color: var(--subtle); }
.bond__body { display: grid; flex: 1; min-width: 0; gap: 6px; }
.bond__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bond__row b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bond__row small { color: var(--accent); font: 600 10px var(--font-mono); text-transform: uppercase; }
.bond__body > small { color: var(--text-muted); font: 10px var(--font-mono); }
.bond .bar__track { display: block; height: 6px; }
.bond .bar__fill { display: block; }

/* Foto de perfil */
.cred__avatar { position: relative; }
.cred__avatar .agent-photo, .agent-head__avatar .agent-photo { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.cred__avatar--edit { width: 64px; height: 64px; padding: 0; border-radius: 16px; font-size: 1.8rem; cursor: pointer; }
.cred__avatar--edit:hover { border-color: var(--accent); }
.cred__edit { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--bg-card); border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.cred__edit .ms { font-size: 13px; }
.photo-menu { display: grid; justify-items: center; gap: 10px; }
.photo-menu .agent-photo { width: 160px; height: 160px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 36px; object-fit: cover; }

.cred__user { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 28px; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--accent); font: 500 12px var(--font-mono); overflow-wrap: anywhere; text-align: left; }
.cred__user .ms { font-size: 13px; color: var(--text-muted); }

/* Recorte da foto de perfil: área sempre quadrada; os gestos são da foto, não da rolagem */
.cropper { display: grid; gap: 12px; }
.cropper__stage { position: relative; width: min(100%, 320px, 52dvh); margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--bg-base); }
.cropper__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.cropper__canvas:active { cursor: grabbing; }
.cropper__frame { position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); pointer-events: none; }
.cropper__zoom { display: flex; align-items: center; gap: 12px; min-height: 44px; font: 600 11px var(--font-mono); text-transform: uppercase; color: var(--text-muted); }
.cropper__zoom input { flex: 1; min-width: 0; height: 32px; accent-color: var(--accent); }
.cropper__hint { text-align: center; font-size: 12px; }

/* Missões de suprimentos (compras) */
.chip--supply { background: rgba(251, 146, 60, 0.14); color: #fb923c; }
.hsec__dot--supply { background: #fb923c; }
.supply-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(251, 146, 60, 0.4); border-radius: 16px; background: var(--bg-card); }
.supply-card > .ms:first-child { flex: none; padding: 9px; border-radius: 12px; background: rgba(251, 146, 60, 0.14); color: #fb923c; font-size: 1.3rem; }
.supply-card span:not(.ms) { flex: 1; min-width: 0; }
.supply-card b { display: block; font-size: 13px; }
.supply-card small { color: var(--text-muted); font: 11px var(--font-mono); }
.segtabs--pick { flex-wrap: wrap; }
.segtabs--pick .segtabs__tab { flex: 1 1 40%; }

/* Nova missão: campos que somem quando o tipo é Suprimentos */
.form__group { display: grid; gap: var(--space-4); }
.form__group[hidden] { display: none; }

/* "Consegui tudo" */
.got-all { margin-bottom: 16px; }
/* Contorno na cor dos suprimentos: não se confunde com o "Começar" (verde cheio) de cada missão */
.btn--supply { background: rgba(251, 146, 60, 0.1); border: 1.5px dashed rgba(251, 146, 60, 0.7); color: #fdba74; }
.btn--supply:hover:not(:disabled) { background: rgba(251, 146, 60, 0.18); }
.shopping { display: grid; gap: 6px; max-height: 40dvh; overflow-y: auto; }
.shopping li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-base); font-size: 13px; }
.shopping .ms { color: var(--accent); }

/* Parcerias */
.partner-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.partner-tools .btn { flex: 1 1 140px; }
.partner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); }
.partner__photo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-active); color: var(--accent); font-size: 1.4rem; }
.partner__photo .agent-photo { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.partner__body { flex: 1; min-width: 0; }
.partner__body b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.partner__body small { display: block; color: var(--text-muted); font: 11px var(--font-mono); overflow-wrap: anywhere; }
.partner__actions { display: flex; gap: 8px; margin-left: auto; }
.segtabs__dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.myqr { display: grid; justify-items: center; gap: 12px; text-align: center; }
.myqr img { width: min(100%, 280px); aspect-ratio: 1; padding: 10px; border-radius: 16px; background: #fff; image-rendering: pixelated; }
.myqr b { font: 700 16px var(--font-mono); color: var(--accent); }

/* Missões de parceiros: cor própria (roxo) nos cartões */
.mission-card.is-partner, .mrow.is-partner, .hmain.is-partner, .bcard.is-partner { border-color: rgba(167, 139, 250, 0.6); background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), var(--bg-card) 65%); }
.partner-tag { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--purple); font: 600 11px var(--font-mono); }
.hmain .partner-tag { margin: 0 0 12px; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Missões em conjunto: rosa */
.mission-card.is-joint, .mrow.is-joint, .hmain.is-joint, .bcard.is-joint { border-color: rgba(244, 114, 182, 0.6); background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), var(--bg-card) 65%); }
.partner-tag--joint { color: var(--pink); }
/* Resgatar direto do cartão do Quadro */
.bcard__claim { border-color: rgba(244, 114, 182, 0.6); color: var(--pink); }
/* Escolha de parceiro em nova missão */
.partner-pick { display: grid; gap: var(--space-3); }
.partner-pick > .btn.is-on { border-color: var(--purple); color: var(--purple); }
.partner-pick__panel { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1px solid rgba(167, 139, 250, 0.4); border-radius: 14px; }
.partner-pick__panel[hidden] { display: none; }
.field[hidden] { display: none; }
/* Missões encaminhadas */
.sent { --tone: var(--purple); display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); }
.sent__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sent__head b { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.sent__status { flex: none; background: rgba(167, 139, 250, 0.14); color: var(--purple); }
.sent--completed .sent__status { background: var(--accent-soft); color: var(--accent); }
.sent--declined .sent__status, .sent--archived .sent__status { background: var(--bg-active); color: var(--text-muted); }
.sent small { color: var(--text-muted); font: 11px var(--font-mono); }
.sent .bar__track { height: 6px; }
.sent .btn { justify-self: start; }

/* Celular (toque ou layout Campo): rola normalmente, mas a barra de rolagem nunca aparece. */
@media (pointer: coarse), (max-width: 1199px) {
    * { scrollbar-width: none !important; }
    *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
}
