html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Header / usuário ===== */
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* menu de usuário: avatar + dropdown */
.user-menu { position: relative; }
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #0d1a0d;
  color: #39ff6a;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: box-shadow 0.12s ease;
}
.user-avatar:hover,
.user-avatar[aria-expanded="true"] {
  box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.25);
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e9e5;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  padding: 0.4rem;
  z-index: 50;
}
.user-dropdown__head {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid #eef1ee;
  margin-bottom: 0.3rem;
}
.user-dropdown__nome { font-weight: 700; color: #10231a; font-size: 0.95rem; }
.user-dropdown__email { font-size: 0.78rem; color: #6c757d; word-break: break-all; }
/* conta/tenant (Fase 5.1): chip discreto abaixo do e-mail */
.user-dropdown__conta {
  margin-top: 0.35rem; align-self: flex-start;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em;
  color: #10231a; background: #e9f7ef; border: 1px solid #cde7d8;
  padding: 0.1rem 0.45rem; border-radius: 999px;
}
.user-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #24322a;
  cursor: pointer;
  text-decoration: none;
}
.user-dropdown__item:hover { background: #f2f6f2; }
.user-dropdown__item--sair { color: #d1242f; }
.user-dropdown form { margin: 0; }

/* card de formulário (alterar senha) + flash */
.form-card {
  max-width: 420px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e5e9e5;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.form-card__title { font-size: 1.4rem; font-weight: 700; margin: 0; color: #10231a; }
.form-card__sub { color: #6c757d; font-size: 0.9rem; margin: 0 0 0.4rem; }
.form-stack { display: flex; flex-direction: column; gap: 0.9rem; }
.form-actions { display: flex; gap: 0.6rem; justify-content: flex-end; align-items: center; margin-top: 0.3rem; }
.btn-secundario {
  padding: 0.7rem 1rem;
  border-radius: 9px;
  font-weight: 600;
  color: #6c757d;
  text-decoration: none;
}
.btn-secundario:hover { color: #24322a; }
.flash-sucesso {
  max-width: 1080px;
  margin: 1rem auto 0;
  background: #eaf7ee;
  border: 1px solid #b7e3c4;
  color: #1a7431;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

/* ===== Login ===== */
.login-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #0d1a0d 0%, #16281a 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 1.5rem;
}
.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.login-mark { align-self: center; }
.login-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  color: #10231a;
}
.login-sub {
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}
.login-field input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 400;
}
.login-field input:focus {
  outline: none;
  border-color: #2ea043;
  box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.15);
}
.login-btn {
  margin-top: 0.4rem;
  padding: 0.7rem;
  background: #2ea043;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease;
}
.login-btn:hover { background: #1a7431; }
.login-erro {
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: #a61d24;
  border-radius: 9px;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
}

/* ===== Marca nappPortal ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  padding: 0.35rem 0;
}
.brand-icon {
  display: inline-flex;
  line-height: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #10231a;
}
.brand-accent { color: #2ea043; }
.brand-sub {
  font-size: 0.72rem;
  color: #6c757d;
}

/* selo grande no hero */
.hero__mark {
  display: block;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
}

/* ===== Vitrine nappPortal ===== */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero__accent { color: #2ea043; }
.hero__sub {
  color: var(--bs-secondary-color, #6c757d);
  margin-top: 0.5rem;
}

.grid {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

/* ── nappPlay: cabeçalho slim (inspirado no painel I da brand) ── */
.play-head {
  max-width: 1120px; margin: 0 auto; padding: 1.1rem 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.play-head__brand { display: flex; align-items: center; gap: 12px; text-align: left; }
.play-head__brand--btn { background: none; border: 0; cursor: pointer; padding: 6px; margin: -6px; border-radius: 12px; transition: background .12s ease; }
.play-head__brand--btn:hover { background: #f3f4f6; }
.play-head__ico { position: relative; display: inline-flex; line-height: 0; }
.play-head__ico img { border-radius: 9px; }
.play-head__badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  background: #22e06a; color: #04180b; border: 2px solid #fff; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.play-head__txt { display: flex; flex-direction: column; }
.play-head img { border-radius: 8px; }

/* linha de meta do card: categoria (tipo) + slug */
.card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0.1rem 0 0; }
.play-head__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: #111827; line-height: 1; }
.play-head__sub { font-size: 0.85rem; color: #6c757d; margin-top: 2px; }

/* ── nappPlay (store) — compacto, cabe sem scroll ── */
.store-sec { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.store-sec + .store-sec { margin-top: 4px; }
.store-h {
  font-size: 0.78rem; font-weight: 700; color: #6c757d; text-transform: uppercase;
  letter-spacing: 0.06em; margin: 1.1rem 0 0.7rem;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  overflow: hidden;
  position: relative;
}
/* sem borda colorida (parecia erro) — o ícone já carrega a cor da marca */
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card__validade { font-size: 0.76rem; color: #6c757d; }
.card__tag {
  align-self: flex-start; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em;
  color: #6c757d; background: #f3f4f6; border: 1px solid #e8ebf0;
  border-radius: 6px; padding: 0.05rem 0.4rem; margin-top: 0.15rem; font-family: ui-monospace, monospace;
}
.card__get {
  font-weight: 700; font-size: 0.85rem; text-decoration: none;
  color: #04180b; background: #16A34A;
  padding: 0.4rem 0.9rem; border-radius: 9px; cursor: pointer;
}
.card__get:hover { filter: brightness(1.08); }

/* ── nappPlay: CTA que abre a store em modal ── */
.store-h-row { display: flex; align-items: center; justify-content: space-between; }
.play-cta {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: #0d1a0d; color: #fff; border: 0; border-radius: 10px;
  padding: 0.5rem 0.9rem; font-weight: 700; font-size: 0.88rem;
}
.play-cta:hover { filter: brightness(1.15); }
.play-cta__n { background: #22e06a; color: #04180b; border-radius: 999px; padding: 0 0.4rem; font-size: 0.72rem; }
.empty-play { color: #6c757d; padding: 1.5rem 0; }

/* ── modal da store (nappPlay) ── */
.play-modal {
  border: 0; border-radius: 16px; padding: 0; width: min(1000px, 94vw);
  max-height: 88vh; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden;
}
.play-modal::backdrop { background: rgba(13,17,23,.55); backdrop-filter: blur(3px); }
.play-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid #eef1ee; position: sticky; top: 0; background: #fff;
}
.play-modal__title { display: flex; align-items: center; gap: 12px; }
.play-modal__title strong { font-size: 1.25rem; font-weight: 800; }
.play-modal__sub { font-size: 0.8rem; color: #6c757d; }
.play-modal__x { border: 0; background: #f3f4f6; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 0.9rem; color: #6c757d; }
.play-modal__x:hover { background: #e8ebf0; }
.play-atalhos { display: flex; gap: 10px; flex-wrap: wrap; padding: 0.9rem 1.25rem; border-bottom: 1px solid #f3f4f6; }
.play-atalho img { border-radius: 8px; display: block; transition: transform .1s ease; }
.play-atalho:hover img { transform: translateY(-2px); }
.play-modal__grid { padding: 1rem 1.25rem 1.25rem; margin: 0; max-height: 60vh; overflow-y: auto; }
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
/* card inteiro clicável: o <a> cobre todo o cartão (mesma aba) */
.card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.95rem 1rem;
  color: inherit;
  text-decoration: none;
}
.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card__icon { font-size: 1.75rem; }
.card__icon-img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: block;
}
.card__nome {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.6rem 0 0.2rem;
}
.card__cat {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  align-self: flex-start;
}
.card__desc {
  color: var(--bs-secondary-color, #495057);
  font-size: 0.83rem;
  line-height: 1.4;
  margin: 0.4rem 0 0.7rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__icon-img { width: 36px; height: 36px; }
.card__btn {
  align-self: flex-start;
  text-decoration: none;
  font-weight: 600;
  color: #2ea043;
}
.card__link:hover .card__btn { color: #1a7431; }

/* .tele-dot — mesmo padrão de status do nappLibreCs */
.tele-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}
.tele-dot--on {
  background: #2ea043;
  box-shadow: 0 0 0 3px rgba(46, 160, 67, 0.2);
}
.tele-dot--off {
  background: #d1242f;
  box-shadow: 0 0 0 3px rgba(209, 36, 47, 0.2);
}
.tele-dot--unknown {
  background: #9aa0a6;
  box-shadow: 0 0 0 3px rgba(154, 160, 166, 0.2);
}

.empty {
  text-align: center;
  color: #6c757d;
  margin: 3rem 0;
}
/* ── nappPlay: tag com ênfase + nome forte ── */
.card__tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.02em; color: #111827; background: #eef1ee;
  border: 1px solid #dfe4df; border-radius: 6px; padding: 0.1rem 0.55rem;
  margin: 0.35rem 0 0; text-transform: capitalize;
}
.card__nome { font-size: 1.1rem; font-weight: 800; color: #10231a; }
/* card__link vira <button> no modal — reset */
button.card__link { background: none; border: 0; width: 100%; cursor: pointer; font: inherit; }

/* filtros: busca + chips de categoria */
.play-filtros { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0.4rem 1.25rem 0.9rem; }
.play-busca {
  flex: 1; min-width: 180px; padding: 0.5rem 0.8rem; font-size: 0.9rem;
  border: 1px solid #e8ebf0; border-radius: 9px; font-family: inherit;
}
.play-busca:focus { outline: none; border-color: #16A34A; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.play-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.play-chip {
  border: 1px solid #e8ebf0; background: #fff; color: #6c757d; cursor: pointer;
  border-radius: 999px; padding: 0.32rem 0.8rem; font-size: 0.8rem; font-weight: 700; text-transform: capitalize;
}
.play-chip:hover { border-color: #cbd2cb; }
.play-chip.on { background: #0d1a0d; color: #fff; border-color: #0d1a0d; }

/* atalho vira button */
button.play-atalho { border: 0; background: none; padding: 0; cursor: pointer; }

/* ── detalhe (página de app): telas | descrição ── */
.play-voltar {
  border: 0; background: #f3f4f6; color: #24322a; cursor: pointer; font-weight: 700;
  border-radius: 8px; padding: 0.45rem 0.9rem; margin: 1rem 1.25rem 0; font-size: 0.85rem;
}
.play-voltar:hover { background: #e8ebf0; }
#play-detalhe { max-height: 78vh; overflow-y: auto; }
.pd { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; padding: 1rem 1.25rem 1.5rem; align-items: start; }
.pd__telas { display: flex; flex-direction: column; gap: 1rem; }
.pd__shot { margin: 0; border: 1px solid #e8ebf0; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(12,17,29,.10); }
.pd__shot img { width: 100%; height: auto; display: block; }
.pd__shot figcaption { font-size: 0.78rem; color: #6c757d; padding: 0.5rem 0.75rem; background: #fafbfa; }
.pd__semtela { color: #9aa6b2; padding: 2rem; text-align: center; border: 1px dashed #e8ebf0; border-radius: 12px; }
.pd__info { position: sticky; top: 0; }
.pd__head { display: flex; align-items: center; gap: 12px; }
.pd__nome { font-size: 1.4rem; font-weight: 800; color: #10231a; margin: 0 0 2px; }
.pd__desc { color: #374151; font-size: 0.95rem; line-height: 1.6; margin: 0.9rem 0 1.2rem; }
.pd__get { display: inline-block; }
@media (max-width: 720px){ .pd { grid-template-columns: 1fr; } }
