/* =========================================================
   APPLAY — LAYOUT PÚBLICO
   Estrutura visual inspirada em lojas modernas de aplicativos.
   Somente apresentação: sem alteração de lógica do sistema.
   ========================================================= */

:root {
  --play-green: #01875f;
  --play-green-dark: #056449;
  --play-text: #202124;
  --play-muted: #5f6368;
  --play-border: #e0e3e7;
  --play-soft: #f8f9fa;
  --play-chip: #f1f8f5;
  --play-white: #fff;
  --play-container: 1320px;
  --bs-body-bg: #fff;
  --bs-body-color: var(--play-text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: var(--play-text);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }

.play-container {
  width: min(var(--play-container), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Cabeçalho ---------- */
.play-header {
  height: 72px;
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid #f0f1f2;
  box-shadow: 0 1px 2px rgba(60,64,67,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1030;
}
.play-header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 28px;
}
.play-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 34px;
  color: #5f6368;
  text-decoration: none;
  flex: 0 0 auto;
}
.play-brand:hover { color: #3c4043; }
.play-brand-name {
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.35px;
}
.play-brand-symbol {
  position: relative;
  display: block;
  width: 32px;
  height: 34px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: linear-gradient(145deg, #34a853 0 38%, #fbbc04 38% 52%, #ea4335 52% 70%, #4285f4 70% 100%);
  filter: saturate(1.08);
}
.play-brand-symbol::after {
  content: "";
  position: absolute;
  inset: 7px 8px 7px 7px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255,255,255,.14);
}
.play-main-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.play-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #5f6368;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.play-nav-link:hover { color: var(--play-green); }
.play-nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.play-nav-link:hover::after { background: var(--play-green); }
.play-header-spacer { flex: 1; }

/* ---------- Página inicial ---------- */
.play-home { padding: 34px 0 90px; }
.play-category-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 38px;
  overflow-x: auto;
  scrollbar-width: none;
}
.play-category-tabs::-webkit-scrollbar { display: none; }
.play-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  color: #3c4043;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.play-category-chip.active {
  border-color: #cce7dc;
  background: #e6f4ea;
  color: #13765a;
}
.play-section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.play-section-title-row h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.35px;
  color: #202124;
}
.play-section-title-row p {
  margin: 0;
  color: #5f6368;
  font-size: 14px;
}
.play-app-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 34px 22px;
}
.play-app-tile {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.play-app-icon-shell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 22%;
  background: #f1f3f4;
  box-shadow: 0 1px 2px rgba(60,64,67,.20), 0 1px 3px rgba(60,64,67,.10);
  transition: transform .16s ease, box-shadow .16s ease;
}
.play-app-tile:hover .play-app-icon-shell {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(60,64,67,.18), 0 1px 3px rgba(60,64,67,.12);
}
.play-app-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.play-app-tile-body h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 3px;
  color: #202124;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.play-app-developer,
.play-app-price {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5f6368;
  font-size: 12px;
  line-height: 1.45;
}
.play-app-price { color: #3c4043; }
.play-home-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 72px;
  padding: 28px 30px;
  border-radius: 18px;
  background: #f1f8f5;
}
.play-home-info h2 {
  margin: 0 0 6px;
  color: #202124;
  font-size: 20px;
  font-weight: 600;
}
.play-home-info p {
  margin: 0;
  color: #5f6368;
  font-size: 14px;
}
.play-home-info > i {
  color: var(--play-green);
  font-size: 23px;
}

/* ---------- Botões ---------- */
.btn-play-primary,
.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  min-height: 42px;
  padding: 9px 24px;
  border: 1px solid var(--play-green);
  border-radius: 8px;
  background: var(--play-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}
