/* ============================================================
   Arquivos & Downloads — Estilos
   ============================================================ */

:root {
  --aq-navy: #0D436B;
  --aq-navy-deep: #082F49;
  --aq-blue: #00A0DD;
  --aq-blue-soft: #7FCDE9;
  --aq-green: #50E596;
  --aq-light: #F1F5F9;
  --aq-white: #FFFFFF;
  --aq-muted: #5B7280;
  --aq-radius: 16px;
  --aq-shadow: 0 8px 24px rgba(13, 67, 107, 0.10);
  --aq-shadow-lg: 0 16px 40px rgba(13, 67, 107, 0.15);

  /* Cores por tipo */
  --aq-c-ppt:      #E97546;
  --aq-c-ppt-bg:   rgba(233, 117, 70, 0.12);
  --aq-c-pdf:      #E5484D;
  --aq-c-pdf-bg:   rgba(229, 72, 77, 0.12);
  --aq-c-img:      #00A0DD;
  --aq-c-img-bg:   rgba(0, 160, 221, 0.14);
  --aq-c-xls:      #16A34A;
  --aq-c-xls-bg:   rgba(22, 163, 74, 0.14);
  --aq-c-kv:       #7C3AED;
  --aq-c-kv-bg:    rgba(124, 58, 237, 0.12);
  --aq-c-vid:      #0D436B;
  --aq-c-vid-bg:   rgba(13, 67, 107, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--aq-light);
  color: var(--aq-navy);
  line-height: 1.55;
}

main { min-height: 70vh; }

/* ============ HERO ============ */
.aq-hero {
  background:
    radial-gradient(circle at 92% 12%, rgba(13, 67, 107, 0.14), transparent 42%),
    radial-gradient(circle at 8% 90%, rgba(0, 160, 221, 0.22), transparent 50%),
    linear-gradient(135deg, #F1F5F9 0%, #FFFFFF 100%);
  padding: 64px 24px 48px;
}
.aq-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.aq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--aq-navy);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(13, 67, 107, 0.06);
}
.aq-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--aq-blue);
  box-shadow: 0 0 0 4px rgba(0, 160, 221, 0.18);
}
.aq-hero h1 {
  font-size: 44px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -1px;
  line-height: 1.1;
}
.aq-hero h1 strong {
  background: linear-gradient(135deg, var(--aq-navy), var(--aq-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.aq-lede {
  color: var(--aq-muted);
  font-size: 16px;
  max-width: 680px;
  margin: 0 0 8px;
}

/* ============ TOOLBAR (filtros + busca) ============ */
.aq-toolbar {
  position: sticky;
  top: var(--whp-header-h, 60px);
  z-index: 30;
  background: rgba(238, 246, 248, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 67, 107, 0.08);
  padding: 14px 20px;
}
@media (max-width: 760px) {
  .aq-toolbar {
    position: static;
    padding: 12px 14px;
    /* Remove backdrop-filter em mobile pelo mesmo motivo da Jornada:
       evita criar stacking context que prende o .bs-panel filho. */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
  }
}
.aq-toolbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aq-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.aq-search {
  flex: 1;
  min-width: 220px;
  padding: 10px 16px;
  border: 1.5px solid rgba(13, 67, 107, 0.10);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  color: var(--aq-navy);
}
.aq-search:focus {
  outline: none;
  border-color: var(--aq-blue);
  box-shadow: 0 0 0 3px rgba(0, 160, 221, 0.14);
}
.aq-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--aq-muted);
  white-space: nowrap;
  padding: 0 8px;
}

/* Chips de filtro */
.aq-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Desktop: panel do bottom-sheet renderiza inline na toolbar */
@media (min-width: 761px) {
  .aq-bs-panel {
    /* sem fundo, sem sombra — comportamento de div normal */
  }
  .aq-bs-panel .bs-content {
    padding: 0;
  }
}
.aq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(13, 67, 107, 0.10);
  background: white;
  color: var(--aq-navy);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
  font-family: inherit;
}
.aq-chip:hover {
  border-color: var(--aq-blue);
  background: var(--aq-blue-soft);
}
.aq-chip.is-active {
  background: var(--aq-navy);
  color: white;
  border-color: var(--aq-navy);
}
.aq-chip-icon {
  font-size: 14px;
  line-height: 1;
}
.aq-chip-count {
  font-size: 11px;
  background: rgba(13, 67, 107, 0.10);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 800;
  margin-left: 2px;
}
.aq-chip.is-active .aq-chip-count {
  background: rgba(255, 255, 255, 0.20);
  color: white;
}

/* ============ LISTAGEM ============ */
.aq-list-section {
  padding: 32px 24px 80px;
}
.aq-list-container {
  max-width: 1200px;
  margin: 0 auto;
}
.aq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.aq-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--aq-muted);
  background: white;
  border-radius: var(--aq-radius);
  border: 1.5px dashed rgba(13, 67, 107, 0.14);
  font-size: 14px;
}
.aq-empty strong {
  display: block;
  font-size: 16px;
  color: var(--aq-navy);
  margin-bottom: 6px;
}

