:root {
  --brand-blue: #1e59d3;
  --brand-blue-dark: #08368d;
  --brand-blue-deep: #062a70;
  --brand-blue-soft: #eaf1ff;
  --brand-orange: #ec5a2a;
  --brand-orange-dark: #c9471d;
  --brand-yellow: #f4c747;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --border: #e2e8f2;
  --border-strong: #cbd7ea;
  --text: #20242d;
  --text-soft: #4b5565;
  --muted: #7a8597;
  --shadow: 0 16px 40px rgba(8, 54, 141, 0.10);
  --shadow-hover: 0 22px 54px rgba(8, 54, 141, 0.16);
  --radius: 16px;
  --sidebar: 278px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 94% 4%, rgba(30, 89, 211, 0.08), transparent 22%),
    radial-gradient(circle at 12% 88%, rgba(236, 90, 42, 0.05), transparent 24%);
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

/* SIDEBAR — azul institucional da Champion Dog */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 18%),
    linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-blue-dark) 58%, var(--brand-blue-deep) 100%);
  box-shadow: 10px 0 32px rgba(8, 54, 141, 0.10);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 6px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  margin-bottom: 24px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand-orange);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  transform: rotate(-1deg);
}

.brand-mark svg,
.btn svg,
.icon-btn svg,
.meta-item svg,
.search-box svg,
.mobile-menu-btn svg,
.close-modal svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.brand-text strong {
  display: block;
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.brand-text span {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  line-height: 1.3;
}

.sidebar-label {
  padding: 0 10px 10px;
  color: rgba(255,255,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 10px;
  font-weight: 800;
}

.product-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.product-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.78);
  transition: 170ms ease;
  border: 1px solid transparent;
}

.product-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.09);
}

.product-link.active {
  color: var(--brand-blue-dark);
  background: #fff;
  border-color: rgba(255,255,255,0.36);
  box-shadow: 0 9px 22px rgba(0,0,0,0.14);
  font-weight: 800;
}

.product-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(236, 90, 42, 0.13);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 10px 0;
  color: rgba(255,255,255,0.66);
  font-size: 11px;
  line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.sidebar-footer-badge {
  display: table;
  margin-bottom: 9px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* CONTEÚDO */
.main-content {
  min-width: 0;
  padding: 0 clamp(18px, 3vw, 44px) 48px;
}

.identity-strip {
  min-height: 38px;
  margin: 0 calc(clamp(18px, 3vw, 44px) * -1) 0;
  padding: 0 clamp(18px, 3vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: var(--brand-blue-dark);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-strip span {
  font-weight: 900;
}

.identity-strip strong {
  color: rgba(255,255,255,0.76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  padding: 30px 0 26px;
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-blue);
  box-shadow: 0 8px 20px rgba(30,89,211,0.18);
  cursor: pointer;
}

.page-heading {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-orange);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--brand-blue-dark);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.page-subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.counter-pill {
  border: 1px solid #d9e4f7;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(8,54,141,0.06);
}

.counter-pill strong {
  color: var(--brand-blue);
}

/* FILTROS */
.toolbar {
  position: sticky;
  top: 10px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(8,54,141,0.07);
}

.filter-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.filter-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-title {
  color: var(--brand-blue-dark);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 2px;
}

.filter-chip {
  cursor: pointer;
  color: #526076;
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 700;
  transition: 160ms ease;
}

.filter-chip:hover {
  color: var(--brand-blue);
  border-color: #9db9ed;
  background: #f7faff;
}

.filter-chip.active {
  color: #fff;
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  box-shadow: 0 6px 14px rgba(30,89,211,0.16);
}

.search-box {
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-blue);
  background: #f8faff;
  border: 1px solid #dce5f3;
  border-radius: 10px;
  padding: 0 12px;
}

.search-box input {
  width: 100%;
  height: 40px;
  outline: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #9aa5b6;
}

/* GALERIA */
.creative-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.creative-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(8,54,141,0.07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.creative-card:hover {
  transform: translateY(-4px);
  border-color: #bad0f4;
  box-shadow: var(--shadow-hover);
}

.preview {
  position: relative;
  aspect-ratio: 9 / 13;
  max-height: 410px;
  min-height: 260px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(30,89,211,0.92), rgba(8,54,141,0.98)),
    #0b4bb4;
}

.preview::before {
  content: '';
  position: absolute;
  width: 210px;
  height: 210px;
  right: -62px;
  top: -60px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(4,26,70,0.42)),
    repeating-linear-gradient(-36deg, transparent 0 38px, rgba(255,255,255,0.025) 38px 39px);
  pointer-events: none;
}

