/* =====================================================
   SÍNDICO BUSCA - DOCUMENTOS ÚTEIS
   Layout dinâmico com categorias, busca e lista mobile-first
===================================================== */

.sb-utilidades-section,
.sb-utilidades-section * {
  box-sizing: border-box;
}

.sb-utilidades-section {
  width: 100%;
  background: #f4f9fd;
  padding: 54px 20px 70px;
  font-family: inherit;
  color: #071326;
}

.sb-utilidades-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

/* HERO */

.sb-utilidades-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 34px;
}

.sb-utilidades-title-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.sb-utilidades-icon-main {
  width: 78px;
  min-width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #eef5ff;
  border: 1px solid #dce8f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-utilidades-icon-main svg,
.sb-print-icon svg,
.sb-cat-icon svg,
.sb-safe-icon svg,
.sb-tip-icon svg,
.sb-utilidades-search svg,
.sb-bookmark svg,
.sb-doc-btn svg {
  fill: none !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-utilidades-icon-main svg {
  width: 38px;
  height: 38px;
  stroke: #0b4da2 !important;
  stroke-width: 1.8;
}

.sb-utilidades-title-wrap h1 {
  margin: 0 0 8px;
  color: #071326;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
}

.sb-utilidades-title-wrap p {
  margin: 0;
  color: #5f6b80;
  font-size: 17px;
  line-height: 1.45;
}

/* BOX SUPERIOR */

.sb-utilidades-print-box {
  width: 100%;
  max-width: 390px;
  min-height: 84px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d9e6f5;
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 30px rgba(10, 30, 60, 0.04);
}

.sb-print-icon {
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(217, 154, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-print-icon svg {
  width: 25px;
  height: 25px;
  stroke: #d99a00 !important;
  stroke-width: 1.9;
}

.sb-utilidades-print-box strong {
  display: block;
  color: #071326;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 4px;
}

.sb-utilidades-print-box span {
  display: block;
  color: #5f6b80;
  font-size: 14px;
  line-height: 1.35;
}

/* LAYOUT */

.sb-utilidades-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
}

/* SIDEBAR */

.sb-utilidades-sidebar {
  background: #ffffff;
  border: 1px solid #e1eaf4;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(10, 30, 60, 0.06);
}

.sb-utilidades-sidebar h2 {
  margin: 0 0 20px;
  color: #071326;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.sb-utilidades-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-utilidades-cats a {
  min-height: 52px;
  border-radius: 12px;
  padding: 10px 12px;
  color: #071326 !important;
  text-decoration: none !important;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  transition: all 0.22s ease;
}

.sb-utilidades-cats a:hover,
.sb-utilidades-cats a.active {
  background: #eef5ff;
  color: #0b4da2 !important;
}

.sb-cat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sb-cat-icon svg {
  width: 21px;
  height: 21px;
  stroke: #506177 !important;
  stroke-width: 1.8;
}

.sb-utilidades-cats a:hover .sb-cat-icon svg,
.sb-utilidades-cats a.active .sb-cat-icon svg {
  stroke: #0b4da2 !important;
}

.sb-utilidades-cats span:not(.sb-cat-icon) {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.sb-utilidades-cats em {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dfeaff;
  color: #0b4da2;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* SAFE BOX */

.sb-utilidades-safe-box {
  margin-top: 26px;
  padding: 18px;
  border-radius: 14px;
  background: #f6faff;
  border: 1px solid #dce8f7;
  display: flex;
  gap: 14px;
}

.sb-safe-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(217, 154, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-safe-icon svg {
  width: 22px;
  height: 22px;
  stroke: #d99a00 !important;
  stroke-width: 1.8;
}

.sb-utilidades-safe-box strong {
  display: block;
  color: #071326;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sb-utilidades-safe-box span {
  display: block;
  color: #5f6b80;
  font-size: 12.5px;
  line-height: 1.4;
}

/* MAIN */

.sb-utilidades-main {
  background: #ffffff;
  border: 1px solid #e1eaf4;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(10, 30, 60, 0.06);
  min-width: 0;
}

/* TOOLBAR */

.sb-utilidades-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.sb-utilidades-search {
  min-height: 48px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-width: 0;
}

.sb-utilidades-search svg {
  width: 21px;
  min-width: 21px;
  height: 21px;
  stroke: #6a7688 !important;
  stroke-width: 1.8;
}

.sb-utilidades-search input {
  width: 100%;
  min-width: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #071326;
  font-size: 14px;
  height: 46px;
}

.sb-utilidades-search input::placeholder {
  color: #8a96a8;
}

.sb-utilidades-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbe5f0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #071326 !important;
  font-size: 14px !important;
  font-weight: 700;
  padding: 0 14px !important;
  outline: none !important;
  box-shadow: none !important;
}

/* LISTA DE DOCUMENTOS */

.sb-documents-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sb-documents-list.is-loading {
  opacity: .45;
  pointer-events: none;
}

.sb-document-card {
  position: relative;
  width: 100%;
  min-height: 118px;
  border: 1px solid #e1eaf4;
  border-radius: 16px;
  background: #ffffff;
  padding: 22px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: center;
  transition: all .25s ease;
}

.sb-document-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(10, 30, 60, 0.08);
  border-color: #cbdcf0;
}

/* BOOKMARK */

.sb-bookmark {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sb-bookmark svg {
  width: 20px;
  height: 20px;
  stroke: #687386 !important;
  stroke-width: 1.8;
}

/* THUMB */

.sb-doc-thumb {
  position: relative;
  width: 76px;
  height: 92px;
}

.sb-doc-paper {
  width: 76px;
  height: 92px;
  fill: #ffffff !important;
  stroke: #d6e0ec !important;
  stroke-width: 1.5;
  filter: drop-shadow(0 8px 16px rgba(10, 30, 60, 0.08));
}

.sb-doc-paper path {
  fill: none;
  stroke: #d6e0ec;
}

.sb-doc-paper path:first-child {
  fill: #ffffff;
}

.sb-doc-type {
  position: absolute;
  left: 18px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(10, 30, 60, .12);
}

.sb-doc-type svg {
  width: 24px;
  height: 24px;
  fill: none !important;
  stroke: #ffffff !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sb-doc-type .sb-file-icon-text {
  fill: #ffffff !important;
  stroke: none !important;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  font-family: Arial, Helvetica, sans-serif;
  text-anchor: middle;
  letter-spacing: -.5px;
}

.sb-doc-type .sb-file-icon-text-pdf {
  font-size: 8px;
  letter-spacing: 0;
}

.sb-doc-type.blue { background: #0b4da2; }
.sb-doc-type.green { background: #2f9b32; }
.sb-doc-type.red { background: #d93636; }
.sb-doc-type.gold { background: #d99a00; }
.sb-doc-type.purple { background: #7c3cc9; }
.sb-doc-type.gray { background: #607086; }

/* CONTENT */

.sb-doc-content {
  min-width: 0;
  padding-right: 28px;
}

.sb-doc-content h3 {
  margin: 0 0 8px;
  color: #071326;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
  padding-right: 26px;
}

.sb-doc-meta {
  display: block;
  color: #526177;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.sb-doc-content p {
  margin: 0;
  color: #5f6b80;
  font-size: 14px;
  line-height: 1.45;
}

/* ACTIONS */

.sb-doc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sb-doc-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 9px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 800;
  transition: all .22s ease;
}

.sb-doc-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.sb-doc-btn-download {
  background: #0b4da2;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(11, 77, 162, 0.16);
}

.sb-doc-btn-download svg {
  stroke: #ffffff !important;
}

.sb-doc-btn:hover {
  transform: translateY(-2px);
}

.sb-doc-btn-download:hover {
  background: #083f86;
  color: #ffffff !important;
}

.sb-doc-disabled {
  opacity: .55;
  pointer-events: none;
  cursor: not-allowed;
}

/* TIP ALINHADA SOMENTE À COLUNA DOS DOCUMENTOS */

.sb-utilidades-tip {
  margin: 24px 0 0;
  width: 100%;
  min-height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  border: 1px solid #dce8f7;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
}

.sb-tip-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef5ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-tip-icon svg {
  width: 21px;
  height: 21px;
  stroke: #d99a00 !important;
  stroke-width: 1.8;
}

.sb-utilidades-tip strong {
  color: #071326;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.sb-utilidades-tip p {
  margin: 0;
  color: #5f6b80;
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
}

/* ESTADOS */

.sb-empty-documents,
.sb-empty-cats {
  margin: 0;
  padding: 28px;
  border: 1px dashed #cbdcf0;
  border-radius: 14px;
  background: #f6faff;
  color: #526177;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.sb-empty-cats {
  text-align: left;
  padding: 16px;
}

/* PORTO / WP BAKERY FIX */

.wpb_wrapper .sb-utilidades-section h1,
.wpb_wrapper .sb-utilidades-section h2,
.wpb_wrapper .sb-utilidades-section h3,
.wpb_wrapper .sb-utilidades-section p {
  font-family: inherit;
}

.wpb_wrapper .sb-utilidades-section a {
  text-decoration: none;
}

.wpb_wrapper .sb-utilidades-section svg {
  overflow: visible;
}

/* RESPONSIVO */

@media (max-width: 1199px) {
  .sb-utilidades-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .sb-document-card {
    grid-template-columns: 76px minmax(0, 1fr) 122px;
  }
}

@media (max-width: 991px) {
  .sb-utilidades-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .sb-utilidades-print-box {
    max-width: 100%;
  }

  .sb-utilidades-layout {
    grid-template-columns: 1fr;
  }

  .sb-utilidades-sidebar,
  .sb-utilidades-main {
    width: 100%;
  }

  .sb-utilidades-sidebar {
    order: 1;
  }

  .sb-utilidades-main {
    order: 2;
  }

  .sb-utilidades-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .sb-utilidades-section {
    padding: 34px 14px 48px;
  }

  .sb-utilidades-hero {
    gap: 18px;
    margin-bottom: 22px;
  }

  .sb-utilidades-title-wrap {
    align-items: flex-start;
    gap: 16px;
  }

  .sb-utilidades-icon-main {
    width: 58px;
    min-width: 58px;
    height: 58px;
  }

  .sb-utilidades-icon-main svg {
    width: 30px;
    height: 30px;
  }

  .sb-utilidades-title-wrap h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .sb-utilidades-title-wrap p {
    font-size: 15px;
  }

  .sb-utilidades-print-box {
    padding: 16px;
  }

  .sb-utilidades-sidebar,
  .sb-utilidades-main {
    padding: 18px;
    border-radius: 18px;
  }

  .sb-utilidades-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sb-document-card {
    min-height: auto;
    grid-template-columns: 66px minmax(0, 1fr);
    padding: 16px;
    gap: 14px;
  }

  .sb-doc-thumb {
    width: 62px;
    height: 78px;
  }

  .sb-doc-paper {
    width: 62px;
    height: 78px;
  }

  .sb-doc-type {
    width: 34px;
    height: 34px;
    left: 14px;
    bottom: 10px;
  }

  .sb-doc-type svg {
    width: 20px;
    height: 20px;
  }

  .sb-doc-type .sb-file-icon-text {
    font-size: 12px;
  }

  .sb-doc-type .sb-file-icon-text-pdf {
    font-size: 7px;
  }

  .sb-doc-content {
    padding-right: 14px;
  }

  .sb-doc-content h3 {
    font-size: 16px;
    padding-right: 26px;
  }

  .sb-doc-content p {
    font-size: 13.5px;
  }

  .sb-doc-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .sb-doc-btn {
    width: 100%;
    min-height: 46px;
  }

  .sb-utilidades-tip {
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .sb-utilidades-cats {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .sb-utilidades-cats a {
    min-width: 230px;
    scroll-snap-align: start;
  }

  .sb-utilidades-safe-box {
    margin-top: 18px;
  }

  .sb-utilidades-tip {
    flex-direction: column;
    gap: 10px;
  }

  .sb-utilidades-tip strong {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .sb-utilidades-title-wrap {
    flex-direction: column;
  }

  .sb-utilidades-title-wrap h1 {
    font-size: 27px;
  }

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

  .sb-doc-thumb {
    margin-bottom: 2px;
  }

  .sb-doc-content {
    padding-right: 20px;
  }
}
