* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #222;
}

/* =========================
   TOPBAR GLOBAL
========================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  min-height: 132px;
  display: flex;
  align-items: center;
  padding: 0 20px;

  background-color: #0b1120;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/static/images/cataloguinho-logo.jpeg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 30%;
  pointer-events: none;
  z-index: 0;
}


.topbar-main {
  position: relative;
  z-index: 1;

  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  flex: 1 1 auto;
  min-width: 220px;
  height: 96px;
}

/* bloco usuário no topo */
.topbar-user-info {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 10px;
}

.topbar-user-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-whatsapp-link {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.topbar-whatsapp-link:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.topbar-whatsapp-link svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.topbar-user-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: white;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.topbar-user-name {
  font-weight: bold;
  font-size: 15px;
}

.topbar-plan-line {
  font-size: 12px;
  color: #e5e7eb;
}

/* botões da topbar desktop */
.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}

.top-actions button {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.top-actions button:hover {
  opacity: 0.96;
  transform: translateY(-1px);
}

.top-actions .vip-btn {
  background: #f59e0b;
  color: white;
  font-weight: bold;
}

/* navegação inferior mobile */
.mobile-bottom-nav {
  display: none;
}

/* =========================
   LAYOUT GERAL
========================= */

.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 16px;
}

.search-box {
  background: white;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.search-box h1 {
  font-size: 28px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 12px;
}

.form-grid input,
.form-grid select,
.form-grid button {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.form-grid button {
  background: #0d6efd;
  color: white;
  border: none;
  cursor: pointer;
}

.results-section {
  margin-top: 20px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.results-list {
  display: grid;
  gap: 16px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card.vip {
  border-left: 6px solid #f4b400;
}

.card.free {
  border-left: 6px solid #adb5bd;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.badge.vip {
  background: #fff3cd;
  color: #7a5a00;
}

.badge.free {
  background: #e9ecef;
  color: #495057;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin-bottom: 6px;
  color: #444;
}

.card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin: 10px 0;
}

.empty-state {
  background: white;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  color: #666;
}

/* =========================
   SIDEBAR ADMIN
========================= */

.admin-sidebar {
  position: fixed;
  top: 132px;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #1f2937;
  color: white;
  padding: 20px 16px;
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
}

.admin-sidebar-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.admin-sidebar a {
  display: block;
  text-decoration: none;
  color: white;
  padding: 12px 14px;
  border-radius: 10px;
  transition: 0.2s;
}

.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-sidebar a.active {
  background: #2563eb;
  font-weight: bold;
}

.admin-floating-toggle {
  display: none;
}

.admin-sidebar-overlay {
  display: none;
}

/* =========================
   TABLET / NOTEBOOK PEQUENO
========================= */

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .search-box h1 {
    font-size: 22px;
  }

  .admin-sidebar {
    position: static;
    width: auto;
    display: none;
    margin: 0 16px 16px 16px;
    border-radius: 14px;
  }

  body.admin-has-sidebar .page-wrap,
  body.admin-has-sidebar .admin-layout,
  body.admin-has-sidebar .details-container,
  body.admin-has-sidebar .feed-container,
  body.admin-has-sidebar .search-container,
  body.admin-has-sidebar .settings-container,
  body.admin-has-sidebar .vip-container,
  body.admin-has-sidebar .container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.admin-has-sidebar .card,
  body.admin-has-sidebar .search-box,
  body.admin-has-sidebar .empty-state {
    width: 100% !important;
  }

  .admin-floating-toggle {
    position: fixed;
    right: 16px;
    bottom: 104px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: #2563eb;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1300;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  }

  body.admin-has-sidebar .admin-floating-toggle {
    display: flex;
  }

  body.admin-has-sidebar .admin-sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - 32px);
    border-radius: 16px;
    display: none;
    z-index: 1250;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }

  body.admin-has-sidebar .admin-sidebar.open {
    display: flex;
  }

  body.admin-has-sidebar .admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
    display: none;
  }

  body.admin-has-sidebar .admin-sidebar-overlay.open {
    display: block;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .topbar {
    min-height: 98px;
    padding: 0 14px;
    background-position: 25% center;
    background-size: 40%;
    background-repeat: no-repeat;
    background-color: #0b1120;
  }

  .topbar-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .logo {
    min-width: 90px;
    height: 68px;
  }

  .topbar-user-info {
	  display: flex;
	  align-items: center;
	  justify-content: flex-end;
	  margin-left: auto;
	  margin-right: 0;
	  max-width: calc(100% - 100px);
	  text-align: right;
	}
	
  .topbar-user-summary {
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
  }

  .topbar-whatsapp-link {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .topbar-whatsapp-link svg {
    width: 18px;
    height: 18px;
  }

	.topbar-user-lines {
	  display: flex;
	  flex-direction: column;
	  align-items: flex-end;
	  text-align: right;
	  font-size: 12px;
	  width: 100%;
	}

	.topbar-user-lines span {
	  white-space: normal; /* PERMITE QUEBRAR LINHA */
	  overflow: visible;
	  text-overflow: unset;
	}

	.topbar-user-name {
	  font-size: 13px;
	}

	.topbar-plan-line {
	  font-size: 11px;
	}

  .top-actions {
    display: none !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: #111827;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  }

  .mobile-bottom-nav button {
    border: none;
    border-radius: 10px;
    padding: 10px 6px;
    font-size: 12px;
    cursor: pointer;
    background: #2563eb;
    color: white;
    white-space: nowrap;
  }

  .mobile-bottom-nav .vip-btn {
    background: #f59e0b;
    color: white;
    font-weight: bold;
  }

  body {
    padding-bottom: 84px;
  }
}