/* fundo igual agenda */
.docs-shell {
    background: #f6f7fb;
    min-height: 100vh;
    gap: 1.2rem;
  }
  
  /* filtros reaproveitando agenda */
  .docs-filters {
    background: #fff;
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    box-shadow: 0 8px 24px rgba(21, 37, 72, 0.04);
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-wrap: wrap;
  }
  
  .upload-drop {
    background: #fff;
    border: 1px dashed rgba(48, 87, 192, 0.4);
    border-radius: 1rem;
    padding: .8rem 1rem 1rem;
    text-align: center;
    cursor: pointer;
    flex: 1 1 250px;
    transition: .15s;
  }
  .upload-drop:hover,
  .upload-drop.is-dragover {
    background: rgba(48, 87, 192, 0.035);
    border-color: rgba(48, 87, 192, 0.8);
  }
  .upload-title {
    font-weight: 600;
    margin-bottom: .2rem;
  }
  .upload-sub {
    font-size: .72rem;
    color: #6b7380;
    margin: 0;
  }
  
  .filter-box {
    background: #fff;
    border-radius: 1rem;
    padding: .4rem .65rem .6rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(21, 37, 72, 0.02);
  }
  .filter-box label {
    font-size: .68rem;
    color: #6b7380;
  }
  
  /* layout 2 colunas */
  .docs-main {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
  }
  
  /* esquerda: lista grande */
  .docs-left {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .docs-section-title {
    font-size: .82rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: .45rem;
  }
  
  /* lista de documentos (em linha) */
  .docs-list {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(21,37,72,0.03);
    overflow: hidden;
  }
  
  .doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .8rem;
    border-bottom: 1px solid rgba(15,23,42,0.03);
  }
  .doc-row:last-child {
    border-bottom: none;
  }
  
  .doc-main {
    display: flex;
    gap: .55rem;
    align-items: center;
    min-width: 0;
  }
  .doc-icon {
    width: 38px;
    height: 38px;
    border-radius: .85rem;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
  }
  .doc-icon-generic {
    background: rgba(149, 156, 172, 0.12);
    color: #475569;
  }
  .doc-icon-pdf {
    background: rgba(248, 113, 113, 0.12);
  }
  .doc-icon-pdf img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
  .doc-icon-img {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
  }
  
  .doc-info {
    min-width: 0;
  }
  .doc-title {
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 460px;
  }
  .doc-meta {
    font-size: .7rem;
    color: #6b7280;
  }
  
  .share-inline {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-top: .2rem;
  }
  .share-chip {
    background: rgba(48, 87, 192, 0.09);
    border: 1px solid rgba(48, 87, 192, 0.04);
    border-radius: 999px;
    padding: .1rem .45rem .1rem .6rem;
    font-size: .62rem;
    display: inline-flex;
    gap: .2rem;
    align-items: center;
  }
  .share-chip small {
    font-size: .58rem;
    opacity: .7;
  }
  .remove-share {
    background: transparent;
    border: none;
    font-size: .7rem;
    cursor: pointer;
    color: #0f172a;
  }
  .share-empty {
    font-size: .64rem;
    color: #94a3b8;
  }
  
  .doc-actions {
    display: flex;
    gap: .45rem;
    align-items: center;
  }
  
  /* botões com ícone + texto curto (sem depender de Bootstrap Icons) */
  .doc-btn {
    background: #edf3ff;
    border: none;
    border-radius: .6rem;
    height: 30px;
    padding: 0 .45rem;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    cursor: pointer;
    font-size: .68rem;
    color: #1f4271;
    transition: .15s;
    white-space: nowrap;
  }
  .doc-btn:hover {
    background: #d9e4ff;
  }
  .doc-btn .icon {
    font-size: .78rem;
    line-height: 1;
  }
  .doc-btn.danger {
    background: rgba(248, 113, 113, 0.12);
    color: #b91c1c;
  }
  .doc-btn.danger:hover {
    background: rgba(248, 113, 113, 0.3);
    color: #fff;
  }
  
  /* linha extra para input de compartilhamento */
  .share-input-row {
    margin-top: .35rem;
    display: flex;
    gap: .35rem;
  }
  .share-input-row input {
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: .55rem;
    padding: .25rem .4rem;
    font-size: .7rem;
  }
  .share-input-row button {
    background: #3057c0;
    border: none;
    border-radius: .5rem;
    color: #fff;
    font-size: .68rem;
    padding: .25rem .6rem;
    cursor: pointer;
  }
  
  /* coluna direita: compartilhados comigo */
  .docs-right {
    flex: 0 0 290px;
    position: sticky;
    top: 1.2rem;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    max-height: calc(100vh - 140px);
  }
  
  .shared-list {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(21,37,72,0.03);
    overflow-y: auto;
    max-height: 100%;
  }
  .shared-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem;
    border-bottom: 1px solid rgba(15,23,42,0.03);
  }
  .shared-item:last-child {
    border-bottom: none;
  }
  .shared-icon {
    width: 28px;
    height: 28px;
    background: rgba(59,130,246,0.08);
    border-radius: .75rem;
    display: grid;
    place-items: center;
    font-size: .8rem;
    color: #1d4ed8;
  }
  .shared-body {
    flex: 1;
    min-width: 0;
  }
  .shared-title {
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .shared-meta {
    font-size: .6rem;
    color: #94a3b8;
  }
  .shared-actions .doc-btn {
    height: 26px;
    padding: 0 .45rem;
    font-size: .63rem;
  }
  
  /* modal de preview */
  .doc-preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
  }
  .doc-preview-modal.active {
    display: flex;
  }
  .doc-preview-box {
    background: #fff;
    border-radius: 1rem;
    padding: .8rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
  }
  
  .empty-text {
    padding: .6rem .8rem 1rem;
    font-size: .72rem;
    color: #94a3b8;
  }
  
  /* responsivo */
  @media (max-width: 992px) {
    .docs-main {
      flex-direction: column;
    }
    .docs-right {
      position: static;
      max-height: none;
      width: 100%;
    }
    .doc-title {
      max-width: 100%;
    }
  }
  @media (max-width: 600px) {
    .doc-row {
      flex-direction: column;
      align-items: flex-start;
    }
    .doc-actions {
      flex-wrap: wrap;
    }
  }
/* barra de pacientes (segunda topbar) */
.patients-topbar {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* busca pequena, largura fixa */
.patients-search {
  flex: 0 0 auto;
}
.patients-search .form-control {
  max-width: 500px;   /* <<< aqui você ajusta */
  min-width: 400px;
}

/* lado direito: botões + toggle */
.patients-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: auto;   /* empurra tudo pra direita */
}

.btn-group-inline {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.patients-toggle {
  display: flex;
  gap: .4rem;
  align-items: center;
  white-space: nowrap;
}

.patients-toggle label {
  margin: 0;
  font-size: .8rem;
  color: #374151;
}

/* responsivo */
@media (max-width: 768px) {
  .patients-topbar {
    flex-wrap: wrap;
  }
  .patients-actions {
    width: 100%;
    justify-content: space-between;
  }
  .patients-search {
    width: 100%;
  }
  .patients-search .form-control {
    max-width: 100%;
  }
}
  