.preview-watermark {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--brand-blue-dark);
  background: #fff;
  box-shadow: 0 7px 18px rgba(0,0,0,0.12);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.preview-watermark::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand-orange);
}

.preview-center {
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-blue-dark);
  background: #fff;
  border: 8px solid rgba(255,255,255,0.22);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}

.preview-center svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.preview-btn {
  position: absolute;
  z-index: 3;
  inset: auto 14px 14px 14px;
  width: calc(100% - 28px);
  min-height: 42px;
  border-radius: 9px;
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(118,42,16,0.24);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  transform: translateY(7px);
  transition: 180ms ease;
}

.preview-btn:hover {
  background: var(--brand-orange-dark);
}

.preview-btn:disabled {
  cursor: not-allowed;
  opacity: .55 !important;
}

.creative-card:hover .preview-btn,
.preview-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 13px 0 16px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #59667a;
  background: #f8faff;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 700;
}

.meta-item svg {
  color: var(--brand-blue);
}

.copy-box {
  border-left: 3px solid var(--brand-orange);
  background: #fff8f4;
  border-radius: 8px;
  padding: 11px 12px;
  color: #687386;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 58px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.btn,
.icon-btn {
  min-height: 42px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 900;
  font-size: 11px;
  transition: 160ms ease;
}

.btn-primary {
  color: #fff;
  background: var(--brand-blue);
  box-shadow: 0 7px 18px rgba(30,89,211,0.18);
}

.btn-primary:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--brand-blue-dark);
  background: #fff;
  border: 1px solid #cdd9ec;
}

.btn-secondary:hover {
  color: var(--brand-orange-dark);
  border-color: #f0a187;
  background: #fffaf7;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #b8c7dc;
  border-radius: var(--radius);
  padding: 46px 22px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

.empty-state strong {
  display: block;
  color: var(--brand-blue-dark);
  font-size: 16px;
  margin-bottom: 6px;
}

.no-results {
  display: none;
  margin-top: 28px;
  border: 1px dashed #b8c7dc;
  border-radius: var(--radius);
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,25,67,0.78);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.34);
  box-shadow: 0 30px 100px rgba(4,26,70,0.44);
}

.modal-header {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 18px;
  color: #fff;
  background: var(--brand-blue);
}

.modal-title {
  font-size: 13px;
  font-weight: 900;
}

.close-modal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
}

.close-modal:hover {
  background: var(--brand-orange);
}

.video-wrap {
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  background: var(--brand-blue-dark);
  color: #fff;
  border-left: 4px solid var(--brand-orange);
  padding: 12px 15px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 40px rgba(8,54,141,0.28);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 1180px) {
  .creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    box-shadow: 20px 0 70px rgba(5,25,67,0.38);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(5,25,67,0.54);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    padding-top: 0;
  }

  .identity-strip {
    margin-bottom: 0;
  }

  .mobile-menu-btn {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
  }

  .topbar {
    align-items: flex-start;
    padding-top: 22px;
  }

  .page-heading {
    flex: 1;
  }

  .topbar-actions {
    display: none;
  }

  .toolbar {
    position: static;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding-inline: 14px;
  }

  .identity-strip {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .identity-strip strong {
    display: none;
  }

  .creative-grid {
    grid-template-columns: 1fr;
  }

  .filter-groups,
  .filter-block,
  .search-box {
    width: 100%;
  }

  .search-box {
    min-width: 0;
  }

  .filter-block {
    align-items: flex-start;
  }

  .filter-title {
    width: 100%;
    margin-bottom: 2px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .preview {
    aspect-ratio: 16 / 11;
    max-height: none;
    min-height: 220px;
  }

  .preview-btn {
    opacity: 1;
    transform: none;
  }

  .modal {
    padding: 10px;
  }

  .video-wrap {
    aspect-ratio: 9 / 14;
    max-height: 78vh;
  }
}
