.research-documents-page {
  .page-header {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #eef0f4;
  }

  .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.2rem;
    border-radius: .6rem;
    font-weight: 500;
    font-size: .9rem;
    color: #fff;
    background: $primary;
    border: 1px solid $primary;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;

    &:hover {
      background: darken($primary, 8%);
    }

    &:active {
      transform: translateY(1px);
    }
  }

  .document-card {
    border: 1px solid #eef0f4;
    border-radius: .9rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;

    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 .75rem 1.75rem rgba(16, 24, 40, .1);
      border-color: #dfe3ee;
    }
  }

  .file-icon-wrap {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: .7rem;
    background: linear-gradient(135deg, rgba($primary, .12), rgba($primary, .2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: $primary;
  }

  .file-ext-badge {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: $primary;
    background: rgba($primary, .1);
    padding: .1rem .45rem;
    border-radius: .3rem;
  }

  .empty-state {
    background: #f8f9fb;
    border-radius: 1rem;
    border: 1px dashed #dfe3ee;
    color: #98a2b3;
  }

  .card-actions {

    .action-btn,
    .action-form button {
      width: 36px !important;
      height: 36px !important;
      padding: 0 !important;
      margin: 0 !important;
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      border-radius: .55rem;
      border: 1px solid #e4e7ec;
      background: #fff;
      color: #667085;
      line-height: 1;
      transition: background .15s ease, color .15s ease, border-color .15s ease;

      &:hover {
        background: #f2f4f7;
        color: #344054;
        border-color: #d0d5dd;
      }
    }

    .action-btn-view:hover {
      background: rgba($primary, .1);
      color: $primary;
      border-color: rgba($primary, .35);
    }

    .action-btn-danger:hover,
    .action-form button:hover {
      background: #fef3f2;
      color: #d92d20;
      border-color: #fda29b;
    }

    .action-form {
      display: inline-flex;
      margin: 0;
      padding: 0;
    }
  }
}

.modal-header-icon {
  display: inline-flex;
  color: $primary;
}

.doc-preview-modal {
  .modal-dialog {
    max-height: calc(100vh - 3.5rem);
    height: calc(100vh - 3.5rem);
  }

  .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .modal-header,
  .modal-footer {
    flex-shrink: 0;
  }

  .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 0;

  &.text-preview {
    border: 1px solid #dee2e6;
    background: #fff;
  }
}