/* Navegador de pastas: componentes exclusivos, sem substituir regras de documentos. */
[hidden] {
  display: none !important;
}
header {
  gap: 25px;
}
.brand {
  flex-shrink: 0;
}
.search-host {
  flex: 1;
  min-width: 200px;
  max-width: 710px;
}
.global-search {
  display: flex;
  align-items: center;
  background: #f0f3f8;
  border: 1px solid #eef1f6;
  border-radius: 9px;
  padding: 0 15px;
  gap: 11px;
  height: 44px;
  color: #718099;
}
.global-search:focus-within {
  border-color: #9db1e8;
  background: white;
  box-shadow: 0 1px 8px #294f9e10;
}
.global-search input {
  min-width: 0;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: #374963;
  font-size: 12px;
  outline: 0;
}
.global-search input:focus-visible {
  outline: 2px solid transparent;
}
.profile-control {
  flex-shrink: 0;
  gap: 9px;
}
.profile-control select {
  width: 225px;
  max-width: 225px;
  font-size: 10px;
}
.profile-control label {
  display: none;
}
#nav .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

#nav .sidebar-bottom { flex-shrink: 0; }

@media (min-width: 761px) {
  body:has(#portalLayout:not([hidden])) {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }

  #portalLayout {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }

  #portalLayout > main { overflow-y: auto; }
  #nav { min-height: 0; }

  #nav .sidebar-bottom { margin-top: auto; padding-top: 8px; }

  #nav .sidebar-menu { overflow-y: auto; }
  #nav .sidebar-bottom button { width: 100%; padding-block: 8px; }
  #nav .sidebar-bottom .local-label { margin-block: 6px; }
}

@media (max-width: 760px) {
  #nav .sidebar-menu {
    max-height: 34dvh;
    overflow-y: auto;
  }
  #nav .sidebar-bottom { flex-wrap: wrap; }
}

.classification-selection {
  max-height: 12rem;
  overflow-y: auto;
}

.sidebar-add {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  margin: 0 0 20px;
  padding: 14px 13px;
  font-size: 12px;
}
.explorer-location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}
.explorer-location .breadcrumbs { margin: 0; }
.explorer-back { white-space: nowrap; }
.explorer-heading { margin-top: 12px; }