.btn-play-primary:hover,
.btn-play-primary:focus,
.btn-brand:hover,
.btn-brand:focus {
  border-color: var(--play-green-dark);
  background: var(--play-green-dark);
  color: #fff;
}
.btn-play-secondary,
.btn-play-outline,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--play-green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.btn-play-secondary:hover,
.btn-play-outline:hover,
.btn-soft:hover { background: #f1f8f5; color: var(--play-green-dark); }

/* ---------- Página de detalhe ---------- */
.play-detail-page { padding: 48px 0 86px; }
.play-detail-container { max-width: 1180px; }
.play-detail-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding-bottom: 42px;
}
.play-detail-icon-shell {
  width: 190px;
  height: 190px;
  overflow: hidden;
  border-radius: 23%;
  background: #f1f3f4;
  box-shadow: 0 2px 5px rgba(60,64,67,.22), 0 1px 2px rgba(60,64,67,.12);
}
.play-detail-icon { width: 100%; height: 100%; display: block; object-fit: cover; }
.play-detail-hero-content { min-width: 0; }
.play-detail-hero-content h1 {
  margin: 0 0 7px;
  color: #202124;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -1.1px;
}
.play-detail-publisher {
  margin-bottom: 10px;
  color: var(--play-green);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}
.play-detail-short {
  max-width: 740px;
  margin: 0 0 20px;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.55;
}
.play-detail-stats {
  display: flex;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.play-detail-stats::-webkit-scrollbar { display: none; }
.play-detail-stat {
  min-width: 124px;
  padding: 2px 22px;
  text-align: center;
  border-right: 1px solid #dadce0;
}
.play-detail-stat:first-child { padding-left: 0; }
.play-detail-stat:last-child { border-right: 0; }
.play-detail-stat strong,
.play-detail-stat span { display: block; white-space: nowrap; }
.play-detail-stat strong {
  margin-bottom: 2px;
  color: #3c4043;
  font-size: 14px;
  font-weight: 600;
}
.play-detail-stat span { color: #5f6368; font-size: 12px; }
.play-detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.play-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 58px;
  align-items: start;
  padding-top: 24px;
}
.play-detail-section-block {
  padding: 30px 0;
  border-top: 1px solid #eaeced;
}
.play-detail-section-block:first-child { padding-top: 14px; border-top: 0; }
.play-detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.play-detail-section-heading h2 {
  margin: 0;
  color: #202124;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.35px;
}
.play-detail-section-heading i { color: #5f6368; font-size: 20px; }
.play-detail-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.7;
}
.play-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}
.play-info-row {
  padding: 14px 0;
  border-bottom: 1px solid #f0f1f2;
}
.play-info-row span,
.play-info-row strong { display: block; }
.play-info-row span { margin-bottom: 4px; color: #5f6368; font-size: 12px; }
.play-info-row strong {
  color: #202124;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.play-info-row-wide { grid-column: 1 / -1; }
.play-aside-card {
  margin-top: 12px;
  padding: 22px;
  border: 1px solid #dadce0;
  border-radius: 14px;
  background: #fff;
}
.play-aside-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  color: #202124;
  font-size: 15px;
  font-weight: 600;
}
.play-aside-title i { color: var(--play-green); font-size: 18px; }
.play-aside-card p {
  margin: 0;
  color: #5f6368;
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- Estados vazios ---------- */
.empty {
  padding: 54px 28px;
  border: 1px solid #e2e5e8;
  border-radius: 16px;
  background: #fafafa;
  color: #5f6368;
  text-align: center;
}
.detail-empty { margin: 36px 0; }
.detail-empty h1 { margin: 0; color: #202124; font-size: 26px; font-weight: 600; }

/* ---------- Rodapé ---------- */
.site-footer {
  margin-top: 14px;
  padding: 30px 0 36px;
  border-top: 1px solid #edf0f2;
  background: #fff;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand { margin-right: 10px; color: #3c4043; font-size: 13px; font-weight: 700; }
.footer-copy { color: #74777a; font-size: 12px; }

/* ---------- Responsividade pública ---------- */
@media (max-width: 1199px) {
  .play-app-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .play-app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .play-detail-body { grid-template-columns: 1fr; gap: 4px; }
  .play-detail-aside { max-width: 560px; }
}
@media (max-width: 767px) {
  .play-container { width: min(100% - 30px, var(--play-container)); }
  .play-header { height: 66px; }
  .play-header-inner { padding: 0 15px; }
  .play-brand { margin-right: 16px; }
  .play-brand-name { font-size: 20px; }
  .play-brand-symbol { width: 28px; height: 30px; }
  .play-main-nav { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .play-main-nav::-webkit-scrollbar { display: none; }
  .play-nav-link { padding: 0 10px; font-size: 13px; white-space: nowrap; }
  .play-home { padding-top: 24px; }
  .play-category-tabs { margin-bottom: 28px; }
  .play-app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px; }
  .play-app-icon-shell { border-radius: 21%; }
  .play-home-info { margin-top: 52px; padding: 22px; }
  .play-detail-page { padding: 30px 0 62px; }
  .play-detail-hero { grid-template-columns: 128px minmax(0, 1fr); gap: 22px; padding-bottom: 28px; align-items: start; }
  .play-detail-icon-shell { width: 128px; height: 128px; }
  .play-detail-hero-content h1 { font-size: 31px; letter-spacing: -.7px; }
  .play-detail-stats { grid-column: 1 / -1; }
  .play-detail-body { padding-top: 6px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 540px) {
  .play-brand-name { display: none; }
  .play-brand { margin-right: 8px; }
  .play-app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .play-section-title-row h1 { font-size: 22px; }
  .play-home-info { align-items: flex-start; }
  .play-detail-hero { display: block; }
  .play-detail-icon-shell { width: 110px; height: 110px; margin-bottom: 20px; }
  .play-detail-hero-content h1 { font-size: 29px; }
  .play-detail-stats { width: 100%; margin-top: 4px; }
  .play-detail-stat { min-width: 108px; padding: 2px 14px; }
  .play-detail-actions { display: grid; grid-template-columns: 1fr; }
  .play-detail-actions .btn { width: 100%; }
  .play-info-list { grid-template-columns: 1fr; }
  .play-info-row-wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* =========================================================
   ADMINISTRATIVO
   Mantido separado para preservar o visual e comportamento
   já existentes no painel.
   ========================================================= */
[data-bs-theme="dark"] {
  --bg: oklch(.15 .03 265);
  --bg-deep: oklch(.12 .03 265);
  --surface: oklch(.21 .03 265);
  --surface-raised: oklch(.25 .035 265);
  --ink: oklch(.98 .005 260);
  --muted: oklch(.78 .025 260);
  --line: oklch(.98 .005 260 / .13);
  --brand: oklch(.81 .14 205);
  --brand-2: oklch(.59 .24 295);
  --success: oklch(.78 .16 155);
  --danger: oklch(.76 .17 25);
  --radius: 8px;
  --gradient-brand: linear-gradient(135deg, var(--brand), var(--brand-2));
  --shadow: 0 20px 50px oklch(.05 .01 265 / .3);
  --glow: 0 8px 28px oklch(.65 .18 240 / .2);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: var(--brand);
}
.admin-body { background: var(--bg); color: var(--ink); }
.admin-body .brand,
.login-wrap .brand { color: var(--ink) !important; }
.admin-body .brand-mark,
.login-wrap .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--gradient-brand);
  font-size: 24px;
  box-shadow: var(--glow);
}
.admin-side {
  width: 240px;
  min-height: 100vh;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--bg-deep);
}
.admin-side a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.admin-side a.brand { display: flex; }
.admin-side a:hover,
.admin-side a.active { background: var(--surface); color: var(--brand); }
.stat { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat .n { margin-top: 8px; font-size: 36px; font-weight: 700; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--bg-deep), var(--bg));
}
.login-wrap .panel,
.admin-body .panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-thumb { width: 56px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--bg-deep); }
.admin-body .table {
  --bs-table-bg: var(--surface);
  --bs-table-color: var(--ink);
  --bs-table-border-color: var(--line);
  --bs-table-striped-bg: var(--surface-raised);
}
.admin-body .table-light {
  --bs-table-bg: var(--surface-raised);
  --bs-table-color: var(--muted);
  --bs-table-border-color: var(--line);
}
.admin-body .table th { font-size: 12px; font-weight: 600; }
.admin-body .table td { padding-top: 16px; padding-bottom: 16px; }
.admin-body .form-control,
.admin-body .form-select,
.login-wrap .form-control,
.login-wrap .form-select {
  padding: 11px 14px;
  border-color: var(--line);
  border-radius: var(--radius);
  background-color: var(--bg-deep);
  color: var(--ink);
  color-scheme: dark;
}
.admin-body .form-control::placeholder,
.login-wrap .form-control::placeholder { color: var(--muted); }
.admin-body .form-control:focus,
.admin-body .form-select:focus,
.login-wrap .form-control:focus,
.login-wrap .form-select:focus {
  border-color: var(--brand);
  background-color: var(--bg-deep);
  color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 18%, transparent);
}
.admin-body .form-control::file-selector-button { background: var(--surface-raised); color: var(--ink); }
.admin-body .form-check-input { background-color: var(--bg-deep); border-color: var(--line); }
.admin-body .form-check-input:checked { background-color: var(--brand-2); border-color: var(--brand-2); }
.admin-body .btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.admin-body .btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: var(--bg-deep); }
.admin-body .btn-outline-danger { color: var(--danger); border-color: var(--danger); }
.admin-body .btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--bg-deep); }
.admin-body .text-secondary,
.login-wrap .text-secondary { color: var(--muted) !important; }
.admin-body .text-success { color: var(--success) !important; }
.admin-body .text-danger { color: var(--danger) !important; }
.admin-body .text-bg-success { background: color-mix(in oklch, var(--success) 18%, var(--surface)) !important; color: var(--success) !important; }
.admin-body .text-bg-secondary { background: var(--surface-raised) !important; color: var(--muted) !important; }
.admin-body .alert-success { background: color-mix(in oklch, var(--success) 10%, var(--surface)); color: var(--success); border-color: var(--line); }
.admin-body .alert-danger,
.login-wrap .alert-danger { background: color-mix(in oklch, var(--danger) 10%, var(--surface)); color: var(--danger); border-color: var(--line); }
.admin-body .btn-close { filter: invert(1); }