/* ============ CARD DE ARQUIVO ============ */
.aq-card {
  background: white;
  border-radius: var(--aq-radius);
  padding: 20px 22px;
  box-shadow: var(--aq-shadow);
  border: 1px solid rgba(13, 67, 107, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
  position: relative;
  overflow: hidden;
}
.aq-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--aq-shadow-lg);
}
.aq-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--aq-card-color, var(--aq-blue));
}

.aq-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.aq-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--aq-card-bg, rgba(0, 160, 221, 0.14));
  color: var(--aq-card-color, var(--aq-blue));
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.aq-card-meta {
  flex: 1;
  min-width: 0;
}
.aq-card-tipo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--aq-card-color, var(--aq-blue));
  background: var(--aq-card-bg, rgba(0, 160, 221, 0.14));
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.aq-card-nome {
  font-size: 16px;
  font-weight: 800;
  color: var(--aq-navy);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.aq-card-desc {
  font-size: 13px;
  color: var(--aq-muted);
  margin: 0;
  line-height: 1.55;
}
.aq-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed rgba(13, 67, 107, 0.10);
}
.aq-card-data {
  font-size: 11px;
  font-weight: 700;
  color: var(--aq-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.aq-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--aq-navy);
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: background 180ms ease, transform 180ms ease;
}
.aq-card-link:hover {
  background: var(--aq-blue);
  transform: translateY(-1px);
}

/* ============ RESPONSIVO ============ */
@media (max-width: 760px) {
  .aq-hero { padding: 44px 18px 36px; }
  .aq-hero h1 { font-size: 32px; }
  .aq-list-section { padding: 24px 16px 60px; }
  .aq-grid { grid-template-columns: 1fr; }
  .aq-search-row { flex-direction: column; align-items: stretch; }
  .aq-count { padding: 0; text-align: center; }
}

/* ============ ADMIN BAR (dentro do toolbar) ============ */
.aq-admin-slot {
  display: flex;
  align-items: center;
}
.aq-btn-add {
  white-space: nowrap;
}
.aq-btn-primary {
  background: linear-gradient(135deg, var(--aq-navy), #00547F);
  color: white;
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(13, 67, 107, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.aq-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(13, 67, 107, 0.26);
}
.aq-btn-ghost {
  background: white;
  color: var(--aq-navy);
  border: 1.5px solid rgba(13, 67, 107, 0.14);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.aq-btn-ghost:hover {
  background: var(--aq-light);
  border-color: var(--aq-blue);
}
.aq-btn-danger {
  background: rgba(229, 72, 77, 0.10);
  color: var(--aq-c-pdf);
  border: 1.5px solid rgba(229, 72, 77, 0.30);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.aq-btn-danger:hover {
  background: var(--aq-c-pdf);
  color: white;
  border-color: var(--aq-c-pdf);
}

/* ============ BOTÃO EDITAR NO CARD ============ */
.aq-card { position: relative; }
.aq-card-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(13, 67, 107, 0.10);
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 2;
  padding: 0;
}
.aq-card:hover .aq-card-edit {
  opacity: 1;
}
.aq-card-edit:hover {
  background: var(--aq-blue-soft);
  transform: scale(1.08);
}

/* ============ MODAL ============ */
.aq-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 41, 64, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: aq-fade-in 180ms ease;
}
@keyframes aq-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.aq-modal {
  background: white;
  border-radius: var(--aq-radius);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 60px rgba(0, 41, 64, 0.30);
  animation: aq-scale-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes aq-scale-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.aq-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(13, 67, 107, 0.08);
}
.aq-modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--aq-navy);
  letter-spacing: -0.2px;
}
.aq-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--aq-light);
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--aq-muted);
  display: grid;
  place-items: center;
  padding: 0;
}
.aq-modal-close:hover {
  background: rgba(229, 72, 77, 0.14);
  color: var(--aq-c-pdf);
}
.aq-modal-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.aq-modal-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--aq-navy);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.aq-modal-body label > span { color: var(--aq-navy); }
.aq-modal-body input,
.aq-modal-body select,
.aq-modal-body textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border: 1.5px solid rgba(13, 67, 107, 0.12);
  border-radius: 10px;
  background: white;
  color: var(--aq-navy);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  resize: vertical;
}
.aq-modal-body input:focus,
.aq-modal-body select:focus,
.aq-modal-body textarea:focus {
  outline: none;
  border-color: var(--aq-blue);
  box-shadow: 0 0 0 3px rgba(0, 160, 221, 0.14);
}
.aq-modal-body textarea {
  min-height: 70px;
  font-family: inherit;
}
.aq-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(13, 67, 107, 0.08);
  flex-wrap: wrap;
}
.aq-modal-actions-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ============ TOAST ============ */
.aq-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--aq-navy);
  color: white;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(13, 67, 107, 0.30);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 2000;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.aq-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.aq-toast-success { background: #16A34A; }
.aq-toast-error { background: var(--aq-c-pdf); }