.breadcrumbs {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  color: #a0acbd;
  margin: 0 0 23px;
  min-height: 22px;
}
.breadcrumbs button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  font-size: 11px;
  color: #65778f;
  font-weight: 400;
}
.breadcrumbs button:hover {
  color: #315bce;
}
.breadcrumbs button[aria-current='page'] {
  color: #3c4f6c;
  font-weight: 600;
}
.explorer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.explorer-heading h1 {
  font-size: 28px;
  margin: 0 0 9px;
}
.explorer-heading p {
  margin: 0;
  color: #65778f;
  font-size: 12px;
  line-height: 1.7;
}
.explorer-heading .primary {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.display-control {
  display: inline-flex;
  background: #fff;
  border: 1px solid #dfe5ee;
  padding: 3px;
  border-radius: 7px;
  flex-shrink: 0;
}
.display-control button {
  border: 0;
  padding: 6px 9px;
  border-radius: 4px;
  background: transparent;
  color: #8a98ad;
}
.display-control button[aria-pressed='true'] {
  background: #eaf0fd;
  color: #315bce;
}
.display-control svg {
  width: 16px;
  height: 16px;
}
.explorer-filters {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 27px;
  padding-bottom: 21px;
  border-bottom: 1px solid #e6ebf2;
}
.filter-field select {
  font-size: 11px;
  height: 35px;
  border-radius: 6px;
  padding: 8px 10px;
  max-width: 200px;
  background: #fff;
  color: #667990;
}
.search-context {
  font-size: 11px;
  color: #7a89a0;
  margin: -7px 0 22px;
  line-height: 1.8;
}
.search-context b {
  color: #526b92;
  font-weight: 500;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: #53677f;
  margin: 0 0 14px;
  letter-spacing: 0;
}
.section-label > span {
  font-size: 10px;
  font-weight: 400;
  color: #91a0b6;
  padding-left: 5px;
}
.folder-entries.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 15px;
}
.folder-entry {
  border: 1px solid #e1e7f0;
  border-radius: 9px;
  background: white;
  text-align: left;
  padding: 23px 20px 20px;
  color: #3e5373;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-height: 139px;
  position: relative;
  box-shadow: 0 2px 3px #18355702;
}
.folder-entry:hover {
  border-color: #adc0ed;
  background: #fcfdff;
  box-shadow: 0 3px 13px #315bce08;
}
.entry-icon {
  color: #6f8fc8;
  background: #edf2fc;
  border-radius: 7px;
  width: 38px;
  height: 35px;
  display: grid;
  place-items: center;
}
.entry-icon svg {
  width: 21px;
  height: 21px;
}
.entry-text {
  min-width: 0;
}
.entry-text b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.entry-text small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #687b94;
  margin-top: 4px;
  line-height: 1.6;
}
.entry-chevron {
  position: absolute;
  right: 17px;
  top: 26px;
  color: #bbc5d4;
}
.entry-chevron svg {
  width: 15px;
  height: 15px;
}
.folder-entries.list {
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  overflow: hidden;
}
.folder-entries.list .folder-entry {
  min-height: 77px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #edf0f5;
  padding: 16px 20px;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  width: 100%;
}
.folder-entries.list .folder-entry:last-child {
  border-bottom: 0;
}
.folder-entries.list .entry-chevron {
  position: static;
  margin-left: auto;
}
.files-section {
  margin-top: 26px;
}
.files-section:first-child {
  margin-top: 0;
}
.document-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 15px;
}
.document-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: white;
  border: 1px solid #e1e7f0;
  border-radius: 9px;
  padding: 18px;
  gap: 10px;
  color: #415573;
  min-height: 200px;
}
.document-card.selected {
  background: #f3f6ff;
  border-color: #8fa8e3;
}
.document-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 6px;
  color: #bac5d5;
}
.document-card .file-icon {
  width: 34px;
  min-width: 34px;
  height: 41px;
}
.document-card b {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.document-card small {
  font-size: 10px;
  font-weight: 400;
  color: #687b94;
  line-height: 1.7;
}
.document-card > .status-group {
  margin-top: auto;
  padding-top: 5px;
}
.document-list table {
  width: 100%;
}
.folder-empty {
  border: 1px dashed #dce3ef;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 55px 20px;
}
.folder-empty .empty-icon svg {
  width: 40px;
  height: 40px;
}
.folder-empty h2 {
  font-size: 18px;
  color: #5f7292;
  margin: 18px 0 10px;
}
.folder-empty p {
  color: #93a1b6;
  font-size: 12px;
  margin-bottom: 25px;
}
.folder-empty button {
  margin: 0 4px;
  font-size: 11px;
}
.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0;
  margin: 15px 0;
}
.admin-summary .stat {
  border: 0;
  background: transparent;
  padding: 5px 20px 5px 0;
}
.admin-summary .stat-icon {
  display: none;
}
.admin-summary .stat strong {
  font-size: 17px;
}
@media (min-width: 1600px) {
  .folder-entries.grid,
  .document-cards {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
@media (max-width: 1100px) {
  header {
    flex-wrap: wrap;
    height: auto;
    padding: 17px 23px;
    gap: 16px;
  }
  .search-host {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }
  .profile-control {
    margin-left: auto;
  }
  .with-details .folder-entries.grid,
  .with-details .document-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  header {
    padding: 15px 16px;
    gap: 13px;
  }
  .brand {
    font-size: 20px;
  }
  .brand small {
    font-size: 7px;
  }
  .profile-control {
    width: auto;
  }
  .profile-control .avatar {
    display: none;
  }
  .profile-control select {
    width: 155px;
    max-width: 155px;
    font-size: 9px;
    padding: 10px 6px;
  }
  .search-host {
    min-width: 0;
  }
  .global-search {
    height: 41px;
  }
  .global-search input {
    font-size: 11px;
  }
  .sidebar-add {
    display: none;
  }
  .breadcrumbs {
    gap: 7px;
    margin-bottom: 18px;
  }
  .breadcrumbs button {
    font-size: 10px;
  }
  .explorer-heading {
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
  }
  .explorer-heading h1 {
    font-size: 23px;
  }
  .explorer-heading p {
    font-size: 10px;
  }
  .explorer-heading > .row {
    justify-content: flex-end;
    gap: 9px;
  }
  .explorer-heading .primary {
    font-size: 10px;
    padding: 8px;
  }
  .explorer-filters {
    gap: 8px;
    margin-bottom: 21px;
    padding-bottom: 17px;
  }
  .filter-field {
    flex: 1;
    min-width: 100px;
  }
  .filter-field select {
    width: 100%;
    max-width: none;
    font-size: 10px;
  }
  .folder-entries.grid,
  .document-cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 11px;
  }
  .folder-entry {
    padding: 17px 14px;
    min-height: 136px;
    gap: 13px;
  }
  .entry-text b {
    font-size: 11px;
  }
  .entry-text small {
    font-size: 9px;
  }
  .entry-chevron {
    right: 10px;
    top: 22px;
  }
  .document-card {
    padding: 14px;
    min-height: 206px;
  }
  .document-card b {
    font-size: 11px;
  }
  .search-context {
    font-size: 10px;
  }
  .folder-empty {
    padding: 40px 16px;
  }
  .folder-empty h2 {
    font-size: 16px;
  }
  .folder-empty p {
    font-size: 11px;
  }
}

.global-search:focus-within {
  outline: 2px solid #315bce;
  outline-offset: 2px;
}
.badge {
  font-size: 10px;
}

.portfolio-filters { align-items: flex-end; }
.portfolio-filters label { display: grid; gap: 5px; font-size: 12px; }
.portfolio-filters label:first-child { flex: 1 1 240px; }
.portfolio-filters input,
.portfolio-filters select { min-width: 0; min-height: 38px; }