/* ---------- Responsividade ---------- */
@media (max-width: 1199px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .detail-content-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-side { max-width: 560px; }
}
@media (max-width: 767px) {
  html { scroll-padding-top: 72px; }
  .play-header { height: auto; min-height: 66px; }
  .play-header .navbar { min-height: 66px; width: 100%; }
  .play-header .navbar-collapse { padding: 8px 0 14px; }
  .play-header .nav-link { padding: 10px 4px !important; }
  .play-header .nav-link::after { display: none; }
  .store-hero { padding: 52px 0 42px; }
  .store-hero h1 { letter-spacing: -1.2px; }
  .store-hero p { font-size: 17px; }
  .store-section { padding: 34px 0 60px; }
  .app-grid { grid-template-columns: 1fr; gap: 6px; }
  .store-app-card { grid-template-columns: 92px minmax(0, 1fr); min-height: 122px; gap: 15px; padding: 14px 4px; }
  .app-icon-wrap { width: 92px; height: 92px; border-radius: 19px; }
  .app-detail-section { padding: 24px 0 58px; }
  .app-detail-head { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; }
  .detail-app-icon-wrap { width: 112px; height: 112px; border-radius: 24px; }
  .app-detail-title h1 { font-size: 31px; letter-spacing: -.8px; }
  .app-detail-title p { font-size: 15px; }
  .detail-info-bar { width: 100%; margin-left: 0; }
  .detail-info-item { min-width: 120px; padding: 3px 16px; }
  .detail-actions { margin-left: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .admin-side { width: 100%; min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-side a { padding: 10px; }
}
@media (max-width: 520px) {
  .brand { font-size: 20px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 19px; }
  .store-hero h1 { font-size: 38px; }
  .app-detail-head { align-items: start; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; }
  .detail-app-icon-wrap { width: 90px; height: 90px; border-radius: 20px; }
  .app-detail-title h1 { font-size: 26px; }
  .detail-actions { display: grid; grid-template-columns: 1fr; }
  .detail-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ========================================================================== 
   APPLAY CONSOLE — visual inspirado no Google Play Console
   Somente apresentação da área administrativa.
   ========================================================================== */
:root {
  --console-blue: #1a73e8;
  --console-blue-hover: #1765cc;
  --console-blue-soft: #e8f0fe;
  --console-green: #188038;
  --console-red: #d93025;
  --console-text: #202124;
  --console-muted: #5f6368;
  --console-line: #dadce0;
  --console-line-soft: #e8eaed;
  --console-bg: #f8f9fa;
  --console-surface: #ffffff;
  --console-hover: #f1f3f4;
}

.admin-body {
  margin: 0;
  background: var(--console-bg) !important;
  color: var(--console-text) !important;
  font-family: Arial, "Helvetica Neue", sans-serif;
}
.admin-shell { min-height: 100vh; }
.console-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1040;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 18px;
  border-bottom: 1px solid var(--console-line);
  background: #fff;
}
.console-topbar-left,
.console-topbar-actions,
.console-brand {
  display: flex;
  align-items: center;
}
.console-topbar-left { gap: 10px; }
.console-topbar-actions { gap: 8px; }
.console-brand {
  gap: 9px;
  color: var(--console-text);
  text-decoration: none;
}
.console-brand:hover { color: var(--console-text); }
.console-brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #34a853 0 25%, #4285f4 25% 50%, #fbbc04 50% 75%, #ea4335 75% 100%);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}
.console-brand-name {
  color: #3c4043;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.35px;
}
.console-brand-console {
  margin-left: 1px;
  color: #5f6368;
  font-size: 19px;
  font-weight: 400;
}
.console-menu-toggle,
.console-icon-link {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 20px;
  text-decoration: none;
}
.console-menu-toggle:hover,
.console-icon-link:hover { background: var(--console-hover); color: #3c4043; }
.console-user-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #5f6368;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.console-layout { display: flex; padding-top: 64px; min-height: 100vh; }
.console-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 256px !important;
  border-right: 1px solid var(--console-line);
  background: #fff;
  overflow-y: auto;
}
.console-sidebar-body { display: block !important; padding: 12px 8px 24px !important; }
.console-nav { display: flex; flex-direction: column; gap: 2px; }
.console-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 0 22px 22px 0;
  color: #3c4043;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.console-nav-link i { width: 22px; color: #5f6368; font-size: 19px; text-align: center; }
.console-nav-link:hover { background: #f1f3f4; color: #202124; }
.console-nav-link.active { background: var(--console-blue-soft); color: #174ea6; font-weight: 600; }
.console-nav-link.active i { color: #1967d2; }
.console-nav-divider { height: 1px; margin: 14px 8px; background: var(--console-line-soft); }
.console-nav-label {
  padding: 4px 16px 8px;
  color: #5f6368;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.console-main {
  width: calc(100% - 256px);
  min-width: 0;
  margin-left: 256px;
  background: var(--console-bg);
}
.console-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 40px 64px;
}
.console-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.console-page-head h1 {
  margin: 0 0 7px;
  color: #202124;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -.35px;
}
.console-page-head p {
  margin: 0;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.55;
}
.console-primary-btn,
.admin-body .btn-brand {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--console-blue) !important;
  border-radius: 4px !important;
  background: var(--console-blue) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(60,64,67,.2);
}
.console-primary-btn:hover,
.admin-body .btn-brand:hover { background: var(--console-blue-hover) !important; border-color: var(--console-blue-hover) !important; color: #fff !important; }
.console-secondary-btn {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--console-line);
  border-radius: 4px;
  background: #fff;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 600;
}
.console-secondary-btn:hover { background: #f8fbff; border-color: #c6d7ef; color: #1765cc; }
.console-welcome-card,
.console-help-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--console-line);
  border-radius: 8px;
  background: #fff;
}
.console-welcome-card { margin-bottom: 34px; }
.console-welcome-icon,
.console-help-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--console-blue-soft);
  color: #1967d2;
  font-size: 21px;
}
.console-welcome-copy { min-width: 0; flex: 1; }
.console-welcome-copy h2,
.console-help-card h3 {
  margin: 0 0 4px;
  color: #202124;
  font-size: 17px;
  font-weight: 500;
}
.console-welcome-copy p,
.console-help-card p { margin: 0; color: #5f6368; font-size: 13px; line-height: 1.5; }
.console-text-action {
  margin-left: auto;
  white-space: nowrap;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.console-text-action:hover { color: #174ea6; text-decoration: underline; }
.console-section-title { margin-bottom: 14px; }
.console-section-title h2 { margin: 0 0 3px; color: #202124; font-size: 18px; font-weight: 500; }
.console-section-title p { margin: 0; color: #5f6368; font-size: 13px; }
.console-stat-card {
  min-height: 154px;
  padding: 20px 22px;
  border: 1px solid var(--console-line);
  border-radius: 8px;
  background: #fff;
}
.console-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #5f6368; font-size: 13px; }
.console-stat-top i { color: #5f6368; font-size: 18px; }
.console-stat-card > strong { display: block; margin: 12px 0 2px; color: #202124; font-size: 32px; line-height: 1; font-weight: 400; }
.console-stat-card > small { color: #80868b; font-size: 12px; }
.console-help-card { margin-top: 28px; }
.console-list-card,
.console-form-card {
  border: 1px solid var(--console-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.console-list-toolbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--console-line-soft);
}
.console-list-title { display: flex; align-items: baseline; gap: 10px; }
.console-list-title h2 { margin: 0; color: #202124; font-size: 16px; font-weight: 500; }
.console-list-title span { color: #80868b; font-size: 12px; }
.admin-body .console-table { --bs-table-bg: #fff; --bs-table-color: #3c4043; --bs-table-border-color: #e8eaed; margin: 0; }
.admin-body .console-table thead th {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom-width: 1px;
  background: #f8f9fa;
  color: #5f6368;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-body .console-table tbody td { padding-top: 14px; padding-bottom: 14px; color: #3c4043; font-size: 13px; }
.admin-body .console-table tbody tr:hover td { background: #fafafa; }
.console-app-cell { display: flex; align-items: center; gap: 14px; min-width: 220px; }
.console-app-cell .table-thumb,
.admin-body .table-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f1f3f4;
}
.console-app-cell strong { display: block; margin-bottom: 2px; color: #202124; font-size: 14px; font-weight: 500; }
.console-app-cell span { display: block; color: #80868b; font-size: 11px; }
.console-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
}
.console-status span { width: 7px; height: 7px; border-radius: 50%; }
.console-status.is-active { color: #137333; background: #e6f4ea; }
.console-status.is-active span { background: #188038; }
.console-status.is-inactive { color: #5f6368; background: #f1f3f4; }
.console-status.is-inactive span { background: #80868b; }
.console-action-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1a73e8;
  font-size: 12px;
  font-weight: 600;
}
.console-action-btn:hover { background: #e8f0fe; color: #174ea6; }
.console-action-danger { color: #d93025; }
.console-action-danger:hover { background: #fce8e6; color: #b31412; }
.console-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #80868b; }
.console-empty i { margin-bottom: 4px; font-size: 30px; }
.console-empty strong { color: #3c4043; font-size: 14px; font-weight: 500; }
.console-empty span { font-size: 12px; }
.console-page-head-form { margin-bottom: 22px; }
.console-breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: #80868b; font-size: 12px; }
.console-breadcrumb a { color: #1a73e8; text-decoration: none; }
.console-breadcrumb a:hover { text-decoration: underline; }
.console-breadcrumb i { font-size: 10px; }
.console-form-wrap { max-width: 1040px; }
.console-form-card { margin-bottom: 18px; }
.console-form-card-head { padding: 20px 24px 15px; border-bottom: 1px solid var(--console-line-soft); }
.console-form-card-head h2 { margin: 0 0 4px; color: #202124; font-size: 16px; font-weight: 500; }
.console-form-card-head p { margin: 0; color: #5f6368; font-size: 12px; line-height: 1.5; }
.console-form-card-body { padding: 22px 24px 26px; }
.admin-body .console-form-wrap .form-label,
.console-login-card .form-label { margin-bottom: 7px; color: #3c4043; font-size: 13px; font-weight: 500; }
.admin-body .console-form-wrap .form-control,
.admin-body .console-form-wrap .form-select,
.console-login-card .form-control {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #bdc1c6;
  border-radius: 4px;
  background: #fff;
  color: #202124;
  color-scheme: light;
  font-size: 14px;
  box-shadow: none;
}
.admin-body .console-form-wrap textarea.form-control { min-height: auto; }
.admin-body .console-form-wrap .form-control::placeholder,
.console-login-card .form-control::placeholder { color: #9aa0a6; }
.admin-body .console-form-wrap .form-control:focus,
.admin-body .console-form-wrap .form-select:focus,
.console-login-card .form-control:focus {
  border-color: var(--console-blue);
  background: #fff;
  color: #202124;
  box-shadow: 0 0 0 1px var(--console-blue);
}
.admin-body .console-form-wrap .form-control::file-selector-button { background: #f8f9fa; color: #3c4043; }
.admin-body .console-form-wrap .form-text { margin-top: 6px; color: #80868b; font-size: 11px; }
.admin-body .console-form-wrap .form-check-input { background-color: #fff; border-color: #80868b; }
.admin-body .console-form-wrap .form-check-input:checked { background-color: #1a73e8; border-color: #1a73e8; }
.console-current-image { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--console-line-soft); border-radius: 6px; background: #f8f9fa; }
.console-current-image img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.console-current-image strong { display: block; margin-bottom: 7px; color: #3c4043; font-size: 12px; font-weight: 600; }
.console-current-image label { color: #5f6368; font-size: 12px; }
.console-visibility-box { padding: 16px; border: 1px solid var(--console-line-soft); border-radius: 6px; background: #f8f9fa; }
.console-visibility-box .form-check-label { color: #3c4043; font-size: 13px; font-weight: 600; }
.console-visibility-box p { margin: 7px 0 0 42px; color: #80868b; font-size: 11px; line-height: 1.45; }
.console-form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; padding: 14px 0; background: linear-gradient(to bottom, rgba(248,249,250,.5), #f8f9fa 30%); }
.console-form-errors { max-width: 1040px; border-radius: 6px; font-size: 13px; }
.console-alert { border-radius: 6px; font-size: 13px; }

/* Login no estilo do Console */
.console-login-body { margin: 0; background: #fff; color: #202124; font-family: Arial, "Helvetica Neue", sans-serif; }
.console-login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 42px 20px 24px; }
.console-login-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 48px; }
.console-login-card { width: 100%; max-width: 450px; padding: 38px 40px 34px; border: 1px solid #dadce0; border-radius: 8px; background: #fff; }
.console-login-card h1 { margin: 0 0 8px; color: #202124; font-size: 24px; line-height: 1.35; font-weight: 400; text-align: center; }
.console-login-subtitle { margin: 0 0 30px; color: #5f6368; font-size: 14px; text-align: center; }
.console-login-footer { margin-top: auto; padding-top: 34px; color: #80868b; font-size: 12px; }
.console-login-card .alert-danger { border: 1px solid #f3c7c3; background: #fce8e6; color: #b31412; }

@media (max-width: 991.98px) {
  .console-sidebar { top: 0; width: 290px !important; }
  .console-sidebar .offcanvas-header { min-height: 64px; border-bottom: 1px solid var(--console-line); }
  .console-main { width: 100%; margin-left: 0; }
  .console-content { padding: 28px 24px 54px; }
}
@media (max-width: 767.98px) {
  .console-topbar { height: 60px; padding: 0 10px; }
  .console-layout { padding-top: 60px; }
  .console-brand-console { display: none; }
  .console-content { padding: 24px 16px 44px; }
  .console-page-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .console-page-head .console-primary-btn { align-self: flex-start; }
  .console-welcome-card,
  .console-help-card { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
  .console-text-action { width: 100%; margin-left: 64px; }
  .console-form-card-head,
  .console-form-card-body { padding-left: 18px; padding-right: 18px; }
  .console-form-actions { justify-content: stretch; }
  .console-form-actions .btn { flex: 1; }
  .console-login-card { padding: 30px 24px; }
  .console-action-btn span { display: none; }
}

/* ---------- Mídias do aplicativo ---------- */
.play-media-section {
  margin: 6px 0 28px;
  overflow: hidden;
}
.play-media-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #dadce0 transparent;
}
.play-media-video-card,
.play-media-image-card {
  flex: 0 0 auto;
  height: 330px;
  overflow: hidden;
  border: 1px solid #e3e6e8;
  border-radius: 14px;
  background: #f8f9fa;
  scroll-snap-align: start;
}
.play-media-video-card {
  width: min(586px, 76vw);
  background: #000;
}
.play-media-video-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.play-media-image-card {
  min-width: 210px;
  max-width: 590px;
  text-decoration: none;
}
.play-media-image-card img {
  display: block;
  width: auto;
  min-width: 210px;
  max-width: 590px;
  height: 100%;
  object-fit: cover;
}

.console-media-divider {
  height: 1px;
  margin: 2px 0 22px;
  background: var(--console-line-soft);
}
.console-gallery-editor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.console-gallery-editor-item {
  display: block;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--console-line-soft);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.console-gallery-editor-item img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #f1f3f4;
}
.console-gallery-editor-item span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  color: #5f6368;
  font-size: 12px;
}

@media (max-width: 767.98px) {
  .play-media-video-card,
  .play-media-image-card { height: 250px; }
  .play-media-video-card { width: 86vw; }
  .play-media-image-card,
  .play-media-image-card img { min-width: 165px; max-width: 86vw; }
}

/* ---------- Checkout ---------- */
.checkout-page { padding: 38px 0 72px; background: #fff; }
.checkout-container { max-width: 1120px; }
.checkout-heading { margin-bottom: 28px; }
.checkout-heading h1 { margin: 14px 0 8px; font-size: 30px; font-weight: 600; color: #202124; }
.checkout-heading p { margin: 0; color: #5f6368; }
.checkout-back { display: inline-flex; align-items: center; gap: 7px; color: #146c55; text-decoration: none; font-weight: 600; font-size: 14px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.checkout-card, .checkout-summary { border: 1px solid #e0e3e7; border-radius: 16px; background: #fff; }
.checkout-card { padding: 26px; }
.checkout-card h2, .checkout-summary h2 { margin: 0; color: #202124; font-size: 20px; font-weight: 600; }
.checkout-form { display: grid; gap: 18px; margin-top: 22px; }
.checkout-form label { display: block; margin-bottom: 7px; color: #3c4043; font-size: 13px; font-weight: 600; }
.checkout-form .form-control { min-height: 48px; border-color: #dadce0; border-radius: 9px; }
.checkout-payment-placeholder { display: flex; gap: 12px; padding: 16px; border-radius: 12px; background: #f1f8f5; color: #3c4043; }
.checkout-payment-placeholder i { font-size: 22px; color: #13765a; }
.checkout-payment-placeholder strong, .checkout-payment-placeholder span { display: block; }
.checkout-payment-placeholder span { margin-top: 3px; color: #5f6368; font-size: 13px; }
.checkout-submit { width: 100%; min-height: 48px; }
.checkout-summary { padding: 22px; position: sticky; top: 92px; }
.checkout-summary-app { display: flex; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid #eceff1; }
.checkout-summary-icon { width: 74px; height: 74px; flex: 0 0 74px; overflow: hidden; border-radius: 18px; background: #f1f3f4; }
.checkout-summary-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.checkout-summary-app p { margin: 5px 0 2px; color: #5f6368; font-size: 13px; }
.checkout-summary-app span { color: #80868b; font-size: 12px; }
.checkout-summary-line, .checkout-summary-total { display: flex; justify-content: space-between; gap: 16px; }
.checkout-summary-line { padding: 20px 0; color: #5f6368; font-size: 14px; }
.checkout-summary-total { padding-top: 18px; border-top: 1px solid #eceff1; color: #202124; font-size: 18px; }

/* Enquadramento visual consistente das imagens já cadastradas e das novas. */
.play-app-icon, .play-detail-icon, .checkout-summary-icon img { object-fit: cover; object-position: center; }
.play-media-image-card { background: #f1f3f4; }
.play-media-image-card img { object-fit: contain; object-position: center; background: #f1f3f4; }
.console-gallery-editor-item img { object-fit: contain; object-position: center; }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
